summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-04-07 20:23:49 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-04-07 20:23:49 +0200
commit386772828680ae123174765715d44f6257cbc75a (patch)
treea5b367dd81d59ca2ed92af642840ae01551e3220 /sw
parent92096d634ab93b42bb9ed6e634b2101452b2a609 (diff)
RTF_LISTPICTURE and RTF_LEVELPICTURE testcase
Change-Id: Ia6838d205ce25a22e2e5e8763f7bf4323c40879a
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfexport/data/i120928.rtf48
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx23
2 files changed, 71 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/i120928.rtf b/sw/qa/extras/rtfexport/data/i120928.rtf
new file mode 100644
index 000000000000..2179a25c6c03
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/i120928.rtf
@@ -0,0 +1,48 @@
+{\rtf1
+{\*\listtable
+{\*\listpicture
+{\*\shppict
+{\pict
+{\*\picprop\shplid1027
+{\sp
+{\sn shapeType}
+{\sv 100}
+}
+{\sp
+{\sn geoRight}
+{\sv 1000}
+}
+{\sp
+{\sn geoBottom}
+{\sv 1000}
+}
+}
+\picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0
+\picw397\pich397\picwgoal225\pichgoal225\pngblip\bliptag-1521418743
+{\*\blipuid a550fe0982405d70b83855d77707fc10}
+89504e470d0a1a0a0000000d494844520000000f0000000f08030000000c086578000000017352474200aece1ce9000000cc504c5445fff7d8c0c0c0ffd013ff
+d427ffd83bffdf620000005251ff7878ff8c8bff9f9effc5c5fffff0b0fff3c40504ff2c2bfffff4c4fff8d8ffefb0fff3c5ffe889fff0b1ffdadaffbfbfffb1
+b1ffa3a3ff8787ff7979ffd73bffe062ffcfcfffb3b3ffa6a6ff9897ffc4c4ffa8a7ff9a9aff8c8cff7170ff6262ffadadff9192ff8483ff7576ff5a5aff4c4c
+ffa2a2ff8686ff7877ff6a6aff4e4eff4140ff9696ff7a7aff6d6dff5e5fffd0149f9fffc6c5ff7977ff8b8bffffe88affe7897978ff7877ff5252ff2c2aff2b
+2bff58b516360000000c636d50504a436d7030373132020101068aba14ce0000000274524e53ff00e5b7304a000000824944415418955dcf3d0b82000004501f
+d49863e0d2d0d4140d46463f3f212a706b6a6a88700b0495246928fbbaedc10d77043fd1b9df7c4c940bd585a7177b519e643a8324ebb97e396cb5d7779fb056
+08c4b08fe48b4353084cc151457cb73101a738b5dc521a834b9c82d208e7afbd4350ccd7929dd9e6b57fa05add64caff3f0fdbb52a2460a505160000000049454e44ae426082}
+}
+}
+{\list\listtemplateid734824854
+{\listlevel\levelnfc23\leveljc0
+\levelfollow0\levelstartat1
+{\leveltext\'01\u-3913 ?;}
+{\levelnumbers;}
+\f3\levelpicture0\fi-360\li720\lin720 }
+\listid1181772884}
+}
+{\*\listoverridetable
+{\listoverride\listid1181772884\listoverridecount0\ls1}
+}
+\pard\plain \ltrpar
+\ql \fi-360\li720\ri0\ls1\rin0\lin720\itap0 \rtlch \af40\afs24\alang1081 \ltrch
+{\rtlch \af40 \ltrch \hich\af0\dbch\af40\loch\f0 A}
+{\rtlch \af40 \ltrch
+\par }
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index cd153fc77c9a..6d8fd6f3e12a 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -74,6 +74,7 @@ public:
void testFdo30983();
void testPlaceholder();
void testMnor();
+ void testI120928();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -122,6 +123,7 @@ void Test::run()
{"fdo30983.rtf", &Test::testFdo30983},
{"placeholder.odt", &Test::testPlaceholder},
{"mnor.rtf", &Test::testMnor},
+ {"i120928.rtf", &Test::testI120928},
};
// Don't test the first import of these, for some reason those tests fail
const char* aBlacklist[] = {
@@ -516,6 +518,27 @@ void Test::testMnor()
CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
}
+void Test::testI120928()
+{
+ // \listpicture and \levelpicture0 was ignored, leading to missing graphic bullet in numbering.
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aProps;
+ xLevels->getByIndex(0) >>= aProps; // 1st level
+
+ bool bIsGraphic = false;
+ for (int i = 0; i < aProps.getLength(); ++i)
+ {
+ const beans::PropertyValue& rProp = aProps[i];
+
+ if (rProp.Name == "NumberingType")
+ CPPUNIT_ASSERT_EQUAL(style::NumberingType::BITMAP, rProp.Value.get<sal_Int16>());
+ else if (rProp.Name == "GraphicURL")
+ bIsGraphic = true;
+ }
+ CPPUNIT_ASSERT_EQUAL(true, bIsGraphic);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();