summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-06-04 07:48:15 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-06-04 07:49:15 +0200
commitf634cda2a26aba91277738f2c6f09405a2bf915c (patch)
treea9fc64974c8d1a20b02d69d0b4aeb84bb619dbf8 /include
parent75ea03d8423bdcce241149540a636d6156027d65 (diff)
avoid problems with poppler's and vcl's FontInfo during runtime
Change-Id: I1dbd256812cccae1e6ed0ad8bb34ce427e5e5be8
Diffstat (limited to 'include')
-rw-r--r--include/svtools/ctrlbox.hxx6
-rw-r--r--include/svtools/ctrltool.hxx40
-rw-r--r--include/svtools/stdmenu.hxx6
-rw-r--r--include/vcl/metric.hxx10
-rw-r--r--include/vcl/outdev.hxx7
5 files changed, 40 insertions, 29 deletions
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index d206a91609e2..5d728141791e 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -37,7 +37,7 @@ class ImpLineListData;
typedef ::std::vector< ImplColorListData* > ImpColorList;
typedef ::std::vector< ImpLineListData* > ImpLineList;
-typedef ::std::vector< FontInfo > ImplFontList;
+typedef ::std::vector< vcl::FontInfo > ImplFontList;
#define CHANGE_LINE1 ( ( sal_uInt16 ) 1 )
#define CHANGE_LINE2 ( ( sal_uInt16 ) 2 )
@@ -457,7 +457,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;
@@ -483,7 +483,7 @@ public:
void Reformat() SAL_OVERRIDE;
void Modify() SAL_OVERRIDE;
- 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 b55419dcc9e4..a28ff1d398a4 100644
--- a/include/svtools/ctrltool.hxx
+++ b/include/svtools/ctrltool.hxx
@@ -71,28 +71,28 @@ With sal_False vectorized and scalable fonts will be queried.
--------------------------------------------------------------------------
-String FontList::GetStyleName( const FontInfo& rInfo ) const;
+String FontList::GetStyleName( const vcl::FontInfo& rInfo ) const;
-This method returns the StyleName of a FontInfo.
+This method returns the StyleName of a vcl::FontInfo.
If no StyleName is set, a name will be generated from the set attributes.
--------------------------------------------------------------------------
-OUString FontList::GetFontMapText( const FontInfo& rInfo ) const;
+OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const;
This method returns a Matchstring which indicates the problem that could
arise when using a font. This string should be displayed to the user.
--------------------------------------------------------------------------
-FontInfo FontList::Get( const String& rName, const String& rStyleName ) const;
+vcl::FontInfo FontList::Get( const String& rName, const String& rStyleName ) const;
-This method search a FontInfo for the given name and the given style name.
+This method search a vcl::FontInfo for the given name and the given style name.
The Stylename can also be a synthetic one.
-In that case the relevant FontInfo fields will be set.
-If a StyleName is provived, a FontInfo structure without a Stylename can be
+In that case the relevant vcl::FontInfo fields will be set.
+If a StyleName is provived, a vcl::FontInfo structure without a Stylename can be
returned. To get a representation of the StyleName for displaying it to the user,
-call GetStyleName() on this FontInfo structure.
+call GetStyleName() on this vcl::FontInfo structure.
Links:
@@ -100,13 +100,13 @@ FontList::GetStyleName()
--------------------------------------------------------------------------
-FontInfo FontList::Get( const String& rName, FontWeight eWeight,
+vcl::FontInfo FontList::Get( const String& rName, FontWeight eWeight,
FontItalic eItalic ) const;
-This method search a FontInfo structure for a provided name and styles.
-This method can also return a FontInfo without a Stylename.
+This method search a vcl::FontInfo structure for a provided name and styles.
+This method can also return a vcl::FontInfo without a Stylename.
To get a representation of the StyleName to be presented to the user
-call GetStyleName() with this FontInfo.
+call GetStyleName() with this vcl::FontInfo.
Links:
@@ -114,7 +114,7 @@ FontList::GetStyleName()
--------------------------------------------------------------------------
-const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const;
+const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const;
This method returns the available sizes for the given font.
If it is a scalable font, standard sizes are returned.
@@ -168,18 +168,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;
@@ -188,12 +188,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 ea73bc6cfd16..7f4e9af822ca 100644
--- a/include/svtools/stdmenu.hxx
+++ b/include/svtools/stdmenu.hxx
@@ -25,7 +25,9 @@
#include <vcl/menu.hxx>
class FontList;
-class FontInfo;
+namespace vcl {
+ class FontInfo;
+}
/*************************************************************************
@@ -137,7 +139,7 @@ public:
virtual void Select() SAL_OVERRIDE;
virtual void Highlight() SAL_OVERRIDE;
- 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 10a61fbf4dcf..160b9b377d69 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -22,18 +22,21 @@
#include <vcl/dllapi.h>
#include <vcl/font.hxx>
+#include <vcl/outdev.hxx>
class ImplFontMetric;
class ImplFontCharMap;
typedef sal_uInt32 sal_UCS4;
+namespace vcl {
+
+// avoid problems where poppler's FontInfo is picked up
class VCL_DLLPUBLIC FontInfo : public Font
{
friend class OutputDevice;
protected:
- ImplFontMetric* mpImplMetric; // Implementation
public:
FontInfo();
@@ -46,9 +49,12 @@ public:
bool operator==( const FontInfo& ) const;
bool operator!=( const FontInfo& rInfo ) const
{ return !operator==( rInfo ); }
+ ImplFontMetric* mpImplMetric; // Implementation
};
-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 de51dc49deaa..1a8c67623282 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -81,7 +81,6 @@ class BitmapReadAccess;
class BitmapEx;
class Image;
class TextRectInfo;
-class FontInfo;
class FontMetric;
class GDIMetaFile;
class GfxLink;
@@ -230,6 +229,10 @@ class FontSelectPattern;
class ImplFontMetricData;
class VCLXGraphics;
+namespace vcl {
+ class FontInfo;
+}
+
typedef ::std::vector< VCLXGraphics* > VCLXGraphicsList_impl;
sal_uLong AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
@@ -1124,7 +1127,7 @@ private:
public:
- FontInfo GetDevFont( int nDevFontIndex ) const;
+ vcl::FontInfo GetDevFont( int nDevFontIndex ) const;
int GetDevFontCount() const;
bool IsFontAvailable( const OUString& rFontName ) const;