Re: Proposed fix for #8001 RFC

From: Roland Kay <roland.kay_at_ox.compsoc.net>
Date: Tue May 31 2005 - 04:10:21 CEST

Going through the RTF importer source I've discovered some
existing code by Dom which seems to do something like what
Ryan wants. Unfortunately, it's disabled because the
"setClipboard()" call which sets the m_isPaste importer
member variable isn't called.

The following patch adds this call to IE_Imp_RTF::pasteFromBuffer().
With this in place differences in formatting between
"Normal" styles are overlaid within the document without
affect the "Normal" style definition.

However, it still imports styles from the source document
that are not present in the selected text. I think this is
unnecessary and would be annoying if the source document was
a large document with lots of styles defined (which the user
would then have to remove from the target document every
time they paste).

BTW: I'm not sure if passing "m_dposPaste" to setClipboard
is correct.

Best wishes,

R.

--- ie_imp_RTF.cpp-orig 2005-05-31 01:57:26.000000000 +0100
+++ ie_imp_RTF.cpp 2005-05-31 02:25:32.796013328 +0100
@@ -9963,6 +9963,7 @@
         m_lenPasteBuffer = lenData;
         m_pCurrentCharInPasteBuffer = pData;
         m_dposPaste = pDocRange->m_pos1;
+ setClipboard(m_dposPaste);
         m_dOrigPos = m_dposPaste;
         // some values to start with -- most often we are somewhere in the middle of doc,
         // i.e., in section and in block
Received on Tue May 31 04:12:54 2005

This archive was generated by hypermail 2.1.8 : Tue May 31 2005 - 04:12:54 CEST