summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8import/ww8import.cxx
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/ww8import/ww8import.cxx
parentc2f6428e32227c6f53e618c65a7df3648487df49 (diff)
Reduce copy&paste by adding SwModelTestBase::getShape()
Change-Id: I3b73405c546427bb5676db30e297af36c18043e6
Diffstat (limited to 'sw/qa/extras/ww8import/ww8import.cxx')
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index ef68da693fed..0199328cb034 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -6,7 +6,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/table/TableBorder.hpp>
#include <com/sun/star/text/XDependentTextField.hpp>
@@ -183,13 +182,7 @@ have the same width (full page width, half page width).
xray ThisComponent.DrawPage.getByIndex(0).BoundRect
*/
uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
- uno::Reference<drawing::XDrawPageSupplier> drawPageSupplier(textDocument, uno::UNO_QUERY);
- uno::Reference<drawing::XDrawPage> drawPage = drawPageSupplier->getDrawPage();
- uno::Reference<drawing::XShape> rule1, rule2, rule3, rule4;
- drawPage->getByIndex(0) >>= rule1;
- drawPage->getByIndex(1) >>= rule2;
- drawPage->getByIndex(2) >>= rule3;
- drawPage->getByIndex(3) >>= rule4;
+ uno::Reference<drawing::XShape> rule1 = getShape(1), rule2 = getShape(2), rule3 = getShape(3), rule4 = getShape(4);
uno::Reference<beans::XPropertySet> ruleProperties1(rule1, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> ruleProperties2(rule2, uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> ruleProperties3(rule3, uno::UNO_QUERY);