fdo#82577: Handle Font

Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.

Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
This commit is contained in:
Noel Grandin 2014-09-16 10:09:58 +02:00
parent 9c81826876
commit 60e78fbb80
470 changed files with 1396 additions and 1392 deletions

View File

@ -40,7 +40,7 @@ private:
public: public:
CharacterAttributesHelper( const Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor ); CharacterAttributesHelper( const vcl::Font& rFont, sal_Int32 nBackColor, sal_Int32 nColor );
~CharacterAttributesHelper(); ~CharacterAttributesHelper();
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetCharacterAttributes(); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetCharacterAttributes();

View File

@ -509,7 +509,7 @@ sal_Int32 SAL_CALL AccessibleBrowseBoxBase::getForeground( ) throw (::com::sun:
nColor = pInst->GetControlForeground().GetColor(); nColor = pInst->GetControlForeground().GetColor();
else else
{ {
Font aFont; vcl::Font aFont;
if ( pInst->IsControlFont() ) if ( pInst->IsControlFont() )
aFont = pInst->GetControlFont(); aFont = pInst->GetControlFont();
else else

View File

@ -426,7 +426,7 @@ sal_Int32 SAL_CALL AccessibleGridControlBase::getForeground( ) throw (::com::su
nColor = pInst->GetControlForeground().GetColor(); nColor = pInst->GetControlForeground().GetColor();
else else
{ {
Font aFont; vcl::Font aFont;
if ( pInst->IsControlFont() ) if ( pInst->IsControlFont() )
aFont = pInst->GetControlFont(); aFont = pInst->GetControlFont();
else else

View File

@ -444,7 +444,7 @@ namespace accessibility
nColor = m_pTabBar->GetControlForeground().GetColor(); nColor = m_pTabBar->GetControlForeground().GetColor();
else else
{ {
Font aFont; vcl::Font aFont;
if ( m_pTabBar->IsControlFont() ) if ( m_pTabBar->IsControlFont() )
aFont = m_pTabBar->GetControlFont(); aFont = m_pTabBar->GetControlFont();
else else
@ -488,7 +488,7 @@ namespace accessibility
Reference< awt::XDevice > xDev( m_pTabBar->GetComponentInterface(), UNO_QUERY ); Reference< awt::XDevice > xDev( m_pTabBar->GetComponentInterface(), UNO_QUERY );
if ( xDev.is() ) if ( xDev.is() )
{ {
Font aFont; vcl::Font aFont;
if ( m_pTabBar->IsControlFont() ) if ( m_pTabBar->IsControlFont() )
aFont = m_pTabBar->GetControlFont(); aFont = m_pTabBar->GetControlFont();
else else

View File

@ -997,7 +997,7 @@ Document::retrieveCharacterAttributes(
{ {
::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock()); ::osl::Guard< ::comphelper::IMutex > aExternalGuard(getExternalLock());
Font aFont = m_rEngine.GetFont(); vcl::Font aFont = m_rEngine.GetFont();
const sal_Int32 AttributeCount = 9; const sal_Int32 AttributeCount = 9;
sal_Int32 i = 0; sal_Int32 i = 0;
css::uno::Sequence< css::beans::PropertyValue > aAttribs( AttributeCount ); css::uno::Sequence< css::beans::PropertyValue > aAttribs( AttributeCount );

View File

@ -24,7 +24,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans; 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( "CharBackColor" ), makeAny( (sal_Int32) nBackColor ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharColor" ), makeAny( (sal_Int32) nColor ) ) ); m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharColor" ), makeAny( (sal_Int32) nColor ) ) );

View File

@ -242,7 +242,7 @@ Sequence< PropertyValue > VCLXAccessibleMenuItem::getCharacterAttributes( sal_In
if ( !implIsValidIndex( nIndex, sText.getLength() ) ) if ( !implIsValidIndex( nIndex, sText.getLength() ) )
throw IndexOutOfBoundsException(); throw IndexOutOfBoundsException();
Font aFont = Application::GetSettings().GetStyleSettings().GetMenuFont(); vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetMenuFont();
sal_Int32 nBackColor = getBackground(); sal_Int32 nBackColor = getBackground();
sal_Int32 nColor = getForeground(); sal_Int32 nColor = getForeground();
return CharacterAttributesHelper( aFont, nBackColor, nColor ) return CharacterAttributesHelper( aFont, nBackColor, nColor )

View File

@ -511,7 +511,7 @@ Sequence< PropertyValue > VCLXAccessibleStatusBarItem::getCharacterAttributes( s
if ( m_pStatusBar ) if ( m_pStatusBar )
{ {
Font aFont = m_pStatusBar->GetFont(); vcl::Font aFont = m_pStatusBar->GetFont();
sal_Int32 nBackColor = getBackground(); sal_Int32 nBackColor = getBackground();
sal_Int32 nColor = getForeground(); sal_Int32 nColor = getForeground();
aValues = CharacterAttributesHelper( aFont, nBackColor, nColor ) aValues = CharacterAttributesHelper( aFont, nBackColor, nColor )

View File

@ -585,7 +585,7 @@ Sequence< PropertyValue > VCLXAccessibleTabPage::getCharacterAttributes( sal_Int
if ( m_pTabControl ) if ( m_pTabControl )
{ {
Font aFont = m_pTabControl->GetFont(); vcl::Font aFont = m_pTabControl->GetFont();
sal_Int32 nBackColor = getBackground(); sal_Int32 nBackColor = getBackground();
sal_Int32 nColor = getForeground(); sal_Int32 nColor = getForeground();
aValues = CharacterAttributesHelper( aFont, nBackColor, nColor ) aValues = CharacterAttributesHelper( aFont, nBackColor, nColor )

View File

@ -183,7 +183,7 @@ Sequence< PropertyValue > VCLXAccessibleTextComponent::getCharacterAttributes( s
if ( GetWindow() ) if ( GetWindow() )
{ {
Font aFont = GetWindow()->GetControlFont(); vcl::Font aFont = GetWindow()->GetControlFont();
sal_Int32 nBackColor = GetWindow()->GetControlBackground().GetColor(); sal_Int32 nBackColor = GetWindow()->GetControlBackground().GetColor();
sal_Int32 nColor = GetWindow()->GetControlForeground().GetColor(); sal_Int32 nColor = GetWindow()->GetControlForeground().GetColor();

View File

@ -502,7 +502,7 @@ sal_Int32 AccessibleDialogControlShape::getForeground( ) throw (RuntimeExceptio
nColor = pWindow->GetControlForeground().GetColor(); nColor = pWindow->GetControlForeground().GetColor();
else else
{ {
Font aFont; vcl::Font aFont;
if ( pWindow->IsControlFont() ) if ( pWindow->IsControlFont() )
aFont = pWindow->GetControlFont(); aFont = pWindow->GetControlFont();
else else
@ -548,7 +548,7 @@ Reference< awt::XFont > AccessibleDialogControlShape::getFont( ) throw (Runtime
Reference< awt::XDevice > xDev( pWindow->GetComponentInterface(), UNO_QUERY ); Reference< awt::XDevice > xDev( pWindow->GetComponentInterface(), UNO_QUERY );
if ( xDev.is() ) if ( xDev.is() )
{ {
Font aFont; vcl::Font aFont;
if ( pWindow->IsControlFont() ) if ( pWindow->IsControlFont() )
aFont = pWindow->GetControlFont(); aFont = pWindow->GetControlFont();
else else

View File

@ -832,7 +832,7 @@ sal_Int32 AccessibleDialogWindow::getForeground( ) throw (RuntimeException, std
nColor = m_pDialogWindow->GetControlForeground().GetColor(); nColor = m_pDialogWindow->GetControlForeground().GetColor();
else else
{ {
Font aFont; vcl::Font aFont;
if ( m_pDialogWindow->IsControlFont() ) if ( m_pDialogWindow->IsControlFont() )
aFont = m_pDialogWindow->GetControlFont(); aFont = m_pDialogWindow->GetControlFont();
else else
@ -876,7 +876,7 @@ Reference< awt::XFont > AccessibleDialogWindow::getFont( ) throw (RuntimeExcept
Reference< awt::XDevice > xDev( m_pDialogWindow->GetComponentInterface(), UNO_QUERY ); Reference< awt::XDevice > xDev( m_pDialogWindow->GetComponentInterface(), UNO_QUERY );
if ( xDev.is() ) if ( xDev.is() )
{ {
Font aFont; vcl::Font aFont;
if ( m_pDialogWindow->IsControlFont() ) if ( m_pDialogWindow->IsControlFont() )
aFont = m_pDialogWindow->GetControlFont(); aFont = m_pDialogWindow->GetControlFont();
else else

View File

@ -104,12 +104,12 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage,
const Color aOldLineColor( pPrinter->GetLineColor() ); const Color aOldLineColor( pPrinter->GetLineColor() );
const Color aOldFillColor( pPrinter->GetFillColor() ); const Color aOldFillColor( pPrinter->GetFillColor() );
const Font aOldFont( pPrinter->GetFont() ); const vcl::Font aOldFont( pPrinter->GetFont() );
pPrinter->SetLineColor( Color( COL_BLACK ) ); pPrinter->SetLineColor( Color( COL_BLACK ) );
pPrinter->SetFillColor(); pPrinter->SetFillColor();
Font aFont( aOldFont ); vcl::Font aFont( aOldFont );
aFont.SetWeight( WEIGHT_BOLD ); aFont.SetWeight( WEIGHT_BOLD );
aFont.SetAlign( ALIGN_BOTTOM ); aFont.SetAlign( ALIGN_BOTTOM );
pPrinter->SetFont( aFont ); pPrinter->SetFont( aFont );
@ -839,9 +839,9 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
AssertValidEditEngine(); AssertValidEditEngine();
MapMode eOldMapMode( pPrinter->GetMapMode() ); 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.SetAlign( ALIGN_BOTTOM );
aFont.SetTransparent( true ); aFont.SetTransparent( true );
aFont.SetSize( Size( 0, 360 ) ); aFont.SetSize( Size( 0, 360 ) );

View File

@ -1052,7 +1052,7 @@ void EditorWindow::DataChanged(DataChangedEvent const & rDCEvt)
if (!pOldSettings || aColor != if (!pOldSettings || aColor !=
pOldSettings-> GetStyleSettings().GetFieldTextColor()) pOldSettings-> GetStyleSettings().GetFieldTextColor())
{ {
Font aFont(pEditEngine->GetFont()); vcl::Font aFont(pEditEngine->GetFont());
aFont.SetColor(aColor); aFont.SetColor(aColor);
pEditEngine->SetFont(aFont); pEditEngine->SetFont(aFont);
} }
@ -1220,11 +1220,11 @@ void EditorWindow::ImplSetFont()
get_value_or( OUString() ) ); get_value_or( OUString() ) );
if ( sFontName.isEmpty() ) 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(); sFontName = aTmpFont.GetName();
} }
Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get()); Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get());
Font aFont( sFontName, aFontSize ); vcl::Font aFont( sFontName, aFontSize );
aFont.SetColor( GetSettings().GetStyleSettings().GetFieldTextColor() ); aFont.SetColor( GetSettings().GetStyleSettings().GetFieldTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );
aFont = GetFont(); aFont = GetFont();

View File

@ -1371,7 +1371,7 @@ void DialogWindow::InitSettings(bool bFont, bool bForeground, bool bBackground)
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont ) if( bFont )
{ {
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
SetPointFont( aFont ); SetPointFont( aFont );
} }

View File

@ -44,7 +44,7 @@ Layout::Layout (Window* pParent) :
{ {
SetBackground(GetSettings().GetStyleSettings().GetWindowColor()); SetBackground(GetSettings().GetStyleSettings().GetWindowColor());
Font aFont = GetFont(); vcl::Font aFont = GetFont();
Size aSz = aFont.GetSize(); Size aSz = aFont.GetSize();
aSz.Height() *= 1.5; aSz.Height() *= 1.5;
aFont.SetSize(aSz); aFont.SetSize(aSz);
@ -145,7 +145,7 @@ void Layout::DataChanged (DataChangedEvent const& rDCEvt)
aColor = GetSettings().GetStyleSettings().GetWindowTextColor(); aColor = GetSettings().GetStyleSettings().GetWindowTextColor();
if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetWindowTextColor()) if (!pOldSettings || aColor != pOldSettings->GetStyleSettings().GetWindowTextColor())
{ {
Font aFont(GetFont()); vcl::Font aFont(GetFont());
aFont.SetColor(aColor); aFont.SetColor(aColor);
SetFont(aFont); SetFont(aFont);
bInvalidate = true; bInvalidate = true;

View File

@ -1125,7 +1125,7 @@ void lcl_PrintHeader( Printer* pPrinter, const OUString& rTitle ) // not working
pPrinter->SetLineColor( COL_BLACK ); pPrinter->SetLineColor( COL_BLACK );
pPrinter->SetFillColor(); pPrinter->SetFillColor();
Font aFont( pPrinter->GetFont() ); vcl::Font aFont( pPrinter->GetFont() );
aFont.SetWeight( WEIGHT_BOLD ); aFont.SetWeight( WEIGHT_BOLD );
aFont.SetAlign( ALIGN_BOTTOM ); aFont.SetAlign( ALIGN_BOTTOM );
pPrinter->SetFont( aFont ); pPrinter->SetFont( aFont );
@ -1170,11 +1170,11 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not wor
{ {
{ {
MapMode aOldMap( pPrinter->GetMapMode()); MapMode aOldMap( pPrinter->GetMapMode());
Font aOldFont( pPrinter->GetFont() ); vcl::Font aOldFont( pPrinter->GetFont() );
MapMode aMap( MAP_100TH_MM ); MapMode aMap( MAP_100TH_MM );
pPrinter->SetMapMode( aMap ); pPrinter->SetMapMode( aMap );
Font aFont; vcl::Font aFont;
aFont.SetAlign( ALIGN_BOTTOM ); aFont.SetAlign( ALIGN_BOTTOM );
aFont.SetSize( Size( 0, 360 )); aFont.SetSize( Size( 0, 360 ));
pPrinter->SetFont( aFont ); pPrinter->SetFont( aFont );

View File

@ -67,7 +67,7 @@ SvRTLInputBox::SvRTLInputBox( Window* pParent, const OUString& rPrompt,
aEdit.Show(); aEdit.Show();
aPromptText.Show(); aPromptText.Show();
SetText( rTitle ); SetText( rTitle );
Font aFont( GetFont()); vcl::Font aFont( GetFont());
Color aColor( GetBackground().GetColor() ); Color aColor( GetBackground().GetColor() );
aFont.SetFillColor( aColor ); aFont.SetFillColor( aColor );
aEdit.SetFont( aFont ); aEdit.SetFont( aFont );

View File

@ -41,7 +41,7 @@ namespace cairocanvas
const geometry::Matrix2D& rFontMatrix, const geometry::Matrix2D& rFontMatrix,
const SurfaceProviderRef& rDevice ) : const SurfaceProviderRef& rDevice ) :
CanvasFont_Base( m_aMutex ), CanvasFont_Base( m_aMutex ),
maFont( Font( rFontRequest.FontDescription.FamilyName, maFont( vcl::Font( rFontRequest.FontDescription.FamilyName,
rFontRequest.FontDescription.StyleName, rFontRequest.FontDescription.StyleName,
Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ), Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ),
maFontRequest( rFontRequest ), maFontRequest( rFontRequest ),
@ -157,7 +157,7 @@ namespace cairocanvas
return aRet; return aRet;
} }
::Font CanvasFont::getVCLFont() const vcl::Font CanvasFont::getVCLFont() const
{ {
return *maFont; return *maFont;
} }

View File

@ -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 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; 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: private:
::canvas::vcltools::VCLObject<Font> maFont; ::canvas::vcltools::VCLObject<vcl::Font> maFont;
::com::sun::star::rendering::FontRequest maFontRequest; ::com::sun::star::rendering::FontRequest maFontRequest;
SurfaceProviderRef mpRefDevice; SurfaceProviderRef mpRefDevice;
}; };

View File

@ -61,7 +61,7 @@ namespace cairocanvas
static bool static bool
setupFontTransform( ::OutputDevice& rOutDev, setupFontTransform( ::OutputDevice& rOutDev,
::Point& o_rPoint, ::Point& o_rPoint,
::Font& io_rVCLFont, vcl::Font& io_rVCLFont,
const rendering::ViewState& rViewState, const rendering::ViewState& rViewState,
const rendering::RenderState& rRenderState ) const rendering::RenderState& rRenderState )
{ {
@ -247,7 +247,7 @@ namespace cairocanvas
{ {
setupOutDevState( rOutDev, pOwner, viewState, renderState, TEXT_COLOR ); setupOutDevState( rOutDev, pOwner, viewState, renderState, TEXT_COLOR );
::Font aVCLFont; vcl::Font aVCLFont;
CanvasFont* pFont = dynamic_cast< CanvasFont* >( xFont.get() ); CanvasFont* pFont = dynamic_cast< CanvasFont* >( xFont.get() );

View File

@ -510,7 +510,7 @@ namespace cairocanvas
// Font rotation and scaling // Font rotation and scaling
cairo_matrix_t m; cairo_matrix_t m;
Font aFont = rOutDev.GetFont(); vcl::Font aFont = rOutDev.GetFont();
cairo_matrix_init_identity(&m); cairo_matrix_init_identity(&m);

View File

@ -111,7 +111,7 @@ namespace dxcanvas
// create the font // create the font
const ::com::sun::star::rendering::FontRequest& rFontRequest = rCanvasFont->getFontRequest(); const ::com::sun::star::rendering::FontRequest& rFontRequest = rCanvasFont->getFontRequest();
Font aFont( vcl::Font aFont(
rFontRequest.FontDescription.FamilyName, rFontRequest.FontDescription.FamilyName,
rFontRequest.FontDescription.StyleName, rFontRequest.FontDescription.StyleName,
Size( 0, ::basegfx::fround(rFontRequest.CellSize))); Size( 0, ::basegfx::fround(rFontRequest.CellSize)));

View File

@ -735,7 +735,7 @@ namespace oglcanvas
// create the font // create the font
const rendering::FontRequest& rFontRequest = pFont->getFontRequest(); const rendering::FontRequest& rFontRequest = pFont->getFontRequest();
const geometry::Matrix2D& rFontMatrix = pFont->getFontMatrix(); const geometry::Matrix2D& rFontMatrix = pFont->getFontMatrix();
::Font aFont( vcl::Font aFont(
rFontRequest.FontDescription.FamilyName, rFontRequest.FontDescription.FamilyName,
rFontRequest.FontDescription.StyleName, rFontRequest.FontDescription.StyleName,
Size( 0, ::basegfx::fround(rFontRequest.CellSize))); Size( 0, ::basegfx::fround(rFontRequest.CellSize)));

View File

@ -42,7 +42,7 @@ namespace vclcanvas
rendering::XGraphicDevice& rDevice, rendering::XGraphicDevice& rDevice,
const OutDevProviderSharedPtr& rOutDevProvider ) : const OutDevProviderSharedPtr& rOutDevProvider ) :
CanvasFont_Base( m_aMutex ), CanvasFont_Base( m_aMutex ),
maFont( Font( rFontRequest.FontDescription.FamilyName, maFont( vcl::Font( rFontRequest.FontDescription.FamilyName,
rFontRequest.FontDescription.StyleName, rFontRequest.FontDescription.StyleName,
Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ), Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ),
maFontRequest( rFontRequest ), maFontRequest( rFontRequest ),
@ -169,7 +169,7 @@ namespace vclcanvas
return aRet; return aRet;
} }
::Font CanvasFont::getVCLFont() const vcl::Font CanvasFont::getVCLFont() const
{ {
return *maFont; return *maFont;
} }

View File

@ -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 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; 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: private:
::canvas::vcltools::VCLObject<Font> maFont; ::canvas::vcltools::VCLObject<vcl::Font> maFont;
::com::sun::star::rendering::FontRequest maFontRequest; ::com::sun::star::rendering::FontRequest maFontRequest;
::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice> mpRefDevice; ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice> mpRefDevice;
OutDevProviderSharedPtr mpOutDevProvider; OutDevProviderSharedPtr mpOutDevProvider;

View File

@ -1369,7 +1369,7 @@ namespace vclcanvas
OutputDevice& rOutDev( mpOutDev->getOutDev() ); OutputDevice& rOutDev( mpOutDev->getOutDev() );
::Font aVCLFont; vcl::Font aVCLFont;
CanvasFont* pFont = dynamic_cast< CanvasFont* >( xFont.get() ); CanvasFont* pFont = dynamic_cast< CanvasFont* >( xFont.get() );

View File

@ -100,7 +100,7 @@ namespace vclcanvas
} }
bool setupFontTransform( ::Point& o_rPoint, bool setupFontTransform( ::Point& o_rPoint,
::Font& io_rVCLFont, vcl::Font& io_rVCLFont,
const rendering::ViewState& rViewState, const rendering::ViewState& rViewState,
const rendering::RenderState& rRenderState, const rendering::RenderState& rRenderState,
::OutputDevice& rOutDev ) ::OutputDevice& rOutDev )

View File

@ -86,7 +86,7 @@ namespace vclcanvas
@returns false, if no text output should happen @returns false, if no text output should happen
*/ */
bool setupFontTransform( ::Point& o_rPoint, bool setupFontTransform( ::Point& o_rPoint,
::Font& io_rVCLFont, vcl::Font& io_rVCLFont,
const ::com::sun::star::rendering::ViewState& viewState, const ::com::sun::star::rendering::ViewState& viewState,
const ::com::sun::star::rendering::RenderState& renderState, const ::com::sun::star::rendering::RenderState& renderState,
::OutputDevice& rOutDev ); ::OutputDevice& rOutDev );

View File

@ -161,7 +161,7 @@ namespace vclcanvas
const OUString& rStr, const OUString& rStr,
const Point& rPos ) const Point& rPos )
{ {
Font aVCLFont; vcl::Font aVCLFont;
aVCLFont.SetHeight( 20 ); aVCLFont.SetHeight( 20 );
aVCLFont.SetColor( Color( INFO_COLOR ) ); aVCLFont.SetColor( Color( INFO_COLOR ) );

View File

@ -319,7 +319,7 @@ namespace vclcanvas
} }
// paint sprite prio // paint sprite prio
Font aVCLFont; vcl::Font aVCLFont;
aVCLFont.SetHeight( std::min(long(20),aOutputSize.Height()) ); aVCLFont.SetHeight( std::min(long(20),aOutputSize.Height()) );
aVCLFont.SetColor( COL_RED ); aVCLFont.SetColor( COL_RED );

View File

@ -247,7 +247,7 @@ DataSourceTabPage::DataSourceTabPage(
// set symbol font for arrows // set symbol font for arrows
// note: StarSymbol is substituted to OpenSymbol for OOo // note: StarSymbol is substituted to OpenSymbol for OOo
Font aSymbolFont( m_pBTN_UP->GetFont()); vcl::Font aSymbolFont( m_pBTN_UP->GetFont());
aSymbolFont.SetName( "StarSymbol" ); aSymbolFont.SetName( "StarSymbol" );
m_pBTN_UP->SetControlFont( aSymbolFont ); m_pBTN_UP->SetControlFont( aSymbolFont );
m_pBTN_DOWN->SetControlFont( aSymbolFont ); m_pBTN_DOWN->SetControlFont( aSymbolFont );

View File

@ -166,7 +166,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
//set fixed current font //set fixed current font
aSet.Put( SfxBoolItem( FN_PARAM_2, true ) ); //maybe not necessary in future 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 ) ); 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 )); boost::scoped_ptr<SfxAbstractDialog> pDlg(pFact->CreateSfxDialog( m_pChartWindow, aSet, getFrame(), RID_SVXDLG_CHARMAP ));

View File

@ -407,11 +407,11 @@ void CharacterProperties::AddDefaultsToMap(
using namespace ::com::sun::star::i18n::ScriptType; using namespace ::com::sun::star::i18n::ScriptType;
LanguageType nLang; LanguageType nLang;
nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aDefaultLocale, false), LATIN); 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); 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); 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_NAME, OUString( aFont.GetName() ) );
::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, OUString(aFont.GetStyleName()) ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_CHAR_FONT_STYLE_NAME, OUString(aFont.GetStyleName()) );

View File

@ -77,7 +77,7 @@ const TextCacheItem& TextCache::getText(OUString const & rText)
return *itr->second; return *itr->second;
VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0); VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0);
Font aFont = aDevice.GetFont(); vcl::Font aFont = aDevice.GetFont();
aFont.SetSize(Size(0, 96)); aFont.SetSize(Size(0, 96));
static bool bOldRender = getenv("OLDRENDER"); static bool bOldRender = getenv("OLDRENDER");
if (bOldRender) if (bOldRender)

View File

@ -767,7 +767,7 @@ namespace {
struct FontAttribSetter struct FontAttribSetter
{ {
FontAttribSetter(Font& rFont): FontAttribSetter(vcl::Font& rFont):
mrFont(rFont) {} mrFont(rFont) {}
void operator()(const std::pair<OUString, uno::Any>& rProp) void operator()(const std::pair<OUString, uno::Any>& rProp)
@ -807,7 +807,7 @@ struct FontAttribSetter
} }
} }
private: private:
Font& mrFont; vcl::Font& mrFont;
}; };
} }
@ -836,7 +836,7 @@ DummyText::DummyText(const OUString& rText, const tNameSequence& rNames,
} }
else else
{ {
Font aFont; vcl::Font aFont;
std::for_each(maProperties.begin(), maProperties.end(), FontAttribSetter(aFont)); std::for_each(maProperties.begin(), maProperties.end(), FontAttribSetter(aFont));
VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0); VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0);
aDevice.Erase(); aDevice.Erase();

View File

@ -633,7 +633,7 @@ int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill)
return 0; 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); VirtualDevice aDevice(*Application::GetDefaultDevice(), 0, 0);
aDevice.Erase(); aDevice.Erase();

View File

@ -95,7 +95,7 @@ public:
int CreateTextTexture(const BitmapEx& rBitmapEx, int CreateTextTexture(const BitmapEx& rBitmapEx,
const css::awt::Point& aPos, const css::awt::Size& aSize, const css::awt::Point& aPos, const css::awt::Size& aSize,
long rotation, const css::drawing::HomogenMatrix3& rTrans); 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 RenderTextShape();
int SetArea2DShapePoint(float x, float y, int listLength); int SetArea2DShapePoint(float x, float y, int listLength);

View File

@ -37,7 +37,7 @@ class GDIMetaFile;
class VirtualDevice; class VirtualDevice;
class Gradient; class Gradient;
class Rectangle; class Rectangle;
class Font; namespace vcl { class Font; }
class PolyPolygon; class PolyPolygon;
class Point; class Point;
class MetaCommentAction; class MetaCommentAction;
@ -242,7 +242,7 @@ static float GetSwapFloat( SvStream& rSt )
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::rendering::XCanvasFont > createFont( double& o_rFontRotation, ::com::sun::star::rendering::XCanvasFont > createFont( double& o_rFontRotation,
const ::Font& rFont, const ::vcl::Font& rFont,
const ActionFactoryParameters& rParms ) const; const ActionFactoryParameters& rParms ) const;
bool createActions( GDIMetaFile& rMtf, bool createActions( GDIMetaFile& rMtf,
const ActionFactoryParameters& rParms, const ActionFactoryParameters& rParms,

View File

@ -753,7 +753,7 @@ namespace cppcanvas
} }
uno::Reference< rendering::XCanvasFont > ImplRenderer::createFont( double& o_rFontRotation, uno::Reference< rendering::XCanvasFont > ImplRenderer::createFont( double& o_rFontRotation,
const ::Font& rFont, const vcl::Font& rFont,
const ActionFactoryParameters& rParms ) const const ActionFactoryParameters& rParms ) const
{ {
rendering::FontRequest aFontRequest; rendering::FontRequest aFontRequest;
@ -824,7 +824,7 @@ namespace cppcanvas
const sal_Int32 nFontWidthLog = rFontSizeLog.Width(); const sal_Int32 nFontWidthLog = rFontSizeLog.Width();
if( nFontWidthLog != 0 ) if( nFontWidthLog != 0 )
{ {
::Font aTestFont = rFont; vcl::Font aTestFont = rFont;
aTestFont.SetWidth( 0 ); aTestFont.SetWidth( 0 );
sal_Int32 nNormalWidth = rParms.mrVDev.GetFontMetric( aTestFont ).GetWidth(); sal_Int32 nNormalWidth = rParms.mrVDev.GetFontMetric( aTestFont ).GetWidth();
if( nNormalWidth != nFontWidthLog ) if( nNormalWidth != nFontWidthLog )
@ -1488,7 +1488,7 @@ namespace cppcanvas
case META_FONT_ACTION: case META_FONT_ACTION:
{ {
::cppcanvas::internal::OutDevState& rState = rStates.getState(); ::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, rState.xFont = createFont( rState.fontRotation,
rFont, rFont,
@ -2985,7 +2985,7 @@ namespace cppcanvas
::cppcanvas::internal::OutDevState& rState = aStateStack.getState(); ::cppcanvas::internal::OutDevState& rState = aStateStack.getState();
rState.xFont = createFont( rState.fontRotation, rState.xFont = createFont( rState.fontRotation,
::Font(), // default font ::vcl::Font(), // default font
aParms ); aParms );
} }

View File

@ -1954,8 +1954,8 @@ namespace cppcanvas
// (which is already contained in the render state // (which is already contained in the render state
// transformation matrix - otherwise, glyph polygons // transformation matrix - otherwise, glyph polygons
// will be rotated twice) // will be rotated twice)
const ::Font aOrigFont( rVDev.GetFont() ); const vcl::Font aOrigFont( rVDev.GetFont() );
::Font aUnrotatedFont( aOrigFont ); vcl::Font aUnrotatedFont( aOrigFont );
aUnrotatedFont.SetOrientation(0); aUnrotatedFont.SetOrientation(0);
rVDev.SetFont( aUnrotatedFont ); rVDev.SetFont( aUnrotatedFont );

View File

@ -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 //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 //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); rFont.SetFillColor(m_aBackgroundColor);
} }

View File

@ -112,7 +112,7 @@ public:
const SpellErrorDescription& GetErrorDescription() const { return m_aSpellErrorDescription; } 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 TextAttrib* Clone() const SAL_OVERRIDE;
virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE;
}; };
@ -135,7 +135,7 @@ public:
{m_eLanguage = eLang;} {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 TextAttrib* Clone() const SAL_OVERRIDE;
virtual bool operator==( const TextAttrib& rAttr ) 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;} 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 TextAttrib* Clone() const SAL_OVERRIDE;
virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE; virtual bool operator==( const TextAttrib& rAttr ) const SAL_OVERRIDE;
}; };

View File

@ -144,8 +144,8 @@ void AboutDialog::StyleControls()
m_pDescriptionText->SetPaintTransparent(true); m_pDescriptionText->SetPaintTransparent(true);
m_pCopyrightText->SetPaintTransparent(true); m_pCopyrightText->SetPaintTransparent(true);
Font aLabelFont = GetSettings().GetStyleSettings().GetLabelFont(); vcl::Font aLabelFont = GetSettings().GetStyleSettings().GetLabelFont();
Font aLargeFont = aLabelFont; vcl::Font aLargeFont = aLabelFont;
aLargeFont.SetSize( Size( 0, aLabelFont.GetSize().Height() * 3 ) ); aLargeFont.SetSize( Size( 0, aLabelFont.GetSize().Height() * 3 ) );
// Logo Replacement Text // Logo Replacement Text

View File

@ -88,14 +88,14 @@ SvxCharacterMap::SvxCharacterMap( Window* pParent, bool bOne_, const SfxItemSet*
SFX_ITEMSET_ARG( pSet, pFontNameItem, SfxStringItem, SID_FONT_NAME, false ); SFX_ITEMSET_ARG( pSet, pFontNameItem, SfxStringItem, SID_FONT_NAME, false );
if ( pFontItem ) if ( pFontItem )
{ {
Font aTmpFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), GetCharFont().GetSize() ); vcl::Font aTmpFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), GetCharFont().GetSize() );
aTmpFont.SetCharSet( pFontItem->GetCharSet() ); aTmpFont.SetCharSet( pFontItem->GetCharSet() );
aTmpFont.SetPitch( pFontItem->GetPitch() ); aTmpFont.SetPitch( pFontItem->GetPitch() );
SetCharFont( aTmpFont ); SetCharFont( aTmpFont );
} }
else if ( pFontNameItem ) else if ( pFontNameItem )
{ {
Font aTmpFont( GetCharFont() ); vcl::Font aTmpFont( GetCharFont() );
aTmpFont.SetName( pFontNameItem->GetValue() ); aTmpFont.SetName( pFontNameItem->GetValue() );
SetCharFont( aTmpFont ); SetCharFont( aTmpFont );
} }
@ -151,7 +151,7 @@ short SvxCharacterMap::Execute()
if ( pSet ) if ( pSet )
{ {
const SfxItemPool* pPool = pSet->GetPool(); const SfxItemPool* pPool = pSet->GetPool();
const Font& rFont( GetCharFont() ); const vcl::Font& rFont( GetCharFont() );
pSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), GetCharacters() ) ); pSet->Put( SfxStringItem( pPool->GetWhich(SID_CHARMAP), GetCharacters() ) );
pSet->Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(), pSet->Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(),
rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), pPool->GetWhich(SID_ATTR_CHAR_FONT) ) ); 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 bGotBoundary = true;
bool bShrankFont = false; bool bShrankFont = false;
Font aOrigFont(GetFont()); vcl::Font aOrigFont(GetFont());
Size aFontSize(aOrigFont.GetSize()); Size aFontSize(aOrigFont.GetSize());
Rectangle aBoundRect; Rectangle aBoundRect;
@ -212,7 +212,7 @@ void SvxShowText::Paint( const Rectangle& )
long nTextWidth = aBoundRect.GetWidth(); long nTextWidth = aBoundRect.GetWidth();
if (nAvailWidth > nTextWidth) if (nAvailWidth > nTextWidth)
break; break;
Font aFont(aOrigFont); vcl::Font aFont(aOrigFont);
aFontSize.Height() = nFontHeight; aFontSize.Height() = nFontHeight;
aFont.SetSize(aFontSize); aFont.SetSize(aFontSize);
Control::SetFont(aFont); 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(); long nWinHeight = GetOutputSizePixel().Height();
Font aFont = rFont; vcl::Font aFont = rFont;
aFont.SetWeight( WEIGHT_NORMAL ); aFont.SetWeight( WEIGHT_NORMAL );
aFont.SetAlign( ALIGN_TOP ); aFont.SetAlign( ALIGN_TOP );
aFont.SetSize( PixelToLogic( Size( 0, nWinHeight/2 ) ) ); aFont.SetSize( PixelToLogic( Size( 0, nWinHeight/2 ) ) );
@ -279,7 +279,7 @@ void SvxShowText::SetFont( const Font& rFont )
Size SvxShowText::GetOptimalSize() const Size SvxShowText::GetOptimalSize() const
{ {
const Font &rFont = GetFont(); const vcl::Font &rFont = GetFont();
const Size rFontSize = rFont.GetSize(); const Size rFontSize = rFont.GetSize();
long nWinHeight = LogicToPixel(rFontSize).Height() * 2; long nWinHeight = LogicToPixel(rFontSize).Height() * 2;
return Size( GetTextWidth( GetText() ) + 2 * 12, nWinHeight ); 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 // first get the underlying info in order to get font names
// like "Times New Roman;Times" resolved // like "Times New Roman;Times" resolved
Font aTmp( GetFontMetric( rFont ) ); vcl::Font aTmp( GetFontMetric( rFont ) );
if ( m_pFontLB->GetEntryPos( aTmp.GetName() ) == LISTBOX_ENTRY_NOTFOUND ) if ( m_pFontLB->GetEntryPos( aTmp.GetName() ) == LISTBOX_ENTRY_NOTFOUND )
return; return;

View File

@ -61,7 +61,7 @@ namespace svx
OutputDevice& m_rDev; OutputDevice& m_rDev;
public: public:
inline FontSwitch( OutputDevice& _rDev, const Font& _rTemporaryFont ) inline FontSwitch( OutputDevice& _rDev, const vcl::Font& _rTemporaryFont )
:m_rDev( _rDev ) :m_rDev( _rDev )
{ {
m_rDev.Push( PUSH_FONT ); m_rDev.Push( PUSH_FONT );
@ -127,7 +127,7 @@ namespace svx
Size aPlaygroundSize( _rRect.GetSize() ); Size aPlaygroundSize( _rRect.GetSize() );
// the font for the secondary text: // the font for the secondary text:
Font aSmallerFont( _rDevice.GetFont() ); vcl::Font aSmallerFont( _rDevice.GetFont() );
// heuristic: 80% of the original size // heuristic: 80% of the original size
aSmallerFont.SetHeight( (long)( 0.8 * aSmallerFont.GetHeight() ) ); aSmallerFont.SetHeight( (long)( 0.8 * aSmallerFont.GetHeight() ) );
@ -304,7 +304,7 @@ namespace svx
Size RubyRadioButton::GetOptimalSize() const Size RubyRadioButton::GetOptimalSize() const
{ {
Font aSmallerFont( GetFont() ); vcl::Font aSmallerFont( GetFont() );
aSmallerFont.SetHeight( static_cast<long>( 0.8 * aSmallerFont.GetHeight() ) ); aSmallerFont.SetHeight( static_cast<long>( 0.8 * aSmallerFont.GetHeight() ) );
Rectangle rect( Point(), Size( SAL_MAX_INT32, SAL_MAX_INT32 ) ); Rectangle rect( Point(), Size( SAL_MAX_INT32, SAL_MAX_INT32 ) );
sal_uInt16 style = GetStyle(); sal_uInt16 style = GetStyle();

View File

@ -57,7 +57,7 @@ SvxPostItDialog::SvxPostItDialog(Window* pParent, const SfxItemSet& rCoreSet,
m_pAuthorBtn->SetClickHdl( LINK( this, SvxPostItDialog, Stamp ) ); m_pAuthorBtn->SetClickHdl( LINK( this, SvxPostItDialog, Stamp ) );
m_pOKBtn->SetClickHdl( LINK( this, SvxPostItDialog, OKHdl ) ); m_pOKBtn->SetClickHdl( LINK( this, SvxPostItDialog, OKHdl ) );
Font aFont( m_pEditED->GetFont() ); vcl::Font aFont( m_pEditED->GetFont() );
aFont.SetWeight( WEIGHT_LIGHT ); aFont.SetWeight( WEIGHT_LIGHT );
m_pEditED->SetFont( aFont ); m_pEditED->SetFont( aFont );

View File

@ -145,10 +145,10 @@ void AlternativesString::Paint(
{ {
AlternativesExtraData* pData = m_rControlImpl.GetExtraData( pEntry ); AlternativesExtraData* pData = m_rControlImpl.GetExtraData( pEntry );
Point aPos( rPos ); Point aPos( rPos );
Font aOldFont( rDev.GetFont()); vcl::Font aOldFont( rDev.GetFont());
if (pData && pData->IsHeader()) if (pData && pData->IsHeader())
{ {
Font aFont( aOldFont ); vcl::Font aFont( aOldFont );
aFont.SetWeight( WEIGHT_BOLD ); aFont.SetWeight( WEIGHT_BOLD );
rDev.SetFont( aFont ); rDev.SetFont( aFont );
aPos.X() = 0; aPos.X() = 0;

View File

@ -25,7 +25,7 @@
// caution: needs C-Linkage since dynamically loaded via symbol name // caution: needs C-Linkage since dynamically loaded via symbol name
extern "C" 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; bool bRet = false;
boost::scoped_ptr<SvxCharacterMap> aDlg(new SvxCharacterMap( i_pParent )); boost::scoped_ptr<SvxCharacterMap> aDlg(new SvxCharacterMap( i_pParent ));

View File

@ -154,8 +154,8 @@ class OfaSwAutoFmtOptionsPage : public SfxTabPage
OUString sBulletChar; OUString sBulletChar;
OUString sByInputBulletChar; OUString sByInputBulletChar;
Font aBulletFont; vcl::Font aBulletFont;
Font aByInputBulletFont; vcl::Font aByInputBulletFont;
sal_uInt16 nPercent; sal_uInt16 nPercent;
SvLBoxButtonData* pCheckButtonData; SvLBoxButtonData* pCheckButtonData;

View File

@ -43,7 +43,7 @@ public:
bool bCenter = false ); bool bCenter = false );
virtual ~SvxShowText(); virtual ~SvxShowText();
void SetFont( const Font& rFont ); void SetFont( const vcl::Font& rFont );
void SetText( const OUString& rText ) SAL_OVERRIDE; void SetText( const OUString& rText ) SAL_OVERRIDE;
void SetCentered(bool bCenter) { mbCenter = bCenter; } void SetCentered(bool bCenter) { mbCenter = bCenter; }
@ -80,7 +80,7 @@ private:
FixedText* m_pSymbolText; FixedText* m_pSymbolText;
SvxShowText* m_pShowChar; SvxShowText* m_pShowChar;
FixedText* m_pCharCodeText; FixedText* m_pCharCodeText;
Font aFont; vcl::Font aFont;
bool bOne; bool bOne;
const SubsetMap* pSubsetMap; const SubsetMap* pSubsetMap;
@ -102,8 +102,8 @@ public:
void DisableFontSelection(); void DisableFontSelection();
const Font& GetCharFont() const { return aFont;} const vcl::Font& GetCharFont() const { return aFont;}
void SetCharFont( const Font& rFont ); void SetCharFont( const vcl::Font& rFont );
void SetChar( sal_UCS4 ); void SetChar( sal_UCS4 );
sal_UCS4 GetChar() const; sal_UCS4 GetChar() const;

View File

@ -41,7 +41,7 @@ class SvxBrushItem;
class SvxNumberingPreview : public Window class SvxNumberingPreview : public Window
{ {
const SvxNumRule* pActNum; const SvxNumRule* pActNum;
Font aStdFont; vcl::Font aStdFont;
long nPageWidth; long nPageWidth;
const OUString* pOutlineNames; const OUString* pOutlineNames;
bool bPosition; bool bPosition;
@ -308,7 +308,7 @@ class SvxNumOptionsTabPage : public SfxTabPage
bool bMenuButtonInitialized : 1; bool bMenuButtonInitialized : 1;
std::vector<OUString> aGrfNames; std::vector<OUString> aGrfNames;
Font aActBulletFont; vcl::Font aActBulletFont;
sal_uInt8 nBullet; sal_uInt8 nBullet;
sal_uInt16 nActNumLvl; sal_uInt16 nActNumLvl;

View File

@ -43,8 +43,8 @@ public:
void OptLBoxString_Impl::Paint( void OptLBoxString_Impl::Paint(
const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry) const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry)
{ {
Font aOldFont( rDev.GetFont() ); vcl::Font aOldFont( rDev.GetFont() );
Font aFont( aOldFont ); vcl::Font aFont( aOldFont );
//detect readonly state by asking for a valid Image //detect readonly state by asking for a valid Image
if(pEntry && !(!((OptHeaderTabListBox&)rDev).GetCollapsedEntryBmp(pEntry))) if(pEntry && !(!((OptHeaderTabListBox&)rDev).GetCollapsedEntryBmp(pEntry)))
aFont.SetColor( Application::GetSettings().GetStyleSettings().GetDeactiveTextColor() ); aFont.SetColor( Application::GetSettings().GetStyleSettings().GetDeactiveTextColor() );

View File

@ -281,10 +281,10 @@ void BrwStringDic_Impl::Paint(
{ {
ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData(); ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData();
Point aPos(rPos); Point aPos(rPos);
Font aOldFont( rDev.GetFont()); vcl::Font aOldFont( rDev.GetFont());
if(pData->IsParent()) if(pData->IsParent())
{ {
Font aFont( aOldFont ); vcl::Font aFont( aOldFont );
aFont.SetWeight( WEIGHT_BOLD ); aFont.SetWeight( WEIGHT_BOLD );
rDev.SetFont( aFont ); rDev.SetFont( aFont );
aPos.X() = 0; aPos.X() = 0;
@ -455,8 +455,8 @@ void BrwString_Impl::Paint(
{ {
Point aNewPos(aPos); Point aNewPos(aPos);
aNewPos.X() += rDev.GetTextWidth(GetText()); aNewPos.X() += rDev.GetTextWidth(GetText());
Font aOldFont( rDev.GetFont()); vcl::Font aOldFont( rDev.GetFont());
Font aFont( aOldFont ); vcl::Font aFont( aOldFont );
aFont.SetWeight( WEIGHT_BOLD ); aFont.SetWeight( WEIGHT_BOLD );
//??? convert the lower byte from the user date into a string //??? convert the lower byte from the user date into a string

View File

@ -268,9 +268,9 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet* )
struct ImpUserData struct ImpUserData
{ {
OUString *pString; OUString *pString;
Font *pFont; vcl::Font *pFont;
ImpUserData(OUString* pText, Font* pFnt) ImpUserData(OUString* pText, vcl::Font* pFnt)
{ pString = pText; pFont = pFnt;} { pString = pText; pFont = pFnt;}
}; };
@ -324,8 +324,8 @@ void OfaImpBrwString::Paint(
ImpUserData* pUserData = (ImpUserData* )pEntry->GetUserData(); ImpUserData* pUserData = (ImpUserData* )pEntry->GetUserData();
Point aNewPos(rPos); Point aNewPos(rPos);
aNewPos.X() += rDev.GetTextWidth(GetText()); aNewPos.X() += rDev.GetTextWidth(GetText());
Font aOldFont( rDev.GetFont()); vcl::Font aOldFont( rDev.GetFont());
Font aFont( aOldFont ); vcl::Font aFont( aOldFont );
if(pUserData->pFont) if(pUserData->pFont)
{ {
aFont = *pUserData->pFont; aFont = *pUserData->pFont;
@ -701,7 +701,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl)
pMapDlg->SetChar( (*pUserData->pString)[0] ); pMapDlg->SetChar( (*pUserData->pString)[0] );
if(RET_OK == pMapDlg->Execute()) if(RET_OK == pMapDlg->Execute())
{ {
Font aFont(pMapDlg->GetCharFont()); vcl::Font aFont(pMapDlg->GetCharFont());
*pUserData->pFont = aFont; *pUserData->pFont = aFont;
sal_UCS4 aChar = pMapDlg->GetChar(); sal_UCS4 aChar = pMapDlg->GetChar();
// using the UCS4 constructor // using the UCS4 constructor

View File

@ -81,7 +81,7 @@ SvxNumberPreview::SvxNumberPreview(Window* pParent, WinBits nStyle)
, mnPos(-1) , mnPos(-1)
, mnChar(0x0) , mnChar(0x0)
{ {
Font aFont( GetFont() ); vcl::Font aFont( GetFont() );
aFont.SetTransparent( true ); aFont.SetTransparent( true );
aFont.SetColor( Application::GetSettings().GetStyleSettings().GetFieldColor() ); aFont.SetColor( Application::GetSettings().GetStyleSettings().GetFieldColor() );
SetFont( aFont ); SetFont( aFont );
@ -149,7 +149,7 @@ void SvxNumberPreview::NotifyChange( const OUString& rPrevStr,
void SvxNumberPreview::Paint( const Rectangle& ) void SvxNumberPreview::Paint( const Rectangle& )
{ {
Font aDrawFont = GetFont(); vcl::Font aDrawFont = GetFont();
Size aSzWnd = GetOutputSizePixel(); Size aSzWnd = GetOutputSizePixel();
OUString aTmpStr( aPrevStr ); OUString aTmpStr( aPrevStr );
long nLeadSpace = (aSzWnd.Width() - GetTextWidth( aTmpStr )) /2; long nLeadSpace = (aSzWnd.Width() - GetTextWidth( aTmpStr )) /2;
@ -830,7 +830,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEnt
{ {
OUString aEntry; OUString aEntry;
OUString aTmpString; OUString aTmpString;
Font aFont=m_pLbCategory->GetFont(); vcl::Font aFont=m_pLbCategory->GetFont();
size_t i = 0; size_t i = 0;
short nTmpCatPos; short nTmpCatPos;
short aPrivCat; short aPrivCat;
@ -877,7 +877,7 @@ void SvxNumberFormatTabPage::FillFormatListBox_Impl( std::vector<OUString>& rEnt
{ {
Color* pPreviewColor = NULL; Color* pPreviewColor = NULL;
OUString aPreviewString( GetExpColorString( pPreviewColor, aEntry, aPrivCat ) ); OUString aPreviewString( GetExpColorString( pPreviewColor, aEntry, aPrivCat ) );
Font aEntryFont( m_pLbFormat->GetFont() ); vcl::Font aEntryFont( m_pLbFormat->GetFont() );
m_pLbFormat->InsertFontEntry( aPreviewString, aEntryFont, pPreviewColor ); m_pLbFormat->InsertFontEntry( aPreviewString, aEntryFont, pPreviewColor );
} }
else else

View File

@ -156,10 +156,10 @@ static bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask)
return bRet; return bRet;
} }
static Font& lcl_GetDefaultBulletFont() static vcl::Font& lcl_GetDefaultBulletFont()
{ {
static bool bInit = false; static bool bInit = false;
static Font aDefBulletFont( OUString("StarSymbol"), static vcl::Font aDefBulletFont( OUString("StarSymbol"),
OUString(), Size( 0, 14 ) ); OUString(), Size( 0, 14 ) );
if(!bInit) if(!bInit)
{ {
@ -476,7 +476,7 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl)
bPreset = false; bPreset = false;
bModified = true; bModified = true;
sal_Unicode cChar = aBulletTypes[m_pExamplesVS->GetSelectItemId() - 1]; sal_Unicode cChar = aBulletTypes[m_pExamplesVS->GetSelectItemId() - 1];
Font& rActBulletFont = lcl_GetDefaultBulletFont(); vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
sal_uInt16 nMask = 1; sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) 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]; SvxNumSettingsArr_Impl& rItemArr = aNumSettingsArrays[m_pExamplesVS->GetSelectItemId() - 1];
Font& rActBulletFont = lcl_GetDefaultBulletFont(); vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont();
SvxNumSettings_Impl* pLevelSettings = 0; SvxNumSettings_Impl* pLevelSettings = 0;
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{ {
@ -712,13 +712,13 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl)
{ {
vcl::FontInfo aInfo = pList->Get( vcl::FontInfo aInfo = pList->Get(
pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE); pLevelSettings->sBulletFont,WEIGHT_NORMAL, ITALIC_NONE);
Font aFont(aInfo); vcl::Font aFont(aInfo);
aFmt.SetBulletFont(&aFont); aFmt.SetBulletFont(&aFont);
} }
else else
{ {
//if it cannot be found then create a new one //if it cannot be found then create a new one
Font aCreateFont( pLevelSettings->sBulletFont, vcl::Font aCreateFont( pLevelSettings->sBulletFont,
OUString(), Size( 0, 14 ) ); OUString(), Size( 0, 14 ) );
aCreateFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); aCreateFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW );
aCreateFont.SetFamily( FAMILY_DONTKNOW ); aCreateFont.SetFamily( FAMILY_DONTKNOW );
@ -2009,7 +2009,7 @@ IMPL_LINK_NOARG(SvxNumOptionsTabPage, BulletHdl_Impl)
boost::scoped_ptr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true )); boost::scoped_ptr<SvxCharacterMap> pMap(new SvxCharacterMap( this, true ));
sal_uInt16 nMask = 1; sal_uInt16 nMask = 1;
const Font* pFmtFont = 0; const vcl::Font* pFmtFont = 0;
bool bSameBullet = true; bool bSameBullet = true;
sal_Unicode cBullet = 0; sal_Unicode cBullet = 0;
bool bFirst = true; bool bFirst = true;
@ -2234,10 +2234,10 @@ static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
const SvxNumberFormat& rFmt, sal_uInt16 nXStart, const SvxNumberFormat& rFmt, sal_uInt16 nXStart,
sal_uInt16 nYStart, const Size& rSize) 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! // 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); Size aTmpSize(rSize);
aTmpSize.Width() *= rFmt.GetBulletRelSize(); aTmpSize.Width() *= rFmt.GetBulletRelSize();
aTmpSize.Width() /= 100 ; aTmpSize.Width() /= 100 ;
@ -2403,8 +2403,8 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
if(pActNum->IsContinuousNumbering()) if(pActNum->IsContinuousNumbering())
aNum.GetLevelVal()[nLevel] = nPreNum; aNum.GetLevelVal()[nLevel] = nPreNum;
OUString aText(pActNum->MakeNumString( aNum )); OUString aText(pActNum->MakeNumString( aNum ));
Font aSaveFont = pVDev->GetFont(); vcl::Font aSaveFont = pVDev->GetFont();
Font aColorFont(aSaveFont); vcl::Font aColorFont(aSaveFont);
Color aTmpBulletColor = rFmt.GetBulletColor(); Color aTmpBulletColor = rFmt.GetBulletColor();
if(aTmpBulletColor.GetColor() == COL_AUTO) if(aTmpBulletColor.GetColor() == COL_AUTO)
aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK); aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK);
@ -2526,7 +2526,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
} }
else else
{ {
Font aColorFont(aStdFont); vcl::Font aColorFont(aStdFont);
Color aTmpBulletColor = rFmt.GetBulletColor(); Color aTmpBulletColor = rFmt.GetBulletColor();
if(aTmpBulletColor.GetColor() == COL_AUTO) if(aTmpBulletColor.GetColor() == COL_AUTO)
aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK); aTmpBulletColor = Color(aBackColor.IsDark() ? COL_WHITE : COL_BLACK);

View File

@ -167,7 +167,7 @@ namespace
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont ) if( bFont )
{ {
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() ); aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );
@ -1253,7 +1253,7 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt )
void OAppDetailPageHelper::ImplInitSettings() void OAppDetailPageHelper::ImplInitSettings()
{ {
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() ); aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );
@ -1265,7 +1265,6 @@ void OAppDetailPageHelper::ImplInitSettings()
m_aBorder.SetTextFillColor(); m_aBorder.SetTextFillColor();
m_aTBPreview.SetTextColor( rStyleSettings.GetFieldTextColor() ); m_aTBPreview.SetTextColor( rStyleSettings.GetFieldTextColor() );
m_aTBPreview.SetTextFillColor(); m_aTBPreview.SetTextFillColor();
SetBackground( rStyleSettings.GetFieldColor() ); SetBackground( rStyleSettings.GetFieldColor() );
m_aBorder.SetBackground( rStyleSettings.GetFieldColor() ); m_aBorder.SetBackground( rStyleSettings.GetFieldColor() );
m_aFL.SetBackground( rStyleSettings.GetFieldColor() ); m_aFL.SetBackground( rStyleSettings.GetFieldColor() );
@ -1346,7 +1345,7 @@ void OPreviewWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackg
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont ) if( bFont )
{ {
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() ); aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );

View File

@ -111,7 +111,7 @@ void OCreationList::PreparePaint( SvTreeListEntry* _pEntry )
if ( bIsMouseDownEntry ) if ( bIsMouseDownEntry )
{ {
Font aFont( GetFont() ); vcl::Font aFont( GetFont() );
aFont.SetColor( GetSettings().GetStyleSettings().GetHighlightTextColor() ); aFont.SetColor( GetSettings().GetStyleSettings().GetHighlightTextColor() );
Control::SetFont( aFont ); Control::SetFont( aFont );
} }
@ -384,7 +384,7 @@ void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont ) if( bFont )
{ {
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() ); aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );
@ -408,7 +408,7 @@ void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro
m_aFL.SetBackground( rStyleSettings.GetFieldColor() ); m_aFL.SetBackground( rStyleSettings.GetFieldColor() );
} }
Font aFont = m_aDescription.GetControlFont(); vcl::Font aFont = m_aDescription.GetControlFont();
aFont.SetWeight(WEIGHT_BOLD); aFont.SetWeight(WEIGHT_BOLD);
m_aDescription.SetControlFont(aFont); m_aDescription.SetControlFont(aFont);
} }
@ -565,7 +565,7 @@ void OApplicationDetailView::ImplInitSettings( bool bFont, bool bForeground, boo
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont ) if( bFont )
{ {
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() ); aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );

View File

@ -52,7 +52,7 @@ namespace dbaui
SvTreeListEntry* m_pMouseDownEntry; SvTreeListEntry* m_pMouseDownEntry;
SvTreeListEntry* m_pLastActiveEntry; SvTreeListEntry* m_pLastActiveEntry;
Color m_aOriginalBackgroundColor; Color m_aOriginalBackgroundColor;
Font m_aOriginalFont; vcl::Font m_aOriginalFont;
public: public:
OCreationList( OTasksWindow& _rParent ); OCreationList( OTasksWindow& _rParent );

View File

@ -74,7 +74,7 @@ void OApplicationSwapWindow::ImplInitSettings( bool bFont, bool bForeground, boo
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont ) if( bFont )
{ {
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() ); aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );

View File

@ -136,7 +136,7 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont ) if( bFont )
{ {
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() ); aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );
@ -154,7 +154,7 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro
Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle}; Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle};
for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) 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); aFont.SetWeight(WEIGHT_BOLD);
pWindows[i]->SetFont(aFont); pWindows[i]->SetFont(aFont);
pWindows[i]->SetTextColor( aStyle.GetLightColor() ); pWindows[i]->SetTextColor( aStyle.GetLightColor() );

View File

@ -153,7 +153,7 @@ void OAppBorderWindow::ImplInitSettings()
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( true ) if( true )
{ {
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() ); aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );
@ -546,7 +546,7 @@ void OApplicationView::ImplInitSettings()
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( true ) if( true )
{ {
Font aFont; vcl::Font aFont;
aFont = rStyleSettings.GetFieldFont(); aFont = rStyleSettings.GetFieldFont();
aFont.SetColor( rStyleSettings.GetWindowTextColor() ); aFont.SetColor( rStyleSettings.GetWindowTextColor() );
SetPointFont( aFont ); SetPointFont( aFont );

View File

@ -63,7 +63,7 @@ void OSplitterView::ImplInitSettings( bool bFont, bool bForeground, bool bBackgr
if ( bFont ) if ( bFont )
{ {
Font aFont = rStyleSettings.GetAppFont(); vcl::Font aFont = rStyleSettings.GetAppFont();
if ( IsControlFont() ) if ( IsControlFont() )
aFont.Merge( GetControlFont() ); aFont.Merge( GetControlFont() );
SetPointFont( aFont ); SetPointFont( aFont );

View File

@ -32,7 +32,7 @@ namespace dbaui
if (!_pViewData) if (!_pViewData)
_pViewData = pView->GetViewDataItem( pEntry, this ); _pViewData = pView->GetViewDataItem( pEntry, this );
pView->Push(PUSH_ALL); pView->Push(PUSH_ALL);
Font aFont( pView->GetFont()); vcl::Font aFont( pView->GetFont());
aFont.SetWeight(WEIGHT_BOLD); aFont.SetWeight(WEIGHT_BOLD);
pView->Control::SetFont( aFont ); pView->Control::SetFont( aFont );
_pViewData->maSize = Size(pView->GetTextWidth(GetText()), pView->GetTextHeight()); _pViewData->maSize = Size(pView->GetTextWidth(GetText()), pView->GetTextHeight());
@ -51,7 +51,7 @@ namespace dbaui
if (m_bEmphasized) if (m_bEmphasized)
{ {
rDev.Push(PUSH_ALL); rDev.Push(PUSH_ALL);
Font aFont( rDev.GetFont()); vcl::Font aFont( rDev.GetFont());
aFont.SetWeight(WEIGHT_BOLD); aFont.SetWeight(WEIGHT_BOLD);
rDev.SetFont( aFont ); rDev.SetFont( aFont );
Point aPos(rPos); Point aPos(rPos);

View File

@ -45,8 +45,8 @@ void OMarkableTreeListBox::Paint(const Rectangle& _rRect)
{ {
if (!IsEnabled()) if (!IsEnabled())
{ {
Font aOldFont = GetFont(); vcl::Font aOldFont = GetFont();
Font aNewFont(aOldFont); vcl::Font aNewFont(aOldFont);
StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings();
aNewFont.SetColor(aSystemStyle.GetDisableColor()); aNewFont.SetColor(aSystemStyle.GetDisableColor());

View File

@ -233,12 +233,12 @@ void OSqlEdit::ImplSetFont()
get_value_or( OUString() ) ); get_value_or( OUString() ) );
if ( sFontName.isEmpty() ) 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(); sFontName = aTmpFont.GetName();
} }
Size aFontSize( Size aFontSize(
0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() ); 0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() );
Font aFont( sFontName, aFontSize ); vcl::Font aFont( sFontName, aFontSize );
aStyleSettings.SetFieldFont(aFont); aStyleSettings.SetFieldFont(aFont);
aSettings.SetStyleSettings(aStyleSettings); aSettings.SetStyleSettings(aStyleSettings);
SetSettings(aSettings); SetSettings(aSettings);

View File

@ -67,7 +67,7 @@ namespace svt
class Window; class Window;
class ToolBox; class ToolBox;
class Font; namespace vcl { class Font; }
class SvNumberFormatter; class SvNumberFormatter;
class SfxFilter; class SfxFilter;

View File

@ -320,7 +320,7 @@ void ODatabaseImportExport::initialize()
} }
if ( m_aFont.Name.isEmpty() ) if ( m_aFont.Name.isEmpty() )
{ {
Font aApplicationFont = OutputDevice::GetDefaultFont( vcl::Font aApplicationFont = OutputDevice::GetDefaultFont(
DEFAULTFONT_SANS_UNICODE, DEFAULTFONT_SANS_UNICODE,
Application::GetSettings().GetUILanguageTag().getLanguageType(), Application::GetSettings().GetUILanguageTag().getLanguageType(),
DEFAULTFONT_FLAGS_ONLYONE DEFAULTFONT_FLAGS_ONLYONE

View File

@ -1452,7 +1452,7 @@ void OJoinTableView::StateChanged( StateChangedType nType )
{ {
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Font aFont = rStyleSettings.GetGroupFont(); vcl::Font aFont = rStyleSettings.GetGroupFont();
if ( IsControlFont() ) if ( IsControlFont() )
aFont.Merge( GetControlFont() ); aFont.Merge( GetControlFont() );
SetZoomedPointFont( aFont ); SetZoomedPointFont( aFont );

View File

@ -135,7 +135,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent )
// switch off triState of ::com::sun::star::form::CheckBox // switch off triState of ::com::sun::star::form::CheckBox
m_pVisibleCell->GetBox().EnableTriState( false ); 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)); aTitleFont.SetSize(Size(0, 6));
SetTitleFont(aTitleFont); SetTitleFont(aTitleFont);
@ -330,7 +330,7 @@ void OSelectionBrowseBox::Init()
SetHeaderBar(pNewHeaderBar); SetHeaderBar(pNewHeaderBar);
SetMode(m_nMode); SetMode(m_nMode);
Font aFont( GetDataWindow().GetFont() ); vcl::Font aFont( GetDataWindow().GetFont() );
aFont.SetWeight( WEIGHT_NORMAL ); aFont.SetWeight( WEIGHT_NORMAL );
GetDataWindow().SetFont( aFont ); GetDataWindow().SetFont( aFont );

View File

@ -478,7 +478,7 @@ void OTableWindow::Resize()
void OTableWindow::SetBoldTitle( bool bBold ) void OTableWindow::SetBoldTitle( bool bBold )
{ {
Font aFont = m_aTitle.GetFont(); vcl::Font aFont = m_aTitle.GetFont();
aFont.SetWeight( bBold?WEIGHT_BOLD:WEIGHT_NORMAL ); aFont.SetWeight( bBold?WEIGHT_BOLD:WEIGHT_NORMAL );
m_aTitle.SetFont( aFont ); m_aTitle.SetFont( aFont );
m_aTitle.Invalidate(); m_aTitle.Invalidate();
@ -554,7 +554,7 @@ void OTableWindow::StateChanged( StateChangedType nType )
{ {
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Font aFont = rStyleSettings.GetGroupFont(); vcl::Font aFont = rStyleSettings.GetGroupFont();
if ( IsControlFont() ) if ( IsControlFont() )
aFont.Merge( GetControlFont() ); aFont.Merge( GetControlFont() );
SetZoomedPointFont( aFont ); SetZoomedPointFont( aFont );

View File

@ -48,7 +48,7 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) :
SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor()))); SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor())));
SetTextColor(aSystemStyle.GetButtonTextColor()); SetTextColor(aSystemStyle.GetButtonTextColor());
Font aFont( GetFont() ); vcl::Font aFont( GetFont() );
aFont.SetTransparent( true ); aFont.SetTransparent( true );
SetFont( aFont ); SetFont( aFont );
} }
@ -173,7 +173,7 @@ void OTableWindowTitle::StateChanged( StateChangedType nType )
{ {
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Font aFont = rStyleSettings.GetGroupFont(); vcl::Font aFont = rStyleSettings.GetGroupFont();
if ( IsControlFont() ) if ( IsControlFont() )
aFont.Merge( GetControlFont() ); aFont.Merge( GetControlFont() );
SetZoomedPointFont( aFont ); SetZoomedPointFont( aFont );

View File

@ -57,7 +57,7 @@ void OTableRowView::Init()
{ {
EditBrowseBox::Init(); EditBrowseBox::Init();
Font aFont( GetDataWindow().GetFont() ); vcl::Font aFont( GetDataWindow().GetFont() );
aFont.SetWeight( WEIGHT_NORMAL ); aFont.SetWeight( WEIGHT_NORMAL );
GetDataWindow().SetFont( aFont ); GetDataWindow().SetFont( aFont );

View File

@ -122,7 +122,7 @@ void OTableBorderWindow::ImplInitSettings( bool bFont, bool bForeground, bool bB
if ( bFont ) if ( bFont )
{ {
Font aFont = rStyleSettings.GetAppFont(); vcl::Font aFont = rStyleSettings.GetAppFont();
if ( IsControlFont() ) if ( IsControlFont() )
aFont.Merge( GetControlFont() ); aFont.Merge( GetControlFont() );
SetPointFont( aFont ); SetPointFont( aFont );

View File

@ -537,8 +537,8 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
DrawImage( aPos, Size( ICON_WIDTH, ICON_HEIGHT ), aImage ); DrawImage( aPos, Size( ICON_WIDTH, ICON_HEIGHT ), aImage );
// Setup fonts // Setup fonts
Font aStdFont( GetFont() ); vcl::Font aStdFont( GetFont() );
Font aBoldFont( aStdFont ); vcl::Font aBoldFont( aStdFont );
aBoldFont.SetWeight( WEIGHT_BOLD ); aBoldFont.SetWeight( WEIGHT_BOLD );
SetFont( aBoldFont ); SetFont( aBoldFont );
long aTextHeight = GetTextHeight(); long aTextHeight = GetTextHeight();

View File

@ -625,7 +625,7 @@ void SplashScreen::Paint( const Rectangle&)
_vdev.SetFillColor( _cProgressBarColor ); _vdev.SetFillColor( _cProgressBarColor );
_vdev.SetLineColor(); _vdev.SetLineColor();
_vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace)); _vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace));
Font aFont; vcl::Font aFont;
aFont.SetSize(Size(0, 12)); aFont.SetSize(Size(0, 12));
aFont.SetAlign(ALIGN_BASELINE); aFont.SetAlign(ALIGN_BASELINE);
_vdev.SetFont(aFont); _vdev.SetFont(aFont);

View File

@ -87,7 +87,7 @@ namespace
basegfx::B2DPolyPolygon maClipPolyPoygon; basegfx::B2DPolyPolygon maClipPolyPoygon;
/// font, etc. /// font, etc.
Font maFont; vcl::Font maFont;
RasterOp maRasterOp; RasterOp maRasterOp;
ComplexTextLayoutMode mnLayoutMode; ComplexTextLayoutMode mnLayoutMode;
LanguageType maLanguageType; LanguageType maLanguageType;
@ -175,8 +175,8 @@ namespace
bool getClipPolyPolygonActive() const { return mbClipPolyPolygonActive; } bool getClipPolyPolygonActive() const { return mbClipPolyPolygonActive; }
void setClipPolyPolygonActive(bool bNew) { if(bNew != mbClipPolyPolygonActive) mbClipPolyPolygonActive = bNew; } void setClipPolyPolygonActive(bool bNew) { if(bNew != mbClipPolyPolygonActive) mbClipPolyPolygonActive = bNew; }
const Font& getFont() const { return maFont; } const vcl::Font& getFont() const { return maFont; }
void setFont(const Font& rFont) { if(rFont != maFont) maFont = rFont; } void setFont(const vcl::Font& rFont) { if(rFont != maFont) maFont = rFont; }
const RasterOp& getRasterOp() const { return maRasterOp; } const RasterOp& getRasterOp() const { return maRasterOp; }
void setRasterOp(const RasterOp& rRasterOp) { if(rRasterOp != maRasterOp) maRasterOp = rRasterOp; } void setRasterOp(const RasterOp& rRasterOp) { if(rRasterOp != maRasterOp) maRasterOp = rRasterOp; }
@ -302,7 +302,7 @@ namespace
{ {
if(pLast->getFont().GetAlign() != pTip->getFont().GetAlign()) if(pLast->getFont().GetAlign() != pTip->getFont().GetAlign())
{ {
Font aFont(pLast->getFont()); vcl::Font aFont(pLast->getFont());
aFont.SetAlign(pTip->getFont().GetAlign()); aFont.SetAlign(pTip->getFont().GetAlign());
pLast->setFont(aFont); pLast->setFont(aFont);
} }
@ -1200,7 +1200,7 @@ namespace
} }
/** helper to decide UnderlineAbove for text primitives */ /** helper to decide UnderlineAbove for text primitives */
bool isUnderlineAbove(const Font& rFont) bool isUnderlineAbove(const vcl::Font& rFont)
{ {
if(!rFont.IsVertical()) if(!rFont.IsVertical())
{ {
@ -1222,7 +1222,7 @@ namespace
basegfx::B2DVector& rAlignmentOffset, basegfx::B2DVector& rAlignmentOffset,
PropertyHolder& rProperty) PropertyHolder& rProperty)
{ {
const Font& rFont = rProperty.getFont(); const vcl::Font& rFont = rProperty.getFont();
basegfx::B2DVector aFontScaling; basegfx::B2DVector aFontScaling;
rFontAttribute = drawinglayer::attribute::FontAttribute( rFontAttribute = drawinglayer::attribute::FontAttribute(
@ -1273,7 +1273,7 @@ namespace
PropertyHolder& rProperty) PropertyHolder& rProperty)
{ {
drawinglayer::primitive2d::BasePrimitive2D* pResult = 0; drawinglayer::primitive2d::BasePrimitive2D* pResult = 0;
const Font& rFont = rProperty.getFont(); const vcl::Font& rFont = rProperty.getFont();
basegfx::B2DVector aAlignmentOffset(0.0, 0.0); basegfx::B2DVector aAlignmentOffset(0.0, 0.0);
if(nTextLength) if(nTextLength)
@ -2121,7 +2121,7 @@ namespace
// for sub-Mteafile contents, do start with new, default render state // for sub-Mteafile contents, do start with new, default render state
// #i124686# ...but copy font, this is already set accordingly // #i124686# ...but copy font, this is already set accordingly
Font aTargetFont = rPropertyHolders.Current().getFont(); vcl::Font aTargetFont = rPropertyHolders.Current().getFont();
rPropertyHolders.PushDefault(); rPropertyHolders.PushDefault();
rPropertyHolders.Current().setFont(aTargetFont); rPropertyHolders.Current().setFont(aTargetFont);
@ -2660,7 +2660,7 @@ namespace
// playing the Metafile) // playing the Metafile)
if(rPropertyHolders.Current().getFont().GetAlign() != aNewTextAlign) if(rPropertyHolders.Current().getFont().GetAlign() != aNewTextAlign)
{ {
Font aNewFont(rPropertyHolders.Current().getFont()); vcl::Font aNewFont(rPropertyHolders.Current().getFont());
aNewFont.SetAlign(aNewTextAlign); aNewFont.SetAlign(aNewTextAlign);
rPropertyHolders.Current().setFont(aNewFont); rPropertyHolders.Current().setFont(aNewFont);
} }
@ -2735,7 +2735,7 @@ namespace
{ {
// this should not happen but i got Metafiles where this was the // this should not happen but i got Metafiles where this was the
// case. A height needs to be guessed (similar to OutputDevice::ImplNewFont()) // 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) // guess 16 pixel (as in VCL)
aFontSize = Size(0, 16); aFontSize = Size(0, 16);

View File

@ -155,7 +155,7 @@ namespace drawinglayer
releaseGlobalVirtualDevice(); releaseGlobalVirtualDevice();
} }
void TextLayouterDevice::setFont(const Font& rFont) void TextLayouterDevice::setFont(const vcl::Font& rFont)
{ {
mrDevice.SetFont( rFont ); mrDevice.SetFont( rFont );
} }
@ -365,7 +365,7 @@ namespace drawinglayer
{ {
namespace primitive2d namespace primitive2d
{ {
Font getVclFontFromFontAttribute( vcl::Font getVclFontFromFontAttribute(
const attribute::FontAttribute& rFontAttribute, const attribute::FontAttribute& rFontAttribute,
double fFontScaleX, double fFontScaleX,
double fFontScaleY, double fFontScaleY,
@ -381,7 +381,7 @@ namespace drawinglayer
// for WIN32 systems, start with creating an unscaled font. If FontScaling // 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 // is wanted, that width needs to be adapted using FontMetric again to get a
// width of the unscaled font // width of the unscaled font
Font aRetval( vcl::Font aRetval(
rFontAttribute.getFamilyName(), rFontAttribute.getFamilyName(),
rFontAttribute.getStyleName(), rFontAttribute.getStyleName(),
Size(0, nHeight)); Size(0, nHeight));
@ -391,7 +391,7 @@ namespace drawinglayer
// FontWidth when no scaling is used to explicitly have that zero when e.g. the // 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 // 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) // set FontWidth; import that in a WIN32 system, and trouble is there)
Font aRetval( vcl::Font aRetval(
rFontAttribute.getFamilyName(), rFontAttribute.getFamilyName(),
rFontAttribute.getStyleName(), rFontAttribute.getStyleName(),
Size(bFontIsScaled ? nWidth : 0, nHeight)); Size(bFontIsScaled ? nWidth : 0, nHeight));
@ -432,7 +432,7 @@ namespace drawinglayer
attribute::FontAttribute getFontAttributeFromVclFont( attribute::FontAttribute getFontAttributeFromVclFont(
basegfx::B2DVector& o_rSize, basegfx::B2DVector& o_rSize,
const Font& rFont, const vcl::Font& rFont,
bool bRTL, bool bRTL,
bool bBiDiStrong) bool bBiDiStrong)
{ {

View File

@ -139,7 +139,7 @@ namespace drawinglayer
if(basegfx::fTools::more(aFontScaling.getX(), 0.0) && basegfx::fTools::more(aFontScaling.getY(), 0.0)) if(basegfx::fTools::more(aFontScaling.getX(), 0.0) && basegfx::fTools::more(aFontScaling.getY(), 0.0))
{ {
// Get the VCL font (use FontHeight as FontWidth) // Get the VCL font (use FontHeight as FontWidth)
Font aFont(primitive2d::getVclFontFromFontAttribute( vcl::Font aFont(primitive2d::getVclFontFromFontAttribute(
rTextCandidate.getFontAttribute(), rTextCandidate.getFontAttribute(),
aFontScaling.getX(), aFontScaling.getX(),
aFontScaling.getY(), aFontScaling.getY(),

View File

@ -1996,7 +1996,7 @@ void EditDoc::RemoveItemsFromPool(const ContentNode& rNode)
void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, short nScriptType ) void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, short nScriptType )
{ {
Font aPrevFont( rFont ); vcl::Font aPrevFont( rFont );
rFont.SetAlign( ALIGN_BASELINE ); rFont.SetAlign( ALIGN_BASELINE );
rFont.SetTransparent( true ); rFont.SetTransparent( true );
@ -2255,7 +2255,7 @@ EditPaM EditDoc::RemoveText()
ContentNode* pPrevFirstNode = GetObject(0); ContentNode* pPrevFirstNode = GetObject(0);
SfxStyleSheet* pPrevStyle = pPrevFirstNode->GetStyleSheet(); SfxStyleSheet* pPrevStyle = pPrevFirstNode->GetStyleSheet();
SfxItemSet aPrevSet( pPrevFirstNode->GetContentAttribs().GetItems() ); SfxItemSet aPrevSet( pPrevFirstNode->GetContentAttribs().GetItems() );
Font aPrevFont( pPrevFirstNode->GetCharAttribs().GetDefFont() ); vcl::Font aPrevFont( pPrevFirstNode->GetCharAttribs().GetDefFont() );
ImplDestroyContents(); ImplDestroyContents();

View File

@ -1747,7 +1747,7 @@ void EditEngine::RemoveAttribs( const ESelection& rSelection, bool bRemoveParaAt
pImpEditEngine->FormatAndUpdate(); pImpEditEngine->FormatAndUpdate();
} }
Font EditEngine::GetStandardFont( sal_Int32 nPara ) vcl::Font EditEngine::GetStandardFont( sal_Int32 nPara )
{ {
return GetStandardSvxFont( nPara ); return GetStandardSvxFont( nPara );
} }
@ -2578,7 +2578,7 @@ SfxItemPool& EditEngine::GetGlobalItemPool()
return *pGlobalPool; return *pGlobalPool;
} }
void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const Font& rFont ) void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const vcl::Font& rFont )
{ {
SvxFont aSvxFont( rFont ); SvxFont aSvxFont( rFont );
SetFontInfoInItemSet( rSet, aSvxFont ); SetFontInfoInItemSet( rSet, aSvxFont );
@ -2609,7 +2609,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont )
rSet.Put( SvxCharReliefItem( rFont.GetRelief(), EE_CHAR_RELIEF ) ); 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; SvxFont aFont;
CreateFont( aFont, rItemSet, true, nScriptType ); CreateFont( aFont, rItemSet, true, nScriptType );

View File

@ -704,7 +704,7 @@ EESpellState EditView::StartThesaurus()
} }
void EditView::StartTextConversion( 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 ) sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc )
{ {
pImpEditView->pEditEngine->pImpEditEngine->Convert( this, nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc ); pImpEditView->pEditEngine->pImpEditEngine->Convert( this, nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc );

View File

@ -652,7 +652,7 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
// Choose a proportional Font for Pre // Choose a proportional Font for Pre
if ( nHLevel == STYLE_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 ); SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO );
aItems.Put( aFontItem ); aItems.Put( aFontItem );

View File

@ -151,7 +151,7 @@ void EditRTFParser::AddRTFDefaultValues( const EditPaM& rStart, const EditPaM& r
MapMode _aEditMapMode(mpEditEngine->GetRefDevice()->GetMapMode().GetMapUnit()); MapMode _aEditMapMode(mpEditEngine->GetRefDevice()->GetMapMode().GetMapUnit());
aSz = mpEditEngine->GetRefDevice()->LogicToLogic(aSz, &aPntMode, &_aEditMapMode); aSz = mpEditEngine->GetRefDevice()->LogicToLogic(aSz, &aPntMode, &_aEditMapMode);
SvxFontHeightItem aFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT ); SvxFontHeightItem aFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT );
Font aDefFont( GetDefFont() ); vcl::Font aDefFont( GetDefFont() );
SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetName(), SvxFontItem aFontItem( aDefFont.GetFamily(), aDefFont.GetName(),
aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO ); aDefFont.GetStyleName(), aDefFont.GetPitch(), aDefFont.GetCharSet(), EE_CHAR_FONTINFO );

View File

@ -107,7 +107,7 @@ public:
GetDestCharSet() const { return eDestCharSet; } GetDestCharSet() const { return eDestCharSet; }
sal_uInt16 GetDefTab() const { return nDefTab; } sal_uInt16 GetDefTab() const { return nDefTab; }
Font GetDefFont() { return GetFont( nDefFont ); } vcl::Font GetDefFont() { return GetFont( nDefFont ); }
EditPaM GetCurPaM() const { return aCurSel.Max(); } EditPaM GetCurPaM() const { return aCurSel.Max(); }
}; };

View File

@ -915,14 +915,14 @@ public:
ImpSpell( EditView* pEditView ); ImpSpell( EditView* pEditView );
// text conversion functions // 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, 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; } ConvInfo * GetConvInfo() const { return pConvInfo; }
bool HasConvertibleTextPortion( LanguageType nLang ); bool HasConvertibleTextPortion( LanguageType nLang );
void SetLanguageAndFont( const ESelection &rESel, void SetLanguageAndFont( const ESelection &rESel,
LanguageType nLang, sal_uInt16 nLangWhichId, 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 // returns true if input sequence checking should be applied
bool IsInputSequenceCheckingRequired( sal_Unicode nChar, const EditSelection& rCurSel ) const; bool IsInputSequenceCheckingRequired( sal_Unicode nChar, const EditSelection& rCurSel ) const;

View File

@ -368,7 +368,7 @@ void ImpEditEngine::FormatDoc()
long nY = 0; long nY = 0;
bool bGrow = false; bool bGrow = false;
Font aOldFont( GetRefDevice()->GetFont() ); vcl::Font aOldFont( GetRefDevice()->GetFont() );
// Here already, so that not always in CreateLines... // Here already, so that not always in CreateLines...
bool bMapChanged = ImpCheckRefMapMode(); bool bMapChanged = ImpCheckRefMapMode();
@ -2857,7 +2857,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
Point aRedLineTmpPos; Point aRedLineTmpPos;
DBG_ASSERT( GetParaPortions().Count(), "No ParaPortion?!" ); DBG_ASSERT( GetParaPortions().Count(), "No ParaPortion?!" );
SvxFont aTmpFont( GetParaPortions()[0]->GetNode()->GetCharAttribs().GetDefFont() ); 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() ); vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOutDev->GetExtOutDevData() );
// In the case of rotated text is aStartPos considered TopLeft because // 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() ]); pTmpDXArray.reset(new long[ aText.getLength() ]);
pDXArray = pTmpDXArray.get(); pDXArray = pTmpDXArray.get();
Font _aOldFont( GetRefDevice()->GetFont() ); vcl::Font _aOldFont( GetRefDevice()->GetFont() );
aTmpFont.SetPhysFont( GetRefDevice() ); aTmpFont.SetPhysFont( GetRefDevice() );
aTmpFont.QuickGetTextSize( GetRefDevice(), aText, nTextStart, nTextLen, pTmpDXArray.get() ); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, nTextStart, nTextLen, pTmpDXArray.get() );
if ( aStatus.DoRestoreFont() ) if ( aStatus.DoRestoreFont() )
@ -3216,7 +3216,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
// crash when accessing 0 pointer in pDXArray // crash when accessing 0 pointer in pDXArray
pTmpDXArray.reset(new long[ aText.getLength() ]); pTmpDXArray.reset(new long[ aText.getLength() ]);
pDXArray = pTmpDXArray.get(); pDXArray = pTmpDXArray.get();
Font _aOldFont( GetRefDevice()->GetFont() ); vcl::Font _aOldFont( GetRefDevice()->GetFont() );
aTmpFont.SetPhysFont( GetRefDevice() ); aTmpFont.SetPhysFont( GetRefDevice() );
aTmpFont.QuickGetTextSize( GetRefDevice(), aText, 0, aText.getLength(), pTmpDXArray.get() ); aTmpFont.QuickGetTextSize( GetRefDevice(), aText, 0, aText.getLength(), pTmpDXArray.get() );
if ( aStatus.DoRestoreFont() ) if ( aStatus.DoRestoreFont() )
@ -3925,7 +3925,7 @@ void ImpEditEngine::ShowParagraph( sal_Int32 nParagraph, bool bShow )
{ {
if ( pPPortion->IsInvalid() ) if ( pPPortion->IsInvalid() )
{ {
Font aOldFont( GetRefDevice()->GetFont() ); vcl::Font aOldFont( GetRefDevice()->GetFont() );
CreateLines( nParagraph, 0 ); // 0: No TextRanger CreateLines( nParagraph, 0 ); // 0: No TextRanger
if ( aStatus.DoRestoreFont() ) if ( aStatus.DoRestoreFont() )
GetRefDevice()->SetFont( aOldFont ); GetRefDevice()->SetFont( aOldFont );

View File

@ -1551,7 +1551,7 @@ bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang )
void ImpEditEngine::Convert( EditView* pEditView, 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 ) sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc )
{ {
// modified version of ImpEditEngine::Spell // modified version of ImpEditEngine::Spell
@ -1641,7 +1641,7 @@ void ImpEditEngine::Convert( EditView* pEditView,
void ImpEditEngine::SetLanguageAndFont( void ImpEditEngine::SetLanguageAndFont(
const ESelection &rESel, const ESelection &rESel,
LanguageType nLang, sal_uInt16 nLangWhichId, LanguageType nLang, sal_uInt16 nLangWhichId,
const Font *pFont, sal_uInt16 nFontWhichId ) const vcl::Font *pFont, sal_uInt16 nFontWhichId )
{ {
ESelection aOldSel = pActiveView->GetSelection(); ESelection aOldSel = pActiveView->GetSelection();
pActiveView->SetSelection( rESel ); pActiveView->SetSelection( rESel );
@ -1674,7 +1674,7 @@ void ImpEditEngine::SetLanguageAndFont(
void ImpEditEngine::ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, void ImpEditEngine::ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang,
EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange, EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange,
bool bAllowImplicitChangesForNotConvertibleText, bool bAllowImplicitChangesForNotConvertibleText,
LanguageType nTargetLang, const Font *pTargetFont ) LanguageType nTargetLang, const vcl::Font *pTargetFont )
{ {
// modified version of ImpEditEngine::ImpSpell // modified version of ImpEditEngine::ImpSpell

View File

@ -46,7 +46,7 @@ TextConvWrapper::TextConvWrapper( Window* pWindow,
const Reference< XComponentContext >& rxContext, const Reference< XComponentContext >& rxContext,
const Locale& rSourceLocale, const Locale& rSourceLocale,
const Locale& rTargetLocale, const Locale& rTargetLocale,
const Font* pTargetFont, const vcl::Font* pTargetFont,
sal_Int32 nOptions, sal_Int32 nOptions,
bool bIsInteractive, bool bIsInteractive,
bool bIsStart, bool bIsStart,
@ -245,7 +245,7 @@ bool TextConvWrapper::ConvContinue_impl()
void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel, void TextConvWrapper::SetLanguageAndFont( const ESelection &rESel,
LanguageType nLang, sal_uInt16 nLangWhichId, LanguageType nLang, sal_uInt16 nLangWhichId,
const Font *pFont, sal_uInt16 nFontWhichId ) const vcl::Font *pFont, sal_uInt16 nFontWhichId )
{ {
ESelection aOldSel = m_pEditView->GetSelection(); ESelection aOldSel = m_pEditView->GetSelection();
m_pEditView->SetSelection( rESel ); m_pEditView->SetSelection( rESel );

View File

@ -90,7 +90,7 @@ protected:
void SetLanguageAndFont( const ESelection &rESel, void SetLanguageAndFont( const ESelection &rESel,
LanguageType nLang, sal_uInt16 nLangWhichId, LanguageType nLang, sal_uInt16 nLangWhichId,
const Font *pFont, sal_uInt16 nFontWhichId ); const vcl::Font *pFont, sal_uInt16 nFontWhichId );
public: public:
@ -98,7 +98,7 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, 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& rSourceLocale,
const ::com::sun::star::lang::Locale& rTargetLocale, const ::com::sun::star::lang::Locale& rTargetLocale,
const Font* pTargetFont, const vcl::Font* pTargetFont,
sal_Int32 nOptions, sal_Int32 nOptions,
bool bIsInteractive, bool bIsInteractive,
bool bIsStart, EditView* pView ); bool bIsStart, EditView* pView );

View File

@ -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; 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; Color aColor;
ReadColor( rStream, aColor ); aFont.SetColor( aColor ); ReadColor( rStream, aColor ); aFont.SetColor( aColor );
sal_uInt16 nTemp; sal_uInt16 nTemp;
@ -237,8 +237,8 @@ sal_uInt16 SvxBulletItem::GetVersion( sal_uInt16 /*nVersion*/ ) const
void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom ) void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom )
{ {
Font _aFont = GetFont(); vcl::Font _aFont = GetFont();
Font aNewFont = rCopyFrom.GetFont(); vcl::Font aNewFont = rCopyFrom.GetFont();
if ( rCopyFrom.IsValid( VALID_FONTNAME ) ) if ( rCopyFrom.IsValid( VALID_FONTNAME ) )
{ {
_aFont.SetName( aNewFont.GetName() ); _aFont.SetName( aNewFont.GetName() );

View File

@ -219,7 +219,7 @@ SvxNumberFormat::SvxNumberFormat( SvStream &rStream )
rStream.ReadUInt16( hasBulletFont ); rStream.ReadUInt16( hasBulletFont );
if ( hasBulletFont ) if ( hasBulletFont )
{ {
pBulletFont = new Font( ); pBulletFont = new vcl::Font( );
ReadFont( rStream, *pBulletFont ); ReadFont( rStream, *pBulletFont );
} }
else pBulletFont = NULL; else pBulletFont = NULL;
@ -345,7 +345,7 @@ SvxNumberFormat& SvxNumberFormat::operator=( const SvxNumberFormat& rFormat )
} }
DELETEZ(pBulletFont); DELETEZ(pBulletFont);
if(rFormat.pBulletFont) if(rFormat.pBulletFont)
pBulletFont = new Font(*rFormat.pBulletFont); pBulletFont = new vcl::Font(*rFormat.pBulletFont);
return *this; return *this;
} }
@ -443,10 +443,10 @@ sal_Int16 SvxNumberFormat::GetVertOrient() const
return eVertOrient; return eVertOrient;
} }
void SvxNumberFormat::SetBulletFont(const Font* pFont) void SvxNumberFormat::SetBulletFont(const vcl::Font* pFont)
{ {
delete pBulletFont; delete pBulletFont;
pBulletFont = pFont ? new Font(*pFont): 0; pBulletFont = pFont ? new vcl::Font(*pFont): 0;
} }
void SvxNumberFormat::SetPositionAndSpaceMode( SvxNumPositionAndSpaceMode ePositionAndSpaceMode ) void SvxNumberFormat::SetPositionAndSpaceMode( SvxNumPositionAndSpaceMode ePositionAndSpaceMode )

View File

@ -39,7 +39,7 @@ SvxFont::SvxFont()
SetLanguage(LANGUAGE_SYSTEM); SetLanguage(LANGUAGE_SYSTEM);
} }
SvxFont::SvxFont( const Font &rFont ) SvxFont::SvxFont( const vcl::Font &rFont )
: Font( rFont ) : Font( rFont )
{ {
nKern = nEsc = 0; nKern = nEsc = 0;
@ -319,7 +319,7 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo) const
void SvxFont::SetPhysFont( OutputDevice *pOut ) const void SvxFont::SetPhysFont( OutputDevice *pOut ) const
{ {
const Font& rCurrentFont = pOut->GetFont(); const vcl::Font& rCurrentFont = pOut->GetFont();
if ( nPropr == 100 ) if ( nPropr == 100 )
{ {
if ( !rCurrentFont.IsSameInstance( *this ) ) 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 ); SetPhysFont( pOut );
return aOldFont; 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 ); Font::operator=( rFont );
return *this; return *this;

View File

@ -3470,7 +3470,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
for ( sal_uInt16 n = 0; n < nItemCnt; ++n ) 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, aOutTypeArr[ n ].nLanguage,
DEFAULTFONT_FLAGS_ONLYONE, 0 ) ); DEFAULTFONT_FLAGS_ONLYONE, 0 ) );
SvxFontItem* pItem = aItemArr[ n ]; SvxFontItem* pItem = aItemArr[ n ];

View File

@ -82,7 +82,7 @@ namespace editeng
// save the applications from always converting to this // save the applications from always converting to this
// type in their implementations // type in their implementations
LanguageType m_nTargetLang; // target language of new replacement text 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') sal_Int32 m_nConvOptions; // text conversion options (as used by 'getConversions')
bool m_bIsInteractive; // specifies if the conversion requires user interaction bool m_bIsInteractive; // specifies if the conversion requires user interaction
// (and likeley a specialised dialog) or if it is to run // (and likeley a specialised dialog) or if it is to run
@ -123,7 +123,7 @@ namespace editeng
const Reference< XComponentContext >& rxContext, const Reference< XComponentContext >& rxContext,
const Locale& _rSourceLocale, const Locale& _rSourceLocale,
const Locale& _rTargetLocale, const Locale& _rTargetLocale,
const Font* _pTargetFont, const vcl::Font* _pTargetFont,
sal_Int32 _nConvOptions, sal_Int32 _nConvOptions,
bool _bIsInteractive, bool _bIsInteractive,
HangulHanjaConversion* _pAntiImpl ); HangulHanjaConversion* _pAntiImpl );
@ -137,7 +137,7 @@ namespace editeng
inline LanguageType GetSourceLang() const { return m_nSourceLang; } inline LanguageType GetSourceLang() const { return m_nSourceLang; }
inline LanguageType GetTargetLang() const { return m_nTargetLang; } 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 sal_Int32 GetConvOptions() const { return m_nConvOptions; }
inline bool IsInteractive() const { return m_bIsInteractive; } inline bool IsInteractive() const { return m_bIsInteractive; }
@ -233,7 +233,7 @@ namespace editeng
const Reference< XComponentContext >& rxContext, const Reference< XComponentContext >& rxContext,
const Locale& _rSourceLocale, const Locale& _rSourceLocale,
const Locale& _rTargetLocale, const Locale& _rTargetLocale,
const Font* _pTargetFont, const vcl::Font* _pTargetFont,
sal_Int32 _nOptions, sal_Int32 _nOptions,
bool _bIsInteractive, bool _bIsInteractive,
HangulHanjaConversion* _pAntiImpl ) HangulHanjaConversion* _pAntiImpl )
@ -968,7 +968,7 @@ namespace editeng
HangulHanjaConversion::HangulHanjaConversion( Window* _pUIParent, HangulHanjaConversion::HangulHanjaConversion( Window* _pUIParent,
const Reference< XComponentContext >& rxContext, const Reference< XComponentContext >& rxContext,
const Locale& _rSourceLocale, const Locale& _rTargetLocale, const Locale& _rSourceLocale, const Locale& _rTargetLocale,
const Font* _pTargetFont, const vcl::Font* _pTargetFont,
sal_Int32 _nOptions, bool _bIsInteractive) sal_Int32 _nOptions, bool _bIsInteractive)
:m_pImpl( new HangulHanjaConversion_Impl( _pUIParent, rxContext, _rSourceLocale, _rTargetLocale, _pTargetFont, _nOptions, _bIsInteractive, this ) ) :m_pImpl( new HangulHanjaConversion_Impl( _pUIParent, rxContext, _rSourceLocale, _rTargetLocale, _pTargetFont, _nOptions, _bIsInteractive, this ) )
{ {
@ -998,7 +998,7 @@ namespace editeng
return m_pImpl->GetTargetLang(); return m_pImpl->GetTargetLang();
} }
const Font * HangulHanjaConversion::GetTargetFont( ) const const vcl::Font * HangulHanjaConversion::GetTargetFont( ) const
{ {
return m_pImpl->GetTargetFont(); return m_pImpl->GetTargetFont();
} }

View File

@ -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 ); const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
DBG_ASSERT( pFmt && ( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) && ( pFmt->GetNumberingType() != SVX_NUM_NUMBER_NONE ), "ImpCalcBulletFont: Missing or BitmapBullet!" ); 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() ) if ( !pEditEngine->IsFlatMode() )
{ {
ESelection aSel( nPara, 0, nPara, 0 ); ESelection aSel( nPara, 0, nPara, 0 );
@ -869,8 +869,8 @@ Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const
aStdFont = pEditEngine->GetStandardFont( nPara ); aStdFont = pEditEngine->GetStandardFont( nPara );
} }
Font aBulletFont; vcl::Font aBulletFont;
const Font *pSourceFont = 0; const vcl::Font *pSourceFont = 0;
if ( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL ) if ( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL )
{ {
pSourceFont = pFmt->GetBulletFont(); pSourceFont = pFmt->GetBulletFont();
@ -949,11 +949,11 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
{ {
if( pFmt->GetNumberingType() != SVX_NUM_BITMAP ) if( pFmt->GetNumberingType() != SVX_NUM_BITMAP )
{ {
Font aBulletFont( ImpCalcBulletFont( nPara ) ); vcl::Font aBulletFont( ImpCalcBulletFont( nPara ) );
// Use baseline // Use baseline
bool bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL; bool bSymbol = pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL;
aBulletFont.SetAlign( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE ); aBulletFont.SetAlign( bSymbol ? ALIGN_BOTTOM : ALIGN_BASELINE );
Font aOldFont = pOutDev->GetFont(); vcl::Font aOldFont = pOutDev->GetFont();
pOutDev->SetFont( aBulletFont ); pOutDev->SetFont( aBulletFont );
ParagraphInfos aParaInfos = pEditEngine->GetParagraphInfos( nPara ); ParagraphInfos aParaInfos = pEditEngine->GetParagraphInfos( nPara );
@ -990,7 +990,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
aTextPos = aRotatedPos; aTextPos = aRotatedPos;
// Translation... // Translation...
aTextPos += rOrigin; aTextPos += rOrigin;
Font aRotatedFont( aBulletFont ); vcl::Font aRotatedFont( aBulletFont );
aRotatedFont.SetOrientation( nOrientation ); aRotatedFont.SetOrientation( nOrientation );
pOutDev->SetFont( aRotatedFont ); pOutDev->SetFont( aRotatedFont );
} }
@ -1004,7 +1004,7 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
if(bStrippingPortions) if(bStrippingPortions)
{ {
const Font aSvxFont(pOutDev->GetFont()); const vcl::Font aSvxFont(pOutDev->GetFont());
boost::scoped_array<long> pBuf(new long[ pPara->GetText().getLength() ]); boost::scoped_array<long> pBuf(new long[ pPara->GetText().getLength() ]);
pOutDev->GetTextArray( pPara->GetText(), pBuf.get() ); pOutDev->GetTextArray( pPara->GetText(), pBuf.get() );
@ -1479,8 +1479,8 @@ Size Outliner::ImplGetBulletSize( sal_Int32 nPara )
{ {
OUString aBulletText = ImplGetBulletText( nPara ); OUString aBulletText = ImplGetBulletText( nPara );
OutputDevice* pRefDev = pEditEngine->GetRefDevice(); OutputDevice* pRefDev = pEditEngine->GetRefDevice();
Font aBulletFont( ImpCalcBulletFont( nPara ) ); vcl::Font aBulletFont( ImpCalcBulletFont( nPara ) );
Font aRefFont( pRefDev->GetFont()); vcl::Font aRefFont( pRefDev->GetFont());
pRefDev->SetFont( aBulletFont ); pRefDev->SetFont( aBulletFont );
pPara->aBulSize.Width() = pRefDev->GetTextWidth( aBulletText ); pPara->aBulSize.Width() = pRefDev->GetTextWidth( aBulletText );
pPara->aBulSize.Height() = pRefDev->GetTextHeight(); 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 ... // 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 ) ) 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 ) if ( aBulletFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL )
{ {
OutputDevice* pRefDev = pEditEngine->GetRefDevice(); OutputDevice* pRefDev = pEditEngine->GetRefDevice();
Font aOldFont = pRefDev->GetFont(); vcl::Font aOldFont = pRefDev->GetFont();
pRefDev->SetFont( aBulletFont ); pRefDev->SetFont( aBulletFont );
FontMetric aMetric( pRefDev->GetFontMetric() ); FontMetric aMetric( pRefDev->GetFontMetric() );
// Leading on the first line ... // Leading on the first line ...

View File

@ -1270,7 +1270,7 @@ EESpellState OutlinerView::StartThesaurus()
} }
void OutlinerView::StartTextConversion( 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 ) sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc )
{ {
if ( if (

View File

@ -646,7 +646,7 @@ SET_FONTALIGNMENT:
case RTF_F: case RTF_F:
case RTF_AF: case RTF_AF:
{ {
const Font& rSVFont = GetFont( sal_uInt16(nTokenValue) ); const vcl::Font& rSVFont = GetFont( sal_uInt16(nTokenValue) );
SvxFontItem aTmpItem( rSVFont.GetFamily(), SvxFontItem aTmpItem( rSVFont.GetFamily(),
rSVFont.GetName(), rSVFont.GetStyleName(), rSVFont.GetName(), rSVFont.GetStyleName(),
rSVFont.GetPitch(), rSVFont.GetCharSet(), rSVFont.GetPitch(), rSVFont.GetCharSet(),
@ -1804,7 +1804,7 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
//we can fall back to the ansicpg set codeset //we can fall back to the ansicpg set codeset
if (nDfltFont != -1) if (nDfltFont != -1)
{ {
const Font& rSVFont = GetFont(sal_uInt16(nDfltFont)); const vcl::Font& rSVFont = GetFont(sal_uInt16(nDfltFont));
SetEncoding(rSVFont.GetCharSet()); SetEncoding(rSVFont.GetCharSet());
} }
else else
@ -1828,7 +1828,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
{ {
if( -1 == nValue ) if( -1 == nValue )
nValue = 0; nValue = 0;
const Font& rSVFont = GetFont( sal_uInt16(nValue) ); const vcl::Font& rSVFont = GetFont( sal_uInt16(nValue) );
SvxFontItem aTmpItem( SvxFontItem aTmpItem(
rSVFont.GetFamily(), rSVFont.GetName(), rSVFont.GetFamily(), rSVFont.GetName(),
rSVFont.GetStyleName(), rSVFont.GetPitch(), rSVFont.GetStyleName(), rSVFont.GetPitch(),

View File

@ -90,7 +90,7 @@ SvxRTFParser::SvxRTFParser( SfxItemPool& rPool, SvStream& rIn,
aPardMap.insert( aPardMap.begin(), (sal_uInt16*)&aTmp, aPardMap.insert( aPardMap.begin(), (sal_uInt16*)&aTmp,
(sal_uInt16*)&aTmp + (sizeof( RTFPardAttrMapIds ) / sizeof(sal_uInt16)) ); (sal_uInt16*)&aTmp + (sizeof( RTFPardAttrMapIds ) / sizeof(sal_uInt16)) );
} }
pDfltFont = new Font; pDfltFont = new vcl::Font;
pDfltColor = new Color; pDfltColor = new Color;
} }
@ -465,7 +465,7 @@ void SvxRTFParser::ReadFontTable()
{ {
int nToken; int nToken;
int _nOpenBrakets = 1; // the first was already detected earlier!! int _nOpenBrakets = 1; // the first was already detected earlier!!
Font* pFont = new Font(); vcl::Font* pFont = new vcl::Font();
short nFontNo(0), nInsFontNo (0); short nFontNo(0), nInsFontNo (0);
OUString sAltNm, sFntNm; OUString sAltNm, sFntNm;
bool bIsAltFntNm = false, bCheckNewFont; bool bIsAltFntNm = false, bCheckNewFont;
@ -582,7 +582,7 @@ void SvxRTFParser::ReadFontTable()
pFont->SetName( sFntNm ); pFont->SetName( sFntNm );
aFontTbl.insert( nInsFontNo, pFont ); aFontTbl.insert( nInsFontNo, pFont );
pFont = new Font(); pFont = new vcl::Font();
pFont->SetCharSet( nSystemChar ); pFont->SetCharSet( nSystemChar );
sAltNm = ""; sAltNm = "";
sFntNm = ""; 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 ); SvxRTFFontTbl::const_iterator it = aFontTbl.find( nId );
const Font* pFont; const vcl::Font* pFont;
if( it == aFontTbl.end() ) if( it == aFontTbl.end() )
{ {
const SvxFontItem& rDfltFont = (const SvxFontItem&) const SvxFontItem& rDfltFont = (const SvxFontItem&)

Some files were not shown because too many files have changed in this diff Show More