summaryrefslogtreecommitdiff
path: root/svtools
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 /svtools
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 'svtools')
-rw-r--r--svtools/source/control/ctrlbox.cxx12
-rw-r--r--svtools/source/control/ctrltool.cxx50
-rw-r--r--svtools/source/control/stdmenu.cxx4
3 files changed, 21 insertions, 45 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 3bd3eba30885..d54dcb43598e 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1148,7 +1148,7 @@ void FontNameBox::Fill( const FontList* pList )
sal_uInt16 nFontCount = pList->GetFontNameCount();
for ( sal_uInt16 i = 0; i < nFontCount; i++ )
{
- const FontInfo& rFontInfo = pList->GetFontName( i );
+ const vcl::FontInfo& rFontInfo = pList->GetFontName( i );
sal_uLong nIndex = InsertEntry( rFontInfo.GetName() );
if ( nIndex != LISTBOX_ERROR )
{
@@ -1228,13 +1228,11 @@ namespace
}
}
-
-
void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
{
assert( mpFontList );
- FontInfo& rInfo = (*mpFontList)[ rUDEvt.GetItemId() ];
+ vcl::FontInfo& rInfo = (*mpFontList)[ rUDEvt.GetItemId() ];
Point aTopLeft = rUDEvt.GetRect().TopLeft();
long nX = aTopLeft.X();
long nH = rUDEvt.GetRect().GetHeight();
@@ -1525,7 +1523,7 @@ void FontStyleBox::Fill( const OUString& rName, const FontList* pList )
bool bBold = false;
bool bBoldItalic = false;
bool bInsert = false;
- FontInfo aInfo;
+ vcl::FontInfo aInfo;
while ( hFontInfo )
{
aInfo = pList->GetFontInfo( hFontInfo );
@@ -1761,9 +1759,7 @@ void FontSizeBox::Modify()
}
}
-
-
-void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
+void FontSizeBox::Fill( const vcl::FontInfo* pInfo, const FontList* pList )
{
// remember for relative mode
pFontList = pList;
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 4818928231cd..e973e63a1970 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -69,13 +69,7 @@ static const sal_IntPtr aStdSizeAry[] =
0
};
-
-
-
-// - class ImplFontListFonInfo -
-
-
-class ImplFontListFontInfo : public FontInfo
+class ImplFontListFontInfo : public vcl::FontInfo
{
friend class FontList;
@@ -84,9 +78,9 @@ private:
ImplFontListFontInfo* mpNext;
public:
- ImplFontListFontInfo( const FontInfo& rInfo,
+ ImplFontListFontInfo( const vcl::FontInfo& rInfo,
OutputDevice* pDev ) :
- FontInfo( rInfo ), mpNext(NULL)
+ vcl::FontInfo( rInfo ), mpNext(NULL)
{
mpDevice = pDev;
}
@@ -259,7 +253,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
sal_uInt16 i;
for( i = 0; i < n; i++ )
{
- FontInfo aFontInfo = pDevice->GetDevFont( i );
+ vcl::FontInfo aFontInfo = pDevice->GetDevFont( i );
// ignore raster-fonts if they are not to be displayed
if ( !bAll && (aFontInfo.GetType() == TYPE_RASTER) )
@@ -307,7 +301,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, bool bAll,
(pNewInfo->GetCharSet() == eSystemEncoding) )
{
ImplFontListFontInfo* pTemp2 = pTemp->mpNext;
- *((FontInfo*)pTemp) = *((FontInfo*)pNewInfo);
+ *((vcl::FontInfo*)pTemp) = *((vcl::FontInfo*)pNewInfo);
pTemp->mpNext = pTemp2;
}
delete pNewInfo;
@@ -442,9 +436,7 @@ const OUString& FontList::GetStyleName(FontWeight eWeight, FontItalic eItalic) c
}
}
-
-
-OUString FontList::GetStyleName(const FontInfo& rInfo) const
+OUString FontList::GetStyleName(const vcl::FontInfo& rInfo) const
{
OUString aStyleName = rInfo.GetStyleName();
FontWeight eWeight = rInfo.GetWeight();
@@ -495,9 +487,7 @@ OUString FontList::GetStyleName(const FontInfo& rInfo) const
return aStyleName;
}
-
-
-OUString FontList::GetFontMapText( const FontInfo& rInfo ) const
+OUString FontList::GetFontMapText( const vcl::FontInfo& rInfo ) const
{
if ( rInfo.GetName().isEmpty() )
{
@@ -567,10 +557,10 @@ OUString FontList::GetFontMapText( const FontInfo& rInfo ) const
namespace
{
- FontInfo makeMissing(ImplFontListFontInfo* pFontNameInfo, const OUString &rName,
+ vcl::FontInfo makeMissing(ImplFontListFontInfo* pFontNameInfo, const OUString &rName,
FontWeight eWeight, FontItalic eItalic)
{
- FontInfo aInfo;
+ vcl::FontInfo aInfo;
// if the fontname matches, we copy as much as possible
if (pFontNameInfo)
{
@@ -590,7 +580,7 @@ namespace
}
}
-FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const
+vcl::FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const
{
ImplFontListNameInfo* pData = ImplFindByName( rName );
ImplFontListFontInfo* pFontInfo = NULL;
@@ -613,7 +603,7 @@ FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const
}
// reproduce attributes if data could not be found
- FontInfo aInfo;
+ vcl::FontInfo aInfo;
if ( !pFontInfo )
{
FontWeight eWeight = WEIGHT_DONTKNOW;
@@ -671,9 +661,7 @@ FontInfo FontList::Get(const OUString& rName, const OUString& rStyleName) const
return aInfo;
}
-
-
-FontInfo FontList::Get(const OUString& rName,
+vcl::FontInfo FontList::Get(const OUString& rName,
FontWeight eWeight, FontItalic eItalic) const
{
ImplFontListNameInfo* pData = ImplFindByName( rName );
@@ -697,7 +685,7 @@ FontInfo FontList::Get(const OUString& rName,
}
// reproduce attributes if data could not be found
- FontInfo aInfo;
+ vcl::FontInfo aInfo;
if ( !pFontInfo )
aInfo = makeMissing(pFontNameInfo, rName, eWeight, eItalic);
else
@@ -716,9 +704,7 @@ bool FontList::IsAvailable(const OUString& rName) const
return (ImplFindByName( rName ) != 0);
}
-
-
-const FontInfo& FontList::GetFontName( sal_uInt16 nFont ) const
+const vcl::FontInfo& FontList::GetFontName( sal_uInt16 nFont ) const
{
DBG_ASSERT( nFont < GetFontNameCount(), "FontList::GetFontName(): nFont >= Count" );
@@ -744,17 +730,13 @@ sal_Handle FontList::GetNextFontInfo( sal_Handle hFontInfo ) const
return (sal_Handle)(pInfo->mpNext);
}
-
-
-const FontInfo& FontList::GetFontInfo( sal_Handle hFontInfo ) const
+const vcl::FontInfo& FontList::GetFontInfo( sal_Handle hFontInfo ) const
{
ImplFontListFontInfo* pInfo = (ImplFontListFontInfo*)(void*)hFontInfo;
return *pInfo;
}
-
-
-const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const
+const sal_IntPtr* FontList::GetSizeAry( const vcl::FontInfo& rInfo ) const
{
// first delete Size-Array
if ( mpSizeAry )
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index af3546af00c9..b07e81beae75 100644
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -161,9 +161,7 @@ void FontSizeMenu::Highlight()
mnCurHeight = nTempHeight;
}
-
-
-void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
+void FontSizeMenu::Fill( const vcl::FontInfo& rInfo, const FontList* pList )
{
Clear();