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@googlemail.com>2014-06-10 13:52:01 +0200
commit2980f4986d1349cb83b13794d60c85950b3b9d6d (patch)
treea55cec5c89585c97f6f92f4e4ad16bc7ceff59a0 /include
parentc1f99af92612b9b59553206cca786649f2e7b3cc (diff)
avoid problems with poppler's and vcl's FontInfo during runtime
Change-Id: I1dbd256812cccae1e6ed0ad8bb34ce427e5e5be8 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
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.hxx14
-rw-r--r--include/vcl/outdev.hxx7
5 files changed, 38 insertions, 35 deletions
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 78986bdae3ca..c068285206a3 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 )
@@ -480,7 +480,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;
@@ -506,7 +506,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 39e248fc798e..a5d60772d609 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 78062fd891b0..0b7b7f2178e4 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;
+}
/*************************************************************************
@@ -145,7 +147,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 8e0957ac9924..c452edf13d07 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -22,22 +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 {
-// - FontInfo -
-
-
+// avoid problems where poppler's FontInfo is picked up
class VCL_DLLPUBLIC FontInfo : public Font
{
friend class OutputDevice;
protected:
- ImplFontMetric* mpImplMetric; // Implementation
public:
FontInfo();
@@ -50,13 +49,12 @@ public:
bool operator==( const FontInfo& ) const;
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 0c185253e461..25bf4cf63472 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -83,7 +83,6 @@ class BitmapReadAccess;
class BitmapEx;
class Image;
class TextRectInfo;
-class FontInfo;
class FontMetric;
class GDIMetaFile;
class GfxLink;
@@ -232,6 +231,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 );
@@ -1069,7 +1072,7 @@ private:
public:
- FontInfo GetDevFont( int nDevFontIndex ) const;
+ vcl::FontInfo GetDevFont( int nDevFontIndex ) const;
int GetDevFontCount() const;
bool IsFontAvailable( const OUString& rFontName ) const;