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 | |
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
470 files changed, 1397 insertions, 1393 deletions
diff --git a/accessibility/inc/accessibility/helper/characterattributeshelper.hxx b/accessibility/inc/accessibility/helper/characterattributeshelper.hxx index b567749f5cdc..22d0604f1355 100644 --- a/accessibility/inc/accessibility/helper/characterattributeshelper.hxx +++ b/accessibility/inc/accessibility/helper/characterattributeshelper.hxx @@ -40,7 +40,7 @@ private: public: - CharacterAttributesHelper( const Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor ); + CharacterAttributesHelper( const vcl::Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor ); ~CharacterAttributesHelper(); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetCharacterAttributes(); diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx index bf2e75fca1eb..bc0ad897f1a1 100644 --- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx +++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx @@ -509,7 +509,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getForeground( ) throw (::com::sun: nColor = pInst->GetControlForeground().GetColor(); else { - Font aFont; + vcl::Font aFont; if ( pInst->IsControlFont() ) aFont = pInst->GetControlFont(); else diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx index b79e753c7d3a..cb9a6bf3b7a8 100644 --- a/accessibility/source/extended/AccessibleGridControlBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlBase.cxx @@ -426,7 +426,7 @@ sal_Int32 SAL_CALL AccessibleGridControlBase::getForeground( ) throw (::com::su nColor = pInst->GetControlForeground().GetColor(); else { - Font aFont; + vcl::Font aFont; if ( pInst->IsControlFont() ) aFont = pInst->GetControlFont(); else diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx index d43f3f2ba8ac..1fc53c747045 100644 --- a/accessibility/source/extended/accessibletabbar.cxx +++ b/accessibility/source/extended/accessibletabbar.cxx @@ -444,7 +444,7 @@ namespace accessibility nColor = m_pTabBar->GetControlForeground().GetColor(); else { - Font aFont; + vcl::Font aFont; if ( m_pTabBar->IsControlFont() ) aFont = m_pTabBar->GetControlFont(); else @@ -488,7 +488,7 @@ namespace accessibility Reference< awt::XDevice > xDev( m_pTabBar->GetComponentInterface(), UNO_QUERY ); if ( xDev.is() ) { - Font aFont; + vcl::Font aFont; if ( m_pTabBar->IsControlFont() ) aFont = m_pTabBar->GetControlFont(); else diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 4a829707b77f..24f0be2652e8 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -997,7 +997,7 @@ Document::retrieveCharacterAttributes( { ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); - Font aFont = m_rEngine.GetFont(); + vcl::Font aFont = m_rEngine.GetFont(); const sal_Int32 AttributeCount = 9; sal_Int32 i = 0; css::uno::Sequence< css::beans::PropertyValue > aAttribs( AttributeCount ); diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx index 9f40168c1b78..df7e241f187b 100644 --- a/accessibility/source/helper/characterattributeshelper.cxx +++ b/accessibility/source/helper/characterattributeshelper.cxx @@ -24,7 +24,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -CharacterAttributesHelper::CharacterAttributesHelper( const Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor ) +CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor ) { m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharBackColor" ), makeAny( (sal_Int32) nBackColor ) ) ); m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharColor" ), makeAny( (sal_Int32) nColor ) ) ); diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index 4c7c7dcc7587..971f3194bbf8 100644 --- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx @@ -242,7 +242,7 @@ Sequence< PropertyValue > VCLXAccessibleMenuItem::getCharacterAttributes( sal_In if ( !implIsValidIndex( nIndex, sText.getLength() ) ) throw IndexOutOfBoundsException(); - Font aFont = Application::GetSettings().GetStyleSettings().GetMenuFont(); + vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetMenuFont(); sal_Int32 nBackColor = getBackground(); sal_Int32 nColor = getForeground(); return CharacterAttributesHelper( aFont, nBackColor, nColor ) diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx index 18786b9fccdb..6ed6ec6e4a58 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx @@ -511,7 +511,7 @@ Sequence< PropertyValue > VCLXAccessibleStatusBarItem::getCharacterAttributes( s if ( m_pStatusBar ) { - Font aFont = m_pStatusBar->GetFont(); + vcl::Font aFont = m_pStatusBar->GetFont(); sal_Int32 nBackColor = getBackground(); sal_Int32 nColor = getForeground(); aValues = CharacterAttributesHelper( aFont, nBackColor, nColor ) diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx index 6a9c23b2ae60..5797ccca10d6 100644 --- a/accessibility/source/standard/vclxaccessibletabpage.cxx +++ b/accessibility/source/standard/vclxaccessibletabpage.cxx @@ -585,7 +585,7 @@ Sequence< PropertyValue > VCLXAccessibleTabPage::getCharacterAttributes( sal_Int if ( m_pTabControl ) { - Font aFont = m_pTabControl->GetFont(); + vcl::Font aFont = m_pTabControl->GetFont(); sal_Int32 nBackColor = getBackground(); sal_Int32 nColor = getForeground(); aValues = CharacterAttributesHelper( aFont, nBackColor, nColor ) diff --git a/accessibility/source/standard/vclxaccessibletextcomponent.cxx b/accessibility/source/standard/vclxaccessibletextcomponent.cxx index 7e3104fa805e..ba92960e4d02 100644 --- a/accessibility/source/standard/vclxaccessibletextcomponent.cxx +++ b/accessibility/source/standard/vclxaccessibletextcomponent.cxx @@ -183,7 +183,7 @@ Sequence< PropertyValue > VCLXAccessibleTextComponent::getCharacterAttributes( s if ( GetWindow() ) { - Font aFont = GetWindow()->GetControlFont(); + vcl::Font aFont = GetWindow()->GetControlFont(); sal_Int32 nBackColor = GetWindow()->GetControlBackground().GetColor(); sal_Int32 nColor = GetWindow()->GetControlForeground().GetColor(); diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index cfa9eb3d79d1..aaec4fba9104 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -502,7 +502,7 @@ sal_Int32 AccessibleDialogControlShape::getForeground( ) throw (RuntimeExceptio nColor = pWindow->GetControlForeground().GetColor(); else { - Font aFont; + vcl::Font aFont; if ( pWindow->IsControlFont() ) aFont = pWindow->GetControlFont(); else @@ -548,7 +548,7 @@ Reference< awt::XFont > AccessibleDialogControlShape::getFont( ) throw (Runtime Reference< awt::XDevice > xDev( pWindow->GetComponentInterface(), UNO_QUERY ); if ( xDev.is() ) { - Font aFont; + vcl::Font aFont; if ( pWindow->IsControlFont() ) aFont = pWindow->GetControlFont(); else diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index 7a21338da7ca..527da88e2dde 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -832,7 +832,7 @@ sal_Int32 AccessibleDialogWindow::getForeground( ) throw (RuntimeException, std nColor = m_pDialogWindow->GetControlForeground().GetColor(); else { - Font aFont; + vcl::Font aFont; if ( m_pDialogWindow->IsControlFont() ) aFont = m_pDialogWindow->GetControlFont(); else @@ -876,7 +876,7 @@ Reference< awt::XFont > AccessibleDialogWindow::getFont( ) throw (RuntimeExcept Reference< awt::XDevice > xDev( m_pDialogWindow->GetComponentInterface(), UNO_QUERY ); if ( xDev.is() ) { - Font aFont; + vcl::Font aFont; if ( m_pDialogWindow->IsControlFont() ) aFont = m_pDialogWindow->GetControlFont(); else diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 75c78d75bb75..57cf39d6c1f2 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -104,12 +104,12 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, const Color aOldLineColor( pPrinter->GetLineColor() ); const Color aOldFillColor( pPrinter->GetFillColor() ); - const Font aOldFont( pPrinter->GetFont() ); + const vcl::Font aOldFont( pPrinter->GetFont() ); pPrinter->SetLineColor( Color( COL_BLACK ) ); pPrinter->SetFillColor(); - Font aFont( aOldFont ); + vcl::Font aFont( aOldFont ); aFont.SetWeight( WEIGHT_BOLD ); aFont.SetAlign( ALIGN_BOTTOM ); pPrinter->SetFont( aFont ); @@ -839,9 +839,9 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) AssertValidEditEngine(); MapMode eOldMapMode( pPrinter->GetMapMode() ); - Font aOldFont( pPrinter->GetFont() ); + vcl::Font aOldFont( pPrinter->GetFont() ); - Font aFont( GetEditEngine()->GetFont() ); + vcl::Font aFont( GetEditEngine()->GetFont() ); aFont.SetAlign( ALIGN_BOTTOM ); aFont.SetTransparent( true ); aFont.SetSize( Size( 0, 360 ) ); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 71189892deff..d3e2bb48ab96 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1052,7 +1052,7 @@ void EditorWindow::DataChanged(DataChangedEvent const & rDCEvt) if (!pOldSettings || aColor != pOldSettings-> GetStyleSettings().GetFieldTextColor()) { - Font aFont(pEditEngine->GetFont()); + vcl::Font aFont(pEditEngine->GetFont()); aFont.SetColor(aColor); pEditEngine->SetFont(aFont); } @@ -1220,11 +1220,11 @@ void EditorWindow::ImplSetFont() get_value_or( OUString() ) ); if ( sFontName.isEmpty() ) { - Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) ); + vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) ); sFontName = aTmpFont.GetName(); } Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get()); - Font aFont( sFontName, aFontSize ); + vcl::Font aFont( sFontName, aFontSize ); aFont.SetColor( GetSettings().GetStyleSettings().GetFieldTextColor() ); SetPointFont( aFont ); aFont = GetFont(); diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index c893386868a3..c9973c4ba175 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1371,7 +1371,7 @@ void DialogWindow::InitSettings(bool bFont, bool bForeground, bool bBackground) const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); SetPointFont( aFont ); } diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx index 59657216f7c0..02fb50f5c373 100644 --- a/basctl/source/basicide/layout.cxx +++ b/basctl/source/basicide/layout.cxx @@ -44,7 +44,7 @@ Layout::Layout (Window* pParent) : { SetBackground(GetSettings().GetStyleSettings().GetWindowColor()); - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); Size aSz = aFont.GetSize(); aSz.Height() *= 1.5; aFont.SetSize(aSz); @@ -145,7 +145,7 @@ void Layout::DataChanged (DataChangedEvent const& rDCEvt) aColor = GetSettings().GetStyleSettings().GetWindowTextColor(); if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetWindowTextColor()) { - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); aFont.SetColor(aColor); SetFont(aFont); bInvalidate = true; diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index b43f798739f9..bd1edb03633d 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -1125,7 +1125,7 @@ void lcl_PrintHeader( Printer* pPrinter, const OUString& rTitle ) // not working pPrinter->SetLineColor( COL_BLACK ); pPrinter->SetFillColor(); - Font aFont( pPrinter->GetFont() ); + vcl::Font aFont( pPrinter->GetFont() ); aFont.SetWeight( WEIGHT_BOLD ); aFont.SetAlign( ALIGN_BOTTOM ); pPrinter->SetFont( aFont ); @@ -1170,11 +1170,11 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not wor { { MapMode aOldMap( pPrinter->GetMapMode()); - Font aOldFont( pPrinter->GetFont() ); + vcl::Font aOldFont( pPrinter->GetFont() ); MapMode aMap( MAP_100TH_MM ); pPrinter->SetMapMode( aMap ); - Font aFont; + vcl::Font aFont; aFont.SetAlign( ALIGN_BOTTOM ); aFont.SetSize( Size( 0, 360 )); pPrinter->SetFont( aFont ); diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx index a939b2cb07d7..b8e26962de97 100644 --- a/basic/source/runtime/inputbox.cxx +++ b/basic/source/runtime/inputbox.cxx @@ -67,7 +67,7 @@ SvRTLInputBox::SvRTLInputBox( Window* pParent, const OUString& rPrompt, aEdit.Show(); aPromptText.Show(); SetText( rTitle ); - Font aFont( GetFont()); + vcl::Font aFont( GetFont()); Color aColor( GetBackground().GetColor() ); aFont.SetFillColor( aColor ); aEdit.SetFont( aFont ); diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx index fd488c82e27f..62bf3e2a3a46 100644 --- a/canvas/source/cairo/cairo_canvasfont.cxx +++ b/canvas/source/cairo/cairo_canvasfont.cxx @@ -41,7 +41,7 @@ namespace cairocanvas const geometry::Matrix2D& rFontMatrix, const SurfaceProviderRef& rDevice ) : CanvasFont_Base( m_aMutex ), - maFont( Font( rFontRequest.FontDescription.FamilyName, + maFont( vcl::Font( rFontRequest.FontDescription.FamilyName, rFontRequest.FontDescription.StyleName, Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ), maFontRequest( rFontRequest ), @@ -157,7 +157,7 @@ namespace cairocanvas return aRet; } - ::Font CanvasFont::getVCLFont() const + vcl::Font CanvasFont::getVCLFont() const { return *maFont; } diff --git a/canvas/source/cairo/cairo_canvasfont.hxx b/canvas/source/cairo/cairo_canvasfont.hxx index 420e11bf7d4b..677b6c43aab2 100644 --- a/canvas/source/cairo/cairo_canvasfont.hxx +++ b/canvas/source/cairo/cairo_canvasfont.hxx @@ -71,10 +71,10 @@ namespace cairocanvas virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; - ::Font getVCLFont() const; + vcl::Font getVCLFont() const; private: - ::canvas::vcltools::VCLObject<Font> maFont; + ::canvas::vcltools::VCLObject<vcl::Font> maFont; ::com::sun::star::rendering::FontRequest maFontRequest; SurfaceProviderRef mpRefDevice; }; diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx index f95d71a48485..4e489f435221 100644 --- a/canvas/source/cairo/cairo_canvashelper_text.cxx +++ b/canvas/source/cairo/cairo_canvashelper_text.cxx @@ -61,7 +61,7 @@ namespace cairocanvas static bool setupFontTransform( ::OutputDevice& rOutDev, ::Point& o_rPoint, - ::Font& io_rVCLFont, + vcl::Font& io_rVCLFont, const rendering::ViewState& rViewState, const rendering::RenderState& rRenderState ) { @@ -247,7 +247,7 @@ namespace cairocanvas { setupOutDevState( rOutDev, pOwner, viewState, renderState, TEXT_COLOR ); - ::Font aVCLFont; + vcl::Font aVCLFont; CanvasFont* pFont = dynamic_cast< CanvasFont* >( xFont.get() ); diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index f01e75a8e892..f2b5ddd700e2 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -510,7 +510,7 @@ namespace cairocanvas // Font rotation and scaling cairo_matrix_t m; - Font aFont = rOutDev.GetFont(); + vcl::Font aFont = rOutDev.GetFont(); cairo_matrix_init_identity(&m); diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index a7409ba5ba16..23f5ab6cd6fc 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -111,7 +111,7 @@ namespace dxcanvas // create the font const ::com::sun::star::rendering::FontRequest& rFontRequest = rCanvasFont->getFontRequest(); - Font aFont( + vcl::Font aFont( rFontRequest.FontDescription.FamilyName, rFontRequest.FontDescription.StyleName, Size( 0, ::basegfx::fround(rFontRequest.CellSize))); diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx index 29c8ca6366bd..8c4969b75cbe 100644 --- a/canvas/source/opengl/ogl_canvashelper.cxx +++ b/canvas/source/opengl/ogl_canvashelper.cxx @@ -735,7 +735,7 @@ namespace oglcanvas // create the font const rendering::FontRequest& rFontRequest = pFont->getFontRequest(); const geometry::Matrix2D& rFontMatrix = pFont->getFontMatrix(); - ::Font aFont( + vcl::Font aFont( rFontRequest.FontDescription.FamilyName, rFontRequest.FontDescription.StyleName, Size( 0, ::basegfx::fround(rFontRequest.CellSize))); diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index 98fe92d2a3fb..a7e6f48b9306 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -42,7 +42,7 @@ namespace vclcanvas rendering::XGraphicDevice& rDevice, const OutDevProviderSharedPtr& rOutDevProvider ) : CanvasFont_Base( m_aMutex ), - maFont( Font( rFontRequest.FontDescription.FamilyName, + maFont( vcl::Font( rFontRequest.FontDescription.FamilyName, rFontRequest.FontDescription.StyleName, Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ), maFontRequest( rFontRequest ), @@ -169,7 +169,7 @@ namespace vclcanvas return aRet; } - ::Font CanvasFont::getVCLFont() const + vcl::Font CanvasFont::getVCLFont() const { return *maFont; } diff --git a/canvas/source/vcl/canvasfont.hxx b/canvas/source/vcl/canvasfont.hxx index 6285e93efe28..30cc464bb800 100644 --- a/canvas/source/vcl/canvasfont.hxx +++ b/canvas/source/vcl/canvasfont.hxx @@ -74,10 +74,10 @@ namespace vclcanvas virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; - ::Font getVCLFont() const; + vcl::Font getVCLFont() const; private: - ::canvas::vcltools::VCLObject<Font> maFont; + ::canvas::vcltools::VCLObject<vcl::Font> maFont; ::com::sun::star::rendering::FontRequest maFontRequest; ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice> mpRefDevice; OutDevProviderSharedPtr mpOutDevProvider; diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index eff50dc7df87..d14ec6bed060 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -1369,7 +1369,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); - ::Font aVCLFont; + vcl::Font aVCLFont; CanvasFont* pFont = dynamic_cast< CanvasFont* >( xFont.get() ); diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx index 4a5091dcfbd6..673407ba7294 100644 --- a/canvas/source/vcl/impltools.cxx +++ b/canvas/source/vcl/impltools.cxx @@ -100,7 +100,7 @@ namespace vclcanvas } bool setupFontTransform( ::Point& o_rPoint, - ::Font& io_rVCLFont, + vcl::Font& io_rVCLFont, const rendering::ViewState& rViewState, const rendering::RenderState& rRenderState, ::OutputDevice& rOutDev ) diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx index 8f80939a2294..3b7eac05b3c6 100644 --- a/canvas/source/vcl/impltools.hxx +++ b/canvas/source/vcl/impltools.hxx @@ -85,11 +85,11 @@ namespace vclcanvas @returns false, if no text output should happen */ - bool setupFontTransform( ::Point& o_rPoint, - ::Font& io_rVCLFont, + bool setupFontTransform( ::Point& o_rPoint, + vcl::Font& io_rVCLFont, const ::com::sun::star::rendering::ViewState& viewState, const ::com::sun::star::rendering::RenderState& renderState, - ::OutputDevice& rOutDev ); + ::OutputDevice& rOutDev ); /** Predicate, to determine whether polygon is actually an axis-aligned rectangle diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx index e2ded77f3f76..58dfa55d3bb3 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -161,7 +161,7 @@ namespace vclcanvas const OUString& rStr, const Point& rPos ) { - Font aVCLFont; + vcl::Font aVCLFont; aVCLFont.SetHeight( 20 ); aVCLFont.SetColor( Color( INFO_COLOR ) ); diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx index fc6e54a798f5..0bda848d1f57 100644 --- a/canvas/source/vcl/spritehelper.cxx +++ b/canvas/source/vcl/spritehelper.cxx @@ -319,7 +319,7 @@ namespace vclcanvas } // paint sprite prio - Font aVCLFont; + vcl::Font aVCLFont; aVCLFont.SetHeight( std::min(long(20),aOutputSize.Height()) ); aVCLFont.SetColor( COL_RED ); diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index f8c93b4b998d..a92298b229ba 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -247,7 +247,7 @@ DataSourceTabPage::DataSourceTabPage( // set symbol font for arrows // note: StarSymbol is substituted to OpenSymbol for OOo - Font aSymbolFont( m_pBTN_UP->GetFont()); + vcl::Font aSymbolFont( m_pBTN_UP->GetFont()); aSymbolFont.SetName( "StarSymbol" ); m_pBTN_UP->SetControlFont( aSymbolFont ); m_pBTN_DOWN->SetControlFont( aSymbolFont ); diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index e5effb88d3fb..0cb9648ae90b 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -166,7 +166,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter() //set fixed current font aSet.Put( SfxBoolItem( FN_PARAM_2, true ) ); //maybe not necessary in future - Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont(); + vcl::Font aCurFont = m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont(); aSet.Put( SvxFontItem( aCurFont.GetFamily(), aCurFont.GetName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), SID_ATTR_CHAR_FONT ) ); boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( m_pChartWindow, aSet, getFrame(), RID_SVXDLG_CHARMAP )); diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx index 75f3171c54c6..ac4add4061f3 100644 --- a/chart2/source/tools/CharacterProperties.cxx +++ b/chart2/source/tools/CharacterProperties.cxx @@ -407,11 +407,11 @@ void CharacterProperties::AddDefaultsToMap( using namespace ::com::sun::star::i18n::ScriptType; LanguageType nLang; nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale, false), LATIN); - Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 ); + vcl::Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 ); nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale_CJK, false), ASIAN); - Font aFontCJK = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 ); + vcl::Font aFontCJK = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 ); nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale_CTL, false), COMPLEX); - Font aFontCTL = OutputDevice::GetDefaultFont( DEFAULTFONT_CTL_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 ); + vcl::Font aFontCTL = OutputDevice::GetDefaultFont( DEFAULTFONT_CTL_SPREADSHEET, nLang, DEFAULTFONT_FLAGS_ONLYONE, 0 ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_NAME, OUString( aFont.GetName() ) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, OUString(aFont.GetStyleName()) ); diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx index f4acef76729f..c0992e472aae 100644 --- a/chart2/source/view/main/3DChartObjects.cxx +++ b/chart2/source/view/main/3DChartObjects.cxx @@ -77,7 +77,7 @@ const TextCacheItem& TextCache::getText(OUString const & rText) return *itr->second; VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0); - Font aFont = aDevice.GetFont(); + vcl::Font aFont = aDevice.GetFont(); aFont.SetSize(Size(0, 96)); static bool bOldRender = getenv("OLDRENDER"); if (bOldRender) diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 13a3731b281f..9c4ec1140a23 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -767,7 +767,7 @@ namespace { struct FontAttribSetter { - FontAttribSetter(Font& rFont): + FontAttribSetter(vcl::Font& rFont): mrFont(rFont) {} void operator()(const std::pair<OUString, uno::Any>& rProp) @@ -807,7 +807,7 @@ struct FontAttribSetter } } private: - Font& mrFont; + vcl::Font& mrFont; }; } @@ -836,7 +836,7 @@ DummyText::DummyText(const OUString& rText, const tNameSequence& rNames, } else { - Font aFont; + vcl::Font aFont; std::for_each(maProperties.begin(), maProperties.end(), FontAttribSetter(aFont)); VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0); aDevice.Erase(); diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 428b300c1d0e..e8ac3acecc8c 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -633,7 +633,7 @@ int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill) return 0; } -int OpenGLRender::CreateTextTexture(::rtl::OUString const &textValue, Font aFont, long , awt::Point aPos, awt::Size aSize, long rotation) +int OpenGLRender::CreateTextTexture(::rtl::OUString const &textValue, vcl::Font aFont, long , awt::Point aPos, awt::Size aSize, long rotation) { VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0); aDevice.Erase(); diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx index f2482f0aabf4..26f81c2b5922 100644 --- a/chart2/source/view/main/OpenGLRender.hxx +++ b/chart2/source/view/main/OpenGLRender.hxx @@ -95,7 +95,7 @@ public: int CreateTextTexture(const BitmapEx& rBitmapEx, const css::awt::Point& aPos, const css::awt::Size& aSize, long rotation, const css::drawing::HomogenMatrix3& rTrans); - int CreateTextTexture(::rtl::OUString const &textValue, Font aFont, long fontColor, css::awt::Point aPos, css::awt::Size aSize, long rotation); + int CreateTextTexture(::rtl::OUString const &textValue, vcl::Font aFont, long fontColor, css::awt::Point aPos, css::awt::Size aSize, long rotation); int RenderTextShape(); int SetArea2DShapePoint(float x, float y, int listLength); diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx index deb37655e59a..fe3d639e732e 100644 --- a/cppcanvas/source/inc/implrenderer.hxx +++ b/cppcanvas/source/inc/implrenderer.hxx @@ -37,7 +37,7 @@ class GDIMetaFile; class VirtualDevice; class Gradient; class Rectangle; -class Font; +namespace vcl { class Font; } class PolyPolygon; class Point; class MetaCommentAction; @@ -242,7 +242,7 @@ static float GetSwapFloat( SvStream& rSt ) ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvasFont > createFont( double& o_rFontRotation, - const ::Font& rFont, + const ::vcl::Font& rFont, const ActionFactoryParameters& rParms ) const; bool createActions( GDIMetaFile& rMtf, const ActionFactoryParameters& rParms, diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 837609a7d1a4..a111fab8983e 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -753,7 +753,7 @@ namespace cppcanvas } uno::Reference< rendering::XCanvasFont > ImplRenderer::createFont( double& o_rFontRotation, - const ::Font& rFont, + const vcl::Font& rFont, const ActionFactoryParameters& rParms ) const { rendering::FontRequest aFontRequest; @@ -824,7 +824,7 @@ namespace cppcanvas const sal_Int32 nFontWidthLog = rFontSizeLog.Width(); if( nFontWidthLog != 0 ) { - ::Font aTestFont = rFont; + vcl::Font aTestFont = rFont; aTestFont.SetWidth( 0 ); sal_Int32 nNormalWidth = rParms.mrVDev.GetFontMetric( aTestFont ).GetWidth(); if( nNormalWidth != nFontWidthLog ) @@ -1488,7 +1488,7 @@ namespace cppcanvas case META_FONT_ACTION: { ::cppcanvas::internal::OutDevState& rState = rStates.getState(); - const ::Font& rFont( static_cast<MetaFontAction*>(pCurrAct)->GetFont() ); + const vcl::Font& rFont( static_cast<MetaFontAction*>(pCurrAct)->GetFont() ); rState.xFont = createFont( rState.fontRotation, rFont, @@ -2985,7 +2985,7 @@ namespace cppcanvas ::cppcanvas::internal::OutDevState& rState = aStateStack.getState(); rState.xFont = createFont( rState.fontRotation, - ::Font(), // default font + ::vcl::Font(), // default font aParms ); } diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index ca2ff167c1a3..fd4660709aee 100644 --- a/cppcanvas/source/mtfrenderer/textaction.cxx +++ b/cppcanvas/source/mtfrenderer/textaction.cxx @@ -1954,8 +1954,8 @@ namespace cppcanvas // (which is already contained in the render state // transformation matrix - otherwise, glyph polygons // will be rotated twice) - const ::Font aOrigFont( rVDev.GetFont() ); - ::Font aUnrotatedFont( aOrigFont ); + const vcl::Font aOrigFont( rVDev.GetFont() ); + vcl::Font aUnrotatedFont( aOrigFont ); aUnrotatedFont.SetOrientation(0); rVDev.SetFont( aUnrotatedFont ); diff --git a/cui/source/dialogs/SpellAttrib.cxx b/cui/source/dialogs/SpellAttrib.cxx index be09cce60c51..d8a0f731988b 100644 --- a/cui/source/dialogs/SpellAttrib.cxx +++ b/cui/source/dialogs/SpellAttrib.cxx @@ -47,7 +47,7 @@ SpellErrorAttrib::~SpellErrorAttrib() } -void SpellErrorAttrib::SetFont( Font& ) const +void SpellErrorAttrib::SetFont( vcl::Font& ) const { //this attribute doesn't have a visual effect } @@ -85,7 +85,7 @@ SpellLanguageAttrib::~SpellLanguageAttrib() } -void SpellLanguageAttrib::SetFont( Font& ) const +void SpellLanguageAttrib::SetFont( vcl::Font& ) const { //no visual effect } @@ -123,7 +123,7 @@ SpellBackgroundAttrib::~SpellBackgroundAttrib() } -void SpellBackgroundAttrib::SetFont( Font& rFont ) const +void SpellBackgroundAttrib::SetFont( vcl::Font& rFont ) const { rFont.SetFillColor(m_aBackgroundColor); } diff --git a/cui/source/dialogs/SpellAttrib.hxx b/cui/source/dialogs/SpellAttrib.hxx index f0a53f38b0b6..d50b851805e4 100644 --- a/cui/source/dialogs/SpellAttrib.hxx +++ b/cui/source/dialogs/SpellAttrib.hxx @@ -112,7 +112,7 @@ public: const SpellErrorDescription& GetErrorDescription() const { return m_aSpellErrorDescription; } - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; }; @@ -135,7 +135,7 @@ public: {m_eLanguage = eLang;} - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; }; @@ -157,7 +157,7 @@ public: void SetColor( const Color& rNewCol ){m_aBackgroundColor = rNewCol;} - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; }; diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index 06a99138bb10..8236ebacc06a 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -144,8 +144,8 @@ void AboutDialog::StyleControls() m_pDescriptionText->SetPaintTransparent(true); m_pCopyrightText->SetPaintTransparent(true); - Font aLabelFont = GetSettings().GetStyleSettings().GetLabelFont(); - Font aLargeFont = aLabelFont; + vcl::Font aLabelFont = GetSettings().GetStyleSettings().GetLabelFont(); + vcl::Font aLargeFont = aLabelFont; aLargeFont.SetSize( Size( 0, aLabelFont.GetSize().Height() * 3 ) ); // Logo Replacement Text diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index df37c79c11af..81ad04832245 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -88,14 +88,14 @@ SvxCharacterMap::SvxCharacterMap( Window* pParent, bool bOne_, const SfxItemSet* SFX_ITEMSET_ARG( pSet, pFontNameItem, SfxStringItem, SID_FONT_NAME, false ); if ( pFontItem ) { - Font aTmpFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), GetCharFont().GetSize() ); + vcl::Font aTmpFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), GetCharFont().GetSize() ); aTmpFont.SetCharSet( pFontItem->GetCharSet() ); aTmpFont.SetPitch( pFontItem->GetPitch() ); SetCharFont( aTmpFont ); } else if ( pFontNameItem ) { - Font aTmpFont( GetCharFont() ); + vcl::Font aTmpFont( GetCharFont() ); aTmpFont.SetName( pFontNameItem->GetValue() ); SetCharFont( aTmpFont ); } @@ -151,7 +151,7 @@ short SvxCharacterMap::Execute() if ( pSet ) { const SfxItemPool* pPool = pSet->GetPool(); - const Font& rFont( GetCharFont() ); + const vcl::Font& rFont( GetCharFont() ); pSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), GetCharacters() ) ); pSet->Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), pPool->GetWhich(SID_ATTR_CHAR_FONT) ) ); @@ -195,7 +195,7 @@ void SvxShowText::Paint( const Rectangle& ) bool bGotBoundary = true; bool bShrankFont = false; - Font aOrigFont(GetFont()); + vcl::Font aOrigFont(GetFont()); Size aFontSize(aOrigFont.GetSize()); Rectangle aBoundRect; @@ -212,7 +212,7 @@ void SvxShowText::Paint( const Rectangle& ) long nTextWidth = aBoundRect.GetWidth(); if (nAvailWidth > nTextWidth) break; - Font aFont(aOrigFont); + vcl::Font aFont(aOrigFont); aFontSize.Height() = nFontHeight; aFont.SetSize(aFontSize); Control::SetFont(aFont); @@ -263,10 +263,10 @@ void SvxShowText::Paint( const Rectangle& ) -void SvxShowText::SetFont( const Font& rFont ) +void SvxShowText::SetFont( const vcl::Font& rFont ) { long nWinHeight = GetOutputSizePixel().Height(); - Font aFont = rFont; + vcl::Font aFont = rFont; aFont.SetWeight( WEIGHT_NORMAL ); aFont.SetAlign( ALIGN_TOP ); aFont.SetSize( PixelToLogic( Size( 0, nWinHeight/2 ) ) ); @@ -279,7 +279,7 @@ void SvxShowText::SetFont( const Font& rFont ) Size SvxShowText::GetOptimalSize() const { - const Font &rFont = GetFont(); + const vcl::Font &rFont = GetFont(); const Size rFontSize = rFont.GetSize(); long nWinHeight = LogicToPixel(rFontSize).Height() * 2; return Size( GetTextWidth( GetText() ) + 2 * 12, nWinHeight ); @@ -379,11 +379,11 @@ void SvxCharacterMap::init() -void SvxCharacterMap::SetCharFont( const Font& rFont ) +void SvxCharacterMap::SetCharFont( const vcl::Font& rFont ) { // first get the underlying info in order to get font names // like "Times New Roman;Times" resolved - Font aTmp( GetFontMetric( rFont ) ); + vcl::Font aTmp( GetFontMetric( rFont ) ); if ( m_pFontLB->GetEntryPos( aTmp.GetName() ) == LISTBOX_ENTRY_NOTFOUND ) return; diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 99a5b1f7b75b..791bb7d340de 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -61,7 +61,7 @@ namespace svx OutputDevice& m_rDev; public: - inline FontSwitch( OutputDevice& _rDev, const Font& _rTemporaryFont ) + inline FontSwitch( OutputDevice& _rDev, const vcl::Font& _rTemporaryFont ) :m_rDev( _rDev ) { m_rDev.Push( PUSH_FONT ); @@ -127,7 +127,7 @@ namespace svx Size aPlaygroundSize( _rRect.GetSize() ); // the font for the secondary text: - Font aSmallerFont( _rDevice.GetFont() ); + vcl::Font aSmallerFont( _rDevice.GetFont() ); // heuristic: 80% of the original size aSmallerFont.SetHeight( (long)( 0.8 * aSmallerFont.GetHeight() ) ); @@ -304,7 +304,7 @@ namespace svx Size RubyRadioButton::GetOptimalSize() const { - Font aSmallerFont( GetFont() ); + vcl::Font aSmallerFont( GetFont() ); aSmallerFont.SetHeight( static_cast<long>( 0.8 * aSmallerFont.GetHeight() ) ); Rectangle rect( Point(), Size( SAL_MAX_INT32, SAL_MAX_INT32 ) ); sal_uInt16 style = GetStyle(); diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 2566f9b66e8b..bf2d6a33f3bd 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -57,7 +57,7 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet, m_pAuthorBtn->SetClickHdl( LINK( this, SvxPostItDialog, Stamp ) ); m_pOKBtn->SetClickHdl( LINK( this, SvxPostItDialog, OKHdl ) ); - Font aFont( m_pEditED->GetFont() ); + vcl::Font aFont( m_pEditED->GetFont() ); aFont.SetWeight( WEIGHT_LIGHT ); m_pEditED->SetFont( aFont ); diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index d9d6ec7682aa..abd225bb3f7b 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -145,10 +145,10 @@ void AlternativesString::Paint( { AlternativesExtraData* pData = m_rControlImpl.GetExtraData( pEntry ); Point aPos( rPos ); - Font aOldFont( rDev.GetFont()); + vcl::Font aOldFont( rDev.GetFont()); if (pData && pData->IsHeader()) { - Font aFont( aOldFont ); + vcl::Font aFont( aOldFont ); aFont.SetWeight( WEIGHT_BOLD ); rDev.SetFont( aFont ); aPos.X() = 0; diff --git a/cui/source/factory/init.cxx b/cui/source/factory/init.cxx index 80d25ee33022..cff22986fc77 100644 --- a/cui/source/factory/init.cxx +++ b/cui/source/factory/init.cxx @@ -25,7 +25,7 @@ // caution: needs C-Linkage since dynamically loaded via symbol name extern "C" { -SAL_DLLPUBLIC_EXPORT bool GetSpecialCharsForEdit(Window* i_pParent, const Font& i_rFont, OUString& o_rResult) +SAL_DLLPUBLIC_EXPORT bool GetSpecialCharsForEdit(Window* i_pParent, const vcl::Font& i_rFont, OUString& o_rResult) { bool bRet = false; boost::scoped_ptr<SvxCharacterMap> aDlg(new SvxCharacterMap( i_pParent )); diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx index eb3ea5b9cc95..5d70cc9d9fea 100644 --- a/cui/source/inc/autocdlg.hxx +++ b/cui/source/inc/autocdlg.hxx @@ -154,9 +154,9 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage OUString sBulletChar; OUString sByInputBulletChar; - Font aBulletFont; - Font aByInputBulletFont; - sal_uInt16 nPercent; + vcl::Font aBulletFont; + vcl::Font aByInputBulletFont; + sal_uInt16 nPercent; SvLBoxButtonData* pCheckButtonData; diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index 8af1b917362e..0c982672ce74 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -43,7 +43,7 @@ public: bool bCenter = false ); virtual ~SvxShowText(); - void SetFont( const Font& rFont ); + void SetFont( const vcl::Font& rFont ); void SetText( const OUString& rText ) SAL_OVERRIDE; void SetCentered(bool bCenter) { mbCenter = bCenter; } @@ -80,8 +80,8 @@ private: FixedText* m_pSymbolText; SvxShowText* m_pShowChar; FixedText* m_pCharCodeText; - Font aFont; - bool bOne; + vcl::Font aFont; + bool bOne; const SubsetMap* pSubsetMap; DECL_LINK(OKHdl, void *); @@ -102,8 +102,8 @@ public: void DisableFontSelection(); - const Font& GetCharFont() const { return aFont;} - void SetCharFont( const Font& rFont ); + const vcl::Font& GetCharFont() const { return aFont;} + void SetCharFont( const vcl::Font& rFont ); void SetChar( sal_UCS4 ); sal_UCS4 GetChar() const; diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index 6c56ed05b3ce..5ead54c2c0bc 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -41,7 +41,7 @@ class SvxBrushItem; class SvxNumberingPreview : public Window { const SvxNumRule* pActNum; - Font aStdFont; + vcl::Font aStdFont; long nPageWidth; const OUString* pOutlineNames; bool bPosition; @@ -308,7 +308,7 @@ class SvxNumOptionsTabPage : public SfxTabPage bool bMenuButtonInitialized : 1; std::vector<OUString> aGrfNames; - Font aActBulletFont; + vcl::Font aActBulletFont; sal_uInt8 nBullet; sal_uInt16 nActNumLvl; diff --git a/cui/source/options/optHeaderTabListbox.cxx b/cui/source/options/optHeaderTabListbox.cxx index d9c355e62802..67de02cc84bc 100644 --- a/cui/source/options/optHeaderTabListbox.cxx +++ b/cui/source/options/optHeaderTabListbox.cxx @@ -43,8 +43,8 @@ public: void OptLBoxString_Impl::Paint( const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry) { - Font aOldFont( rDev.GetFont() ); - Font aFont( aOldFont ); + vcl::Font aOldFont( rDev.GetFont() ); + vcl::Font aFont( aOldFont ); //detect readonly state by asking for a valid Image if(pEntry && !(!((OptHeaderTabListBox&)rDev).GetCollapsedEntryBmp(pEntry))) aFont.SetColor( Application::GetSettings().GetStyleSettings().GetDeactiveTextColor() ); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 469b1f955a0d..bd6edfd16cc3 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -281,10 +281,10 @@ void BrwStringDic_Impl::Paint( { ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); Point aPos(rPos); - Font aOldFont( rDev.GetFont()); + vcl::Font aOldFont( rDev.GetFont()); if(pData->IsParent()) { - Font aFont( aOldFont ); + vcl::Font aFont( aOldFont ); aFont.SetWeight( WEIGHT_BOLD ); rDev.SetFont( aFont ); aPos.X() = 0; @@ -455,8 +455,8 @@ void BrwString_Impl::Paint( { Point aNewPos(aPos); aNewPos.X() += rDev.GetTextWidth(GetText()); - Font aOldFont( rDev.GetFont()); - Font aFont( aOldFont ); + vcl::Font aOldFont( rDev.GetFont()); + vcl::Font aFont( aOldFont ); aFont.SetWeight( WEIGHT_BOLD ); //??? convert the lower byte from the user date into a string diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 29ed3c2e3e82..498a677b341a 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -268,9 +268,9 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet* ) struct ImpUserData { OUString *pString; - Font *pFont; + vcl::Font *pFont; - ImpUserData(OUString* pText, Font* pFnt) + ImpUserData(OUString* pText, vcl::Font* pFnt) { pString = pText; pFont = pFnt;} }; @@ -324,8 +324,8 @@ void OfaImpBrwString::Paint( ImpUserData* pUserData = (ImpUserData* )pEntry->GetUserData(); Point aNewPos(rPos); aNewPos.X() += rDev.GetTextWidth(GetText()); - Font aOldFont( rDev.GetFont()); - Font aFont( aOldFont ); + vcl::Font aOldFont( rDev.GetFont()); + vcl::Font aFont( aOldFont ); if(pUserData->pFont) { aFont = *pUserData->pFont; @@ -701,7 +701,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl) pMapDlg->SetChar( (*pUserData->pString)[0] ); if(RET_OK == pMapDlg->Execute()) { - Font aFont(pMapDlg->GetCharFont()); + vcl::Font aFont(pMapDlg->GetCharFont()); *pUserData->pFont = aFont; sal_UCS4 aChar = pMapDlg->GetChar(); // using the UCS4 constructor diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index ebf1a03f6f6d..6937e0c5cd16 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -81,7 +81,7 @@ SvxNumberPreview::SvxNumberPreview(Window* pParent, WinBits nStyle) , mnPos(-1) , mnChar(0x0) { - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetTransparent( true ); aFont.SetColor( Application::GetSettings().GetStyleSettings().GetFieldColor() ); SetFont( aFont ); @@ -149,10 +149,10 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr, void SvxNumberPreview::Paint( const Rectangle& ) { - Font aDrawFont = GetFont(); - Size aSzWnd = GetOutputSizePixel(); - OUString aTmpStr( aPrevStr ); - long nLeadSpace = (aSzWnd.Width() - GetTextWidth( aTmpStr )) /2; + vcl::Font aDrawFont = GetFont(); + Size aSzWnd = GetOutputSizePixel(); + OUString aTmpStr( aPrevStr ); + long nLeadSpace = (aSzWnd.Width() - GetTextWidth( aTmpStr )) /2; aDrawFont.SetColor( aPrevCol ); SetFont( aDrawFont ); @@ -830,7 +830,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEnt { OUString aEntry; OUString aTmpString; - Font aFont=m_pLbCategory->GetFont(); + vcl::Font aFont=m_pLbCategory->GetFont(); size_t i = 0; short nTmpCatPos; short aPrivCat; @@ -877,7 +877,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEnt { Color* pPreviewColor = NULL; OUString aPreviewString( GetExpColorString( pPreviewColor, aEntry, aPrivCat ) ); - Font aEntryFont( m_pLbFormat->GetFont() ); + vcl::Font aEntryFont( m_pLbFormat->GetFont() ); m_pLbFormat->InsertFontEntry( aPreviewString, aEntryFont, pPreviewColor ); } else diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index ca9fe1f38706..2e087739a05a 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -156,10 +156,10 @@ static bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask) return bRet; } -static Font& lcl_GetDefaultBulletFont() +static vcl::Font& lcl_GetDefaultBulletFont() { static bool bInit = false; - static Font aDefBulletFont( OUString("StarSymbol"), + static vcl::Font aDefBulletFont( OUString("StarSymbol"), OUString(), Size( 0, 14 ) ); if(!bInit) { @@ -476,7 +476,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl) bPreset = false; bModified = true; sal_Unicode cChar = aBulletTypes[m_pExamplesVS->GetSelectItemId() - 1]; - Font& rActBulletFont = lcl_GetDefaultBulletFont(); + vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) @@ -679,7 +679,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl) SvxNumSettingsArr_Impl& rItemArr = aNumSettingsArrays[m_pExamplesVS->GetSelectItemId() - 1]; - Font& rActBulletFont = lcl_GetDefaultBulletFont(); + vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); SvxNumSettings_Impl* pLevelSettings = 0; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { @@ -712,13 +712,13 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl) { vcl::FontInfo aInfo = pList->Get( pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE); - Font aFont(aInfo); + vcl::Font aFont(aInfo); aFmt.SetBulletFont(&aFont); } else { //if it cannot be found then create a new one - Font aCreateFont( pLevelSettings->sBulletFont, + vcl::Font aCreateFont( pLevelSettings->sBulletFont, OUString(), Size( 0, 14 ) ); aCreateFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); aCreateFont.SetFamily( FAMILY_DONTKNOW ); @@ -2009,7 +2009,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, BulletHdl_Impl) boost::scoped_ptr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true )); sal_uInt16 nMask = 1; - const Font* pFmtFont = 0; + const vcl::Font* pFmtFont = 0; bool bSameBullet = true; sal_Unicode cBullet = 0; bool bFirst = true; @@ -2234,10 +2234,10 @@ static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, const SvxNumberFormat& rFmt, sal_uInt16 nXStart, sal_uInt16 nYStart, const Size& rSize) { - Font aTmpFont(pVDev->GetFont()); + vcl::Font aTmpFont(pVDev->GetFont()); // via Uno it's possible that no font has been set! - Font aFont(rFmt.GetBulletFont() ? *rFmt.GetBulletFont() : aTmpFont); + vcl::Font aFont(rFmt.GetBulletFont() ? *rFmt.GetBulletFont() : aTmpFont); Size aTmpSize(rSize); aTmpSize.Width() *= rFmt.GetBulletRelSize(); aTmpSize.Width() /= 100 ; @@ -2403,8 +2403,8 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) if(pActNum->IsContinuousNumbering()) aNum.GetLevelVal()[nLevel] = nPreNum; OUString aText(pActNum->MakeNumString( aNum )); - Font aSaveFont = pVDev->GetFont(); - Font aColorFont(aSaveFont); + vcl::Font aSaveFont = pVDev->GetFont(); + vcl::Font aColorFont(aSaveFont); Color aTmpBulletColor = rFmt.GetBulletColor(); if(aTmpBulletColor.GetColor() == COL_AUTO) aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK); @@ -2526,7 +2526,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ ) } else { - Font aColorFont(aStdFont); + vcl::Font aColorFont(aStdFont); Color aTmpBulletColor = rFmt.GetBulletColor(); if(aTmpBulletColor.GetColor() == COL_AUTO) aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK); diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index d5b5838c952b..691775f20836 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -167,7 +167,7 @@ namespace const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); @@ -1232,7 +1232,7 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || + if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || (rDCEvt.GetType() == DATACHANGED_DISPLAY) || (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && @@ -1253,25 +1253,24 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt ) void OAppDetailPageHelper::ImplInitSettings() { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Font aFont; - aFont = rStyleSettings.GetFieldFont(); - aFont.SetColor( rStyleSettings.GetWindowTextColor() ); - SetPointFont( aFont ); - m_aTBPreview.SetPointFont( aFont ); - - SetTextColor( rStyleSettings.GetFieldTextColor() ); - SetTextFillColor(); - m_aBorder.SetTextColor( rStyleSettings.GetFieldTextColor() ); - m_aBorder.SetTextFillColor(); - m_aTBPreview.SetTextColor( rStyleSettings.GetFieldTextColor() ); - m_aTBPreview.SetTextFillColor(); - - SetBackground( rStyleSettings.GetFieldColor() ); - m_aBorder.SetBackground( rStyleSettings.GetFieldColor() ); - m_aFL.SetBackground( rStyleSettings.GetFieldColor() ); - m_aDocumentInfo.SetBackground( rStyleSettings.GetFieldColor() ); - m_aTBPreview.SetBackground( rStyleSettings.GetFieldColor() ); - m_pTablePreview->SetBackground( rStyleSettings.GetFieldColor() ); + vcl::Font aFont; + aFont = rStyleSettings.GetFieldFont(); + aFont.SetColor( rStyleSettings.GetWindowTextColor() ); + SetPointFont( aFont ); + m_aTBPreview.SetPointFont( aFont ); + + SetTextColor( rStyleSettings.GetFieldTextColor() ); + SetTextFillColor(); + m_aBorder.SetTextColor( rStyleSettings.GetFieldTextColor() ); + m_aBorder.SetTextFillColor(); + m_aTBPreview.SetTextColor( rStyleSettings.GetFieldTextColor() ); + m_aTBPreview.SetTextFillColor(); + SetBackground( rStyleSettings.GetFieldColor() ); + m_aBorder.SetBackground( rStyleSettings.GetFieldColor() ); + m_aFL.SetBackground( rStyleSettings.GetFieldColor() ); + m_aDocumentInfo.SetBackground( rStyleSettings.GetFieldColor() ); + m_aTBPreview.SetBackground( rStyleSettings.GetFieldColor() ); + m_pTablePreview->SetBackground( rStyleSettings.GetFieldColor() ); } OPreviewWindow::OPreviewWindow(Window* _pParent) @@ -1346,7 +1345,7 @@ void OPreviewWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackg const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 8f3a8d8952a1..e6e01c4e9809 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -111,7 +111,7 @@ void OCreationList::PreparePaint( SvTreeListEntry* _pEntry ) if ( bIsMouseDownEntry ) { - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetColor( GetSettings().GetStyleSettings().GetHighlightTextColor() ); Control::SetFont( aFont ); } @@ -384,7 +384,7 @@ void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); @@ -408,7 +408,7 @@ void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro m_aFL.SetBackground( rStyleSettings.GetFieldColor() ); } - Font aFont = m_aDescription.GetControlFont(); + vcl::Font aFont = m_aDescription.GetControlFont(); aFont.SetWeight(WEIGHT_BOLD); m_aDescription.SetControlFont(aFont); } @@ -565,7 +565,7 @@ void OApplicationDetailView::ImplInitSettings( bool bFont, bool bForeground, boo const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index c11b07b9a955..4f83589343b7 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -51,8 +51,8 @@ namespace dbaui // members related to drawing the currently hovered/selected entry SvTreeListEntry* m_pMouseDownEntry; SvTreeListEntry* m_pLastActiveEntry; - Color m_aOriginalBackgroundColor; - Font m_aOriginalFont; + Color m_aOriginalBackgroundColor; + vcl::Font m_aOriginalFont; public: OCreationList( OTasksWindow& _rParent ); diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index 746a969ea49d..4f12cb9eb566 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -74,7 +74,7 @@ void OApplicationSwapWindow::ImplInitSettings( bool bFont, bool bForeground, boo const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index 0e652e0c5945..72e37369f362 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -136,7 +136,7 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); @@ -154,7 +154,7 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle}; for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { - Font aFont = pWindows[i]->GetFont(); + vcl::Font aFont = pWindows[i]->GetFont(); aFont.SetWeight(WEIGHT_BOLD); pWindows[i]->SetFont(aFont); pWindows[i]->SetTextColor( aStyle.GetLightColor() ); diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index 8855e906831e..3b22fd88badc 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -153,7 +153,7 @@ void OAppBorderWindow::ImplInitSettings() const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( true ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); @@ -546,7 +546,7 @@ void OApplicationView::ImplInitSettings() const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( true ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx index ec3ede46ec53..975cefd84de9 100644 --- a/dbaccess/source/ui/control/VertSplitView.cxx +++ b/dbaccess/source/ui/control/VertSplitView.cxx @@ -63,7 +63,7 @@ void OSplitterView::ImplInitSettings( bool bFont, bool bForeground, bool bBackgr if ( bFont ) { - Font aFont = rStyleSettings.GetAppFont(); + vcl::Font aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx index 406eb6e580e3..fef464774952 100644 --- a/dbaccess/source/ui/control/listviewitems.cxx +++ b/dbaccess/source/ui/control/listviewitems.cxx @@ -32,7 +32,7 @@ namespace dbaui if (!_pViewData) _pViewData = pView->GetViewDataItem( pEntry, this ); pView->Push(PUSH_ALL); - Font aFont( pView->GetFont()); + vcl::Font aFont( pView->GetFont()); aFont.SetWeight(WEIGHT_BOLD); pView->Control::SetFont( aFont ); _pViewData->maSize = Size(pView->GetTextWidth(GetText()), pView->GetTextHeight()); @@ -51,7 +51,7 @@ namespace dbaui if (m_bEmphasized) { rDev.Push(PUSH_ALL); - Font aFont( rDev.GetFont()); + vcl::Font aFont( rDev.GetFont()); aFont.SetWeight(WEIGHT_BOLD); rDev.SetFont( aFont ); Point aPos(rPos); diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx index b6a7a597121e..3cb9c7d6c158 100644 --- a/dbaccess/source/ui/control/marktree.cxx +++ b/dbaccess/source/ui/control/marktree.cxx @@ -45,8 +45,8 @@ void OMarkableTreeListBox::Paint(const Rectangle& _rRect) { if (!IsEnabled()) { - Font aOldFont = GetFont(); - Font aNewFont(aOldFont); + vcl::Font aOldFont = GetFont(); + vcl::Font aNewFont(aOldFont); StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); aNewFont.SetColor(aSystemStyle.GetDisableColor()); diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 5c51f27d65e0..72f6a27fe35a 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -233,12 +233,12 @@ void OSqlEdit::ImplSetFont() get_value_or( OUString() ) ); if ( sFontName.isEmpty() ) { - Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) ); + vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) ); sFontName = aTmpFont.GetName(); } Size aFontSize( 0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() ); - Font aFont( sFontName, aFontSize ); + vcl::Font aFont( sFontName, aFontSize ); aStyleSettings.SetFieldFont(aFont); aSettings.SetStyleSettings(aStyleSettings); SetSettings(aSettings); diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index a0e20f7bb968..7be8fd7b505c 100644 --- a/dbaccess/source/ui/inc/UITools.hxx +++ b/dbaccess/source/ui/inc/UITools.hxx @@ -67,7 +67,7 @@ namespace svt class Window; class ToolBox; -class Font; +namespace vcl { class Font; } class SvNumberFormatter; class SfxFilter; diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 601ef11b7930..994909ec6476 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -320,7 +320,7 @@ void ODatabaseImportExport::initialize() } if ( m_aFont.Name.isEmpty() ) { - Font aApplicationFont = OutputDevice::GetDefaultFont( + vcl::Font aApplicationFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE, Application::GetSettings().GetUILanguageTag().getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 9a954eaf6750..668d5434923c 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1452,7 +1452,7 @@ void OJoinTableView::StateChanged( StateChangedType nType ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Font aFont = rStyleSettings.GetGroupFont(); + vcl::Font aFont = rStyleSettings.GetGroupFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 43fc42067265..217604dc7529 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -135,7 +135,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) // switch off triState of ::com::sun::star::form::CheckBox m_pVisibleCell->GetBox().EnableTriState( false ); - Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),DEFAULTFONT_FLAGS_ONLYONE); + vcl::Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),DEFAULTFONT_FLAGS_ONLYONE); aTitleFont.SetSize(Size(0, 6)); SetTitleFont(aTitleFont); @@ -330,7 +330,7 @@ void OSelectionBrowseBox::Init() SetHeaderBar(pNewHeaderBar); SetMode(m_nMode); - Font aFont( GetDataWindow().GetFont() ); + vcl::Font aFont( GetDataWindow().GetFont() ); aFont.SetWeight( WEIGHT_NORMAL ); GetDataWindow().SetFont( aFont ); diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 31f354c0e7fb..027f49e4c311 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -478,7 +478,7 @@ void OTableWindow::Resize() void OTableWindow::SetBoldTitle( bool bBold ) { - Font aFont = m_aTitle.GetFont(); + vcl::Font aFont = m_aTitle.GetFont(); aFont.SetWeight( bBold?WEIGHT_BOLD:WEIGHT_NORMAL ); m_aTitle.SetFont( aFont ); m_aTitle.Invalidate(); @@ -554,7 +554,7 @@ void OTableWindow::StateChanged( StateChangedType nType ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Font aFont = rStyleSettings.GetGroupFont(); + vcl::Font aFont = rStyleSettings.GetGroupFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index 46e25c03c209..a2a22997de02 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -48,7 +48,7 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) : SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor()))); SetTextColor(aSystemStyle.GetButtonTextColor()); - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetTransparent( true ); SetFont( aFont ); } @@ -173,7 +173,7 @@ void OTableWindowTitle::StateChanged( StateChangedType nType ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Font aFont = rStyleSettings.GetGroupFont(); + vcl::Font aFont = rStyleSettings.GetGroupFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index 0cb8cdcdfb8a..9db53a80e726 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -57,7 +57,7 @@ void OTableRowView::Init() { EditBrowseBox::Init(); - Font aFont( GetDataWindow().GetFont() ); + vcl::Font aFont( GetDataWindow().GetFont() ); aFont.SetWeight( WEIGHT_NORMAL ); GetDataWindow().SetFont( aFont ); diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index 239848c2fe6f..46d20a980e4e 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -122,7 +122,7 @@ void OTableBorderWindow::ImplInitSettings( bool bFont, bool bForeground, bool bB if ( bFont ) { - Font aFont = rStyleSettings.GetAppFont(); + vcl::Font aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetPointFont( aFont ); diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 457e6ddbbdcc..8e7225629bb2 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -537,8 +537,8 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr DrawImage( aPos, Size( ICON_WIDTH, ICON_HEIGHT ), aImage ); // Setup fonts - Font aStdFont( GetFont() ); - Font aBoldFont( aStdFont ); + vcl::Font aStdFont( GetFont() ); + vcl::Font aBoldFont( aStdFont ); aBoldFont.SetWeight( WEIGHT_BOLD ); SetFont( aBoldFont ); long aTextHeight = GetTextHeight(); diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index 89ad429c6b2a..8c59212823a3 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -625,7 +625,7 @@ void SplashScreen::Paint( const Rectangle&) _vdev.SetFillColor( _cProgressBarColor ); _vdev.SetLineColor(); _vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace)); - Font aFont; + vcl::Font aFont; aFont.SetSize(Size(0, 12)); aFont.SetAlign(ALIGN_BASELINE); _vdev.SetFont(aFont); diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 052d43a5f3ba..5cad9d63da67 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -87,7 +87,7 @@ namespace basegfx::B2DPolyPolygon maClipPolyPoygon; /// font, etc. - Font maFont; + vcl::Font maFont; RasterOp maRasterOp; ComplexTextLayoutMode mnLayoutMode; LanguageType maLanguageType; @@ -175,8 +175,8 @@ namespace bool getClipPolyPolygonActive() const { return mbClipPolyPolygonActive; } void setClipPolyPolygonActive(bool bNew) { if(bNew != mbClipPolyPolygonActive) mbClipPolyPolygonActive = bNew; } - const Font& getFont() const { return maFont; } - void setFont(const Font& rFont) { if(rFont != maFont) maFont = rFont; } + const vcl::Font& getFont() const { return maFont; } + void setFont(const vcl::Font& rFont) { if(rFont != maFont) maFont = rFont; } const RasterOp& getRasterOp() const { return maRasterOp; } void setRasterOp(const RasterOp& rRasterOp) { if(rRasterOp != maRasterOp) maRasterOp = rRasterOp; } @@ -302,7 +302,7 @@ namespace { if(pLast->getFont().GetAlign() != pTip->getFont().GetAlign()) { - Font aFont(pLast->getFont()); + vcl::Font aFont(pLast->getFont()); aFont.SetAlign(pTip->getFont().GetAlign()); pLast->setFont(aFont); } @@ -1200,7 +1200,7 @@ namespace } /** helper to decide UnderlineAbove for text primitives */ - bool isUnderlineAbove(const Font& rFont) + bool isUnderlineAbove(const vcl::Font& rFont) { if(!rFont.IsVertical()) { @@ -1222,7 +1222,7 @@ namespace basegfx::B2DVector& rAlignmentOffset, PropertyHolder& rProperty) { - const Font& rFont = rProperty.getFont(); + const vcl::Font& rFont = rProperty.getFont(); basegfx::B2DVector aFontScaling; rFontAttribute = drawinglayer::attribute::FontAttribute( @@ -1273,7 +1273,7 @@ namespace PropertyHolder& rProperty) { drawinglayer::primitive2d::BasePrimitive2D* pResult = 0; - const Font& rFont = rProperty.getFont(); + const vcl::Font& rFont = rProperty.getFont(); basegfx::B2DVector aAlignmentOffset(0.0, 0.0); if(nTextLength) @@ -2121,7 +2121,7 @@ namespace // for sub-Mteafile contents, do start with new, default render state // #i124686# ...but copy font, this is already set accordingly - Font aTargetFont = rPropertyHolders.Current().getFont(); + vcl::Font aTargetFont = rPropertyHolders.Current().getFont(); rPropertyHolders.PushDefault(); rPropertyHolders.Current().setFont(aTargetFont); @@ -2660,7 +2660,7 @@ namespace // playing the Metafile) if(rPropertyHolders.Current().getFont().GetAlign() != aNewTextAlign) { - Font aNewFont(rPropertyHolders.Current().getFont()); + vcl::Font aNewFont(rPropertyHolders.Current().getFont()); aNewFont.SetAlign(aNewTextAlign); rPropertyHolders.Current().setFont(aNewFont); } @@ -2735,7 +2735,7 @@ namespace { // this should not happen but i got Metafiles where this was the // case. A height needs to be guessed (similar to OutputDevice::ImplNewFont()) - Font aCorrectedFont(pA->GetFont()); + vcl::Font aCorrectedFont(pA->GetFont()); // guess 16 pixel (as in VCL) aFontSize = Size(0, 16); diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index cbd21e37d898..c472d19ad768 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -155,7 +155,7 @@ namespace drawinglayer releaseGlobalVirtualDevice(); } - void TextLayouterDevice::setFont(const Font& rFont) + void TextLayouterDevice::setFont(const vcl::Font& rFont) { mrDevice.SetFont( rFont ); } @@ -365,7 +365,7 @@ namespace drawinglayer { namespace primitive2d { - Font getVclFontFromFontAttribute( + vcl::Font getVclFontFromFontAttribute( const attribute::FontAttribute& rFontAttribute, double fFontScaleX, double fFontScaleY, @@ -381,7 +381,7 @@ namespace drawinglayer // for WIN32 systems, start with creating an unscaled font. If FontScaling // is wanted, that width needs to be adapted using FontMetric again to get a // width of the unscaled font - Font aRetval( + vcl::Font aRetval( rFontAttribute.getFamilyName(), rFontAttribute.getStyleName(), Size(0, nHeight)); @@ -391,7 +391,7 @@ namespace drawinglayer // FontWidth when no scaling is used to explicitly have that zero when e.g. the // Font would be recorded in a MetaFile (The MetaFile FontAction WILL record a // set FontWidth; import that in a WIN32 system, and trouble is there) - Font aRetval( + vcl::Font aRetval( rFontAttribute.getFamilyName(), rFontAttribute.getStyleName(), Size(bFontIsScaled ? nWidth : 0, nHeight)); @@ -432,7 +432,7 @@ namespace drawinglayer attribute::FontAttribute getFontAttributeFromVclFont( basegfx::B2DVector& o_rSize, - const Font& rFont, + const vcl::Font& rFont, bool bRTL, bool bBiDiStrong) { diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 869afd83fe6a..c05efd3915cc 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -139,7 +139,7 @@ namespace drawinglayer if(basegfx::fTools::more(aFontScaling.getX(), 0.0) && basegfx::fTools::more(aFontScaling.getY(), 0.0)) { // Get the VCL font (use FontHeight as FontWidth) - Font aFont(primitive2d::getVclFontFromFontAttribute( + vcl::Font aFont(primitive2d::getVclFontFromFontAttribute( rTextCandidate.getFontAttribute(), aFontScaling.getX(), aFontScaling.getY(), diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index dc31300532f8..93dc00424cbe 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1996,7 +1996,7 @@ void EditDoc::RemoveItemsFromPool(const ContentNode& rNode) void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, short nScriptType ) { - Font aPrevFont( rFont ); + vcl::Font aPrevFont( rFont ); rFont.SetAlign( ALIGN_BASELINE ); rFont.SetTransparent( true ); @@ -2255,7 +2255,7 @@ EditPaM EditDoc::RemoveText() ContentNode* pPrevFirstNode = GetObject(0); SfxStyleSheet* pPrevStyle = pPrevFirstNode->GetStyleSheet(); SfxItemSet aPrevSet( pPrevFirstNode->GetContentAttribs().GetItems() ); - Font aPrevFont( pPrevFirstNode->GetCharAttribs().GetDefFont() ); + vcl::Font aPrevFont( pPrevFirstNode->GetCharAttribs().GetDefFont() ); ImplDestroyContents(); diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 9f0e73f2ad92..00355e7a0213 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1747,7 +1747,7 @@ void EditEngine::RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAt pImpEditEngine->FormatAndUpdate(); } -Font EditEngine::GetStandardFont( sal_Int32 nPara ) +vcl::Font EditEngine::GetStandardFont( sal_Int32 nPara ) { return GetStandardSvxFont( nPara ); } @@ -2578,7 +2578,7 @@ SfxItemPool& EditEngine::GetGlobalItemPool() return *pGlobalPool; } -void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const Font& rFont ) +void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const vcl::Font& rFont ) { SvxFont aSvxFont( rFont ); SetFontInfoInItemSet( rSet, aSvxFont ); @@ -2609,7 +2609,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont ) rSet.Put( SvxCharReliefItem( rFont.GetRelief(), EE_CHAR_RELIEF ) ); } -Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ) +vcl::Font EditEngine::CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ) { SvxFont aFont; CreateFont( aFont, rItemSet, true, nScriptType ); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index a908480e74d0..db0444b62ec5 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -704,7 +704,7 @@ EESpellState EditView::StartThesaurus() } void EditView::StartTextConversion( - LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, + LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ) { pImpEditView->pEditEngine->pImpEditEngine->Convert( this, nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc ); diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index 38065cf8df27..15d8c59f54cd 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -652,7 +652,7 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel ) // Choose a proportional Font for Pre if ( nHLevel == STYLE_PRE ) { - Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 ); + vcl::Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 ); SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); aItems.Put( aFontItem ); diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 765c73085c5f..fc9779775cc9 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -151,7 +151,7 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r MapMode _aEditMapMode(mpEditEngine->GetRefDevice()->GetMapMode().GetMapUnit()); aSz = mpEditEngine->GetRefDevice()->LogicToLogic(aSz, &aPntMode, &_aEditMapMode); SvxFontHeightItem aFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT ); - Font aDefFont( GetDefFont() ); + vcl::Font aDefFont( GetDefFont() ); SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetName(), aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO ); diff --git a/editeng/source/editeng/eertfpar.hxx b/editeng/source/editeng/eertfpar.hxx index e662aad9246d..1f1b9d5c26a7 100644 --- a/editeng/source/editeng/eertfpar.hxx +++ b/editeng/source/editeng/eertfpar.hxx @@ -107,7 +107,7 @@ public: GetDestCharSet() const { return eDestCharSet; } sal_uInt16 GetDefTab() const { return nDefTab; } - Font GetDefFont() { return GetFont( nDefFont ); } + vcl::Font GetDefFont() { return GetFont( nDefFont ); } EditPaM GetCurPaM() const { return aCurSel.Max(); } }; diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 849ca753c43a..634aaa0b8b92 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -915,14 +915,14 @@ public: ImpSpell( EditView* pEditView ); // text conversion functions - void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); + void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); void ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange, - bool bAllowImplicitChangesForNotConvertibleText, LanguageType nTargetLang, const Font *pTargetFont ); + bool bAllowImplicitChangesForNotConvertibleText, LanguageType nTargetLang, const vcl::Font *pTargetFont ); ConvInfo * GetConvInfo() const { return pConvInfo; } bool HasConvertibleTextPortion( LanguageType nLang ); void SetLanguageAndFont( const ESelection &rESel, LanguageType nLang, sal_uInt16 nLangWhichId, - const Font *pFont, sal_uInt16 nFontWhichId ); + const vcl::Font *pFont, sal_uInt16 nFontWhichId ); // returns true if input sequence checking should be applied bool IsInputSequenceCheckingRequired( sal_Unicode nChar, const EditSelection& rCurSel ) const; diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 09367ca1fd67..0b26a0738656 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -368,7 +368,7 @@ void ImpEditEngine::FormatDoc() long nY = 0; bool bGrow = false; - Font aOldFont( GetRefDevice()->GetFont() ); + vcl::Font aOldFont( GetRefDevice()->GetFont() ); // Here already, so that not always in CreateLines... bool bMapChanged = ImpCheckRefMapMode(); @@ -2857,7 +2857,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt Point aRedLineTmpPos; DBG_ASSERT( GetParaPortions().Count(), "No ParaPortion?!" ); SvxFont aTmpFont( GetParaPortions()[0]->GetNode()->GetCharAttribs().GetDefFont() ); - Font aOldFont( pOutDev->GetFont() ); + vcl::Font aOldFont( pOutDev->GetFont() ); vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOutDev->GetExtOutDevData() ); // In the case of rotated text is aStartPos considered TopLeft because @@ -3186,7 +3186,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt pTmpDXArray.reset(new long[ aText.getLength() ]); pDXArray = pTmpDXArray.get(); - Font _aOldFont( GetRefDevice()->GetFont() ); + vcl::Font _aOldFont( GetRefDevice()->GetFont() ); aTmpFont.SetPhysFont( GetRefDevice() ); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, nTextStart, nTextLen, pTmpDXArray.get() ); if ( aStatus.DoRestoreFont() ) @@ -3216,7 +3216,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt // crash when accessing 0 pointer in pDXArray pTmpDXArray.reset(new long[ aText.getLength() ]); pDXArray = pTmpDXArray.get(); - Font _aOldFont( GetRefDevice()->GetFont() ); + vcl::Font _aOldFont( GetRefDevice()->GetFont() ); aTmpFont.SetPhysFont( GetRefDevice() ); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, 0, aText.getLength(), pTmpDXArray.get() ); if ( aStatus.DoRestoreFont() ) @@ -3925,7 +3925,7 @@ void ImpEditEngine::ShowParagraph( sal_Int32 nParagraph, bool bShow ) { if ( pPPortion->IsInvalid() ) { - Font aOldFont( GetRefDevice()->GetFont() ); + vcl::Font aOldFont( GetRefDevice()->GetFont() ); CreateLines( nParagraph, 0 ); // 0: No TextRanger if ( aStatus.DoRestoreFont() ) GetRefDevice()->SetFont( aOldFont ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index db404f03340e..bc1986abb535 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1551,7 +1551,7 @@ bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang ) void ImpEditEngine::Convert( EditView* pEditView, - LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, + LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ) { // modified version of ImpEditEngine::Spell @@ -1641,7 +1641,7 @@ void ImpEditEngine::Convert( EditView* pEditView, void ImpEditEngine::SetLanguageAndFont( const ESelection &rESel, LanguageType nLang, sal_uInt16 nLangWhichId, - const Font *pFont, sal_uInt16 nFontWhichId ) + const vcl::Font *pFont, sal_uInt16 nFontWhichId ) { ESelection aOldSel = pActiveView->GetSelection(); pActiveView->SetSelection( rESel ); @@ -1674,7 +1674,7 @@ void ImpEditEngine::SetLanguageAndFont( void ImpEditEngine::ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange, bool bAllowImplicitChangesForNotConvertibleText, - LanguageType nTargetLang, const Font *pTargetFont ) + LanguageType nTargetLang, const vcl::Font *pTargetFont ) { // modified version of ImpEditEngine::ImpSpell diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx index f843f8330873..92035210ae69 100644 --- a/editeng/source/editeng/textconv.cxx +++ b/editeng/source/editeng/textconv.cxx @@ -46,7 +46,7 @@ TextConvWrapper::TextConvWrapper( Window* pWindow, const Reference< XComponentContext >& rxContext, const Locale& rSourceLocale, const Locale& rTargetLocale, - const Font* pTargetFont, + const vcl::Font* pTargetFont, sal_Int32 nOptions, bool bIsInteractive, bool bIsStart, @@ -245,7 +245,7 @@ bool TextConvWrapper::ConvContinue_impl() void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel, LanguageType nLang, sal_uInt16 nLangWhichId, - const Font *pFont, sal_uInt16 nFontWhichId ) + const vcl::Font *pFont, sal_uInt16 nFontWhichId ) { ESelection aOldSel = m_pEditView->GetSelection(); m_pEditView->SetSelection( rESel ); diff --git a/editeng/source/editeng/textconv.hxx b/editeng/source/editeng/textconv.hxx index a3afc6063722..d8073b758925 100644 --- a/editeng/source/editeng/textconv.hxx +++ b/editeng/source/editeng/textconv.hxx @@ -90,7 +90,7 @@ protected: void SetLanguageAndFont( const ESelection &rESel, LanguageType nLang, sal_uInt16 nLangWhichId, - const Font *pFont, sal_uInt16 nFontWhichId ); + const vcl::Font *pFont, sal_uInt16 nFontWhichId ); public: @@ -98,7 +98,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const ::com::sun::star::lang::Locale& rSourceLocale, const ::com::sun::star::lang::Locale& rTargetLocale, - const Font* pTargetFont, + const vcl::Font* pTargetFont, sal_Int32 nOptions, bool bIsInteractive, bool bIsStart, EditView* pView ); diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 28f4dfdd4e1d..68eaf2c2993b 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -34,7 +34,7 @@ TYPEINIT1(SvxBulletItem,SfxPoolItem); -void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont ) +void SvxBulletItem::StoreFont( SvStream& rStream, const vcl::Font& rFont ) { sal_uInt16 nTemp; @@ -61,9 +61,9 @@ void SvxBulletItem::StoreFont( SvStream& rStream, const Font& rFont ) -Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer ) +vcl::Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer ) { - Font aFont; + vcl::Font aFont; Color aColor; ReadColor( rStream, aColor ); aFont.SetColor( aColor ); sal_uInt16 nTemp; @@ -237,8 +237,8 @@ sal_uInt16 SvxBulletItem::GetVersion( sal_uInt16 /*nVersion*/ ) const void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom ) { - Font _aFont = GetFont(); - Font aNewFont = rCopyFrom.GetFont(); + vcl::Font _aFont = GetFont(); + vcl::Font aNewFont = rCopyFrom.GetFont(); if ( rCopyFrom.IsValid( VALID_FONTNAME ) ) { _aFont.SetName( aNewFont.GetName() ); diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 56cfeaccf901..24c2ef1e138e 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -219,7 +219,7 @@ SvxNumberFormat::SvxNumberFormat( SvStream &rStream ) rStream.ReadUInt16( hasBulletFont ); if ( hasBulletFont ) { - pBulletFont = new Font( ); + pBulletFont = new vcl::Font( ); ReadFont( rStream, *pBulletFont ); } else pBulletFont = NULL; @@ -345,7 +345,7 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat ) } DELETEZ(pBulletFont); if(rFormat.pBulletFont) - pBulletFont = new Font(*rFormat.pBulletFont); + pBulletFont = new vcl::Font(*rFormat.pBulletFont); return *this; } @@ -443,10 +443,10 @@ sal_Int16 SvxNumberFormat::GetVertOrient() const return eVertOrient; } -void SvxNumberFormat::SetBulletFont(const Font* pFont) +void SvxNumberFormat::SetBulletFont(const vcl::Font* pFont) { delete pBulletFont; - pBulletFont = pFont ? new Font(*pFont): 0; + pBulletFont = pFont ? new vcl::Font(*pFont): 0; } void SvxNumberFormat::SetPositionAndSpaceMode( SvxNumPositionAndSpaceMode ePositionAndSpaceMode ) diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index e5609605a904..a306c68901bd 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -39,7 +39,7 @@ SvxFont::SvxFont() SetLanguage(LANGUAGE_SYSTEM); } -SvxFont::SvxFont( const Font &rFont ) +SvxFont::SvxFont( const vcl::Font &rFont ) : Font( rFont ) { nKern = nEsc = 0; @@ -319,7 +319,7 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo) const void SvxFont::SetPhysFont( OutputDevice *pOut ) const { - const Font& rCurrentFont = pOut->GetFont(); + const vcl::Font& rCurrentFont = pOut->GetFont(); if ( nPropr == 100 ) { if ( !rCurrentFont.IsSameInstance( *this ) ) @@ -337,9 +337,9 @@ void SvxFont::SetPhysFont( OutputDevice *pOut ) const } -Font SvxFont::ChgPhysFont( OutputDevice *pOut ) const +vcl::Font SvxFont::ChgPhysFont( OutputDevice *pOut ) const { - Font aOldFont( pOut->GetFont() ); + vcl::Font aOldFont( pOut->GetFont() ); SetPhysFont( pOut ); return aOldFont; } @@ -566,7 +566,7 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter, } -SvxFont& SvxFont::operator=( const Font& rFont ) +SvxFont& SvxFont::operator=( const vcl::Font& rFont ) { Font::operator=( rFont ); return *this; diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index ebb8153064a0..c47215ede3c5 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -3470,7 +3470,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo for ( sal_uInt16 n = 0; n < nItemCnt; ++n ) { - Font aFont( OutputDevice::GetDefaultFont( aOutTypeArr[ n ].nFontType, + vcl::Font aFont( OutputDevice::GetDefaultFont( aOutTypeArr[ n ].nFontType, aOutTypeArr[ n ].nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0 ) ); SvxFontItem* pItem = aItemArr[ n ]; diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index 264633070a26..506ed316f1e0 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -82,7 +82,7 @@ namespace editeng // save the applications from always converting to this // type in their implementations LanguageType m_nTargetLang; // target language of new replacement text - const Font* m_pTargetFont; // target font of new replacement text + const vcl::Font* m_pTargetFont; // target font of new replacement text sal_Int32 m_nConvOptions; // text conversion options (as used by 'getConversions') bool m_bIsInteractive; // specifies if the conversion requires user interaction // (and likeley a specialised dialog) or if it is to run @@ -123,7 +123,7 @@ namespace editeng const Reference< XComponentContext >& rxContext, const Locale& _rSourceLocale, const Locale& _rTargetLocale, - const Font* _pTargetFont, + const vcl::Font* _pTargetFont, sal_Int32 _nConvOptions, bool _bIsInteractive, HangulHanjaConversion* _pAntiImpl ); @@ -137,7 +137,7 @@ namespace editeng inline LanguageType GetSourceLang() const { return m_nSourceLang; } inline LanguageType GetTargetLang() const { return m_nTargetLang; } - inline const Font * GetTargetFont() const { return m_pTargetFont; } + inline const vcl::Font * GetTargetFont() const { return m_pTargetFont; } inline sal_Int32 GetConvOptions() const { return m_nConvOptions; } inline bool IsInteractive() const { return m_bIsInteractive; } @@ -233,7 +233,7 @@ namespace editeng const Reference< XComponentContext >& rxContext, const Locale& _rSourceLocale, const Locale& _rTargetLocale, - const Font* _pTargetFont, + const vcl::Font* _pTargetFont, sal_Int32 _nOptions, bool _bIsInteractive, HangulHanjaConversion* _pAntiImpl ) @@ -968,7 +968,7 @@ namespace editeng HangulHanjaConversion::HangulHanjaConversion( Window* _pUIParent, const Reference< XComponentContext >& rxContext, const Locale& _rSourceLocale, const Locale& _rTargetLocale, - const Font* _pTargetFont, + const vcl::Font* _pTargetFont, sal_Int32 _nOptions, bool _bIsInteractive) :m_pImpl( new HangulHanjaConversion_Impl( _pUIParent, rxContext, _rSourceLocale, _rTargetLocale, _pTargetFont, _nOptions, _bIsInteractive, this ) ) { @@ -998,7 +998,7 @@ namespace editeng return m_pImpl->GetTargetLang(); } - const Font * HangulHanjaConversion::GetTargetFont( ) const + const vcl::Font * HangulHanjaConversion::GetTargetFont( ) const { return m_pImpl->GetTargetFont(); } diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 74aba0240aef..b4b44aa42cf6 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -853,12 +853,12 @@ bool Outliner::Collapse( Paragraph* pPara ) } -Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const +vcl::Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const { const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); DBG_ASSERT( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ), "ImpCalcBulletFont: Missing or BitmapBullet!" ); - Font aStdFont; + vcl::Font aStdFont; if ( !pEditEngine->IsFlatMode() ) { ESelection aSel( nPara, 0, nPara, 0 ); @@ -869,8 +869,8 @@ Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const aStdFont = pEditEngine->GetStandardFont( nPara ); } - Font aBulletFont; - const Font *pSourceFont = 0; + vcl::Font aBulletFont; + const vcl::Font *pSourceFont = 0; if ( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL ) { pSourceFont = pFmt->GetBulletFont(); @@ -949,11 +949,11 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, { if( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) { - Font aBulletFont( ImpCalcBulletFont( nPara ) ); + vcl::Font aBulletFont( ImpCalcBulletFont( nPara ) ); // Use baseline bool bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL; aBulletFont.SetAlign( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE ); - Font aOldFont = pOutDev->GetFont(); + vcl::Font aOldFont = pOutDev->GetFont(); pOutDev->SetFont( aBulletFont ); ParagraphInfos aParaInfos = pEditEngine->GetParagraphInfos( nPara ); @@ -990,7 +990,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, aTextPos = aRotatedPos; // Translation... aTextPos += rOrigin; - Font aRotatedFont( aBulletFont ); + vcl::Font aRotatedFont( aBulletFont ); aRotatedFont.SetOrientation( nOrientation ); pOutDev->SetFont( aRotatedFont ); } @@ -1004,7 +1004,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos, if(bStrippingPortions) { - const Font aSvxFont(pOutDev->GetFont()); + const vcl::Font aSvxFont(pOutDev->GetFont()); boost::scoped_array<long> pBuf(new long[ pPara->GetText().getLength() ]); pOutDev->GetTextArray( pPara->GetText(), pBuf.get() ); @@ -1479,8 +1479,8 @@ Size Outliner::ImplGetBulletSize( sal_Int32 nPara ) { OUString aBulletText = ImplGetBulletText( nPara ); OutputDevice* pRefDev = pEditEngine->GetRefDevice(); - Font aBulletFont( ImpCalcBulletFont( nPara ) ); - Font aRefFont( pRefDev->GetFont()); + vcl::Font aBulletFont( ImpCalcBulletFont( nPara ) ); + vcl::Font aRefFont( pRefDev->GetFont()); pRefDev->SetFont( aBulletFont ); pPara->aBulSize.Width() = pRefDev->GetTextWidth( aBulletText ); pPara->aBulSize.Height() = pRefDev->GetTextHeight(); @@ -1607,11 +1607,11 @@ Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bRetu // may prefer to print out on the baseline ... if( ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ) && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_CHAR_SPECIAL ) ) { - Font aBulletFont( ImpCalcBulletFont( nPara ) ); + vcl::Font aBulletFont( ImpCalcBulletFont( nPara ) ); if ( aBulletFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL ) { OutputDevice* pRefDev = pEditEngine->GetRefDevice(); - Font aOldFont = pRefDev->GetFont(); + vcl::Font aOldFont = pRefDev->GetFont(); pRefDev->SetFont( aBulletFont ); FontMetric aMetric( pRefDev->GetFontMetric() ); // Leading on the first line ... diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 3c3c0db7cf43..5ca6729b3b83 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -1270,7 +1270,7 @@ EESpellState OutlinerView::StartThesaurus() } void OutlinerView::StartTextConversion( - LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, + LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ) { if ( diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx index eefc873a6f0f..9ca6da88a35f 100644 --- a/editeng/source/rtf/rtfitem.cxx +++ b/editeng/source/rtf/rtfitem.cxx @@ -646,7 +646,7 @@ SET_FONTALIGNMENT: case RTF_F: case RTF_AF: { - const Font& rSVFont = GetFont( sal_uInt16(nTokenValue) ); + const vcl::Font& rSVFont = GetFont( sal_uInt16(nTokenValue) ); SvxFontItem aTmpItem( rSVFont.GetFamily(), rSVFont.GetName(), rSVFont.GetStyleName(), rSVFont.GetPitch(), rSVFont.GetCharSet(), @@ -1804,7 +1804,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet ) //we can fall back to the ansicpg set codeset if (nDfltFont != -1) { - const Font& rSVFont = GetFont(sal_uInt16(nDfltFont)); + const vcl::Font& rSVFont = GetFont(sal_uInt16(nDfltFont)); SetEncoding(rSVFont.GetCharSet()); } else @@ -1828,7 +1828,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue ) { if( -1 == nValue ) nValue = 0; - const Font& rSVFont = GetFont( sal_uInt16(nValue) ); + const vcl::Font& rSVFont = GetFont( sal_uInt16(nValue) ); SvxFontItem aTmpItem( rSVFont.GetFamily(), rSVFont.GetName(), rSVFont.GetStyleName(), rSVFont.GetPitch(), diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 625028e0c721..eced58896490 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -90,7 +90,7 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn, aPardMap.insert( aPardMap.begin(), (sal_uInt16*)&aTmp, (sal_uInt16*)&aTmp + (sizeof( RTFPardAttrMapIds ) / sizeof(sal_uInt16)) ); } - pDfltFont = new Font; + pDfltFont = new vcl::Font; pDfltColor = new Color; } @@ -465,7 +465,7 @@ void SvxRTFParser::ReadFontTable() { int nToken; int _nOpenBrakets = 1; // the first was already detected earlier!! - Font* pFont = new Font(); + vcl::Font* pFont = new vcl::Font(); short nFontNo(0), nInsFontNo (0); OUString sAltNm, sFntNm; bool bIsAltFntNm = false, bCheckNewFont; @@ -582,7 +582,7 @@ void SvxRTFParser::ReadFontTable() pFont->SetName( sFntNm ); aFontTbl.insert( nInsFontNo, pFont ); - pFont = new Font(); + pFont = new vcl::Font(); pFont->SetCharSet( nSystemChar ); sAltNm = ""; sFntNm = ""; @@ -814,10 +814,10 @@ OUString& SvxRTFParser::DelCharAtEnd( OUString& rStr, const sal_Unicode cDel ) } -const Font& SvxRTFParser::GetFont( sal_uInt16 nId ) +const vcl::Font& SvxRTFParser::GetFont( sal_uInt16 nId ) { SvxRTFFontTbl::const_iterator it = aFontTbl.find( nId ); - const Font* pFont; + const vcl::Font* pFont; if( it == aFontTbl.end() ) { const SvxFontItem& rDfltFont = (const SvxFontItem&) diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index ac3324477954..f375fcaa668f 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -39,7 +39,7 @@ using namespace ::rtl; using namespace ::com::sun::star; -void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, Font& rFont ) +void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl::Font& rFont ) { rFont.SetName( rDesc.Name ); rFont.SetStyleName( rDesc.StyleName ); @@ -56,7 +56,7 @@ void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, Font rFont.SetWordLineMode( rDesc.WordLineMode ); } -void SvxUnoFontDescriptor::ConvertFromFont( const Font& rFont, awt::FontDescriptor& rDesc ) +void SvxUnoFontDescriptor::ConvertFromFont( const vcl::Font& rFont, awt::FontDescriptor& rDesc ) { rDesc.Name = rFont.GetName(); rDesc.StyleName = rFont.GetStyleName(); diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index affe4f884a9d..2b0ce3824fd4 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -351,7 +351,7 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex( const Sequence< beans::Prope awt::FontDescriptor aDesc; if( aVal >>= aDesc ) { - Font aFont; + vcl::Font aFont; SvxUnoFontDescriptor::ConvertToFont( aDesc, aFont ); aFmt.SetBulletFont(&aFont); continue; diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 02ab6ca16cfd..f8698dbff07e 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -199,7 +199,7 @@ namespace pcr OFontPropertyExtractor aPropExtractor(_rxModel); // some items, which may be in default state, have to be filled with non-void information - Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); + vcl::Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); ::com::sun::star::awt::FontDescriptor aDefaultFont = VCLUnoHelper::CreateFontDescriptor(aDefaultVCLFont); // get the current properties @@ -490,7 +490,7 @@ namespace pcr // create and initialize the defaults _rppDefaults = new SfxPoolItem*[CFID_LAST_ITEM_ID - CFID_FIRST_ITEM_ID + 1]; - Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); + vcl::Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); SfxPoolItem** pCounter = _rppDefaults; // want to modify this without affecting the out param _rppDefaults *pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamily(), aDefaultVCLFont.GetName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_FONT); diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 21ae5674eb40..413273410e66 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -335,7 +335,7 @@ namespace pcr AllSettings aAllSettings( GetSettings() ); StyleSettings aStyleSettings( aAllSettings.GetStyleSettings() ); - Font aFieldFont( aStyleSettings.GetFieldFont() ); + vcl::Font aFieldFont( aStyleSettings.GetFieldFont() ); aFieldFont.SetUnderline( UNDERLINE_SINGLE ); aFieldFont.SetColor( aLinkColor.nColor ); aStyleSettings.SetFieldFont( aFieldFont ); diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index d5f791e78646..fed6d02e5dd8 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -846,8 +846,8 @@ void BubbleWindow::Paint( const Rectangle& ) DrawImage( Point( BUBBLE_BORDER, BUBBLE_BORDER + TIP_HEIGHT ), maBubbleImage ); - Font aOldFont = GetFont(); - Font aBoldFont = aOldFont; + vcl::Font aOldFont = GetFont(); + vcl::Font aBoldFont = aOldFont; aBoldFont.SetWeight( WEIGHT_BOLD ); SetFont( aBoldFont ); @@ -921,8 +921,8 @@ void BubbleWindow::RecalcTextRects() { Size aTotalSize; bool bFinished = false; - Font aOldFont = GetFont(); - Font aBoldFont = aOldFont; + vcl::Font aOldFont = GetFont(); + vcl::Font aBoldFont = aOldFont; aBoldFont.SetWeight( WEIGHT_BOLD ); diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx index 7b3161fcaac8..9e63078ecc85 100644 --- a/filter/source/flash/swfwriter.hxx +++ b/filter/source/flash/swfwriter.hxx @@ -149,7 +149,7 @@ private: class FlashFont { public: - FlashFont( const Font& rFont, sal_uInt16 nId ); + FlashFont( const vcl::Font& rFont, sal_uInt16 nId ); ~FlashFont(); sal_uInt16 getGlyph( sal_uInt16 nChar, VirtualDevice* pVDev ); @@ -157,10 +157,10 @@ public: void write( SvStream& out ); sal_uInt16 getID() const { return mnId; } - const Font& getFont() { return maFont; } + const vcl::Font& getFont() { return maFont; } private: - const Font maFont; + const vcl::Font maFont; std::map<sal_uInt16, sal_uInt16, ltuint16> maGlyphIndex; sal_uInt16 mnNextIndex; sal_uInt16 mnId; @@ -354,7 +354,7 @@ private: bool Impl_writeFilling( SvtGraphicFill& rFilling ); bool Impl_writeStroke( SvtGraphicStroke& rStroke ); - FlashFont& Impl_getFont( const Font& rFont ); + FlashFont& Impl_getFont( const vcl::Font& rFont ); static void Impl_addPolygon( BitStream& rBits, const Polygon& rPoly, bool bFilled ); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index dedcb983d14d..89c0c22cc2f4 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -370,7 +370,7 @@ void Writer::setClipping( const PolyPolygon* pClipPolyPolygon ) // differences in font that actually require different glyphs to be defined, // and some that don't. This function is meant to capture all the differences // that we care about. -bool compare_fonts_for_me(const Font& rFont1, const Font& rFont2) +bool compare_fonts_for_me(const vcl::Font& rFont1, const vcl::Font& rFont2) { return rFont1.GetName() == rFont2.GetName() && rFont1.GetWeight() == rFont2.GetWeight() && @@ -382,14 +382,14 @@ bool compare_fonts_for_me(const Font& rFont1, const Font& rFont2) -FlashFont& Writer::Impl_getFont( const Font& rFont ) +FlashFont& Writer::Impl_getFont( const vcl::Font& rFont ) { FontMap::iterator aIter( maFonts.begin() ); const FontMap::iterator aEnd( maFonts.end() ); for(; aIter != aEnd; ++aIter) { - const Font tempFont = (*aIter)->getFont(); + const vcl::Font tempFont = (*aIter)->getFont(); if( compare_fonts_for_me(tempFont, rFont) ) { return **aIter; @@ -553,10 +553,10 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon } } - Font aOldFont( mpVDev->GetFont() ); + vcl::Font aOldFont( mpVDev->GetFont() ); Point aBaseLinePos( rPos ); - Font aFont(aOldFont); + vcl::Font aFont(aOldFont); short nOrientation = aFont.GetOrientation(); aFont.SetOrientation( 0 ); aFont.SetUnderline(UNDERLINE_NONE); @@ -603,7 +603,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon // scale width if we have a stretched text if( 0 != aFont.GetSize().Width() ) { - Font aTmpFont( aFont ); + vcl::Font aTmpFont( aFont ); aTmpFont.SetWidth(0); mpVDev->SetFont( aTmpFont ); diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx index 6a2a40529851..b11512aacaa0 100644 --- a/filter/source/flash/swfwriter2.cxx +++ b/filter/source/flash/swfwriter2.cxx @@ -425,7 +425,7 @@ sal_uInt32 swf::getFixed( double fValue ) /** constructs a new flash font for the given VCL Font */ -FlashFont::FlashFont( const Font& rFont, sal_uInt16 nId ) +FlashFont::FlashFont( const vcl::Font& rFont, sal_uInt16 nId ) : maFont( rFont ), mnNextIndex(0), mnId( nId ) { } @@ -452,8 +452,8 @@ sal_uInt16 FlashFont::getGlyph( sal_uInt16 nChar, VirtualDevice* pVDev ) maGlyphIndex[nChar] = mnNextIndex; - Font aOldFont( pVDev->GetFont() ); - Font aNewFont( aOldFont ); + vcl::Font aOldFont( pVDev->GetFont() ); + vcl::Font aNewFont( aOldFont ); aNewFont.SetAlign( ALIGN_BASELINE ); pVDev->SetFont( aNewFont ); aOldFont.SetOrientation(0); diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index a217c58f4d00..90fb53d52e5d 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -115,7 +115,7 @@ struct METGDIStackMember Color aLineColor; Color aFillColor; RasterOp eRasterOp; - Font aFont; + vcl::Font aFont; MapMode aMapMode; Rectangle aClipRect; }; @@ -135,7 +135,7 @@ private: Color aGDILineColor; Color aGDIFillColor; RasterOp eGDIRasterOp; - Font aGDIFont; + vcl::Font aGDIFont; MapMode aGDIMapMode; // currently ununsed! Rectangle aGDIClipRect; // currently ununsed! METGDIStackMember* pGDIStack; @@ -181,9 +181,9 @@ private: void WriteFieldId(sal_uInt32 nId); void CreateChrSets(const GDIMetaFile * pMTF); - void CreateChrSet(const Font & rFont); + void CreateChrSet(const vcl::Font & rFont); void WriteChrSets(); - sal_uInt8 FindChrSet(const Font & rFont); + sal_uInt8 FindChrSet(const vcl::Font & rFont); void WriteColorAttributeTable(sal_uInt32 nFieldId=4, BitmapPalette* pPalette=NULL, sal_uInt8 nBasePartFlags=0x40, sal_uInt8 nBasePartLCTID=0); @@ -422,7 +422,7 @@ void METWriter::CreateChrSets(const GDIMetaFile * pMTF) } -void METWriter::CreateChrSet(const Font & rFont) +void METWriter::CreateChrSet(const vcl::Font & rFont) { METChrSet * pCS; @@ -437,7 +437,7 @@ void METWriter::CreateChrSet(const Font & rFont) } -sal_uInt8 METWriter::FindChrSet(const Font & rFont) +sal_uInt8 METWriter::FindChrSet(const vcl::Font & rFont) { METChrSet* pCS; @@ -2523,7 +2523,7 @@ bool METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream, Filt aGDILineColor=Color( COL_BLACK ); aGDIFillColor=Color( COL_WHITE ); eGDIRasterOp=ROP_OVERPAINT; - aGDIFont=Font(); + aGDIFont=vcl::Font(); aGDIMapMode=MapMode(); aGDIClipRect=Rectangle(); pGDIStack=NULL; diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index d8f929f8ff8a..9a44f45276be 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -45,7 +45,7 @@ struct PictWriterAttrStackMember { Color aLineColor; Color aFillColor; RasterOp eRasterOp; - Font aFont; + vcl::Font aFont; MapMode aMapMode; Rectangle aClipRect; }; @@ -74,7 +74,7 @@ private: Color aLineColor; Color aFillColor; RasterOp eSrcRasterOp; - Font aSrcFont; + vcl::Font aSrcFont; MapMode aSrcMapMode; MapMode aTargetMapMode; Rectangle aClipRect; @@ -125,7 +125,7 @@ private: void ConvertLinePattern(PictPattern & rPat, bool bVisible) const; void ConvertFillPattern(PictPattern & rPat, bool bVisible) const; - void WriteOpcode_TxFace(const Font & rFont); + void WriteOpcode_TxFace(const vcl::Font & rFont); void WriteOpcode_TxMode(RasterOp eMode); void WriteOpcode_PnSize(sal_uInt16 nSize); void WriteOpcode_PnMode(RasterOp eMode); @@ -138,7 +138,7 @@ private: void WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt); void WriteOpcode_LineFrom(const Point & rNewPt); void WriteOpcode_Text(const Point & rPoint, const OUString& rString, bool bDelta); - void WriteOpcode_FontName(const Font & rFont); + void WriteOpcode_FontName(const vcl::Font & rFont); void WriteOpcode_ClipRect( const Rectangle& rRect ); void WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & rRect); void WriteOpcode_SameRect(PictDrawingMethod eMethod); @@ -445,7 +445,7 @@ void PictWriter::ConvertFillPattern(PictPattern & rPat, bool bVisible) const } -void PictWriter::WriteOpcode_TxFace(const Font & rFont) +void PictWriter::WriteOpcode_TxFace(const vcl::Font & rFont) { sal_uInt8 nFace; FontWeight eWeight; @@ -676,7 +676,7 @@ void PictWriter::WriteOpcode_Text(const Point & rPoint, const OUString& rString, } -void PictWriter::WriteOpcode_FontName(const Font & rFont) +void PictWriter::WriteOpcode_FontName(const vcl::Font & rFont) { sal_uInt16 nDataLen,nFontId; @@ -2204,7 +2204,7 @@ bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F aLineColor=Color( COL_BLACK ); aFillColor=Color( COL_WHITE ); eSrcRasterOp=ROP_OVERPAINT; - aSrcFont=Font(); + aSrcFont=vcl::Font(); aSrcMapMode = rMTF.GetPrefMapMode(); aMap72.SetScaleX( aDPIFrac ); diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index fc2d28573268..28f7fa1afc32 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -79,7 +79,7 @@ struct StackMember bool bTextFillCol; Color aTextFillCol; Color aBackgroundCol; - Font aFont; + vcl::Font aFont; TextAlign eTextAlign; double fLineWidth; @@ -142,8 +142,8 @@ private: SvtGraphicStroke::JoinType eJoinType; SvtGraphicStroke::DashArray aDashArray; - Font maFont; - Font maLastFont; + vcl::Font maFont; + vcl::Font maLastFont; sal_uInt8 nChrSet; ChrSet* pChrSetList; // list of character sets sal_uInt8 nNextChrSetId; // first unused ChrSet-Id @@ -1142,7 +1142,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) aTextFillColor = pGS->aTextFillCol; aBackgroundColor = pGS->aBackgroundCol; maFont = pGS->aFont; - maLastFont = Font(); // set maLastFont != maFont -> so that + maLastFont = vcl::Font(); // set maLastFont != maFont -> so that delete pGS; sal_uInt32 nCurrentPos = mpPS->Tell(); if ( nCurrentPos - 3 == mnLatestPush ) @@ -2138,7 +2138,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const lo return; if ( mnTextMode == 0 ) // using glpyh outlines { - Font aNotRotatedFont( maFont ); + vcl::Font aNotRotatedFont( maFont ); aNotRotatedFont.SetOrientation( 0 ); VirtualDevice aVirDev( 1 ); diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx index 5cf89f42c544..ba8f3fe0022e 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx @@ -190,7 +190,7 @@ bool DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle, { long nColor; Color aColor; - Font aFont; + vcl::Font aFont; nAngle=-nAngle; while (nAngle>3600) nAngle-=3600; diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/filter/source/graphicfilter/idxf/dxf2mtf.hxx index 7d7dca35526a..354cd09734ab 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.hxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.hxx @@ -51,7 +51,7 @@ private: DXFLineInfo aParentLayerDXFLineInfo; Color aActLineColor; Color aActFillColor; - Font aActFont; + vcl::Font aActFont; sal_uLong CountEntities(const DXFEntities & rEntities); diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 645373b99e31..20a48869e638 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -443,7 +443,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead, { GDIMetaFile aMtf; VirtualDevice aVDev; - Font aFont; + vcl::Font aFont; aVDev.EnableOutput( false ); aMtf.Record( &aVDev ); diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 344041e19327..5c01273bac08 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -234,7 +234,7 @@ struct OSPath struct OSFont { OSFont * pSucc; sal_uLong nID; - Font aFont; + vcl::Font aFont; }; struct OSBitmap { @@ -980,7 +980,7 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1 Point aP0; sal_uInt16 i, nLen; OSFont * pF; - Font aFont; + vcl::Font aFont; Size aSize; pF = pFontList; diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index e3138e65f3e1..7b313364c02f 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -164,7 +164,7 @@ private: RasterOp eActROP; PictDrawingMethod eActMethod; Size aActOvalSize; - Font aActFont; + vcl::Font aActFont; Fraction aHRes; Fraction aVRes; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index f2c915eb164a..197b8696ea84 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2124,7 +2124,7 @@ bool SdrPowerPointImport::ReadFontCollection() PptFontEntityAtom* pFont = new PptFontEntityAtom; ReadPptFontEntityAtom( rStCtrl, *pFont ); - Font aFont; + vcl::Font aFont; aFont.SetCharSet( pFont->eCharSet ); aFont.SetName( pFont->aName ); aFont.SetFamily( pFont->eFamily ); @@ -3085,7 +3085,7 @@ void SdrEscherImport::ImportHeaderFooterContainer( DffRecordHeader& rHd, HeaderF // no longer needed sal_Unicode SdrPowerPointImport::PPTSubstitute( sal_uInt16 /*nFont*/, sal_Unicode /*nChar*/, - sal_uInt32& /*nMappedFontId*/, Font& /*rFont*/, char /*nDefault*/) const + sal_uInt32& /*nMappedFontId*/, vcl::Font& /*rFont*/, char /*nDefault*/) const { return 0; } @@ -3600,7 +3600,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nFont ); if ( pFontEnityAtom ) { - Font aFont; + vcl::Font aFont; aFont.SetCharSet( pFontEnityAtom->eCharSet ); aFont.SetName( pFontEnityAtom->aName ); aFont.SetFamily( pFontEnityAtom->eFamily ); @@ -3659,7 +3659,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx PptFontEntityAtom* pFontEnityAtom = rManager.GetFontEnityAtom( nFont ); if ( pFontEnityAtom ) { - Font aFont; + vcl::Font aFont; aFont.SetCharSet( pFontEnityAtom->eCharSet ); aFont.SetName( pFontEnityAtom->aName ); aFont.SetFamily( pFontEnityAtom->eFamily ); @@ -3676,7 +3676,7 @@ bool PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, SvxNumberFormat& rNumberFormat, sal_uInt32 /*nLevel*/) { - Font aFont; + vcl::Font aFont; PptFontEntityAtom* pAtom = rManager.GetFontEnityAtom( nBulletFont ); if ( pAtom ) { diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index 565a87d0f7de..b1dd2a5cd99b 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -49,7 +49,7 @@ SVGFontExport::~SVGFontExport() -SVGFontExport::GlyphSet& SVGFontExport::implGetGlyphSet( const Font& rFont ) +SVGFontExport::GlyphSet& SVGFontExport::implGetGlyphSet( const vcl::Font& rFont ) { FontWeight eWeight( WEIGHT_NORMAL ); FontItalic eItalic( ITALIC_NONE ); @@ -174,7 +174,7 @@ void SVGFontExport::implCollectGlyphs() -void SVGFontExport::implEmbedFont( const Font& rFont ) +void SVGFontExport::implEmbedFont( const vcl::Font& rFont ) { if( mrExport.IsEmbedFonts() ) { @@ -190,7 +190,7 @@ void SVGFontExport::implEmbedFont( const Font& rFont ) OUString aCurIdStr( aEmbeddedFontStr ); OUString aUnitsPerEM( OUString::number( nFontEM ) ); VirtualDevice aVDev; - Font aFont( rFont ); + vcl::Font aFont( rFont ); aFont.SetSize( Size( 0, nFontEM ) ); aFont.SetAlign( ALIGN_BASELINE ); @@ -309,7 +309,7 @@ void SVGFontExport::EmbedFonts() while( aFontItalicIter != rFontItalicMap.end() ) { - Font aFont; + vcl::Font aFont; aFont.SetName( (*aGlyphTreeIter).first ); aFont.SetWeight( (*aFontWeightIter).first ); diff --git a/filter/source/svg/svgfontexport.hxx b/filter/source/svg/svgfontexport.hxx index 9ef5059eb306..771d565f173c 100644 --- a/filter/source/svg/svgfontexport.hxx +++ b/filter/source/svg/svgfontexport.hxx @@ -37,7 +37,7 @@ class ObjectRepresentation; class SVGExport; -class Font; +namespace vcl { class Font; } class OutputDevice; @@ -57,9 +57,9 @@ private: ObjectVector maObjects; sal_Int32 mnCurFontId; - GlyphSet& implGetGlyphSet( const Font& rFont ); + GlyphSet& implGetGlyphSet( const vcl::Font& rFont ); void implCollectGlyphs(); - void implEmbedFont( const Font& rFont ); + void implEmbedFont( const vcl::Font& rFont ); void implEmbedGlyph( OutputDevice& rOut, const OUString& rCellStr ); public: @@ -68,7 +68,7 @@ public: ~SVGFontExport(); void EmbedFonts(); - OUString GetMappedFontName( const OUString& rFontName ) const; + OUString GetMappedFontName( const OUString& rFontName ) const; }; #endif diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index af413b72ec45..5eb5bb4cbf46 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -289,7 +289,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie rGradientId = ""; } -void SVGAttributeWriter::SetFontAttr( const Font& rFont ) +void SVGAttributeWriter::SetFontAttr( const vcl::Font& rFont ) { if( rFont != maCurFont ) { @@ -1155,7 +1155,7 @@ void SVGTextWriter::startTextShape() { mbIsTextShapeStarted = true; - maParentFont = Font(); + maParentFont = vcl::Font(); mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "TextShape" ); mpTextShapeElem = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemText, true, mbIWS ); startTextParagraph(); @@ -1210,7 +1210,7 @@ void SVGTextWriter::startTextParagraph() { mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "TextParagraph" ); } - maParentFont = Font(); + maParentFont = vcl::Font(); addFontAttributes( /* isTexTContainer: */ true ); mpTextParagraphElem = new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS ); if( !mbIsListLevelStyleImage ) @@ -1246,7 +1246,7 @@ void SVGTextWriter::startTextPosition( bool bExportX, bool bExportY ) mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, OUString::number( maTextPos.Y() ) ); // if text is rotated, set transform matrix at new tspan element - const Font& rFont = mpVDev->GetFont(); + const vcl::Font& rFont = mpVDev->GetFont(); if( rFont.GetOrientation() ) { Point aRot( maTextPos ); @@ -1528,7 +1528,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos, Point aPos; Point aBaseLinePos( rPos ); const FontMetric aMetric( mpVDev->GetFontMetric() ); - const Font& rFont = mpVDev->GetFont(); + const vcl::Font& rFont = mpVDev->GetFont(); if( rFont.GetAlign() == ALIGN_TOP ) aBaseLinePos.Y() += aMetric.GetAscent(); @@ -2408,7 +2408,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText, Point aPos; Point aBaseLinePos( rPos ); const FontMetric aMetric( mpVDev->GetFontMetric() ); - const Font& rFont = mpVDev->GetFont(); + const vcl::Font& rFont = mpVDev->GetFont(); if( rFont.GetAlign() == ALIGN_TOP ) aBaseLinePos.Y() += aMetric.GetAscent(); @@ -3432,7 +3432,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { if( mrExport.IsUsePositionedCharacters() ) { - Font aFont = ImplSetCorrectFontHeight(); + vcl::Font aFont = ImplSetCorrectFontHeight(); mpContext->SetFontAttr( aFont ); ImplWriteText( pA->GetPoint(), aText, NULL, 0 ); } @@ -3456,7 +3456,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { if( mrExport.IsUsePositionedCharacters() ) { - Font aFont = ImplSetCorrectFontHeight(); + vcl::Font aFont = ImplSetCorrectFontHeight(); mpContext->SetFontAttr( aFont ); ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0 ); } @@ -3479,7 +3479,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { if( mrExport.IsUsePositionedCharacters() ) { - Font aFont = ImplSetCorrectFontHeight(); + vcl::Font aFont = ImplSetCorrectFontHeight(); mpContext->SetFontAttr( aFont ); ImplWriteText( pA->GetPoint(), aText, pA->GetDXArray(), 0 ); } @@ -3503,7 +3503,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, { if( mrExport.IsUsePositionedCharacters() ) { - Font aFont = ImplSetCorrectFontHeight(); + vcl::Font aFont = ImplSetCorrectFontHeight(); mpContext->SetFontAttr( aFont ); ImplWriteText( pA->GetPoint(), aText, NULL, pA->GetWidth() ); } @@ -3561,10 +3561,10 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, } } -Font SVGActionWriter::ImplSetCorrectFontHeight() const +vcl::Font SVGActionWriter::ImplSetCorrectFontHeight() const { - Font aFont( mpVDev->GetFont() ); - Size aSz; + vcl::Font aFont( mpVDev->GetFont() ); + Size aSz; ImplMap( Size( 0, aFont.GetHeight() ), aSz ); diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index c4450a093382..24511423d9e7 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -92,7 +92,7 @@ class SVGAttributeWriter { private: - Font maCurFont; + vcl::Font maCurFont; Color maCurLineColor; Color maCurFillColor; SVGExport& mrExport; @@ -117,7 +117,7 @@ public: void AddPaintAttr( const Color& rLineColor, const Color& rFillColor, const Rectangle* pObjBoundRect = NULL, const Gradient* pFillGradient = NULL ); - void SetFontAttr( const Font& rFont ); + void SetFontAttr( const vcl::Font& rFont ); void startFontSettings(); void endFontSettings(); void setFontFamily(); @@ -205,20 +205,20 @@ class SVGTextWriter sal_Int32 mnLeftTextPortionLength; Point maTextPos; long int mnTextWidth; - bool mbPositioningNeeded; - bool mbIsNewListItem; + bool mbPositioningNeeded; + bool mbIsNewListItem; sal_Int16 meNumberingType; sal_Unicode mcBulletChar; BulletListItemInfoMap maBulletListItemMap; - bool mbIsListLevelStyleImage; - bool mbLineBreak; - bool mbIsURLField; - OUString msUrl; - OUString msHyperlinkIdList; - bool mbIsPlacehlolderShape; - bool mbIWS; - Font maCurrentFont; - Font maParentFont; + bool mbIsListLevelStyleImage; + bool mbLineBreak; + bool mbIsURLField; + OUString msUrl; + OUString msHyperlinkIdList; + bool mbIsPlacehlolderShape; + bool mbIWS; + vcl::Font maCurrentFont; + vcl::Font maParentFont; public: SVGTextWriter( SVGExport& rExport ); @@ -377,7 +377,7 @@ private: const Reference< XShape >* pXShape = NULL, const GDIMetaFile* pTextEmbeddedBitmapMtf = NULL ); - Font ImplSetCorrectFontHeight() const; + vcl::Font ImplSetCorrectFontHeight() const; public: diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index 1a1cb0cb6250..3d4ebcdd4d9a 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -61,7 +61,7 @@ namespace frm pPool->SetDefaultMetric( (SfxMapUnit)( aDeviceMapMode.GetMapUnit() ) ); // defaults - Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont(); + vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetAppFont(); aFont.SetName( "Times New Roman" ); pPool->SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ) ); diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index 75b2f4f98371..61ce2c161842 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -126,7 +126,7 @@ public: void SetArgName(const OUString &aArg); OUString GetArgName(); - void SetArgNameFont(const Font&); + void SetArgNameFont(const vcl::Font&); void SetArgVal(const OUString &aVal); OUString GetArgVal(); diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 5b620117afb9..25dde889fd67 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -198,9 +198,9 @@ namespace formula OString aActivWinId; bool bIsShutDown; - Font aFntBold; - Font aFntLight; - sal_uInt16 nEdFocus; + vcl::Font aFntBold; + vcl::Font aFntLight; + sal_uInt16 nEdFocus; bool bEditFlag; const IFunctionDescription* pFuncDesc; sal_Int32 nArgs; diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index bb700b22ff84..a6ca58b37c66 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -184,7 +184,7 @@ OUString ArgInput::GetArgName() } //Sets the Name for the Argument -void ArgInput::SetArgNameFont (const Font &aFont) +void ArgInput::SetArgNameFont (const vcl::Font &aFont) { if(pFtArg !=NULL) pFtArg->SetFont(aFont); } diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 8017ed3baf0b..d499a6d6d57c 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -296,7 +296,7 @@ void ParaWin::DelParaArray() ::std::vector<OUString>().swap(aParaArray); } -void ParaWin::SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont) +void ParaWin::SetArgumentFonts(const vcl::Font&aBoldFont,const vcl::Font&aLightFont) { aFntBold=aBoldFont; aFntLight=aLightFont; @@ -366,7 +366,7 @@ void ParaWin::SetArgName(sal_uInt16 no,const OUString& aText) aArgInput[no].UpdateAccessibleNames(); } -void ParaWin::SetArgNameFont(sal_uInt16 no,const Font& aFont) +void ParaWin::SetArgNameFont(sal_uInt16 no,const vcl::Font& aFont) { aArgInput[no].SetArgNameFont(aFont); } diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index 2db916204b9f..adb2e74e862b 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -53,8 +53,8 @@ private: const IFunctionDescription* pFuncDesc; IControlReferenceHandler* pMyParent; sal_uInt16 nArgs; // unsuppressed arguments - Font aFntBold; - Font aFntLight; + vcl::Font aFntBold; + vcl::Font aFntLight; FixedText *m_pFtEditDesc; FixedText *m_pFtArgName; @@ -114,7 +114,7 @@ protected: void SetArgName (sal_uInt16 no,const OUString &aArg); - void SetArgNameFont (sal_uInt16 no,const Font&); + void SetArgNameFont (sal_uInt16 no,const vcl::Font&); void SetArgVal (sal_uInt16 no,const OUString &aArg); void HideParaLine(sal_uInt16 no); @@ -142,7 +142,7 @@ public: OUString GetArgument(sal_uInt16 no); void SetArgument(sal_uInt16 no, const OUString& aString); - void SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont); + void SetArgumentFonts(const vcl::Font& aBoldFont,const vcl::Font& aLightFont); void SetEdFocus(sal_uInt16 nEditLine); //Sichtbare Editzeilen sal_uInt16 GetSliderPos(); diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx index b5934e4d354c..74a9de07f7d4 100644 --- a/formula/source/ui/dlg/structpg.cxx +++ b/formula/source/ui/dlg/structpg.cxx @@ -37,7 +37,7 @@ StructListBox::StructListBox(Window* pParent, WinBits nBits ): { bActiveFlag=false; - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); Size aSize = aFont.GetSize(); aSize.Height() -= 2; aFont.SetSize( aSize ); diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index b2542d92165f..bf0ac99eec8f 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -269,7 +269,7 @@ void ComplexToolbarController::addNotifyInfo( sal_Int32 ComplexToolbarController::getFontSizePixel( const Window* pWindow ) { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - const Font& rFont = rSettings.GetAppFont(); + const vcl::Font& rFont = rSettings.GetAppFont(); // Calculate height of the application font used by window sal_Int32 nHeight = sal_Int32( rFont.GetHeight() ); diff --git a/include/drawinglayer/primitive2d/textlayoutdevice.hxx b/include/drawinglayer/primitive2d/textlayoutdevice.hxx index 4bb4bc2f1ea6..024e7b45d950 100644 --- a/include/drawinglayer/primitive2d/textlayoutdevice.hxx +++ b/include/drawinglayer/primitive2d/textlayoutdevice.hxx @@ -30,7 +30,7 @@ // predefines class VirtualDevice; -class Font; +namespace vcl { class Font; } namespace rtl { class OUString; }; @@ -65,7 +65,7 @@ namespace drawinglayer ~TextLayouterDevice(); /// tooling methods - void setFont(const Font& rFont); + void setFont(const vcl::Font& rFont); void setFontAttribute( const attribute::FontAttribute& rFontAttribute, double fFontScaleX, @@ -125,7 +125,7 @@ namespace drawinglayer both defines FontStretching, where no stretching happens at fFontScaleY == fFontScaleX */ - Font DRAWINGLAYER_DLLPUBLIC getVclFontFromFontAttribute( + vcl::Font DRAWINGLAYER_DLLPUBLIC getVclFontFromFontAttribute( const attribute::FontAttribute& rFontAttribute, double fFontScaleX, double fFontScaleY, @@ -139,7 +139,7 @@ namespace drawinglayer */ attribute::FontAttribute DRAWINGLAYER_DLLPUBLIC getFontAttributeFromVclFont( basegfx::B2DVector& o_rSize, - const Font& rFont, + const vcl::Font& rFont, bool bRTL, bool bBiDiStrong); diff --git a/include/editeng/bulletitem.hxx b/include/editeng/bulletitem.hxx index 1dbb47388ed7..5af465bde828 100644 --- a/include/editeng/bulletitem.hxx +++ b/include/editeng/bulletitem.hxx @@ -61,7 +61,7 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem { - Font aFont; + vcl::Font aFont; GraphicObject* pGraphicObject; OUString aPrevText; OUString aFollowText; @@ -98,7 +98,7 @@ public: long GetWidth() const { return nWidth; } sal_uInt16 GetStyle() const { return nStyle; } sal_uInt8 GetJustification() const { return nJustify; } - Font GetFont() const { return aFont; } + vcl::Font GetFont() const { return aFont; } sal_uInt16 GetScale() const { return nScale; } const GraphicObject& GetGraphicObject() const; @@ -112,7 +112,7 @@ public: void SetWidth( long nNew ) { nWidth = nNew; } void SetStyle( sal_uInt16 nNew ) { nStyle = nNew; } void SetJustification( sal_uInt8 nNew ) { nJustify = nNew; } - void SetFont( const Font& rNew) { aFont = rNew; } + void SetFont( const vcl::Font& rNew) { aFont = rNew; } void SetScale( sal_uInt16 nNew ) { nScale = nNew; } virtual sal_uInt16 GetVersion(sal_uInt16 nFileVersion) const SAL_OVERRIDE; @@ -122,8 +122,8 @@ public: SfxMapUnit ePresMetric, OUString &rText, const IntlWrapper * = 0 ) const SAL_OVERRIDE; - static void StoreFont( SvStream&, const Font& ); - static Font CreateFont( SvStream&, sal_uInt16 nVer ); + static void StoreFont( SvStream&, const vcl::Font& ); + static vcl::Font CreateFont( SvStream&, sal_uInt16 nVer ); sal_uInt16& GetValidMask() { return nValidMask; } sal_uInt16 GetValidMask() const { return nValidMask; } diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index c9f73e80959c..715d519ec2ae 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -74,7 +74,7 @@ class SvxCharSetColorItem; class SfxUndoAction; class MapMode; class Color; -class Font; +namespace vcl { class Font; } class KeyEvent; class PolyPolygon; class Size; @@ -308,7 +308,7 @@ public: bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const; const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ); - Font GetStandardFont( sal_Int32 nPara ); + vcl::Font GetStandardFont( sal_Int32 nPara ); SvxFont GetStandardSvxFont( sal_Int32 nPara ); void RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich ); @@ -502,9 +502,9 @@ public: static bool DoesKeyChangeText( const KeyEvent& rKeyEvent ); static bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent ); static bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); - static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const Font& rFont ); + static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const vcl::Font& rFont ); static void SetFontInfoInItemSet( SfxItemSet& rItemSet, const SvxFont& rFont ); - static Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ); + static vcl::Font CreateFontFromItemSet( const SfxItemSet& rItemSet, sal_uInt16 nScriptType ); static SvxFont CreateSvxFontFromItemSet( const SfxItemSet& rItemSet ); static bool IsPrintable( sal_Unicode c ) { return ( ( c >= 32 ) && ( c != 127 ) ); } static bool HasValidData( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rTransferable ); diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index a6842dd67d3b..62c37d942cca 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -47,7 +47,7 @@ class Range; class SvStream; class SvKeyValueIterator; class SfxStyleSheet; -class Font; +namespace vcl { class Font; } class FontList; class OutputDevice; @@ -194,7 +194,7 @@ public: sal_Int32 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); bool HasConvertibleTextPortion( LanguageType nLang ); void TransliterateText( sal_Int32 nTransliterationMode ); diff --git a/include/editeng/hangulhanja.hxx b/include/editeng/hangulhanja.hxx index 8c7c2db50f0a..178e6be93cd8 100644 --- a/include/editeng/hangulhanja.hxx +++ b/include/editeng/hangulhanja.hxx @@ -114,7 +114,7 @@ namespace editeng const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const ::com::sun::star::lang::Locale& _rSourceLocale, const ::com::sun::star::lang::Locale& _rTargetLocale, - const Font* _pTargetFont, + const vcl::Font* _pTargetFont, sal_Int32 nOptions, bool _bIsInteractive ); @@ -126,7 +126,7 @@ namespace editeng LanguageType GetSourceLanguage() const; LanguageType GetTargetLanguage() const; - const Font * GetTargetFont() const; + const vcl::Font* GetTargetFont() const; sal_Int32 GetConversionOptions() const; bool IsInteractive() const; diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx index 8f6882f3d463..3b24d564736d 100644 --- a/include/editeng/numitem.hxx +++ b/include/editeng/numitem.hxx @@ -34,7 +34,7 @@ #include <editeng/editengdllapi.h> class SvxBrushItem; -class Font; +namespace vcl { class Font; } class Graphic; class SvxNodeNum; namespace com{namespace sun{ namespace star{ @@ -147,7 +147,7 @@ private: sal_Int16 eVertOrient; // vertical alignment of a bitmap Size aGraphicSize; // Always! in 1/100 mm - Font* pBulletFont; // Pointer to the bullet font + vcl::Font* pBulletFont; // Pointer to the bullet font OUString sCharStyleName; // Character Style @@ -177,8 +177,8 @@ public: void SetCharFmtName(const OUString& rSet){ sCharStyleName = rSet; } virtual OUString GetCharFmtName()const; - void SetBulletFont(const Font* pFont); - const Font* GetBulletFont() const {return pBulletFont;} + void SetBulletFont(const vcl::Font* pFont); + const vcl::Font* GetBulletFont() const {return pBulletFont;} void SetBulletChar(sal_Unicode cSet){cBullet = cSet;} sal_Unicode GetBulletChar()const {return cBullet;} void SetBulletRelSize(sal_uInt16 nSet) {nBulletRelSize = nSet;} diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 1b47f6f1ab70..18ac8316d799 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -283,7 +283,7 @@ public: sal_Int32 StartSearchAndReplace( const SvxSearchItem& rSearchItem ); // for text conversion - void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); + void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); void TransliterateText( sal_Int32 nTransliterationMode ); @@ -633,7 +633,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster void ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount ); long ImpCalcMaxBulletWidth( sal_Int32 nPara, const SvxBulletItem& rBullet ); - Font ImpCalcBulletFont( sal_Int32 nPara ) const; + vcl::Font ImpCalcBulletFont( sal_Int32 nPara ) const; Rectangle ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bReturnPaperPos ); long ImpGetTextIndent( sal_Int32 nPara ); bool ImpCanIndentSelectedPages( OutlinerView* pCurView ); diff --git a/include/editeng/svxfont.hxx b/include/editeng/svxfont.hxx index e9487b5ee0c7..51a0c0dcdde6 100644 --- a/include/editeng/svxfont.hxx +++ b/include/editeng/svxfont.hxx @@ -36,7 +36,7 @@ class Point; class Rectangle; class Size; -class EDITENG_DLLPUBLIC SvxFont : public Font +class EDITENG_DLLPUBLIC SvxFont : public vcl::Font { SvxCaseMap eCaseMap; // Text Markup short nEsc; // Degree of Superscript/Subscript @@ -45,7 +45,7 @@ class EDITENG_DLLPUBLIC SvxFont : public Font public: SvxFont(); - SvxFont( const Font &rFont ); + SvxFont( const vcl::Font &rFont ); SvxFont( const SvxFont &rFont ); // Methods for Superscript/Subscript @@ -77,7 +77,7 @@ public: void DoOnCapitals(SvxDoCapitals &rDo) const; void SetPhysFont( OutputDevice *pOut ) const; - Font ChgPhysFont( OutputDevice *pOut ) const; + vcl::Font ChgPhysFont( OutputDevice *pOut ) const; Size GetCapitalSize( const OutputDevice *pOut, const OUString &rTxt, const sal_Int32 nIdx, const sal_Int32 nLen) const; diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx index 33a8339c0423..9e516cdc4ad3 100644 --- a/include/editeng/svxrtf.hxx +++ b/include/editeng/svxrtf.hxx @@ -32,7 +32,7 @@ #include <boost/ptr_container/ptr_map.hpp> #include <boost/ptr_container/ptr_vector.hpp> -class Font; +namespace vcl { class Font; } class Color; class Graphic; class DateTime; @@ -78,7 +78,7 @@ public: typedef Color* ColorPtr; typedef std::deque< ColorPtr > SvxRTFColorTbl; -typedef boost::ptr_map<short, Font> SvxRTFFontTbl; +typedef boost::ptr_map<short, vcl::Font> SvxRTFFontTbl; typedef boost::ptr_map<sal_uInt16, SvxRTFStyleType> SvxRTFStyleTbl; // SvxRTFItemStack can't be "std::stack< SvxRTFItemStackType* >" type, because @@ -190,7 +190,7 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser SvxPosition* pInsPos; SfxItemPool* pAttrPool; Color* pDfltColor; - Font* pDfltFont; + vcl::Font* pDfltFont; ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties> m_xDocProps; SfxItemSet *pRTFDefaults; @@ -326,7 +326,7 @@ public: virtual SvParserState CallParser() SAL_OVERRIDE; inline const Color& GetColor( size_t nId ) const; - const Font& GetFont( sal_uInt16 nId ); // Changes the default Font + const vcl::Font& GetFont( sal_uInt16 nId ); // Changes the default Font virtual bool IsEndPara( SvxNodeIdx* pNd, sal_Int32 nCnt ) const = 0; diff --git a/include/editeng/swafopt.hxx b/include/editeng/swafopt.hxx index 25e1017df56a..7bfcb353f3e5 100644 --- a/include/editeng/swafopt.hxx +++ b/include/editeng/swafopt.hxx @@ -61,8 +61,8 @@ public: // Class of options for AutoFormat struct EDITENG_DLLPUBLIC SvxSwAutoFmtFlags { - Font aBulletFont; - Font aByInputBulletFont; + vcl::Font aBulletFont; + vcl::Font aByInputBulletFont; /// only valid inside the Dialog!!! const editeng::SortedAutoCompleteStrings * m_pAutoCompleteList; SmartTagMgr* pSmartTagMgr; diff --git a/include/editeng/unofdesc.hxx b/include/editeng/unofdesc.hxx index 6d644170abbd..79fd8bb36050 100644 --- a/include/editeng/unofdesc.hxx +++ b/include/editeng/unofdesc.hxx @@ -29,8 +29,8 @@ class EDITENG_DLLPUBLIC SvxUnoFontDescriptor { public: - static void ConvertToFont( const ::com::sun::star::awt::FontDescriptor& rDesc, Font& rFont ); - static void ConvertFromFont( const Font& rFont, ::com::sun::star::awt::FontDescriptor& rDesc ); + static void ConvertToFont( const ::com::sun::star::awt::FontDescriptor& rDesc, vcl::Font& rFont ); + static void ConvertFromFont( const vcl::Font& rFont, ::com::sun::star::awt::FontDescriptor& rDesc ); static void FillItemSet( const ::com::sun::star::awt::FontDescriptor& rDesc, SfxItemSet& rSet ); static void FillFromItemSet( const SfxItemSet& rSet, ::com::sun::star::awt::FontDescriptor& rDesc ); diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index cd3b65b95b07..74c044233cb1 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -616,7 +616,7 @@ public: sal_uInt16 nFont, sal_Unicode nChar, sal_uInt32& nMappedFontId, - Font& rFont, + vcl::Font& rFont, char nDefault ) const; const PptDocumentAtom& GetDocumentAtom() const { return aDocAtom; } diff --git a/include/postx.h b/include/postx.h index 677af6876627..bb97adb09921 100644 --- a/include/postx.h +++ b/include/postx.h @@ -26,7 +26,6 @@ /* X Types */ #undef Window -#undef Font #undef Region #undef Icon #undef Time diff --git a/include/prex.h b/include/prex.h index 6a0db3676e66..63d93906623a 100644 --- a/include/prex.h +++ b/include/prex.h @@ -27,7 +27,6 @@ /* Types from <X11/X.h> that clash with LO's identifiers * and we don't need. */ -#define Font HIDE_XLIB_Font #define Icon HIDE_XLIB_Icon /* Types from <X11/X.h> that clash, but we do use. */ diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx index ee4fd7fa75aa..e1295f948efd 100644 --- a/include/sfx2/thumbnailviewitem.hxx +++ b/include/sfx2/thumbnailviewitem.hxx @@ -35,7 +35,7 @@ const int THUMBNAILVIEW_ITEM_CORNER = 5; class CheckBox; -class Font; +namespace vcl { class Font; } class Window; class ThumbnailView; diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index 4bbe97f4ee6b..c4e1b998772a 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -445,11 +445,11 @@ public: bool GetUpdateMode() const; // map-mode and font control - void SetFont( const Font& rNewFont ); - const Font& GetFont() const { return pDataWin->GetFont(); } - void SetTitleFont( const Font& rNewFont ) + void SetFont( const vcl::Font& rNewFont ); + const vcl::Font& GetFont() const { return pDataWin->GetFont(); } + void SetTitleFont( const vcl::Font& rNewFont ) { Control::SetFont( rNewFont ); } - const Font& GetTitleFont() const { return Control::GetFont(); } + const vcl::Font& GetTitleFont() const { return Control::GetFont(); } // color for line painting void SetGridLineColor(const Color& rColor) {aGridLineColor = rColor;} diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index e2d042a7f9b7..03b5d2345e34 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -228,7 +228,7 @@ private: using Window::ImplInit; SVT_DLLPRIVATE void ImplInit( WinBits nWinStyle ); SVT_DLLPRIVATE void ImplInitSettings(); - SVT_DLLPRIVATE void ImplGetWeekFont( Font& rFont ) const; + SVT_DLLPRIVATE void ImplGetWeekFont( vcl::Font& rFont ) const; SVT_DLLPRIVATE void ImplFormat(); using Window::ImplHitTest; SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, Date& rDate ) const; diff --git a/include/svtools/hyperlabel.hxx b/include/svtools/hyperlabel.hxx index ff68064673dd..aa38892b60ab 100644 --- a/include/svtools/hyperlabel.hxx +++ b/include/svtools/hyperlabel.hxx @@ -45,8 +45,8 @@ namespace svt virtual void GetFocus() SAL_OVERRIDE; virtual void LoseFocus() SAL_OVERRIDE; - void DeactivateHyperMode(Font aFont, const Color aColor); - void ActivateHyperMode(Font aFont, const Color aColor); + void DeactivateHyperMode(vcl::Font aFont, const Color aColor); + void ActivateHyperMode(vcl::Font aFont, const Color aColor); protected: void implInit(); diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index 1b4cba84747b..f93200899de3 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -269,8 +269,8 @@ public: bool SetChoiceWithCursor ( bool bDo = true ); - void SetFont( const Font& rFont ); - void SetPointFont( const Font& rFont ); + void SetFont( const vcl::Font& rFont ); + void SetPointFont( const vcl::Font& rFont ); void SetClickHdl( const Link& rLink ) { _aClickIconHdl = rLink; } const Link& GetClickHdl() const { return _aClickIconHdl; } diff --git a/include/svtools/sampletext.hxx b/include/svtools/sampletext.hxx index 6deacc3a315a..c241e19a7500 100644 --- a/include/svtools/sampletext.hxx +++ b/include/svtools/sampletext.hxx @@ -17,12 +17,12 @@ #include <vcl/fontcapabilities.hxx> class OutputDevice; -class Font; +namespace vcl { class Font; } SVT_DLLPUBLIC UScriptCode otCoverageToScript(vcl::UnicodeCoverage::UnicodeCoverageEnum eOTCoverage); -SVT_DLLPUBLIC bool isSymbolFont(const Font &rFont); -SVT_DLLPUBLIC bool isOpenSymbolFont(const Font &rFont); +SVT_DLLPUBLIC bool isSymbolFont(const vcl::Font &rFont); +SVT_DLLPUBLIC bool isOpenSymbolFont(const vcl::Font &rFont); SVT_DLLPUBLIC bool canRenderNameOfSelectedFont(OutputDevice &rDevice); @@ -36,7 +36,7 @@ SVT_DLLPUBLIC OUString makeShortRepresentativeTextForScript(UScriptCode eScript) SVT_DLLPUBLIC OUString makeShortMinimalTextForScript(UScriptCode eScript); //These ones are typically for use in the font preview window in format character -SVT_DLLPUBLIC OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const Font &rFont); +SVT_DLLPUBLIC OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const vcl::Font &rFont); SVT_DLLPUBLIC OUString makeRepresentativeTextForLanguage(LanguageType eLang); SVT_DLLPUBLIC OUString makeRepresentativeTextForScript(UScriptCode eScript); SVT_DLLPUBLIC OUString makeMinimalTextForScript(UScriptCode eScript); diff --git a/include/svtools/scriptedtext.hxx b/include/svtools/scriptedtext.hxx index 6b8248c99a73..45f602b9239c 100644 --- a/include/svtools/scriptedtext.hxx +++ b/include/svtools/scriptedtext.hxx @@ -25,7 +25,7 @@ class OutputDevice; -class Font; +namespace vcl { class Font; } class SvtScriptedTextHelper_Impl; class Size; class Point; @@ -64,7 +64,7 @@ public: The font for asian characters. @param _pCmplxFont The font for complex text layout. */ - void SetFonts( Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ); + void SetFonts( vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ); /** Sets the default font of the current output device to all script types. */ void SetDefaultFont(); diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index f5b1e8330a50..12b75979f922 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -527,11 +527,11 @@ protected: using SvListView::SelectAll; SVT_DLLPRIVATE short GetHeightOffset( const Image& rBmp, Size& rLogicSize); - SVT_DLLPRIVATE short GetHeightOffset( const Font& rFont, Size& rLogicSize); + SVT_DLLPRIVATE short GetHeightOffset( const vcl::Font& rFont, Size& rLogicSize); SVT_DLLPRIVATE void SetEntryHeight( SvTreeListEntry* pEntry ); SVT_DLLPRIVATE void AdjustEntryHeight( const Image& rBmp ); - SVT_DLLPRIVATE void AdjustEntryHeight( const Font& rFont ); + SVT_DLLPRIVATE void AdjustEntryHeight( const vcl::Font& rFont ); SVT_DLLPRIVATE void ImpEntryInserted( SvTreeListEntry* pEntry ); SVT_DLLPRIVATE long PaintEntry1( SvTreeListEntry*, long nLine, @@ -596,7 +596,7 @@ protected: bool AreChildrenTransient() const; void SetChildrenNotTransient(); - void AdjustEntryHeightAndRecalc( const Font& rFont ); + void AdjustEntryHeightAndRecalc( const vcl::Font& rFont ); public: void SetExtendedWinBits( ExtendedWinBits _nBits ); @@ -712,7 +712,7 @@ public: void SetExpandedNodeBmp( const Image& ); Image GetExpandedNodeBmp( ) const; - void SetFont( const Font& rFont ); + void SetFont( const vcl::Font& rFont ); using Window::SetCursor; void SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect = false ); diff --git a/include/svx/charmap.hxx b/include/svx/charmap.hxx index ed48d5da24cf..073f4f10e6ae 100644 --- a/include/svx/charmap.hxx +++ b/include/svx/charmap.hxx @@ -45,7 +45,7 @@ public: SvxShowCharSet( Window* pParent ); virtual ~SvxShowCharSet(); - void SetFont( const Font& rFont ); + void SetFont( const vcl::Font& rFont ); void SelectCharacter( sal_uInt32 cNew, bool bFocus = false ); sal_UCS4 GetSelectCharacter() const; diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index e6b1c23eef84..36a6931e8190 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -38,7 +38,7 @@ class DialControlBmp : public VirtualDevice public: explicit DialControlBmp( Window& rParent ); - void InitBitmap(const Font& rFont); + void InitBitmap(const vcl::Font& rFont); void SetSize(const Size& rSize); void CopyBackground( const DialControlBmp& rSrc ); void DrawBackground( const Size& rSize, bool bEnabled ); @@ -135,7 +135,7 @@ protected: NumericField* mpLinkField; sal_Int32 mnLinkedFieldValueMultiplyer; Size maWinSize; - Font maWinFont; + vcl::Font maWinFont; sal_Int32 mnAngle; sal_Int32 mnInitialAngle; sal_Int32 mnOldAngle; @@ -144,7 +144,7 @@ protected: bool mbNoRot; explicit DialControl_Impl( Window& rParent ); - void Init( const Size& rWinSize, const Font& rWinFont ); + void Init( const Size& rWinSize, const vcl::Font& rWinFont ); void SetSize( const Size& rWinSize ); }; std::auto_ptr< DialControl_Impl > mpImpl; @@ -154,7 +154,7 @@ protected: void SetRotation( sal_Int32 nAngle, bool bBroadcast ); - void Init( const Size& rWinSize, const Font& rWinFont ); + void Init( const Size& rWinSize, const vcl::Font& rWinFont ); void Init( const Size& rWinSize ); private: diff --git a/include/svx/fontlb.hxx b/include/svx/fontlb.hxx index d0d6b9028751..d5a1b25bdff1 100644 --- a/include/svx/fontlb.hxx +++ b/include/svx/fontlb.hxx @@ -31,7 +31,7 @@ class SvLBoxFontString : public SvLBoxString { private: - Font maFont; /// The font used by this item. + vcl::Font maFont; /// The font used by this item. bool mbUseColor; /// true = use font color, false = default listbox color. public: @@ -40,7 +40,7 @@ public: SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rString, - const Font& rFont, + const vcl::Font& rFont, const Color* pColor = NULL ); virtual ~SvLBoxFontString(); @@ -62,10 +62,10 @@ public: class SVX_DLLPUBLIC SvxFontListBox : public SvTabListBox { private: - Font maStdFont; /// Used for entries without specific font. + vcl::Font maStdFont; /// Used for entries without specific font. // The following members are used to store additional parameters for InitEntry(). - Font maEntryFont; /// Current entry font used in InitEntry(). + vcl::Font maEntryFont; /// Current entry font used in InitEntry(). const Color* mpEntryColor; /// Current entry color used in InitEntry(). bool mbUseFont; /// true = Use maEntryFont/mpEntryColor in InitEntry(). @@ -75,7 +75,7 @@ public: /** Inserts a list entry and sets the font used for this entry. @param pColor The font color. NULL = use default listbox text color. */ void InsertFontEntry( - const OUString& rString, const Font& rFont, const Color* pColor = NULL ); + const OUString& rString, const vcl::Font& rFont, const Color* pColor = NULL ); /** Selects/deselects an entry specified by its position in the list box. */ void SelectEntryPos( sal_uLong nPos, bool bSelect = true ); diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index 8b73b5fb89e5..662b9b2501a2 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -217,7 +217,7 @@ public: }; private: - Font m_aDefaultFont; + vcl::Font m_aDefaultFont; Link m_aMasterStateProvider; Link m_aMasterSlotExecutor; diff --git a/include/svx/nbdtmg.hxx b/include/svx/nbdtmg.hxx index 79d257360ad0..0418f42c9dc1 100644 --- a/include/svx/nbdtmg.hxx +++ b/include/svx/nbdtmg.hxx @@ -102,7 +102,7 @@ class SVX_DLLPUBLIC BulletsSettings_Impl:public BulletsSettings { public: sal_Unicode cBulletChar; - Font aFont; + vcl::Font aFont; public: BulletsSettings_Impl(NBType eTy) @@ -259,7 +259,7 @@ class SVX_DLLPUBLIC BulletsTypeMgr: public NBOTypeMgrBase virtual OUString GetDescription(sal_uInt16 nIndex,bool isDefault=false) SAL_OVERRIDE; virtual bool IsCustomized(sal_uInt16 nIndex) SAL_OVERRIDE; sal_Unicode GetBulChar(sal_uInt16 nIndex); - Font GetBulCharFont(sal_uInt16 nIndex); + vcl::Font GetBulCharFont(sal_uInt16 nIndex); static BulletsTypeMgr& GetInstance(); }; diff --git a/include/toolkit/awt/vclxfont.hxx b/include/toolkit/awt/vclxfont.hxx index fda8de9e2de1..90516dfe17dc 100644 --- a/include/toolkit/awt/vclxfont.hxx +++ b/include/toolkit/awt/vclxfont.hxx @@ -41,7 +41,7 @@ class TOOLKIT_DLLPUBLIC VCLXFont : public ::com::sun::star::awt::XFont2, private: ::osl::Mutex maMutex; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; - Font maFont; + vcl::Font maFont; FontMetric* mpFontMetric; protected: @@ -52,8 +52,8 @@ public: VCLXFont(); virtual ~VCLXFont(); - void Init( ::com::sun::star::awt::XDevice& rxDev, const Font& rFont ); - const Font& GetFont() const { return maFont; } + void Init( ::com::sun::star::awt::XDevice& rxDev, const vcl::Font& rFont ); + const vcl::Font& GetFont() const { return maFont; } // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/include/toolkit/awt/vclxgraphics.hxx b/include/toolkit/awt/vclxgraphics.hxx index a9e302023c61..77c31790c51c 100644 --- a/include/toolkit/awt/vclxgraphics.hxx +++ b/include/toolkit/awt/vclxgraphics.hxx @@ -57,7 +57,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; OutputDevice* mpOutputDevice; - Font maFont; + vcl::Font maFont; Color maTextColor; Color maTextFillColor; Color maLineColor; @@ -77,7 +77,7 @@ public: void SetOutputDevice( OutputDevice* pOutDev ); OutputDevice* GetOutputDevice() const { return mpOutputDevice; } - const Font& GetFont() const { return maFont; } + const vcl::Font& GetFont() const { return maFont; } // ::com::sun::star::uno::XInterface ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx index d4a96e9d4062..42e7856842d7 100644 --- a/include/toolkit/helper/vclunohelper.hxx +++ b/include/toolkit/helper/vclunohelper.hxx @@ -98,9 +98,9 @@ public: @param rFont Font to be converted @return the new FontDescriptor */ - static ::com::sun::star::awt::FontDescriptor CreateFontDescriptor( const Font& rFont ); - static Font CreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr, const Font& rInitFont ); - static Font CreateFont( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& rxFont ); + static ::com::sun::star::awt::FontDescriptor CreateFontDescriptor( const vcl::Font& rFont ); + static vcl::Font CreateFont( const ::com::sun::star::awt::FontDescriptor& rDescr, const vcl::Font& rInitFont ); + static vcl::Font CreateFont( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont >& rxFont ); static ::com::sun::star::awt::SimpleFontMetric CreateFontMetric( const FontMetric& rFontMetric ); static float ConvertFontWidth( FontWidth eWidth ); static FontWidth ConvertFontWidth( float f ); diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 86e33a13ea55..c06ff8c766c8 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -140,7 +140,7 @@ protected: explicit PushButton( WindowType nType ); virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; @@ -320,7 +320,7 @@ public: protected: virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; @@ -441,7 +441,7 @@ protected: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual void ImplDrawCheckBoxState(); diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx index e4ed1e408f8c..02b1acb2669e 100644 --- a/include/vcl/ctrl.hxx +++ b/include/vcl/ctrl.hxx @@ -95,7 +95,7 @@ protected: const OUString& _rStr, sal_uInt16 _nStyle, MetricVector* _pVector, OUString* _pDisplayText ) const; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const; @@ -182,7 +182,7 @@ public: void SetReferenceDevice( OutputDevice* _referenceDevice ); OutputDevice* GetReferenceDevice() const; - Font GetUnzoomedControlPointFont() const; + vcl::Font GetUnzoomedControlPointFont() const; }; #endif // INCLUDED_VCL_CTRL_HXX diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index 5d41a1bf0852..966eacffd2bc 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -45,7 +45,7 @@ struct Impl_IMEInfos; #define EDIT_NOLIMIT SAL_MAX_INT32 #define EDIT_UPDATEDATA_TIMEOUT 350 -typedef OUString (*FncGetSpecialChars)( Window* pWin, const Font& rFont ); +typedef OUString (*FncGetSpecialChars)( Window* pWin, const vcl::Font& rFont ); class VCL_DLLPUBLIC TextFilter { diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx index e215e9911d6d..f875f19b7afc 100644 --- a/include/vcl/fixed.hxx +++ b/include/vcl/fixed.hxx @@ -51,7 +51,7 @@ public: SAL_DLLPRIVATE static sal_uInt16 ImplGetTextStyle( WinBits nWinBits ); protected: virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; @@ -106,7 +106,7 @@ private: protected: virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index 5e0b13481005..da9ae54480ea 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -34,6 +34,12 @@ class SvStream; class Impl_Font; class ImplFontAttributes; +namespace vcl { class Font; } +// need to first declare these outside the vcl namespace, or the friend declarations won't work right +VCL_DLLPUBLIC SvStream& ReadFont( SvStream& rIStm, vcl::Font& ); +VCL_DLLPUBLIC SvStream& WriteFont( SvStream& rOStm, const vcl::Font& ); + +namespace vcl { class VCL_DLLPUBLIC Font { @@ -127,12 +133,14 @@ public: { return !(Font::operator==( rFont )); } bool IsSameInstance( const Font& ) const; - friend VCL_DLLPUBLIC SvStream& ReadFont( SvStream& rIStm, Font& ); - friend VCL_DLLPUBLIC SvStream& WriteFont( SvStream& rOStm, const Font& ); + friend VCL_DLLPUBLIC SvStream& ::ReadFont( SvStream& rIStm, ::vcl::Font& ); + friend VCL_DLLPUBLIC SvStream& ::WriteFont( SvStream& rOStm, const ::vcl::Font& ); static Font identifyFont( const void* pBuffer, sal_uInt32 nLen ); }; +} + #endif // _VCL_FONT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index e248efe66b84..24d9e427de3b 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -40,7 +40,7 @@ namespace com { namespace sun { namespace star { namespace graphic { class XGrap class ImpGraphic; class OutputDevice; -class Font; +namespace vcl { class Font; } class GfxLink; class VCL_DLLPUBLIC GraphicConversionParameters @@ -147,7 +147,7 @@ public: const Point& rDestPt, const Size& rDestSize ) const; static void DrawEx( OutputDevice* pOutDev, const OUString& rText, - Font& rFont, const BitmapEx& rBitmap, + vcl::Font& rFont, const BitmapEx& rBitmap, const Point& rDestPt, const Size& rDestSize ); void StartAnimation( OutputDevice* pOutDev, diff --git a/include/vcl/group.hxx b/include/vcl/group.hxx index a8956de6c814..d600bb15041d 100644 --- a/include/vcl/group.hxx +++ b/include/vcl/group.hxx @@ -40,7 +40,7 @@ private: const Point& rPos, const Size& rSize, bool bLayout = false ); virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; diff --git a/include/vcl/inputctx.hxx b/include/vcl/inputctx.hxx index 9e18c167a265..ae7c4e753174 100644 --- a/include/vcl/inputctx.hxx +++ b/include/vcl/inputctx.hxx @@ -40,20 +40,20 @@ class VCL_DLLPUBLIC InputContext { private: - Font maFont; - sal_uLong mnOptions; + vcl::Font maFont; + sal_uLong mnOptions; public: InputContext() { mnOptions = 0; } InputContext( const InputContext& rInputContext ) : maFont( rInputContext.maFont ) { mnOptions = rInputContext.mnOptions; } - InputContext( const Font& rFont, sal_uLong nOptions = 0 ) : + InputContext( const vcl::Font& rFont, sal_uLong nOptions = 0 ) : maFont( rFont ) { mnOptions = nOptions; } - void SetFont( const Font& rFont ) { maFont = rFont; } - const Font& GetFont() const { return maFont; } + void SetFont( const vcl::Font& rFont ) { maFont = rFont; } + const vcl::Font& GetFont() const { return maFont; } void SetOptions( sal_uLong nOptions ) { mnOptions = nOptions; } sal_uLong GetOptions() const { return mnOptions; } diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index 1f0fd7964dbf..e2eead04c452 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -1325,9 +1325,9 @@ class VCL_DLLPUBLIC MetaFontAction : public MetaAction { private: - Font maFont; + vcl::Font maFont; - virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE; + virtual bool Compare( const MetaAction& ) const SAL_OVERRIDE; public: MetaFontAction(); @@ -1339,11 +1339,11 @@ public: virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE; virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE; - explicit MetaFontAction( const Font& ); + explicit MetaFontAction( const vcl::Font& ); virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE; - const Font& GetFont() const { return maFont; } + const vcl::Font& GetFont() const { return maFont; } }; class VCL_DLLPUBLIC MetaPushAction : public MetaAction diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx index a0ef28842df0..eb144507bd0a 100644 --- a/include/vcl/metric.hxx +++ b/include/vcl/metric.hxx @@ -32,7 +32,7 @@ typedef sal_uInt32 sal_UCS4; namespace vcl { // avoid problems where poppler's FontInfo is picked up -class VCL_DLLPUBLIC FontInfo : public Font +class VCL_DLLPUBLIC FontInfo : public vcl::Font { friend class ::OutputDevice; diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index df0cd270ed89..8089cc16bb5a 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -313,7 +313,7 @@ private: Region maRegion; // contains the clip region, see SetClipRegion(...) Color maLineColor; Color maFillColor; - Font maFont; + vcl::Font maFont; Color maTextColor; Color maTextLineColor; Color maOverlineColor; @@ -589,8 +589,8 @@ public: const Wallpaper& GetBackground() const { return maBackground; } bool IsBackground() const { return mbBackground; } - void SetFont( const Font& rNewFont ); - const Font& GetFont() const { return maFont; } + void SetFont( const vcl::Font& rNewFont ); + const vcl::Font& GetFont() const { return maFont; } protected: @@ -961,7 +961,7 @@ public: <code> VirtualDevice aDevice; - Font aFont = aDevice.GetFont(); + vcl::Font aFont = aDevice.GetFont(); aFont.SetSize(Size(0, 96)); aFont.SetColor(COL_BLACK); aDevice.SetFont(aFont); @@ -1119,7 +1119,7 @@ private: SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor ); SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth ); - SAL_DLLPRIVATE static bool ImplIsUnderlineAbove( const Font& ); + SAL_DLLPRIVATE static bool ImplIsUnderlineAbove( const vcl::Font& ); static SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout ); @@ -1137,13 +1137,13 @@ public: bool IsFontAvailable( const OUString& rFontName ) const; - Size GetDevFontSize( const Font& rFont, int nSizeIndex ) const; - int GetDevFontSizeCount( const Font& ) const; + Size GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) const; + int GetDevFontSizeCount( const vcl::Font& ) const; bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ); FontMetric GetFontMetric() const; - FontMetric GetFontMetric( const Font& rFont ) const; + FontMetric GetFontMetric( const vcl::Font& rFont ) const; bool GetFontCharMap( FontCharMap& rFontCharMap ) const; bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const; @@ -1159,12 +1159,12 @@ public: SAL_DLLPRIVATE void ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient ); SAL_DLLPRIVATE static FontEmphasisMark - ImplGetEmphasisMarkStyle( const Font& rFont ); + ImplGetEmphasisMarkStyle( const vcl::Font& rFont ); bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ); - sal_Int32 HasGlyphs( const Font& rFont, const OUString& rStr, + sal_Int32 HasGlyphs( const vcl::Font& rFont, const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ) const; long GetMinKashida() const; @@ -1186,7 +1186,7 @@ public: static void RemoveFontSubstitute( sal_uInt16 n ); static sal_uInt16 GetFontSubstituteCount(); - static Font GetDefaultFont( sal_uInt16 nType, + static vcl::Font GetDefaultFont( sal_uInt16 nType, LanguageType eLang, sal_uLong nFlags, const OutputDevice* pOutDev = NULL ); diff --git a/include/vcl/outdevstate.hxx b/include/vcl/outdevstate.hxx index 578a1a978843..e53b7c18a923 100644 --- a/include/vcl/outdevstate.hxx +++ b/include/vcl/outdevstate.hxx @@ -111,7 +111,7 @@ public: Region* mpClipRegion; Color* mpLineColor; Color* mpFillColor; - Font* mpFont; + vcl::Font* mpFont; Color* mpTextColor; Color* mpTextFillColor; Color* mpTextLineColor; diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index 223dcf3998ad..56ce18c40052 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -41,7 +41,7 @@ #include <vector> #include <set> -class Font; +namespace vcl { class Font; } class Point; class OutputDevice; class GDIMetaFile; @@ -234,7 +234,7 @@ public: Color BorderColor;// COL_TRANSPARENT and Border=true means get color from application settings bool Background; // true: widget shall draw its background, false: no background Color BackgroundColor; // COL_TRANSPARENT and Background=true means get color from application settings - Font TextFont; // an empty font will be replaced by the + vcl::Font TextFont; // an empty font will be replaced by the // appropriate font from the user settings Color TextColor; // COL_TRANSPARENT will be replaced by the appropriate color from application settings sal_Int32 TabOrder; // lowest number is first in tab order @@ -747,7 +747,7 @@ The following structure describes the permissions used in PDF security void SetFillColor( const Color& rColor ); void SetFillColor() { SetFillColor( Color( COL_TRANSPARENT ) ); } - void SetFont( const Font& rNewFont ); + void SetFont( const vcl::Font& rNewFont ); void SetTextColor( const Color& rColor ); void SetTextFillColor(); void SetTextFillColor( const Color& rColor ); diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index 021161f90324..10ae6a60854f 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -391,44 +391,44 @@ public: void SetCairoFontOptions( const void *pOptions ); const void* GetCairoFontOptions() const; - void SetAppFont( const Font& rFont ); - const Font& GetAppFont() const; + void SetAppFont( const vcl::Font& rFont ); + const vcl::Font& GetAppFont() const; - void SetHelpFont( const Font& rFont ); - const Font& GetHelpFont() const; + void SetHelpFont( const vcl::Font& rFont ); + const vcl::Font& GetHelpFont() const; - void SetTitleFont( const Font& rFont ); - const Font& GetTitleFont() const; + void SetTitleFont( const vcl::Font& rFont ); + const vcl::Font& GetTitleFont() const; - void SetFloatTitleFont( const Font& rFont ); - const Font& GetFloatTitleFont() const; + void SetFloatTitleFont( const vcl::Font& rFont ); + const vcl::Font& GetFloatTitleFont() const; - void SetMenuFont( const Font& rFont ); - const Font& GetMenuFont() const; + void SetMenuFont( const vcl::Font& rFont ); + const vcl::Font& GetMenuFont() const; - void SetToolFont( const Font& rFont ); - const Font& GetToolFont() const; + void SetToolFont( const vcl::Font& rFont ); + const vcl::Font& GetToolFont() const; - void SetGroupFont( const Font& rFont ); - const Font& GetGroupFont() const; + void SetGroupFont( const vcl::Font& rFont ); + const vcl::Font& GetGroupFont() const; - void SetLabelFont( const Font& rFont ); - const Font& GetLabelFont() const; + void SetLabelFont( const vcl::Font& rFont ); + const vcl::Font& GetLabelFont() const; - void SetInfoFont( const Font& rFont ); - const Font& GetInfoFont() const; + void SetInfoFont( const vcl::Font& rFont ); + const vcl::Font& GetInfoFont() const; - void SetRadioCheckFont( const Font& rFont ); - const Font& GetRadioCheckFont() const; + void SetRadioCheckFont( const vcl::Font& rFont ); + const vcl::Font& GetRadioCheckFont() const; - void SetPushButtonFont( const Font& rFont ); - const Font& GetPushButtonFont() const; + void SetPushButtonFont( const vcl::Font& rFont ); + const vcl::Font& GetPushButtonFont() const; - void SetFieldFont( const Font& rFont ); - const Font& GetFieldFont() const; + void SetFieldFont( const vcl::Font& rFont ); + const vcl::Font& GetFieldFont() const; - void SetIconFont( const Font& rFont ); - const Font& GetIconFont() const; + void SetIconFont( const vcl::Font& rFont ); + const vcl::Font& GetIconFont() const; long GetBorderSize() const; diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index 4531c091a580..f1c0f1ab4594 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -75,7 +75,7 @@ protected: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); virtual void FillLayoutData() const SAL_OVERRIDE; - virtual const Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; + virtual const vcl::Font& GetCanonicalFont( const StyleSettings& _rStyle ) const SAL_OVERRIDE; virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const SAL_OVERRIDE; SAL_DLLPRIVATE Rectangle* ImplFindPartRect( const Point& rPt ); diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx index 9da46801085c..bb4a1039af5e 100644 --- a/include/vcl/texteng.hxx +++ b/include/vcl/texteng.hxx @@ -111,16 +111,16 @@ private: LocaleDataWrapper* mpLocaleDataWrapper; - Font maFont; + vcl::Font maFont; Color maTextColor; long mnCharHeight; - sal_uInt16 mnFixCharWidth100; + sal_uInt16 mnFixCharWidth100; - sal_uLong mnMaxTextLen; - sal_uLong mnMaxTextWidth; - sal_uLong mnCurTextWidth; - sal_uLong mnCurTextHeight; - sal_uLong mnDefTab; + sal_uLong mnMaxTextLen; + sal_uLong mnMaxTextWidth; + sal_uLong mnCurTextWidth; + sal_uLong mnCurTextHeight; + sal_uLong mnDefTab; TxtAlign meAlign; @@ -182,7 +182,7 @@ protected: sal_uInt16 SplitTextPortion( sal_uLong nPara, sal_uInt16 nPos ); void CreateTextPortions( sal_uLong nPara, sal_uInt16 nStartPos ); void RecalcTextPortion( sal_uLong nPara, sal_uInt16 nStartPos, short nNewChars ); - void SeekCursor( sal_uLong nNode, sal_uInt16 nPos, Font& rFont, OutputDevice* pOutDev ); + void SeekCursor( sal_uLong nNode, sal_uInt16 nPos, vcl::Font& rFont, OutputDevice* pOutDev ); void FormatDoc(); void FormatFullDoc(); @@ -209,7 +209,7 @@ protected: sal_uLong CalcTextHeight(); sal_uLong CalcParaHeight( sal_uLong nParagraph ) const; sal_uLong CalcTextWidth( sal_uLong nPara ); - sal_uLong CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nPortionLen, const Font* pFont = 0 ); + sal_uLong CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nPortionLen, const vcl::Font* pFont = 0 ); Range GetInvalidYOffsets( sal_uLong nPortion ); // for Undo/Redo @@ -234,8 +234,8 @@ public: sal_uLong GetTextLen( LineEnd aSeparator = LINEEND_LF ) const; sal_uLong GetTextLen( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const; - void SetFont( const Font& rFont ); - const Font& GetFont() const { return maFont; } + void SetFont( const vcl::Font& rFont ); + const vcl::Font& GetFont() const { return maFont; } sal_uInt16 GetDefTab() const; diff --git a/include/vcl/txtattr.hxx b/include/vcl/txtattr.hxx index 98a679c79c6f..c727f8f12ce3 100644 --- a/include/vcl/txtattr.hxx +++ b/include/vcl/txtattr.hxx @@ -26,7 +26,7 @@ #include <vcl/vclenum.hxx> #include <vcl/dllapi.h> -class Font; +namespace vcl { class Font; } #define TEXTATTR_INVALID 0 #define TEXTATTR_FONTCOLOR 1 @@ -51,7 +51,7 @@ public: virtual ~TextAttrib(); sal_uInt16 Which() const { return mnWhich; } - virtual void SetFont( Font& rFont ) const = 0; + virtual void SetFont( vcl::Font& rFont ) const = 0; virtual TextAttrib* Clone() const = 0; virtual bool operator==( const TextAttrib& rAttr ) const = 0; @@ -73,7 +73,7 @@ public: const Color& GetColor() const { return maColor; } - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; @@ -89,7 +89,7 @@ public: TextAttribFontWeight( const TextAttribFontWeight& rAttr ); virtual ~TextAttribFontWeight(); - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; @@ -117,7 +117,7 @@ public: void SetColor( const Color& rColor ) { maColor = rColor; } const Color& GetColor() const { return maColor; } - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; }; @@ -129,7 +129,7 @@ public: TextAttribProtect( const TextAttribProtect& rAttr ); virtual ~TextAttribProtect(); - virtual void SetFont( Font& rFont ) const SAL_OVERRIDE; + virtual void SetFont( vcl::Font& rFont ) const SAL_OVERRIDE; virtual TextAttrib* Clone() const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index e4f49dab2d87..bf8a8294c6fe 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -513,8 +513,8 @@ private: SAL_DLLPRIVATE void ImplInitResolutionSettings(); - SAL_DLLPRIVATE void ImplPointToLogic( Font& rFont ) const; - SAL_DLLPRIVATE void ImplLogicToPoint( Font& rFont ) const; + SAL_DLLPRIVATE void ImplPointToLogic( vcl::Font& rFont ) const; + SAL_DLLPRIVATE void ImplLogicToPoint( vcl::Font& rFont ) const; SAL_DLLPRIVATE bool ImplSysObjClip( const Region* pOldRegion ); SAL_DLLPRIVATE void ImplUpdateSysObjChildrenClip(); @@ -566,7 +566,7 @@ private: True if the font can be used as UI font False if the font is unsuitable as UI font */ - SAL_DLLPRIVATE bool ImplCheckUIFont( const Font& rFont ); + SAL_DLLPRIVATE bool ImplCheckUIFont( const vcl::Font& rFont ); SAL_DLLPRIVATE void ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl = true ); @@ -764,15 +764,15 @@ public: void UpdateSettings( const AllSettings& rSettings, bool bChild = false ); void NotifyAllChildren( DataChangedEvent& rDCEvt ); - void SetPointFont( const Font& rFont ); - Font GetPointFont() const; - void SetZoomedPointFont( const Font& rFont ); + void SetPointFont( const vcl::Font& rFont ); + vcl::Font GetPointFont() const; + void SetZoomedPointFont( const vcl::Font& rFont ); long GetDrawPixel( OutputDevice* pDev, long nPixels ) const; - Font GetDrawPixelFont( OutputDevice* pDev ) const; + vcl::Font GetDrawPixelFont( OutputDevice* pDev ) const; void SetControlFont(); - void SetControlFont( const Font& rFont ); - Font GetControlFont() const; + void SetControlFont( const vcl::Font& rFont ); + vcl::Font GetControlFont() const; bool IsControlFont() const; void SetControlForeground(); void SetControlForeground( const Color& rColor ); diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx index a580d7e2669e..38189bf41d77 100644 --- a/reportdesign/source/core/api/ReportComponent.cxx +++ b/reportdesign/source/core/api/ReportComponent.cxx @@ -44,7 +44,7 @@ namespace reportdesign using namespace com::sun::star; using namespace comphelper; -void lcl_getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont,LanguageType _eLatin,LanguageType _eCJK,LanguageType _eCTL ) +void lcl_getDefaultFonts( vcl::Font& rLatinFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont, LanguageType _eLatin, LanguageType _eCJK, LanguageType _eCTL ) { LanguageType eLatin = _eLatin; @@ -92,7 +92,7 @@ OFormatProperties::OFormatProperties() aLinguConfig.GetProperty(OUString("DefaultLocale_CTL")) >>= aCharLocaleComplex; LanguageType eCurLangCTL = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aCharLocaleComplex, false), COMPLEX); - Font aLatin,aCJK,aCTL; + vcl::Font aLatin,aCJK,aCTL; lcl_getDefaultFonts(aLatin,aCJK,aCTL,eCurLang,eCurLangCJK,eCurLangCTL); aFontDescriptor = VCLUnoHelper::CreateFontDescriptor(aLatin); aAsianFontDescriptor = VCLUnoHelper::CreateFontDescriptor(aCJK); diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index 016b88fd8c58..fe37e1bf2d58 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -249,7 +249,7 @@ Condition::Condition( Window* _pParent, IConditionalFormatAction& _rAction, ::rp m_pAddCondition->SetStyle( m_pAddCondition->GetStyle() | WB_NOPOINTERFOCUS ); m_pRemoveCondition->SetStyle( m_pRemoveCondition->GetStyle() | WB_NOPOINTERFOCUS ); - Font aFont( m_pAddCondition->GetFont() ); + vcl::Font aFont( m_pAddCondition->GetFont() ); aFont.SetWeight( WEIGHT_BOLD ); m_pAddCondition->SetFont( aFont ); m_pRemoveCondition->SetFont( aFont ); @@ -494,7 +494,7 @@ void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat try { - Font aBaseFont( Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont() ); + vcl::Font aBaseFont( Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont() ); SvxFont aFont( VCLUnoHelper::CreateFont( _xReportControlFormat->getFontDescriptor(), aBaseFont ) ); aFont.SetHeight( OutputDevice::LogicToLogic( Size( 0, (sal_Int32)aFont.GetHeight() ), MAP_POINT, MAP_TWIP ).Height()); aFont.SetEmphasisMark( static_cast< FontEmphasisMark >( _xReportControlFormat->getControlTextEmphasis() ) ); diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index ea4ad8d434d1..1931592e3730 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -339,7 +339,7 @@ void OFieldExpressionControl::lateInit() if ( ColCount() == 0 ) { - Font aFont( GetDataWindow().GetFont() ); + vcl::Font aFont( GetDataWindow().GetFont() ); aFont.SetWeight( WEIGHT_NORMAL ); GetDataWindow().SetFont( aFont ); diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index eed64f647867..793b49849d4f 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -199,7 +199,7 @@ void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32 namespace { - Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, awt::FontDescriptor& _out_rControlFont ,sal_uInt16 _nWichFont) + vcl::Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, awt::FontDescriptor& _out_rControlFont ,sal_uInt16 _nWichFont) { if ( !_rxReportControlFormat.is() ) throw uno::RuntimeException(); @@ -218,23 +218,23 @@ namespace } - Font aDefaultFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); + vcl::Font aDefaultFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); return VCLUnoHelper::CreateFont( _out_rControlFont, aDefaultFont ); } - Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,sal_uInt16 _nWhich ) + vcl::Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,sal_uInt16 _nWhich ) { awt::FontDescriptor aAwtFont; return lcl_getReportControlFont( _rxReportControlFormat, aAwtFont, _nWhich ); } - const Font lcl_setFont(const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, + const vcl::Font lcl_setFont(const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, SfxItemSet& _rItemSet,sal_uInt16 _nWhich,sal_uInt16 _nFont, sal_uInt16 _nFontHeight,sal_uInt16 _nLanguage,sal_uInt16 _nPosture, sal_uInt16 _nWeight) { // fill it awt::FontDescriptor aControlFont; - const Font aFont( lcl_getReportControlFont( _rxReportControlFormat, aControlFont,_nWhich ) ); + const vcl::Font aFont( lcl_getReportControlFont( _rxReportControlFormat, aControlFont,_nWhich ) ); SvxFontItem aFontItem(_nFont); aFontItem.PutValue( uno::makeAny( aControlFont ) ); @@ -329,7 +329,7 @@ namespace uno::Reference< beans::XPropertySet > xSet(_rxReportControlFormat,uno::UNO_QUERY_THROW); // fill it - const Font aFont( lcl_setFont(_rxReportControlFormat, _rItemSet,WESTERN,ITEMID_FONT,ITEMID_FONTHEIGHT,ITEMID_LANGUAGE,ITEMID_POSTURE,ITEMID_WEIGHT ) ); + const vcl::Font aFont( lcl_setFont(_rxReportControlFormat, _rItemSet,WESTERN,ITEMID_FONT,ITEMID_FONTHEIGHT,ITEMID_LANGUAGE,ITEMID_POSTURE,ITEMID_WEIGHT ) ); _rItemSet.Put(SvxShadowedItem(_rxReportControlFormat->getCharShadowed(),ITEMID_SHADOWED)); _rItemSet.Put(SvxWordLineModeItem(aFont.IsWordLineMode(),ITEMID_WORDLINEMODE)); @@ -376,10 +376,10 @@ namespace } - void lcl_initAwtFont( const Font& _rOriginalFont, const SfxItemSet& _rItemSet, awt::FontDescriptor& _out_rAwtFont, + void lcl_initAwtFont( const vcl::Font& _rOriginalFont, const SfxItemSet& _rItemSet, awt::FontDescriptor& _out_rAwtFont, sal_uInt16 _nFont, sal_uInt16 _nFontHeight,sal_uInt16 _nPosture, sal_uInt16 _nWeight) { - Font aNewFont( _rOriginalFont ); + vcl::Font aNewFont( _rOriginalFont ); const SfxPoolItem* pItem( NULL ); if ( SfxItemState::SET == _rItemSet.GetItemState( _nFont,true,&pItem) && pItem->ISA(SvxFontItem)) { @@ -441,7 +441,7 @@ namespace } - void lcl_itemsToCharProperties( const Font& _rOriginalControlFont,const Font& _rOriginalControlFontAsian,const Font& _rOriginalControlFontComplex, const SfxItemSet& _rItemSet, uno::Sequence< beans::NamedValue >& _out_rProperties ) + void lcl_itemsToCharProperties( const vcl::Font& _rOriginalControlFont,const vcl::Font& _rOriginalControlFontAsian,const vcl::Font& _rOriginalControlFontComplex, const SfxItemSet& _rItemSet, uno::Sequence< beans::NamedValue >& _out_rProperties ) { const SfxPoolItem* pItem( NULL ); diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx index 00d0c98b7730..90516ccf0c37 100644 --- a/sc/inc/patattr.hxx +++ b/sc/inc/patattr.hxx @@ -26,7 +26,7 @@ #include <editeng/svxenum.hxx> #include "scdllapi.h" -class Font; +namespace vcl { class Font; } class OutputDevice; class Fraction; class ScStyleSheet; @@ -80,7 +80,7 @@ public: SvxCellOrientation GetCellOrientation( const SfxItemSet* pCondSet = 0 ) const; /** Static helper function to fill a font object from the passed item set. */ - static void GetFont( Font& rFont, const SfxItemSet& rItemSet, + static void GetFont( vcl::Font& rFont, const SfxItemSet& rItemSet, ScAutoFontColorMode eAutoMode, OutputDevice* pOutDev = NULL, const Fraction* pScale = NULL, @@ -88,7 +88,7 @@ public: sal_uInt8 nScript = 0, const Color* pBackConfigColor = NULL, const Color* pTextConfigColor = NULL ); /** Fills a font object from the own item set. */ - void GetFont( Font& rFont, ScAutoFontColorMode eAutoMode, + void GetFont( vcl::Font& rFont, ScAutoFontColorMode eAutoMode, OutputDevice* pOutDev = NULL, const Fraction* pScale = NULL, const SfxItemSet* pCondSet = NULL, diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 9db7c6e807c1..2b183ebe3582 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -178,7 +178,7 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat) //test Sheet2 const ScPatternAttr* pPattern = NULL; pPattern = pDoc->GetPattern(0,0,1); - Font aFont; + vcl::Font aFont; pPattern->GetFont(aFont,SC_AUTOCOL_RAW); CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", 200l, aFont.GetSize().getHeight()); CPPUNIT_ASSERT_EQUAL_MESSAGE("font color should be black", COL_AUTO, aFont.GetColor().GetColor()); diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 7ee5bb1ef921..13cdee827c86 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -241,7 +241,7 @@ long ScColumn::GetNeededSize( if (rOptions.bGetFont) { Fraction aFontZoom = ( eOrient == SVX_ORIENTATION_STANDARD ) ? rZoomX : rZoomY; - Font aFont; + vcl::Font aFont; // font color doesn't matter here pPattern->GetFont( aFont, SC_AUTOCOL_BLACK, pDev, &aFontZoom, pCondSet, nScript ); pDev->SetFont(aFont); @@ -344,7 +344,7 @@ long ScColumn::GetNeededSize( if (bEditEngine) { // the font is not reset each time with !bEditEngine - Font aOldFont = pDev->GetFont(); + vcl::Font aOldFont = pDev->GetFont(); MapMode aHMMMode( MAP_100TH_MM, Point(), rZoomX, rZoomY ); @@ -640,7 +640,7 @@ sal_uInt16 ScColumn::GetOptimalColWidth( if ( pParam && pParam->mbSimpleText ) { // all the same except for number format const ScPatternAttr* pPattern = GetPattern( 0 ); - Font aFont; + vcl::Font aFont; // font color doesn't matter here pPattern->GetFont( aFont, SC_AUTOCOL_BLACK, pDev, &rZoomX, NULL ); pDev->SetFont( aFont ); diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index d257f60ca7ed..aa28bf9d7b86 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -197,7 +197,7 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool) pSecondary ( pSecPool ) { // latin font from GetDefaultFonts is not used, DEFAULTFONT_LATIN_SPREADSHEET instead - Font aStdFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, + vcl::Font aStdFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE ); SvxFontItem* pStdFont = new SvxFontItem( aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(), diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index c25829902c9b..9b4e63e6f26a 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -579,7 +579,7 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool) OutputDevice* pDefaultDev = Application::GetDefaultDevice(); VirtualDevice aVirtWindow( *pDefaultDev ); aVirtWindow.SetMapMode(MAP_PIXEL); - Font aDefFont; + vcl::Font aDefFont; pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, &aVirtWindow); // Font color doesn't matter here aVirtWindow.SetFont(aDefFont); sal_uInt16 nTest = static_cast<sal_uInt16>( diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index c6fb907b23bc..b73ff8eccef7 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -215,7 +215,7 @@ SvxCellOrientation ScPatternAttr::GetCellOrientation( const SfxItemSet* pCondSet } void ScPatternAttr::GetFont( - Font& rFont, const SfxItemSet& rItemSet, ScAutoFontColorMode eAutoMode, + vcl::Font& rFont, const SfxItemSet& rItemSet, ScAutoFontColorMode eAutoMode, OutputDevice* pOutDev, const Fraction* pScale, const SfxItemSet* pCondSet, sal_uInt8 nScript, const Color* pBackConfigColor, const Color* pTextConfigColor ) @@ -481,7 +481,7 @@ void ScPatternAttr::GetFont( } void ScPatternAttr::GetFont( - Font& rFont, ScAutoFontColorMode eAutoMode, + vcl::Font& rFont, ScAutoFontColorMode eAutoMode, OutputDevice* pOutDev, const Fraction* pScale, const SfxItemSet* pCondSet, sal_uInt8 nScript, const Color* pBackConfigColor, const Color* pTextConfigColor ) const diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index acdcc5527157..780f74ff2665 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -201,7 +201,7 @@ static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, sal_uInt16 nFon { if ( eLang != LANGUAGE_NONE && eLang != LANGUAGE_DONTKNOW && eLang != LANGUAGE_SYSTEM ) { - Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, DEFAULTFONT_FLAGS_ONLYONE ); + vcl::Font aDefFont = OutputDevice::GetDefaultFont( nFontType, eLang, DEFAULTFONT_FLAGS_ONLYONE ); SvxFontItem aNewItem( aDefFont.GetFamily(), aDefFont.GetName(), aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), nItemId ); if ( aNewItem != rSet.Get( nItemId ) ) diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 43d4849f1ce0..19d5dfd3094b 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -822,7 +822,7 @@ ScAutoFormat::ScAutoFormat() : pData->SetName(aName); // default font, default height - Font aStdFont = OutputDevice::GetDefaultFont( + vcl::Font aStdFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_SPREADSHEET, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE ); SvxFontItem aFontItem( aStdFont.GetFamily(), aStdFont.GetName(), aStdFont.GetStyleName(), diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 081bd7e8efb2..50b2b6c8fee3 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -332,7 +332,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT pDev, nPPTX, nPPTY, aZoomX, aZoomY, false ); if (!nTextHeight) { // leere Zelle - Font aFont; + vcl::Font aFont; // font color doesn't matter here pPattern->GetFont( aFont, SC_AUTOCOL_BLACK, pDev, &aZoomY ); pDev->SetFont(aFont); diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 61587a1c7932..d9e8e3651254 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -2236,8 +2236,8 @@ void ScInterpreter::ScCell() { // column width (rounded off as count of zero characters in standard font and size) Printer* pPrinter = pDok->GetPrinter(); MapMode aOldMode( pPrinter->GetMapMode() ); - Font aOldFont( pPrinter->GetFont() ); - Font aDefFont; + vcl::Font aOldFont( pPrinter->GetFont() ); + vcl::Font aDefFont; pPrinter->SetMapMode( MAP_TWIP ); // font color doesn't matter here diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 7e395364732b..168e45209c58 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -630,7 +630,7 @@ XclExpCFImpl::XclExpCFImpl( const XclExpRoot& rRoot, const ScCondFormatEntry& rF mbFontUsed = mbHeightUsed || mbWeightUsed || mbColorUsed || mbUnderlUsed || mbItalicUsed || mbStrikeUsed; if( mbFontUsed ) { - Font aFont; + vcl::Font aFont; ScPatternAttr::GetFont( aFont, rItemSet, SC_AUTOCOL_RAW ); maFontData.FillFromVclFont( aFont ); mnFontColorId = GetPalette().InsertColor( maFontData.maColor, EXC_COLOR_CELLTEXT ); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 00719de8c455..79da723f7a40 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -722,7 +722,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico // --- font attributes --- - Font aFont; + vcl::Font aFont; aItemSet.ClearItem(); SfxItemSet aEditSet( mrEE.GetAttribs( aSel ) ); ScPatternAttr::GetFromEditItemSet( aItemSet, aEditSet ); diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 94c99f700c1f..6a59547c1eca 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -872,7 +872,7 @@ sal_Int16 XclExpFontHelper::GetFirstUsedScript( const XclExpRoot& rRoot, const S return nScript; } -Font XclExpFontHelper::GetFontFromItemSet( const XclExpRoot& rRoot, const SfxItemSet& rItemSet, sal_Int16 nScript ) +vcl::Font XclExpFontHelper::GetFontFromItemSet( const XclExpRoot& rRoot, const SfxItemSet& rItemSet, sal_Int16 nScript ) { namespace ApiScriptType = ::com::sun::star::i18n::ScriptType; @@ -891,7 +891,7 @@ Font XclExpFontHelper::GetFontFromItemSet( const XclExpRoot& rRoot, const SfxIte } // fill the font object - Font aFont; + vcl::Font aFont; ScPatternAttr::GetFont( aFont, rItemSet, SC_AUTOCOL_RAW, 0, 0, 0, nScScript ); return aFont; } @@ -1078,7 +1078,7 @@ sal_uInt16 XclExpFontBuffer::Insert( } sal_uInt16 XclExpFontBuffer::Insert( - const Font& rFont, XclExpColorType eColorType, bool bAppFont ) + const vcl::Font& rFont, XclExpColorType eColorType, bool bAppFont ) { return Insert( XclFontData( rFont ), eColorType, bAppFont ); } @@ -1093,7 +1093,7 @@ sal_uInt16 XclExpFontBuffer::Insert( const SfxItemSet& rItemSet, sal_Int16 nScript, XclExpColorType eColorType, bool bAppFont ) { // #i17050# script type now provided by caller - Font aFont = XclExpFontHelper::GetFontFromItemSet( GetRoot(), rItemSet, nScript ); + vcl::Font aFont = XclExpFontHelper::GetFontFromItemSet( GetRoot(), rItemSet, nScript ); return Insert( aFont, eColorType, bAppFont ); } @@ -2922,7 +2922,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot ) // check if non default font is set and only export then if (rSet.GetItemState(rSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT )) == SfxItemState::SET ) { - Font aFont = XclExpFontHelper::GetFontFromItemSet( GetRoot(), rSet, com::sun::star::i18n::ScriptType::WEAK ); + vcl::Font aFont = XclExpFontHelper::GetFontFromItemSet( GetRoot(), rSet, com::sun::star::i18n::ScriptType::WEAK ); pFont = new XclExpFont( GetRoot(), XclFontData( aFont ), EXC_COLOR_CELLTEXT ); } diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 841b2c1bbb32..69b2b3520605 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -445,7 +445,7 @@ void XclImpFont::GuessScriptType() // find the script types for which the font contains characters if( OutputDevice* pPrinter = GetPrinter() ) { - Font aFont( maData.maName, Size( 0, 10 ) ); + vcl::Font aFont( maData.maName, Size( 0, 10 ) ); FontCharMap aCharMap; pPrinter->SetFont( aFont ); diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 2bb35751b2ea..e43800b0dfcf 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -203,7 +203,7 @@ void XclRoot::SetCharWidth( const XclFontData& rFontData ) mrData.mnCharWidth = 0; if( OutputDevice* pPrinter = GetPrinter() ) { - Font aFont( rFontData.maName, Size( 0, rFontData.mnHeight ) ); + vcl::Font aFont( rFontData.maName, Size( 0, rFontData.mnHeight ) ); aFont.SetFamily( rFontData.GetScFamily( GetTextEncoding() ) ); aFont.SetCharSet( rFontData.GetFontEncoding() ); aFont.SetWeight( rFontData.GetScWeight() ); diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 69f27748853f..405c6016a9c6 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -171,7 +171,7 @@ XclFontData::XclFontData() Clear(); } -XclFontData::XclFontData( const Font& rFont ) +XclFontData::XclFontData( const vcl::Font& rFont ) { Clear(); FillFromVclFont( rFont ); @@ -196,7 +196,7 @@ void XclFontData::Clear() mbItalic = mbStrikeout = mbOutline = mbShadow = false; } -void XclFontData::FillFromVclFont( const Font& rFont ) +void XclFontData::FillFromVclFont( const vcl::Font& rFont ) { maName = XclTools::GetXclFontName( rFont.GetName() ); // substitute with MS fonts maStyle = ""; diff --git a/sc/source/filter/inc/richstring.hxx b/sc/source/filter/inc/richstring.hxx index 9f15aab0470f..84a80c15c96b 100644 --- a/sc/source/filter/inc/richstring.hxx +++ b/sc/source/filter/inc/richstring.hxx @@ -68,16 +68,15 @@ public: /** Converts the portion and replaces or appends to the passed XText. */ void convert( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >& rxText, - - const Font* pFont, bool bReplace ); - void convert( ScEditEngineDefaulter& rEE, ESelection& rSelection, const Font* pFont ); + const oox::xls::Font* pFont, bool bReplace ); + void convert( ScEditEngineDefaulter& rEE, ESelection& rSelection, const oox::xls::Font* pFont ); void writeFontProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >& rxText, - const Font* pFont ) const; + const oox::xls::Font* pFont ) const; private: - OUString maText; /// Portion text. + OUString maText; /// Portion text. FontRef mxFont; /// Embedded portion font, may be empty. sal_Int32 mnFontId; /// Link to global font list. bool mbConverted; /// Without repeatly convert @@ -250,7 +249,7 @@ public: if there is only one unformatted portion. */ bool extractPlainString( OUString& orString, - const Font* pFirstPortionFont = 0 ) const; + const oox::xls::Font* pFirstPortionFont = 0 ) const; /** Converts the string and writes it into the passed XText. @param rxText The XText interface of the target object. @@ -260,8 +259,8 @@ public: void convert( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >& rxText, bool bReplaceOld, - const Font* pFirstPortionFont = 0 ) const; - ::EditTextObject* convert( ScEditEngineDefaulter& rEE, const Font* pFont ) const; + const oox::xls::Font* pFirstPortionFont = 0 ) const; + ::EditTextObject* convert( ScEditEngineDefaulter& rEE, const oox::xls::Font* pFont ) const; private: /** Creates, appends, and returns a new empty string portion. */ diff --git a/sc/source/filter/inc/worksheethelper.hxx b/sc/source/filter/inc/worksheethelper.hxx index 37179bb5b62d..79ab96425ba7 100644 --- a/sc/source/filter/inc/worksheethelper.hxx +++ b/sc/source/filter/inc/worksheethelper.hxx @@ -283,7 +283,7 @@ public: /** Inserts a rich-string cell directly into the Calc sheet. */ void putRichString( const com::sun::star::table::CellAddress& rAddress, - const RichString& rString, const Font* pFirstPortionFont ); + const RichString& rString, const oox::xls::Font* pFirstPortionFont ); /** Inserts a formula cell directly into the Calc sheet. */ void putFormulaTokens( const com::sun::star::table::CellAddress& rAddress, const ApiTokenSequence& rTokens ); diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index 5dcc70127e0d..9d8453b64b6c 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -124,7 +124,7 @@ private: // FONT record - font information ============================================= -class Font; +namespace { class Font; } class SvxFont; const size_t EXC_FONTLIST_NOTFOUND = static_cast< size_t >( -1 ); @@ -139,7 +139,7 @@ public: const SfxItemSet& rItemSet ); /** Returns a VCL font object filled from the passed item set. */ - static Font GetFontFromItemSet( + static vcl::Font GetFontFromItemSet( const XclExpRoot& rRoot, const SfxItemSet& rItemSet, sal_Int16 nScript ); @@ -218,7 +218,7 @@ public: /** Inserts the font into the buffer if not present. @param bAppFont true = Sets the application font; false = Inserts a new font. @return The resulting Excel font index. */ - sal_uInt16 Insert( const Font& rFont, + sal_uInt16 Insert( const vcl::Font& rFont, XclExpColorType eColorType, bool bAppFont = false ); /** Inserts the SvxFont into the buffer if not present, e.g. where escapements are used. @param bAppFont true = Sets the application font; false = Inserts a new font. diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx index 49059cd967b1..f6b00a6590ed 100644 --- a/sc/source/filter/inc/xlstyle.hxx +++ b/sc/source/filter/inc/xlstyle.hxx @@ -279,7 +279,7 @@ private: // Font data ================================================================== -class Font; +namespace vcl { class Font; } class SvxFont; /** This struct helps reading and writing Excel fonts. @@ -307,14 +307,14 @@ struct XclFontData /** Constructs an empty font data structure. */ explicit XclFontData(); /** Constructs a font data structure and fills it with the passed font attributes (except color). */ - explicit XclFontData( const Font& rFont ); + explicit XclFontData( const vcl::Font& rFont ); /** As directly above but also fills in the escapement member. */ explicit XclFontData( const SvxFont& rFont ); /** Resets all members to default (empty) values. */ void Clear(); /** Fills all members (except color and escapement) from the passed font. */ - void FillFromVclFont( const Font& rFont ); + void FillFromVclFont( const vcl::Font& rFont ); /** Fills all members (except color) from the passed SVX font. */ void FillFromSvxFont( const SvxFont& rFont ); diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx index 0480c596f558..88a83c32bbd1 100644 --- a/sc/source/filter/oox/richstring.cxx +++ b/sc/source/filter/oox/richstring.cxx @@ -38,7 +38,7 @@ namespace { const sal_uInt8 BIFF12_STRINGFLAG_FONTS = 0x01; const sal_uInt8 BIFF12_STRINGFLAG_PHONETICS = 0x02; -inline bool lclNeedsRichTextFormat( const Font* pFont ) +inline bool lclNeedsRichTextFormat( const oox::xls::Font* pFont ) { return pFont && pFont->needsRichTextFormat(); } @@ -76,7 +76,7 @@ void RichStringPortion::finalizeImport() mxFont = getStyles().getFont( mnFontId ); } -void RichStringPortion::convert( const Reference< XText >& rxText, const Font* pFont, bool bReplace ) +void RichStringPortion::convert( const Reference< XText >& rxText, const oox::xls::Font* pFont, bool bReplace ) { if ( mbConverted ) return; @@ -110,7 +110,7 @@ void RichStringPortion::convert( const Reference< XText >& rxText, const Font* p mbConverted = true; } -void RichStringPortion::convert( ScEditEngineDefaulter& rEE, ESelection& rSelection, const Font* pFont ) +void RichStringPortion::convert( ScEditEngineDefaulter& rEE, ESelection& rSelection, const oox::xls::Font* pFont ) { rSelection.nStartPos = rSelection.nEndPos; rSelection.nStartPara = rSelection.nEndPara; @@ -145,7 +145,7 @@ void RichStringPortion::convert( ScEditEngineDefaulter& rEE, ESelection& rSelect rEE.QuickSetAttribs( aItemSet, rSelection ); } -void RichStringPortion::writeFontProperties( const Reference<XText>& rxText, const Font* pFont ) const +void RichStringPortion::writeFontProperties( const Reference<XText>& rxText, const oox::xls::Font* pFont ) const { PropertySet aPropSet(rxText); @@ -358,7 +358,7 @@ void RichString::finalizeImport() maTextPortions.forEachMem( &RichStringPortion::finalizeImport ); } -bool RichString::extractPlainString( OUString& orString, const Font* pFirstPortionFont ) const +bool RichString::extractPlainString( OUString& orString, const oox::xls::Font* pFirstPortionFont ) const { if( !maPhonPortions.empty() ) return false; @@ -375,7 +375,7 @@ bool RichString::extractPlainString( OUString& orString, const Font* pFirstPorti return false; } -void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld, const Font* pFirstPortionFont ) const +void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld, const oox::xls::Font* pFirstPortionFont ) const { if (maTextPortions.size() == 1) { @@ -395,7 +395,7 @@ void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld, co } } -::EditTextObject* RichString::convert( ScEditEngineDefaulter& rEE, const Font* pFirstPortionFont ) const +::EditTextObject* RichString::convert( ScEditEngineDefaulter& rEE, const oox::xls::Font* pFirstPortionFont ) const { ESelection aSelection; diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index a9fa35ded01e..6fc4922e065f 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -152,7 +152,7 @@ void SheetDataBuffer::setStringCell( const CellModel& rModel, const OUString& rT void SheetDataBuffer::setStringCell( const CellModel& rModel, const RichStringRef& rxString ) { OSL_ENSURE( rxString.get(), "SheetDataBuffer::setStringCell - missing rich string object" ); - const Font* pFirstPortionFont = getStyles().getFontFromCellXf( rModel.mnXfId ).get(); + const oox::xls::Font* pFirstPortionFont = getStyles().getFontFromCellXf( rModel.mnXfId ).get(); OUString aText; if( rxString->extractPlainString( aText, pFirstPortionFont ) ) { diff --git a/sc/source/filter/oox/unitconverter.cxx b/sc/source/filter/oox/unitconverter.cxx index 359a76ac3b2a..a776cbb0eeb7 100644 --- a/sc/source/filter/oox/unitconverter.cxx +++ b/sc/source/filter/oox/unitconverter.cxx @@ -126,7 +126,7 @@ void UnitConverter::finalizeImport() maCoeffs[ UNIT_REFDEVY ] = 100000.0 / aInfo.PixelPerMeterY; // get character widths from default font - if( const Font* pDefFont = getStyles().getDefaultFont().get() ) + if( const oox::xls::Font* pDefFont = getStyles().getDefaultFont().get() ) { // XDevice expects pixels in font descriptor, but font contains twips FontDescriptor aDesc = pDefFont->getFontDescriptor(); diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index ddc4ba556a69..7ba4bafe63f2 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -1556,7 +1556,7 @@ void WorksheetHelper::putString( const CellAddress& rAddress, const OUString& rT getDocImport().setStringCell(aAddress, rText); } -void WorksheetHelper::putRichString( const CellAddress& rAddress, const RichString& rString, const Font* pFirstPortionFont ) +void WorksheetHelper::putRichString( const CellAddress& rAddress, const RichString& rString, const oox::xls::Font* pFirstPortionFont ) { ScEditEngineDefaulter& rEE = getEditEngine(); diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index f860224ef900..f23a91bba5e5 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -308,7 +308,7 @@ static inline void lcl_FillProperty( PropertyValue& rVal, const OUString& rPropN } /** Fills the sequence with all font attributes of rFont. */ -static void lcl_FillFontAttributes( Sequence< PropertyValue >& rSeq, const Font& rFont ) +static void lcl_FillFontAttributes( Sequence< PropertyValue >& rSeq, const vcl::Font& rFont ) { SvxFontItem aFontItem( rFont.GetFamily(), rFont.GetName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), ATTR_FONT ); SvxFontHeightItem aHeightItem( rFont.GetSize().Height(), 100, ATTR_FONT_HEIGHT ); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index ee993c14ce70..7c78b001c6d1 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1451,7 +1451,7 @@ ScTextWnd::ScTextWnd( Window* pParent, ScTabViewShell* pViewSh ) bIsRTL = GetSettings().GetLayoutRTL(); // always use application font, so a font with cjk chars can be installed - Font aAppFont = GetFont(); + vcl::Font aAppFont = GetFont(); aTextFont = aAppFont; aTextFont.SetSize( PixelToLogic( aAppFont.GetSize(), MAP_TWIP ) ); // AppFont is in pixels diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index 6cb40c185ed4..74caa07088af 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -119,11 +119,11 @@ void ScDPFieldButton::draw() // Field name. // Get the font and size the same way as in scenario selection (lcl_DrawOneFrame in gridwin4.cxx) - Font aTextFont( mpStyle->GetAppFont() ); + vcl::Font aTextFont( mpStyle->GetAppFont() ); if ( mpDoc ) { // use ScPatternAttr::GetFont only for font size - Font aAttrFont; + vcl::Font aAttrFont; static_cast<const ScPatternAttr&>(mpDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)). GetFont( aAttrFont, SC_AUTOCOL_BLACK, mpOutDev, &maZoomY ); aTextFont.SetSize( aAttrFont.GetSize() ); diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 8424ef566172..4a81000ea5e0 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -356,10 +356,10 @@ void ScDocShell::CalcOutputFactor() const ScPatternAttr* pPattern = (const ScPatternAttr*)&aDocument.GetPool()-> GetDefaultItem(ATTR_PATTERN); - Font aDefFont; + vcl::Font aDefFont; OutputDevice* pRefDev = GetRefDevice(); MapMode aOldMode = pRefDev->GetMapMode(); - Font aOldFont = pRefDev->GetFont(); + vcl::Font aOldFont = pRefDev->GetFont(); pRefDev->SetMapMode(MAP_PIXEL); pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, pRefDev); // font color doesn't matter here diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 85f1d069dceb..83bb2c0ad6bf 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -229,7 +229,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) if ( pFontItem ) { OUString aFontName(pFontItem->GetValue()); - Font aFont(aFontName, Size(1,1)); // Size nur wg. CTOR + vcl::Font aFont(aFontName, Size(1,1)); // Size nur wg. CTOR aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetName(), aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), ATTR_FONT ); diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index cfa8ee599ceb..2951cae85d51 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -119,7 +119,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, nDockMode=0; bSizeFlag=false; aCatBox.SetDropDownLineCount(9); - Font aFont=aFiFuncDesc.GetFont(); + vcl::Font aFont=aFiFuncDesc.GetFont(); aFont.SetColor(Color(COL_BLACK)); aFiFuncDesc.SetFont(aFont); aFiFuncDesc.SetBackground( GetBackground() ); //! never transparent? diff --git a/sc/source/ui/formdlg/privsplt.cxx b/sc/source/ui/formdlg/privsplt.cxx index b61c2af24842..6bdfa3b022a5 100644 --- a/sc/source/ui/formdlg/privsplt.cxx +++ b/sc/source/ui/formdlg/privsplt.cxx @@ -341,7 +341,7 @@ void ScPrivatSplit::ImplInitSettings( bool bFont, bool bForeground, bool bBackgr if ( bFont ) { - Font aFont = rStyleSettings.GetAppFont(); + vcl::Font aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetFont( aFont ); diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx index e0903ee60fdf..291681c7b5ea 100644 --- a/sc/source/ui/inc/autofmt.hxx +++ b/sc/source/ui/inc/autofmt.hxx @@ -94,9 +94,9 @@ private: SAL_DLLPRIVATE void DrawBackground(); SAL_DLLPRIVATE void MakeFonts ( sal_uInt16 nIndex, - Font& rFont, - Font& rCJKFont, - Font& rCTLFont ); + vcl::Font& rFont, + vcl::Font& rCJKFont, + vcl::Font& rCTLFont ); SAL_DLLPRIVATE void CheckPriority ( sal_uInt16 nCurLine, AutoFmtLine eLine, diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index d319d86f7d67..744c9bffea76 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -81,7 +81,7 @@ protected: void drawMenuItem(size_t nPos); void drawSeparator(size_t nPos); void drawAllMenuItems(); - const Font& getLabelFont() const { return maLabelFont;} + const vcl::Font& getLabelFont() const { return maLabelFont;} void queueLaunchSubMenu(size_t nPos, ScMenuFloatingWindow* pMenu); void queueCloseSubMenu(); @@ -171,7 +171,7 @@ private: SubMenuItemData maOpenTimer; SubMenuItemData maCloseTimer; - Font maLabelFont; + vcl::Font maLabelFont; // Name of this menu window, taken from the menu item of the parent window // that launches it (if this is a sub menu). If this is a top-level menu diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx index d01f5f0a0b37..1b6024872806 100644 --- a/sc/source/ui/inc/csvgrid.hxx +++ b/sc/source/ui/inc/csvgrid.hxx @@ -91,8 +91,8 @@ private: Color maSelectColor; /// Header color of selected columns. ScEditEnginePtr mpEditEngine; /// For drawing cell texts. - Font maHeaderFont; /// Font for column and row headers. - Font maMonoFont; /// Monospace font for data cells. + vcl::Font maHeaderFont; /// Font for column and row headers. + vcl::Font maMonoFont; /// Monospace font for data cells. Size maWinSize; /// Size of the control. Size maEdEngSize; /// Paper size for edit engine. diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx index 745367e57136..f4ebde0e210b 100644 --- a/sc/source/ui/inc/hdrcont.hxx +++ b/sc/source/ui/inc/hdrcont.hxx @@ -33,8 +33,8 @@ class ScHeaderControl : public Window { private: SelectionEngine* pSelEngine; - Font aNormFont; - Font aBoldFont; + vcl::Font aNormFont; + vcl::Font aBoldFont; bool bBoldSet; bool bVertical; // Vertical = Row header diff --git a/sc/source/ui/inc/hintwin.hxx b/sc/source/ui/inc/hintwin.hxx index 4b30e7e9e85d..89ab1eeb0337 100644 --- a/sc/source/ui/inc/hintwin.hxx +++ b/sc/source/ui/inc/hintwin.hxx @@ -29,8 +29,8 @@ private: OUString aMessage; Point aTextStart; long nTextHeight; - Font aTextFont; - Font aHeadFont; + vcl::Font aTextFont; + vcl::Font aHeadFont; protected: virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 0463eb3bc21f..bfce54fed442 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -112,7 +112,7 @@ protected: typedef ::std::vector< ScAccessibleEditLineTextData* > AccTextDataVector; OUString aString; - Font aTextFont; + vcl::Font aTextFont; ScEditEngineDefaulter* pEditEngine; // only created when needed EditView* pEditView; AccTextDataVector maAccTextDatas; // #i105267# text datas may be cloned, remember all copies diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index ffb0e1504fa0..e7dd3d526886 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -36,7 +36,7 @@ namespace editeng { } class Rectangle; -class Font; +namespace vcl { class Font; } class OutputDevice; class EditEngine; class ScDocument; @@ -233,7 +233,7 @@ private: long& rEngineWidth, long& rEngineHeight, long& rNeededPixel, bool& rLeftClip, bool& rRightClip ); - void SetSyntaxColor( Font* pFont, const ScRefCellValue& rCell ); + void SetSyntaxColor( vcl::Font* pFont, const ScRefCellValue& rCell ); void SetEditSyntaxColor( EditEngine& rEngine, ScRefCellValue& rCell ); double GetStretch(); diff --git a/sc/source/ui/inc/spellparam.hxx b/sc/source/ui/inc/spellparam.hxx index d50e6539a97d..fb326f60cd8c 100644 --- a/sc/source/ui/inc/spellparam.hxx +++ b/sc/source/ui/inc/spellparam.hxx @@ -48,14 +48,14 @@ public: ScConversionType eConvType, LanguageType eSourceLang, LanguageType eTargetLang, - const Font& rTargetFont, + const vcl::Font& rTargetFont, sal_Int32 nOptions, bool bIsInteractive ); inline ScConversionType GetType() const { return meConvType; } inline LanguageType GetSourceLang() const { return meSourceLang; } inline LanguageType GetTargetLang() const { return meTargetLang; } - inline const Font* GetTargetFont() const { return mbUseTargetFont ? &maTargetFont : 0; } + inline const vcl::Font* GetTargetFont() const { return mbUseTargetFont ? &maTargetFont : 0; } inline sal_Int32 GetOptions() const { return mnOptions; } inline bool IsInteractive() const { return mbIsInteractive; } @@ -63,7 +63,7 @@ private: ScConversionType meConvType; /// Type of the conversion. LanguageType meSourceLang; /// Source language for conversion. LanguageType meTargetLang; /// Target language for conversion. - Font maTargetFont; /// Target font to be used if language has to be changed. + vcl::Font maTargetFont; /// Target font to be used if language has to be changed. sal_Int32 mnOptions; /// Conversion options. bool mbUseTargetFont; /// True = Use maTargetFont to change font during conversion. bool mbIsInteractive; /// True = Text conversion has (specific) dialog that may be raised. diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 17ae3d6c5227..a764bf2129bc 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -285,7 +285,7 @@ public: void ExtendScenario(); void UseScenario( const OUString& rName ); - void InsertSpecialChar( const OUString& rStr, const Font& rFont ); + void InsertSpecialChar( const OUString& rStr, const vcl::Font& rFont ); void InsertDummyObject(); void InsertOleObject(); diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index a66eb9ad6fcc..ec571cec12e4 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -94,7 +94,7 @@ ScAutoFmtPreview::~ScAutoFmtPreview() } static void lcl_SetFontProperties( - Font& rFont, + vcl::Font& rFont, const SvxFontItem& rFontItem, const SvxWeightItem& rWeightItem, const SvxPostureItem& rPostureItem ) @@ -108,7 +108,7 @@ static void lcl_SetFontProperties( rFont.SetItalic ( (FontItalic)rPostureItem.GetValue() ); } -void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ) +void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ) { if ( pCurData ) { @@ -259,7 +259,7 @@ void ScAutoFmtPreview::DrawString( size_t nCol, size_t nRow ) if ( pCurData->GetIncludeFont() ) { - Font aFont, aCJKFont, aCTLFont; + vcl::Font aFont, aCJKFont, aCTLFont; Size theMaxStrSize; MakeFonts( nFmtIndex, aFont, aCJKFont, aCTLFont ); @@ -486,7 +486,7 @@ void ScAutoFmtPreview::DoPaint( const Rectangle& /* rRect */ ) sal_uInt32 nOldDrawMode = aVD.GetDrawMode(); Size aWndSize( GetSizePixel() ); - Font aFont( aVD.GetFont() ); + vcl::Font aFont( aVD.GetFont() ); Color aBackCol( GetSettings().GetStyleSettings().GetWindowColor() ); Point aTmpPoint; Rectangle aRect( aTmpPoint, aWndSize ); diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index 7a25b5aeed62..177bc5fd5f0c 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -84,8 +84,8 @@ void ScSolverOptionsString::Paint( const Point& rPos, SvTreeListBox& rDev, const Point aNewPos( rPos ); aNewPos.X() += rDev.GetTextWidth( aNormalStr ); - Font aOldFont( rDev.GetFont() ); - Font aFont( aOldFont ); + vcl::Font aOldFont( rDev.GetFont() ); + vcl::Font aFont( aOldFont ); aFont.SetWeight( WEIGHT_BOLD ); OUString sTxt( ' ' ); diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index d17c24be4f73..850c0b3840ca 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -37,7 +37,7 @@ ScScenarioListBox::ScScenarioListBox( ScScenarioWindow& rParent ) : ListBox( &rParent, WB_BORDER | WB_TABSTOP ), mrParent( rParent ) { - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetTransparent( true ); aFont.SetWeight( WEIGHT_LIGHT ); SetFont( aFont ); @@ -200,7 +200,7 @@ ScScenarioWindow::ScScenarioWindow( Window* pParent, const OUString& aQH_List, aLbScenario ( *this ), aEdComment ( this, WB_BORDER | WB_LEFT | WB_READONLY | WB_VSCROLL | WB_TABSTOP ) { - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetTransparent( true ); aFont.SetWeight( WEIGHT_LIGHT ); aEdComment.SetFont( aFont ); diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 7a433dfe3a5b..7682e20011c8 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -52,8 +52,8 @@ void OptionString::InitViewData( OUString aDesc = maDesc + ": "; Size aDescSize(pView->GetTextWidth(aDesc), pView->GetTextHeight()); - Font aOldFont = pView->GetFont(); - Font aFont = aOldFont; + vcl::Font aOldFont = pView->GetFont(); + vcl::Font aFont = aOldFont; aFont.SetWeight(WEIGHT_BOLD); //To not make the SvTreeListBox try and recalculate all rows, call the //underlying SetFont, we just want to know what size this text will be @@ -72,8 +72,8 @@ void OptionString::Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDat rDev.DrawText(aPos, aDesc); aPos.X() += rDev.GetTextWidth(aDesc); - Font aOldFont = rDev.GetFont(); - Font aFont = aOldFont; + vcl::Font aOldFont = rDev.GetFont(); + vcl::Font aFont = aOldFont; aFont.SetWeight(WEIGHT_BOLD); //To not make the SvTreeListBox try and recalculate all rows, call the diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx index b2075c4bccf9..ee2b9a7ec514 100644 --- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx +++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx @@ -70,11 +70,11 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt ) long nRectWidth = aRect.GetWidth(); Point aBLPos = aRect.TopLeft(); - Font aOldFont = pDev->GetFont(); + vcl::Font aOldFont = pDev->GetFont(); Color aOldColor = pDev->GetLineColor(); Color aOldFillColor = pDev->GetFillColor(); - Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); + vcl::Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); Size aSize = aFont.GetSize(); aSize.Height() = nRectHeight*3/5; aFont.SetSize( aSize ); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a314da25041d..2d0a52b8d133 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -3758,7 +3758,7 @@ double getDefaultCharWidth( ScDocShell* pDocShell ) ScDocument& rDoc = pDocShell->GetDocument(); OutputDevice* pRefDevice = rDoc.GetRefDevice(); ScPatternAttr* pAttr = rDoc.GetDefPattern(); - ::Font aDefFont; + vcl::Font aDefFont; pAttr->GetFont( aDefFont, SC_AUTOCOL_BLACK, pRefDevice ); pRefDevice->SetFont( aDefFont ); long nCharWidth = pRefDevice->GetTextWidth( OUString( '0' ) ); // 1/100th mm diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 04e5401b36ff..93439bf32d11 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1738,7 +1738,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if( !bCommonTerms ) nOptions |= i18n::TextConversionOption::CHARACTER_BY_CHARACTER; - Font aTargetFont = OutputDevice::GetDefaultFont( + vcl::Font aTargetFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_SPREADSHEET, eTargetLang, DEFAULTFONT_FLAGS_ONLYONE ); ScConversionParam aConvParam( SC_CONVERSION_CHINESE_TRANSL, @@ -2261,11 +2261,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( !aChars.isEmpty() ) { - Font aFont; + vcl::Font aFont; pTabViewShell->GetSelectionPattern()->GetFont( aFont, SC_AUTOCOL_BLACK, NULL, NULL, NULL, pTabViewShell->GetSelectionScriptType() ); if ( !aFontName.isEmpty() ) - aFont = Font( aFontName, Size(1,1) ); + aFont = vcl::Font( aFontName, Size(1,1) ); pTabViewShell->InsertSpecialChar( aChars, aFont ); if( ! rReq.IsAPI() ) rReq.Done(); @@ -2276,7 +2276,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); // font color doesn't matter here - Font aCurFont; + vcl::Font aCurFont; pTabViewShell->GetSelectionPattern()->GetFont( aCurFont, SC_AUTOCOL_BLACK, NULL, NULL, NULL, pTabViewShell->GetSelectionScriptType() ); @@ -2294,7 +2294,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) if ( pItem && pFontItem ) { - Font aNewFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), Size(1,1) ); + vcl::Font aNewFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), Size(1,1) ); aNewFont.SetCharSet( pFontItem->GetCharSet() ); aNewFont.SetPitch( pFontItem->GetPitch() ); pTabViewShell->InsertSpecialChar( pItem->GetValue(), aNewFont ); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 1c2d6dddb12e..e2f22472ba23 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -357,7 +357,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) if ( pFontItem ) { OUString aFontName(pFontItem->GetValue()); - Font aFont(aFontName, Size(1,1)); // Size nur wg. CTOR + vcl::Font aFont(aFontName, Size(1,1)); // Size nur wg. CTOR aNewItem = SvxFontItem( aFont.GetFamily(), aFont.GetName(), aFont.GetStyleName(), aFont.GetPitch(), aFont.GetCharSet(), ATTR_FONT ); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 74219599323e..059d766099f9 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -979,8 +979,8 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange ) nSizeX += 1; { - Font aOldFont = GetFont(); SetFont( pFilterBox->GetFont() ); - MapMode aOldMode = GetMapMode(); SetMapMode( MAP_PIXEL ); + vcl::Font aOldFont = GetFont(); SetFont( pFilterBox->GetFont() ); + MapMode aOldMode = GetMapMode(); SetMapMode( MAP_PIXEL ); nHeight = GetTextHeight(); nHeight *= SC_FILTERLISTBOX_LINES; @@ -1102,8 +1102,8 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec nSizeX += 1; { - Font aOldFont = GetFont(); SetFont( pFilterBox->GetFont() ); - MapMode aOldMode = GetMapMode(); SetMapMode( MAP_PIXEL ); + vcl::Font aOldFont = GetFont(); SetFont( pFilterBox->GetFont() ); + MapMode aOldMode = GetMapMode(); SetMapMode( MAP_PIXEL ); nHeight = GetTextHeight(); nHeight *= SC_FILTERLISTBOX_LINES; diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index a60fb82812f7..4a2ecd02cc74 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -102,12 +102,12 @@ static void lcl_DrawOneFrame( OutputDevice* pDev, const Rectangle& rInnerPixel, aOuter.Bottom() += nVer; // use ScPatternAttr::GetFont only for font size - Font aAttrFont; + vcl::Font aAttrFont; ((const ScPatternAttr&)pDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)). GetFont(aAttrFont,SC_AUTOCOL_BLACK,pDev,&rZoomY); // everything else from application font - Font aAppFont = pDev->GetSettings().GetStyleSettings().GetAppFont(); + vcl::Font aAppFont = pDev->GetSettings().GetStyleSettings().GetAppFont(); aAppFont.SetSize( aAttrFont.GetSize() ); aAppFont.SetAlign( ALIGN_TOP ); @@ -928,7 +928,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, nPageScript = ScGlobal::GetDefaultScriptType(); } - Font aFont; + vcl::Font aFont; boost::scoped_ptr<ScEditEngineDefaulter> pEditEng; const ScPatternAttr& rDefPattern = ((const ScPatternAttr&)pDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)); if ( nPageScript == SCRIPTTYPE_LATIN ) diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index a52e4f738eec..5bca67950889 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -89,7 +89,7 @@ class ScDrawStringsVars const ScPatternAttr* pPattern; // Attribute const SfxItemSet* pCondSet; // aus bedingter Formatierung - Font aFont; // aus Attributen erzeugt + vcl::Font aFont; // aus Attributen erzeugt FontMetric aMetric; long nAscentPixel; // always pixels SvxCellOrientation eAttrOrient; @@ -234,7 +234,7 @@ void ScDrawStringsVars::SetShrinkScale( long nScale, sal_uInt8 nScript ) Fraction aFraction( nScale, 100 ); if ( !bPixelToLogic ) aFraction *= pOutput->aZoomY; - Font aTmpFont; + vcl::Font aTmpFont; pPattern->GetFont( aTmpFont, SC_AUTOCOL_RAW, pFmtDevice, &aFraction, pCondSet, nScript ); long nNewHeight = aTmpFont.GetHeight(); if ( nNewHeight > 0 ) @@ -844,7 +844,7 @@ static void lcl_DoHyperlinkResult( OutputDevice* pDev, const Rectangle& rRect, S } } -void ScOutputData::SetSyntaxColor( Font* pFont, const ScRefCellValue& rCell ) +void ScOutputData::SetSyntaxColor( vcl::Font* pFont, const ScRefCellValue& rCell ) { switch (rCell.meType) { diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 7160b05019cd..48697023ecad 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1847,7 +1847,7 @@ long ScPrintFunc::DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData pEditDefaults->Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) ); pEditEngine->SetDefaults( *pEditDefaults ); - Font aMarkFont; + vcl::Font aMarkFont; ScAutoFontColorMode eColorMode = bUseStyleColor ? SC_AUTOCOL_DISPLAY : SC_AUTOCOL_PRINT; ((const ScPatternAttr&)pDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)).GetFont( aMarkFont, eColorMode ); pDev->SetFont( aMarkFont ); @@ -2263,7 +2263,7 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO } ScPatternAttr aPattern( pDoc->GetPool() ); - Font aFont; + vcl::Font aFont; ScAutoFontColorMode eColorMode = bUseStyleColor ? SC_AUTOCOL_DISPLAY : SC_AUTOCOL_PRINT; aPattern.GetFont( aFont, eColorMode, pDev ); pDev->SetFont( aFont ); diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 0bd7d90c9561..4d5a2e352da8 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -356,7 +356,7 @@ ScConversionParam::ScConversionParam( ScConversionType eConvType, } ScConversionParam::ScConversionParam( ScConversionType eConvType, - LanguageType eSourceLang, LanguageType eTargetLang, const Font& rTargetFont, + LanguageType eSourceLang, LanguageType eTargetLang, const vcl::Font& rTargetFont, sal_Int32 nOptions, bool bIsInteractive ) : meConvType( eConvType ), meSourceLang( eSourceLang ), diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 50c517debd04..2e60bfacdf3f 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2755,7 +2755,7 @@ void ScViewFunc::HideTable( const ScMarkData& rMark ) } } -void ScViewFunc::InsertSpecialChar( const OUString& rStr, const Font& rFont ) +void ScViewFunc::InsertSpecialChar( const OUString& rStr, const vcl::Font& rFont ) { ScEditableTester aTester( this ); if (!aTester.IsEditable()) diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index ee84cb4349d8..7fbe423a7ca3 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -155,7 +155,7 @@ public: /** Starts the text conversion (hangul/hanja or Chinese simplified/traditional) for the current viewshell */ void StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage, - const Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ); + const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ); /** This is called internally when text conversion is started. The position of current view mode/page/object/caret position diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 2e0a174f69e7..1998e4d039be 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -571,7 +571,7 @@ public: /** return the document fonts for latin, cjk and ctl according to the current languages set at this document */ - SAL_DLLPRIVATE void getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont ); + SAL_DLLPRIVATE void getDefaultFonts( vcl::Font& rLatinFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ); SAL_DLLPRIVATE sd::UndoManager* GetUndoManager() const; diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx index ae146096542d..15958987fe55 100644 --- a/sd/inc/stlpool.hxx +++ b/sd/inc/stlpool.hxx @@ -86,8 +86,8 @@ public: void CreatePseudosIfNecessary(); void UpdateStdNames(); - static void PutNumBulletItem( SfxStyleSheetBase* pSheet, Font& rBulletFont ); - static Font GetBulletFont(); + static void PutNumBulletItem( SfxStyleSheetBase* pSheet, vcl::Font& rBulletFont ); + static vcl::Font GetBulletFont(); SdDrawDocument* GetDoc() const { return mpDoc; } diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index b5ab78dd473a..5daa653a5d58 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -180,7 +180,7 @@ void SdDrawDocument::CreateLayoutTemplates() rISet.Put(makeSdrShadowXDistItem(200)); // 3 mm Shadow distance rISet.Put(makeSdrShadowYDistItem(200)); - Font aLatinFont, aCJKFont, aCTLFont; + vcl::Font aLatinFont, aCJKFont, aCTLFont; getDefaultFonts( aLatinFont, aCJKFont, aCTLFont ); @@ -241,7 +241,7 @@ void SdDrawDocument::CreateLayoutTemplates() aBulletItem.SetStart(1); aBulletItem.SetScale(45); // In percent - Font aBulletFont( SdStyleSheetPool::GetBulletFont() ); + vcl::Font aBulletFont( SdStyleSheetPool::GetBulletFont() ); aBulletFont.SetSize(Size(0,635)); // sj: (i33745) changed default from 24 to 18 pt @@ -560,7 +560,7 @@ void SdDrawDocument::CreateDefaultCellStyles() rISet.Put(XFillStyleItem(drawing::FillStyle_SOLID)); rISet.Put(XFillColorItem(OUString(), RGB_Color(0x00ccccff))); - Font aLatinFont, aCJKFont, aCTLFont; + vcl::Font aLatinFont, aCJKFont, aCTLFont; getDefaultFonts( aLatinFont, aCJKFont, aCTLFont ); @@ -1204,7 +1204,7 @@ void SdDrawDocument::SetTextDefaults() const { // BulletItem and BulletFont for Titel and Outline SvxBulletItem aBulletItem(EE_PARA_BULLET); - Font aBulletFont( SdStyleSheetPool::GetBulletFont() ); + vcl::Font aBulletFont( SdStyleSheetPool::GetBulletFont() ); aBulletFont.SetSize(Size(0,846)); // 24 pt aBulletItem.SetFont(aBulletFont); aBulletItem.SetStyle(BS_BULLET); @@ -1292,7 +1292,7 @@ void SdDrawDocument::SetDefaultWritingMode(::com::sun::star::text::WritingMode e } } -void SdDrawDocument::getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont ) +void SdDrawDocument::getDefaultFonts( vcl::Font& rLatinFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ) { LanguageType eLatin = GetLanguage( EE_CHAR_LANGUAGE ); diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index 4a6a94059143..512df9c78e3e 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -190,7 +190,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool OUString aPrefix(rLayoutName + SD_LT_SEPARATOR); - Font aLatinFont, aCJKFont, aCTLFont; + vcl::Font aLatinFont, aCJKFont, aCTLFont; mpDoc->getDefaultFonts( aLatinFont, aCJKFont, aCTLFont ); @@ -204,7 +204,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(), aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); - Font aBulletFont( GetBulletFont() ); + vcl::Font aBulletFont( GetBulletFont() ); /************************************************************************** * outline levels @@ -261,7 +261,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool if( nLevel == 1 ) { - Font f( GetBulletFont() ); + vcl::Font f( GetBulletFont() ); PutNumBulletItem( pSheet, f ); } } @@ -423,7 +423,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool aSvxLRSpaceItem.SetTxtLeft(0); rSubtitleSet.Put(aSvxLRSpaceItem); - Font aTmpFont( GetBulletFont() ); + vcl::Font aTmpFont( GetBulletFont() ); aTmpFont.SetSize(Size(0, 1129)); // 32 pt PutNumBulletItem( pSheet, aTmpFont ); } @@ -1090,7 +1090,7 @@ void SdStyleSheetPool::setDefaultOutlineNumberFormatBulletAndIndent(sal_uInt16 i // Set new SvxNumBulletItem for the respective style sheet void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, - Font& rBulletFont ) + vcl::Font& rBulletFont ) { OUString aHelpFile; sal_uLong nHelpId = pSheet->GetHelpId( aHelpFile ); @@ -1217,9 +1217,9 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet, |* \************************************************************************/ -Font SdStyleSheetPool::GetBulletFont() +vcl::Font SdStyleSheetPool::GetBulletFont() { - Font aBulletFont( OUString( "StarSymbol" ), Size(0, 1000) ); + vcl::Font aBulletFont( OUString( "StarSymbol" ), Size(0, 1000) ); aBulletFont.SetCharSet(RTL_TEXTENCODING_UNICODE); aBulletFont.SetWeight(WEIGHT_NORMAL); aBulletFont.SetUnderline(UNDERLINE_NONE); diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 73bb35c8d25f..f960506fd141 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -1017,7 +1017,7 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con { if( EE_PARA_NUMBULLET == pEntry->nWID ) { - Font aBulletFont; + vcl::Font aBulletFont; SdStyleSheetPool::PutNumBulletItem( this, aBulletFont ); aSet.Put( rStyleSet ); } diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 22a62b48c9fe..358157662ff5 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -1426,7 +1426,7 @@ sal_uInt32 FontCollection::GetId( FontCollectionEntry& rEntry ) if( pEntry->Name == rEntry.Name ) return i; } - Font aFont; + vcl::Font aFont; aFont.SetCharSet( rEntry.CharSet ); aFont.SetName( rEntry.Original ); aFont.SetHeight( 100 ); diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index c3bc421df3b7..caec627bcaec 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -915,7 +915,7 @@ void FontStylePropertyBox::update() mpMenu->CheckItem( CM_UNDERLINED, mnFontUnderline != awt::FontUnderline::NONE ); // update sample edit - Font aFont( mpEdit->GetFont() ); + vcl::Font aFont( mpEdit->GetFont() ); aFont.SetWeight( mfFontWeight == awt::FontWeight::BOLD ? WEIGHT_BOLD : WEIGHT_NORMAL ); aFont.SetItalic( meFontSlant == awt::FontSlant_ITALIC ? ITALIC_NORMAL : ITALIC_NONE ); aFont.SetUnderline( mnFontUnderline == awt::FontUnderline::NONE ? UNDERLINE_NONE : UNDERLINE_SINGLE ); diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 1c10fddcf32c..33c8cb1f0ae0 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -109,7 +109,7 @@ SfxItemPool* GetAnnotationPool() mpAnnotationPool = EditEngine::CreatePool( false ); mpAnnotationPool->SetPoolDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT)); - Font aAppFont( Application::GetSettings().GetStyleSettings().GetAppFont() ); + vcl::Font aAppFont( Application::GetSettings().GetStyleSettings().GetAppFont() ); mpAnnotationPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamily(),aAppFont.GetName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO)); } diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx index 36b40e40870c..f81c76112fcd 100644 --- a/sd/source/ui/annotations/annotationmanagerimpl.hxx +++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx @@ -124,7 +124,7 @@ private: bool mbShowAnnotations; ImplSVEvent * mnUpdateTagsEvent; - Font maFont; + vcl::Font maFont; }; OUString getAnnotationDateTimeString( const css::uno::Reference< css::office::XAnnotation >& xAnnotation ); diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index f62c89a0ece8..8c22c8a62a9c 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -267,7 +267,7 @@ Pointer AnnotationHdl::GetSdrDragPointer() const return Pointer( eStyle ); } -AnnotationTag::AnnotationTag( AnnotationManagerImpl& rManager, ::sd::View& rView, const Reference< XAnnotation >& xAnnotation, Color& rColor, int nIndex, const Font& rFont ) +AnnotationTag::AnnotationTag( AnnotationManagerImpl& rManager, ::sd::View& rView, const Reference< XAnnotation >& xAnnotation, Color& rColor, int nIndex, const vcl::Font& rFont ) : SmartTag( rView ) , mrManager( rManager ) , mxAnnotation( xAnnotation ) diff --git a/sd/source/ui/annotations/annotationtag.hxx b/sd/source/ui/annotations/annotationtag.hxx index 869ae81fb527..515d7b155a07 100644 --- a/sd/source/ui/annotations/annotationtag.hxx +++ b/sd/source/ui/annotations/annotationtag.hxx @@ -34,7 +34,7 @@ class AnnotationWindow; class AnnotationTag : public SmartTag { public: - AnnotationTag( AnnotationManagerImpl& rManager, ::sd::View& rView, const css::uno::Reference< css::office::XAnnotation >& xAnnotation, Color& rColor, int nIndex, const Font& rFont ); + AnnotationTag( AnnotationManagerImpl& rManager, ::sd::View& rView, const css::uno::Reference< css::office::XAnnotation >& xAnnotation, Color& rColor, int nIndex, const vcl::Font& rFont ); virtual ~AnnotationTag(); /// @return true if the SmartTag handled the event. @@ -82,7 +82,7 @@ private: std::auto_ptr<AnnotationWindow> mpAnnotationWindow; Color maColor; int mnIndex; - const Font& mrFont; + const vcl::Font& mrFont; Size maSize; ImplSVEvent * mnClosePopupEvent; ::Window* mpListenWindow; diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index c9f0e31b2663..336682484d44 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -308,7 +308,7 @@ void AnnotationWindow::InitControls() // with variable meta size height AllSettings aSettings = mpMeta->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); - Font aFont = aStyleSettings.GetFieldFont(); + vcl::Font aFont = aStyleSettings.GetFieldFont(); aFont.SetHeight(8); aStyleSettings.SetFieldFont(aFont); aSettings.SetStyleSettings(aStyleSettings); @@ -374,7 +374,7 @@ void AnnotationWindow::Rescale() mpTextWindow->SetMapMode( aMode ); if ( mpMeta ) { - Font aFont( mpMeta->GetSettings().GetStyleSettings().GetFieldFont() ); + vcl::Font aFont( mpMeta->GetSettings().GetStyleSettings().GetFieldFont() ); sal_Int32 nHeight = aFont.GetHeight(); nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator(); aFont.SetHeight( nHeight ); diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index 4cbe097eca8b..0377b7c5e659 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -301,8 +301,8 @@ void ClientBox::DrawRow( const Rectangle& rRect, const TClientBoxEntry pEntry ) Point aPos( rRect.TopLeft() ); // Setup fonts - Font aStdFont( GetFont() ); - Font aBoldFont( aStdFont ); + vcl::Font aStdFont( GetFont() ); + vcl::Font aBoldFont( aStdFont ); aBoldFont.SetWeight( WEIGHT_BOLD ); SetFont( aBoldFont ); long aTextHeight = GetTextHeight(); diff --git a/sd/source/ui/func/bulmaper.cxx b/sd/source/ui/func/bulmaper.cxx index 4563e1e98b7d..d0b505c615ec 100644 --- a/sd/source/ui/func/bulmaper.cxx +++ b/sd/source/ui/func/bulmaper.cxx @@ -62,7 +62,7 @@ void SdBulletMapper::MapFontsInNumRule( SvxNumRule& aNumRule, const SfxItemSet& long nWeightID = SID_ATTR_CHAR_WEIGHT; long nPostureID = SID_ATTR_CHAR_POSTURE; - Font aMyFont; + vcl::Font aMyFont; const SvxFontItem& rFItem = (SvxFontItem&)rSet.Get(GetWhich( (sal_uInt16)nFontID )); aMyFont.SetFamily(rFItem.GetFamily()); diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx index 7fdee9ce7011..30d239c4e374 100644 --- a/sd/source/ui/func/fubullet.cxx +++ b/sd/source/ui/func/fubullet.cxx @@ -156,7 +156,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_CHARMAP), false, &pItem); OUString aChars; - Font aFont; + vcl::Font aFont; if ( pItem ) { aChars = ((const SfxStringItem*)pItem)->GetValue(); @@ -166,7 +166,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) if ( pFontItem ) { OUString aFontName = pFontItem->GetValue(); - aFont = Font( aFontName, Size(1,1) ); + aFont = vcl::Font( aFontName, Size(1,1) ); } else { @@ -174,7 +174,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq ) mpView->GetAttributes( aFontAttr ); const SvxFontItem* pFItem = (const SvxFontItem*)aFontAttr.GetItem( SID_ATTR_CHAR_FONT ); if( pFItem ) - aFont = Font( pFItem->GetFamilyName(), pFItem->GetStyleName(), Size( 1, 1 ) ); + aFont = vcl::Font( pFItem->GetFamilyName(), pFItem->GetStyleName(), Size( 1, 1 ) ); } } diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx index 24a3f0b1212f..c5049a502c01 100644 --- a/sd/source/ui/func/fuhhconv.cxx +++ b/sd/source/ui/func/fuhhconv.cxx @@ -97,7 +97,7 @@ rtl::Reference<FuPoor> FuHangulHanjaConversion::Create( ViewShell* pViewSh, ::sd * Search and replace */ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage, - const Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ) + const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ) { mpView->BegUndo(SD_RESSTR(STR_UNDO_HANGULHANJACONVERSION)); @@ -148,7 +148,7 @@ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_In mpView->EndUndo(); } -void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const Font *pTargetFont ) +void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const vcl::Font *pTargetFont ) { if( !mpDoc ) return; @@ -241,7 +241,7 @@ void FuHangulHanjaConversion::StartChineseConversion() if( !bCommonTerms ) nOptions = nOptions | i18n::TextConversionOption::CHARACTER_BY_CHARACTER; - Font aTargetFont = OutputDevice::GetDefaultFont( + vcl::Font aTargetFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_PRESENTATION, nTargetLang, DEFAULTFONT_FLAGS_ONLYONE ); diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx index 48f7f788c6fa..837d1b788e4f 100644 --- a/sd/source/ui/inc/OutlineView.hxx +++ b/sd/source/ui/inc/OutlineView.hxx @@ -211,8 +211,8 @@ private: /** holds a model guard during drag and drop between BeginMovingHdl and EndMovingHdl */ std::auto_ptr< OutlineViewModelChangeGuard > maDragAndDropModelGuard; - Font maPageNumberFont; - Font maBulletFont; + vcl::Font maPageNumberFont; + vcl::Font maBulletFont; SvxLRSpaceItem maLRSpaceItem; Image maSlideImage; diff --git a/sd/source/ui/inc/fuhhconv.hxx b/sd/source/ui/inc/fuhhconv.hxx index 93a1a21cf945..25669f68bdad 100644 --- a/sd/source/ui/inc/fuhhconv.hxx +++ b/sd/source/ui/inc/fuhhconv.hxx @@ -34,11 +34,11 @@ class FuHangulHanjaConversion : public FuPoor static rtl::Reference<FuPoor> Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq ); void StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage, - const Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ); + const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ); void StartChineseConversion(); - void ConvertStyles( sal_Int16 nTargetLanguage, const Font *pTargetFont ); + void ConvertStyles( sal_Int16 nTargetLanguage, const vcl::Font *pTargetFont ); Outliner* GetOutliner() const { return pSdOutliner; } diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 9c3166c4f270..5b2fe7a52146 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -327,7 +327,7 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine (void) const FontDta &rFntDta = aTable[i]; LanguageType nLang = (LANGUAGE_NONE == rFntDta.nLang) ? rFntDta.nFallbackLang : rFntDta.nLang; - Font aFont = OutputDevice::GetDefaultFont( + vcl::Font aFont = OutputDevice::GetDefaultFont( rFntDta.nFontType, nLang, DEFAULTFONT_FLAGS_ONLYONE); mpEditEngineItemPool->SetPoolDefaultItem( SvxFontItem( diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index f24e6a153e85..29038e6cf8db 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -469,8 +469,8 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly ) OUString aText( SdResId( STR_PRES_PAUSE ) ); bool bDrawn = false; - Font aFont( GetSettings().GetStyleSettings().GetMenuFont() ); - const Font aOldFont( GetFont() ); + vcl::Font aFont( GetSettings().GetStyleSettings().GetMenuFont() ); + const vcl::Font aOldFont( GetFont() ); aFont.SetSize( aTextSize ); aFont.SetColor( COL_WHITE ); @@ -534,8 +534,8 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly ) void ShowWindow::DrawEndScene() { - const Font aOldFont( GetFont() ); - Font aFont( GetSettings().GetStyleSettings().GetMenuFont() ); + const vcl::Font aOldFont( GetFont() ); + vcl::Font aFont( GetSettings().GetStyleSettings().GetMenuFont() ); const Point aOutOrg( PixelToLogic( Point() ) ); const Size aTextSize( LogicToLogic( Size( 0, 14 ), MAP_POINT, GetMapMode() ) ); diff --git a/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx b/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx index d80dad32dcf4..479602b72d43 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx @@ -25,7 +25,7 @@ #include <boost/shared_ptr.hpp> #include <vcl/mapmod.hxx> -class Font; +namespace vcl { class Font; } namespace sd { namespace slidesorter { namespace view { @@ -36,7 +36,7 @@ class FontProvider : public SdGlobalResource { public: - typedef ::boost::shared_ptr<Font> SharedFontPointer; + typedef ::boost::shared_ptr<vcl::Font> SharedFontPointer; /** Return the single instance of this class. Throws a RuntimeException when no instance can be created. diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx index d4070714e45a..25d9192716d2 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx @@ -133,7 +133,7 @@ private: Rectangle maCustomAnimationEffectBoundingBox; const Image maTransitionEffectIcon; const Image maCustomAnimationEffectIcon; - const ::boost::shared_ptr<Font> mpPageNumberFont; + const ::boost::shared_ptr<vcl::Font> mpPageNumberFont; Size GetPageNumberAreaSize (const int nPageCount); Rectangle CalculatePreviewBoundingBox ( diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx index dcc9065c4b85..6cbaa06b29a9 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx @@ -73,7 +73,7 @@ private: ::boost::shared_ptr<cache::PageCache> mpCache; ::boost::shared_ptr<controller::Properties> mpProperties; ::boost::shared_ptr<view::Theme> mpTheme; - ::boost::shared_ptr<Font> mpPageNumberFont; + ::boost::shared_ptr<vcl::Font> mpPageNumberFont; ::boost::scoped_ptr<FramePainter> mpShadowPainter; ::boost::scoped_ptr<FramePainter> mpFocusBorderPainter; Bitmap maNormalBackground; diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx index c0decd7a34c7..814bf1a3561c 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx @@ -58,7 +58,7 @@ public: Font_PageNumber, Font_PageCount }; - static ::boost::shared_ptr<Font> GetFont ( + static ::boost::shared_ptr<vcl::Font> GetFont ( const FontType eType, const OutputDevice& rDevice); diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx index 2863232ba22e..078b7b0c543d 100644 --- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx +++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx @@ -244,7 +244,7 @@ void InsertionIndicatorOverlay::PaintPageCount ( { // Paint the number of slides. ::boost::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme()); - ::boost::shared_ptr<Font> pFont(Theme::GetFont(Theme::Font_PageCount, rDevice)); + ::boost::shared_ptr<vcl::Font> pFont(Theme::GetFont(Theme::Font_PageCount, rDevice)); if (pFont) { OUString sNumber (OUString::number(nSelectionCount)); diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx index b056787b3a53..7d82198d722e 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx @@ -236,7 +236,7 @@ Size PageObjectLayouter::GetPageNumberAreaSize (const int nPageCount) OSL_ASSERT(mpWindow); // Set the correct font. - Font aOriginalFont (mpWindow->GetFont()); + vcl::Font aOriginalFont (mpWindow->GetFont()); if (mpPageNumberFont) mpWindow->SetFont(*mpPageNumberFont); diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx index a0ce837beaf0..d7fddd2b7d5a 100644 --- a/sd/source/ui/slidesorter/view/SlsTheme.cxx +++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx @@ -128,22 +128,22 @@ void Theme::Update (const ::boost::shared_ptr<controller::Properties>& rpPropert } } -::boost::shared_ptr<Font> Theme::GetFont ( +::boost::shared_ptr<vcl::Font> Theme::GetFont ( const FontType eType, const OutputDevice& rDevice) { - ::boost::shared_ptr<Font> pFont; + ::boost::shared_ptr<vcl::Font> pFont; switch (eType) { case Font_PageNumber: - pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont())); + pFont.reset(new vcl::Font(Application::GetSettings().GetStyleSettings().GetAppFont())); pFont->SetTransparent(true); pFont->SetWeight(WEIGHT_BOLD); break; case Font_PageCount: - pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont())); + pFont.reset(new vcl::Font(Application::GetSettings().GetStyleSettings().GetAppFont())); pFont->SetTransparent(true); pFont->SetWeight(WEIGHT_NORMAL); { diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index ee06476b6ffc..855e762029cf 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -330,8 +330,8 @@ void PreviewRenderer::PaintSubstitutionText (const OUString& rSubstitutionText) if (!rSubstitutionText.isEmpty()) { // Set the font size. - const Font& rOriginalFont (mpPreviewDevice->GetFont()); - Font aFont (mpPreviewDevice->GetSettings().GetStyleSettings().GetAppFont()); + const vcl::Font& rOriginalFont (mpPreviewDevice->GetFont()); + vcl::Font aFont (mpPreviewDevice->GetSettings().GetStyleSettings().GetAppFont()); sal_Int32 nHeight (mpPreviewDevice->PixelToLogic(Size(0,snSubstitutionTextSize)).Height()); aFont.SetHeight(nHeight); mpPreviewDevice->SetFont (aFont); diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index a5ffa6ae69a8..5880a6936d24 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -315,8 +315,8 @@ namespace { const OUString& rsPageString, const Point& rPageStringOffset) { - const Font aOriginalFont (rPrinter.OutputDevice::GetFont()); - rPrinter.SetFont(Font(FAMILY_SWISS, Size(0, 423))); + const vcl::Font aOriginalFont (rPrinter.OutputDevice::GetFont()); + rPrinter.SetFont(vcl::Font(FAMILY_SWISS, Size(0, 423))); rPrinter.DrawText(rPageStringOffset, rsPageString); rPrinter.SetFont(aOriginalFont); } diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index ea831ac39185..8b9676634119 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1453,7 +1453,7 @@ void Outliner::HandleChangedSelection (void) } void Outliner::StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage, - const Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ) + const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ) { ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock()); bool bMultiDoc = pViewShell->ISA(DrawViewShell); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 3751311a5f25..d9855be75126 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -1732,7 +1732,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo) LanguageType eLang = rEditEngine.GetDefaultLanguage(); Point aTextPos( aImagePos.X() - aOffset.Width(), pInfo->mrStartPos.Y() ); - Font aNewFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE, eLang, 0 ) ); + vcl::Font aNewFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE, eLang, 0 ) ); aNewFont.SetSize( aFontSz ); aNewFont.SetVertical( bVertical ); aNewFont.SetOrientation( bVertical ? 2700 : 0 ); diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index ff1267726d03..effd7c2f582b 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -374,7 +374,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP // create font SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObject ); const SdrTextVertAdjust eTVA(pTextObj ? pTextObj->GetTextVerticalAdjust() : SDRTEXTVERTADJUST_CENTER); - Font aScaledVclFont; + vcl::Font aScaledVclFont; // use a text size factor to get more reliable text sizes from the text layouter // (and from vcl), tipp from HDU @@ -403,7 +403,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP // get font attributes; use normally scaled font const basegfx::BColor aFontColor(aRGBColor); - Font aVclFont; + vcl::Font aVclFont; basegfx::B2DVector aTextSizeAttribute; aVclFont.SetHeight( 500 ); diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index eedffe48ba03..0462c286bc71 100644 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -664,7 +664,7 @@ void Parser::readFont() if (vDev == 0) vDev = new VirtualDevice; - Font font(aResult.familyName, Size(0, 1000)); + vcl::Font font(aResult.familyName, Size(0, 1000)); vDev->SetFont(font); FontMetric metric(vDev->GetFontMetric()); aResult.ascent = metric.GetAscent() / 1000.0; diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 80eaf8395a97..862c76ba3d0e 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -153,7 +153,7 @@ Sequence< OUString > SAL_CALL SfxTerminateListener_Impl::getSupportedServiceName -typedef bool ( *PFunc_getSpecialCharsForEdit)( Window* i_pParent, const Font& i_rFont, OUString& o_rOutString ); +typedef bool ( *PFunc_getSpecialCharsForEdit)( Window* i_pParent, const vcl::Font& i_rFont, OUString& o_rOutString ); // Lazy binding of the GetSpecialCharsForEdit function as it resides in @@ -166,11 +166,11 @@ extern "C" { static void SAL_CALL thisModule() {} } #else -extern "C" bool GetSpecialCharsForEdit( Window* i_pParent, const Font& i_rFont, OUString& o_rOutString ); +extern "C" bool GetSpecialCharsForEdit( Window* i_pParent, const vcl::Font& i_rFont, OUString& o_rOutString ); #endif -OUString GetSpecialCharsForEdit(Window* pParent, const Font& rFont) +OUString GetSpecialCharsForEdit(Window* pParent, const vcl::Font& rFont) { static bool bDetermineFunction = false; static PFunc_getSpecialCharsForEdit pfunc_getSpecialCharsForEdit = 0; diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index f88cfbbbb96f..05bb985b3298 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -119,7 +119,7 @@ bool RecentDocsView::isAcceptedFile(const OUString &rURL) const void RecentDocsView::SetMessageFont() { - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); aFont.SetHeight(aFont.GetHeight()*1.3); SetFont(aFont); } @@ -204,7 +204,7 @@ void RecentDocsView::Reload() // Set preferred width if (mFilteredItemList.empty()) { - Font aOldFont(GetFont()); + vcl::Font aOldFont(GetFont()); SetMessageFont(); set_width_request(std::max(GetTextWidth(maWelcomeLine1), GetTextWidth(maWelcomeLine2))); SetFont(aOldFont); @@ -261,7 +261,7 @@ void RecentDocsView::Paint( const Rectangle &aRect ) if ( mItemList.size() == 0 ) { // No recent files to be shown yet. Show a welcome screen. - Font aOldFont(GetFont()); + vcl::Font aOldFont(GetFont()); SetMessageFont(); long nTextHeight = GetTextHeight(); @@ -299,7 +299,7 @@ void RecentDocsView::LoseFocus() void RecentDocsView::Clear() { - Font aOldFont(GetFont()); + vcl::Font aOldFont(GetFont()); SetMessageFont(); set_width_request(std::max(GetTextWidth(maWelcomeLine1), GetTextWidth(maWelcomeLine2))); SetFont(aOldFont); diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 5c9a20b8dc32..8c0bbee9bc33 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -191,7 +191,7 @@ void ThumbnailView::ImplInitSettings( bool bFont, bool bForeground, bool bBackgr if ( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index e258b30b759f..584b1b387ea2 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -286,7 +286,7 @@ void BackingWindow::initControls() // setup nice colors mpCreateLabel->SetControlForeground(aButtonsText); - Font aFont(mpCreateLabel->GetSettings().GetStyleSettings().GetLabelFont()); + vcl::Font aFont(mpCreateLabel->GetSettings().GetStyleSettings().GetLabelFont()); aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier)); mpCreateLabel->SetControlFont(aFont); @@ -320,7 +320,7 @@ void BackingWindow::initControls() void BackingWindow::setupButton( PushButton* pButton ) { // the buttons should have a bit bigger font - Font aFont(pButton->GetSettings().GetStyleSettings().GetPushButtonFont()); + vcl::Font aFont(pButton->GetSettings().GetStyleSettings().GetPushButtonFont()); aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier)); pButton->SetControlFont(aFont); @@ -331,7 +331,7 @@ void BackingWindow::setupButton( PushButton* pButton ) void BackingWindow::setupButton( MenuButton* pButton ) { - Font aFont(pButton->GetSettings().GetStyleSettings().GetPushButtonFont()); + vcl::Font aFont(pButton->GetSettings().GetStyleSettings().GetPushButtonFont()); aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier)); pButton->SetControlFont(aFont); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 7c2706ae248e..bf134ec4e543 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -793,7 +793,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Win aFmtLb.SetHelpId( HID_TEMPLATE_FMT ); aFilterLb.SetHelpId( HID_TEMPLATE_FILTER ); aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT | WB_HIDESELECTION ); - Font aFont = aFmtLb.GetFont(); + vcl::Font aFont = aFmtLb.GetFont(); aFont.SetWeight( WEIGHT_NORMAL ); aFmtLb.SetFont( aFont ); @@ -2392,7 +2392,7 @@ void SfxTemplateDialog_Impl::Initialize (void) m_aActionTbR.SetDropdownClickHdl(LINK(this, SfxTemplateDialog_Impl, ToolBoxRClick)); m_aActionTbL.Show(); m_aActionTbR.Show(); - Font aFont=aFilterLb.GetFont(); + vcl::Font aFont = aFilterLb.GetFont(); aFont.SetWeight( WEIGHT_NORMAL ); aFilterLb.SetFont( aFont ); m_aActionTbL.SetHelpId( HID_TEMPLDLG_TOOLBOX_LEFT ); diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index 8fd8ea8429b4..71eee2c27545 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -168,7 +168,7 @@ namespace sfx2 SetLineColor(); // bold font - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetWeight( WEIGHT_BOLD ); SetFont( aFont ); @@ -317,7 +317,7 @@ namespace sfx2 const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); // Font. - Font aFont = rStyleSettings.GetAppFont(); + vcl::Font aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx index f6c2e0ffe71a..3295859d3066 100644 --- a/sfx2/source/sidebar/TitleBar.cxx +++ b/sfx2/source/sidebar/TitleBar.cxx @@ -173,7 +173,7 @@ void TitleBar::PaintTitle (const Rectangle& rTitleBox) aTitleBox.Left() += gnLeftIconSpace + maIcon.GetSizePixel().Width() + gnRightIconSpace; } - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); aFont.SetWeight(WEIGHT_BOLD); SetFont(aFont); @@ -194,7 +194,7 @@ void TitleBar::PaintFocus (const Rectangle& rFocusBox) { Push(PUSH_FONT | PUSH_TEXTCOLOR); - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); aFont.SetWeight(WEIGHT_BOLD); SetFont(aFont); diff --git a/slideshow/source/engine/rehearsetimingsactivity.hxx b/slideshow/source/engine/rehearsetimingsactivity.hxx index 63762cb985f8..f35b735e04dd 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.hxx +++ b/slideshow/source/engine/rehearsetimingsactivity.hxx @@ -30,7 +30,7 @@ #include <vector> #include <utility> -class Font; +namespace vcl { class Font; } namespace canvas{ namespace tools{ class ElapsedTime; }} namespace cppcanvas{ class CustomSprite; } namespace basegfx @@ -124,7 +124,7 @@ private: /// screen rect of sprite (in view coordinates!) ::basegfx::B2DRange maSpriteRectangle; - Font maFont; + vcl::Font maFont; boost::shared_ptr<WakeupEvent> mpWakeUpEvent; boost::shared_ptr<MouseHandler> mpMouseHandler; ::basegfx::B2IVector maSpriteSizePixel; diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 25b003d44815..3f4b317a8b9f 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -45,7 +45,7 @@ class SubsetMap; /**************************************************************************/ -void SetFontStyle(const OUString &rStyleName, Font &rFont); +void SetFontStyle(const OUString &rStyleName, vcl::Font &rFont); /**************************************************************************/ @@ -84,7 +84,7 @@ public: { } virtual Size GetOptimalSize() const SAL_OVERRIDE; - void SetFont(const Font& rFont); + void SetFont(const vcl::Font& rFont); }; class SmFontDialog : public ModalDialog @@ -95,7 +95,7 @@ class SmFontDialog : public ModalDialog CheckBox* m_pItalicCheckBox; SmShowFont* m_pShowFont; - Font Face; + vcl::Font Face; DECL_LINK(FontSelectHdl, ComboBox *); DECL_LINK(FontModifyHdl, ComboBox *); @@ -108,8 +108,8 @@ class SmFontDialog : public ModalDialog public: SmFontDialog(Window * pParent, OutputDevice *pFntListDevice, bool bHideCheckboxes); - const Font& GetFont() const { return Face; } - void SetFont(const Font &rFont); + const vcl::Font& GetFont() const { return Face; } + void SetFont(const vcl::Font &rFont); }; /**************************************************************************/ @@ -313,7 +313,7 @@ class SmShowSymbol : public Control virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; - void setFontSize(Font &rFont) const; + void setFontSize(vcl::Font &rFont) const; public: SmShowSymbol(Window *pParent, WinBits nStyle) @@ -382,7 +382,7 @@ public: } void SetSymbol( const SmSym *pSym ); - void SetSymbol( sal_UCS4 cChar, const Font &rFont ); + void SetSymbol( sal_UCS4 cChar, const vcl::Font &rFont ); }; diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx index eb17b368dbfd..1c469a3c1aea 100644 --- a/starmath/inc/symbol.hxx +++ b/starmath/inc/symbol.hxx @@ -77,17 +77,17 @@ private: public: SmSym(); - SmSym(const OUString& rName, const Font& rFont, sal_UCS4 cChar, + SmSym(const OUString& rName, const vcl::Font& rFont, sal_UCS4 cChar, const OUString& rSet, bool bIsPredefined = false); SmSym(const SmSym& rSymbol); SmSym& operator = (const SmSym& rSymbol); - const Font& GetFace() const { return m_aFace; } + const vcl::Font& GetFace() const { return m_aFace; } sal_UCS4 GetCharacter() const { return m_cChar; } const OUString& GetName() const { return m_aName; } - void SetFace( const Font& rFont ) { m_aFace = rFont; } + void SetFace( const vcl::Font& rFont ) { m_aFace = rFont; } void SetCharacter( sal_UCS4 cChar ) { m_cChar = cChar; } bool IsPredefined() const { return m_bPredefined; } diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index 5323576f2055..f4a48e5d8d55 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -75,10 +75,10 @@ SmViewShell * SmGetActiveView(); // SmFace -bool IsItalic( const Font &rFont ); -bool IsBold( const Font &rFont ); +bool IsItalic( const vcl::Font &rFont ); +bool IsBold( const vcl::Font &rFont ); -class SmFace : public Font +class SmFace : public vcl::Font { long nBorderWidth; @@ -123,24 +123,24 @@ class SmFontPickList { protected: sal_uInt16 nMaxItems; - std::deque<Font> aFontVec; + std::deque<vcl::Font> aFontVec; - bool CompareItem(const Font & rFirstFont, const Font & rSecondFont) const; - OUString GetStringItem(const Font &rItem); + bool CompareItem(const vcl::Font & rFirstFont, const vcl::Font & rSecondFont) const; + OUString GetStringItem(const vcl::Font &rItem); public: SmFontPickList(sal_uInt16 nMax = 5) : nMaxItems(nMax) {} virtual ~SmFontPickList() { Clear(); } - virtual void Insert(const Font &rFont); - virtual void Update(const Font &rFont, const Font &rNewFont); - virtual void Remove(const Font &rFont); + virtual void Insert(const vcl::Font &rFont); + virtual void Update(const vcl::Font &rFont, const vcl::Font &rNewFont); + virtual void Remove(const vcl::Font &rFont); - void Clear(); - Font Get(sal_uInt16 nPos = 0) const; + void Clear(); + vcl::Font Get(sal_uInt16 nPos = 0) const; - SmFontPickList& operator = (const SmFontPickList& rList); - Font operator [] (sal_uInt16 nPos) const; + SmFontPickList& operator = (const SmFontPickList& rList); + vcl::Font operator [] (sal_uInt16 nPos) const; void ReadFrom(const SmFontDialog& rDialog); void WriteTo(SmFontDialog& rDialog) const; @@ -161,10 +161,10 @@ public: SmFontPickListBox& operator = (const SmFontPickList& rList); - virtual void Insert(const Font &rFont) SAL_OVERRIDE; + virtual void Insert(const vcl::Font &rFont) SAL_OVERRIDE; using Window::Update; - virtual void Update(const Font &rFont, const Font &rNewFont) SAL_OVERRIDE; - virtual void Remove(const Font &rFont) SAL_OVERRIDE; + virtual void Update(const vcl::Font &rFont, const vcl::Font &rNewFont) SAL_OVERRIDE; + virtual void Remove(const vcl::Font &rFont) SAL_OVERRIDE; }; #endif diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 028daa6f9e49..a94e40cb52ef 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -223,7 +223,7 @@ SmFontFormat::SmFontFormat() } -SmFontFormat::SmFontFormat( const Font &rFont ) +SmFontFormat::SmFontFormat( const vcl::Font &rFont ) { aName = rFont.GetName(); nCharSet = (sal_Int16) rFont.GetCharSet(); @@ -234,9 +234,9 @@ SmFontFormat::SmFontFormat( const Font &rFont ) } -const Font SmFontFormat::GetFont() const +const vcl::Font SmFontFormat::GetFont() const { - Font aRes; + vcl::Font aRes; aRes.SetName( aName ); aRes.SetCharSet( (rtl_TextEncoding) nCharSet ); aRes.SetFamily( (FontFamily) nFamily ); @@ -464,7 +464,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol, if (nProps && aValues.getLength() == nProps) { const Any * pValue = aValues.getConstArray(); - Font aFont; + vcl::Font aFont; sal_UCS4 cChar = '\0'; OUString aSet; bool bPredefined = false; @@ -1005,7 +1005,7 @@ void SmMathConfig::LoadFormat() LanguageType nLang = Application::GetSettings().GetUILanguageTag().getLanguageType(); for (i = FNT_BEGIN; i < FNT_END; ++i) { - Font aFnt; + vcl::Font aFnt; bool bUseDefaultFont = true; if (pVal->hasValue() && (*pVal >>= aTmpStr)) { diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx index 7b40f8b619a4..1e4d90e87249 100644 --- a/starmath/source/cfgitem.hxx +++ b/starmath/source/cfgitem.hxx @@ -40,7 +40,7 @@ class SmSym; class SmFormat; -class Font; +namespace vcl { class Font; } struct SmCfgOther; struct SmFontFormat @@ -53,9 +53,9 @@ struct SmFontFormat sal_Int16 nItalic; SmFontFormat(); - SmFontFormat( const Font &rFont ); + SmFontFormat( const vcl::Font &rFont ); - const Font GetFont() const; + const vcl::Font GetFont() const; bool operator == ( const SmFontFormat &rFntFmt ) const; }; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 83850e64ecc3..218248562c31 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -64,7 +64,7 @@ public: SmFontStyles(); sal_uInt16 GetCount() const { return 4; } - const OUString& GetStyleName( const Font &rFont ) const; + const OUString& GetStyleName( const vcl::Font &rFont ) const; const OUString& GetStyleName( sal_uInt16 nIdx ) const; }; @@ -81,7 +81,7 @@ SmFontStyles::SmFontStyles() : } -const OUString& SmFontStyles::GetStyleName( const Font &rFont ) const +const OUString& SmFontStyles::GetStyleName( const vcl::Font &rFont ) const { //! compare also SmSpecialNode::Prepare bool bBold = IsBold( rFont ), @@ -124,7 +124,7 @@ const SmFontStyles & GetFontStyles() -void SetFontStyle(const OUString &rStyleName, Font &rFont) +void SetFontStyle(const OUString &rStyleName, vcl::Font &rFont) { // Find index related to StyleName. For an empty StyleName it's assumed to be // 0 (neither bold nor italic). @@ -255,10 +255,10 @@ Size SmShowFont::GetOptimalSize() const return LogicToPixel(Size(111 , 31), MapMode(MAP_APPFONT)); } -void SmShowFont::SetFont(const Font& rFont) +void SmShowFont::SetFont(const vcl::Font& rFont) { Color aTxtColor( GetTextColor() ); - Font aFont (rFont); + vcl::Font aFont (rFont); Invalidate(); aFont.SetSize(Size(0, 24)); @@ -307,7 +307,7 @@ IMPL_LINK( SmFontDialog, AttrChangeHdl, CheckBox *, EMPTYARG /*pCheckBox*/ ) } -void SmFontDialog::SetFont(const Font &rFont) +void SmFontDialog::SetFont(const vcl::Font &rFont) { Face = rFont; @@ -1073,8 +1073,8 @@ void SmShowSymbolSetWindow::Paint(const Rectangle&) Color aTxtColor( GetTextColor() ); for (sal_uInt16 i = v; i < nSymbols ; i++) { - SmSym aSymbol (*aSymbolSet[i]); - Font aFont (aSymbol.GetFace()); + SmSym aSymbol (*aSymbolSet[i]); + vcl::Font aFont (aSymbol.GetFace()); aFont.SetAlign(ALIGN_TOP); // taking a FontSize which is a bit smaller (compared to nLen) in order to have a buffer @@ -1298,7 +1298,7 @@ void SmShowSymbol::Resize() Invalidate(); } -void SmShowSymbol::setFontSize(Font &rFont) const +void SmShowSymbol::setFontSize(vcl::Font &rFont) const { rFont.SetSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3)); } @@ -1307,7 +1307,7 @@ void SmShowSymbol::Paint(const Rectangle &rRect) { Control::Paint( rRect ); - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); setFontSize(aFont); SetFont(aFont); @@ -1332,7 +1332,7 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol) { if (pSymbol) { - Font aFont (pSymbol->GetFace()); + vcl::Font aFont (pSymbol->GetFace()); setFontSize(aFont); aFont.SetAlign(ALIGN_BASELINE); SetFont(aFont); @@ -1600,9 +1600,9 @@ void SmShowChar::SetSymbol( const SmSym *pSym ) } -void SmShowChar::SetSymbol( sal_UCS4 cChar, const Font &rFont ) +void SmShowChar::SetSymbol( sal_UCS4 cChar, const vcl::Font &rFont ) { - Font aFont( rFont ); + vcl::Font aFont( rFont ); aFont.SetSize( Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3) ); aFont.SetAlign(ALIGN_BASELINE); SetFont(aFont); @@ -2220,7 +2220,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox, if (pSymbol) { // choose font and style accordingly - const Font &rFont = pSymbol->GetFace(); + const vcl::Font &rFont = pSymbol->GetFace(); SelectFont(rFont.GetName(), false); SelectStyle(GetFontStyles().GetStyleName(rFont), false); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index b110cc33acbe..f16a821f4fe6 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -335,7 +335,7 @@ void SetEditEngineDefaultFonts(SfxItemPool &rEditEngineItemPool) const FontDta &rFntDta = aTable[i]; LanguageType nLang = (LANGUAGE_NONE == rFntDta.nLang) ? rFntDta.nFallbackLang : rFntDta.nLang; - Font aFont = OutputDevice::GetDefaultFont( + vcl::Font aFont = OutputDevice::GetDefaultFont( rFntDta.nFontType, nLang, DEFAULTFONT_FLAGS_ONLYONE ); rEditEngineItemPool.SetPoolDefaultItem( SvxFontItem( aFont.GetFamily(), aFont.GetName(), diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 6b31b6dc7cd9..8eef2bcb15e0 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -619,7 +619,7 @@ bool SmGetGlyphBoundRect(const OutputDevice &rDev, const FontMetric aDevFM (rDev.GetFontMetric()); pGlyphDev->Push(PUSH_FONT | PUSH_MAPMODE); - Font aFnt(rDev.GetFont()); + vcl::Font aFnt(rDev.GetFont()); aFnt.SetAlign(ALIGN_TOP); // use scale factor when calling GetTextBoundRect to counter diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 098deb88d238..c2d5e54c9e7e 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -65,7 +65,7 @@ SmSym::SmSym(const SmSym& rSymbol) } -SmSym::SmSym(const OUString& rName, const Font& rFont, sal_UCS4 cChar, +SmSym::SmSym(const OUString& rName, const vcl::Font& rFont, sal_UCS4 cChar, const OUString& rSet, bool bIsPredefined) { m_aName = m_aExportName = rName; @@ -269,7 +269,7 @@ void SmSymbolManager::Load() { // make the new symbol a copy but with ITALIC_NORMAL, and add it to iGreek const SmSym &rSym = *aGreekSymbols[i]; - Font aFont( rSym.GetFace() ); + vcl::Font aFont( rSym.GetFace() ); OSL_ENSURE( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." ); aFont.SetItalic( ITALIC_NORMAL ); OUString aSymbolName('i'); diff --git a/starmath/source/tmpdevice.cxx b/starmath/source/tmpdevice.cxx index ae4be576eb0d..c867e33475ea 100644 --- a/starmath/source/tmpdevice.cxx +++ b/starmath/source/tmpdevice.cxx @@ -69,7 +69,7 @@ Color SmTmpDevice::Impl_GetColor( const Color& rColor ) } -void SmTmpDevice::SetFont(const Font &rNewFont) +void SmTmpDevice::SetFont(const vcl::Font &rNewFont) { rOutDev.SetFont( rNewFont ); rOutDev.SetTextColor( Impl_GetColor( rNewFont.GetColor() ) ); diff --git a/starmath/source/tmpdevice.hxx b/starmath/source/tmpdevice.hxx index f80a32bd170d..12c1d55bed98 100644 --- a/starmath/source/tmpdevice.hxx +++ b/starmath/source/tmpdevice.hxx @@ -35,7 +35,7 @@ public: SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm); ~SmTmpDevice() { rOutDev.Pop(); } - void SetFont(const Font &rNewFont); + void SetFont(const vcl::Font &rNewFont); void SetLineColor( const Color& rColor ) { rOutDev.SetLineColor( Impl_GetColor(rColor) ); } void SetFillColor( const Color& rColor ) { rOutDev.SetFillColor( Impl_GetColor(rColor) ); } diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 330ce3c29577..7f479fc2bebe 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -493,7 +493,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* if((*pValues).getValueType() != ::getBooleanCppuType()) throw IllegalArgumentException(); bool bVal = *(sal_Bool*)(*pValues).getValue(); - Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); + vcl::Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); aNewFont.SetItalic((bVal) ? ITALIC_NORMAL : ITALIC_NONE); aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont); } @@ -509,7 +509,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* if((*pValues).getValueType() != ::getBooleanCppuType()) throw IllegalArgumentException(); bool bVal = *(sal_Bool*)(*pValues).getValue(); - Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); + vcl::Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); aNewFont.SetWeight((bVal) ? WEIGHT_BOLD : WEIGHT_NORMAL); aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont); } @@ -676,7 +676,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* SymbolDescriptor *pDescriptor = aSequence.getArray(); for (sal_uInt32 i = 0; i < nSize ; i++, pDescriptor++) { - Font aFont; + vcl::Font aFont; aFont.SetName ( pDescriptor->sFontName ); aFont.SetCharSet ( static_cast < rtl_TextEncoding > (pDescriptor->nCharSet) ); aFont.SetFamily ( static_cast < FontFamily > (pDescriptor->nFamily ) ); @@ -894,7 +894,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu pDescriptor->sSymbolSet = (*aIter)->GetSymbolSetName(); pDescriptor->nCharacter = static_cast < sal_Int32 > ((*aIter)->GetCharacter()); - Font rFont = (*aIter)->GetFace(); + vcl::Font rFont = (*aIter)->GetFace(); pDescriptor->sFontName = rFont.GetName(); pDescriptor->nCharSet = sal::static_int_cast< sal_Int16 >(rFont.GetCharSet()); pDescriptor->nFamily = sal::static_int_cast< sal_Int16 >(rFont.GetFamily()); diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index d83156950eb7..5c15ffa89b9b 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -65,17 +65,17 @@ SmFontPickList& SmFontPickList::operator = (const SmFontPickList& rList) return *this; } -Font SmFontPickList::operator [] (sal_uInt16 nPos) const +vcl::Font SmFontPickList::operator [] (sal_uInt16 nPos) const { return aFontVec[nPos]; } -Font SmFontPickList::Get(sal_uInt16 nPos) const +vcl::Font SmFontPickList::Get(sal_uInt16 nPos) const { - return nPos < aFontVec.size() ? aFontVec[nPos] : Font(); + return nPos < aFontVec.size() ? aFontVec[nPos] : vcl::Font(); } -bool SmFontPickList::CompareItem(const Font & rFirstFont, const Font & rSecondFont) const +bool SmFontPickList::CompareItem(const vcl::Font & rFirstFont, const vcl::Font & rSecondFont) const { return rFirstFont.GetName() == rSecondFont.GetName() && rFirstFont.GetFamily() == rSecondFont.GetFamily() && @@ -84,7 +84,7 @@ bool SmFontPickList::CompareItem(const Font & rFirstFont, const Font & rSecondFo rFirstFont.GetItalic() == rSecondFont.GetItalic(); } -OUString SmFontPickList::GetStringItem(const Font &rFont) +OUString SmFontPickList::GetStringItem(const vcl::Font &rFont) { OUStringBuffer aString(rFont.GetName()); @@ -102,7 +102,7 @@ OUString SmFontPickList::GetStringItem(const Font &rFont) return aString.makeStringAndClear(); } -void SmFontPickList::Insert(const Font &rFont) +void SmFontPickList::Insert(const vcl::Font &rFont) { Remove(rFont); aFontVec.push_front( rFont ); @@ -113,7 +113,7 @@ void SmFontPickList::Insert(const Font &rFont) } } -void SmFontPickList::Update(const Font &rFont, const Font &rNewFont) +void SmFontPickList::Update(const vcl::Font &rFont, const vcl::Font &rNewFont) { for (sal_uInt16 nPos = 0; nPos < aFontVec.size(); nPos++) if (CompareItem( aFontVec[nPos], rFont )) @@ -123,7 +123,7 @@ void SmFontPickList::Update(const Font &rFont, const Font &rNewFont) } } -void SmFontPickList::Remove(const Font &rFont) +void SmFontPickList::Remove(const vcl::Font &rFont) { for (sal_uInt16 nPos = 0; nPos < aFontVec.size(); nPos++) if (CompareItem( aFontVec[nPos], rFont)) @@ -194,7 +194,7 @@ SmFontPickListBox& SmFontPickListBox::operator=(const SmFontPickList& rList) return *this; } -void SmFontPickListBox::Insert(const Font &rFont) +void SmFontPickListBox::Insert(const vcl::Font &rFont) { SmFontPickList::Insert(rFont); @@ -209,7 +209,7 @@ void SmFontPickListBox::Insert(const Font &rFont) } -void SmFontPickListBox::Update(const Font &rFont, const Font &rNewFont) +void SmFontPickListBox::Update(const vcl::Font &rFont, const vcl::Font &rNewFont) { SmFontPickList::Update(rFont, rNewFont); @@ -217,7 +217,7 @@ void SmFontPickListBox::Update(const Font &rFont, const Font &rNewFont) } -void SmFontPickListBox::Remove(const Font &rFont) +void SmFontPickListBox::Remove(const vcl::Font &rFont) { SmFontPickList::Remove(rFont); @@ -226,7 +226,7 @@ void SmFontPickListBox::Remove(const Font &rFont) -bool IsItalic( const Font &rFont ) +bool IsItalic( const vcl::Font &rFont ) { FontItalic eItalic = rFont.GetItalic(); // the code below leaves only _NONE and _DONTKNOW as not italic @@ -234,7 +234,7 @@ bool IsItalic( const Font &rFont ) } -bool IsBold( const Font &rFont ) +bool IsBold( const vcl::Font &rFont ) { FontWeight eWeight = rFont.GetWeight(); return eWeight != WEIGHT_DONTKNOW && eWeight > WEIGHT_NORMAL; diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 53a3e4fc6586..f59f9bc24f44 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1191,7 +1191,7 @@ void SmViewShell::Impl_Print( { Size aSize600 (0, 600); Size aSize650 (0, 650); - Font aFont(FAMILY_DONTKNOW, aSize600); + vcl::Font aFont(FAMILY_DONTKNOW, aSize600); aFont.SetAlign(ALIGN_TOP); aFont.SetWeight(WEIGHT_BOLD); @@ -1236,7 +1236,7 @@ void SmViewShell::Impl_Print( // output text on bottom if (bIsPrintFormulaText) { - Font aFont(FAMILY_DONTKNOW, Size(0, 600)); + vcl::Font aFont(FAMILY_DONTKNOW, Size(0, 600)); aFont.SetAlign(ALIGN_TOP); aFont.SetColor( Color(COL_BLACK) ); diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index bde475f1f792..e2427b012e91 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -211,7 +211,7 @@ void BrowseBox::SetRealRowCount( const OUString &rRealRowCount ) -void BrowseBox::SetFont( const Font& rNewFont ) +void BrowseBox::SetFont( const vcl::Font& rNewFont ) { pDataWin->SetFont( rNewFont ); ImpGetDataRowHeight(); diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index d10fe3aeab56..7f0b0a85d0f8 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -723,7 +723,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, // we want to have two pixels frame ... return; - Font aFont = GetDataWindow().GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDataWindow().GetDrawPixelFont( pDev ); // the 'normal' painting uses always the data window as device to output to, so we have to calc the new font // relative to the data wins current settings diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 7873b5e8b59b..396b40ce4d48 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -63,7 +63,7 @@ void ButtonFrame::Draw( OutputDevice& rDev ) { OUString aVal = rDev.GetEllipsisString(aText,aInnerRect.GetWidth() - 2*MIN_COLUMNWIDTH); - Font aFont( rDev.GetFont() ); + vcl::Font aFont( rDev.GetFont() ); bool bOldTransp = aFont.IsTransparent(); if ( !bOldTransp ) { @@ -250,7 +250,7 @@ void InitSettings_Impl( Window *pWin, if ( bFont ) { - Font aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); if ( pWin->IsControlFont() ) aFont.Merge( pWin->GetControlFont() ); pWin->SetZoomedPointFont( aFont ); diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index e14cf4ccf904..59e33c69f9b8 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -818,7 +818,7 @@ namespace svt if (bFont) { - Font aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); if (IsControlFont()) { GetDataWindow().SetControlFont(GetControlFont()); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index adc522973a67..44eadff34deb 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -1756,7 +1756,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P bool bDropTarget = pEntry->IsDropTarget(); bool bNoEmphasis = pEntry->IsBlockingEmphasis(); - Font aTempFont( pOut->GetFont() ); + vcl::Font aTempFont( pOut->GetFont() ); // AutoFontColor /* @@ -1782,7 +1782,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P if ( bShowSelection ) { const StyleSettings& rSettings = pOut->GetSettings().GetStyleSettings(); - Font aNewFont( aTempFont ); + vcl::Font aNewFont( aTempFont ); // font fill colors that are attributed "hard" need corresponding "hard" // attributed highlight colors @@ -3290,7 +3290,7 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo bAlreadyInCallback( false ), bGrabFocus( false ) { - Font aFont( pParent->GetPointFont() ); + vcl::Font aFont( pParent->GetPointFont() ); aFont.SetTransparent( false ); SetControlFont( aFont ); if( !pParent->HasFontFillColor() ) @@ -3424,8 +3424,8 @@ void SvxIconChoiceCtrl_Impl::InitSettings() if( !pView->HasFont() ) { // unit (from settings) is Point - Font aFont( rStyleSettings.GetFieldFont() ); - //const Font& rFont = pView->GetFont(); + vcl::Font aFont( rStyleSettings.GetFieldFont() ); + //const vcl::Font& rFont = pView->GetFont(); //if( pView->HasFontTextColor() ) aFont.SetColor( rStyleSettings.GetWindowTextColor() ); //if( pView->HasFontFillColor() ) diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 7fd923f556b1..0689d688b0f8 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -240,7 +240,7 @@ void SvtIconChoiceCtrl::LoseFocus() Control::LoseFocus(); } -void SvtIconChoiceCtrl::SetFont( const Font& rFont ) +void SvtIconChoiceCtrl::SetFont( const vcl::Font& rFont ) { if( rFont != GetFont() ) { @@ -249,7 +249,7 @@ void SvtIconChoiceCtrl::SetFont( const Font& rFont ) } } -void SvtIconChoiceCtrl::SetPointFont( const Font& rFont ) +void SvtIconChoiceCtrl::SetPointFont( const vcl::Font& rFont ) { if( rFont != GetPointFont() ) { @@ -419,7 +419,7 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper ) // If text colors are attributed "hard," don't use automatism to select // a readable text color. - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetColor( rStyleSettings.GetFieldTextColor() ); SetFont( aFont ); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 29956ca9d09b..2e19444c95bd 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -135,7 +135,7 @@ SvInplaceEdit2::SvInplaceEdit2 else pEdit = new MyEdit_Impl( pParent, this ); - Font aFont( pParent->GetFont() ); + vcl::Font aFont( pParent->GetFont() ); aFont.SetTransparent( false ); Color aColor( pParent->GetBackground().GetColor() ); aFont.SetFillColor(aColor ); @@ -2288,7 +2288,7 @@ short SvTreeListBox::GetHeightOffset(const Image& rBmp, Size& aSizeLogic ) return nOffset; } -short SvTreeListBox::GetHeightOffset(const Font& /* rFont */, Size& aSizeLogic ) +short SvTreeListBox::GetHeightOffset(const vcl::Font& /* rFont */, Size& aSizeLogic ) { short nOffset = 0; aSizeLogic = Size(GetTextWidth(OUString('X')), GetTextHeight()); @@ -2347,7 +2347,7 @@ void SvTreeListBox::AdjustEntryHeight( const Image& rBmp ) } } -void SvTreeListBox::AdjustEntryHeight( const Font& rFont ) +void SvTreeListBox::AdjustEntryHeight( const vcl::Font& rFont ) { Size aSize; GetHeightOffset( rFont, aSize ); @@ -2527,11 +2527,10 @@ void SvTreeListBox::SetExpandedNodeBmp( const Image& rBmp ) } -void SvTreeListBox::SetFont( const Font& rFont ) +void SvTreeListBox::SetFont( const vcl::Font& rFont ) { - - Font aTempFont( rFont ); - Font aOrigFont( GetFont() ); + vcl::Font aTempFont( rFont ); + vcl::Font aOrigFont( GetFont() ); aTempFont.SetTransparent( true ); if (aTempFont == aOrigFont) return; @@ -2547,7 +2546,7 @@ void SvTreeListBox::SetFont( const Font& rFont ) AdjustEntryHeightAndRecalc( GetFont() ); } -void SvTreeListBox::AdjustEntryHeightAndRecalc( const Font& rFont ) +void SvTreeListBox::AdjustEntryHeightAndRecalc( const vcl::Font& rFont ) { AdjustEntryHeight( rFont ); // always invalidate, else things go wrong in SetEntryHeight @@ -2898,7 +2897,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT long nMaxRight = nWidth + aEntryPos.X() - 1; Color aBackupTextColor( GetTextColor() ); - Font aBackupFont( GetFont() ); + vcl::Font aBackupFont( GetFont() ); Color aBackupColor = GetFillColor(); bool bCurFontIsSel = false; @@ -2909,7 +2908,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT const bool bHideSelection = (nWindowStyle & WB_HIDESELECTION) !=0 && !HasFocus(); const StyleSettings& rSettings = GetSettings().GetStyleSettings(); - Font aHighlightFont( GetFont() ); + vcl::Font aHighlightFont( GetFont() ); const Color aHighlightTextColor( rSettings.GetHighlightTextColor() ); aHighlightFont.SetColor( aHighlightTextColor ); @@ -3759,7 +3758,7 @@ void SvTreeListBox::InitSettings(bool bFont, bool bForeground, bool bBackground) const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index b380baf87e48..920a3ccfa85a 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -305,7 +305,7 @@ DayOfWeek Calendar::ImplGetWeekStart() const -void Calendar::ImplGetWeekFont( Font& rFont ) const +void Calendar::ImplGetWeekFont( vcl::Font& rFont ) const { // weeknumber is displayed in WEEKNUMBER_HEIGHT%-Fontheight Size aFontSize = rFont.GetSize(); @@ -331,12 +331,12 @@ void Calendar::ImplFormat() OUString a99Text("99"); - Font aOldFont = GetFont(); + vcl::Font aOldFont = GetFont(); // Wochenanzeige beruecksichtigen if ( mnWinStyle & WB_WEEKNUMBER ) { - Font aTempFont = aOldFont; + vcl::Font aTempFont = aOldFont; ImplGetWeekFont( aTempFont ); SetFont( aTempFont ); mnWeekWidth = GetTextWidth( a99Text )+WEEKNUMBER_OFFX; @@ -347,7 +347,7 @@ void Calendar::ImplFormat() if ( mnWinStyle & WB_BOLDTEXT ) { - Font aFont = aOldFont; + vcl::Font aFont = aOldFont; if ( aFont.GetWeight() < WEIGHT_BOLD ) aFont.SetWeight( WEIGHT_BOLD ); else @@ -941,8 +941,8 @@ void Calendar::ImplDraw( bool bPaint ) else Erase( Rectangle( nDayX-mnWeekWidth-WEEKNUMBER_OFFX, nDeltaY, nDayX-WEEKNUMBER_OFFX-1, nDeltaY+nMonthHeight ) ); - Font aOldFont = GetFont(); - Font aTempFont = aOldFont; + vcl::Font aOldFont = GetFont(); + vcl::Font aTempFont = aOldFont; ImplGetWeekFont( aTempFont ); SetFont( aTempFont ); nDayX -= mnWeekWidth; @@ -2126,14 +2126,14 @@ void Calendar::EndSelection() Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, long nCalcLines ) const { - OUString a99Text("99"); - Font aOldFont = GetFont(); + OUString a99Text("99"); + vcl::Font aOldFont = GetFont(); // take display of week into account long nWeekWidth; if ( mnWinStyle & WB_WEEKNUMBER ) { - Font aTempFont = aOldFont; + vcl::Font aTempFont = aOldFont; ImplGetWeekFont( aTempFont ); ((Calendar*)this)->SetFont( aTempFont ); nWeekWidth = GetTextWidth( a99Text )+WEEKNUMBER_OFFX; @@ -2144,7 +2144,7 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, if ( mnWinStyle & WB_BOLDTEXT ) { - Font aFont = aOldFont; + vcl::Font aFont = aOldFont; if ( aFont.GetWeight() < WEIGHT_BOLD ) aFont.SetWeight( WEIGHT_BOLD ); else diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 097e73a4b2a4..f3359c82d56d 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1105,7 +1105,7 @@ void FontNameBox::ImplCalcUserItemSize() namespace { - long shrinkFontToFit(OUString &rSampleText, long nH, Font &rFont, OutputDevice &rDevice, Rectangle &rTextRect) + long shrinkFontToFit(OUString &rSampleText, long nH, vcl::Font &rFont, OutputDevice &rDevice, Rectangle &rTextRect) { long nWidth = 0; @@ -1147,10 +1147,10 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) const bool bSymbolFont = isSymbolFont(rInfo); Color aTextColor = rUDEvt.GetDevice()->GetTextColor(); - Font aOldFont( rUDEvt.GetDevice()->GetFont() ); + vcl::Font aOldFont( rUDEvt.GetDevice()->GetFont() ); Size aSize( aOldFont.GetSize() ); aSize.Height() += EXTRAFONTSIZE; - Font aFont( rInfo ); + vcl::Font aFont( rInfo ); aFont.SetSize( aSize ); rUDEvt.GetDevice()->SetFont( aFont ); rUDEvt.GetDevice()->SetTextColor( aTextColor ); diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 2fd68d6e04bf..c26a13c7ec7f 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -127,7 +127,7 @@ void FileControl::StateChanged( StateChangedType nType ) GetEdit().SetControlFont( GetControlFont() ); // Only use height of the button, as in HTML // always Courier is used - Font aFont = GetButton().GetControlFont(); + vcl::Font aFont = GetButton().GetControlFont(); aFont.SetSize( GetControlFont().GetSize() ); GetButton().SetControlFont( aFont ); } diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 51fac595c035..def0e6ad1997 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -131,7 +131,7 @@ void HeaderBar::ImplInitSettings( bool bFont, if ( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetToolFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); @@ -1033,7 +1033,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); Rectangle aRect( aPos, aSize ); - Font aFont = GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDrawPixelFont( pDev ); pDev->Push(); pDev->SetMapMode(); diff --git a/svtools/source/control/hyperlabel.cxx b/svtools/source/control/hyperlabel.cxx index cd7a10ddf89f..e6aab88342e4 100644 --- a/svtools/source/control/hyperlabel.cxx +++ b/svtools/source/control/hyperlabel.cxx @@ -89,7 +89,7 @@ namespace svt void HyperLabel::MouseMove( const MouseEvent& rMEvt ) { - Font aFont = GetControlFont( ); + vcl::Font aFont = GetControlFont( ); const Color aColor = GetTextColor(); if (rMEvt.IsLeaveWindow()) @@ -111,7 +111,7 @@ namespace svt } } - void HyperLabel::ActivateHyperMode(Font aFont, const Color aColor) + void HyperLabel::ActivateHyperMode(vcl::Font aFont, const Color aColor) { aFont.SetUnderline(UNDERLINE_SINGLE); m_pImpl->m_bHyperMode = true; @@ -121,7 +121,7 @@ namespace svt } - void HyperLabel::DeactivateHyperMode(Font aFont, const Color aColor) + void HyperLabel::DeactivateHyperMode(vcl::Font aFont, const Color aColor) { m_pImpl->m_bHyperMode = false; aFont.SetUnderline(UNDERLINE_NONE); diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 01960b8dfb81..cc90d4344ed4 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -175,7 +175,7 @@ namespace svt { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); Color aTextColor = rStyleSettings.GetFieldTextColor(); - Font aFont = GetFont( ); + vcl::Font aFont = GetFont( ); aFont.SetColor( aTextColor ); aFont.SetWeight( WEIGHT_BOLD ); aFont.SetUnderline( UNDERLINE_SINGLE ); @@ -667,7 +667,7 @@ namespace svt const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); SetBackground( Wallpaper( rStyleSettings.GetFieldColor() ) ); Color aTextColor = rStyleSettings.GetFieldTextColor(); - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); aFont.SetColor( aTextColor ); SetFont( aFont ); RoadmapTypes::ItemId curItemID = GetCurrentRoadmapItemID(); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 9d7e288657f4..0a0170f2cc49 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -477,7 +477,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nTop, long nB } else { - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); if ( mnWinStyle & WB_RIGHT_ALIGNED ) aFont.SetOrientation( 2700 ); else @@ -998,7 +998,7 @@ void Ruler::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) if ( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetToolFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); @@ -1031,7 +1031,7 @@ void Ruler::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) maVirDev.SetSettings( GetSettings() ); maVirDev.SetBackground( GetBackground() ); - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); if ( mnWinStyle & WB_VERT ) aFont.SetOrientation( 900 ); diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index 97a17c45f9dc..4059800025de 100644 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.cxx @@ -38,10 +38,10 @@ class SvtScriptedTextHelper_Impl { private: OutputDevice& mrOutDevice; /// The output device for drawing the text. - Font maLatinFont; /// The font for latin text portions. - Font maAsianFont; /// The font for asian text portions. - Font maCmplxFont; /// The font for complex text portions. - Font maDefltFont; /// The default font of the output device. + vcl::Font maLatinFont; /// The font for latin text portions. + vcl::Font maAsianFont; /// The font for asian text portions. + vcl::Font maCmplxFont; /// The font for complex text portions. + vcl::Font maDefltFont; /// The default font of the output device. OUString maText; /// The text. vector< sal_Int32 > maPosVec; /// The start position of each text portion. @@ -53,7 +53,7 @@ private: SvtScriptedTextHelper_Impl& operator=( const SvtScriptedTextHelper_Impl& ) SAL_DELETED_FUNCTION; /** Gets the font of the given script type. */ - const Font& GetFont( sal_uInt16 _nScript ) const; + const vcl::Font& GetFont( sal_uInt16 _nScript ) const; /** Sets a font on the output device depending on the script type. */ inline void SetOutDevFont( sal_uInt16 _nScript ) { mrOutDevice.SetFont( GetFont( _nScript ) ); } @@ -69,9 +69,9 @@ public: /** This constructor sets an output device and fonts for all script types. */ SvtScriptedTextHelper_Impl( OutputDevice& _rOutDevice, - Font* _pLatinFont, - Font* _pAsianFont, - Font* _pCmplxFont ); + vcl::Font* _pLatinFont, + vcl::Font* _pAsianFont, + vcl::Font* _pCmplxFont ); /** Copy constructor. */ SvtScriptedTextHelper_Impl( const SvtScriptedTextHelper_Impl& _rCopy ); @@ -79,7 +79,7 @@ public: ~SvtScriptedTextHelper_Impl(); /** Sets new fonts and recalculates the text width. */ - void SetFonts( Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ); + void SetFonts( vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ); /** Sets a new text and calculates all script breaks and the text width. */ void SetText( const OUString& _rText, @@ -95,7 +95,7 @@ public: SvtScriptedTextHelper_Impl::SvtScriptedTextHelper_Impl( OutputDevice& _rOutDevice, - Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ) : + vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ) : mrOutDevice( _rOutDevice ), maLatinFont( _pLatinFont ? *_pLatinFont : _rOutDevice.GetFont() ), maAsianFont( _pAsianFont ? *_pAsianFont : _rOutDevice.GetFont() ), @@ -122,7 +122,7 @@ SvtScriptedTextHelper_Impl::~SvtScriptedTextHelper_Impl() { } -const Font& SvtScriptedTextHelper_Impl::GetFont( sal_uInt16 _nScript ) const +const vcl::Font& SvtScriptedTextHelper_Impl::GetFont( sal_uInt16 _nScript ) const { switch( _nScript ) { @@ -255,7 +255,7 @@ void SvtScriptedTextHelper_Impl::CalculateBreaks( const uno::Reference< i18n::XB CalculateSizes(); } -void SvtScriptedTextHelper_Impl::SetFonts( Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ) +void SvtScriptedTextHelper_Impl::SetFonts( vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ) { maLatinFont = _pLatinFont ? *_pLatinFont : maDefltFont; maAsianFont = _pAsianFont ? *_pAsianFont : maDefltFont; @@ -320,7 +320,7 @@ SvtScriptedTextHelper::~SvtScriptedTextHelper() delete mpImpl; } -void SvtScriptedTextHelper::SetFonts( Font* _pLatinFont, Font* _pAsianFont, Font* _pCmplxFont ) +void SvtScriptedTextHelper::SetFonts( vcl::Font* _pLatinFont, vcl::Font* _pAsianFont, vcl::Font* _pCmplxFont ) { mpImpl->SetFonts( _pLatinFont, _pAsianFont, _pCmplxFont ); } diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 771667cef072..81afa0a95f81 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -499,7 +499,7 @@ void TabBar::ImplInitSettings( bool bFont, bool bBackground ) if ( bFont ) { - Font aToolFont; + vcl::Font aToolFont; aToolFont = rStyleSettings.GetToolFont(); if ( IsControlFont() ) aToolFont.Merge( GetControlFont() ); @@ -509,7 +509,7 @@ void TabBar::ImplInitSettings( bool bFont, bool bBackground ) // Adapt font size if window too small? while ( GetTextHeight() > (GetOutputSizePixel().Height()-1) ) { - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); if ( aFont.GetHeight() <= 6 ) break; aFont.SetHeight( aFont.GetHeight()-1 ); @@ -574,7 +574,7 @@ bool TabBar::ImplCalcWidth() return false; // retrieve width of tabs with bold font - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); if ( aFont.GetWeight() != WEIGHT_BOLD ) { aFont.SetWeight( WEIGHT_BOLD ); @@ -1090,8 +1090,8 @@ public: mrParent.SetClipRegion(); } private: - TabBar& mrParent; - Font maFont; + TabBar& mrParent; + vcl::Font maFont; }; class TabDrawer @@ -1288,8 +1288,8 @@ void TabBar::Paint( const Rectangle& rect ) ImplGetColors( aFaceColor, aFaceTextColor, aSelectColor, aSelectTextColor ); // select font - Font aFont = GetFont(); - Font aLightFont = aFont; + vcl::Font aFont = GetFont(); + vcl::Font aLightFont = aFont; aLightFont.SetWeight( WEIGHT_NORMAL ); TabBarPaintGuard aGuard(*this); @@ -2271,7 +2271,7 @@ bool TabBar::StartEditMode( sal_uInt16 nPageId ) } mpEdit->SetText( GetPageText( mnEditId ) ); mpEdit->setPosSizePixel( nX, aRect.Top()+mnOffY+1, nWidth, aRect.GetHeight()-3 ); - Font aFont = GetPointFont(); + vcl::Font aFont = GetPointFont(); Color aForegroundColor; Color aBackgroundColor; Color aFaceColor; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index ebad0fe2f901..3792f2ef1262 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -160,7 +160,7 @@ void ValueSet::ImplInitSettings( bool bFont, bool bForeground, bool bBackground if ( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 1c8e002b80fb..4ef43e98d75b 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -1161,7 +1161,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut, { // taking care of font width default if scaling metafile. MetaFontAction* pA = (MetaFontAction*)pAct; - Font aFont( pA->GetFont() ); + vcl::Font aFont( pA->GetFont() ); if ( !aFont.GetWidth() ) { FontMetric aFontMetric( pOut->GetFontMetric( aFont ) ); diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index b8d588396bc1..228ad1f26fc4 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -638,7 +638,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt { MapMode aMM( MAP_APPFONT ); Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, NULL ); - Font aFnt( OUString("Helvetica"), aAppFontSz ); + vcl::Font aFnt( OUString("Helvetica"), aAppFontSz ); aFnt.SetTransparent( true ); aFnt.SetColor( Color( COL_LIGHTRED ) ); aFnt.SetWeight( WEIGHT_BOLD ); diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 816675a0e433..14811a050a11 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -102,13 +102,13 @@ static UScriptCode lcl_getHardCodedScriptNameForFont (const OutputDevice &rDevic return USCRIPT_INVALID_CODE; } -bool isOpenSymbolFont(const Font &rFont) +bool isOpenSymbolFont(const vcl::Font &rFont) { return rFont.GetName().equalsIgnoreAsciiCase("starsymbol") || rFont.GetName().equalsIgnoreAsciiCase("opensymbol"); } -bool isSymbolFont(const Font &rFont) +bool isSymbolFont(const vcl::Font &rFont) { return (rFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL) || rFont.GetName().equalsIgnoreAsciiCase("Apple Color Emoji") || @@ -140,7 +140,7 @@ bool isSymbolFont(const Font &rFont) bool canRenderNameOfSelectedFont(OutputDevice &rDevice) { - const Font &rFont = rDevice.GetFont(); + const vcl::Font &rFont = rDevice.GetFont(); return !isSymbolFont(rFont) && ( -1 == rDevice.HasGlyphs(rFont, rFont.GetName()) ); } @@ -1227,7 +1227,7 @@ namespace //If we're a CJK font, see if we seem to be tuned for C, J or K if (eScript == USCRIPT_HAN) { - const Font &rFont = rDevice.GetFont(); + const vcl::Font &rFont = rDevice.GetFont(); bool bKore = false, bJpan = false, bHant = false, bHans = false; @@ -1617,7 +1617,7 @@ UScriptCode otCoverageToScript(vcl::UnicodeCoverage::UnicodeCoverageEnum eOTCove return eRet; } -OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const Font &rFont) +OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const vcl::Font &rFont) { OUString sRet(makeRepresentativeTextForLanguage(rFont.GetLanguage())); diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index 581c2576ba70..1af8a6669861 100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -685,7 +685,7 @@ namespace svt { m_rTabBar.Push( PUSH_FONT ); - Font aFont( m_rTabBar.GetFont() ); + vcl::Font aFont( m_rTabBar.GetFont() ); aFont.SetOrientation( 2700 ); aFont.SetVertical( true ); m_rTabBar.SetFont( aFont ); diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx index 4de6648d3e48..a5e5c12232b3 100644 --- a/svtools/source/toolpanel/toolpaneldrawer.cxx +++ b/svtools/source/toolpanel/toolpaneldrawer.cxx @@ -271,7 +271,7 @@ namespace svt const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() ); // Font. - Font aFont = rStyleSettings.GetAppFont(); + vcl::Font aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); @@ -306,7 +306,7 @@ namespace svt Rectangle ToolPanelDrawer::impl_calcTextBoundingBox() const { - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); if ( m_bExpanded ) aFont.SetWeight( m_bExpanded ? WEIGHT_BOLD : WEIGHT_NORMAL ); m_pPaintDevice->SetFont( aFont ); diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index c0b6394ada37..6045211372b7 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -834,7 +834,7 @@ sal_Int32 SAL_CALL SvxShowCharSetVirtualAcc::getForeground( ) throw (RuntimeExc nColor = mpParent->GetControlForeground().GetColor(); else { - Font aFont; + vcl::Font aFont; if ( mpParent->IsControlFont() ) aFont = mpParent->GetControlFont(); else diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 3b8a988cf0d0..bbe054fbe51e 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -154,7 +154,7 @@ void CalculateHorizontalScalingFactor( const SdrObject* pCustomShape, bool bSingleLineMode = false; sal_uInt16 nOutlinesCount2d = rOutline2d.Count(); - Font aFont; + vcl::Font aFont; SvxFontItem& rFontItem = (SvxFontItem&)pCustomShape->GetMergedItem( EE_CHAR_FONTINFO ); aFont.SetHeight( pCustomShape->GetLogicRect().GetHeight() / rFWData.nMaxParagraphsPerTextArea ); aFont.SetAlign( ALIGN_TOP ); @@ -242,7 +242,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F else if ( nScriptType == i18n::ScriptType::ASIAN ) nFntItm = EE_CHAR_FONTINFO_CJK; SvxFontItem& rFontItem = (SvxFontItem&)pCustomShape->GetMergedItem( nFntItm ); - Font aFont; + vcl::Font aFont; aFont.SetHeight( rFWData.nSingleLineHeight ); aFont.SetAlign( ALIGN_TOP ); diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index aca2ea65e989..962234304aa4 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -897,7 +897,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf ) case( META_FONT_ACTION ): { MetaFontAction* pAct = (MetaFontAction*) pAction; - Font aFont( pAct->GetFont() ); + vcl::Font aFont( pAct->GetFont() ); aCol = aFont.GetColor(); TEST_COLS(); diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 81c42a16454c..b62da41ebb8e 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -506,7 +506,7 @@ sal_UCS4 SvxShowCharSet::GetSelectCharacter() const -void SvxShowCharSet::SetFont( const Font& rFont ) +void SvxShowCharSet::SetFont( const vcl::Font& rFont ) { // save last selected unicode if( nSelectedIndex >= 0 ) @@ -516,7 +516,7 @@ void SvxShowCharSet::SetFont( const Font& rFont ) long nSBWidth = aVscrollSB.GetOptimalSize().Width(); aSize.Width() -= nSBWidth; - Font aFont = rFont; + vcl::Font aFont = rFont; aFont.SetWeight( WEIGHT_LIGHT ); aFont.SetAlign( ALIGN_TOP ); int nFontHeight = (aSize.Height() - 5) * 2 / (3 * ROW_COUNT); diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index 5b270e680b51..ddf6bc8799cd 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -48,7 +48,7 @@ DialControlBmp::DialControlBmp( Window& rParent ) : EnableRTL( false ); } -void DialControlBmp::InitBitmap(const Font& rFont) +void DialControlBmp::InitBitmap(const vcl::Font& rFont) { Init(); SetFont(rFont); @@ -82,7 +82,7 @@ void DialControlBmp::DrawElements( const OUString& rText, sal_Int32 nAngle ) if ( !rText.isEmpty() ) { // rotated text - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetColor( GetTextColor() ); aFont.SetOrientation( static_cast< short >( (nAngle + 5) / 10 ) ); // Font uses 1/10 degrees aFont.SetWeight( WEIGHT_BOLD ); @@ -238,7 +238,7 @@ DialControl::DialControl_Impl::DialControl_Impl ( Window& rParent ) : { } -void DialControl::DialControl_Impl::Init( const Size& rWinSize, const Font& rWinFont ) +void DialControl::DialControl_Impl::Init( const Size& rWinSize, const vcl::Font& rWinFont ) { maWinFont = rWinFont; maWinFont.SetTransparent(true); @@ -425,7 +425,7 @@ void DialControl::SetModifyHdl( const Link& rLink ) mpImpl->maModifyHdl = rLink; } -void DialControl::Init( const Size& rWinSize, const Font& rWinFont ) +void DialControl::Init( const Size& rWinSize, const vcl::Font& rWinFont ) { mpImpl->Init( rWinSize, rWinFont ); EnableRTL( false ); // don't mirror mouse handling @@ -436,9 +436,9 @@ void DialControl::Init( const Size& rWinSize, const Font& rWinFont ) void DialControl::Init( const Size& rWinSize ) { //hidpi TODO: GetDefaultFont() picks a font size too small, so fix it here. - Font aDefaultSize = GetFont(); + vcl::Font aDefaultSize = GetFont(); - Font aFont( OutputDevice::GetDefaultFont( + vcl::Font aFont( OutputDevice::GetDefaultFont( DEFAULTFONT_UI_SANS, Application::GetSettings().GetUILanguageTag().getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE ) ); aFont.SetHeight(aDefaultSize.GetHeight()); diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 88e101bb4303..02f346a3ee9e 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -83,19 +83,19 @@ using ::com::sun::star::i18n::BreakIterator; namespace { - void scaleFontWidth(Font& _rFont,const OutputDevice& rOutDev,long& _n100PercentFont) + void scaleFontWidth(vcl::Font& _rFont,const OutputDevice& rOutDev,long& _n100PercentFont) { _rFont.SetWidth( 0 ); _n100PercentFont = rOutDev.GetFontMetric( _rFont ).GetWidth(); } - void initFont(Font& _rFont) + void initFont(vcl::Font& _rFont) { _rFont.SetTransparent(true); _rFont.SetAlign(ALIGN_BASELINE); } - void setFontSize(Font& _rFont) + void setFontSize(vcl::Font& _rFont) { Size aSize( _rFont.GetSize() ); aSize.Height() = ( aSize.Height() * 3 ) / 5; @@ -103,7 +103,7 @@ namespace _rFont.SetSize( aSize ); } - void calcFontHeightAnyAscent(OutputDevice* _pWin,const Font& _rFont,long& _nHeight,long& _nAscent) + void calcFontHeightAnyAscent(OutputDevice* _pWin,const vcl::Font& _rFont,long& _nHeight,long& _nAscent) { if ( !_nHeight ) { @@ -364,7 +364,7 @@ Size FontPrevWin_Impl::CalcTextSize( OutputDevice* pWin, OutputDevice* _pPrinter void FontPrevWin_Impl::DrawPrev( OutputDevice* pWin, Printer* _pPrinter, Point &rPt, const SvxFont &rFont ) { - Font aOldFont = _pPrinter->GetFont(); + vcl::Font aOldFont = _pPrinter->GetFont(); sal_uInt16 nScript; sal_uInt16 nIdx = 0; sal_Int32 nStart = 0; diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx index 0222e9aafdbe..a951fe8fc6eb 100644 --- a/svx/source/dialog/fontlb.cxx +++ b/svx/source/dialog/fontlb.cxx @@ -35,7 +35,7 @@ SvLBoxFontString::SvLBoxFontString() SvLBoxFontString::SvLBoxFontString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rString, - const Font& rFont, const Color* pColor ) : + const vcl::Font& rFont, const Color* pColor ) : SvLBoxString( pEntry, nFlags, rString ), maFont( rFont ), mbUseColor( pColor != NULL ) @@ -58,8 +58,8 @@ SvLBoxItem* SvLBoxFontString::Create() const void SvLBoxFontString::Paint( const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) { - Font aOldFont( rDev.GetFont() ); - Font aNewFont( maFont ); + vcl::Font aOldFont( rDev.GetFont() ); + vcl::Font aNewFont( maFont ); bool bSel = pView->IsSelected(); if( !mbUseColor || bSel ) // selection always gets highlight color { @@ -74,7 +74,7 @@ void SvLBoxFontString::Paint( void SvLBoxFontString::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData ) { - Font aOldFont( pView->GetFont() ); + vcl::Font aOldFont( pView->GetFont() ); pView->Control::SetFont( maFont ); SvLBoxString::InitViewData( pView, pEntry, pViewData); pView->Control::SetFont( aOldFont ); @@ -102,7 +102,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxFontListBox(Window *pPar return new SvxFontListBox(pParent, nWinStyle); } -void SvxFontListBox::InsertFontEntry( const OUString& rString, const Font& rFont, const Color* pColor ) +void SvxFontListBox::InsertFontEntry( const OUString& rString, const vcl::Font& rFont, const Color* pColor ) { mbUseFont = true; // InitEntry() will use maEntryFont maEntryFont = rFont; // font to use in InitEntry() over InsertEntry() diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx index dafd7394bc34..8dea4db44760 100644 --- a/svx/source/dialog/pagectrl.cxx +++ b/svx/source/dialog/pagectrl.cxx @@ -250,7 +250,7 @@ void SvxPageWindow::DrawPage(const Point& rOrg, const bool bSecond, const bool b if(bFrameDirection && !bTable) { Point aPos; - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); const Size aSaveSize = aFont.GetSize(); Size aDrawSize(0,aRect.GetHeight() / 6); aFont.SetSize(aDrawSize); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 0d35871225d0..3dab36e07d46 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -721,7 +721,7 @@ void SvxRubyDialog::UpdateColors( void ) const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); svtools::ColorConfig aColorConfig; - Font aFnt( m_pPreviewWin->GetFont() ); + vcl::Font aFnt( m_pPreviewWin->GetFont() ); Color aNewTextCol( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); Color aNewFillCol( rStyleSettings.GetWindowColor() ); @@ -769,7 +769,7 @@ void RubyPreview::Paint( const Rectangle& /* rRect */ ) { Size aWinSize = GetOutputSize(); - Font aSaveFont = GetFont(); + vcl::Font aSaveFont = GetFont(); aSaveFont.SetHeight(aWinSize.Height() / 4); SetFont(aSaveFont); @@ -784,7 +784,7 @@ void RubyPreview::Paint( const Rectangle& /* rRect */ ) long nTextHeight = GetTextHeight(); long nBaseWidth = GetTextWidth(sBaseText); - Font aRubyFont(aSaveFont); + vcl::Font aRubyFont(aSaveFont); aRubyFont.SetHeight(aRubyFont.GetHeight() * 70 / 100); SetFont(aRubyFont); long nRubyWidth = GetTextWidth(sRubyText); diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index de1300c7931d..9a474e15bd98 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -89,10 +89,10 @@ static const sal_Unicode aBulletTypes[] = 0x2714 }; -static Font& lcl_GetDefaultBulletFont() +static vcl::Font& lcl_GetDefaultBulletFont() { static bool bInit = false; - static Font aDefBulletFont( "StarSymbol", "", Size( 0, 14 ) ); + static vcl::Font aDefBulletFont( "StarSymbol", "", Size( 0, 14 ) ); if(!bInit) { aDefBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); @@ -107,7 +107,7 @@ static Font& lcl_GetDefaultBulletFont() static void lcl_PaintLevel(OutputDevice* pVDev, sal_Int16 nNumberingType, const OUString& rBulletChar, const OUString& rText, const OUString& rFontName, - Point& rLeft, Font& rRuleFont, const Font& rTextFont) + Point& rLeft, vcl::Font& rRuleFont, const vcl::Font& rTextFont) { if(NumberingType::CHAR_SPECIAL == nNumberingType ) @@ -151,15 +151,15 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) long nRectHeight = aRect.GetHeight(); Size aRectSize(nRectWidth, aRect.GetHeight()); Point aBLPos = aRect.TopLeft(); - Font aOldFont = pDev->GetFont(); + vcl::Font aOldFont = pDev->GetFont(); Color aOldColor = pDev->GetLineColor(); pDev->SetLineColor(aTextColor); - Font aFont(OutputDevice::GetDefaultFont( + vcl::Font aFont(OutputDevice::GetDefaultFont( DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); Size aSize = aFont.GetSize(); - Font aRuleFont( lcl_GetDefaultBulletFont() ); + vcl::Font aRuleFont( lcl_GetDefaultBulletFont() ); aSize.Height() = nRectHeight/6; aRuleFont.SetSize(aSize); aRuleFont.SetColor(aTextColor); diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index a4c746116893..6eb6e1b3f190 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -162,7 +162,7 @@ void SvxSwFrameExample::InitAllRects_Impl() if (nAnchor == TextContentAnchorType_AS_CHARACTER || nAnchor == TextContentAnchorType_AT_CHARACTER) { - Font aFont = OutputDevice::GetDefaultFont( + vcl::Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_TEXT, Application::GetSettings().GetLanguageTag().getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE, this ); aFont.SetColor( m_aTxtCol ); 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 diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index ea6fa56e03c9..c3117a96c2a1 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1089,8 +1089,8 @@ void FmFilterString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); - Font aOldFont( pView->GetFont()); - Font aFont( aOldFont ); + vcl::Font aOldFont( pView->GetFont()); + vcl::Font aFont( aOldFont ); aFont.SetWeight(WEIGHT_BOLD); pView->Control::SetFont( aFont ); @@ -1104,8 +1104,8 @@ void FmFilterString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, void FmFilterString::Paint( const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/) { - Font aOldFont( rDev.GetFont()); - Font aFont( aOldFont ); + vcl::Font aOldFont( rDev.GetFont()); + vcl::Font aFont( aOldFont ); aFont.SetWeight(WEIGHT_BOLD); rDev.SetFont( aFont ); diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index 7280b8178a48..dc76c80e8d57 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -176,7 +176,7 @@ namespace svxform } // retrieve a default font for this locale, and set it at the control - Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS, LanguageTag::convertToLanguageType( aDocumentCharLocale ), DEFAULTFONT_FLAGS_ONLYONE ); + vcl::Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS, LanguageTag::convertToLanguageType( aDocumentCharLocale ), DEFAULTFONT_FLAGS_ONLYONE ); FontDescriptor aFontDesc = VCLUnoHelper::CreateFontDescriptor( aFont ); _rxModel->setPropertyValue( OUString( "FontDescriptor" ), diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 0e6577cd081c..c70f39ed5134 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -438,7 +438,7 @@ GalleryBrowser2::GalleryBrowser2( Window* pParent, const ResId& rResId, Gallery* Image aDummyImage; const Link aSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) ); - Font aInfoFont( maInfoBar.GetControlFont() ); + vcl::Font aInfoFont( maInfoBar.GetControlFont() ); maMiscOptions.AddListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) ); @@ -491,7 +491,7 @@ GalleryBrowser2::~GalleryBrowser2() void GalleryBrowser2::InitSettings() { - Font aInfoFont( maInfoBar.GetControlFont() ); + vcl::Font aInfoFont( maInfoBar.GetControlFont() ); aInfoFont.SetWeight( WEIGHT_BOLD ); aInfoFont.SetColor( GALLERY_FG_COLOR ); diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index 66f83a2f151a..eb9ee9300f12 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -109,11 +109,11 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) //const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); //Color aBackColor(0,0,200); //const Color aTextColor = rStyleSettings.GetFieldTextColor(); - Font aOldFont = pDev->GetFont(); + vcl::Font aOldFont = pDev->GetFont(); Color aOldColor = pDev->GetLineColor(); Color aOldFillColor = pDev->GetFillColor(); - Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); + vcl::Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); Size aSize = aFont.GetSize(); aSize.Height() = nRectHeight*3/5; aFont.SetSize( aSize ); diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 37c274e630be..d52be9e1ee2e 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -64,10 +64,10 @@ using namespace com::sun::star::style; namespace svx { namespace sidebar { #define MAX_VALUESET_GRAPHIC 30 -Font& lcl_GetDefaultBulletFont() +vcl::Font& lcl_GetDefaultBulletFont() { static bool bInit = false; - static Font aDefBulletFont( "StarSymbol", "", Size( 0, 14 ) ); + static vcl::Font aDefBulletFont( "StarSymbol", "", Size( 0, 14 ) ); if(!bInit) { aDefBulletFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); @@ -187,7 +187,7 @@ void NBOTypeMgrBase::ImplLoad(const OUString& filename) { SvxNumberFormat aFmt(aNum.GetLevel(i)); if (aFmt.GetBulletFont()) { - Font aFont(*aFmt.GetBulletFont()); + vcl::Font aFont(*aFmt.GetBulletFont()); Color c=aFont.GetColor(); c.SetTransparency(0xFF); aFont.SetColor(c); @@ -283,7 +283,7 @@ BulletsTypeMgr& BulletsTypeMgr::GetInstance() void BulletsTypeMgr::Init() { - Font& rActBulletFont = lcl_GetDefaultBulletFont(); + vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); if( Application::GetSettings().GetLayoutRTL() ) { @@ -321,7 +321,7 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLe SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); sal_Unicode cChar = aFmt.GetBulletChar(); - //const Font* pFont = aFmt.GetBulletFont(); + //const vcl::Font* pFont = aFmt.GetBulletFont(); //sal_uInt16 nLength = 0; /*if( Application::GetSettings().GetLayoutRTL() ) { @@ -377,7 +377,7 @@ bool BulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI SvxNumberFormat aFmt(aNum.GetLevel(nActLv)); sal_Unicode cChar = aFmt.GetBulletChar(); - const Font* pFont = aFmt.GetBulletFont(); + const vcl::Font* pFont = aFmt.GetBulletFont(); //sal_uInt16 nLength = 0; /*if( Application::GetSettings().GetLayoutRTL() ) { @@ -442,8 +442,8 @@ bool BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 if ( nIndex >= DEFAULT_BULLET_TYPES ) return false; cChar = pActualBullets[nIndex]->cBulletChar; - //Font& rActBulletFont = lcl_GetDefaultBulletFont(); - Font rActBulletFont = pActualBullets[nIndex]->aFont; + //vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); + vcl::Font rActBulletFont = pActualBullets[nIndex]->aFont; sal_uInt16 nMask = 1; OUString sBulletCharFmtName = GetBulCharFmtName(); @@ -524,9 +524,9 @@ sal_Unicode BulletsTypeMgr::GetBulChar(sal_uInt16 nIndex) return cChar; } -Font BulletsTypeMgr::GetBulCharFont(sal_uInt16 nIndex) +vcl::Font BulletsTypeMgr::GetBulCharFont(sal_uInt16 nIndex) { - Font aRet; + vcl::Font aRet; if ( nIndex >= DEFAULT_BULLET_TYPES ) aRet = lcl_GetDefaultBulletFont(); else @@ -960,7 +960,7 @@ sal_uInt16 MixBulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 if( eNumType == SVX_NUM_CHAR_SPECIAL) { sal_Unicode cChar = aFmt.GetBulletChar(); - // const Font* pFont = aFmt.GetBulletFont(); + // const vcl::Font* pFont = aFmt.GetBulletFont(); for(sal_uInt16 i = nFromIndex; i < DEFAULT_BULLET_TYPES; i++) { @@ -1031,7 +1031,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u if( eNumType == SVX_NUM_CHAR_SPECIAL && pActualBullets[nIndex]->eType == eNBType::BULLETS ) { sal_Unicode cChar = aFmt.GetBulletChar(); - const Font* pFont = aFmt.GetBulletFont(); + const vcl::Font* pFont = aFmt.GetBulletFont(); BulletsSettings_Impl* pEntry = (BulletsSettings_Impl*) (pActualBullets[nIndex]->pBullets); pEntry->cBulletChar = cChar; pEntry->aFont = pFont?*pFont:lcl_GetDefaultBulletFont(); @@ -1083,7 +1083,7 @@ bool MixBulletsTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_u if ( eNumType == SVX_NUM_CHAR_SPECIAL ) { sal_Unicode cChar = aFmt.GetBulletChar(); - const Font* pFont = aFmt.GetBulletFont(); + const vcl::Font* pFont = aFmt.GetBulletFont(); pActualBullets[nIndex]->eType = eNBType::BULLETS; pActualBullets[nIndex]->nIndex = nIndex+1; //index in the tab page display,decrease 1 to the index within arr pActualBullets[nIndex]->pBullets = new BulletsSettings_Impl(eNBType::BULLETS) ; @@ -1167,8 +1167,8 @@ bool MixBulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI sal_Unicode cChar; cChar = ((BulletsSettings_Impl*)(pCurrentBullets->pBullets))->cBulletChar; - //Font& rActBulletFont = lcl_GetDefaultBulletFont(); - Font rActBulletFont = ((BulletsSettings_Impl*)(pCurrentBullets->pBullets))->aFont; + //vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); + vcl::Font rActBulletFont = ((BulletsSettings_Impl*)(pCurrentBullets->pBullets))->aFont; sal_uInt16 nMask = 1; OUString sBulletCharFmtName = GetBulCharFmtName(); for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++) @@ -1585,7 +1585,7 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m if( eNumType == SVX_NUM_CHAR_SPECIAL) { sal_Unicode cChar = aFmt.GetBulletChar(); - //const Font* pFont = aFmt.GetBulletFont(); + //const vcl::Font* pFont = aFmt.GetBulletFont(); sal_Unicode ccChar = _pSet->sBulletChar[0]; // rtl::OUString sFont = _pSet->sBulletFont; if ( !((cChar == ccChar) && //pFont && sFont.compareTo(pFont->GetName()) && @@ -1741,7 +1741,7 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 SvxNumberFormat aFmt(aNum.GetLevel(i)); //aFmt.SetBulletFont(&pLevelSettings->aFont); - Font& rActBulletFont = lcl_GetDefaultBulletFont(); + vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); if (pLevelSettings->nNumberType !=aFmt.GetNumberingType()) isResetSize=true; aFmt.SetNumberingType( pLevelSettings->nNumberType ); sal_uInt16 nUpperLevelOrChar = (sal_uInt16)pLevelSettings->nParentNumbering; @@ -1760,13 +1760,13 @@ bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 if(pList && pList->IsAvailable( pLevelSettings->sBulletFont ) ) { vcl::FontInfo aInfo = pList->Get(pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE); - Font aFont(aInfo); + vcl::Font aFont(aInfo); aFmt.SetBulletFont(&aFont); } else { //if it cannot be found then create a new one - Font aCreateFont( pLevelSettings->sBulletFont, OUString(), Size( 0, 14 ) ); + vcl::Font aCreateFont( pLevelSettings->sBulletFont, OUString(), Size( 0, 14 ) ); aCreateFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); aCreateFont.SetFamily( FAMILY_DONTKNOW ); aCreateFont.SetPitch( PITCH_DONTKNOW ); diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index 17638b111f49..793fc4fd0ba1 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -51,10 +51,10 @@ using namespace com::sun::star::style; namespace svx { namespace sidebar { -static Font& lcl_GetDefaultBulletFont() +static vcl::Font& lcl_GetDefaultBulletFont() { static bool bInit = false; - static Font aDefBulletFont( OUString( "StarSymbol" ), + static vcl::Font aDefBulletFont( OUString( "StarSymbol" ), OUString(), Size( 0, 14 ) ); if(!bInit) { @@ -197,7 +197,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) const long nRectHeight = aRect.GetHeight(); const Point aBLPos = aRect.TopLeft(); - Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); + vcl::Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); { Size aSize = aFont.GetSize(); aSize.Height() = (nRectHeight*4)/9; @@ -325,10 +325,10 @@ void SvxNumValueSet2::UserDraw( const UserDrawEvent& rUDEvt ) long nRectHeight = aRect.GetHeight(); Size aRectSize(nRectWidth, aRect.GetHeight()); Point aBLPos = aRect.TopLeft(); - Font aOldFont = pDev->GetFont(); + vcl::Font aOldFont = pDev->GetFont(); Color aOldColor = pDev->GetLineColor(); pDev->SetLineColor(aBackColor); - Font aFont(OutputDevice::GetDefaultFont( + vcl::Font aFont(OutputDevice::GetDefaultFont( DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); Size aSize = aFont.GetSize(); @@ -378,7 +378,7 @@ void SvxNumValueSet2::UserDraw( const UserDrawEvent& rUDEvt ) if ( nItemId == DEFAULT_NONE) { OUString sText(SVX_RESSTR( RID_SVXSTR_NUMBULLET_NONE)); - Font aLclFont = pDev->GetFont(); + vcl::Font aLclFont = pDev->GetFont(); Size aLclSize = aLclFont.GetSize(); aLclSize.Height() = nRectHeight/4; aLclFont.SetSize( aLclSize ); @@ -462,8 +462,8 @@ void SvxNumValueSet3::UserDraw( const UserDrawEvent& rUDEvt ) const Color aBackColor = rStyleSettings.GetFieldColor(); const Color aTextColor = rStyleSettings.GetFieldTextColor(); - Font aOldFont = pDev->GetFont(); - Font aFont( lcl_GetDefaultBulletFont() ); + vcl::Font aOldFont = pDev->GetFont(); + vcl::Font aFont( lcl_GetDefaultBulletFont() ); Size aSize = aFont.GetSize(); aSize.Height() = nRectHeight*3/6; @@ -474,8 +474,8 @@ void SvxNumValueSet3::UserDraw( const UserDrawEvent& rUDEvt ) pDev->SetFillColor( aBackColor ); //wj OUString sText(cChar); - Font aOldBulletFont = pDev->GetFont(); - Font aBulletFnt(aFmt.GetBulletFont() ? *aFmt.GetBulletFont() : aOldBulletFont); + vcl::Font aOldBulletFont = pDev->GetFont(); + vcl::Font aBulletFnt(aFmt.GetBulletFont() ? *aFmt.GetBulletFont() : aOldBulletFont); Size aBulSize = aOldBulletFont.GetSize(); aBulletFnt.SetSize(aBulSize); pDev->SetFont(aBulletFnt); @@ -505,8 +505,8 @@ void SvxNumValueSet3::UserDraw( const UserDrawEvent& rUDEvt ) const Color aBackColor = rStyleSettings.GetFieldColor(); const Color aTextColor = rStyleSettings.GetFieldTextColor(); - Font aOldFont = pDev->GetFont(); - Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); + vcl::Font aOldFont = pDev->GetFont(); + vcl::Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_UI_SANS, MsLangId::getSystemLanguage(), DEFAULTFONT_FLAGS_ONLYONE)); Size aSize = aFont.GetSize(); //aSize.Height() = nRectHeight/5; aSize.Height() = nRectHeight/4; diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 2da6c1b55238..c98757922408 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -407,7 +407,7 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr if(bText && mbFntDirty) { - Font aFnt(maVD.GetFont()); + vcl::Font aFnt(maVD.GetFont()); const sal_uInt32 nHeight(FRound(aFnt.GetSize().Height() * mfScaleY)); mpTextAttr->Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO ) ); @@ -993,7 +993,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt // calc text box size, add 5% to make it fit safely FontMetric aFontMetric( maVD.GetFontMetric() ); - Font aFnt( maVD.GetFont() ); + vcl::Font aFnt( maVD.GetFont() ); FontAlign eAlg( aFnt.GetAlign() ); sal_Int32 nTextWidth = (sal_Int32)( maVD.GetTextWidth( rStr ) * mfScaleX ); diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 18f354a0f240..bb0041645e9c 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -500,7 +500,7 @@ bool _SdrItemBrowserControl::BegChangeEntry(sal_uIntPtr nPos) pEditControl->SetPosSizePixel(aRect.TopLeft(),aRect.GetSize()); pEditControl->SetText(pEntry->aValue); pEditControl->SetBackground( Wallpaper(Color(COL_LIGHTGRAY))); - Font aFont(pEditControl->GetFont()); + vcl::Font aFont(pEditControl->GetFont()); aFont.SetFillColor(Color(COL_LIGHTGRAY)); pEditControl->SetFont(aFont); pEditControl->Show(); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index ce465ce52fe0..c197fa7f0dd4 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -727,7 +727,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt sal_uInt16 nLanguage(Application::GetSettings().GetLanguageTag().getLanguageType()); // get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default - Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); + vcl::Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); aSvxFontItem.SetFamily(aFont.GetFamily()); aSvxFontItem.SetFamilyName(aFont.GetName()); aSvxFontItem.SetStyleName(OUString()); @@ -736,7 +736,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt pItemPool->SetPoolDefaultItem(aSvxFontItem); // get DEFAULTFONT_CJK_TEXT and set at pool as dynamic default - Font aFontCJK(OutputDevice::GetDefaultFont(DEFAULTFONT_CJK_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); + vcl::Font aFontCJK(OutputDevice::GetDefaultFont(DEFAULTFONT_CJK_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); aSvxFontItemCJK.SetFamily( aFontCJK.GetFamily()); aSvxFontItemCJK.SetFamilyName(aFontCJK.GetName()); aSvxFontItemCJK.SetStyleName(OUString()); @@ -745,7 +745,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt pItemPool->SetPoolDefaultItem(aSvxFontItemCJK); // get DEFAULTFONT_CTL_TEXT and set at pool as dynamic default - Font aFontCTL(OutputDevice::GetDefaultFont(DEFAULTFONT_CTL_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); + vcl::Font aFontCTL(OutputDevice::GetDefaultFont(DEFAULTFONT_CTL_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); aSvxFontItemCTL.SetFamily(aFontCTL.GetFamily()); aSvxFontItemCTL.SetFamilyName(aFontCTL.GetName()); aSvxFontItemCTL.SetStyleName(OUString()); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index d74d9b0fec77..011418d57844 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -888,8 +888,8 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS if(pMtf) pMtf->Pause(true); - Font aFontMerk(pOut->GetFont()); - Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SERIF, LANGUAGE_SYSTEM, DEFAULTFONT_FLAGS_ONLYONE ) ); + vcl::Font aFontMerk(pOut->GetFont()); + vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SERIF, LANGUAGE_SYSTEM, DEFAULTFONT_FLAGS_ONLYONE ) ); aTmpFont.SetSize(Size(0,100)); pOut->SetFont(aTmpFont); diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 8d8fd4953749..aefba0c905fc 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -97,7 +97,7 @@ namespace DECL_LINK(decomposeBlockBulletPrimitive, DrawBulletInfo* ); DECL_LINK(decomposeStretchBulletPrimitive, DrawBulletInfo* ); - bool impIsUnderlineAbove(const Font& rFont) const; + bool impIsUnderlineAbove(const vcl::Font& rFont) const; void impCreateTextPortionPrimitive(const DrawPortionInfo& rInfo); drawinglayer::primitive2d::BasePrimitive2D* impCheckFieldPrimitive(drawinglayer::primitive2d::BasePrimitive2D* pPrimitive, const DrawPortionInfo& rInfo) const; void impFlushTextPortionPrimitivesToLinePrimitives(); @@ -159,7 +159,7 @@ namespace drawinglayer::primitive2d::Primitive2DSequence getPrimitive2DSequence(); }; - bool impTextBreakupHandler::impIsUnderlineAbove(const Font& rFont) const + bool impTextBreakupHandler::impIsUnderlineAbove(const vcl::Font& rFont) const { if(!rFont.IsVertical()) { diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index 4917f107f4e1..2794af2f80ca 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -135,7 +135,7 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUStri aBackgroundColor = GetSettings().GetStyleSettings().GetFaceColor(); SetBackground( aBackgroundColor ); - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); aFont.SetColor( ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ) ); aFont.SetFillColor( aBackgroundColor ); aFont.SetTransparent( false ); @@ -447,7 +447,7 @@ ColumnsWindow::ColumnsWindow( sal_uInt16 nId, const OUString& rCmd, const OUStri nTextHeight = GetTextHeight()+1; SetBackground(); - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetColor( aLineColor ); aFont.SetFillColor( aFaceColor ); aFont.SetTransparent( false ); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 1afb936d49f6..f6f189c58708 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -163,7 +163,7 @@ private: SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr<FontList> m_aOwnFontList; SAL_WNODEPRECATED_DECLARATIONS_POP - Font aCurFont; + vcl::Font aCurFont; Size aLogicalSize; OUString aCurText; sal_uInt16 nFtCount; @@ -591,7 +591,7 @@ void SvxStyleBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) aFont.SetEmphasisMark( static_cast< const SvxEmphasisMarkItem* >( pItem )->GetEmphasisMark() ); // setup the device & draw - Font aOldFont( pDevice->GetFont() ); + vcl::Font aOldFont( pDevice->GetFont() ); Color aOldColor( pDevice->GetTextColor() ); Color aOldFillColor( pDevice->GetFillColor() ); @@ -768,7 +768,7 @@ IMPL_LINK( SvxFontNameBox_Impl, CheckAndMarkUnknownFont, VclWindowEvent*, event OUString fontname = GetSubEdit()->GetText(); lcl_GetDocFontList( &pFontList, this ); // If the font is unknown, show it in italic. - Font font = GetControlFont(); + vcl::Font font = GetControlFont(); if( pFontList != NULL && pFontList->IsAvailable( fontname )) { if( font.GetItalic() != ITALIC_NONE ) diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx index 9ff03b66ca8c..d90d2fe7f7ed 100644 --- a/sw/inc/hhcwrp.hxx +++ b/sw/inc/hhcwrp.hxx @@ -93,7 +93,7 @@ public: SwView* pView, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, LanguageType nSourceLanguage, LanguageType nTargetLanguage, - const Font *pTargetFont, + const vcl::Font *pTargetFont, sal_Int32 nConvOptions, bool bIsInteractive, bool bStart, bool bOther, bool bSelection ); diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index a46e8bc57cb1..8c7a0491a7d5 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -155,7 +155,7 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable SAL_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM, LanguageType nLang, sal_uInt16 nLangWhichId, - const Font *pFont, sal_uInt16 nFontWhichId ); + const vcl::Font *pFont, sal_uInt16 nFontWhichId ); /// Start: Data collected during idle time diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index 0ba4f7a768a6..10d9eefa1804 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -35,7 +35,7 @@ class SwTxtFmtColl; class IDocumentListsAccess; class SwNodeNum; -class Font; +namespace vcl { class Font; } class SvxBrushItem; class SfxGrabBagItem; class SvxNumRule; @@ -298,7 +298,7 @@ namespace numfunc @author OD */ - SW_DLLPUBLIC const Font& GetDefBulletFont(); + SW_DLLPUBLIC const vcl::Font& GetDefBulletFont(); /** retrieve unicode of character used for the default bullet list for the given list level diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx index 2771e90d6b3b..8a09c261b437 100644 --- a/sw/inc/splargs.hxx +++ b/sw/inc/splargs.hxx @@ -24,13 +24,14 @@ #include <tools/gen.hxx> #include <limits.h> -class SwTxtNode; -class SwIndex; -class Font; #include <com/sun/star/linguistic2/XSpellAlternatives.hpp> #include <com/sun/star/linguistic2/XSpellChecker1.hpp> #include <com/sun/star/linguistic2/XHyphenatedWord.hpp> +class SwTxtNode; +class SwIndex; +namespace vcl { class Font; } + struct SwArgsBase // used for text conversion (Hangul/Hanja, ...) { SwTxtNode *pStartNode; @@ -65,7 +66,7 @@ struct SwConversionArgs : SwArgsBase // used for chinese translation LanguageType nConvTargetLang; // target language of text to be changed - const Font *pTargetFont; // target font of text to be changed + const vcl::Font *pTargetFont; // target font of text to be changed // explicitly enables or disables application of the above two bool bAllowImplicitChangesForNotConvertibleText; diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 1dae48015cb1..2cc04cc5612b 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -117,7 +117,7 @@ namespace { sal_uInt16 nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem( aArr[n].nResLngId )).GetLanguage(); - Font aFnt( OutputDevice::GetDefaultFont( nFntType, + vcl::Font aFnt( OutputDevice::GetDefaultFont( nFntType, nLng, DEFAULTFONT_FLAGS_ONLYONE ) ); rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), @@ -146,7 +146,7 @@ namespace { sal_uInt16 nLng = ((SvxLanguageItem&)rSet.GetPool()->GetDefaultItem( aArr[n].nResLngId )).GetLanguage(); - Font aFnt( OutputDevice::GetDefaultFont( aArr[n].nFntType, + vcl::Font aFnt( OutputDevice::GetDefaultFont( aArr[n].nFntType, nLng, DEFAULTFONT_FLAGS_ONLYONE ) ); rSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), @@ -441,7 +441,7 @@ SwTxtFmtColl* DocumentStylePoolManager::GetTxtCollFromPool( sal_uInt16 nId, bool if( LANGUAGE_DONTKNOW == nLng ) nLng = *(pArr+3); - Font aFnt( OutputDevice::GetDefaultFont( *pArr, + vcl::Font aFnt( OutputDevice::GetDefaultFont( *pArr, nLng, DEFAULTFONT_FLAGS_ONLYONE ) ); aSet.Put( SvxFontItem( aFnt.GetFamily(), aFnt.GetName(), @@ -1171,7 +1171,7 @@ SwFmt* DocumentStylePoolManager::GetFmtFromPool( sal_uInt16 nId ) case RES_POOLCHR_BUL_LEVEL: // Bullet character { - const Font& rBulletFont = numfunc::GetDefBulletFont(); + const vcl::Font& rBulletFont = numfunc::GetDefBulletFont(); SetAllScriptItem( aSet, SvxFontItem( rBulletFont.GetFamily(), rBulletFont.GetName(), rBulletFont.GetStyleName(), rBulletFont.GetPitch(), rBulletFont.GetCharSet(), RES_CHRATR_FONT )); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 82d653a25006..4045abfa8fff 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -97,10 +97,10 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, const SwViewShell &rSh, const SwNoTxtFrm *pFrm, bool bDefect ) { - static Font *pFont = 0; + static vcl::Font *pFont = 0; if ( !pFont ) { - pFont = new Font(); + pFont = new vcl::Font(); pFont->SetWeight( WEIGHT_BOLD ); pFont->SetStyleName( OUString() ); pFont->SetName(OUString("Arial Unicode")); diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 0b0ccc7c7291..fce040d6ca9c 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1074,7 +1074,7 @@ namespace numfunc return mbUserDefinedFontname; } - inline const Font& GetFont() const + inline const vcl::Font& GetFont() const { return *mpFont; } @@ -1118,7 +1118,7 @@ namespace numfunc sal_Unicode mnLevelChars[MAXLEVEL]; // default bullet list font instance - Font* mpFont; + vcl::Font* mpFont; }; namespace @@ -1256,7 +1256,7 @@ namespace numfunc { delete mpFont; - mpFont = new Font( msFontname, OUString(), Size( 0, 14 ) ); + mpFont = new vcl::Font( msFontname, OUString(), Size( 0, 14 ) ); mpFont->SetWeight( meFontWeight ); mpFont->SetItalic( meFontItalic ); mpFont->SetCharSet( RTL_TEXTENCODING_SYMBOL ); @@ -1283,7 +1283,7 @@ namespace numfunc return SwDefBulletConfig::getInstance().IsFontnameUserDefined(); } - const Font& GetDefBulletFont() + const vcl::Font& GetDefBulletFont() { return SwDefBulletConfig::getInstance().GetFont(); } diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index c1088a245897..c3542b9b0c51 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1410,7 +1410,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) { int nBulletPos = pFndBulletChr - pBulletChar; sal_Unicode cBullChar; - const Font* pBullFnt( 0 ); + const vcl::Font* pBullFnt( 0 ); if( nBulletPos < cnPosEnDash ) { cBullChar = m_aFlags.cBullet; diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx index db58a47571dd..0e300929aa05 100644 --- a/sw/source/core/inc/drawfont.hxx +++ b/sw/source/core/inc/drawfont.hxx @@ -31,7 +31,7 @@ class Point; class SwWrongList; class Size; class SwFont; -class Font; +namespace vcl { class Font; } class SwUnderlineFont; // encapsulates information for drawing text @@ -607,7 +607,7 @@ public: // sets a new color at the output device if necessary if a font is passed // as argument, the change if made to the font otherwise the font at the // output device is changed returns if the font has been changed - bool ApplyAutoColor( Font* pFnt = 0 ); + bool ApplyAutoColor( vcl::Font* pFnt = 0 ); }; #endif diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx index 10a7112320b3..8a1c812cb9dd 100644 --- a/sw/source/core/inc/fntcache.hxx +++ b/sw/source/core/inc/fntcache.hxx @@ -61,9 +61,9 @@ class SwFntObj : public SwCacheObj friend void _InitCore(); friend void _FinitCore(); - Font aFont; - Font *pScrFont; - Font *pPrtFont; + vcl::Font aFont; + vcl::Font *pScrFont; + vcl::Font *pPrtFont; OutputDevice* pPrinter; sal_uInt16 nGuessedLeading; sal_uInt16 nExtLeading; @@ -92,9 +92,9 @@ public: virtual ~SwFntObj(); - inline Font *GetScrFont() { return pScrFont; } - inline Font& GetFont() { return aFont; } - inline const Font& GetFont() const { return aFont; } + inline vcl::Font *GetScrFont() { return pScrFont; } + inline vcl::Font& GetFont() { return aFont; } + inline const vcl::Font& GetFont() const { return aFont; } inline sal_uInt16 GetGuessedLeading() const { return nGuessedLeading; } inline sal_uInt16 GetExtLeading() const { return nExtLeading; } diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx index 4469bd72cb98..b0c4a3dc0eb6 100644 --- a/sw/source/core/inc/pagefrm.hxx +++ b/sw/source/core/inc/pagefrm.hxx @@ -32,7 +32,7 @@ class SwCntntFrm; struct SwPosition; struct SwCrsrMoveState; class SwAttrSetChg; -class Font; +namespace vcl { class Font; } class SwSortedObjs; class SwAnchoredObject; @@ -327,7 +327,7 @@ public: bool IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rControl ) const; // return font used to paint the "empty page" string - static const Font& GetEmptyPageFont(); + static const vcl::Font& GetEmptyPageFont(); static SwTwips GetSidebarBorderWidth( const SwViewShell* ); }; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 4196995663a0..ec6189ba5560 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2240,7 +2240,7 @@ void DrawGraphic( if( bReplaceGrfNum ) { const BitmapEx& rBmp = SwViewShell::GetReplacementBitmap( false ); - Font aTmp( pOutDev->GetFont() ); + vcl::Font aTmp( pOutDev->GetFont() ); Graphic::DrawEx( pOutDev, aEmptyOUStr, aTmp, rBmp, rOrg.Pos(), rOrg.SSize() ); } } @@ -3413,8 +3413,8 @@ void SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) c pSh->GetOut()->DrawRect( aEmptyPageRect.SVRect() ); // paint empty page text - const Font& rEmptyPageFont = SwPageFrm::GetEmptyPageFont(); - const Font aOldFont( pSh->GetOut()->GetFont() ); + const vcl::Font& rEmptyPageFont = SwPageFrm::GetEmptyPageFont(); + const vcl::Font aOldFont( pSh->GetOut()->GetFont() ); pSh->GetOut()->SetFont( rEmptyPageFont ); pSh->GetOut()->DrawText( aEmptyPageRect.SVRect(), SW_RESSTR( STR_EMPTYPAGE ), @@ -3767,7 +3767,7 @@ void SwColumnFrm::PaintBreak( ) const basegfx::B2DVector aFontSize; OutputDevice* pOut = pGlobalShell->GetOut(); - Font aFont = pOut->GetSettings().GetStyleSettings().GetToolFont(); + vcl::Font aFont = pOut->GetSettings().GetStyleSettings().GetToolFont(); aFont.SetHeight( 8 * 20 ); pOut->SetFont( aFont ); drawinglayer::attribute::FontAttribute aFontAttr = drawinglayer::primitive2d::getFontAttributeFromVclFont( @@ -7264,12 +7264,12 @@ const Color SwPageFrm::GetDrawBackgrdColor() const } /// create/return font used to paint the "empty page" string -const Font& SwPageFrm::GetEmptyPageFont() +const vcl::Font& SwPageFrm::GetEmptyPageFont() { - static Font* pEmptyPgFont = 0; + static vcl::Font* pEmptyPgFont = 0; if ( 0 == pEmptyPgFont ) { - pEmptyPgFont = new Font; + pEmptyPgFont = new vcl::Font; pEmptyPgFont->SetSize( Size( 0, 80 * 20 )); // == 80 pt pEmptyPgFont->SetWeight( WEIGHT_BOLD ); pEmptyPgFont->SetStyleName( aEmptyOUStr ); diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index 2307627a7c6d..32a43b8cb505 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -32,7 +32,7 @@ #include "ndtxt.hxx" #include <editeng/paravertalignitem.hxx> -class Font; +namespace vcl { class Font; } class OutputDevice; class SvxBrushItem; class SvxLineSpacingItem; diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 6866cada566d..1cd6a83fd9b1 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -965,7 +965,7 @@ SwTxtPortion *SwTxtFormatter::NewTxtPortion( SwTxtFormatInfo &rInf ) CalcAscent( rInf, pPor ); const SwFont* pTmpFnt = rInf.GetFont(); - sal_Int32 nExpect = std::min( sal_Int32( ((Font *)pTmpFnt)->GetSize().Height() ), + sal_Int32 nExpect = std::min( sal_Int32( ((vcl::Font *)pTmpFnt)->GetSize().Height() ), sal_Int32( pPor->GetAscent() ) ) / 8; if ( !nExpect ) nExpect = 1; diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx index 27e713aa6a9d..af6417b4c762 100644 --- a/sw/source/core/text/txtdrop.cxx +++ b/sw/source/core/text/txtdrop.cxx @@ -736,7 +736,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf ) #endif bool bWinUsed = false; - Font aOldFnt; + vcl::Font aOldFnt; MapMode aOldMap( MAP_TWIP ); OutputDevice* pOut = rInf.GetOut(); OutputDevice* pWin; diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index c8d7fbda5572..b42397e9feea 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -485,7 +485,7 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const if( SVX_NUM_CHAR_SPECIAL == rNumFmt.GetNumberingType() ) { - const Font *pFmtFnt = rNumFmt.GetBulletFont(); + const vcl::Font *pFmtFnt = rNumFmt.GetBulletFont(); // Build a new bullet font basing on the current paragraph font: diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index fc7aeb00bece..d2951ff0958f 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -2238,7 +2238,7 @@ void SwTxtFrm::_CalcHeightOfLastLine( const bool _bUseFont ) } else { - Font aOldFont = pOut->GetFont(); + vcl::Font aOldFont = pOut->GetFont(); aFont.SetFntChg( true ); aFont.ChgPhysFnt( pVsh, *pOut ); mnHeightOfLastLine = aFont.GetHeight( pVsh, *pOut ); diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 78366095a735..0e88feb0f1ce 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -143,7 +143,7 @@ void SwFntObj::CreatePrtFont( const OutputDevice& rPrt ) if( pPrtFont != &aFont ) delete pPrtFont; - const Font aOldFnt( rPrt.GetFont() ); + const vcl::Font aOldFnt( rPrt.GetFont() ); ((OutputDevice&)rPrt).SetFont( aFont ); const FontMetric aWinMet( rPrt.GetFontMetric() ); ((OutputDevice&)rPrt).SetFont( aOldFnt ); @@ -151,7 +151,7 @@ void SwFntObj::CreatePrtFont( const OutputDevice& rPrt ) if( !nWidth ) ++nWidth; - pPrtFont = new Font( aFont ); + pPrtFont = new vcl::Font( aFont ); pPrtFont->SetSize( Size( nWidth, aFont.GetSize().Height() ) ); pScrFont = NULL; } @@ -179,7 +179,7 @@ static bool lcl_IsFontAdjustNecessary( const OutputDevice& rOutDev, struct CalcLinePosData { SwDrawTextInfo& rInf; - Font& rFont; + vcl::Font& rFont; sal_Int32 nCnt; const bool bSwitchH2V; const bool bSwitchL2R; @@ -187,7 +187,7 @@ struct CalcLinePosData long* pKernArray; const bool bBidiPor; - CalcLinePosData( SwDrawTextInfo& _rInf, Font& _rFont, + CalcLinePosData( SwDrawTextInfo& _rInf, vcl::Font& _rFont, sal_Int32 _nCnt, const bool _bSwitchH2V, const bool _bSwitchL2R, long _nHalfSpace, long* _pKernArray, const bool _bBidiPor) : rInf( _rInf ), @@ -282,7 +282,7 @@ sal_uInt16 SwFntObj::GetFontAscent( const SwViewShell *pSh, const OutputDevice& if (nPrtAscent == USHRT_MAX) // printer ascent unknown? { CreatePrtFont( rOut ); - const Font aOldFnt( rRefDev.GetFont() ); + const vcl::Font aOldFnt( rRefDev.GetFont() ); ((OutputDevice&)rRefDev).SetFont( *pPrtFont ); const FontMetric aOutMet( rRefDev.GetFontMetric() ); nPrtAscent = (sal_uInt16) aOutMet.GetAscent(); @@ -319,7 +319,7 @@ sal_uInt16 SwFntObj::GetFontHeight( const SwViewShell* pSh, const OutputDevice& if (nPrtHeight == USHRT_MAX) // printer height unknown? { CreatePrtFont( rOut ); - const Font aOldFnt( rRefDev.GetFont() ); + const vcl::Font aOldFnt( rRefDev.GetFont() ); ((OutputDevice&)rRefDev).SetFont( *pPrtFont ); nPrtHeight = static_cast<sal_uInt16>(rRefDev.GetTextHeight()); @@ -353,7 +353,7 @@ sal_uInt16 SwFntObj::GetFontLeading( const SwViewShell *pSh, const OutputDevice& { SolarMutexGuard aGuard; - const Font aOldFnt( rOut.GetFont() ); + const vcl::Font aOldFnt( rOut.GetFont() ); ((OutputDevice&)rOut).SetFont( *pPrtFont ); const FontMetric aMet( rOut.GetFontMetric() ); ((OutputDevice&)rOut).SetFont( aOldFnt ); @@ -404,7 +404,7 @@ void SwFntObj::CreateScrFont( const SwViewShell& rSh, const OutputDevice& rOut ) OutputDevice* pOut = (OutputDevice*)&rOut; // Save old font - Font aOldOutFont( pOut->GetFont() ); + vcl::Font aOldOutFont( pOut->GetFont() ); nScrHeight = USHRT_MAX; @@ -421,7 +421,7 @@ void SwFntObj::CreateScrFont( const SwViewShell& rSh, const OutputDevice& rOut ) pPrinter = pPrt; // save old reference device font - Font aOldPrtFnt( pPrt->GetFont() ); + vcl::Font aOldPrtFnt( pPrt->GetFont() ); // set the font used at the reference device at the reference device // and the output device @@ -511,7 +511,7 @@ void SwFntObj::GuessLeading( const SwViewShell& MapMode aTmpMap( MAP_TWIP ); MapMode aOldMap = pWin->GetMapMode( ); pWin->SetMapMode( aTmpMap ); - const Font aOldFnt( pWin->GetFont() ); + const vcl::Font aOldFnt( pWin->GetFont() ); pWin->SetFont( *pPrtFont ); const FontMetric aWinMet( pWin->GetFontMetric() ); const sal_uInt16 nWinHeight = sal_uInt16( aWinMet.GetSize().Height() ); @@ -775,7 +775,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) const bool bUseScrFont = lcl_IsFontAdjustNecessary( rInf.GetOut(), rRefDev ); - Font* pTmpFont = bUseScrFont ? pScrFont : pPrtFont; + vcl::Font* pTmpFont = bUseScrFont ? pScrFont : pPrtFont; // bDirectPrint and bUseScrFont should have these values: @@ -2215,7 +2215,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic, // Search by font comparison, quite expensive! // Look for same font and same printer pFntObj = pFntCache->First(); - while ( pFntObj && !( pFntObj->aFont == *(Font *)pOwn && + while ( pFntObj && !( pFntObj->aFont == *(vcl::Font *)pOwn && pFntObj->GetZoom() == nZoom && pFntObj->GetPropWidth() == ((SwSubFont*)pOwn)->GetPropWidth() && @@ -2227,7 +2227,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic, // found one without printer, let's see if there is one with // the same printer as well SwFntObj *pTmpObj = pFntObj; - while( pTmpObj && !( pTmpObj->aFont == *(Font *)pOwn && + while( pTmpObj && !( pTmpObj->aFont == *(vcl::Font *)pOwn && pTmpObj->GetZoom()==nZoom && pTmpObj->pPrinter==pOut && pTmpObj->GetPropWidth() == ((SwSubFont*)pOwn)->GetPropWidth() ) ) @@ -2463,9 +2463,9 @@ sal_Int32 SwFont::GetTxtBreak( SwDrawTextInfo& rInf, long nTextWidth ) extern Color aGlobalRetoucheColor; -bool SwDrawTextInfo::ApplyAutoColor( Font* pFont ) +bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont ) { - const Font& rFnt = pFont ? *pFont : GetOut().GetFont(); + const vcl::Font& rFnt = pFont ? *pFont : GetOut().GetFont(); bool bPrt = GetShell() && ! GetShell()->GetWin(); ColorData nNewColor = COL_BLACK; bool bChgFntColor = false; @@ -2565,7 +2565,7 @@ bool SwDrawTextInfo::ApplyAutoColor( Font* pFont ) else if ( aNewColor != GetOut().GetFont().GetColor() ) { // set new font with new color at output device - Font aFont( rFnt ); + vcl::Font aFont( rFnt ); aFont.SetColor( aNewColor ); GetOut().SetFont( aFont ); } diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index e38abb92a43c..24afd66d7d7c 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -1541,7 +1541,7 @@ long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess, aFont.SetActual(nActual); OutputDevice &rMutableOut = const_cast<OutputDevice &>(rOut); - const Font aOldFont(rMutableOut.GetFont()); + const vcl::Font aOldFont(rMutableOut.GetFont()); rMutableOut.SetFont(aFont.GetActualFont()); long nHeight = rMutableOut.GetTextHeight(); diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 4788055aa38e..c0832459cd9f 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1056,7 +1056,7 @@ bool SwTxtNode::Spell(SwSpellArgs* pArgs) void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM, LanguageType nLang, sal_uInt16 nLangWhichId, - const Font *pFont, sal_uInt16 nFontWhichId ) + const vcl::Font *pFont, sal_uInt16 nFontWhichId ) { sal_uInt16 aRanges[] = { nLangWhichId, nLangWhichId, diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 75203aa24cb9..b4ef13186791 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -827,7 +827,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam) vcl::FontInfo aInfo = pList->Get( pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE); - Font aFont(aInfo); + vcl::Font aFont(aInfo); aFmt.SetBulletFont(&aFont); } aRule.Set( i, aFmt ); diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index ca92aaab3d3c..0b63cef133b1 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1461,7 +1461,7 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetNumberingRuleByIndex( pData = new PropValData((void*)&nINT16, "BulletId", ::cppu::UnoType<sal_Int16>::get()); aPropertyValues.push_back(pData); - const Font* pFont = rFmt.GetBulletFont(); + const vcl::Font* pFont = rFmt.GetBulletFont(); //BulletChar aUString = OUString(rFmt.GetBulletChar()); @@ -1921,7 +1921,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex( // do not accept "empty" font if ( !pDesc->Name.isEmpty() ) { - Font aFont; + vcl::Font aFont; SvxUnoFontDescriptor::ConvertToFont( *pDesc, aFont ); aFmt.SetBulletFont(&aFont); } @@ -1944,7 +1944,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex( const FontList* pList = pFontListItem->GetFontList(); vcl::FontInfo aInfo = pList->Get( sBulletFontName, WEIGHT_NORMAL, ITALIC_NONE); - Font aFont(aInfo); + vcl::Font aFont(aInfo); aFmt.SetBulletFont(&aFont); } else diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 705911d53b05..6a719c6c907c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1881,7 +1881,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const FontList* pList = pFontListItem->GetFontList(); vcl::FontInfo aInfo = pList->Get( pBulletFontNames[i],WEIGHT_NORMAL, ITALIC_NONE); - Font aFont(aInfo); + vcl::Font aFont(aInfo); aFmt.SetBulletFont(&aFont); } aSetRule.Set( i, &aFmt ); diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 94e98d1aa57a..65e70589d036 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -1048,7 +1048,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const MapMode aMapMode( pOutputDev->GetMapMode() ); MapMode aSavedMapMode = aMapMode; - const Font& rEmptyPgFont = SwPageFrm::GetEmptyPageFont(); + const vcl::Font& rEmptyPgFont = SwPageFrm::GetEmptyPageFont(); for ( std::vector<PreviewPage*>::const_iterator aPageIter = maPreviewPages.begin(); aPageIter != maPreviewPages.end(); @@ -1078,7 +1078,7 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const pOutputDev->DrawRect( aPageRect ); // paint empty page text - Font aOldFont( pOutputDev->GetFont() ); + vcl::Font aOldFont( pOutputDev->GetFont() ); pOutputDev->SetFont( rEmptyPgFont ); pOutputDev->DrawText( aPageRect, SW_RESSTR( STR_EMPTYPAGE ), TEXT_DRAW_VCENTER | diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 43ae47367356..4ee7141d8440 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -113,7 +113,7 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, } if( !rOpt.GetFontName().isEmpty() ) { - Font aTextFont( rOpt.GetFontName(), Size( 0, 10 ) ); + vcl::Font aTextFont( rOpt.GetFontName(), Size( 0, 10 ) ); if( pDoc->getIDocumentDeviceAccess().getPrinter( false ) ) aTextFont = pDoc->getIDocumentDeviceAccess().getPrinter( false )->GetFontMetric( aTextFont ); SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetName(), diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 24b17f0298d5..e198c739bbf6 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -608,7 +608,7 @@ void SwHTMLParser::DeleteFormImpl() static void lcl_html_setFixedFontProperty( const uno::Reference< beans::XPropertySet >& rPropSet ) { - Font aFixedFont( OutputDevice::GetDefaultFont( + vcl::Font aFixedFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE ) ); Any aTmp; diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index ad1c8ae074fa..47d6f1793c62 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -1086,7 +1086,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() && !((OUString*)aTmp.getValue())->isEmpty() ) { - Font aFixedFont( OutputDevice::GetDefaultFont( + vcl::Font aFixedFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_ENGLISH_US, DEFAULTFONT_FLAGS_ONLYONE ) ); OUString aFName( *(OUString*)aTmp.getValue() ); diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index a85db796b131..700d18b193fb 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -310,8 +310,8 @@ void Writer::PutNumFmtFontsInAttrPool() const SwNumRuleTbl& rListTbl = pDoc->GetNumRuleTbl(); const SwNumRule* pRule; const SwNumFmt* pFmt; - const Font* pFont; - const Font* pDefFont = &numfunc::GetDefBulletFont(); + const vcl::Font* pFont; + const vcl::Font* pDefFont = &numfunc::GetDefBulletFont(); bool bCheck = false; for( sal_uInt16 nGet = rListTbl.size(); nGet; ) diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index 0f1896284b9f..6b38e79c051d 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -365,7 +365,7 @@ void MSWordExportBase::AbstractNumberingDefinitions() OUString sNumStr; OUString sFontName; bool bWriteBullet = false; - const Font* pBulletFont=0; + const vcl::Font* pBulletFont=0; rtl_TextEncoding eChrSet=0; FontFamily eFamily=FAMILY_DECORATIVE; if( SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType() || @@ -631,7 +631,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, if (1 < rCharLen) { - const Font& rFont = rFmt.GetBulletFont() + const vcl::Font& rFont = rFmt.GetBulletFont() ? *rFmt.GetBulletFont() : numfunc::GetDefBulletFont(); OUString sNumStr = OUString(rFmt.GetBulletChar()); diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 41407d2afd9b..2ec213d99695 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -930,7 +930,7 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc) } } -sal_uInt16 wwFontHelper::GetId(const Font& rFont) +sal_uInt16 wwFontHelper::GetId(const vcl::Font& rFont) { wwFont aFont(rFont.GetName(), rFont.GetPitch(), rFont.GetFamily(), rFont.GetCharSet(), mbWrtWW8); diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index a1621ac12946..3d44e4ca973a 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -58,7 +58,7 @@ class RtfAttributeOutput; class BitmapPalette; class SwEscherEx; class DateTime; -class Font; +namespace vcl { class Font; } class MSWordExportBase; class SdrObject; class SfxItemSet; @@ -322,7 +322,7 @@ public: wwFontHelper() : mbWrtWW8(false), bLoadAllFonts(false) {} /// rDoc used only to get the initial standard font(s) in use. void InitFontTable(bool bWrtWW8, const SwDoc& rDoc); - sal_uInt16 GetId(const Font& rFont); + sal_uInt16 GetId(const vcl::Font& rFont); sal_uInt16 GetId(const SvxFontItem& rFont); sal_uInt16 GetId(const wwFont& rFont); void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 552104f2c5d1..d6e75319ff3d 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5342,7 +5342,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) { Graphic aGraphic = vecBulletGrf[nGrfBulletCP]->GetGrf(); SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH); - Font aFont = numfunc::GetDefBulletFont(); + vcl::Font aFont = numfunc::GetDefBulletFont(); int nHeight = aFont.GetHeight() * 12; Size aPrefSize( aGraphic.GetPrefSize()); if (aPrefSize.Height() * aPrefSize.Width() != 0 ) diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 90d7add71af3..5c9487633109 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -647,7 +647,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, if( GetFontParams( SVBT16ToShort( rAV.ftc ), eFamily, aName, ePitch, eCharSet ) ){ - Font aFont; + vcl::Font aFont; aFont.SetName( aName ); aFont.SetFamily( eFamily ); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index c81eb9c57cb1..f2fd82ff963d 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1043,7 +1043,7 @@ void WW8ListManager::AdjustLVL( sal_uInt8 nLevel, SwNumRule& rNumRule, if( SVX_NUM_CHAR_SPECIAL == aNumFmt.GetNumberingType() ) { SwCharFmt* pFmt = aNumFmt.GetCharFmt(); - Font aFont; + vcl::Font aFont; if( !pFmt ) { aFont = numfunc::GetDefBulletFont(); @@ -2252,7 +2252,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString, { 0, 0 } }; - Font aFont; + vcl::Font aFont; uno::Reference< beans::XPropertySetInfo > xPropSetInfo = rPropSet->getPropertySetInfo(); diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index cb3bbe40050f..8a6b14a84a26 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -95,7 +95,7 @@ class SwDropCapsPict : public Control Size CalcTextSize( void ); inline void InitPrinter( void ); void _InitPrinter( void ); - void GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich ); + void GetFontSettings( const SwDropCapsPage& _rPage, vcl::Font& _rFont, sal_uInt16 _nWhich ); void GetFirstScriptSegment(sal_Int32 &start, sal_Int32 &end, sal_uInt16 &scriptType); bool GetNextScriptSegment(size_t &nIdx, sal_Int32 &start, sal_Int32 &end, sal_uInt16 &scriptType); @@ -188,7 +188,7 @@ OUString GetDefaultString(sal_uInt16 nChars) return aStr; } -static void calcFontHeightAnyAscent( OutputDevice* _pWin, Font& _rFont, long& _nHeight, long& _nAscent ) +static void calcFontHeightAnyAscent( OutputDevice* _pWin, vcl::Font& _rFont, long& _nHeight, long& _nAscent ) { if ( !_nHeight ) { @@ -243,7 +243,7 @@ bool SwDropCapsPict::GetNextScriptSegment(size_t &nIdx, sal_Int32 &start, sal_In #define LINES 10 #define BORDER 2 -void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, Font& _rFont, sal_uInt16 _nWhich ) +void SwDropCapsPict::GetFontSettings( const SwDropCapsPage& _rPage, vcl::Font& _rFont, sal_uInt16 _nWhich ) { SfxItemSet aSet( _rPage.rSh.GetAttrPool(), _nWhich, _nWhich); _rPage.rSh.GetCurAttr(aSet); @@ -264,7 +264,7 @@ void SwDropCapsPict::UpdatePaintSettings( void ) mnTotLineH = (GetOutputSizePixel().Height() - 2 * BORDER) / LINES; mnLineH = mnTotLineH - 2; - Font aFont; + vcl::Font aFont; if (mpPage) { if (!mpPage->m_pTemplateBox->GetSelectEntryPos()) @@ -380,7 +380,7 @@ void SwDropCapsPict::DrawPrev( const Point& rPt ) Point aPt(rPt); InitPrinter(); - Font aOldFont = mpPrinter->GetFont(); + vcl::Font aOldFont = mpPrinter->GetFont(); sal_uInt16 nScript; size_t nIdx = 0; sal_Int32 nStart; diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index 4444efccbdb5..564ed0aeab88 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -382,7 +382,7 @@ void SwCaptionPreview::Init() SetFillColor( aBack.GetColor() ); SetLineColor( aBack.GetColor() ); SetBorderStyle( WINDOW_BORDER_MONO ); - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); aFont.SetHeight(aFont.GetHeight() * 120 / 100 ); SetFont(aFont); } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index b642e6a5228f..5507ebf11137 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -597,7 +597,7 @@ static void lcl_SetColl(SwWrtShell* pWrtShell, sal_uInt16 nType, SfxPrinter* pPrt, const OUString& rStyle, sal_uInt16 nFontWhich) { - Font aFont( rStyle, Size( 0, 10 ) ); + vcl::Font aFont( rStyle, Size( 0, 10 ) ); if( pPrt ) aFont = pPrt->GetFontMetric( aFont ); SwTxtFmtColl *pColl = pWrtShell->GetTxtCollFromPool(nType); @@ -676,7 +676,7 @@ bool SwStdFontTabPage::FillItemSet( SfxItemSet* ) FONT_GROUP_CJK == nFontGroup ? RES_CHRATR_CJK_FONTSIZE : RES_CHRATR_CTL_FONTSIZE); if(sStandard != sShellStd) { - Font aFont( sStandard, Size( 0, 10 ) ); + vcl::Font aFont( sStandard, Size( 0, 10 ) ); if( pPrinter ) aFont = pPrinter->GetFontMetric( aFont ); pWrtShell->SetDefault(SvxFontItem(aFont.GetFamily(), aFont.GetName(), @@ -2169,11 +2169,11 @@ void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin) SvxFont& rCJKFont = rExampleWin.GetCJKFont(); SvxFont& rCTLFont = rExampleWin.GetCTLFont(); - Font aFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SERIF, eLangType, + vcl::Font aFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SERIF, eLangType, DEFAULTFONT_FLAGS_ONLYONE, &rExampleWin ) ); - Font aCJKFont( OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_TEXT, eLangType, + vcl::Font aCJKFont( OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_TEXT, eLangType, DEFAULTFONT_FLAGS_ONLYONE, &rExampleWin ) ); - Font aCTLFont( OutputDevice::GetDefaultFont( DEFAULTFONT_CTL_TEXT, eLangType, + vcl::Font aCTLFont( OutputDevice::GetDefaultFont( DEFAULTFONT_CTL_TEXT, eLangType, DEFAULTFONT_FLAGS_ONLYONE, &rExampleWin ) ); const Size aDefSize( 0, 12 ); aFont.SetSize( aDefSize ); diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 2e18bf360a19..5c498d4f1b3f 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -204,7 +204,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, if( aOpt.GetFontName().isEmpty() ) { LanguageType eLang = aOpt.GetLanguage(); - Font aTmpFont(OutputDevice::GetDefaultFont(DEFAULTFONT_FIXED, eLang, DEFAULTFONT_FLAGS_ONLYONE, pPrt)); + vcl::Font aTmpFont(OutputDevice::GetDefaultFont(DEFAULTFONT_FIXED, eLang, DEFAULTFONT_FLAGS_ONLYONE, pPrt)); aOpt.SetFontName(aTmpFont.GetName()); } diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index dda067144928..94d61202645a 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -62,7 +62,7 @@ SwLabPreview::SwLabPreview(Window* pParent) const Color& rWinColor = rStyleSettings.GetWindowColor(); SetBackground(Wallpaper(rWinColor)); - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); aFont.SetTransparent(true); aFont.SetWeight (WEIGHT_NORMAL); SetFont(aFont); @@ -106,7 +106,7 @@ void SwLabPreview::Paint(const Rectangle &) const Color& rWinColor = rStyleSettings.GetWindowColor(); const Color& rFieldTextColor = SwViewOption::GetFontColor(); - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); aFont.SetFillColor( rWinColor ); aFont.SetColor(rFieldTextColor); SetFont(aFont); @@ -115,7 +115,7 @@ void SwLabPreview::Paint(const Rectangle &) SetLineColor(rWinColor); SetFillColor(aGrayColor); - Font aPaintFont(GetFont()); + vcl::Font aPaintFont(GetFont()); aPaintFont.SetTransparent(false); SetFont(aPaintFont); diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx index 958748a9051f..df9f54a66968 100644 --- a/sw/source/ui/fldui/inpdlg.cxx +++ b/sw/source/ui/fldui/inpdlg.cxx @@ -46,7 +46,7 @@ SwFldInputDlg::SwFldInputDlg( Window *pParent, SwWrtShell &rS, get(m_pNextBT, "next"); get(m_pOKBT, "ok"); // switch font for Edit - Font aFont(m_pEditED->GetFont()); + vcl::Font aFont(m_pEditED->GetFont()); aFont.SetWeight(WEIGHT_LIGHT); m_pEditED->SetFont(aFont); diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index c9f5bc90a174..5a2c8891a7fb 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -69,7 +69,7 @@ SwJavaEditDialog::SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh) : m_pEditRB->SetClickHdl(aLk); m_pUrlPB->SetClickHdl(LINK(this, SwJavaEditDialog, InsertFileHdl)); - Font aFont( m_pEditED->GetFont() ); + vcl::Font aFont( m_pEditED->GetFont() ); aFont.SetWeight( WEIGHT_LIGHT ); m_pEditED->SetFont( aFont ); diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index c96807725bff..9e9dd470d5b2 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -133,7 +133,7 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl) { m_aFontName = pFontItem->GetFamilyName(); eCharSet = pFontItem->GetCharSet(); - Font aFont( m_aFontName, pFontItem->GetStyleName(), m_pNumberCharEdit->GetFont().GetSize() ); + vcl::Font aFont( m_aFontName, pFontItem->GetStyleName(), m_pNumberCharEdit->GetFont().GetSize() ); aFont.SetCharSet( pFontItem->GetCharSet() ); aFont.SetPitch( pFontItem->GetPitch() ); m_pNumberCharEdit->SetFont( aFont ); @@ -214,7 +214,7 @@ void SwInsFootNoteDlg::Init() { SwFmtFtn aFtnNote; OUString sNumStr; - Font aFont; + vcl::Font aFont; bExtCharAvailable = false; rSh.StartAction(); diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 62df032ad4e7..042e0c8ea1a0 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -847,9 +847,9 @@ static long lcl_DrawBullet(VirtualDevice* pVDev, const SwNumFmt& rFmt, long nXStart, long nYStart, const Size& rSize) { - Font aTmpFont(pVDev->GetFont()); + vcl::Font aTmpFont(pVDev->GetFont()); - Font aFont(*rFmt.GetBulletFont()); + vcl::Font aFont(*rFmt.GetBulletFont()); aFont.SetSize(rSize); aFont.SetTransparent(true); pVDev->SetFont( aFont ); diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 063a37786ac2..981cc7ddbfdf 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -87,14 +87,14 @@ private: void CalcLineMap (); void PaintCells (); - sal_uInt8 GetFormatIndex( size_t nCol, size_t nRow ) const; + sal_uInt8 GetFormatIndex( size_t nCol, size_t nRow ) const; const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const; void DrawString( size_t nCol, size_t nRow ); void DrawStrings(); void DrawBackground(); - void MakeFonts ( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ); + void MakeFonts( sal_uInt8 nIndex, vcl::Font& rFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ); }; class SwStringInputDlg : public ModalDialog @@ -537,7 +537,7 @@ AutoFmtPreview::~AutoFmtPreview() } static void lcl_SetFontProperties( - Font& rFont, + vcl::Font& rFont, const SvxFontItem& rFontItem, const SvxWeightItem& rWeightItem, const SvxPostureItem& rPostureItem ) @@ -556,7 +556,7 @@ rFont.MethodName( Value ); \ rCJKFont.MethodName( Value ); \ rCTLFont.MethodName( Value ); -void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, Font& rCTLFont ) +void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, vcl::Font& rFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ) { const SwBoxAutoFmt& rBoxFmt = aCurData.GetBoxFmt( nIndex ); @@ -670,7 +670,7 @@ MAKENUMSTR: cellRect.GetHeight() - FRAME_OFFSET ); if( aCurData.IsFont() ) { - Font aFont, aCJKFont, aCTLFont; + vcl::Font aFont, aCJKFont, aCTLFont; MakeFonts( nFmtIndex, aFont, aCJKFont, aCTLFont ); aScriptedText.SetFonts( &aFont, &aCJKFont, &aCTLFont ); } @@ -855,7 +855,7 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ ) Point aCenterPos; Size theWndSize = GetSizePixel(); Color oldColor; - Font aFont; + vcl::Font aFont; aFont = aVD.GetFont(); aFont.SetTransparent( true ); diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index a04d1ff949c0..04013c7ac4a2 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -182,7 +182,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) { sEntry = pStdFont->GetFontFor(nFontId); - Font aFont( sEntry, Size( 0, 10 ) ); + vcl::Font aFont( sEntry, Size( 0, 10 ) ); if( pPrt ) { aFont = pPrt->GetFontMetric( aFont ); @@ -201,7 +201,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) eLanguage = eUiLanguage; } - Font aLangDefFont = OutputDevice::GetDefaultFont( + vcl::Font aLangDefFont = OutputDevice::GetDefaultFont( nFontTypes[i], eLanguage, DEFAULTFONT_FLAGS_ONLYONE ); @@ -264,7 +264,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) { sEntry = pStdFont->GetFontFor(aFontIdPoolId[nIdx]); - Font aFont( sEntry, Size( 0, 10 ) ); + vcl::Font aFont( sEntry, Size( 0, 10 ) ); if( pPrt ) aFont = pPrt->GetFontMetric( aFont ); diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx index 20ebfdec70c4..7fbd5270f209 100644 --- a/sw/source/uibase/config/fontcfg.cxx +++ b/sw/source/uibase/config/fontcfg.cxx @@ -253,7 +253,7 @@ OUString SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLan default: nFontId = DEFAULTFONT_LATIN_TEXT; } - Font aFont = OutputDevice::GetDefaultFont(nFontId, eLang, DEFAULTFONT_FLAGS_ONLYONE); + vcl::Font aFont = OutputDevice::GetDefaultFont(nFontId, eLang, DEFAULTFONT_FLAGS_ONLYONE); return aFont.GetName(); } diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index f6ea5cfecf44..5daedfaeb299 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -370,7 +370,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, if( !aName.isEmpty() ) { - Font aFont( static_cast<FontFamily>(nFamily), Size( nWidth, nHeight ) ); + vcl::Font aFont( static_cast<FontFamily>(nFamily), Size( nWidth, nHeight ) ); aFont.SetName( aName ); aFont.SetCharSet( (rtl_TextEncoding)nCharSet ); aFont.SetPitch( (FontPitch)nPitch ); @@ -451,7 +451,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0; short nWidth = 0, nHeight = 0; - const Font* pFnt = aFmt.GetBulletFont(); + const vcl::Font* pFnt = aFmt.GetBulletFont(); if( pFnt ) { aName = pFnt->GetName(); diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 88f702afcadd..6f769d4d3233 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -312,7 +312,7 @@ void SwAddressPreview::Paint(const Rectangle&) DrawRect( Rectangle(Point(0, 0), GetOutputSizePixel()) ); Color aPaintColor(IsEnabled() ? rSettings.GetWindowTextColor() : rSettings.GetDisableColor()); SetLineColor(aPaintColor); - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); aFont.SetColor(aPaintColor); SetFont(aFont); diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx index a7ba9954ba3d..f34325a82518 100644 --- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx +++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx @@ -152,8 +152,8 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ ) if ( mrSidebarWin.IsPreview() ) { - Font aOldFont( mrSidebarWin.GetFont() ); - Font aFont(aOldFont); + vcl::Font aOldFont( mrSidebarWin.GetFont() ); + vcl::Font aFont(aOldFont); Color aCol( COL_BLACK); aFont.SetColor( aCol ); aFont.SetHeight(200); diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 6bb20f076d42..818d5e8342d8 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -136,7 +136,7 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag m_aFadeTimer( ) { // Get the font and configure it - Font aFont = GetSettings().GetStyleSettings().GetToolFont(); + vcl::Font aFont = GetSettings().GetStyleSettings().GetToolFont(); SetZoomedPointFont( aFont ); // Use pixels for the rest of the drawing diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index a284a7918d6f..454eb71815e9 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -240,11 +240,11 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s if (mpMetadataAuthor->IsVisible()) { - Font aOrigFont(mpMetadataAuthor->GetControlFont()); + vcl::Font aOrigFont(mpMetadataAuthor->GetControlFont()); Size aSize(PixelToLogic(mpMetadataAuthor->GetSizePixel())); Point aPos(PixelToLogic(mpMetadataAuthor->GetPosPixel())); aPos += rPt; - Font aFont( mpMetadataAuthor->GetSettings().GetStyleSettings().GetFieldFont() ); + vcl::Font aFont( mpMetadataAuthor->GetSettings().GetStyleSettings().GetFieldFont() ); mpMetadataAuthor->SetControlFont( aFont ); mpMetadataAuthor->Draw(pDev, aPos, aSize, nInFlags); mpMetadataAuthor->SetControlFont( aOrigFont ); @@ -252,11 +252,11 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s if (mpMetadataDate->IsVisible()) { - Font aOrigFont(mpMetadataDate->GetControlFont()); + vcl::Font aOrigFont(mpMetadataDate->GetControlFont()); Size aSize(PixelToLogic(mpMetadataDate->GetSizePixel())); Point aPos(PixelToLogic(mpMetadataDate->GetPosPixel())); aPos += rPt; - Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); + vcl::Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); mpMetadataDate->SetControlFont( aFont ); mpMetadataDate->Draw(pDev, aPos, aSize, nInFlags); mpMetadataDate->SetControlFont( aOrigFont ); @@ -277,7 +277,7 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s if (mpVScrollbar->IsVisible()) { - Font aOrigFont(mpMetadataDate->GetControlFont()); + vcl::Font aOrigFont(mpMetadataDate->GetControlFont()); Color aOrigBg( mpMetadataDate->GetControlBackground() ); OUString sOrigText(mpMetadataDate->GetText()); @@ -285,7 +285,7 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s Point aPos(PixelToLogic(mpMenuButton->GetPosPixel())); aPos += rPt; - Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); + vcl::Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); mpMetadataDate->SetControlFont( aFont ); mpMetadataDate->SetControlBackground( 0xFFFFFF ); mpMetadataDate->SetText("..."); @@ -369,7 +369,7 @@ void SwSidebarWin::InitControls() { AllSettings aSettings = mpMetadataAuthor->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); - Font aFont = aStyleSettings.GetFieldFont(); + vcl::Font aFont = aStyleSettings.GetFieldFont(); aFont.SetHeight(8); aStyleSettings.SetFieldFont(aFont); aSettings.SetStyleSettings(aStyleSettings); @@ -388,7 +388,7 @@ void SwSidebarWin::InitControls() { AllSettings aSettings = mpMetadataDate->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); - Font aFont = aStyleSettings.GetFieldFont(); + vcl::Font aFont = aStyleSettings.GetFieldFont(); aFont.SetHeight(8); aStyleSettings.SetFieldFont(aFont); aSettings.SetStyleSettings(aStyleSettings); @@ -506,7 +506,7 @@ void SwSidebarWin::Rescale() mpSidebarTxtControl->SetMapMode( aMode ); if ( mpMetadataAuthor ) { - Font aFont( mpMetadataAuthor->GetSettings().GetStyleSettings().GetFieldFont() ); + vcl::Font aFont( mpMetadataAuthor->GetSettings().GetStyleSettings().GetFieldFont() ); sal_Int32 nHeight = aFont.GetHeight(); nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator(); aFont.SetHeight( nHeight ); @@ -514,7 +514,7 @@ void SwSidebarWin::Rescale() } if ( mpMetadataDate ) { - Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); + vcl::Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() ); sal_Int32 nHeight = aFont.GetHeight(); nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator(); aFont.SetHeight( nHeight ); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index debc067ebbb3..21fb6c8be67a 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5003,7 +5003,7 @@ SwEditWin::SwEditWin(Window *pParent, SwView &rMyView): // insert position at every curor movement! if( !rMyView.GetDocShell()->IsReadOnly() ) { - Font aFont; + vcl::Font aFont; SetInputContext( InputContext( aFont, INPUTCONTEXT_TEXT | INPUTCONTEXT_EXTTEXTINPUT ) ); } diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 6a97983a234b..f8c3fc33e418 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -374,7 +374,7 @@ void TextViewOutWin::DataChanged( const DataChangedEvent& rDCEvt ) { const Color &rCol = GetSettings().GetStyleSettings().GetWindowColor(); SetBackground( rCol ); - Font aFont( pTextView->GetTextEngine()->GetFont() ); + vcl::Font aFont( pTextView->GetTextEngine()->GetFont() ); aFont.SetFillColor( rCol ); pTextView->GetTextEngine()->SetFont( aFont ); } @@ -505,7 +505,7 @@ void SwSrcEditWindow::CreateTextEngine() pTextEngine->SetUpdateMode( false ); pTextEngine->InsertView( pTextView ); - Font aFont; + vcl::Font aFont; aFont.SetTransparent( false ); aFont.SetFillColor( rCol ); SetPointFont( aFont ); @@ -956,7 +956,7 @@ void SwSrcEditWindow::SetFont() { LANGUAGE_SYSTEM, LANGUAGE_SYSTEM, LANGUAGE_SYSTEM, LANGUAGE_SYSTEM, LANGUAGE_SYSTEM }; - Font aFont; + vcl::Font aFont; if(lcl_GetLanguagesForEncoding(eSourceEncoding, aLanguages)) { //TODO: check for multiple languages @@ -972,8 +972,8 @@ void SwSrcEditWindow::SetFont() const FontList* pList = pFontListItem->GetFontList(); vcl::FontInfo aInfo = pList->Get(sFontName,WEIGHT_NORMAL, ITALIC_NONE); - const Font& rFont = GetTextEngine()->GetFont(); - Font aFont(aInfo); + const vcl::Font& rFont = GetTextEngine()->GetFont(); + vcl::Font aFont(aInfo); Size aSize(rFont.GetSize()); //font height is stored in point and set in twip aSize.Height() = diff --git a/sw/source/uibase/inc/numprevw.hxx b/sw/source/uibase/inc/numprevw.hxx index f70b9bc1cb9a..cf1ef8d1e5a6 100644 --- a/sw/source/uibase/inc/numprevw.hxx +++ b/sw/source/uibase/inc/numprevw.hxx @@ -28,11 +28,11 @@ namespace rtl { class OUString; } class NumberingPreview : public Window { const SwNumRule* pActNum; - Font aStdFont; + vcl::Font aStdFont; long nPageWidth; const OUString* pOutlineNames; bool bPosition; - sal_uInt16 nActLevel; + sal_uInt16 nActLevel; protected: virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/view.hxx b/sw/source/uibase/inc/view.hxx index 627b02292d80..efbbc74b606c 100644 --- a/sw/source/uibase/inc/view.hxx +++ b/sw/source/uibase/inc/view.hxx @@ -318,7 +318,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SAL_DLLPRIVATE void StartThesaurus(); // text conversion - SAL_DLLPRIVATE void StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ); + SAL_DLLPRIVATE void StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ); // used for spell checking and text conversion SAL_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, bool bStartDone, diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index 7bc308468315..bdd6c4aa3b02 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -85,7 +85,7 @@ SwHHCWrapper::SwHHCWrapper( const uno::Reference< uno::XComponentContext >& rxContext, LanguageType nSourceLanguage, LanguageType nTargetLanguage, - const Font *pTargetFont, + const vcl::Font *pTargetFont, sal_Int32 nConvOptions, bool bIsInteractive, bool bStart, bool bOther, bool bSelection ) @@ -148,7 +148,7 @@ SwHHCWrapper::~SwHHCWrapper() //!! Note: This also effects the default language of text boxes (EditEngine/EditView) !! pDoc->SetDefault( SvxLanguageItem( nTargetLang, RES_CHRATR_CJK_LANGUAGE ) ); - const Font *pFont = GetTargetFont(); + const vcl::Font *pFont = GetTargetFont(); if (pFont) { SvxFontItem aFontItem( pFont->GetFamily(), pFont->GetName(), @@ -499,7 +499,7 @@ void SwHHCWrapper::ReplaceUnit( aSet.Put( SvxLanguageItem( *pNewUnitLanguage, RES_CHRATR_CJK_LANGUAGE ) ); } - const Font *pTargetFont = GetTargetFont(); + const vcl::Font *pTargetFont = GetTargetFont(); OSL_ENSURE( pTargetFont, "target font missing?" ); if (pTargetFont && pNewUnitLanguage) { diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx index 0e801238545d..007218a213d5 100644 --- a/sw/source/uibase/lingu/sdrhhcwrap.cxx +++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx @@ -50,7 +50,7 @@ using namespace ::com::sun::star; SdrHHCWrapper::SdrHHCWrapper( SwView* pVw, LanguageType nSourceLanguage, LanguageType nTargetLanguage, - const Font* pTargetFnt, + const vcl::Font* pTargetFnt, sal_Int32 nConvOptions, bool bInteractive ) : SdrOutliner(pVw->GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()-> diff --git a/sw/source/uibase/lingu/sdrhhcwrap.hxx b/sw/source/uibase/lingu/sdrhhcwrap.hxx index 5c977da8966b..88f4ed742431 100644 --- a/sw/source/uibase/lingu/sdrhhcwrap.hxx +++ b/sw/source/uibase/lingu/sdrhhcwrap.hxx @@ -36,13 +36,13 @@ class SdrHHCWrapper : public SdrOutliner sal_uInt16 nDocIndex; LanguageType nSourceLang; LanguageType nTargetLang; - const Font* pTargetFont; + const vcl::Font* pTargetFont; bool bIsInteractive; public: SdrHHCWrapper( SwView* pVw, LanguageType nSourceLanguage, LanguageType nTargetLanguage, - const Font* pTargetFnt, + const vcl::Font* pTargetFnt, sal_Int32 nConvOptions, bool bInteractive ); virtual ~SdrHHCWrapper(); diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 29016e619d9a..65c25cc0fa3b 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -1279,7 +1279,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq) if( !bCommonTerms ) nOptions = nOptions | i18n::TextConversionOption::CHARACTER_BY_CHARACTER; - Font aTargetFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_TEXT, + vcl::Font aTargetFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_TEXT, nTargetLang, DEFAULTFONT_FLAGS_ONLYONE ); pOLV->StartTextConversion( nSourceLang, nTargetLang, &aTargetFont, nOptions, false, false ); @@ -1671,7 +1671,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq) sFontName = aSetDlgFont.GetFamilyName(); } - Font aFont(sFontName, Size(1,1)); + vcl::Font aFont(sFontName, Size(1,1)); if( sSym.isEmpty() ) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index d531e7209acb..91d9c7e9ec88 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2099,7 +2099,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet ) // Set input context of the SwEditWin according to the selected font and script type if(RES_CHRATR_FONT == nWhich) { - Font aFont; + vcl::Font aFont; if(pI && pI->ISA(SvxFontItem)) { aFont.SetName( ((const SvxFontItem*)pI)->GetFamilyName()); diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx index 3088248459e8..fd6dff6ffa5f 100644 --- a/sw/source/uibase/shells/drwtxtsh.cxx +++ b/sw/source/uibase/shells/drwtxtsh.cxx @@ -355,7 +355,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest &rReq) if(!bCommonTerms) nOptions = nOptions | i18n::TextConversionOption::CHARACTER_BY_CHARACTER; - Font aTargetFont = OutputDevice::GetDefaultFont(DEFAULTFONT_CJK_TEXT, nTargetLang, DEFAULTFONT_FLAGS_ONLYONE); + vcl::Font aTargetFont = OutputDevice::GetDefaultFont(DEFAULTFONT_CJK_TEXT, nTargetLang, DEFAULTFONT_FLAGS_ONLYONE); pOutlinerView->StartTextConversion(nSourceLang, nTargetLang, &aTargetFont, nOptions, false, false); } @@ -724,7 +724,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) sFontName = aSetDlgFont.GetFamilyName(); } - Font aFont(sFontName, Size(1,1)); + vcl::Font aFont(sFontName, Size(1,1)); if(sSym.isEmpty()) { SfxAllItemSet aAllSet( GetPool() ); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 2a8210002f33..3ffbba4a9253 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -1004,7 +1004,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq ) aFontName = aFont.GetFamilyName(); } - Font aNewFont(aFontName, Size(1,1)); // Size only because CTOR. + vcl::Font aNewFont(aFontName, Size(1,1)); // Size only because CTOR. if( aChars.isEmpty() ) { // Set selected font as default. diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index af86372e7e39..0743753b7440 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -136,11 +136,11 @@ static void lcl_PrintHeader( OutputDevice &rOutDev, sal_Int32 nPages, sal_Int32 short nBorder = BORDERPRN; Color aOldFillColor( rOutDev.GetFillColor() ); - Font aOldFont( rOutDev.GetFont() ); + vcl::Font aOldFont( rOutDev.GetFont() ); rOutDev.SetFillColor( Color(COL_TRANSPARENT) ); - Font aFont( aOldFont ); + vcl::Font aFont( aOldFont ); aFont.SetWeight( WEIGHT_BOLD ); aFont.SetAlign( ALIGN_BOTTOM ); rOutDev.SetFont( aFont ); @@ -704,7 +704,7 @@ sal_Int32 SwSrcView::PrintSource( TextEngine* pTextEngine = aEditWin.GetTextEngine(); pOutDev->SetMapMode( MAP_100TH_MM ); - Font aFont( aEditWin.GetOutWin()->GetFont() ); + vcl::Font aFont( aEditWin.GetOutWin()->GetFont() ); Size aSize( aFont.GetSize() ); aSize = aEditWin.GetOutWin()->PixelToLogic( aSize, MAP_100TH_MM ); aFont.SetSize( aSize ); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 42653d05a59b..68ff90b860c3 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -164,7 +164,7 @@ void SwView::ExecLingu(SfxRequest &rReq) if( !bCommonTerms ) nOptions = nOptions | i18n::TextConversionOption::CHARACTER_BY_CHARACTER; - Font aTargetFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_TEXT, + vcl::Font aTargetFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_TEXT, nTargetLang, DEFAULTFONT_FLAGS_ONLYONE ); // disallow formatting, updating the view, ... while @@ -223,7 +223,7 @@ void SwView::ExecLingu(SfxRequest &rReq) void SwView::StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, - const Font *pTargetFont, + const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive ) { diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 87bf12066949..2019065ac48e 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3447,8 +3447,8 @@ void SwContentLBoxString::Paint( if(lcl_IsContent(pEntry) && ((SwContent *)pEntry->GetUserData())->IsInvisible()) { - Font aOldFont( rDev.GetFont()); - Font aFont(aOldFont); + vcl::Font aOldFont( rDev.GetFont()); + vcl::Font aFont(aOldFont); Color aCol( COL_LIGHTGRAY ); aFont.SetColor( aCol ); rDev.SetFont( aFont ); diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 994cd538afdb..ba20939edcb3 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1232,8 +1232,8 @@ void SwLBoxString::Paint( if(pCont->GetType() == GLBLDOC_SECTION && !(pCont->GetSection())->IsConnectFlag() ) { - Font aOldFont( rDev.GetFont()); - Font aFont(aOldFont); + vcl::Font aOldFont( rDev.GetFont()); + vcl::Font aFont(aOldFont); Color aCol( COL_LIGHTRED ); aFont.SetColor( aCol ); rDev.SetFont( aFont ); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index d6f60cd96530..a28a3646b3b4 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -802,7 +802,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aGlobalToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) ); aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, true); - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); aFont.SetWeight(WEIGHT_NORMAL); GetPageEdit().SetFont(aFont); aFont = aContentTree.GetFont(); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 1284f10a9d7a..905733694300 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1160,7 +1160,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) // #i63395# Only apply user defined default bullet font if ( numfunc::IsDefBulletFontUserDefined() ) { - const Font* pFnt = &numfunc::GetDefBulletFont(); + const vcl::Font* pFnt = &numfunc::GetDefBulletFont(); aFmt.SetBulletFont( pFnt ); } aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<sal_uInt8>(nLevel))); @@ -1187,7 +1187,7 @@ void SwWrtShell::NumOrBulletOn(bool bNum) SwDocShell* pDocSh = GetView().GetDocShell(); // #i63395# // Only apply user defined default bullet font - const Font* pFnt = numfunc::IsDefBulletFontUserDefined() + const vcl::Font* pFnt = numfunc::IsDefBulletFontUserDefined() ? &numfunc::GetDefBulletFont() : 0; diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx index e76eb028f95a..ca81b559d32b 100644 --- a/test/source/mtfxmldump.cxx +++ b/test/source/mtfxmldump.cxx @@ -346,7 +346,7 @@ void MetafileXmlDump::writeXml(GDIMetaFile& rMetaFile, XmlWriter& rWriter) MetaFontAction* pMetaFontAction = static_cast<MetaFontAction*>(pAction); rWriter.startElement(sCurrentElementTag); - Font aFont = pMetaFontAction->GetFont(); + vcl::Font aFont = pMetaFontAction->GetFont(); rWriter.attribute("color", convertColorToString(aFont.GetColor())); rWriter.attribute("fillcolor", convertColorToString(aFont.GetFillColor())); 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(); diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index ce7d3775c4b4..32713a5a174f 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -157,7 +157,7 @@ void MacroWarning::InitControls() mpSymbolImg->SetImage( aImg ); mpSymbolImg->SetSizePixel( aImg.GetSizePixel() ); // set bold font and path ellipsis for docname fixedtext - Font aTmpFont = mpDocNameFI->GetControlFont(); + vcl::Font aTmpFont = mpDocNameFI->GetControlFont(); aTmpFont.SetWeight( WEIGHT_BOLD ); mpDocNameFI->SetControlFont( aTmpFont ); WinBits nStyle = mpDocNameFI->GetStyle(); diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx index d69e65b1f1b0..deafb418ad4c 100644 --- a/vcl/inc/impfont.hxx +++ b/vcl/inc/impfont.hxx @@ -48,7 +48,7 @@ public: FontWidth GetWidthType() { if(meWidthType==WIDTH_DONTKNOW)AskConfig(); return meWidthType; } private: - friend class Font; + friend class vcl::Font; void AskConfig(); FontRefCount mnRefCount; diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h index dcde57c09ee9..c878d8b2590d 100644 --- a/vcl/inc/outdev.h +++ b/vcl/inc/outdev.h @@ -30,7 +30,7 @@ #include "PhysicalFontFace.hxx" class Size; -class Font; +namespace vcl { class Font; } class VirtualDevice; class ImplGetDevFontList; class GetDevSizeList; @@ -148,7 +148,7 @@ public: ~ImplFontCache(); ImplFontEntry* GetFontEntry( PhysicalFontCollection*, - const Font&, const Size& rPixelSize, float fExactHeight); + const vcl::Font&, const Size& rPixelSize, float fExactHeight); ImplFontEntry* GetFontEntry( PhysicalFontCollection*, FontSelectPattern& ); ImplFontEntry* GetGlyphFallbackFont( PhysicalFontCollection*, FontSelectPattern&, int nFallbackLevel, OUString& rMissingCodes ); diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx index 2fa0862f2034..16a5fdf80410 100644 --- a/vcl/inc/outfont.hxx +++ b/vcl/inc/outfont.hxx @@ -38,7 +38,7 @@ class ImplFontEntry; class ImplPreMatchFontSubstitution; class ImplGlyphFallbackFontSubstitution; class FontSelectPattern; -class Font; +namespace vcl { class Font; } class ConvertChar; struct FontMatchStatus; class OutputDevice; @@ -112,7 +112,7 @@ public: // TODO: hide members behind accessor methods class FontSelectPatternAttributes : public ImplFontAttributes { public: - FontSelectPatternAttributes( const Font&, const OUString& rSearchName, + FontSelectPatternAttributes( const vcl::Font&, const OUString& rSearchName, const Size&, float fExactHeight ); #ifdef WNT FontSelectPatternAttributes( const PhysicalFontFace&, const Size&, @@ -144,7 +144,7 @@ public: class FontSelectPattern : public FontSelectPatternAttributes { public: - FontSelectPattern( const Font&, const OUString& rSearchName, + FontSelectPattern( const vcl::Font&, const OUString& rSearchName, const Size&, float fExactHeight ); #ifdef WNT // ifdeffed to prevent it going into unusedcode.easy diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx index f0c5e332839c..d047fc54a857 100644 --- a/vcl/inc/win/saldata.hxx +++ b/vcl/inc/win/saldata.hxx @@ -36,7 +36,7 @@ class WinSalObject; class WinSalFrame; class WinSalVirtualDevice; class WinSalPrinter; -class Font; +namespace vcl { class Font; } struct HDCCache; struct TempFontItem; @@ -195,7 +195,7 @@ WinSalObject* ImplFindSalObject( HWND hWndChild ); bool ImplSalPreDispatchMsg( MSG* pMsg ); void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult ); -void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont ); +void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, vcl::Font& rFont ); rtl_TextEncoding ImplSalGetSystemEncoding(); OUString ImplSalGetUniString(const sal_Char* pStr, sal_Int32 nLen = -1); diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 3411ee9fbc25..5ab5cc1b57bf 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -233,7 +233,7 @@ public: Pointer maPointer; Fraction maZoom; OUString maText; - Font* mpControlFont; + vcl::Font* mpControlFont; Color maControlForeground; Color maControlBackground; sal_Int32 mnLeftBorder; diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 662445cea13d..9e00d4054b45 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -1131,9 +1131,9 @@ static Color getColor( NSColor* pSysColor, const Color& rDefault, NSWindow* pWin return aRet; } -static Font getFont( NSFont* pFont, long nDPIY, const Font& rDefault ) +static vcl::Font getFont( NSFont* pFont, long nDPIY, const vcl::Font& rDefault ) { - Font aResult( rDefault ); + vcl::Font aResult( rDefault ); if( pFont ) { aResult.SetName( GetOUString( [pFont familyName] ) ); @@ -1188,7 +1188,7 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetShadowColor( aShadowColor ); // get the system font settings - Font aAppFont = aStyleSettings.GetAppFont(); + vcl::Font aAppFont = aStyleSettings.GetAppFont(); sal_Int32 nDPIX = 72, nDPIY = 72; getResolution( nDPIX, nDPIY ); aAppFont = getFont( [NSFont systemFontOfSize: 0], nDPIY, aAppFont ); @@ -1200,16 +1200,16 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetHelpFont( aAppFont ); aStyleSettings.SetPushButtonFont( aAppFont ); - Font aTitleFont( getFont( [NSFont titleBarFontOfSize: 0], nDPIY, aAppFont ) ); + vcl::Font aTitleFont( getFont( [NSFont titleBarFontOfSize: 0], nDPIY, aAppFont ) ); aStyleSettings.SetTitleFont( aTitleFont ); aStyleSettings.SetFloatTitleFont( aTitleFont ); - Font aMenuFont( getFont( [NSFont menuFontOfSize: 0], nDPIY, aAppFont ) ); + vcl::Font aMenuFont( getFont( [NSFont menuFontOfSize: 0], nDPIY, aAppFont ) ); aStyleSettings.SetMenuFont( aMenuFont ); aStyleSettings.SetToolFont( aAppFont ); - Font aLabelFont( getFont( [NSFont labelFontOfSize: 0], nDPIY, aAppFont ) ); + vcl::Font aLabelFont( getFont( [NSFont labelFontOfSize: 0], nDPIY, aAppFont ) ); aStyleSettings.SetLabelFont( aLabelFont ); aStyleSettings.SetInfoFont( aLabelFont ); aStyleSettings.SetRadioCheckFont( aLabelFont ); diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index 3f03d620e377..ed5cb45ccc33 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -48,7 +48,7 @@ void VclComplexTextTest::testArabic() OutputDevice *pOutDev = static_cast< OutputDevice * >( pWin ); - Font aFont = OutputDevice::GetDefaultFont( + vcl::Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CTL_SPREADSHEET, LANGUAGE_ARABIC_SAUDI_ARABIA, DEFAULTFONT_FLAGS_ONLYONE, 0 ); @@ -59,7 +59,7 @@ void VclComplexTextTest::testArabic() Rectangle aRect = pOutDev->GetTextRect( aInput, aOneTwoThree ); // now rotate 270 degress - Font aRotated( aFont ); + vcl::Font aRotated( aFont ); aRotated.SetOrientation( 2700 ); pOutDev->SetFont( aRotated ); Rectangle aRectRot = pOutDev->GetTextRect( aInput, aOneTwoThree ); diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index fd65cab51c78..7b99b224ed6c 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -338,7 +338,7 @@ IMPL_LINK( DbgDialog, ClickHdl, Button*, pButton ) { AllSettings aSettings = Application::GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); - Font aFont = aStyleSettings.GetAppFont(); + vcl::Font aFont = aStyleSettings.GetAppFont(); if ( maBoldAppFont.IsChecked() ) aFont.SetWeight( WEIGHT_BOLD ); else @@ -387,7 +387,7 @@ DbgInfoDialog::DbgInfoDialog( Window* pParent, bool bHelpText ) : if ( !bHelpText ) { - Font aFont = GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_ENGLISH_US, 0 ); + vcl::Font aFont = GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_ENGLISH_US, 0 ); aFont.SetHeight( 8 ); aFont.SetPitch( PITCH_FIXED ); maListBox.SetControlFont( aFont ); diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 8758bf768bd4..184c3f1db0eb 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -134,19 +134,19 @@ struct ImplStyleData Color maWorkspaceColor; Color maActiveTabColor; Color maInactiveTabColor; - Font maAppFont; - Font maHelpFont; - Font maTitleFont; - Font maFloatTitleFont; - Font maMenuFont; - Font maToolFont; - Font maLabelFont; - Font maInfoFont; - Font maRadioCheckFont; - Font maPushButtonFont; - Font maFieldFont; - Font maIconFont; - Font maGroupFont; + vcl::Font maAppFont; + vcl::Font maHelpFont; + vcl::Font maTitleFont; + vcl::Font maFloatTitleFont; + vcl::Font maMenuFont; + vcl::Font maToolFont; + vcl::Font maLabelFont; + vcl::Font maInfoFont; + vcl::Font maRadioCheckFont; + vcl::Font maPushButtonFont; + vcl::Font maFieldFont; + vcl::Font maIconFont; + vcl::Font maGroupFont; long mnBorderSize; long mnTitleHeight; long mnFloatTitleHeight; @@ -673,7 +673,7 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) : void ImplStyleData::SetStandardStyles() { - Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) ); + vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) ); aStdFont.SetCharSet( osl_getThreadTextEncoding() ); aStdFont.SetWeight( WEIGHT_NORMAL ); aStdFont.SetName( utl::DefaultFontConfiguration::get().getUserInterfaceFont( LanguageTag("en")) ); @@ -1508,169 +1508,169 @@ StyleSettings::GetCairoFontOptions() const } void -StyleSettings::SetAppFont( const Font& rFont ) +StyleSettings::SetAppFont( const vcl::Font& rFont ) { CopyData(); mpData->maAppFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetAppFont() const { return mpData->maAppFont; } void -StyleSettings::SetHelpFont( const Font& rFont ) +StyleSettings::SetHelpFont( const vcl::Font& rFont ) { CopyData(); mpData->maHelpFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetHelpFont() const { return mpData->maHelpFont; } void -StyleSettings::SetTitleFont( const Font& rFont ) +StyleSettings::SetTitleFont( const vcl::Font& rFont ) { CopyData(); mpData->maTitleFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetTitleFont() const { return mpData->maTitleFont; } void -StyleSettings::SetFloatTitleFont( const Font& rFont ) +StyleSettings::SetFloatTitleFont( const vcl::Font& rFont ) { CopyData(); mpData->maFloatTitleFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetFloatTitleFont() const { return mpData->maFloatTitleFont; } void -StyleSettings::SetMenuFont( const Font& rFont ) +StyleSettings::SetMenuFont( const vcl::Font& rFont ) { CopyData(); mpData->maMenuFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetMenuFont() const { return mpData->maMenuFont; } void -StyleSettings::SetToolFont( const Font& rFont ) +StyleSettings::SetToolFont( const vcl::Font& rFont ) { CopyData(); mpData->maToolFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetToolFont() const { return mpData->maToolFont; } void -StyleSettings::SetGroupFont( const Font& rFont ) +StyleSettings::SetGroupFont( const vcl::Font& rFont ) { CopyData(); mpData->maGroupFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetGroupFont() const { return mpData->maGroupFont; } void -StyleSettings::SetLabelFont( const Font& rFont ) +StyleSettings::SetLabelFont( const vcl::Font& rFont ) { CopyData(); mpData->maLabelFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetLabelFont() const { return mpData->maLabelFont; } void -StyleSettings::SetInfoFont( const Font& rFont ) +StyleSettings::SetInfoFont( const vcl::Font& rFont ) { CopyData(); mpData->maInfoFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetInfoFont() const { return mpData->maInfoFont; } void -StyleSettings::SetRadioCheckFont( const Font& rFont ) +StyleSettings::SetRadioCheckFont( const vcl::Font& rFont ) { CopyData(); mpData->maRadioCheckFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetRadioCheckFont() const { return mpData->maRadioCheckFont; } void -StyleSettings::SetPushButtonFont( const Font& rFont ) +StyleSettings::SetPushButtonFont( const vcl::Font& rFont ) { CopyData(); mpData->maPushButtonFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetPushButtonFont() const { return mpData->maPushButtonFont; } void -StyleSettings::SetFieldFont( const Font& rFont ) +StyleSettings::SetFieldFont( const vcl::Font& rFont ) { CopyData(); mpData->maFieldFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetFieldFont() const { return mpData->maFieldFont; } void -StyleSettings::SetIconFont( const Font& rFont ) +StyleSettings::SetIconFont( const vcl::Font& rFont ) { CopyData(); mpData->maIconFont = rFont; } -const Font& +const vcl::Font& StyleSettings::GetIconFont() const { return mpData->maIconFont; diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 0cbc46548223..bfc7fd26976a 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -635,7 +635,7 @@ WinBits PushButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) return nStyle; } -const Font& PushButton::GetCanonicalFont( const StyleSettings& _rStyle ) const +const vcl::Font& PushButton::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetPushButtonFont(); } @@ -1322,7 +1322,7 @@ void PushButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); Rectangle aRect( aPos, aSize ); - Font aFont = GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDrawPixelFont( pDev ); pDev->Push(); pDev->SetMapMode(); @@ -1801,7 +1801,7 @@ WinBits RadioButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) return nStyle; } -const Font& RadioButton::GetCanonicalFont( const StyleSettings& _rStyle ) const +const vcl::Font& RadioButton::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetRadioCheckFont(); } @@ -2419,7 +2419,7 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize Size aImageSize = pDev->LogicToPixel( Size( 300, 300 ), aResMapMode ); Size aBrd1Size = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode ); Size aBrd2Size = pDev->LogicToPixel( Size( 60, 60 ), aResMapMode ); - Font aFont = GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDrawPixelFont( pDev ); Rectangle aStateRect; Rectangle aMouseRect; @@ -2914,7 +2914,7 @@ WinBits CheckBox::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) return nStyle; } -const Font& CheckBox::GetCanonicalFont( const StyleSettings& _rStyle ) const +const vcl::Font& CheckBox::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetRadioCheckFont(); } @@ -3300,7 +3300,7 @@ void CheckBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Size aBrd1Size = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode ); Size aBrd2Size = pDev->LogicToPixel( Size( 30, 30 ), aResMapMode ); long nCheckWidth = pDev->LogicToPixel( Size( 20, 20 ), aResMapMode ).Width(); - Font aFont = GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDrawPixelFont( pDev ); Rectangle aStateRect; Rectangle aMouseRect; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 93d6c295dc07..be4c071c5ea6 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1125,7 +1125,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, s Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Font aFont = mpImplLB->GetMainWindow().GetDrawPixelFont( pDev ); + vcl::Font aFont = mpImplLB->GetMainWindow().GetDrawPixelFont( pDev ); OutDevType eOutDevType = pDev->GetOutDevType(); pDev->Push(); diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 8c5ac2e0dd37..83a977d00fb6 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -394,7 +394,7 @@ OutputDevice* Control::GetReferenceDevice() const return mpControlData->mpReferenceDevice; } -const Font& Control::GetCanonicalFont( const StyleSettings& _rStyle ) const +const vcl::Font& Control::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetLabelFont(); } diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 404a0a00d2de..8be4dc8be560 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -386,7 +386,7 @@ void Edit::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) if ( bFont ) { - Font aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); @@ -654,7 +654,7 @@ void Edit::ImplRepaint(bool bLayout) aClip.Intersect(aRegion); if( !aClip.IsEmpty() && nAttr ) { - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); if ( nAttr & EXTTEXTINPUT_ATTR_UNDERLINE ) aFont.SetUnderline( UNDERLINE_SINGLE ); else if ( nAttr & EXTTEXTINPUT_ATTR_BOLDUNDERLINE ) @@ -1775,7 +1775,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_u Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Font aFont = GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDrawPixelFont( pDev ); OutDevType eOutDevType = pDev->GetOutDevType(); pDev->Push(); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 35f6dab6d574..8d6cb0f8c9a6 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -94,7 +94,7 @@ WinBits FixedText::ImplInitStyle( WinBits nStyle ) return nStyle; } -const Font& FixedText::GetCanonicalFont( const StyleSettings& _rStyle ) const +const vcl::Font& FixedText::GetCanonicalFont( const StyleSettings& _rStyle ) const { return ( GetStyle() & WB_INFO ) ? _rStyle.GetInfoFont() : _rStyle.GetLabelFont(); } @@ -246,7 +246,7 @@ void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Font aFont = GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDrawPixelFont( pDev ); pDev->Push(); pDev->SetMapMode(); @@ -497,7 +497,7 @@ WinBits FixedLine::ImplInitStyle( WinBits nStyle ) return nStyle; } -const Font& FixedLine::GetCanonicalFont( const StyleSettings& _rStyle ) const +const vcl::Font& FixedLine::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetGroupFont(); } @@ -565,7 +565,7 @@ void FixedLine::ImplDraw( bool bLayout ) { long nWidth = GetTextWidth( aText ); Push( PUSH_FONT ); - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetOrientation( 900 ); SetFont( aFont ); Point aStartPt( aOutSize.Width()/2, aOutSize.Height()-1 ); diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx index ce16866a636f..f30a8ba9303f 100644 --- a/vcl/source/control/fixedhyper.cxx +++ b/vcl/source/control/fixedhyper.cxx @@ -35,7 +35,7 @@ void FixedHyperlink::Initialize() // saves the old pointer m_aOldPointer = GetPointer(); // changes the font - Font aFont = GetControlFont( ); + vcl::Font aFont = GetControlFont( ); // to underline aFont.SetUnderline( UNDERLINE_SINGLE ); SetControlFont( aFont ); diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index 320cade9ee77..47f97a55a28b 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -45,7 +45,7 @@ WinBits GroupBox::ImplInitStyle( WinBits nStyle ) return nStyle; } -const Font& GroupBox::GetCanonicalFont( const StyleSettings& _rStyle ) const +const vcl::Font& GroupBox::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetGroupFont(); } @@ -198,7 +198,7 @@ void GroupBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, { Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Font aFont = GetDrawPixelFont( pDev ); + vcl::Font aFont = GetDrawPixelFont( pDev ); pDev->Push(); pDev->SetMapMode(); diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 75c7d2cbe16e..187b6469e046 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -52,7 +52,7 @@ void ImplInitFieldSettings( Window* pWin, bool bFont, bool bForeground, bool bBa if ( bFont ) { - Font aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); if ( pWin->IsControlFont() ) aFont.Merge( pWin->GetControlFont() ); pWin->SetZoomedPointFont( aFont ); diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 02a54ba59ced..ec4d4bc65abe 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -373,7 +373,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sa Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Font aFont = mpImplLB->GetMainWindow().GetDrawPixelFont( pDev ); + vcl::Font aFont = mpImplLB->GetMainWindow().GetDrawPixelFont( pDev ); OutDevType eOutDevType = pDev->GetOutDevType(); pDev->Push(); diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 223705e714c3..0187b4e51b68 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -127,7 +127,7 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle ) pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) ); } -const Font& TabControl::GetCanonicalFont( const StyleSettings& _rStyle ) const +const vcl::Font& TabControl::GetCanonicalFont( const StyleSettings& _rStyle ) const { return _rStyle.GetAppFont(); } @@ -400,7 +400,7 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe if ( mbFormat || (mnLastWidth != nWidth) || (mnLastHeight != nHeight) ) { - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetTransparent( true ); SetFont( aFont ); @@ -918,7 +918,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo // set font accordingly, current item is painted bold // we set the font attributes always before drawing to be re-entrant (DrawNativeControl may trigger additional paints) - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetTransparent( true ); SetFont( aFont ); diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 9fb2e5c62ffe..b70cd2be405f 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -102,7 +102,7 @@ TextEngine::TextEngine() ImpInitDoc(); maTextColor = COL_BLACK; - Font aFont; + vcl::Font aFont; aFont.SetTransparent( false ); Color aFillColor( aFont.GetFillColor() ); aFillColor.SetTransparency( 0 ); @@ -170,7 +170,7 @@ void TextEngine::SetActiveView( TextView* pTextView ) } } -void TextEngine::SetFont( const Font& rFont ) +void TextEngine::SetFont( const vcl::Font& rFont ) { if ( rFont != maFont ) { @@ -1130,7 +1130,7 @@ sal_uInt16 TextEngine::GetCharPos( sal_uLong nPortion, sal_uInt16 nLine, long nX { nTmpX -= pTextPortion->GetWidth(); // position before Portion // TODO: Optimize: no GetTextBreak if fixed-width Font - Font aFont; + vcl::Font aFont; SeekCursor( nPortion, nCurIndex+1, aFont, NULL ); mpRefDev->SetFont( aFont); long nPosInPortion = nXPos-nTmpX; @@ -1213,7 +1213,7 @@ sal_uLong TextEngine::CalcTextHeight() return nY; } -sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nLen, const Font* pFont ) +sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nLen, const vcl::Font* pFont ) { #ifdef DBG_UTIL // within the text there must not be a Portion change (attribute/tab)! @@ -1235,7 +1235,7 @@ sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, } else { - Font aFont; + vcl::Font aFont; SeekCursor( nPara, nPortionStart+1, aFont, NULL ); mpRefDev->SetFont( aFont ); } @@ -1392,7 +1392,7 @@ TextPaM TextEngine::ConnectContents( sal_uLong nLeftNode ) return ImpConnectParagraphs( nLeftNode, nLeftNode+1 ); } -void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, OutputDevice* pOutDev ) +void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, vcl::Font& rFont, OutputDevice* pOutDev ) { rFont = maFont; if ( pOutDev ) @@ -2011,7 +2011,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan case PORTIONKIND_TEXT: { { - Font aFont; + vcl::Font aFont; SeekCursor( nPara, nIndex+1, aFont, pOutDev ); if( bTransparent ) aFont.SetTransparent( true ); @@ -2246,7 +2246,7 @@ bool TextEngine::CreateLines( sal_uLong nPara ) sal_uInt16 nIndex = pLine->GetStart(); TextLine aSaveLine( *pLine ); - Font aFont; + vcl::Font aFont; bool bCalcPortion = true; diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index b607caf7abf9..d63620d40016 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -300,7 +300,7 @@ void TextView::ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle c { // set correct background color; // unfortunately we cannot detect if it has changed - Font aFont = mpImpl->mpTextEngine->GetFont(); + vcl::Font aFont = mpImpl->mpTextEngine->GetFont(); Color aColor = pOut->GetBackground().GetColor(); aColor.SetTransparency( 0 ); if ( aColor != aFont.GetFillColor() ) diff --git a/vcl/source/edit/txtattr.cxx b/vcl/source/edit/txtattr.cxx index c7d0c592a44d..2baa47bc213f 100644 --- a/vcl/source/edit/txtattr.cxx +++ b/vcl/source/edit/txtattr.cxx @@ -43,7 +43,7 @@ TextAttribFontColor::~TextAttribFontColor() { } -void TextAttribFontColor::SetFont( Font& rFont ) const +void TextAttribFontColor::SetFont( vcl::Font& rFont ) const { rFont.SetColor( maColor ); } @@ -73,7 +73,7 @@ TextAttribFontWeight::~TextAttribFontWeight() { } -void TextAttribFontWeight::SetFont( Font& rFont ) const +void TextAttribFontWeight::SetFont( vcl::Font& rFont ) const { rFont.SetWeight( meWeight ); } @@ -99,7 +99,7 @@ TextAttribHyperLink::~TextAttribHyperLink() { } -void TextAttribHyperLink::SetFont( Font& rFont ) const +void TextAttribHyperLink::SetFont( vcl::Font& rFont ) const { rFont.SetColor( maColor ); rFont.SetUnderline( UNDERLINE_SINGLE ); @@ -132,7 +132,7 @@ TextAttribProtect::~TextAttribProtect() { } -void TextAttribProtect::SetFont( Font& ) const +void TextAttribProtect::SetFont( vcl::Font& ) const { } diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 6dee58f92c99..68c375a6a200 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -974,12 +974,12 @@ void VclMultiLineEdit::ImplInitSettings( bool /*bFont*/, bool /*bForeground*/, b if ( !IsEnabled() ) aTextColor = rStyleSettings.GetDisableColor(); - Font aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); aFont.SetTransparent( IsPaintTransparent() ); SetZoomedPointFont( aFont ); - Font TheFont = GetFont(); + vcl::Font TheFont = GetFont(); TheFont.SetColor( aTextColor ); if( IsPaintTransparent() ) TheFont.SetFillColor( Color( COL_TRANSPARENT ) ); @@ -1304,7 +1304,7 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Font aFont = pImpVclMEdit->GetTextWindow()->GetDrawPixelFont( pDev ); + vcl::Font aFont = pImpVclMEdit->GetTextWindow()->GetDrawPixelFont( pDev ); aFont.SetTransparent( true ); OutDevType eOutDevType = pDev->GetOutDevType(); diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index bafcdfa4b442..5726c9e75299 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -460,7 +460,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv) { SgfFontOne* pSgfFont; // Font from the IniFile - Font aFont; + vcl::Font aFont; Color aColor; sal_uLong Grad; sal_uLong Brei; diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 08461a3bd9ea..b9144f3e7986 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -502,11 +502,11 @@ void EMFWriter::ImplCheckTextAttr() { if( mbTextChanged && ImplPrepareHandleSelect( mnTextHandle, TEXT_SELECT ) ) { - const Font& rFont = maVDev.GetFont(); - OUString aFontName( rFont.GetName() ); - sal_Int32 nWeight; - sal_uInt16 i; - sal_uInt8 nPitchAndFamily; + const vcl::Font& rFont = maVDev.GetFont(); + OUString aFontName( rFont.GetName() ); + sal_Int32 nWeight; + sal_uInt16 i; + sal_uInt8 nPitchAndFamily; ImplBeginRecord( WIN_EMR_EXTCREATEFONTINDIRECTW ); m_rStm.WriteUInt32( mnTextHandle ); diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 736ac69b8578..f0bfad144c85 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -462,7 +462,7 @@ Rectangle WinMtfOutput::ImplMap( const Rectangle& rRect ) return Rectangle( ImplMap( rRect.TopLeft() ), ImplMap( rRect.GetSize() ) ); } -void WinMtfOutput::ImplMap( Font& rFont ) +void WinMtfOutput::ImplMap( vcl::Font& rFont ) { // !!! HACK: we now always set the width to zero because the OS width is interpreted differently; // must later be made portable in SV (KA 1996-02-08) @@ -1394,7 +1394,7 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, long* pDXArry, b bChangeFont = true; mpGDIMetaFile->AddAction( new MetaTextFillColorAction( maFont.GetFillColor(), !maFont.IsTransparent() ) ); } - Font aTmp( maFont ); + vcl::Font aTmp( maFont ); aTmp.SetColor( maTextColor ); aTmp.SetFillColor( maBkColor ); diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index e5fe7ae1f337..5ce0dfd93ccf 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -327,7 +327,7 @@ public: struct WinMtfFontStyle { - Font aFont; + vcl::Font aFont; WinMtfFontStyle( LOGFONTW& rLogFont ); }; @@ -479,7 +479,7 @@ struct SaveStruct WinMtfLineStyle aLineStyle; WinMtfFillStyle aFillStyle; - Font aFont; + vcl::Font aFont; Color aBkColor; Color aTextColor; sal_uInt32 nTextAlign; @@ -586,8 +586,8 @@ class WinMtfOutput WinMtfLineStyle maLineStyle; WinMtfFillStyle maLatestFillStyle; WinMtfFillStyle maFillStyle; - Font maLatestFont; - Font maFont; + vcl::Font maLatestFont; + vcl::Font maFont; sal_uInt32 mnLatestTextAlign; sal_uInt32 mnTextAlign; Color maLatestTextColor; @@ -638,7 +638,7 @@ class WinMtfOutput Point ImplScale( const Point& rPt ); Size ImplMap( const Size& rSize, bool bDoWorldTransform = true); Rectangle ImplMap( const Rectangle& rRectangle ); - void ImplMap( Font& rFont ); + void ImplMap( vcl::Font& rFont ); Polygon& ImplMap( Polygon& rPolygon ); PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon ); Polygon& ImplScale( Polygon& rPolygon ); @@ -690,7 +690,7 @@ public: void SelectObject( sal_Int32 nIndex ); rtl_TextEncoding GetCharSet(){ return maFont.GetCharSet(); }; WinMtfFillStyle& GetFillStyle () { return maFillStyle; } - const Font& GetFont() const { return maFont;} + const vcl::Font& GetFont() const { return maFont;} void SetTextLayoutMode( ComplexTextLayoutMode nLayoutMode ); void ClearPath(){ aPathObj.Init(); }; diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 8dde397668b0..5d64ad9b8e8f 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -302,7 +302,7 @@ void WMFWriter::WMFRecord_CreateBrushIndirect(const Color& rColor) pWMF->WriteUInt16( (sal_uInt16) 0 ); } -void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont) +void WMFWriter::WMFRecord_CreateFontIndirect(const vcl::Font & rFont) { sal_uInt16 nWeight,i; sal_uInt8 nPitchFamily; @@ -873,7 +873,7 @@ void WMFWriter::CreateSelectDeletePen( const Color& rColor, const LineInfo& rLin } } -void WMFWriter::CreateSelectDeleteFont(const Font & rFont) +void WMFWriter::CreateSelectDeleteFont(const vcl::Font & rFont) { sal_uInt16 nOldHandle; @@ -1776,7 +1776,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, aDstClipRegion = aSrcClipRegion = Region(); bDstIsClipping = bSrcIsClipping = false; - Font aFont; + vcl::Font aFont; aFont.SetCharSet( GetExtendedTextEncoding( RTL_TEXTENCODING_MS_1252 ) ); aFont.SetColor( Color( COL_WHITE ) ); aFont.SetAlign( ALIGN_BASELINE ); diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx index 378ece4d4078..a4ce97ace9ca 100644 --- a/vcl/source/filter/wmf/wmfwr.hxx +++ b/vcl/source/filter/wmf/wmfwr.hxx @@ -37,7 +37,7 @@ struct WMFWriterAttrStackMember LineInfo aLineInfo; TextAlign eTextAlign; RasterOp eRasterOp; - Font aFont; + vcl::Font aFont; MapMode aMapMode; Region aClipRegion; PushFlags nFlags; @@ -73,7 +73,7 @@ private: LineInfo aSrcLineInfo; RasterOp eSrcRasterOp; FontAlign eSrcTextAlign; - Font aSrcFont; + vcl::Font aSrcFont; MapMode aSrcMapMode; bool bSrcIsClipping; Region aSrcClipRegion; @@ -88,7 +88,7 @@ private: LineInfo aDstLineInfo; RasterOp eDstROP2; FontAlign eDstTextAlign; - Font aDstFont; + vcl::Font aDstFont; sal_uInt32 eDstHorTextAlign; @@ -138,7 +138,7 @@ private: void WMFRecord_Arc(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt); void WMFRecord_Chord(const Rectangle& rRect, const Point& rStartPt, const Point& rEndPt); void WMFRecord_CreateBrushIndirect(const Color& rColor); - void WMFRecord_CreateFontIndirect(const Font& rFont); + void WMFRecord_CreateFontIndirect(const vcl::Font& rFont); void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo ); void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle); void WMFRecord_Ellipse(const Rectangle& rRect); @@ -176,7 +176,7 @@ private: sal_uInt16 AllocHandle(); void FreeHandle(sal_uInt16 nObjectHandle); void CreateSelectDeletePen( const Color& rColor, const LineInfo& rLineInfo ); - void CreateSelectDeleteFont(const Font & rFont); + void CreateSelectDeleteFont(const vcl::Font & rFont); void CreateSelectDeleteBrush(const Color& rColor); void SetLineAndFillAttr(); diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index d49044c3ca54..efab97eaa223 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -199,7 +199,7 @@ void ImplWriteFillColor( SvStream& rOStm, const Color& rColor, sal_Int16 nStyle } } -void ImplWriteFont( SvStream& rOStm, const Font& rFont, +void ImplWriteFont( SvStream& rOStm, const vcl::Font& rFont, rtl_TextEncoding& rActualCharSet ) { char aName[32]; @@ -784,8 +784,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_FONT_ACTION ): { - Font aFont; - char aName[ 32 ]; + vcl::Font aFont; + char aName[ 32 ]; sal_Int32 nWidth, nHeight; sal_Int16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout; sal_Int16 nCharOrient, nLineOrient; @@ -1346,9 +1346,9 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ) { - sal_uLong nCountPos; - Font aSaveFont; - const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt(); + sal_uLong nCountPos; + vcl::Font aSaveFont; + const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt(); rtl_TextEncoding eActualCharSet = osl_getThreadTextEncoding(); const Size aPrefSize( rMtf.GetPrefSize() ); bool bRop_0_1 = false; @@ -2013,7 +2013,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, case( META_TEXTCOLOR_ACTION ): { - Font aSaveFont( rSaveVDev.GetFont() ); + vcl::Font aSaveFont( rSaveVDev.GetFont() ); aSaveFont.SetColor( ( (MetaTextColorAction*) pAction )->GetColor() ); rSaveVDev.SetFont( aSaveFont ); @@ -2025,7 +2025,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, case( META_TEXTFILLCOLOR_ACTION ): { MetaTextFillColorAction* pAct = (MetaTextFillColorAction*) pAction; - Font aSaveFont( rSaveVDev.GetFont() ); + vcl::Font aSaveFont( rSaveVDev.GetFont() ); if( pAct->IsSetting() ) aSaveFont.SetFillColor( pAct->GetColor() ); @@ -2040,7 +2040,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, case( META_TEXTALIGN_ACTION ): { - Font aSaveFont( rSaveVDev.GetFont() ); + vcl::Font aSaveFont( rSaveVDev.GetFont() ); aSaveFont.SetAlign( ( (MetaTextAlignAction*) pAction )->GetTextAlign() ); rSaveVDev.SetFont( aSaveFont ); diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index 233babad24b4..d556cdab11db 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -232,7 +232,7 @@ Font::Font() mpImplFont = &aStaticImplFont; } -Font::Font( const Font& rFont ) +Font::Font( const vcl::Font& rFont ) { bool bRefIncrementable = rFont.mpImplFont->mnRefCount < ::std::numeric_limits<FontRefCount>::max(); DBG_ASSERT( bRefIncrementable, "Font: RefCount overflow" ); @@ -563,7 +563,7 @@ void Font::SetWordLineMode( bool bWordLine ) } } -Font& Font::operator=( const Font& rFont ) +Font& Font::operator=( const vcl::Font& rFont ) { bool bRefIncrementable = rFont.mpImplFont->mnRefCount < ::std::numeric_limits<FontRefCount>::max(); DBG_ASSERT( bRefIncrementable, "Font: RefCount overflow" ); @@ -588,12 +588,12 @@ Font& Font::operator=( const Font& rFont ) return *this; } -bool Font::operator==( const Font& rFont ) const +bool Font::operator==( const vcl::Font& rFont ) const { return mpImplFont == rFont.mpImplFont || *mpImplFont == *rFont.mpImplFont; } -void Font::Merge( const Font& rFont ) +void Font::Merge( const vcl::Font& rFont ) { if ( !rFont.GetName().isEmpty() ) { @@ -736,13 +736,13 @@ SvStream& WriteImpl_Font( SvStream& rOStm, const Impl_Font& rImpl_Font ) return rOStm; } -SvStream& ReadFont( SvStream& rIStm, Font& rFont ) +SvStream& ReadFont( SvStream& rIStm, ::vcl::Font& rFont ) { rFont.MakeUnique(); return ReadImpl_Font( rIStm, *rFont.mpImplFont ); } -SvStream& WriteFont( SvStream& rOStm, const Font& rFont ) +SvStream& WriteFont( SvStream& rOStm, const ::vcl::Font& rFont ) { return WriteImpl_Font( rOStm, *rFont.mpImplFont ); } @@ -1020,6 +1020,6 @@ FontEmphasisMark Font::GetEmphasisMark() const { return mpImplFont->meEmphasisMa bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; } -bool Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); } +bool Font::IsSameInstance( const vcl::Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 480e0ab68d94..3bd6eb2ccb36 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -1322,7 +1322,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( META_FONT_ACTION ): { MetaFontAction* pAct = (MetaFontAction*) pAction; - Font aFont( pAct->GetFont() ); + vcl::Font aFont( pAct->GetFont() ); aFont.SetOrientation( aFont.GetOrientation() + (sal_uInt16) nAngle10 ); aMtf.AddAction( new MetaFontAction( aFont ) ); @@ -2006,7 +2006,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol case( META_FONT_ACTION ): { MetaFontAction* pAct = (MetaFontAction*) pAction; - Font aFont( pAct->GetFont() ); + vcl::Font aFont( pAct->GetFont() ); aFont.SetColor( pFncCol( aFont.GetColor(), pColParam ) ); aFont.SetFillColor( pFncCol( aFont.GetFillColor(), pColParam ) ); diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index d6041226d82e..f628f5595943 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star; static void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText, - Font* pFont, const Bitmap* pBitmap, const BitmapEx* pBitmapEx, + vcl::Font* pFont, const Bitmap* pBitmap, const BitmapEx* pBitmapEx, const Point& rDestPt, const Size& rDestSize ) { sal_uInt16 nPixel = (sal_uInt16) pOutDev->PixelToLogic( Size( 1, 1 ) ).Width(); @@ -456,7 +456,7 @@ void Graphic::Draw( OutputDevice* pOutDev, } void Graphic::DrawEx( OutputDevice* pOutDev, const OUString& rText, - Font& rFont, const BitmapEx& rBitmap, + vcl::Font& rFont, const BitmapEx& rBitmap, const Point& rDestPt, const Size& rDestSz ) { ImplDrawDefault( pOutDev, &rText, &rFont, NULL, &rBitmap, rDestPt, rDestSz ); diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 2417e0ff4de1..c6b524b4243b 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -3051,7 +3051,7 @@ MetaFontAction::MetaFontAction() : MetaFontAction::~MetaFontAction() {} -MetaFontAction::MetaFontAction( const Font& rFont ) : +MetaFontAction::MetaFontAction( const vcl::Font& rFont ) : MetaAction ( META_FONT_ACTION ), maFont ( rFont ) { diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index 81e29a9a1c35..c0f0a695abed 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -57,7 +57,7 @@ void PDFWriter::SetDocumentLocale( const com::sun::star::lang::Locale& rLoc ) pImplementation->setDocumentLocale( rLoc ); } -void PDFWriter::SetFont( const Font& rFont ) +void PDFWriter::SetFont( const vcl::Font& rFont ) { pImplementation->setFont( rFont ); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 7e9e422d4644..c73d3e22d206 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4611,7 +4611,7 @@ bool PDFWriterImpl::emitNoteAnnotations() return true; } -Font PDFWriterImpl::replaceFont( const Font& rControlFont, const Font& rAppSetFont ) +Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font& rAppSetFont ) { bool bAdjustSize = false; @@ -4643,7 +4643,7 @@ Font PDFWriterImpl::replaceFont( const Font& rControlFont, const Font& rAppSetF return aFont; } -sal_Int32 PDFWriterImpl::getBestBuiltinFont( const Font& rFont ) +sal_Int32 PDFWriterImpl::getBestBuiltinFont( const vcl::Font& rFont ) { sal_Int32 nBest = 4; // default to Helvetica OUString aFontName( rFont.GetName() ); @@ -6969,7 +6969,7 @@ bool PDFWriterImpl::emit() } -sal_Int32 PDFWriterImpl::getSystemFont( const Font& i_rFont ) +sal_Int32 PDFWriterImpl::getSystemFont( const vcl::Font& i_rFont ) { getReferenceDevice()->Push(); getReferenceDevice()->SetFont( i_rFont ); @@ -10604,7 +10604,7 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode) * if a font with a nontransparent color is set, it overwrites the current * text color. OTOH setting the text color will overwrite the color of the font. */ -void PDFWriterImpl::setFont( const Font& rFont ) +void PDFWriterImpl::setFont( const vcl::Font& rFont ) { Color aColor = rFont.GetColor(); if( aColor == Color( COL_TRANSPARENT ) ) diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 201528131b1c..655881de8ade 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -701,7 +701,7 @@ private: // graphics state struct GraphicsState { - Font m_aFont; + vcl::Font m_aFont; MapMode m_aMapMode; Color m_aLineColor; Color m_aFillColor; diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index df15630fc39e..116a2752d6ba 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -101,7 +101,7 @@ bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const return (pFound != NULL); } -int OutputDevice::GetDevFontSizeCount( const Font& rFont ) const +int OutputDevice::GetDevFontSizeCount( const vcl::Font& rFont ) const { delete mpGetDevSizeList; @@ -110,7 +110,7 @@ int OutputDevice::GetDevFontSizeCount( const Font& rFont ) const return mpGetDevSizeList->Count(); } -Size OutputDevice::GetDevFontSize( const Font& rFont, int nSizeIndex ) const +Size OutputDevice::GetDevFontSize( const vcl::Font& rFont, int nSizeIndex ) const { // check range int nCount = GetDevFontSizeCount( rFont ); @@ -206,7 +206,7 @@ FontMetric OutputDevice::GetFontMetric() const return aMetric; } -FontMetric OutputDevice::GetFontMetric( const Font& rFont ) const +FontMetric OutputDevice::GetFontMetric( const vcl::Font& rFont ) const { // select font, query metrics, select original font again Font aOldFont = GetFont(); @@ -422,7 +422,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, rYOff += nDotSize; } -FontEmphasisMark OutputDevice::ImplGetEmphasisMarkStyle( const Font& rFont ) +FontEmphasisMark OutputDevice::ImplGetEmphasisMarkStyle( const vcl::Font& rFont ) { FontEmphasisMark nEmphasisMark = rFont.GetEmphasisMark(); @@ -995,7 +995,7 @@ void ImplFontEntry::IgnoreFallbackForUnicode( sal_UCS4 cChar, FontWeight eWeight mpUnicodeFallbackList->erase( it ); } -FontSelectPatternAttributes::FontSelectPatternAttributes( const Font& rFont, +FontSelectPatternAttributes::FontSelectPatternAttributes( const vcl::Font& rFont, const OUString& rSearchName, const Size& rSize, float fExactHeight ) : maSearchName( rSearchName ) , mnWidth( rSize.Width() ) @@ -1027,7 +1027,7 @@ FontSelectPatternAttributes::FontSelectPatternAttributes( const Font& rFont, mnWidth = -mnWidth; } -FontSelectPattern::FontSelectPattern( const Font& rFont, +FontSelectPattern::FontSelectPattern( const vcl::Font& rFont, const OUString& rSearchName, const Size& rSize, float fExactHeight) : FontSelectPatternAttributes(rFont, rSearchName, rSize, fExactHeight) , mpFontData( NULL ) @@ -1212,7 +1212,7 @@ ImplFontCache::~ImplFontCache() } ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList, - const Font& rFont, const Size& rSize, float fExactHeight ) + const vcl::Font& rFont, const Size& rSize, float fExactHeight ) { OUString aSearchName = rFont.GetName(); @@ -2143,7 +2143,7 @@ bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rSt return (nLen == (int)rVector.size()); } -sal_Int32 OutputDevice::HasGlyphs( const Font& rTempFont, const OUString& rStr, +sal_Int32 OutputDevice::HasGlyphs( const vcl::Font& rTempFont, const OUString& rStr, sal_Int32 nIndex, sal_Int32 nLen ) const { if( nIndex >= rStr.getLength() ) @@ -2158,7 +2158,7 @@ sal_Int32 OutputDevice::HasGlyphs( const Font& rTempFont, const OUString& rStr, DBG_ASSERT( nEnd <= rStr.getLength(), "String too short" ); // to get the map temporarily set font - const Font aOrigFont = GetFont(); + const vcl::Font aOrigFont = GetFont(); const_cast<OutputDevice&>(*this).SetFont( rTempFont ); FontCharMap aFontCharMap; bool bRet = GetFontCharMap( aFontCharMap ); diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 77dfe722fa0e..809408a1411d 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -90,7 +90,7 @@ void OutputDevice::Push( PushFlags nFlags ) pState->mpFillColor = NULL; } if ( nFlags & PUSH_FONT ) - pState->mpFont = new Font( maFont ); + pState->mpFont = new vcl::Font( maFont ); if ( nFlags & PUSH_TEXTCOLOR ) pState->mpTextColor = new Color( GetTextColor() ); if ( nFlags & PUSH_TEXTFILLCOLOR ) @@ -488,10 +488,10 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground ) mpAlphaVDev->SetBackground( rBackground ); } -void OutputDevice::SetFont( const Font& rNewFont ) +void OutputDevice::SetFont( const vcl::Font& rNewFont ) { - Font aFont( rNewFont ); + vcl::Font aFont( rNewFont ); aFont.SetLanguage(rNewFont.GetLanguage()); if ( mnDrawMode & (DRAWMODE_BLACKTEXT | DRAWMODE_WHITETEXT | DRAWMODE_GRAYTEXT | DRAWMODE_GHOSTEDTEXT | DRAWMODE_SETTINGSTEXT | DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL | DRAWMODE_GRAYFILL | DRAWMODE_NOFILL | diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 51117fe1c172..93de76c4ef84 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -239,7 +239,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) if( !pVDev->SetOutputSizePixel( aBoundRect.GetSize() ) ) return false; - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetOrientation( 0 ); aFont.SetSize( Size( mpFontEntry->maFontSelData.mnWidth, mpFontEntry->maFontSelData.mnHeight ) ); pVDev->SetFont( aFont ); @@ -2460,7 +2460,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect, // fall back to bitmap method to get the bounding rectangle, // so we need a monochrome virtual device with matching font VirtualDevice aVDev( 1 ); - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetShadow( false ); aFont.SetOutline( false ); aFont.SetRelief( RELIEF_NONE ); @@ -2682,7 +2682,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, VirtualDevice aVDev(1); - Font aFont(GetFont()); + vcl::Font aFont(GetFont()); aFont.SetShadow(false); aFont.SetOutline(false); aFont.SetRelief(RELIEF_NONE); diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index def2f64af08d..1b0f60289f47 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -36,7 +36,7 @@ #define UNDERLINE_LAST UNDERLINE_BOLDWAVE #define STRIKEOUT_LAST STRIKEOUT_X -bool OutputDevice::ImplIsUnderlineAbove( const Font& rFont ) +bool OutputDevice::ImplIsUnderlineAbove( const vcl::Font& rFont ) { if ( !rFont.IsVertical() ) return false; diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index d38c56bf86c8..b5cd7a57dd85 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2057,7 +2057,7 @@ void MessageDialog::SetMessagesWidths(Window *pParent, if (pSecondaryMessage) { assert(pPrimaryMessage); - Font aFont = pParent->GetSettings().GetStyleSettings().GetLabelFont(); + vcl::Font aFont = pParent->GetSettings().GetStyleSettings().GetLabelFont(); aFont.SetSize(Size(0, aFont.GetSize().Height() * 1.2)); aFont.SetWeight(WEIGHT_BOLD); pPrimaryMessage->SetControlFont(aFont); diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 9255cc61c279..2da3ed9a0d91 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1021,7 +1021,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP // put a push action to metafile Push(); // copy graphics state to metafile - Font aCopyFont = GetFont(); + vcl::Font aCopyFont = GetFont(); if( nOldDPIX != mnDPIX || nOldDPIY != mnDPIY ) { aCopyFont.SetHeight( aCopyFont.GetHeight() * mnDPIY / nOldDPIY ); diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx index 66935d787063..2fabec97ccb2 100644 --- a/vcl/source/window/settings.cxx +++ b/vcl/source/window/settings.cxx @@ -192,7 +192,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) if ( !bUseSystemFont && !aUserInterfaceFont.isEmpty() ) { StyleSettings aStyleSettings = rSettings.GetStyleSettings(); - Font aFont = aStyleSettings.GetAppFont(); + vcl::Font aFont = aStyleSettings.GetAppFont(); aFont.SetName( aUserInterfaceFont ); aStyleSettings.SetAppFont( aFont ); aFont = aStyleSettings.GetHelpFont(); @@ -243,7 +243,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) if( GetDesktopRectPixel().getHeight() > 600 ) maxFontheight = (int) ((( 8.0 * (double) GetDesktopRectPixel().getHeight()) / 600.0) + 1.5); - Font aFont = aStyleSettings.GetMenuFont(); + vcl::Font aFont = aStyleSettings.GetMenuFont(); int defFontheight = aFont.GetHeight(); if( defFontheight > maxFontheight ) defFontheight = maxFontheight; diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index c19d9e471c19..6425ed4d8a9c 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -168,7 +168,7 @@ void StatusBar::ImplInitSettings( bool bFont, if ( bFont ) { - Font aFont = rStyleSettings.GetToolFont(); + vcl::Font aFont = rStyleSettings.GetToolFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index a477e304ae16..91059ff9fe5c 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1436,7 +1436,7 @@ void ToolBox::ImplInitSettings( bool bFont, if ( bFont ) { - Font aFont = rStyleSettings.GetToolFont(); + vcl::Font aFont = rStyleSettings.GetToolFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); @@ -3008,8 +3008,8 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint, // during configuration mode visible windows will be drawn in a special way if ( mbCustomizeMode && pItem->mbShowWindow ) { - Font aOldFont = GetFont(); - Color aOldTextColor = GetTextColor(); + vcl::Font aOldFont = GetFont(); + Color aOldTextColor = GetTextColor(); SetZoomedPointFont( rStyleSettings.GetAppFont() ); SetLineColor( Color( COL_BLACK ) ); @@ -3160,13 +3160,13 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint, long nTextOffY = nOffY; // rotate text when vertically docked - Font aOldFont = GetFont(); + vcl::Font aOldFont = GetFont(); if( pItem->mbVisibleText && !ImplIsFloatingMode() && ((meAlign == WINDOWALIGN_LEFT) || (meAlign == WINDOWALIGN_RIGHT)) ) { bRotate = true; - Font aRotateFont = aOldFont; + vcl::Font aRotateFont = aOldFont; aRotateFont.SetOrientation( 2700 ); // center horizontally diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 00d4c8c5598d..da309e446b8a 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1237,7 +1237,7 @@ void Window::CopyDeviceArea( SalTwoRect& aPosAry, sal_uInt32 nFlags ) OutputDevice::CopyDeviceArea(aPosAry, nFlags); } -bool Window::ImplCheckUIFont( const Font& rFont ) +bool Window::ImplCheckUIFont( const vcl::Font& rFont ) { if( ImplGetSVData()->maGDIData.mbNativeFontConfig ) return true; @@ -1403,7 +1403,7 @@ void Window::ImplInitResolutionSettings() } } -void Window::ImplPointToLogic( Font& rFont ) const +void Window::ImplPointToLogic( vcl::Font& rFont ) const { Size aSize = rFont.GetSize(); sal_uInt16 nScreenFontZoom = mxSettings->GetStyleSettings().GetScreenFontZoom(); @@ -1428,7 +1428,7 @@ void Window::ImplPointToLogic( Font& rFont ) const rFont.SetSize( aSize ); } -void Window::ImplLogicToPoint( Font& rFont ) const +void Window::ImplLogicToPoint( vcl::Font& rFont ) const { Size aSize = rFont.GetSize(); sal_uInt16 nScreenFontZoom = mxSettings->GetStyleSettings().GetScreenFontZoom(); @@ -1816,7 +1816,7 @@ void Window::ImplNewInputContext() pFocusWin->mpWindowImpl->mpFrameData->maOldInputContext = rInputContext; SalInputContext aNewContext; - const Font& rFont = rInputContext.GetFont(); + const vcl::Font& rFont = rInputContext.GetFont(); const OUString& rFontName = rFont.GetName(); ImplFontEntry* pFontEntry = NULL; aNewContext.mpFont = NULL; @@ -2127,7 +2127,7 @@ long Window::CalcTitleWidth() const // we guess the width for frame windows as we do not know the // border of external dialogs const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); ((Window*)this)->SetPointFont( rStyleSettings.GetTitleFont() ); long nTitleWidth = GetTextWidth( GetText() ); ((Window*)this)->SetFont( aFont ); @@ -2220,18 +2220,18 @@ void Window::CollectChildren(::std::vector<Window *>& rAllChildren ) } } -void Window::SetPointFont( const Font& rFont ) +void Window::SetPointFont( const vcl::Font& rFont ) { - Font aFont = rFont; + vcl::Font aFont = rFont; ImplPointToLogic( aFont ); SetFont( aFont ); } -Font Window::GetPointFont() const +vcl::Font Window::GetPointFont() const { - Font aFont = GetFont(); + vcl::Font aFont = GetFont(); ImplLogicToPoint( aFont ); return aFont; } diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index e8126f4afc35..9b42b5763660 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -519,12 +519,12 @@ inline long WinFloatRound( double fVal ) return( fVal > 0.0 ? (long) ( fVal + 0.5 ) : -(long) ( -fVal + 0.5 ) ); } -void Window::SetZoomedPointFont( const Font& rFont ) +void Window::SetZoomedPointFont( const vcl::Font& rFont ) { const Fraction& rZoom = GetZoom(); if ( rZoom.GetNumerator() != rZoom.GetDenominator() ) { - Font aFont( rFont ); + vcl::Font aFont( rFont ); Size aSize = aFont.GetSize(); double n = (double)aSize.Width(); n *= (double)rZoom.GetNumerator(); @@ -548,7 +548,7 @@ void Window::SetZoomedPointFont( const Font& rFont ) nType = DEFAULTFONT_FIXED; else nType = DEFAULTFONT_UI_SANS; - Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguageTag().getLanguageType(), 0 ); + vcl::Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguageTag().getLanguageType(), 0 ); aFont.SetName( aTempFont.GetName() ); SetPointFont( aFont ); } @@ -581,9 +581,9 @@ void Window::SetControlFont() } } -void Window::SetControlFont( const Font& rFont ) +void Window::SetControlFont( const vcl::Font& rFont ) { - if ( rFont == Font() ) + if ( rFont == vcl::Font() ) { SetControlFont(); return; @@ -596,18 +596,18 @@ void Window::SetControlFont( const Font& rFont ) *mpWindowImpl->mpControlFont = rFont; } else - mpWindowImpl->mpControlFont = new Font( rFont ); + mpWindowImpl->mpControlFont = new vcl::Font( rFont ); StateChanged( STATE_CHANGE_CONTROLFONT ); } -Font Window::GetControlFont() const +vcl::Font Window::GetControlFont() const { if ( mpWindowImpl->mpControlFont ) return *mpWindowImpl->mpControlFont; else { - Font aFont; + vcl::Font aFont; return aFont; } } @@ -692,9 +692,9 @@ Size Window::CalcOutputSize( const Size& rWinSz ) const return aSz; } -Font Window::GetDrawPixelFont( OutputDevice* pDev ) const +vcl::Font Window::GetDrawPixelFont( OutputDevice* pDev ) const { - Font aFont = GetPointFont(); + vcl::Font aFont = GetPointFont(); Size aFontSize = aFont.GetSize(); MapMode aPtMapMode( MAP_POINT ); aFontSize = pDev->LogicToPixel( aFontSize, aPtMapMode ); @@ -1478,7 +1478,7 @@ bool Window::set_font_attribute(const OString &rKey, const OString &rValue) { if (rKey == "weight") { - Font aFont(GetControlFont()); + vcl::Font aFont(GetControlFont()); if (rValue == "thin") aFont.SetWeight(WEIGHT_THIN); else if (rValue == "ultralight") @@ -1503,7 +1503,7 @@ bool Window::set_font_attribute(const OString &rKey, const OString &rValue) } else if (rKey == "style") { - Font aFont(GetControlFont()); + vcl::Font aFont(GetControlFont()); if (rValue == "normal") aFont.SetItalic(ITALIC_NONE); else if (rValue == "oblique") @@ -1514,13 +1514,13 @@ bool Window::set_font_attribute(const OString &rKey, const OString &rValue) } else if (rKey == "underline" && toBool(rValue) == true) { - Font aFont(GetControlFont()); + vcl::Font aFont(GetControlFont()); aFont.SetUnderline(UNDERLINE_SINGLE); SetControlFont(aFont); } else if (rKey == "size") { - Font aFont(GetControlFont()); + vcl::Font aFont(GetControlFont()); sal_Int32 nHeight = rValue.toInt32() / 1000; aFont.SetHeight(nHeight); SetControlFont(aFont); diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index de64314bd09d..dd9dc6e0797e 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -3954,7 +3954,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) else nPointHeight = nPangoHeight/PANGO_SCALE; - Font aFont( aInfo.m_aFamilyName, Size( 0, nPointHeight ) ); + vcl::Font aFont( aInfo.m_aFamilyName, Size( 0, nPointHeight ) ); if( aInfo.m_eWeight != WEIGHT_DONTKNOW ) aFont.SetWeight( aInfo.m_eWeight ); if( aInfo.m_eWidth != WIDTH_DONTKNOW ) diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 8b26e37d3025..f8490d84dfc1 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -135,7 +135,7 @@ void MyWin::Paint( const Rectangle& rRect ) DrawLine( Point(r.Left()+i, r.Bottom()), Point(r.Right()-i, r.Top()) ); SetTextColor( Color( COL_WHITE ) ); - Font aFont( OUString( "Times" ), Size( 0, 25 ) ); + vcl::Font aFont( OUString( "Times" ), Size( 0, 25 ) ); SetFont( aFont ); DrawText( Point( 20, 30 ), OUString( "Just a simple test text" ) ); } diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx index 692d96723a0f..3d6730a49a15 100644 --- a/writerfilter/source/dmapper/SdtHelper.cxx +++ b/writerfilter/source/dmapper/SdtHelper.cxx @@ -43,7 +43,7 @@ awt::Size lcl_getOptimalWidth(StyleSheetTablePtr pStyleSheet, OUString& rDefault pOut->Push(PUSH_FONT | PUSH_MAPMODE); PropertyMapPtr pDefaultCharProps = pStyleSheet->GetDefaultCharProps(); - Font aFont(pOut->GetFont()); + vcl::Font aFont(pOut->GetFont()); boost::optional<PropertyMap::Property> aFontName = pDefaultCharProps->getProperty(PROP_CHAR_FONT_NAME); if (aFontName) aFont.SetName(aFontName->second.get<OUString>()); diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx index 9aae2789e3cf..85320659efe2 100644 --- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx +++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx @@ -98,8 +98,8 @@ private: SvSimpleTableContainer* m_pElementsLBContainer; SvSimpleTable* m_pElementsLB; MultiLineEdit* m_pValueDetails; - Font m_aStdFont; - Font m_aFixedWidthFont; + vcl::Font m_aStdFont; + vcl::Font m_aFixedWidthFont; DECL_LINK( ElementSelectHdl, void* ); void Clear( void ); |