FangYaqiong wrote: > Hi all, > I am FangYaqiong, working in Beijing Redflag CH2000 Software Co., Ltd. > Now I am fixing some bugs of formatpaintbrush in OO. We find that the > formatpaintbrush cannot be used among more than one document. So I want to > slove this problem. I am not sure whether it is need to use clipboard to save > the attributes, I have no idea about it. Anyone can give me some suggestions? > Thank you very much. > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
