[PATCH libreoffice-4-1] added unit test for n#820504
Bosdonnat Cedric (via Code Review)
gerrit at gerrit.libreoffice.org
Tue Jun 18 01:13:16 PDT 2013
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 at free.fr>
More information about the LibreOffice
mailing list