From 1665c84d5416175e5761ff48fdd7e2212bd2b11c Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Wed, 4 Jun 2014 07:48:15 +0200 Subject: avoid problems with poppler's and vcl's FontInfo during runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conflicts: include/vcl/metric.hxx svtools/source/control/ctrlbox.cxx svtools/source/control/ctrltool.cxx svtools/source/control/stdmenu.cxx svx/source/sidebar/nbdtmg.cxx Conflicts: include/svtools/ctrltool.hxx include/vcl/metric.hxx include/vcl/outdev.hxx svtools/source/control/ctrlbox.cxx svtools/source/control/ctrltool.cxx svtools/source/control/stdmenu.cxx svx/source/sidebar/nbdtmg.cxx sw/source/core/uibase/docvw/srcedtw.cxx vcl/source/gdi/metric.cxx vcl/source/outdev/font.cxx Change-Id: I1dbd256812cccae1e6ed0ad8bb34ce427e5e5be8 Reviewed-on: https://gerrit.libreoffice.org/9720 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- include/svtools/ctrlbox.hxx | 6 +++--- include/svtools/ctrltool.hxx | 24 ++++++++++++------------ include/svtools/stdmenu.hxx | 6 ++++-- include/vcl/metric.hxx | 13 +++++-------- include/vcl/outdev.hxx | 7 +++++-- 5 files changed, 29 insertions(+), 27 deletions(-) (limited to 'include') diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 659909139e70..2727301270a7 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -35,7 +35,7 @@ class ImpLineListData; typedef ::std::vector< ImplColorListData* > ImpColorList; typedef ::std::vector< ImpLineListData* > ImpLineList; -typedef ::std::vector< FontInfo > ImplFontList; +typedef ::std::vector< vcl::FontInfo > ImplFontList; // FIXME: STYLE_* duplicate values from editeng::SvxBorderStyle, // which in turn duplicates values from com::sun::star::table::BorderLineStyle: @@ -488,7 +488,7 @@ inline void FontStyleBox::SetText( const OUString& rText ) class SVT_DLLPUBLIC FontSizeBox : public MetricBox { - FontInfo aFontInfo; + vcl::FontInfo aFontInfo; const FontList* pFontList; sal_uInt16 nRelMin; sal_uInt16 nRelMax; @@ -514,7 +514,7 @@ public: void Reformat(); void Modify(); - void Fill( const FontInfo* pInfo, const FontList* pList ); + void Fill( const vcl::FontInfo* pInfo, const FontList* pList ); void EnableRelativeMode( sal_uInt16 nMin = 50, sal_uInt16 nMax = 150, sal_uInt16 nStep = 5 ); diff --git a/include/svtools/ctrltool.hxx b/include/svtools/ctrltool.hxx index 65b19e30dcd1..a72702a62bbc 100644 --- a/include/svtools/ctrltool.hxx +++ b/include/svtools/ctrltool.hxx @@ -75,7 +75,7 @@ scalierbare Schriften abgefragt. -------------------------------------------------------------------------- -String FontList::GetStyleName( const FontInfo& rInfo ) const; +String FontList::GetStyleName( const vcl::FontInfo& rInfo ) const; Diese Methode gibt den StyleName von einer FontInfo zurueck. Falls kein StyleName gesetzt ist, wird aus den gesetzten Attributen ein entsprechender @@ -83,14 +83,14 @@ Name generiert, der dem Anwender praesentiert werden kann. -------------------------------------------------------------------------- -OUString FontList::GetFontMapText( const FontInfo& rInfo ) const; +OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const; Diese Methode gibt einen Matchstring zurueck, der dem Anwender anzeigen soll, welche Probleme es mit diesem Font geben kann. -------------------------------------------------------------------------- -FontInfo FontList::Get( const String& rName, const String& rStyleName ) const; +vcl::FontInfo FontList::Get( const String& rName, const String& rStyleName ) const; Diese Methode sucht aus dem uebergebenen Namen und dem uebergebenen StyleName die entsprechende FontInfo-Struktur raus. Der Stylename kann in dieser @@ -106,7 +106,7 @@ FontList::GetStyleName() -------------------------------------------------------------------------- -FontInfo FontList::Get( const String& rName, FontWeight eWeight, +vcl::FontInfo FontList::Get( const String& rName, FontWeight eWeight, FontItalic eItalic ) const; Diese Methode sucht aus dem uebergebenen Namen und den uebergebenen Styles @@ -121,7 +121,7 @@ FontList::GetStyleName() -------------------------------------------------------------------------- -const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const; +const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const; Diese Methode liefert zum uebergebenen Font die vorhandenen Groessen. Falls es sich dabei um einen skalierbaren Font handelt, werden Standard- @@ -178,18 +178,18 @@ public: OutputDevice* GetDevice() const { return mpDev; } OutputDevice* GetDevice2() const { return mpDev2; } - OUString GetFontMapText( const FontInfo& rInfo ) const; + OUString GetFontMapText( const vcl::FontInfo& rInfo ) const; const OUString& GetNormalStr() const { return maNormal; } const OUString& GetItalicStr() const { return maNormalItalic; } const OUString& GetBoldStr() const { return maBold; } const OUString& GetBoldItalicStr() const { return maBoldItalic; } const OUString& GetStyleName( FontWeight eWeight, FontItalic eItalic ) const; - OUString GetStyleName( const FontInfo& rInfo ) const; + OUString GetStyleName( const vcl::FontInfo& rInfo ) const; - FontInfo Get( const OUString& rName, + vcl::FontInfo Get( const OUString& rName, const OUString& rStyleName ) const; - FontInfo Get( const OUString& rName, + vcl::FontInfo Get( const OUString& rName, FontWeight eWeight, FontItalic eItalic ) const; @@ -198,12 +198,12 @@ public: { return (sal_uInt16)maEntries.size(); } - const FontInfo& GetFontName( sal_uInt16 nFont ) const; + const vcl::FontInfo& GetFontName( sal_uInt16 nFont ) const; sal_Handle GetFirstFontInfo( const OUString& rName ) const; sal_Handle GetNextFontInfo( sal_Handle hFontInfo ) const; - const FontInfo& GetFontInfo( sal_Handle hFontInfo ) const; + const vcl::FontInfo& GetFontInfo( sal_Handle hFontInfo ) const; - const sal_IntPtr* GetSizeAry( const FontInfo& rInfo ) const; + const sal_IntPtr* GetSizeAry( const vcl::FontInfo& rInfo ) const; static const sal_IntPtr* GetStdSizeAry(); private: diff --git a/include/svtools/stdmenu.hxx b/include/svtools/stdmenu.hxx index fd0f18674290..4385881f001e 100644 --- a/include/svtools/stdmenu.hxx +++ b/include/svtools/stdmenu.hxx @@ -25,7 +25,9 @@ #include class FontList; -class FontInfo; +namespace vcl { + class FontInfo; +} /************************************************************************* @@ -145,7 +147,7 @@ public: virtual void Select(); virtual void Highlight(); - void Fill( const FontInfo& rInfo, const FontList* pList ); + void Fill( const vcl::FontInfo& rInfo, const FontList* pList ); void SetCurHeight( long nHeight ); long GetCurHeight() const { return mnCurHeight; } diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx index 9b6efe67c0c4..1836cce84207 100644 --- a/include/vcl/metric.hxx +++ b/include/vcl/metric.hxx @@ -22,22 +22,20 @@ #include #include +#include class ImplFontMetric; class ImplFontCharMap; typedef sal_uInt32 sal_UCS4; -// ------------ -// - FontInfo - -// ------------ +namespace vcl { class VCL_DLLPUBLIC FontInfo : public Font { friend class OutputDevice; protected: - ImplFontMetric* mpImplMetric; // Implementation public: FontInfo(); @@ -50,13 +48,12 @@ public: sal_Bool operator==( const FontInfo& ) const; sal_Bool operator!=( const FontInfo& rInfo ) const { return !operator==( rInfo ); } + ImplFontMetric* mpImplMetric; // Implementation }; -// -------------- -// - FontMetric - -// -------------- +} -class VCL_DLLPUBLIC FontMetric : public FontInfo +class VCL_DLLPUBLIC FontMetric : public vcl::FontInfo { public: FontMetric() {} diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index d7e2bf48a4e6..48ebd50cd0f6 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -59,7 +59,6 @@ class BitmapReadAccess; class BitmapEx; class Image; class TextRectInfo; -class FontInfo; class FontMetric; class GDIMetaFile; class GfxLink; @@ -257,6 +256,10 @@ class FontSelectPattern; class ImplFontMetricData; class VCLXGraphics; +namespace vcl { + class FontInfo; +} + typedef ::std::vector< VCLXGraphics* > VCLXGraphicsList_impl; const char* ImplDbgCheckOutputDevice( const void* pObj ); @@ -1081,7 +1084,7 @@ public: sal_Bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ); int GetDevFontCount() const; - FontInfo GetDevFont( int nDevFontIndex ) const; + vcl::FontInfo GetDevFont( int nDevFontIndex ) const; int GetDevFontSizeCount( const Font& ) const; Size GetDevFontSize( const Font& rFont, int nSizeIndex ) const; sal_Bool IsFontAvailable( const OUString& rFontName ) const; -- cgit v1.2.3