diff options
author | Noel Power <noel.power@suse.com> | 2013-06-07 16:34:30 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-06-07 16:39:39 +0100 |
commit | c76974576aa5eec6b86af39eaaadc8e382f214bd (patch) | |
tree | 3b6fcd8e584efc45982c3fe74228e2f5a2895a18 /include | |
parent | 288a606ae780c9f0b7a0241b31ea644addd37fd8 (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/filter/msfilter/util.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
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 <tools/color.hxx> #include <com/sun/star/lang/Locale.hpp> #include "filter/msfilter/msfilterdllapi.h" +#include <com/sun/star/awt/Size.hpp> 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 ); +}; } } |