sw/qa: move getStyles from rtftok to base class, to be used by ooxmltok
Change-Id: I137c0a42ab8413213d93f1bbd868077e2c042ce0
This commit is contained in:
@@ -33,7 +33,6 @@
|
|||||||
#include <com/sun/star/style/CaseMap.hpp>
|
#include <com/sun/star/style/CaseMap.hpp>
|
||||||
#include <com/sun/star/style/LineSpacing.hpp>
|
#include <com/sun/star/style/LineSpacing.hpp>
|
||||||
#include <com/sun/star/style/LineSpacingMode.hpp>
|
#include <com/sun/star/style/LineSpacingMode.hpp>
|
||||||
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
|
|
||||||
#include <com/sun/star/table/BorderLine2.hpp>
|
#include <com/sun/star/table/BorderLine2.hpp>
|
||||||
#include <com/sun/star/table/BorderLineStyle.hpp>
|
#include <com/sun/star/table/BorderLineStyle.hpp>
|
||||||
#include <com/sun/star/text/RelOrientation.hpp>
|
#include <com/sun/star/text/RelOrientation.hpp>
|
||||||
@@ -144,7 +143,6 @@ private:
|
|||||||
void load(const OUString& rURL);
|
void load(const OUString& rURL);
|
||||||
/// Get page count.
|
/// Get page count.
|
||||||
int getPages();
|
int getPages();
|
||||||
uno::Reference<container::XNameAccess> getStyles(OUString aFamily);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void Test::load(const OUString& rFilename)
|
void Test::load(const OUString& rFilename)
|
||||||
@@ -161,14 +159,6 @@ int Test::getPages()
|
|||||||
return xCursor->getPage();
|
return xCursor->getPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
uno::Reference<container::XNameAccess> Test::getStyles(OUString aFamily)
|
|
||||||
{
|
|
||||||
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent, uno::UNO_QUERY);
|
|
||||||
uno::Reference<container::XNameAccess> xStyles(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
|
|
||||||
uno::Reference<container::XNameAccess> xPageStyles(xStyles->getByName(aFamily), uno::UNO_QUERY);
|
|
||||||
return xPageStyles;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Test::testFdo45553()
|
void Test::testFdo45553()
|
||||||
{
|
{
|
||||||
load("fdo45553.rtf");
|
load("fdo45553.rtf");
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
* instead of those above.
|
* instead of those above.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
|
||||||
#include <com/sun/star/text/XTextDocument.hpp>
|
#include <com/sun/star/text/XTextDocument.hpp>
|
||||||
|
|
||||||
#include <test/bootstrapfixture.hxx>
|
#include <test/bootstrapfixture.hxx>
|
||||||
@@ -74,6 +75,15 @@ protected:
|
|||||||
return aBuf.getLength();
|
return aBuf.getLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get a family of styles, see com.sun.star.style.StyleFamilies for possible values.
|
||||||
|
uno::Reference<container::XNameAccess> getStyles(rtl::OUString aFamily)
|
||||||
|
{
|
||||||
|
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(mxComponent, uno::UNO_QUERY);
|
||||||
|
uno::Reference<container::XNameAccess> xStyleFamilies(xStyleFamiliesSupplier->getStyleFamilies(), uno::UNO_QUERY);
|
||||||
|
uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName(aFamily), uno::UNO_QUERY);
|
||||||
|
return xStyleFamily;
|
||||||
|
}
|
||||||
|
|
||||||
uno::Reference<lang::XComponent> mxComponent;
|
uno::Reference<lang::XComponent> mxComponent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user