Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2981

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/81/2981/1

fdo#60922 ignore DOCX import of w:position w:val="0"

(cherry picked from commit cadb3433b395b53a9eda584ed5fee79ca74e7483)

Conflicts:
        sw/qa/extras/ooxmlimport/ooxmlimport.cxx

Change-Id: I10e9c0f1078e36710335a9a48f7f02292c764795
---
A sw/qa/extras/ooxmlimport/data/fdo60922.docx
M sw/qa/extras/ooxmlimport/ooxmlimport.cxx
M writerfilter/source/dmapper/DomainMapper.cxx
3 files changed, 11 insertions(+), 1 deletion(-)



diff --git a/sw/qa/extras/ooxmlimport/data/fdo60922.docx 
b/sw/qa/extras/ooxmlimport/data/fdo60922.docx
new file mode 100644
index 0000000..0d1ff26
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/fdo60922.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 3f5a070..51ce241 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -114,6 +114,7 @@
     void testFdo53985();
     void testFdo59638();
     void testFdo61343();
+    void testFdo60922();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -180,6 +181,7 @@
         {"fdo53985.docx", &Test::testFdo53985},
         {"fdo59638.docx", &Test::testFdo59638},
         {"fdo61343.docx", &Test::testFdo61343},
+        {"fdo60922.docx", &Test::testFdo60922},
     };
     for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
     {
@@ -1132,6 +1134,12 @@
     CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDraws->getCount());
 }
 
+void Test::testFdo60922()
+{
+    // This was 0, not 100, due to wrong import of w:position w:val="0"
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(getRun(getParagraph(1), 1), 
"CharEscapementHeight"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 8e74201..d552e14 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2152,7 +2152,9 @@
     case NS_sprm::LN_CHpsInc:
         break;  // sprmCHpsInc
     case NS_sprm::LN_CHpsPos:
-        m_pImpl->deferCharacterProperty( nSprmId, uno::makeAny( nIntValue ));
+        // The spec says 0 is the same as the lack of the value, so don't parse that.
+        if (nIntValue)
+            m_pImpl->deferCharacterProperty( nSprmId, uno::makeAny( nIntValue ));
         break;  // sprmCHpsPos
     case NS_sprm::LN_CHpsPosAdj:
         break;  // sprmCHpsPosAdj

-- 
To view, visit https://gerrit.libreoffice.org/2981
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10e9c0f1078e36710335a9a48f7f02292c764795
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Miklos Vajna <vmiklos@suse.cz>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.