Hi Oliver, I had a look at the codes, but I am not sure where to transport the SwFormatClipboard to. I think maybe I can put it to class SfxViewShell (viewsh,hxx). But it seems not to be a good idea as the views of writer and impress are all inherited from it. And I think the formatpaintbrush should not be used between the writer and impress as it may cause more problems. There should be a place that the views of writer can be inherited but not other views, isn't it? Another question is that what else should be transported besides the SwFormatClipboard? What about the struct SwApplyTemplate? The third question is that I have no idea about the SwDoc::CopyCharFmt() and SwDoc::CopyTxtColl(), is it should be transported too? Hope for your reply,Thank you.
Best regards, Fang FangYaqiong 2007-04-24 >Hi, >the paintbrush code is implemented in >sw/source/ui/inc/formatclipboard.hxx, >sw/source/ui/uiview/formatclipboard.cxx. >There's a SwFormatClipboard as member pointer at the SwView. > >To make the code work between different Writer documents this >SwFormatClipboard has to be moved out of the view (SwModule?). > >The SwFormatClipboard stores the attributes as SfxPoolItems. They can be >transported over document borders (maybe with some exceptions). >Additionally names of the paragraph and character style are stored. They >are a bit harder to transport. There are copy methods >SwDoc::CopyCharFmt() and SwDoc::CopyTxtColl() to copy character and >paragraph formats from one document to another. > >Regards, > >Oliver
