diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-16 10:09:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-18 08:54:37 +0200 |
commit | 60e78fbb806bb45e635ba1de45ceffe187938ac0 (patch) | |
tree | 17ff5aaa57f4d23e177f1fe423def1691139a4a8 /include | |
parent | 9c818268767d6a1c1bc731ae30c45883bab987e7 (diff) |
fdo#82577: Handle Font
Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.
Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
Diffstat (limited to 'include')
48 files changed, 175 insertions, 169 deletions
diff --git a/include/drawinglayer/primitive2d/textlayoutdevice.hxx b/include/drawinglayer/primitive2d/textlayoutdevice.hxx index 4bb4bc2f1ea6..024e7b45d950 100644 --- a/include/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/include/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -30,7 +30,7 @@ // predefines class VirtualDevice; -class Font; +namespace vcl { class Font; } namespace rtl { class OUString; }; @@ -65,7 +65,7 @@ namespace drawinglayer ~TextLayouterDevice(); /// tooling methods - void setFont(const Font& rFont); + void setFont(const vcl::Font& rFont); void setFontAttribute( const attribute::FontAttribute& rFontAttribute, double fFontScaleX, @@ -125,7 +125,7 @@ namespace drawinglayer both defines FontStretching, where no stretching happens at fFontScaleY == fFontScaleX */ - Font DRAWINGLAYER_DLLPUBLIC getVclFontFromFontAttribute( + vcl::Font DRAWINGLAYER_DLLPUBLIC getVclFontFromFontAttribute( const attribute::FontAttribute& rFontAttribute, double fFontScaleX, double fFontScaleY, @@ -139,7 +139,7 @@ namespace drawinglayer */ attribute::FontAttribute DRAWINGLAYER_DLLPUBLIC getFontAttributeFromVclFont( basegfx::B2DVector& o_rSize, - const Font& rFont, + const vcl::Font& rFont, bool bRTL, bool bBiDiStrong); diff --git a/include/editeng/bulletitem.hxx b/include/editeng/bulletitem.hxx index 1dbb47388ed7..5af465bde828 100644 --- a/include/editeng/bulletitem.hxx +++ b/include/editeng/bulletitem.hxx @@ -61,7 +61,7 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem { - Font aFont; + vcl::Font aFont; GraphicObject* pGraphicObject; OUString aPrevText; OUString aFollowText; @@ -98,7 +98,7 @@ public: long GetWidth() const { return nWidth; } sal_uInt16 GetStyle() const { return nStyle; } sal_uInt8 GetJustification() const { return nJustify; } - Font GetFont() const { return aFont; } + vcl::Font GetFont() const { return aFont; } sal_uInt16 GetScale() const { return nScale; } const GraphicObject& GetGraphicObject() const; @@ -112,7 +112,7 @@ public: void SetWidth( long nNew ) { nWidth = nNew; } void SetStyle( sal_uInt16 nNew ) { nStyle = nNew; } void SetJustification( sal_uInt8 nNew ) { nJustify = nNew; } - void SetFont( const Font& rNew) { aFont = rNew; } + void SetFont( const vcl::Font& rNew) { aFont = rNew; } void SetScale( sal_uInt16 nNew ) { nScale = nNew; } virtual sal_uInt16 GetVersion(sal_uInt16 nFileVersion) const SAL_OVERRIDE; @@ -122,8 +122,8 @@ public: SfxMapUnit ePresMetric, OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE; - static void StoreFont( SvStream&, const Font& ); - static Font CreateFont( SvStream&, sal_uInt16 nVer ); + static void StoreFont( SvStream&, const vcl::Font& ); + static vcl::Font CreateFont( SvStream&, sal_uInt16 nVer ); sal_uInt16& GetValidMask() { return nValidMask; } sal_uInt16 GetValidMask() const { return nValidMask; } diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index c9f73e80959c..715d519ec2ae 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -74,7 +74,7 @@ class SvxCharSetColorItem; class SfxUndoAction; class MapMode; class Color; -class Font; +namespace vcl { class Font; } class KeyEvent; class PolyPolygon; class Size; @@ -308,7 +308,7 @@ public: bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const; const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ); - Font GetStandardFont( sal_Int32 nPara ); + vcl::Font GetStandardFont( sal_Int32 nPara ); SvxFont GetStandardSvxFont( sal_Int32 nPara ); void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ); @@ -502,9 +502,9 @@ public: static bool DoesKeyChangeText( const KeyEvent& rKeyEvent ); static bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); static bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); - static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont ); + static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const vcl::Font& rFont ); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont ); - static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ); + static vcl::Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ); static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet ); static bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } static bool HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index a6842dd67d3b..62c37d942cca 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -47,7 +47,7 @@ class Range; class SvStream; class SvKeyValueIterator; class SfxStyleSheet; -class Font; +namespace vcl { class Font; } class FontList; class OutputDevice; @@ -194,7 +194,7 @@ public: sal_Int32 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); bool HasConvertibleTextPortion( LanguageType nLang ); void TransliterateText( sal_Int32 nTransliterationMode ); diff --git a/include/editeng/hangulhanja.hxx b/include/editeng/hangulhanja.hxx index 8c7c2db50f0a..178e6be93cd8 100644 --- a/include/editeng/hangulhanja.hxx +++ b/include/editeng/hangulhanja.hxx @@ -114,7 +114,7 @@ namespace editeng const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const ::com::sun::star::lang::Locale& _rSourceLocale, const ::com::sun::star::lang::Locale& _rTargetLocale, - const Font* _pTargetFont, + const vcl::Font* _pTargetFont, sal_Int32 nOptions, bool _bIsInteractive ); @@ -126,7 +126,7 @@ namespace editeng LanguageType GetSourceLanguage() const; LanguageType GetTargetLanguage() const; - const Font * GetTargetFont() const; + const vcl::Font* GetTargetFont() const; sal_Int32 GetConversionOptions() const; bool IsInteractive() const; diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx index 8f6882f3d463..3b24d564736d 100644 --- a/include/editeng/numitem.hxx +++ b/include/editeng/numitem.hxx @@ -34,7 +34,7 @@ #include <editeng/editengdllapi.h> class SvxBrushItem; -class Font; +namespace vcl { class Font; } class Graphic; class SvxNodeNum; namespace com{namespace sun{ namespace star{ @@ -147,7 +147,7 @@ private: sal_Int16 eVertOrient; // vertical alignment of a bitmap Size aGraphicSize; // Always! in 1/100 mm - Font* pBulletFont; // Pointer to the bullet font + vcl::Font* pBulletFont; // Pointer to the bullet font OUString sCharStyleName; // Character Style @@ -177,8 +177,8 @@ public: void SetCharFmtName(const OUString& rSet){ sCharStyleName = rSet; } virtual OUString GetCharFmtName()const; - void SetBulletFont(const Font* pFont); - const Font* GetBulletFont() const {return pBulletFont;} + void SetBulletFont(const vcl::Font* pFont); + const vcl::Font* GetBulletFont() const {return pBulletFont;} void SetBulletChar(sal_Unicode cSet){cBullet = cSet;} sal_Unicode GetBulletChar()const {return cBullet;} void SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = nSet;} diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 1b47f6f1ab70..18ac8316d799 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -283,7 +283,7 @@ public: sal_Int32 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); void TransliterateText( sal_Int32 nTransliterationMode ); @@ -633,7 +633,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster void ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount ); long ImpCalcMaxBulletWidth( sal_Int32 nPara, const SvxBulletItem& rBullet ); - Font ImpCalcBulletFont( sal_Int32 nPara ) const; + vcl::Font ImpCalcBulletFont( sal_Int32 nPara ) const; Rectangle ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bReturnPaperPos ); long ImpGetTextIndent( sal_Int32 nPara ); bool ImpCanIndentSelectedPages( OutlinerView* pCurView ); diff --git a/include/editeng/svxfont.hxx b/include/editeng/svxfont.hxx index e9487b5ee0c7..51a0c0dcdde6 100644 --- a/include/editeng/svxfont.hxx +++ b/include/editeng/svxfont.hxx @@ -36,7 +36,7 @@ class Point; class Rectangle; class Size; -class EDITENG_DLLPUBLIC SvxFont : public Font +class EDITENG_DLLPUBLIC SvxFont : public vcl::Font { SvxCaseMap eCaseMap; // Text Markup short nEsc; // Degree of Superscript/Subscript @@ -45,7 +45,7 @@ class EDITENG_DLLPUBLIC SvxFont : public Font public: SvxFont(); - SvxFont( const Font &rFont ); + SvxFont( const vcl::Font &rFont ); SvxFont( const SvxFont &rFont ); // Methods for Superscript/Subscript @@ -77,7 +77,7 @@ public: void DoOnCapitals(SvxDoCapitals &rDo) const; void SetPhysFont( OutputDevice *pOut ) const; - Font ChgPhysFont( OutputDevice *pOut ) const; + vcl::Font ChgPhysFont( OutputDevice *pOut ) const; Size GetCapitalSize( const OutputDevice *pOut, const OUString &rTxt, const sal_Int32 nIdx, const sal_Int32 nLen) const; diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx index 33a8339c0423..9e516cdc4ad3 100644 --- a/include/editeng/svxrtf.hxx +++ b/include/editeng/svxrtf.hxx @@ -32,7 +32,7 @@ #include <boost/ptr_container/ptr_map.hpp> #include <boost/ptr_container/ptr_vector.hpp> -class Font; +namespace vcl { class Font; } class Color; class Graphic; class DateTime; @@ -78,7 +78,7 @@ public: typedef Color* ColorPtr; typedef std::deque< ColorPtr > SvxRTFColorTbl; -typedef boost::ptr_map<short, Font> SvxRTFFontTbl; +typedef boost::ptr_map<short, vcl::Font> SvxRTFFontTbl; typedef boost::ptr_map<sal_uInt16, SvxRTFStyleType> SvxRTFStyleTbl; // SvxRTFItemStack can't be "std::stack< SvxRTFItemStackType* >" type, because @@ -190,7 +190,7 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser SvxPosition* pInsPos; SfxItemPool* pAttrPool; Color* pDfltColor; - Font* pDfltFont; + vcl::Font* pDfltFont; ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties> m_xDocProps; SfxItemSet *pRTFDefaults; @@ -326,7 +326,7 @@ public: virtual SvParserState CallParser() SAL_OVERRIDE; inline const Color& GetColor( size_t nId ) const; - const Font& GetFont( sal_uInt16 nId ); // Changes the default Font + const vcl::Font& GetFont( sal_uInt16 nId ); // Changes the default Font virtual bool IsEndPara( SvxNodeIdx* pNd, sal_Int32 nCnt ) const = 0; diff --git a/include/editeng/swafopt.hxx b/include/editeng/swafopt.hxx index 25e1017df56a..7bfcb353f3e5 100644 --- a/include/editeng/swafopt.hxx +++ b/include/editeng/swafopt.hxx @@ -61,8 +61,8 @@ public: // Class of options for AutoFormat struct EDITENG_DLLPUBLIC SvxSwAutoFmtFlags { - Font aBulletFont; - Font aByInputBulletFont; + vcl::Font aBulletFont; + vcl::Font aByInputBulletFont; /// only valid inside the Dialog!!! const editeng::SortedAutoCompleteStrings * m_pAutoCompleteList; SmartTagMgr* pSmartTagMgr; diff --git a/include/editeng/unofdesc.hxx b/include/editeng/unofdesc.hxx index 6d644170abbd..79fd8bb36050 100644 --- a/include/editeng/unofdesc.hxx +++ b/include/editeng/unofdesc.hxx @@ -29,8 +29,8 @@ class EDITENG_DLLPUBLIC SvxUnoFontDescriptor { public: - static void ConvertToFont( const ::com::sun::star::awt::FontDescriptor& rDesc, Font& rFont ); - static void ConvertFromFont( const Font& rFont, ::com::sun::star::awt::FontDescriptor& rDesc ); + static void ConvertToFont( const ::com::sun::star::awt::FontDescriptor& rDesc, vcl::Font& rFont ); + static void ConvertFromFont( const vcl::Font& rFont, ::com::sun::star::awt::FontDescriptor& rDesc ); static void FillItemSet( const ::com::sun::star::awt::FontDescriptor& rDesc, SfxItemSet& rSet ); static void FillFromItemSet( const SfxItemSet& rSet, ::com::sun::star::awt::FontDescriptor& rDesc ); diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index cd3b65b95b07..74c044233cb1 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -616,7 +616,7 @@ public: sal_uInt16 nFont, sal_Unicode nChar, sal_uInt32& nMappedFontId, - Font& rFont, + vcl::Font& rFont, char nDefault ) const; const PptDocumentAtom& GetDocumentAtom() const { return aDocAtom; } diff --git a/include/postx.h b/include/postx.h index 677af6876627..bb97adb09921 100644 --- a/include/postx.h +++ b/include/postx.h @@ -26,7 +26,6 @@ /* X Types */ #undef Window -#undef Font #undef Region #undef Icon #undef Time diff --git a/include/prex.h b/include/prex.h index 6a0db3676e66..63d93906623a 100644 --- a/include/prex.h +++ b/include/prex.h @@ -27,7 +27,6 @@ /* Types from <X11/X.h> that clash with LO's identifiers * and we don't need. */ -#define Font HIDE_XLIB_Font #define Icon HIDE_XLIB_Icon /* Types from <X11/X.h> that clash, but we do use. */ diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx index ee4fd7fa75aa..e1295f948efd 100644 --- a/include/sfx2/thumbnailviewitem.hxx +++ b/include/sfx2/thumbnailviewitem.hxx @@ -35,7 +35,7 @@ const int THUMBNAILVIEW_ITEM_CORNER = 5; class CheckBox; -class Font; +namespace vcl { class Font; } class Window; class ThumbnailView; diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 4bbe97f4ee6b..c4e1b998772a 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -445,11 +445,11 @@ public: bool GetUpdateMode() const; // map-mode and font control - void SetFont( const Font& rNewFont ); - const Font& GetFont() const { return pDataWin->GetFont(); } - void SetTitleFont( const Font& rNewFont ) + void SetFont( const vcl::Font& rNewFont ); + const vcl::Font& GetFont() const { return pDataWin->GetFont(); } + void SetTitleFont( const vcl::Font& rNewFont ) { Control::SetFont( rNewFont ); } - const Font& GetTitleFont() const { return Control::GetFont(); } + const vcl::Font& GetTitleFont() const { return Control::GetFont(); } // color for line painting void SetGridLineColor(const Color& rColor) {aGridLineColor = rColor;} diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index e2d042a7f9b7..03b5d2345e34 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -228,7 +228,7 @@ private: using Window::ImplInit; SVT_DLLPRIVATE void ImplInit( WinBits nWinStyle ); SVT_DLLPRIVATE void ImplInitSettings(); - SVT_DLLPRIVATE void ImplGetWeekFont( Font& rFont ) const; + SVT_DLLPRIVATE void ImplGetWeekFont( vcl::Font& rFont ) const; SVT_DLLPRIVATE void ImplFormat(); using Window::ImplHitTest; SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, Date& rDate ) const; diff --git a/include/svtools/hyperlabel.hxx b/include/svtools/hyperlabel.hxx index ff68064673dd..aa38892b60ab 100644 --- a/include/svtools/hyperlabel.hxx +++ b/include/svtools/hyperlabel.hxx @@ -45,8 +45,8 @@ namespace svt virtual void GetFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE; - void DeactivateHyperMode(Font aFont, const Color aColor); - void ActivateHyperMode(Font aFont, const Color aColor); + void DeactivateHyperMode(vcl::Font aFont, const Color aColor); + void ActivateHyperMode(vcl::Font aFont, const Color aColor); protected: void implInit(); diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index 1b4cba84747b..f93200899de3 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -269,8 +269,8 @@ public: bool SetChoiceWithCursor ( bool bDo = true ); - void SetFont( const Font& rFont ); - void SetPointFont( const Font& rFont ); + void SetFont( const vcl::Font& rFont ); + void SetPointFont( const vcl::Font& rFont ); void SetClickHdl( const Link& rLink ) { _aClickIconHdl = rLink; } const Link& GetClickHdl() const { return _aClickIconHdl; } diff --git a/include/svtools/sampletext.hxx b/include/svtools/sampletext.hxx index 6deacc3a315a..c241e19a7500 100644 --- a/include/svtools/sampletext.hxx +++ b/include/svtools/sampletext.hxx @@ -17,12 +17,12 @@ #include <vcl/fontcapabilities.hxx> class OutputDevice; -class Font; +namespace vcl { class Font; } SVT_DLLPUBLIC UScriptCode otCoverageToScript(vcl::UnicodeCoverage::UnicodeCoverageEnum eOTCoverage); -SVT_DLLPUBLIC bool isSymbolFont(const Font &rFont); -SVT_DLLPUBLIC bool isOpenSymbolFont(const Font &rFont); +SVT_DLLPUBLIC bool isSymbolFont(const vcl::Font &rFont); +SVT_DLLPUBLIC bool isOpenSymbolFont(const vcl::Font &rFont); SVT_DLLPUBLIC bool canRenderNameOfSelectedFont(OutputDevice &rDevice); @@ -36,7 +36,7 @@ SVT_DLLPUBLIC OUString makeShortRepresentativeTextForScript(UScriptCode eScript) SVT_DLLPUBLIC OUString makeShortMinimalTextForScript(UScriptCode eScript); //These ones are typically for use in the font preview window in format character -SVT_DLLPUBLIC OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const Font &rFont); +SVT_DLLPUBLIC OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const vcl::Font &rFont); SVT_DLLPUBLIC OUString makeRepresentativeTextForLanguage(LanguageType eLang); SVT_DLLPUBLIC OUString makeRepresentativeTextForScript(UScriptCode eScript); SVT_DLLPUBLIC OUString makeMinimalTextForScript(UScriptCode eScript); diff --git a/include/svtools/scriptedtext.hxx b/include/svtools/scriptedtext.hxx index 6b8248c99a73..45f602b9239c 100644 --- a/include/svtools/scriptedtext.hxx +++ b/include/svtools/scriptedtext.hxx @@ -25,7 +25,7 @@ class OutputDevice; -class Font; +namespace vcl { class Font; } class SvtScriptedTextHelper_Impl; class Size; class Point; @@ -64,7 +64,7 @@ public: The font for asian characters. @param _pCmplxFont The font for complex text layout. */ - void SetFonts( Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ); + void SetFonts( vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ); /** Sets the default font of the current output device to all script types. */ void SetDefaultFont(); diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index f5b1e8330a50..12b75979f922 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -527,11 +527,11 @@ protected: using SvListView::SelectAll; SVT_DLLPRIVATE short GetHeightOffset( const Image& rBmp, Size& rLogicSize); - SVT_DLLPRIVATE short GetHeightOffset( const Font& rFont, Size& rLogicSize); + SVT_DLLPRIVATE short GetHeightOffset( const vcl::Font& rFont, Size& rLogicSize); SVT_DLLPRIVATE void SetEntryHeight( SvTreeListEntry* pEntry ); SVT_DLLPRIVATE void AdjustEntryHeight( const Image& rBmp ); - SVT_DLLPRIVATE void AdjustEntryHeight( const Font& rFont ); + SVT_DLLPRIVATE void AdjustEntryHeight( const vcl::Font& rFont ); SVT_DLLPRIVATE void ImpEntryInserted( SvTreeListEntry* pEntry ); SVT_DLLPRIVATE long PaintEntry1( SvTreeListEntry*, long nLine, @@ -596,7 +596,7 @@ protected: bool AreChildrenTransient() const; void SetChildrenNotTransient(); - void AdjustEntryHeightAndRecalc( const Font& rFont ); + void AdjustEntryHeightAndRecalc( const vcl::Font& rFont ); public: void SetExtendedWinBits( ExtendedWinBits _nBits ); @@ -712,7 +712,7 @@ public: void SetExpandedNodeBmp( const Image& ); Image GetExpandedNodeBmp( ) const; - void SetFont( const Font& rFont ); + void SetFont( const vcl::Font& rFont ); using Window::SetCursor; void SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect = false ); diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx index ed48d5da24cf..073f4f10e6ae 100644 --- a/include/svx/charmap.hxx +++ b/include/svx/charmap.hxx @@ -45,7 +45,7 @@ public: SvxShowCharSet( Window* pParent ); virtual ~SvxShowCharSet(); - void SetFont( const Font& rFont ); + void SetFont( const vcl::Font& rFont ); void SelectCharacter( sal_uInt32 cNew, bool bFocus = false ); sal_UCS4 GetSelectCharacter() const; diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index e6b1c23eef84..36a6931e8190 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -38,7 +38,7 @@ class DialControlBmp : public VirtualDevice public: explicit DialControlBmp( Window& rParent ); - void InitBitmap(const Font& rFont); + void InitBitmap(const vcl::Font& rFont); void SetSize(const Size& rSize); void CopyBackground( const DialControlBmp& rSrc ); void DrawBackground( const Size& rSize, bool bEnabled ); @@ -135,7 +135,7 @@ protected: NumericField* mpLinkField; sal_Int32 mnLinkedFieldValueMultiplyer; Size maWinSize; - Font maWinFont; + vcl::Font maWinFont; sal_Int32 mnAngle; sal_Int32 mnInitialAngle; sal_Int32 mnOldAngle; @@ -144,7 +144,7 @@ protected: bool mbNoRot; explicit DialControl_Impl( Window& rParent ); - void Init( const Size& rWinSize, const Font& rWinFont ); + void Init( const Size& rWinSize, const vcl::Font& rWinFont ); void SetSize( const Size& rWinSize ); }; std::auto_ptr< DialControl_Impl > mpImpl; @@ -154,7 +154,7 @@ protected: void SetRotation( sal_Int32 nAngle, bool bBroadcast ); - void Init( const Size& rWinSize, const Font& rWinFont ); + void Init( const Size& rWinSize, const vcl::Font& rWinFont ); void Init( const Size& rWinSize ); private: diff --git a/include/svx/fontlb.hxx b/include/svx/fontlb.hxx index d0d6b9028751..d5a1b25bdff1 100644 --- a/include/svx/fontlb.hxx +++ b/include/svx/fontlb.hxx @@ -31,7 +31,7 @@ class SvLBoxFontString : public SvLBoxString { private: - Font maFont; /// The font used by this item. + vcl::Font maFont; /// The font used by this item. bool mbUseColor; /// true = use font color, false = default listbox color. public: @@ -40,7 +40,7 @@ public: SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rString, - const Font& rFont, + const vcl::Font& rFont, const Color* pColor = NULL ); virtual ~SvLBoxFontString(); @@ -62,10 +62,10 @@ public: class SVX_DLLPUBLIC SvxFontListBox : public SvTabListBox { private: - Font maStdFont; /// Used for entries without specific font. + vcl::Font maStdFont; /// Used for entries without specific font. // The following members are used to store additional parameters for InitEntry(). - Font maEntryFont; /// Current entry font used in InitEntry(). + vcl::Font maEntryFont; /// Current entry font used in InitEntry(). const Color* mpEntryColor; /// Current entry color used in InitEntry(). bool mbUseFont; /// true = Use maEntryFont/mpEntryColor in InitEntry(). @@ -75,7 +75,7 @@ public: /** Inserts a list entry and sets the font used for this entry. @param pColor The font color. NULL = use default listbox text color. */ void InsertFontEntry( - const OUString& rString, const Font& rFont, const Color* pColor = NULL ); + const OUString& rString, const vcl::Font& rFont, const Color* pColor = NULL ); /** Selects/deselects an entry specified by its position in the list box. */ void SelectEntryPos( sal_uLong nPos, bool bSelect = true ); diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index 8b73b5fb89e5..662b9b2501a2 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -217,7 +217,7 @@ public: }; private: - Font m_aDefaultFont; + vcl::Font m_aDefaultFont; Link m_aMasterStateProvider; Link m_aMasterSlotExecutor; diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx index 79d257360ad0..0418f42c9dc1 100644 --- a/include/svx/nbdtmg.hxx +++ b/include/svx/nbdtmg.hxx @@ -102,7 +102,7 @@ class SVX_DLLPUBLIC BulletsSettings_Impl:public BulletsSettings { public: sal_Unicode cBulletChar; - Font aFont; + vcl::Font aFont; public: BulletsSettings_Impl(NBType eTy) @@ -259,7 +259,7 @@ class SVX_DLLPUBLIC BulletsTypeMgr: public NBOTypeMgrBase virtual OUString GetDescription(sal_uInt16 nIndex,bool isDefault=false) SAL_OVERRIDE; virtual bool IsCustomized(sal_uInt16 nIndex) SAL_OVERRIDE; sal_Unicode GetBulChar(sal_uInt16 nIndex); - Font GetBulCharFont(sal_uInt16 nIndex); + vcl::Font GetBulCharFont(sal_uInt16 nIndex); static BulletsTypeMgr& GetInstance(); }; diff --git a/include/toolkit/awt/vclxfont.hxx b/include/toolkit/awt/vclxfont.hxx index fda8de9e2de1..90516dfe17dc 100644 --- a/include/toolkit/awt/vclxfont.hxx +++ b/include/toolkit/awt/vclxfont.hxx @@ -41,7 +41,7 @@ class TOOLKIT_DLLPUBLIC VCLXFont : public ::com::sun::star::awt::XFont2, private: ::osl::Mutex maMutex; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; - Font maFont; + vcl::Font maFont; FontMetric* mpFontMetric; protected: @@ -52,8 +52,8 @@ public: VCLXFont(); virtual ~VCLXFont(); - void Init( ::com::sun::star::awt::XDevice& rxDev, const Font& rFont ); - const Font& GetFont() const { return maFont; } + void Init( ::com::sun::star::awt::XDevice& rxDev, const vcl::Font& rFont ); + const vcl::Font& GetFont() const { return maFont; } // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/include/toolkit/awt/vclxgraphics.hxx b/include/toolkit/awt/vclxgraphics.hxx index a9e302023c61..77c31790c51c 100644 --- a/include/toolkit/awt/vclxgraphics.hxx +++ b/include/toolkit/awt/vclxgraphics.hxx @@ -57,7 +57,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; OutputDevice* mpOutputDevice; - Font maFont; + vcl::Font maFont; Color maTextColor; Color maTextFillColor; Color maLineColor; @@ -77,7 +77,7 @@ public: void SetOutputDevice( OutputDevice* pOutDev ); OutputDevice* GetOutputDevice() const { return mpOutputDevice; } - const Font& GetFont() const { return maFont; } + const vcl::Font& GetFont() const { return maFont; } // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx index d4a96e9d4062..42e7856842d7 100644 --- a/include/toolkit/helper/vclunohelper.hxx +++ b/include/toolkit/helper/vclunohelper.hxx @@ -98,9 +98,9 @@ public: @param rFont Font to be converted @return the new FontDescriptor */ - static ::com::sun::star::awt::FontDescriptor CreateFontDescriptor( const Font& rFont ); - static Font CreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr, const Font& rInitFont ); - static Font CreateFont( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& rxFont ); + static ::com::sun::star::awt::FontDescriptor CreateFontDescriptor( const vcl::Font& rFont ); + static vcl::Font CreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr, const vcl::Font& rInitFont ); + static vcl::Font CreateFont( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& rxFont ); static ::com::sun::star::awt::SimpleFontMetric CreateFontMetric( const FontMetric& rFontMetric ); static float ConvertFontWidth( FontWidth eWidth ); static FontWidth ConvertFontWidth( float f ); diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 86e33a13ea55..c06ff8c766c8 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -140,7 +140,7 @@ protected: explicit PushButton( WindowType nType ); virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; @@ -320,7 +320,7 @@ public: protected: virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; @@ -441,7 +441,7 @@ protected: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual void ImplDrawCheckBoxState(); diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx index e4ed1e408f8c..02b1acb2669e 100644 --- a/include/vcl/ctrl.hxx +++ b/include/vcl/ctrl.hxx @@ -95,7 +95,7 @@ protected: const OUString& _rStr, sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText ) const; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const; @@ -182,7 +182,7 @@ public: void SetReferenceDevice( OutputDevice* _referenceDevice ); OutputDevice* GetReferenceDevice() const; - Font GetUnzoomedControlPointFont() const; + vcl::Font GetUnzoomedControlPointFont() const; }; #endif // INCLUDED_VCL_CTRL_HXX diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index 5d41a1bf0852..966eacffd2bc 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -45,7 +45,7 @@ struct Impl_IMEInfos; #define EDIT_NOLIMIT SAL_MAX_INT32 #define EDIT_UPDATEDATA_TIMEOUT 350 -typedef OUString (*FncGetSpecialChars)( Window* pWin, const Font& rFont ); +typedef OUString (*FncGetSpecialChars)( Window* pWin, const vcl::Font& rFont ); class VCL_DLLPUBLIC TextFilter { diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx index e215e9911d6d..f875f19b7afc 100644 --- a/include/vcl/fixed.hxx +++ b/include/vcl/fixed.hxx @@ -51,7 +51,7 @@ public: SAL_DLLPRIVATE static sal_uInt16 ImplGetTextStyle( WinBits nWinBits ); protected: virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; @@ -106,7 +106,7 @@ private: protected: virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index 5e0b13481005..da9ae54480ea 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -34,6 +34,12 @@ class SvStream; class Impl_Font; class ImplFontAttributes; +namespace vcl { class Font; } +// need to first declare these outside the vcl namespace, or the friend declarations won't work right +VCL_DLLPUBLIC SvStream& ReadFont( SvStream& rIStm, vcl::Font& ); +VCL_DLLPUBLIC SvStream& WriteFont( SvStream& rOStm, const vcl::Font& ); + +namespace vcl { class VCL_DLLPUBLIC Font { @@ -127,12 +133,14 @@ public: { return !(Font::operator==( rFont )); } bool IsSameInstance( const Font& ) const; - friend VCL_DLLPUBLIC SvStream& ReadFont( SvStream& rIStm, Font& ); - friend VCL_DLLPUBLIC SvStream& WriteFont( SvStream& rOStm, const Font& ); + friend VCL_DLLPUBLIC SvStream& ::ReadFont( SvStream& rIStm, ::vcl::Font& ); + friend VCL_DLLPUBLIC SvStream& ::WriteFont( SvStream& rOStm, const ::vcl::Font& ); static Font identifyFont( const void* pBuffer, sal_uInt32 nLen ); }; +} + #endif // _VCL_FONT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index e248efe66b84..24d9e427de3b 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -40,7 +40,7 @@ namespace com { namespace sun { namespace star { namespace graphic { class XGrap class ImpGraphic; class OutputDevice; -class Font; +namespace vcl { class Font; } class GfxLink; class VCL_DLLPUBLIC GraphicConversionParameters @@ -147,7 +147,7 @@ public: const Point& rDestPt, const Size& rDestSize ) const; static void DrawEx( OutputDevice* pOutDev, const OUString& rText, - Font& rFont, const BitmapEx& rBitmap, + vcl::Font& rFont, const BitmapEx& rBitmap, const Point& rDestPt, const Size& rDestSize ); void StartAnimation( OutputDevice* pOutDev, diff --git a/include/vcl/group.hxx b/include/vcl/group.hxx index a8956de6c814..d600bb15041d 100644 --- a/include/vcl/group.hxx +++ b/include/vcl/group.hxx @@ -40,7 +40,7 @@ private: const Point& rPos, const Size& rSize, bool bLayout = false ); virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; diff --git a/include/vcl/inputctx.hxx b/include/vcl/inputctx.hxx index 9e18c167a265..ae7c4e753174 100644 --- a/include/vcl/inputctx.hxx +++ b/include/vcl/inputctx.hxx @@ -40,20 +40,20 @@ class VCL_DLLPUBLIC InputContext { private: - Font maFont; - sal_uLong mnOptions; + vcl::Font maFont; + sal_uLong mnOptions; public: InputContext() { mnOptions = 0; } InputContext( const InputContext& rInputContext ) : maFont( rInputContext.maFont ) { mnOptions = rInputContext.mnOptions; } - InputContext( const Font& rFont, sal_uLong nOptions = 0 ) : + InputContext( const vcl::Font& rFont, sal_uLong nOptions = 0 ) : maFont( rFont ) { mnOptions = nOptions; } - void SetFont( const Font& rFont ) { maFont = rFont; } - const Font& GetFont() const { return maFont; } + void SetFont( const vcl::Font& rFont ) { maFont = rFont; } + const vcl::Font& GetFont() const { return maFont; } void SetOptions( sal_uLong nOptions ) { mnOptions = nOptions; } sal_uLong GetOptions() const { return mnOptions; } diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index 1f0fd7964dbf..e2eead04c452 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -1325,9 +1325,9 @@ class VCL_DLLPUBLIC MetaFontAction : public MetaAction { private: - Font maFont; + vcl::Font maFont; - virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE; + virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE; public: MetaFontAction(); @@ -1339,11 +1339,11 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE; - explicit MetaFontAction( const Font& ); + explicit MetaFontAction( const vcl::Font& ); virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE; - const Font& GetFont() const { return maFont; } + const vcl::Font& GetFont() const { return maFont; } }; class VCL_DLLPUBLIC MetaPushAction : public MetaAction diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx index a0ef28842df0..eb144507bd0a 100644 --- a/include/vcl/metric.hxx +++ b/include/vcl/metric.hxx @@ -32,7 +32,7 @@ typedef sal_uInt32 sal_UCS4; namespace vcl { // avoid problems where poppler's FontInfo is picked up -class VCL_DLLPUBLIC FontInfo : public Font +class VCL_DLLPUBLIC FontInfo : public vcl::Font { friend class ::OutputDevice; diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index df0cd270ed89..8089cc16bb5a 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -313,7 +313,7 @@ private: Region maRegion; // contains the clip region, see SetClipRegion(...) Color maLineColor; Color maFillColor; - Font maFont; + vcl::Font maFont; Color maTextColor; Color maTextLineColor; Color maOverlineColor; @@ -589,8 +589,8 @@ public: const Wallpaper& GetBackground() const { return maBackground; } bool IsBackground() const { return mbBackground; } - void SetFont( const Font& rNewFont ); - const Font& GetFont() const { return maFont; } + void SetFont( const vcl::Font& rNewFont ); + const vcl::Font& GetFont() const { return maFont; } protected: @@ -961,7 +961,7 @@ public: <code> VirtualDevice aDevice; - Font aFont = aDevice.GetFont(); + vcl::Font aFont = aDevice.GetFont(); aFont.SetSize(Size(0, 96)); aFont.SetColor(COL_BLACK); aDevice.SetFont(aFont); @@ -1119,7 +1119,7 @@ private: SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor ); SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth ); - SAL_DLLPRIVATE static bool ImplIsUnderlineAbove( const Font& ); + SAL_DLLPRIVATE static bool ImplIsUnderlineAbove( const vcl::Font& ); static SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout ); @@ -1137,13 +1137,13 @@ public: bool IsFontAvailable( const OUString& rFontName ) const; - Size GetDevFontSize( const Font& rFont, int nSizeIndex ) const; - int GetDevFontSizeCount( const Font& ) const; + Size GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) const; + int GetDevFontSizeCount( const vcl::Font& ) const; bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ); FontMetric GetFontMetric() const; - FontMetric GetFontMetric( const Font& rFont ) const; + FontMetric GetFontMetric( const vcl::Font& rFont ) const; bool GetFontCharMap( FontCharMap& rFontCharMap ) const; bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const; @@ -1159,12 +1159,12 @@ public: SAL_DLLPRIVATE void ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient ); SAL_DLLPRIVATE static FontEmphasisMark - ImplGetEmphasisMarkStyle( const Font& rFont ); + ImplGetEmphasisMarkStyle( const vcl::Font& rFont ); bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ); - sal_Int32 HasGlyphs( const Font& rFont, const OUString& rStr, + sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const; long GetMinKashida() const; @@ -1186,7 +1186,7 @@ public: static void RemoveFontSubstitute( sal_uInt16 n ); static sal_uInt16 GetFontSubstituteCount(); - static Font GetDefaultFont( sal_uInt16 nType, + static vcl::Font GetDefaultFont( sal_uInt16 nType, LanguageType eLang, sal_uLong nFlags, const OutputDevice* pOutDev = NULL ); diff --git a/include/vcl/outdevstate.hxx b/include/vcl/outdevstate.hxx index 578a1a978843..e53b7c18a923 100644 --- a/include/vcl/outdevstate.hxx +++ b/include/vcl/outdevstate.hxx @@ -111,7 +111,7 @@ public: Region* mpClipRegion; Color* mpLineColor; Color* mpFillColor; - Font* mpFont; + vcl::Font* mpFont; Color* mpTextColor; Color* mpTextFillColor; Color* mpTextLineColor; diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 223dcf3998ad..56ce18c40052 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -41,7 +41,7 @@ #include <vector> #include <set> -class Font; +namespace vcl { class Font; } class Point; class OutputDevice; class GDIMetaFile; @@ -234,7 +234,7 @@ public: Color BorderColor;// COL_TRANSPARENT and Border=true means get color from application settings bool Background; // true: widget shall draw its background, false: no background Color BackgroundColor; // COL_TRANSPARENT and Background=true means get color from application settings - Font TextFont; // an empty font will be replaced by the + vcl::Font TextFont; // an empty font will be replaced by the // appropriate font from the user settings Color TextColor; // COL_TRANSPARENT will be replaced by the appropriate color from application settings sal_Int32 TabOrder; // lowest number is first in tab order @@ -747,7 +747,7 @@ The following structure describes the permissions used in PDF security void SetFillColor( const Color& rColor ); void SetFillColor() { SetFillColor( Color( COL_TRANSPARENT ) ); } - void SetFont( const Font& rNewFont ); + void SetFont( const vcl::Font& rNewFont ); void SetTextColor( const Color& rColor ); void SetTextFillColor(); void SetTextFillColor( const Color& rColor ); diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index 021161f90324..10ae6a60854f 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -391,44 +391,44 @@ public: void SetCairoFontOptions( const void *pOptions ); const void* GetCairoFontOptions() const; - void SetAppFont( const Font& rFont ); - const Font& GetAppFont() const; + void SetAppFont( const vcl::Font& rFont ); + const vcl::Font& GetAppFont() const; - void SetHelpFont( const Font& rFont ); - const Font& GetHelpFont() const; + void SetHelpFont( const vcl::Font& rFont ); + const vcl::Font& GetHelpFont() const; - void SetTitleFont( const Font& rFont ); - const Font& GetTitleFont() const; + void SetTitleFont( const vcl::Font& rFont ); + const vcl::Font& GetTitleFont() const; - void SetFloatTitleFont( const Font& rFont ); - const Font& GetFloatTitleFont() const; + void SetFloatTitleFont( const vcl::Font& rFont ); + const vcl::Font& GetFloatTitleFont() const; - void SetMenuFont( const Font& rFont ); - const Font& GetMenuFont() const; + void SetMenuFont( const vcl::Font& rFont ); + const vcl::Font& GetMenuFont() const; - void SetToolFont( const Font& rFont ); - const Font& GetToolFont() const; + void SetToolFont( const vcl::Font& rFont ); + const vcl::Font& GetToolFont() const; - void SetGroupFont( const Font& rFont ); - const Font& GetGroupFont() const; + void SetGroupFont( const vcl::Font& rFont ); + const vcl::Font& GetGroupFont() const; - void SetLabelFont( const Font& rFont ); - const Font& GetLabelFont() const; + void SetLabelFont( const vcl::Font& rFont ); + const vcl::Font& GetLabelFont() const; - void SetInfoFont( const Font& rFont ); - const Font& GetInfoFont() const; + void SetInfoFont( const vcl::Font& rFont ); + const vcl::Font& GetInfoFont() const; - void SetRadioCheckFont( const Font& rFont ); - const Font& GetRadioCheckFont() const; + void SetRadioCheckFont( const vcl::Font& rFont ); + const vcl::Font& GetRadioCheckFont() const; - void SetPushButtonFont( const Font& rFont ); - const Font& GetPushButtonFont() const; + void SetPushButtonFont( const vcl::Font& rFont ); + const vcl::Font& GetPushButtonFont() const; - void SetFieldFont( const Font& rFont ); - const Font& GetFieldFont() const; + void SetFieldFont( const vcl::Font& rFont ); + const vcl::Font& GetFieldFont() const; - void SetIconFont( const Font& rFont ); - const Font& GetIconFont() const; + void SetIconFont( const vcl::Font& rFont ); + const vcl::Font& GetIconFont() const; long GetBorderSize() const; diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index 4531c091a580..f1c0f1ab4594 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -75,7 +75,7 @@ protected: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; SAL_DLLPRIVATE Rectangle* ImplFindPartRect( const Point& rPt ); diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx index 9da46801085c..bb4a1039af5e 100644 --- a/include/vcl/texteng.hxx +++ b/include/vcl/texteng.hxx @@ -111,16 +111,16 @@ private: LocaleDataWrapper* mpLocaleDataWrapper; - Font maFont; + vcl::Font maFont; Color maTextColor; long mnCharHeight; - sal_uInt16 mnFixCharWidth100; + sal_uInt16 mnFixCharWidth100; - sal_uLong mnMaxTextLen; - sal_uLong mnMaxTextWidth; - sal_uLong mnCurTextWidth; - sal_uLong mnCurTextHeight; - sal_uLong mnDefTab; + sal_uLong mnMaxTextLen; + sal_uLong mnMaxTextWidth; + sal_uLong mnCurTextWidth; + sal_uLong mnCurTextHeight; + sal_uLong mnDefTab; TxtAlign meAlign; @@ -182,7 +182,7 @@ protected: sal_uInt16 SplitTextPortion( sal_uLong nPara, sal_uInt16 nPos ); void CreateTextPortions( sal_uLong nPara, sal_uInt16 nStartPos ); void RecalcTextPortion( sal_uLong nPara, sal_uInt16 nStartPos, short nNewChars ); - void SeekCursor( sal_uLong nNode, sal_uInt16 nPos, Font& rFont, OutputDevice* pOutDev ); + void SeekCursor( sal_uLong nNode, sal_uInt16 nPos, vcl::Font& rFont, OutputDevice* pOutDev ); void FormatDoc(); void FormatFullDoc(); @@ -209,7 +209,7 @@ protected: sal_uLong CalcTextHeight(); sal_uLong CalcParaHeight( sal_uLong nParagraph ) const; sal_uLong CalcTextWidth( sal_uLong nPara ); - sal_uLong CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nPortionLen, const Font* pFont = 0 ); + sal_uLong CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nPortionLen, const vcl::Font* pFont = 0 ); Range GetInvalidYOffsets( sal_uLong nPortion ); // for Undo/Redo @@ -234,8 +234,8 @@ public: sal_uLong GetTextLen( LineEnd aSeparator = LINEEND_LF ) const; sal_uLong GetTextLen( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const; - void SetFont( const Font& rFont ); - const Font& GetFont() const { return maFont; } + void SetFont( const vcl::Font& rFont ); + const vcl::Font& GetFont() const { return maFont; } sal_uInt16 GetDefTab() const; diff --git a/include/vcl/txtattr.hxx b/include/vcl/txtattr.hxx index 98a679c79c6f..c727f8f12ce3 100644 --- a/include/vcl/txtattr.hxx +++ b/include/vcl/txtattr.hxx @@ -26,7 +26,7 @@ #include <vcl/vclenum.hxx> #include <vcl/dllapi.h> -class Font; +namespace vcl { class Font; } #define TEXTATTR_INVALID 0 #define TEXTATTR_FONTCOLOR 1 @@ -51,7 +51,7 @@ public: virtual ~TextAttrib(); sal_uInt16 Which() const { return mnWhich; } - virtual void SetFont( Font& rFont ) const = 0; + virtual void SetFont( vcl::Font& rFont ) const = 0; virtual TextAttrib* Clone() const = 0; virtual bool operator==( const TextAttrib& rAttr ) const = 0; @@ -73,7 +73,7 @@ public: const Color& GetColor() const { return maColor; } - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; @@ -89,7 +89,7 @@ public: TextAttribFontWeight( const TextAttribFontWeight& rAttr ); virtual ~TextAttribFontWeight(); - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; @@ -117,7 +117,7 @@ public: void SetColor( const Color& rColor ) { maColor = rColor; } const Color& GetColor() const { return maColor; } - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; }; @@ -129,7 +129,7 @@ public: TextAttribProtect( const TextAttribProtect& rAttr ); virtual ~TextAttribProtect(); - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index e4f49dab2d87..bf8a8294c6fe 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -513,8 +513,8 @@ private: SAL_DLLPRIVATE void ImplInitResolutionSettings(); - SAL_DLLPRIVATE void ImplPointToLogic( Font& rFont ) const; - SAL_DLLPRIVATE void ImplLogicToPoint( Font& rFont ) const; + SAL_DLLPRIVATE void ImplPointToLogic( vcl::Font& rFont ) const; + SAL_DLLPRIVATE void ImplLogicToPoint( vcl::Font& rFont ) const; SAL_DLLPRIVATE bool ImplSysObjClip( const Region* pOldRegion ); SAL_DLLPRIVATE void ImplUpdateSysObjChildrenClip(); @@ -566,7 +566,7 @@ private: True if the font can be used as UI font False if the font is unsuitable as UI font */ - SAL_DLLPRIVATE bool ImplCheckUIFont( const Font& rFont ); + SAL_DLLPRIVATE bool ImplCheckUIFont( const vcl::Font& rFont ); SAL_DLLPRIVATE void ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl = true ); @@ -764,15 +764,15 @@ public: void UpdateSettings( const AllSettings& rSettings, bool bChild = false ); void NotifyAllChildren( DataChangedEvent& rDCEvt ); - void SetPointFont( const Font& rFont ); - Font GetPointFont() const; - void SetZoomedPointFont( const Font& rFont ); + void SetPointFont( const vcl::Font& rFont ); + vcl::Font GetPointFont() const; + void SetZoomedPointFont( const vcl::Font& rFont ); long GetDrawPixel( OutputDevice* pDev, long nPixels ) const; - Font GetDrawPixelFont( OutputDevice* pDev ) const; + vcl::Font GetDrawPixelFont( OutputDevice* pDev ) const; void SetControlFont(); - void SetControlFont( const Font& rFont ); - Font GetControlFont() const; + void SetControlFont( const vcl::Font& rFont ); + vcl::Font GetControlFont() const; bool IsControlFont() const; void SetControlForeground(); void SetControlForeground( const Color& rColor ); |