diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-16 10:09:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-18 08:54:37 +0200 |
commit | 60e78fbb806bb45e635ba1de45ceffe187938ac0 (patch) | |
tree | 17ff5aaa57f4d23e177f1fe423def1691139a4a8 /svx/source/fmcomp | |
parent | 9c818268767d6a1c1bc731ae30c45883bab987e7 (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 'svx/source/fmcomp')
-rw-r--r-- | svx/source/fmcomp/fmgridif.cxx | 18 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 4 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index f519b46cf0e3..d452b5ce9f45 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -78,7 +78,7 @@ using ::com::sun::star::awt::XVclWindowPeer; -::com::sun::star::awt::FontDescriptor ImplCreateFontDescriptor( const Font& rFont ) +::com::sun::star::awt::FontDescriptor ImplCreateFontDescriptor( const vcl::Font& rFont ) { ::com::sun::star::awt::FontDescriptor aFD; aFD.Name = rFont.GetName(); @@ -101,9 +101,9 @@ using ::com::sun::star::awt::XVclWindowPeer; } -Font ImplCreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr ) +vcl::Font ImplCreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr ) { - Font aFont; + vcl::Font aFont; aFont.SetName( rDescr.Name ); aFont.SetStyleName( rDescr.StyleName ); aFont.SetSize( ::Size( rDescr.Width, rDescr.Height ) ); @@ -1880,14 +1880,14 @@ void FmXGridPeer::setProperty( const OUString& PropertyName, const Any& Value) t } else if ( PropertyName == FM_PROP_FONTEMPHASISMARK ) { - Font aGridFont = pGrid->GetControlFont(); + vcl::Font aGridFont = pGrid->GetControlFont(); sal_Int16 nValue = ::comphelper::getINT16(Value); aGridFont.SetEmphasisMark( nValue ); pGrid->SetControlFont( aGridFont ); } else if ( PropertyName == FM_PROP_FONTRELIEF ) { - Font aGridFont = pGrid->GetControlFont(); + vcl::Font aGridFont = pGrid->GetControlFont(); sal_Int16 nValue = ::comphelper::getINT16(Value); aGridFont.SetRelief( (FontRelief)nValue ); pGrid->SetControlFont( aGridFont ); @@ -1923,18 +1923,18 @@ void FmXGridPeer::setProperty( const OUString& PropertyName, const Any& Value) t else if ( PropertyName == FM_PROP_FONT ) { if ( bVoid ) - pGrid->SetControlFont( Font() ); + pGrid->SetControlFont( vcl::Font() ); else { ::com::sun::star::awt::FontDescriptor aFont; if (Value >>= aFont) { - Font aNewVclFont; + vcl::Font aNewVclFont; if (::comphelper::operator!=(aFont, ::comphelper::getDefaultFont())) // ist das der Default aNewVclFont = ImplCreateFont( aFont ); // need to add relief and emphasis (they're stored in a VCL-Font, but not in a FontDescriptor - Font aOldVclFont = pGrid->GetControlFont(); + vcl::Font aOldVclFont = pGrid->GetControlFont(); aNewVclFont.SetRelief( aOldVclFont.GetRelief() ); aNewVclFont.SetEmphasisMark( aOldVclFont.GetEmphasisMark() ); @@ -2061,7 +2061,7 @@ Any FmXGridPeer::getProperty( const OUString& _rPropertyName ) throw( RuntimeExc if ( _rPropertyName == FM_PROP_NAME ) { - Font aFont = pDataWindow->GetControlFont(); + vcl::Font aFont = pDataWindow->GetControlFont(); aProp <<= ImplCreateFontDescriptor( aFont ); } else if ( _rPropertyName == FM_PROP_TEXTCOLOR ) diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 4f3914026820..fdc23002211f 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -745,7 +745,7 @@ void DbCellControl::ImplInitWindow( Window& rParent, const InitWindowFacet _eIni pWindows[i]->SetZoom( rParent.GetZoom() ); const StyleSettings& rStyleSettings = pWindows[i]->GetSettings().GetStyleSettings(); - Font aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetTransparent( isTransparent() ); if ( rParent.IsControlFont() ) @@ -978,7 +978,7 @@ void DbCellControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ) m_pPainter->SetTextColor( _rDev.GetTextColor() ); m_pPainter->SetTextFillColor( _rDev.GetTextColor() ); - Font aFont( _rDev.GetFont() ); + vcl::Font aFont( _rDev.GetFont() ); aFont.SetTransparent( true ); m_pPainter->SetFont( aFont ); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index bbe947224c58..5939b8823094 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -420,7 +420,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls() // Is the font of this edit larger than the field? if (m_aAbsolute.GetTextHeight() > nH) { - Font aApplFont (m_aAbsolute.GetFont()); + vcl::Font aApplFont (m_aAbsolute.GetFont()); const Size pointAbsoluteSize(m_aAbsolute.PixelToLogic( Size( 0, nH - 2 ), MapMode(MAP_POINT) )); aApplFont.SetSize( pointAbsoluteSize ); m_aAbsolute.SetControlFont( aApplFont ); @@ -735,7 +735,7 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) Fraction aZoom = GetZoom(); // not all of these controls need to know the new zoom, but to be sure ... - Font aFont( GetSettings().GetStyleSettings().GetFieldFont() ); + vcl::Font aFont( GetSettings().GetStyleSettings().GetFieldFont() ); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); @@ -1038,7 +1038,7 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat ) { if ( m_bNavigationBar ) { - Font aFont = m_aBar.GetSettings().GetStyleSettings().GetFieldFont(); + vcl::Font aFont = m_aBar.GetSettings().GetStyleSettings().GetFieldFont(); if ( IsControlFont() ) m_aBar.SetControlFont( GetControlFont() ); else |