Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4330
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/30/4330/1
added unit test for n#820504
Change-Id: I804e081a564d24d3896160f817051b19da884c34
(cherry picked from commit f9610ed634318c27382d79089d022fb8175eb90a)
---
A sw/qa/extras/ooxmlimport/data/n820504.docx
M sw/qa/extras/ooxmlimport/ooxmlimport.cxx
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/sw/qa/extras/ooxmlimport/data/n820504.docx b/sw/qa/extras/ooxmlimport/data/n820504.docx
new file mode 100644
index 0000000..36279a9
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/n820504.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index ce66980..c895db2 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -119,6 +119,7 @@
void testPageBorderShadow();
void testN820509();
void testN820788();
+ void testN820504();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -205,6 +206,7 @@
{"page-border-shadow.docx", &Test::testPageBorderShadow},
{"n820509.docx", &Test::testN820509},
{"n820788.docx", &Test::testN820788},
+ {"n820504.docx", &Test::testN820504},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1457,6 +1459,16 @@
CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN, getProperty<sal_Int16>(xFrame, "SizeType"));
}
+void Test::testN820504()
+{
+ uno::Reference<style::XStyleFamiliesSupplier> xFamiliesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xFamiliesAccess(xFamiliesSupplier->getStyleFamilies(),
uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess>
xStylesAccess(xFamiliesAccess->getByName("ParagraphStyles"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(xStylesAccess->getByName("Default Style"),
uno::UNO_QUERY);
+ // The problem was that the CharColor was set to AUTO (-1) even if we have some default char
color set
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4040635), getProperty<sal_Int32>(xStyle, "CharColor"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();
--
To view, visit https://gerrit.libreoffice.org/4330
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I804e081a564d24d3896160f817051b19da884c34
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-1
Gerrit-Owner: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
Context
- [PATCH libreoffice-4-1] added unit test for n#820504 · Bosdonnat Cedric (via Code Review)
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.