From c76974576aa5eec6b86af39eaaadc8e382f214bd Mon Sep 17 00:00:00 2001 From: Noel Power Date: Fri, 7 Jun 2013 16:34:30 +0100 Subject: share spPaperSizeTable ( and associated access code ) in msfilter PageSetup.PaperSize implementation more or less copy&pasted the papersize conversion code from oox, this is a followup to remove the duplication. ( Probably the binary filter could be converted to use this also saving yet another nearly similar implementation ) Change-Id: I479f0322163161f7819c5d650a9511910ac2e781 --- include/filter/msfilter/util.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/filter/msfilter/util.hxx b/include/filter/msfilter/util.hxx index f50e4d10ea83..e13419905a0f 100644 --- a/include/filter/msfilter/util.hxx +++ b/include/filter/msfilter/util.hxx @@ -15,6 +15,7 @@ #include #include #include "filter/msfilter/msfilterdllapi.h" +#include namespace msfilter { namespace util { @@ -73,6 +74,20 @@ MSFILTER_DLLPUBLIC TextCategory categorizeCodePoint(sal_uInt32 codePoint, const /// Converts tools Color to HTML color (without leading hashmark). MSFILTER_DLLPUBLIC OString ConvertColor( const Color &rColor ); + +/** Paper size in 1/100 millimeters. */ +struct MSFILTER_DLLPUBLIC ApiPaperSize +{ + sal_Int32 mnWidth; + sal_Int32 mnHeight; +}; + +class MSFILTER_DLLPUBLIC PaperSizeConv +{ +public: + static sal_Int32 getMSPaperSizeIndex( const com::sun::star::awt::Size& rSize ); + static const ApiPaperSize& getApiSizeForMSPaperSizeIndex( sal_Int32 nMSOPaperIndex ); +}; } } -- cgit