diff options
author | Eike Rathke <er@openoffice.org> | 2001-08-10 17:02:39 +0000 |
---|---|---|
committer | Eike Rathke <er@openoffice.org> | 2001-08-10 17:02:39 +0000 |
commit | 5bcff42d2ad98776d95913152799f9b41401b1dd (patch) | |
tree | 506d8e55af23d9d53801905c27cabab13ab398fd /sc/inc/patattr.hxx | |
parent | 35f8f7efad321435e9f99914c717fd5d9d579a8c (diff) |
#88107# convert StarMath/StarBats<->StarSymbol in binary file format
Diffstat (limited to 'sc/inc/patattr.hxx')
-rw-r--r-- | sc/inc/patattr.hxx | 60 |
1 files changed, 58 insertions, 2 deletions
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx index 3b00e9edbe9f..f4eb2562a6d1 100644 --- a/sc/inc/patattr.hxx +++ b/sc/inc/patattr.hxx @@ -2,9 +2,9 @@ * * $RCSfile: patattr.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: nn $ $Date: 2000-11-23 20:17:08 $ + * last change: $Author: er $ $Date: 2001-08-10 18:01:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,6 +70,10 @@ #include <svtools/itemset.hxx> #endif +#ifndef _SV_FONTCVT_HXX +#include <vcl/fontcvt.hxx> +#endif + class Font; class OutputDevice; @@ -128,8 +132,24 @@ public: BOOL IsVisible() const; BOOL IsVisibleEqual( const ScPatternAttr& rOther ) const; + + /** If font is an old symbol font StarBats/StarMath + with text encoding RTL_TEXTENC_SYMBOL */ BOOL IsSymbolFont() const; + /** Create a FontToSubsFontConverter if needed for + this pattern, else return 0. + + @param nFlags is the bit mask which shall be + used for CreateFontToSubsFontConverter(). + + The converter must be destroyed by the caller + using DestroyFontToSubsFontConverter() which + should be accomplished using the + ScFontToSubsFontConverter_AutoPtr + */ + FontToSubsFontConverter GetSubsFontConverter( ULONG nFlags ) const; + ULONG GetNumberFormat( SvNumberFormatter* ) const; ULONG GetNumberFormat( SvNumberFormatter* pFormatter, const SfxItemSet* pCondSet ) const; @@ -138,4 +158,40 @@ public: BYTE GetRotateDir( const SfxItemSet* pCondSet ) const; }; + +class ScFontToSubsFontConverter_AutoPtr +{ + FontToSubsFontConverter h; + + void release() + { + if ( h ) + DestroyFontToSubsFontConverter( h ); + } + + // prevent usage + ScFontToSubsFontConverter_AutoPtr( const ScFontToSubsFontConverter_AutoPtr& ); + ScFontToSubsFontConverter_AutoPtr& operator=( const ScFontToSubsFontConverter_AutoPtr& ); + +public: + ScFontToSubsFontConverter_AutoPtr() + : h(0) + {} + ~ScFontToSubsFontConverter_AutoPtr() + { + release(); + } + + ScFontToSubsFontConverter_AutoPtr& operator=( FontToSubsFontConverter hN ) + { + release(); + h = hN; + return *this; + } + + operator FontToSubsFontConverter() const + { return h; } +}; + + #endif |