[Libreoffice] Duplicate code: SwDoc::SplitDoc

Chr. Rossmanith ChrRossmanith at gmx.de
Tue May 10 01:17:19 PDT 2011


Hi,
>>   (what stands Stt for?)
once again: Stt means what? The answer might help to understand what's 
going on in that method.
> 	It would be great; we could leave the public methods as they are now,
> and have a single private impl. that they call with the extra
> 'bool bOutline' or whatever ?
I've modified SplitDoc (it is called only from within docglbl.cxx) to

sal_Bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, 
sal_Bool bOutline,
                           const SwTxtFmtColl* pSplitColl, int 
nOutlineLevel )

GenerateGlobalDoc and GenerateHTMLDoc still exist with two signatures 
and call SplitDoc with the new parameter list.

What about sal_Bool? I don't get, when to use Bool and when sal_Bool. I 
assume bOutline and nOutlineLevel should be const as well if they aren't 
modified?
> 	I would save each method to its own file, and do a 'diff -uw' between
> them to be sure we isolated all the changes.
There was a single code block present only in the non-outline version, 
that is enclosed in "if( !bOutline )" now. Apart from that only comments 
were removed in the outline version.

Christina




More information about the LibreOffice mailing list