[Libreoffice-commits] core.git: sw/qa writerfilter/source writerperfect/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Dec 12 13:00:01 UTC 2017


 sw/qa/extras/ooxmlexport/data/tdf113183.docx          |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx            |   10 ++++++++++
 writerfilter/source/dmapper/GraphicHelpers.cxx        |    4 ++++
 writerperfect/source/writer/EPUBExportFilter.cxx      |    2 +-
 writerperfect/source/writer/EPUBExportUIComponent.cxx |    2 +-
 5 files changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 312cecf11c1ab8acef6ce08ccb90d5322836b08f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Dec 12 09:18:39 2017 +0100

    tdf#113183 DOCX import: fix not independent text box alignments
    
    The alternative would be to clear them in
    writerfilter::dmapper::DomainMapper::getPositionOffset(), but that runs
    before writerfilter::dmapper::PositionHandler::lcl_sprm(), so it would
    be too early.
    
    Change-Id: I287b9a4025c4b1844ae467c48815b5d7ffe3f98e
    Reviewed-on: https://gerrit.libreoffice.org/46279
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf113183.docx b/sw/qa/extras/ooxmlexport/data/tdf113183.docx
new file mode 100644
index 000000000000..197f483ba011
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf113183.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index b139210c3bff..a4796900f9bd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -147,6 +147,16 @@ DECLARE_OOXMLEXPORT_TEST(testSignatureLineShape, "signature-line-all-props-set.d
     CPPUNIT_ASSERT_EQUAL(OUString("Check the machines!"), aSigningInstructions);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf113183, "tdf113183.docx")
+{
+    // This was 2096, the horizontal positioning of the star shape affected the
+    // positioning of the triangle one, so the triangle was outside the page
+    // frame.
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0),
+                         getProperty<sal_Int32>(getShapeByName("triangle"),
+                                                "HoriOrientPosition"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 62579dbaa864..8108445d24fb 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -133,9 +133,11 @@ void PositionHandler::lcl_sprm(Sprm& rSprm)
     {
         case NS_ooxml::LN_CT_PosH_posOffset:
             m_nPosition = oox::drawingml::convertEmuToHmm(m_rPositionOffsets.first.toInt32());
+            m_rPositionOffsets.first.clear();
             break;
         case NS_ooxml::LN_CT_PosV_posOffset:
             m_nPosition = oox::drawingml::convertEmuToHmm(m_rPositionOffsets.second.toInt32());
+            m_rPositionOffsets.second.clear();
             break;
         case NS_ooxml::LN_CT_PosH_align:
         {
@@ -150,6 +152,7 @@ void PositionHandler::lcl_sprm(Sprm& rSprm)
                 m_nOrient = text::HoriOrientation::INSIDE;
             else if (rAlign == "outside")
                 m_nOrient = text::HoriOrientation::OUTSIDE;
+            rAlign.clear();
             break;
         }
         case NS_ooxml::LN_CT_PosV_align:
@@ -165,6 +168,7 @@ void PositionHandler::lcl_sprm(Sprm& rSprm)
                 m_nOrient = text::VertOrientation::NONE;
             else if (rAlign == "outside")
                 m_nOrient = text::VertOrientation::NONE;
+            rAlign.clear();
             break;
         }
     }
diff --git a/writerperfect/source/writer/EPUBExportFilter.cxx b/writerperfect/source/writer/EPUBExportFilter.cxx
index d1f2c73621f4..0e0a72dbe015 100644
--- a/writerperfect/source/writer/EPUBExportFilter.cxx
+++ b/writerperfect/source/writer/EPUBExportFilter.cxx
@@ -197,7 +197,7 @@ uno::Sequence<OUString> EPUBExportFilter::getSupportedServiceNames()
     return aRet;
 }
 
-extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Writer_EPUBExportFilter_get_implementation(uno::XComponentContext *pContext, uno::Sequence<uno::Any> const &)
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface *com_sun_star_comp_Writer_EPUBExportFilter_get_implementation(uno::XComponentContext *pContext, uno::Sequence<uno::Any> const &)
 {
     return cppu::acquire(new EPUBExportFilter(pContext));
 }
diff --git a/writerperfect/source/writer/EPUBExportUIComponent.cxx b/writerperfect/source/writer/EPUBExportUIComponent.cxx
index e7f7f7f005a8..65164b67aa1b 100644
--- a/writerperfect/source/writer/EPUBExportUIComponent.cxx
+++ b/writerperfect/source/writer/EPUBExportUIComponent.cxx
@@ -83,7 +83,7 @@ sal_Int16 EPUBExportUIComponent::execute()
     return ui::dialogs::ExecutableDialogResults::CANCEL;
 }
 
-extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface * com_sun_star_comp_Writer_EPUBExportUIComponent_get_implementation(uno::XComponentContext *pCtx, uno::Sequence<uno::Any> const &)
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface *com_sun_star_comp_Writer_EPUBExportUIComponent_get_implementation(uno::XComponentContext *pCtx, uno::Sequence<uno::Any> const &)
 {
     return cppu::acquire(new EPUBExportUIComponent(pCtx));
 }


More information about the Libreoffice-commits mailing list