From 1a37ca65b896a5ba100d46c7cde0793f62bc546b Mon Sep 17 00:00:00 2001 From: Adam Co Date: Mon, 15 Jul 2013 18:40:08 +0300 Subject: [PATCH] fdo#66929: fix for default textbox inset values Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Change-Id: I0e9fa5e73e802f85f02c3fcc5c276ed0c1cb2a58 --- oox/source/vml/vmltextboxcontext.cxx | 17 +++++++-- sw/qa/extras/ooxmlexport/data/fdo66929.docx | Bin 0 -> 21624 bytes sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 16 ++++++++ sw/source/filter/ww8/docxattributeoutput.cxx | 37 ++++++++++++++++--- 4 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 sw/qa/extras/ooxmlexport/data/fdo66929.docx diff --git a/oox/source/vml/vmltextboxcontext.cxx b/oox/source/vml/vmltextboxcontext.cxx index d91c66ade821..fbb701f67ca5 100644 --- a/oox/source/vml/vmltextboxcontext.cxx +++ b/oox/source/vml/vmltextboxcontext.cxx @@ -171,18 +171,27 @@ TextBoxContext::TextBoxContext( ContextHandler2Helper& rParent, TextBox& rTextBo { OUString inset = rAttribs.getString( XML_inset ).get(); OUString value; - ConversionHelper::separatePair( value, inset, inset, ',' ); + OUString remainingStr; + + ConversionHelper::separatePair( value, remainingStr, inset, ',' ); rTextBox.borderDistanceLeft = ConversionHelper::decodeMeasureToHmm( graphicHelper, value.isEmpty() ? "0.1in" : value, 0, false, false ); - ConversionHelper::separatePair( value, inset, inset, ',' ); + + inset = remainingStr; + ConversionHelper::separatePair( value, remainingStr, inset, ',' ); rTextBox.borderDistanceTop = ConversionHelper::decodeMeasureToHmm( graphicHelper, value.isEmpty() ? "0.05in" : value, 0, false, false ); - ConversionHelper::separatePair( value, inset, inset, ',' ); + + inset = remainingStr; + ConversionHelper::separatePair( value, remainingStr, inset, ',' ); rTextBox.borderDistanceRight = ConversionHelper::decodeMeasureToHmm( graphicHelper, value.isEmpty() ? "0.1in" : value, 0, false, false ); - ConversionHelper::separatePair( value, inset, inset, ',' ); + + inset = remainingStr; + ConversionHelper::separatePair( value, remainingStr, inset, ',' ); rTextBox.borderDistanceBottom = ConversionHelper::decodeMeasureToHmm( graphicHelper, value.isEmpty() ? "0.05in" : value, 0, false, false ); + rTextBox.borderDistanceSet = true; } diff --git a/sw/qa/extras/ooxmlexport/data/fdo66929.docx b/sw/qa/extras/ooxmlexport/data/fdo66929.docx new file mode 100644 index 0000000000000000000000000000000000000000..7f0afac3cb00632451b04bb9b54b99efdd5f4cef GIT binary patch literal 21624 zcmeFZWpEtLk~S)4X0n)>nVFecvY45fEM_K)nbBfq2Fqe*X0)U`e$Sr$&ffFJ-nc)% z*zJhv>4~nX%FcW;^U3P2R+Iq+Lj!^Uf&u~pA_5xKdSxC21_DZj1_D9_f&$SIvA1(E zwR160^>i?G)}!~ZwIM731EI_V0s*xD-|c^}1_ssT6xJD$x-?Gx!+okz7*vJJR%s!n z;{pZ?a%1>bG)Y?yu=yXi+#6P6D777)!+(fMpLW{mb) z+E?kM?0UUW2w-3*I*GGw3Q;Wu?3&!Xulckg1Yk?>(2B{S`AJ2zhp8LwfO7Je``Do0 zSnH1E-B)V|@@7xP7CpxHD#?Ed)134dDZa!RpT>W2t|b)?Cg!mG&>5q* z%WFjgPS`U7ooFp^0-t@BF{fpUE6+Q_sh~DT!1vmMkuOr8zm$E|)$-bwEd{hEJBp%m zccpAH;lr1Um`Fcc4Re{lw2n$aBRV*Pds-R%O(0FW>5C?unT>Vyu2~L|2F=l*e1yEA0lxox5Ih%frL0V zK}DMJjn6t7`5c6wv`*$FVkkr$^%nJ!SnUwYkDB(phX^+@(nNoZSq)5Zk4Joi+erP| zd%lyJRc&>H2n6)`2@0h6Uz{I50jKp2fM|JuZ^Htd-@wV##+iZs&;Ea%{(rEi|I4LE zC$33@3c-b4fo~a&`f{wn5YMk{O6I#0pMi#CoCCWfOct$ncNG%0E3WAu-XBdUEM)~} zE%KD|Lev^*{mfg=GL+b|_ONY@f>hKR)yWJphn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37joXp$g4g$z@!y<%_(Xoerbl7R^PaZKY?(7{?t=|V z&H)pDDc|O7P_ODq_%zidJ38d}y#1{?_kmuisWV;u;?IxLBQG3}y+5=cm=qzy7>rE1 zz)3jl=j_2E1x8~zbuYjh)d1A9x?mbX^k3jyAkxWQ=o(QEFhbU-2rSL<9cP4Y68ecU z2(xYh=glzAmqFK#zTOj|{k;TKJJL=(blvDXy%4(h183{NmLu)^Lf4JH?F6BFfeean z@FGRxbr%2+*FmxyyoCi_H~JO{gxwAbDE;fgd%MB)`03pUm%L^0Q99d2qV;hYjwb3kGv2ET|4@e zI70hbW2knt337B3(C38_CUBX;9Dr?>7~LH7p-hB1^X*W~0o7XQno-;T2(1hZ%YoC? z7`*{>?da_{gaK+^P`lHB=YGOlbLjd}D_MkY28M$^NY+EE+yHM@;4)y)5(E*3KfqN} IY5pJ{0Ln?C`v3p{ literal 0 HcmV?d00001 diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index ff5dc8f7e2ee..86d6e39efe5b 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -95,6 +95,7 @@ public: void testFdo66773(); void testFdo58577(); void testBnc581614(); + void testFdo66929(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -160,6 +161,7 @@ void Test::run() {"fdo66773.docx", &Test::testFdo66773}, {"fdo58577.odt", &Test::testFdo58577}, {"bnc581614.doc", &Test::testBnc581614}, + {"fdo66929.docx", &Test::testFdo66929}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -953,6 +955,20 @@ void Test::testBnc581614() CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty(xFrame, "FillStyle")); } +void Test::testFdo66929() +{ + // The problem was that the default 'inset' attribute of the 'textbox' node was exported incorrectly. + // A node like '' was exported back as '' + // This is wrong because the original node denotes a specific 'left' inset, and a default 'top','right','bottom' inset + uno::Reference xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + uno::Reference xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 0 ) , getProperty< sal_Int32 >( xFrame, "LeftBorderDistance" ) ); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 127 ), getProperty< sal_Int32 >( xFrame, "TopBorderDistance" ) ); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 254 ), getProperty< sal_Int32 >( xFrame, "RightBorderDistance" ) ); + CPPUNIT_ASSERT_EQUAL( sal_Int32( 127 ), getProperty< sal_Int32 >( xFrame, "BottomBorderDistance" ) ); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 1c0e257f35ce..768235ee90a5 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -4965,13 +4965,38 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox ) } } - // v:textbox's inset attribute: inner margin values for textbox text + // v:textbox's inset attribute: inner margin values for textbox text - write only non-default values + double aDistanceLeftTwips = double(rBox.GetDistance(BOX_LINE_LEFT)); + double aDistanceTopTwips = double(rBox.GetDistance(BOX_LINE_TOP)); + double aDistanceRightTwips = double(rBox.GetDistance(BOX_LINE_RIGHT)); + double aDistanceBottomTwips = double(rBox.GetDistance(BOX_LINE_BOTTOM)); + + // Convert 'TWIPS' to 'INCH' (because in Word the default values are in Inches) + double aDistanceLeftInch = aDistanceLeftTwips / 1440; + double aDistanceTopInch = aDistanceTopTwips / 1440; + double aDistanceRightInch = aDistanceRightTwips / 1440; + double aDistanceBottomInch = aDistanceBottomTwips / 1440; + + // This code will write ONLY the non-default values. The values are in 'left','top','right','bottom' order. + // so 'bottom' is checked if it is default and if it is non-default - all the values will be written + // otherwise - 'right' is checked if it is default and if it is non-default - all the values except for 'bottom' will be written + // and so on. OStringBuffer aInset; - aInset.append(OString::number(double(rBox.GetDistance(BOX_LINE_LEFT))/20) + "pt,"); - aInset.append(OString::number(double(rBox.GetDistance(BOX_LINE_TOP))/20) + "pt,"); - aInset.append(OString::number(double(rBox.GetDistance(BOX_LINE_RIGHT))/20) + "pt,"); - aInset.append(OString::number(double(rBox.GetDistance(BOX_LINE_BOTTOM))/20) + "pt"); - m_pTextboxAttrList->add(XML_inset, aInset.makeStringAndClear()); + if(!aInset.isEmpty() || aDistanceBottomInch != double(0.05)) + aInset.insert(0, "," + OString::number(aDistanceBottomInch) + "in"); + + if(!aInset.isEmpty() || aDistanceRightInch != double(0.1)) + aInset.insert(0, "," + OString::number(aDistanceRightInch) + "in"); + + if(!aInset.isEmpty() || aDistanceTopInch != double(0.05)) + aInset.insert(0, "," + OString::number(aDistanceTopInch) + "in"); + + if(!aInset.isEmpty() || aDistanceLeftInch != double(0.1)) + aInset.insert(0, OString::number(aDistanceLeftInch) + "in"); + + if (!aInset.isEmpty()) + m_pTextboxAttrList->add(XML_inset, aInset.makeStringAndClear()); + return; }