diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx index e1f4fa76064a..e7ed1bb82297 100644 --- a/sw/qa/extras/rtftok/rtftok.cxx +++ b/sw/qa/extras/rtftok/rtftok.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -144,7 +143,6 @@ private: void load(const OUString& rURL); /// Get page count. int getPages(); - uno::Reference getStyles(OUString aFamily); }; void Test::load(const OUString& rFilename) @@ -161,14 +159,6 @@ int Test::getPages() return xCursor->getPage(); } -uno::Reference Test::getStyles(OUString aFamily) -{ - uno::Reference xStyleFamiliesSupplier(mxComponent, uno::UNO_QUERY); - uno::Reference xStyles(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY); - uno::Reference xPageStyles(xStyles->getByName(aFamily), uno::UNO_QUERY); - return xPageStyles; -} - void Test::testFdo45553() { load("fdo45553.rtf"); diff --git a/sw/qa/extras/swmodeltestbase.hxx b/sw/qa/extras/swmodeltestbase.hxx index 347d408c9b30..0ddd2266b830 100644 --- a/sw/qa/extras/swmodeltestbase.hxx +++ b/sw/qa/extras/swmodeltestbase.hxx @@ -25,6 +25,7 @@ * instead of those above. */ +#include #include #include @@ -74,6 +75,15 @@ protected: return aBuf.getLength(); } + /// Get a family of styles, see com.sun.star.style.StyleFamilies for possible values. + uno::Reference getStyles(rtl::OUString aFamily) + { + uno::Reference xStyleFamiliesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY); + uno::Reference xStyleFamily(xStyleFamilies->getByName(aFamily), uno::UNO_QUERY); + return xStyleFamily; + } + uno::Reference mxComponent; };