summaryrefslogtreecommitdiff
path: root/sw/qa/extras/inc
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/inc
parentc2f6428e32227c6f53e618c65a7df3648487df49 (diff)
Reduce copy&paste by adding SwModelTestBase::getShape()
Change-Id: I3b73405c546427bb5676db30e297af36c18043e6
Diffstat (limited to 'sw/qa/extras/inc')
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 9bd8a46a0cd6..895c0969891c 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -269,6 +269,15 @@ protected:
return xCell;
}
+ /// Get shape (counted from 1)
+ uno::Reference<drawing::XShape> getShape(int number)
+ {
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ uno::Reference<drawing::XShape> xShape(xDrawPage->getByIndex(number - 1), uno::UNO_QUERY);
+ return xShape;
+ }
+
void header()
{
std::cerr << "File tested,Execution Time (ms)" << std::endl;