summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-16 10:09:58 +0200
committerNoel Grandin <noel@peralex.com>2014-09-18 08:54:37 +0200
commit60e78fbb806bb45e635ba1de45ceffe187938ac0 (patch)
tree17ff5aaa57f4d23e177f1fe423def1691139a4a8 /toolkit
parent9c818268767d6a1c1bc731ae30c45883bab987e7 (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 'toolkit')
-rw-r--r--toolkit/source/awt/stylesettings.cxx8
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx4
-rw-r--r--toolkit/source/awt/vclxfont.cxx12
-rw-r--r--toolkit/source/awt/vclxgraphics.cxx2
-rw-r--r--toolkit/source/awt/vclxwindow.cxx8
-rw-r--r--toolkit/source/controls/accessiblecontrolcontext.cxx2
-rw-r--r--toolkit/source/helper/formpdfexport.cxx2
-rw-r--r--toolkit/source/helper/vclunohelper.cxx10
8 files changed, 24 insertions, 24 deletions
diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx
index 32bcef11cbfa..81519531e104 100644
--- a/toolkit/source/awt/stylesettings.cxx
+++ b/toolkit/source/awt/stylesettings.cxx
@@ -159,7 +159,7 @@ namespace toolkit
pWindow->SetSettings( aAllSettings );
}
- FontDescriptor lcl_getStyleFont( WindowStyleSettings_Data& i_rData, Font const & (StyleSettings::*i_pGetter)() const )
+ FontDescriptor lcl_getStyleFont( WindowStyleSettings_Data& i_rData, vcl::Font const & (StyleSettings::*i_pGetter)() const )
{
const Window* pWindow = i_rData.pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings();
@@ -167,13 +167,13 @@ namespace toolkit
return VCLUnoHelper::CreateFontDescriptor( (aStyleSettings.*i_pGetter)() );
}
- void lcl_setStyleFont( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( Font const &),
- Font const & (StyleSettings::*i_pGetter)() const, const FontDescriptor& i_rFont )
+ void lcl_setStyleFont( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( vcl::Font const &),
+ vcl::Font const & (StyleSettings::*i_pGetter)() const, const FontDescriptor& i_rFont )
{
Window* pWindow = i_rData.pOwningWindow->GetWindow();
AllSettings aAllSettings = pWindow->GetSettings();
StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
- const Font aNewFont = VCLUnoHelper::CreateFont( i_rFont, (aStyleSettings.*i_pGetter)() );
+ const vcl::Font aNewFont = VCLUnoHelper::CreateFont( i_rFont, (aStyleSettings.*i_pGetter)() );
(aStyleSettings.*i_pSetter)( aNewFont );
aAllSettings.SetStyleSettings( aStyleSettings );
pWindow->SetSettings( aAllSettings );
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index ab92152949f4..85d33dabe800 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -785,7 +785,7 @@ sal_Int32 SAL_CALL VCLXAccessibleComponent::getForeground( ) throw (uno::Runtim
nColor = pWindow->GetControlForeground().GetColor();
else
{
- Font aFont;
+ vcl::Font aFont;
if ( pWindow->IsControlFont() )
aFont = pWindow->GetControlFont();
else
@@ -830,7 +830,7 @@ uno::Reference< awt::XFont > SAL_CALL VCLXAccessibleComponent::getFont( ) throw
uno::Reference< awt::XDevice > xDev( pWindow->GetComponentInterface(), uno::UNO_QUERY );
if ( xDev.is() )
{
- Font aFont;
+ vcl::Font aFont;
if ( pWindow->IsControlFont() )
aFont = pWindow->GetControlFont();
else
diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx
index 139defbc1af4..181633f1c8f4 100644
--- a/toolkit/source/awt/vclxfont.cxx
+++ b/toolkit/source/awt/vclxfont.cxx
@@ -41,7 +41,7 @@ VCLXFont::~VCLXFont()
delete mpFontMetric;
}
-void VCLXFont::Init( ::com::sun::star::awt::XDevice& rxDev, const Font& rFont )
+void VCLXFont::Init( ::com::sun::star::awt::XDevice& rxDev, const vcl::Font& rFont )
{
mxDevice = &rxDev;
@@ -58,7 +58,7 @@ bool VCLXFont::ImplAssertValidFontMetric()
OutputDevice* pOutDev = VCLUnoHelper::GetOutputDevice( mxDevice );
if ( pOutDev )
{
- Font aOldFont = pOutDev->GetFont();
+ vcl::Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( maFont );
mpFontMetric = new FontMetric( pOutDev->GetFontMetric() );
pOutDev->SetFont( aOldFont );
@@ -114,7 +114,7 @@ sal_Int16 VCLXFont::getCharWidth( sal_Unicode c ) throw(::com::sun::star::uno::R
OutputDevice* pOutDev = VCLUnoHelper::GetOutputDevice( mxDevice );
if ( pOutDev )
{
- Font aOldFont = pOutDev->GetFont();
+ vcl::Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( maFont );
nRet = sal::static_int_cast< sal_Int16 >(
@@ -133,7 +133,7 @@ sal_Int16 VCLXFont::getCharWidth( sal_Unicode c ) throw(::com::sun::star::uno::R
OutputDevice* pOutDev = VCLUnoHelper::GetOutputDevice( mxDevice );
if ( pOutDev )
{
- Font aOldFont = pOutDev->GetFont();
+ vcl::Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( maFont );
sal_Int16 nCount = nLast-nFirst + 1;
@@ -158,7 +158,7 @@ sal_Int32 VCLXFont::getStringWidth( const OUString& str ) throw(::com::sun::star
OutputDevice* pOutDev = VCLUnoHelper::GetOutputDevice( mxDevice );
if ( pOutDev )
{
- Font aOldFont = pOutDev->GetFont();
+ vcl::Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( maFont );
nRet = pOutDev->GetTextWidth( str );
pOutDev->SetFont( aOldFont );
@@ -174,7 +174,7 @@ sal_Int32 VCLXFont::getStringWidthArray( const OUString& str, ::com::sun::star::
OutputDevice* pOutDev = VCLUnoHelper::GetOutputDevice( mxDevice );
if ( pOutDev )
{
- Font aOldFont = pOutDev->GetFont();
+ vcl::Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( maFont );
long* pDXA = (long*)alloca(str.getLength() * sizeof(long));
nRet = pOutDev->GetTextArray( str, pDXA );
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 98b4d022e6ab..5dd5ba521fa0 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -203,7 +203,7 @@ void VCLXGraphics::selectFont( const awt::FontDescriptor& rDescription ) throw(u
{
SolarMutexGuard aGuard;
- maFont = VCLUnoHelper::CreateFont( rDescription, Font() );
+ maFont = VCLUnoHelper::CreateFont( rDescription, vcl::Font() );
}
void VCLXGraphics::setTextColor( sal_Int32 nColor ) throw(uno::RuntimeException, std::exception)
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 71bff1b54a44..a527f418f4e7 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1537,7 +1537,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st
case BASEPROPERTY_FONTDESCRIPTOR:
{
if ( bVoid )
- pWindow->SetControlFont( Font() );
+ pWindow->SetControlFont( vcl::Font() );
else
{
::com::sun::star::awt::FontDescriptor aFont;
@@ -1551,7 +1551,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st
sal_Int16 n = sal_Int16();
if ( Value >>= n )
{
- Font aFont = pWindow->GetControlFont();
+ vcl::Font aFont = pWindow->GetControlFont();
aFont.SetRelief( (FontRelief)n );
pWindow->SetControlFont( aFont );
}
@@ -1562,7 +1562,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st
sal_Int16 n = sal_Int16();
if ( Value >>= n )
{
- Font aFont = pWindow->GetControlFont();
+ vcl::Font aFont = pWindow->GetControlFont();
aFont.SetEmphasisMark( n );
pWindow->SetControlFont( aFont );
}
@@ -1998,7 +1998,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st
break;
case BASEPROPERTY_FONTDESCRIPTOR:
{
- Font aFont = GetWindow()->GetControlFont();
+ vcl::Font aFont = GetWindow()->GetControlFont();
::com::sun::star::awt::FontDescriptor aFD = VCLUnoHelper::CreateFontDescriptor( aFont );
aProp <<= aFD;
}
diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx b/toolkit/source/controls/accessiblecontrolcontext.cxx
index 64862a109b74..ac6c9e2dd866 100644
--- a/toolkit/source/controls/accessiblecontrolcontext.cxx
+++ b/toolkit/source/controls/accessiblecontrolcontext.cxx
@@ -334,7 +334,7 @@ namespace toolkit
nColor = pWindow->GetControlForeground().GetColor();
else
{
- Font aFont;
+ vcl::Font aFont;
if ( pWindow->IsControlFont() )
aFont = pWindow->GetControlFont();
else
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index bb7c97fdf570..0d5603540a1a 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -402,7 +402,7 @@ namespace toolkitform
{
FontDescriptor aUNOFont;
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_FONT ) >>= aUNOFont );
- _rpDescriptor->TextFont = VCLUnoHelper::CreateFont( aUNOFont, Font() );
+ _rpDescriptor->TextFont = VCLUnoHelper::CreateFont( aUNOFont, vcl::Font() );
}
// tab order
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index 5fb541d34f26..1b598ca1c98f 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -362,7 +362,7 @@ FontItalic VCLUnoHelper::ConvertFontSlant(css::awt::FontSlant eSlant)
return eRet;
}
-::com::sun::star::awt::FontDescriptor VCLUnoHelper::CreateFontDescriptor( const Font& rFont )
+::com::sun::star::awt::FontDescriptor VCLUnoHelper::CreateFontDescriptor( const vcl::Font& rFont )
{
::com::sun::star::awt::FontDescriptor aFD;
aFD.Name = rFont.GetName();
@@ -384,9 +384,9 @@ FontItalic VCLUnoHelper::ConvertFontSlant(css::awt::FontSlant eSlant)
return aFD;
}
-Font VCLUnoHelper::CreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr, const Font& rInitFont )
+vcl::Font VCLUnoHelper::CreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr, const vcl::Font& rInitFont )
{
- Font aFont( rInitFont );
+ vcl::Font aFont( rInitFont );
if ( !rDescr.Name.isEmpty() )
aFont.SetName( rDescr.Name );
if ( !rDescr.StyleName.isEmpty() )
@@ -418,9 +418,9 @@ Font VCLUnoHelper::CreateFont( const ::com::sun::star::awt::FontDescriptor& rDes
return aFont;
}
-Font VCLUnoHelper::CreateFont( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& rxFont )
+vcl::Font VCLUnoHelper::CreateFont( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& rxFont )
{
- Font aFont;
+ vcl::Font aFont;
VCLXFont* pVCLXFont = VCLXFont::GetImplementation( rxFont );
if ( pVCLXFont )
aFont = pVCLXFont->GetFont();