summaryrefslogtreecommitdiff
path: root/sw/qa/inc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-05-14 15:42:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-15 08:42:04 +0200
commit36e62098c8c541c4a3fb63eced591cf29ac56e4a (patch)
tree2a8b87b9049338819e0cef1997d00fac3b56d135 /sw/qa/inc
parent44006d2fdc67c1b2ff68407b16b4b4939012282c (diff)
CppUnittest: sw: simplify code. use getShapes and getShape
Change-Id: I494349b99a122f67ed1f2881faf1a37e4358c55b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa/inc')
-rw-r--r--sw/qa/inc/swmodeltestbase.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index a7be42da2bd4..c6cbf9f83afe 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -912,6 +912,14 @@ protected:
return xCursor->getPage();
}
+ /// Get shape count.
+ int getShapes() const
+ {
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDraws = xDrawPageSupplier->getDrawPage();
+ return xDraws->getCount();
+ }
+
/**
* Given that some problem doesn't affect the result in the importer, we
* test the resulting file directly, by opening the zip file, parsing an