[Libreoffice] Duplicate code: hwpreader.cxx

Chr. Rossmanith ChrRossmanith at gmx.de
Mon Jun 6 00:13:09 PDT 2011


I had a look at the two methods

void HwpReader::makeCaptionStyle(FBoxStyle * fstyle) and
void HwpReader::makeFStyle(FBoxStyle * fstyle)

which share identical code which I would like to move into a seperate 
method lcl_addCellLinetype() or some such. I just wonder why when 
dealing with linetypes "fo:padding" is added. Around line 2610 where you 
find the duplicate codeblock "fo:border" is set. I hope the following 
diff makes it clear?

diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 37e6cb0..8cdd5c4 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -2403,7 +2403,7 @@ void HwpReader::makeCaptionStyle(FBoxStyle * fstyle)
switch( cell->linetype[0] )
case 0:
- padd(ascii("fo:padding"), sXML_CDATA,ascii("0mm"));
+ padd(ascii("fo:border"), sXML_CDATA, ascii("none"));
case 1: /* 가는실선 */
case 3: /* 점선 -> 스타오피스에는 점선이 없다. */

And maybe someone could translate those comments - obviously not from 
Hamburg :-)


More information about the LibreOffice mailing list