summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfexport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-08-27 16:44:12 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-08-27 18:26:39 +0200
commitd9f1c11dfa5a1c8ea579f4a2085c8c8b0e3a31aa (patch)
tree06e6a636052fb4d3abd3f2faa055425b63dcbfdf /sw/qa/extras/rtfexport
parentc2f6428e32227c6f53e618c65a7df3648487df49 (diff)
Reduce copy&paste by adding SwModelTestBase::getShape()
Change-Id: I3b73405c546427bb5676db30e297af36c18043e6
Diffstat (limited to 'sw/qa/extras/rtfexport')
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index c9d661071ba1..81340e43af36 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -419,9 +419,7 @@ void Test::testFdo53113()
* xray oCoordinates(1).Second.Value ' 102
*/
- uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
- uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
- uno::Sequence<beans::PropertyValue> aProps = getProperty< uno::Sequence<beans::PropertyValue> >(xDraws->getByIndex(0), "CustomShapeGeometry");
+ uno::Sequence<beans::PropertyValue> aProps = getProperty< uno::Sequence<beans::PropertyValue> >(getShape(1), "CustomShapeGeometry");
uno::Sequence<beans::PropertyValue> aPathProps;
for (int i = 0; i < aProps.getLength(); ++i)
{
@@ -496,10 +494,8 @@ void Test::testFdo30983()
{
// These were 'page text area', not 'entire page', i.e. both the horizontal
// and vertical positions were incorrect.
- uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
- uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xDraws->getByIndex(0), "HoriOrientRelation"));
- CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xDraws->getByIndex(0), "VertOrientRelation"));
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(getShape(1), "HoriOrientRelation"));
+ CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(getShape(1), "VertOrientRelation"));
}
void Test::testPlaceholder()
@@ -600,9 +596,7 @@ void Test::testRecordChanges()
void Test::testTextframeTable()
{
- uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
- uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
- uno::Reference<text::XTextRange> xTextRange(xDraws->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xTextRange(getShape(1), uno::UNO_QUERY);
uno::Reference<text::XText> xText = xTextRange->getText();
CPPUNIT_ASSERT_EQUAL(OUString("First para."), getParagraphOfText(1, xText)->getString());
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(2, xText), uno::UNO_QUERY);