diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-16 10:09:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-18 08:54:37 +0200 |
commit | 60e78fbb806bb45e635ba1de45ceffe187938ac0 (patch) | |
tree | 17ff5aaa57f4d23e177f1fe423def1691139a4a8 /dbaccess | |
parent | 9c818268767d6a1c1bc731ae30c45883bab987e7 (diff) |
fdo#82577: Handle Font
Put the VCL Font class in the vcl namespace. Avoids clash with the X11
Font typedef.
Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 43 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppSwapWindow.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppTitleWindow.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppView.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/control/VertSplitView.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/listviewitems.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/control/marktree.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/control/sqledit.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/UITools.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/TokenWriter.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/JoinTableView.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindow.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindowTitle.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableDesignControl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableDesignView.cxx | 2 |
18 files changed, 50 insertions, 51 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index d5b5838c952b..691775f20836 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -167,7 +167,7 @@ namespace const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); @@ -1232,7 +1232,7 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); - if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || + if ( (rDCEvt.GetType() == DATACHANGED_FONTS) || (rDCEvt.GetType() == DATACHANGED_DISPLAY) || (rDCEvt.GetType() == DATACHANGED_FONTSUBSTITUTION) || ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && @@ -1253,25 +1253,24 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt ) void OAppDetailPageHelper::ImplInitSettings() { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Font aFont; - aFont = rStyleSettings.GetFieldFont(); - aFont.SetColor( rStyleSettings.GetWindowTextColor() ); - SetPointFont( aFont ); - m_aTBPreview.SetPointFont( aFont ); - - SetTextColor( rStyleSettings.GetFieldTextColor() ); - SetTextFillColor(); - m_aBorder.SetTextColor( rStyleSettings.GetFieldTextColor() ); - m_aBorder.SetTextFillColor(); - m_aTBPreview.SetTextColor( rStyleSettings.GetFieldTextColor() ); - m_aTBPreview.SetTextFillColor(); - - SetBackground( rStyleSettings.GetFieldColor() ); - m_aBorder.SetBackground( rStyleSettings.GetFieldColor() ); - m_aFL.SetBackground( rStyleSettings.GetFieldColor() ); - m_aDocumentInfo.SetBackground( rStyleSettings.GetFieldColor() ); - m_aTBPreview.SetBackground( rStyleSettings.GetFieldColor() ); - m_pTablePreview->SetBackground( rStyleSettings.GetFieldColor() ); + vcl::Font aFont; + aFont = rStyleSettings.GetFieldFont(); + aFont.SetColor( rStyleSettings.GetWindowTextColor() ); + SetPointFont( aFont ); + m_aTBPreview.SetPointFont( aFont ); + + SetTextColor( rStyleSettings.GetFieldTextColor() ); + SetTextFillColor(); + m_aBorder.SetTextColor( rStyleSettings.GetFieldTextColor() ); + m_aBorder.SetTextFillColor(); + m_aTBPreview.SetTextColor( rStyleSettings.GetFieldTextColor() ); + m_aTBPreview.SetTextFillColor(); + SetBackground( rStyleSettings.GetFieldColor() ); + m_aBorder.SetBackground( rStyleSettings.GetFieldColor() ); + m_aFL.SetBackground( rStyleSettings.GetFieldColor() ); + m_aDocumentInfo.SetBackground( rStyleSettings.GetFieldColor() ); + m_aTBPreview.SetBackground( rStyleSettings.GetFieldColor() ); + m_pTablePreview->SetBackground( rStyleSettings.GetFieldColor() ); } OPreviewWindow::OPreviewWindow(Window* _pParent) @@ -1346,7 +1345,7 @@ void OPreviewWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackg const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 8f3a8d8952a1..e6e01c4e9809 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -111,7 +111,7 @@ void OCreationList::PreparePaint( SvTreeListEntry* _pEntry ) if ( bIsMouseDownEntry ) { - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetColor( GetSettings().GetStyleSettings().GetHighlightTextColor() ); Control::SetFont( aFont ); } @@ -384,7 +384,7 @@ void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); @@ -408,7 +408,7 @@ void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro m_aFL.SetBackground( rStyleSettings.GetFieldColor() ); } - Font aFont = m_aDescription.GetControlFont(); + vcl::Font aFont = m_aDescription.GetControlFont(); aFont.SetWeight(WEIGHT_BOLD); m_aDescription.SetControlFont(aFont); } @@ -565,7 +565,7 @@ void OApplicationDetailView::ImplInitSettings( bool bFont, bool bForeground, boo const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index c11b07b9a955..4f83589343b7 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -51,8 +51,8 @@ namespace dbaui // members related to drawing the currently hovered/selected entry SvTreeListEntry* m_pMouseDownEntry; SvTreeListEntry* m_pLastActiveEntry; - Color m_aOriginalBackgroundColor; - Font m_aOriginalFont; + Color m_aOriginalBackgroundColor; + vcl::Font m_aOriginalFont; public: OCreationList( OTasksWindow& _rParent ); diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index 746a969ea49d..4f12cb9eb566 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -74,7 +74,7 @@ void OApplicationSwapWindow::ImplInitSettings( bool bFont, bool bForeground, boo const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index 0e652e0c5945..72e37369f362 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -136,7 +136,7 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); @@ -154,7 +154,7 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle}; for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { - Font aFont = pWindows[i]->GetFont(); + vcl::Font aFont = pWindows[i]->GetFont(); aFont.SetWeight(WEIGHT_BOLD); pWindows[i]->SetFont(aFont); pWindows[i]->SetTextColor( aStyle.GetLightColor() ); diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index 8855e906831e..3b22fd88badc 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -153,7 +153,7 @@ void OAppBorderWindow::ImplInitSettings() const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( true ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); @@ -546,7 +546,7 @@ void OApplicationView::ImplInitSettings() const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( true ) { - Font aFont; + vcl::Font aFont; aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx index ec3ede46ec53..975cefd84de9 100644 --- a/dbaccess/source/ui/control/VertSplitView.cxx +++ b/dbaccess/source/ui/control/VertSplitView.cxx @@ -63,7 +63,7 @@ void OSplitterView::ImplInitSettings( bool bFont, bool bForeground, bool bBackgr if ( bFont ) { - Font aFont = rStyleSettings.GetAppFont(); + vcl::Font aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetPointFont( aFont ); diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx index 406eb6e580e3..fef464774952 100644 --- a/dbaccess/source/ui/control/listviewitems.cxx +++ b/dbaccess/source/ui/control/listviewitems.cxx @@ -32,7 +32,7 @@ namespace dbaui if (!_pViewData) _pViewData = pView->GetViewDataItem( pEntry, this ); pView->Push(PUSH_ALL); - Font aFont( pView->GetFont()); + vcl::Font aFont( pView->GetFont()); aFont.SetWeight(WEIGHT_BOLD); pView->Control::SetFont( aFont ); _pViewData->maSize = Size(pView->GetTextWidth(GetText()), pView->GetTextHeight()); @@ -51,7 +51,7 @@ namespace dbaui if (m_bEmphasized) { rDev.Push(PUSH_ALL); - Font aFont( rDev.GetFont()); + vcl::Font aFont( rDev.GetFont()); aFont.SetWeight(WEIGHT_BOLD); rDev.SetFont( aFont ); Point aPos(rPos); diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx index b6a7a597121e..3cb9c7d6c158 100644 --- a/dbaccess/source/ui/control/marktree.cxx +++ b/dbaccess/source/ui/control/marktree.cxx @@ -45,8 +45,8 @@ void OMarkableTreeListBox::Paint(const Rectangle& _rRect) { if (!IsEnabled()) { - Font aOldFont = GetFont(); - Font aNewFont(aOldFont); + vcl::Font aOldFont = GetFont(); + vcl::Font aNewFont(aOldFont); StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings(); aNewFont.SetColor(aSystemStyle.GetDisableColor()); diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 5c51f27d65e0..72f6a27fe35a 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -233,12 +233,12 @@ void OSqlEdit::ImplSetFont() get_value_or( OUString() ) ); if ( sFontName.isEmpty() ) { - Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) ); + vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) ); sFontName = aTmpFont.GetName(); } Size aFontSize( 0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() ); - Font aFont( sFontName, aFontSize ); + vcl::Font aFont( sFontName, aFontSize ); aStyleSettings.SetFieldFont(aFont); aSettings.SetStyleSettings(aStyleSettings); SetSettings(aSettings); diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index a0e20f7bb968..7be8fd7b505c 100644 --- a/dbaccess/source/ui/inc/UITools.hxx +++ b/dbaccess/source/ui/inc/UITools.hxx @@ -67,7 +67,7 @@ namespace svt class Window; class ToolBox; -class Font; +namespace vcl { class Font; } class SvNumberFormatter; class SfxFilter; diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 601ef11b7930..994909ec6476 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -320,7 +320,7 @@ void ODatabaseImportExport::initialize() } if ( m_aFont.Name.isEmpty() ) { - Font aApplicationFont = OutputDevice::GetDefaultFont( + vcl::Font aApplicationFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE, Application::GetSettings().GetUILanguageTag().getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 9a954eaf6750..668d5434923c 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1452,7 +1452,7 @@ void OJoinTableView::StateChanged( StateChangedType nType ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Font aFont = rStyleSettings.GetGroupFont(); + vcl::Font aFont = rStyleSettings.GetGroupFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 43fc42067265..217604dc7529 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -135,7 +135,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) // switch off triState of ::com::sun::star::form::CheckBox m_pVisibleCell->GetBox().EnableTriState( false ); - Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),DEFAULTFONT_FLAGS_ONLYONE); + vcl::Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),DEFAULTFONT_FLAGS_ONLYONE); aTitleFont.SetSize(Size(0, 6)); SetTitleFont(aTitleFont); @@ -330,7 +330,7 @@ void OSelectionBrowseBox::Init() SetHeaderBar(pNewHeaderBar); SetMode(m_nMode); - Font aFont( GetDataWindow().GetFont() ); + vcl::Font aFont( GetDataWindow().GetFont() ); aFont.SetWeight( WEIGHT_NORMAL ); GetDataWindow().SetFont( aFont ); diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 31f354c0e7fb..027f49e4c311 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -478,7 +478,7 @@ void OTableWindow::Resize() void OTableWindow::SetBoldTitle( bool bBold ) { - Font aFont = m_aTitle.GetFont(); + vcl::Font aFont = m_aTitle.GetFont(); aFont.SetWeight( bBold?WEIGHT_BOLD:WEIGHT_NORMAL ); m_aTitle.SetFont( aFont ); m_aTitle.Invalidate(); @@ -554,7 +554,7 @@ void OTableWindow::StateChanged( StateChangedType nType ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Font aFont = rStyleSettings.GetGroupFont(); + vcl::Font aFont = rStyleSettings.GetGroupFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index 46e25c03c209..a2a22997de02 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -48,7 +48,7 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) : SetBackground(Wallpaper(Color(aSystemStyle.GetFaceColor()))); SetTextColor(aSystemStyle.GetButtonTextColor()); - Font aFont( GetFont() ); + vcl::Font aFont( GetFont() ); aFont.SetTransparent( true ); SetFont( aFont ); } @@ -173,7 +173,7 @@ void OTableWindowTitle::StateChanged( StateChangedType nType ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - Font aFont = rStyleSettings.GetGroupFont(); + vcl::Font aFont = rStyleSettings.GetGroupFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetZoomedPointFont( aFont ); diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index 0cb8cdcdfb8a..9db53a80e726 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -57,7 +57,7 @@ void OTableRowView::Init() { EditBrowseBox::Init(); - Font aFont( GetDataWindow().GetFont() ); + vcl::Font aFont( GetDataWindow().GetFont() ); aFont.SetWeight( WEIGHT_NORMAL ); GetDataWindow().SetFont( aFont ); diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index 239848c2fe6f..46d20a980e4e 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -122,7 +122,7 @@ void OTableBorderWindow::ImplInitSettings( bool bFont, bool bForeground, bool bB if ( bFont ) { - Font aFont = rStyleSettings.GetAppFont(); + vcl::Font aFont = rStyleSettings.GetAppFont(); if ( IsControlFont() ) aFont.Merge( GetControlFont() ); SetPointFont( aFont ); |