summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-08 17:04:25 +0200
committerNoel Grandin <noel@peralex.com>2016-03-09 10:07:47 +0200
commit1b1080fe8a2368410982c5b11575de183fb1bfa9 (patch)
treeb36be6e160d6c647a9769bae5058e291822f4b33 /dbaccess
parented4375c6d834e68a3f7c7dfb39a6ae0755da4785 (diff)
loplugin:constantparam in dbaccess
Change-Id: I44b5a586a1b0da47e032dff097ebf545f5fe76fc
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx16
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.hxx5
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx21
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx50
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.hxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx60
-rw-r--r--dbaccess/source/ui/app/AppDetailView.hxx4
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.cxx24
-rw-r--r--dbaccess/source/ui/app/AppSwapWindow.hxx2
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.cxx24
-rw-r--r--dbaccess/source/ui/app/AppTitleWindow.hxx4
-rw-r--r--dbaccess/source/ui/control/VertSplitView.cxx30
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx16
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.hxx2
-rw-r--r--dbaccess/source/ui/inc/TableDesignView.hxx2
-rw-r--r--dbaccess/source/ui/inc/VertSplitView.hxx2
-rw-r--r--dbaccess/source/ui/inc/WCopyTable.hxx2
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx4
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx4
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx12
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignView.cxx28
25 files changed, 119 insertions, 203 deletions
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index aef17d1380ec..c1e75e730687 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -937,7 +937,7 @@ Reference< XModel> ODatabaseModelImpl::getModel_noCreate() const
return m_xModel;
}
-Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _bInitialize )
+Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership()
{
Reference< XModel > xModel( m_xModel );
OSL_PRECOND( !xModel.is(), "ODatabaseModelImpl::createNewModel_deliverOwnership: not to be called if there already is a model!" );
@@ -968,20 +968,6 @@ Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _b
// #i105505#
xModel->attachResource( xModel->getURL(), m_aMediaDescriptor.getPropertyValues() );
}
-
- if ( _bInitialize )
- {
- try
- {
- Reference< XLoadable > xLoad( xModel, UNO_QUERY_THROW );
- xLoad->initNew();
- }
- catch( RuntimeException& ) { throw; }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
- }
}
return xModel;
}
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index b2fa15b9fdaa..8de14c6f7de2 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -341,16 +341,13 @@ public:
/** returns a new ->ODatabaseDocument
- @param _bInitializeIfNecessary
- calls XLoadable::initNew on the newly created model, if necessary
-
@precond
No ->ODatabaseDocument exists so far
@seealso
getModel_noCreate
*/
- css::uno::Reference< css::frame::XModel > createNewModel_deliverOwnership( bool _bInitialize );
+ css::uno::Reference< css::frame::XModel > createNewModel_deliverOwnership();
struct ResetModelAccess { friend class ODatabaseDocument; private: ResetModelAccess() { } };
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index f4e92b59ad70..84fef36541b9 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -354,7 +354,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
{
pModelImpl.set( new ODatabaseModelImpl( _rName, m_aContext, *this ) );
- Reference< XModel > xModel( pModelImpl->createNewModel_deliverOwnership( false ), UNO_SET_THROW );
+ Reference< XModel > xModel( pModelImpl->createNewModel_deliverOwnership(), UNO_SET_THROW );
Reference< XLoadable > xLoad( xModel, UNO_QUERY_THROW );
::comphelper::NamedValueCollection aArgs;
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 5941d43e049e..a3bd0ff260f6 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -2223,7 +2223,7 @@ com_sun_star_comp_dba_ODatabaseDocument(css::uno::XComponentContext* context,
rtl::Reference<dbaccess::ODatabaseModelImpl> pImpl(
new dbaccess::ODatabaseModelImpl(context, *pContext));
- css::uno::Reference<XInterface> inst(pImpl->createNewModel_deliverOwnership(false));
+ css::uno::Reference<XInterface> inst(pImpl->createNewModel_deliverOwnership());
inst->acquire();
return inst.get();
}
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index c3bbc792fb74..5b24d6d85aea 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -119,7 +119,7 @@ protected:
FlushNotificationAdapter( const Reference< XFlushable >& _rxBroadcaster, const Reference< XFlushListener >& _rxListener );
virtual ~FlushNotificationAdapter();
- void SAL_CALL impl_dispose( bool _bRevokeListener );
+ void SAL_CALL impl_dispose();
protected:
// XFlushListener
@@ -147,16 +147,13 @@ FlushNotificationAdapter::~FlushNotificationAdapter()
{
}
-void SAL_CALL FlushNotificationAdapter::impl_dispose( bool _bRevokeListener )
+void SAL_CALL FlushNotificationAdapter::impl_dispose()
{
Reference< XFlushListener > xKeepAlive( this );
- if ( _bRevokeListener )
- {
- Reference< XFlushable > xFlushable( m_aBroadcaster );
- if ( xFlushable.is() )
- xFlushable->removeFlushListener( this );
- }
+ Reference< XFlushable > xFlushable( m_aBroadcaster );
+ if ( xFlushable.is() )
+ xFlushable->removeFlushListener( this );
m_aListener.clear();
m_aBroadcaster.clear();
@@ -168,7 +165,7 @@ void SAL_CALL FlushNotificationAdapter::flushed( const EventObject& rEvent ) thr
if ( xListener.is() )
xListener->flushed( rEvent );
else
- impl_dispose( true );
+ impl_dispose();
}
void SAL_CALL FlushNotificationAdapter::disposing( const EventObject& Source ) throw (RuntimeException, std::exception)
@@ -177,7 +174,7 @@ void SAL_CALL FlushNotificationAdapter::disposing( const EventObject& Source ) t
if ( xListener.is() )
xListener->disposing( Source );
- impl_dispose( true );
+ impl_dispose();
}
OAuthenticationContinuation::OAuthenticationContinuation()
@@ -1225,7 +1222,7 @@ void SAL_CALL ODatabaseSource::flush( ) throw (RuntimeException, std::exception
SharedModel xModel( m_pImpl->getModel_noCreate(), SharedModel::NoTakeOwnership );
if ( !xModel.is() )
- xModel.reset( m_pImpl->createNewModel_deliverOwnership( false ), SharedModel::TakeOwnership );
+ xModel.reset( m_pImpl->createNewModel_deliverOwnership(), SharedModel::TakeOwnership );
Reference< css::frame::XStorable> xStorable( xModel, UNO_QUERY_THROW );
xStorable->store();
@@ -1311,7 +1308,7 @@ Reference< XOfficeDatabaseDocument > SAL_CALL ODatabaseSource::getDatabaseDocume
Reference< XModel > xModel( m_pImpl->getModel_noCreate() );
if ( !xModel.is() )
- xModel = m_pImpl->createNewModel_deliverOwnership( false );
+ xModel = m_pImpl->createNewModel_deliverOwnership();
return Reference< XOfficeDatabaseDocument >( xModel, UNO_QUERY_THROW );
}
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 3abd1f85fdee..2f2e240d4e8c 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -128,7 +128,7 @@ namespace
class OTablePreviewWindow : public vcl::Window
{
DECL_LINK_TYPED(OnDisableInput, void*, void);
- void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+ void ImplInitSettings( bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
public:
@@ -137,7 +137,7 @@ namespace
};
OTablePreviewWindow::OTablePreviewWindow(vcl::Window* pParent, WinBits nStyle) : Window( pParent, nStyle)
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
}
bool OTablePreviewWindow::Notify( NotifyEvent& rNEvt )
{
@@ -157,27 +157,21 @@ namespace
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
Invalidate();
}
}
- void OTablePreviewWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
+ void OTablePreviewWindow::ImplInitSettings( bool bBackground )
{
//FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if( bFont )
- {
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor( rStyleSettings.GetWindowTextColor() );
- SetPointFont(*this, aFont);
- }
+ vcl::Font aFont;
+ aFont = rStyleSettings.GetFieldFont();
+ aFont.SetColor( rStyleSettings.GetWindowTextColor() );
+ SetPointFont(*this, aFont);
- if( bForeground || bFont )
- {
- SetTextColor( rStyleSettings.GetFieldTextColor() );
- SetTextFillColor();
- }
+ SetTextColor( rStyleSettings.GetFieldTextColor() );
+ SetTextFillColor();
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
@@ -1251,7 +1245,7 @@ void OAppDetailPageHelper::ImplInitSettings()
OPreviewWindow::OPreviewWindow(vcl::Window* _pParent)
: Window(_pParent)
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
}
bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const
@@ -1310,28 +1304,22 @@ void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
Invalidate();
}
}
-void OPreviewWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
+void OPreviewWindow::ImplInitSettings( bool bBackground )
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if( bFont )
- {
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor( rStyleSettings.GetWindowTextColor() );
- SetPointFont(*this, aFont);
- }
+ vcl::Font aFont;
+ aFont = rStyleSettings.GetFieldFont();
+ aFont.SetColor( rStyleSettings.GetWindowTextColor() );
+ SetPointFont(*this, aFont);
- if( bForeground || bFont )
- {
- SetTextColor( rStyleSettings.GetFieldTextColor() );
- SetTextFillColor();
- }
+ SetTextColor( rStyleSettings.GetFieldTextColor() );
+ SetTextFillColor();
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
index 24bf5e8d47b9..96c8423969b0 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx
@@ -62,7 +62,7 @@ namespace dbaui
<TRUE/> when successful
*/
bool ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const;
- void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+ void ImplInitSettings( bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
public:
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 99470b0af965..e42d80587382 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -360,7 +360,7 @@ OTasksWindow::OTasksWindow(vcl::Window* _pParent,OApplicationDetailView* _pDetai
m_aCreation->SetDefaultCollapsedEntryBmp( aFolderImage );
m_aCreation->SetDefaultExpandedEntryBmp( aFolderImage );
- ImplInitSettings(true,true,true);
+ ImplInitSettings(true);
}
OTasksWindow::~OTasksWindow()
@@ -386,32 +386,26 @@ void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
Invalidate();
}
}
-void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
+void OTasksWindow::ImplInitSettings( bool bBackground )
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if( bFont )
- {
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor( rStyleSettings.GetWindowTextColor() );
- SetPointFont(*this, aFont);
- }
-
- if( bForeground || bFont )
- {
- SetTextColor( rStyleSettings.GetFieldTextColor() );
- SetTextFillColor();
- m_aHelpText->SetTextColor( rStyleSettings.GetFieldTextColor() );
- m_aHelpText->SetTextFillColor();
- m_aDescription->SetTextColor( rStyleSettings.GetFieldTextColor() );
- m_aDescription->SetTextFillColor();
- }
+ vcl::Font aFont;
+ aFont = rStyleSettings.GetFieldFont();
+ aFont.SetColor( rStyleSettings.GetWindowTextColor() );
+ SetPointFont(*this, aFont);
+
+ SetTextColor( rStyleSettings.GetFieldTextColor() );
+ SetTextFillColor();
+ m_aHelpText->SetTextColor( rStyleSettings.GetFieldTextColor() );
+ m_aHelpText->SetTextFillColor();
+ m_aDescription->SetTextColor( rStyleSettings.GetFieldTextColor() );
+ m_aDescription->SetTextFillColor();
if( bBackground )
{
@@ -421,7 +415,7 @@ void OTasksWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro
m_aFL->SetBackground( rStyleSettings.GetFieldColor() );
}
- vcl::Font aFont = m_aDescription->GetControlFont();
+ aFont = m_aDescription->GetControlFont();
aFont.SetWeight(WEIGHT_BOLD);
m_aDescription->SetControlFont(aFont);
}
@@ -539,7 +533,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe
,m_rBorderWin(_rParent)
{
SetUniqueId(UID_APP_DETAIL_VIEW);
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
m_pControlHelper = VclPtr<OAppDetailPageHelper>::Create(m_aContainer.get(),m_rBorderWin,_ePreviewMode);
m_pControlHelper->Show();
@@ -581,23 +575,17 @@ void OApplicationDetailView::dispose()
OSplitterView::dispose();
}
-void OApplicationDetailView::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
+void OApplicationDetailView::ImplInitSettings( bool bBackground )
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if( bFont )
- {
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor( rStyleSettings.GetWindowTextColor() );
- SetPointFont(*this, aFont);
- }
+ vcl::Font aFont;
+ aFont = rStyleSettings.GetFieldFont();
+ aFont.SetColor( rStyleSettings.GetWindowTextColor() );
+ SetPointFont(*this, aFont);
- if( bForeground || bFont )
- {
- SetTextColor( rStyleSettings.GetFieldTextColor() );
- SetTextFillColor();
- }
+ SetTextColor( rStyleSettings.GetFieldTextColor() );
+ SetTextFillColor();
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
@@ -617,7 +605,7 @@ void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
Invalidate();
}
}
diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx
index 7ccccb81df79..7ae2f3ab25af 100644
--- a/dbaccess/source/ui/app/AppDetailView.hxx
+++ b/dbaccess/source/ui/app/AppDetailView.hxx
@@ -118,7 +118,7 @@ namespace dbaui
VclPtr<OApplicationDetailView> m_pDetailView;
DECL_LINK_TYPED( OnEntrySelectHdl, SvTreeListBox*, void );
- void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+ void ImplInitSettings( bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
public:
@@ -153,7 +153,7 @@ namespace dbaui
::std::vector< TaskPaneData > m_aTaskPaneData;
MnemonicGenerator m_aExternalMnemonics;
- void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+ void ImplInitSettings( bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx
index 5e6db07d5fda..2b89d8481fb7 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.cxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.cxx
@@ -43,7 +43,7 @@ OApplicationSwapWindow::OApplicationSwapWindow( vcl::Window* _pParent, OAppBorde
,m_rBorderWin( _rBorderWindow )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
m_aIconControl->SetClickHdl(LINK(this, OApplicationSwapWindow, OnContainerSelectHdl));
m_aIconControl->setControlActionListener( &m_rBorderWin.getView()->getAppController() );
@@ -75,23 +75,17 @@ void OApplicationSwapWindow::Resize()
m_aIconControl->ArrangeIcons();
}
-void OApplicationSwapWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
+void OApplicationSwapWindow::ImplInitSettings( bool bBackground )
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if( bFont )
- {
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor( rStyleSettings.GetWindowTextColor() );
- SetPointFont(*this, aFont);
- }
+ vcl::Font aFont;
+ aFont = rStyleSettings.GetFieldFont();
+ aFont.SetColor( rStyleSettings.GetWindowTextColor() );
+ SetPointFont(*this, aFont);
- if( bForeground || bFont )
- {
- SetTextColor( rStyleSettings.GetFieldTextColor() );
- SetTextFillColor();
- }
+ SetTextColor( rStyleSettings.GetFieldTextColor() );
+ SetTextFillColor();
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
@@ -106,7 +100,7 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
Invalidate();
}
}
diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx
index aa6108fe2fc0..c77877b6c792 100644
--- a/dbaccess/source/ui/app/AppSwapWindow.hxx
+++ b/dbaccess/source/ui/app/AppSwapWindow.hxx
@@ -35,7 +35,7 @@ namespace dbaui
ElementType m_eLastType;
OAppBorderWindow& m_rBorderWin;
- void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+ void ImplInitSettings( bool bBackground );
DECL_LINK_TYPED( OnContainerSelectHdl, SvtIconChoiceCtrl*, void );
DECL_LINK_TYPED( ChangeToLastSelected, void*, void );
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index c05151a15fdc..ede0411301f4 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -37,7 +37,7 @@ OTitleWindow::OTitleWindow(vcl::Window* _pParent,sal_uInt16 _nTitleId,WinBits _n
setTitle(_nTitleId);
SetBorderStyle(WindowBorderStyle::MONO);
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
const StyleSettings& rStyle = Application::GetSettings().GetStyleSettings();
vcl::Window* pWindows[] = { m_aSpace1.get(), m_aSpace2.get(), m_aTitle.get() };
@@ -134,12 +134,12 @@ void OTitleWindow::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE)) )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
Invalidate();
}
}
-void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
+void OTitleWindow::ImplInitSettings( bool bBackground )
{
// FIXME RenderContext
AllSettings aAllSettings = GetSettings();
@@ -149,19 +149,13 @@ void OTitleWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackgro
SetSettings(aAllSettings);
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if( bFont )
- {
- vcl::Font aFont;
- aFont = rStyleSettings.GetFieldFont();
- aFont.SetColor( rStyleSettings.GetWindowTextColor() );
- SetPointFont(*this, aFont);
- }
+ vcl::Font aFont;
+ aFont = rStyleSettings.GetFieldFont();
+ aFont.SetColor( rStyleSettings.GetWindowTextColor() );
+ SetPointFont(*this, aFont);
- if( bForeground || bFont )
- {
- SetTextColor( rStyleSettings.GetFieldTextColor() );
- SetTextFillColor();
- }
+ SetTextColor( rStyleSettings.GetFieldTextColor() );
+ SetTextFillColor();
if( bBackground )
SetBackground( rStyleSettings.GetFieldColor() );
diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx
index d22938df00ee..3bd1c6088418 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.hxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.hxx
@@ -29,8 +29,8 @@ namespace dbaui
VclPtr<FixedText> m_aSpace2;
VclPtr<FixedText> m_aTitle;
VclPtr<vcl::Window> m_pChild;
- bool m_bShift;
- void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+ bool m_bShift;
+ void ImplInitSettings( bool bBackground );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
public:
diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx
index f23f9becbbd7..cb086c037006 100644
--- a/dbaccess/source/ui/control/VertSplitView.cxx
+++ b/dbaccess/source/ui/control/VertSplitView.cxx
@@ -34,7 +34,7 @@ OSplitterView::OSplitterView(vcl::Window* _pParent,bool _bVertical) : Window(_pP
,m_pRight(nullptr)
,m_bVertical(_bVertical)
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
}
OSplitterView::~OSplitterView()
@@ -64,27 +64,21 @@ IMPL_LINK_NOARG_TYPED( OSplitterView, SplitHdl, Splitter*, void )
Resize();
}
-void OSplitterView::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
+void OSplitterView::ImplInitSettings( bool bBackground )
{
// FIXME RenderContext
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- if ( bFont )
- {
- vcl::Font aFont = rStyleSettings.GetAppFont();
- if ( IsControlFont() )
- aFont.Merge( GetControlFont() );
- SetPointFont(*this, aFont);
-// Set/*Zoomed*/PointFont( aFont );
- }
+ vcl::Font aFont = rStyleSettings.GetAppFont();
+ if ( IsControlFont() )
+ aFont.Merge( GetControlFont() );
+ SetPointFont(*this, aFont);
+// Set/*Zoomed*/PointFont( aFont );
- if ( bFont || bForeground )
- {
- Color aTextColor = rStyleSettings.GetButtonTextColor();
- if ( IsControlForeground() )
- aTextColor = GetControlForeground();
- SetTextColor( aTextColor );
- }
+ Color aTextColor = rStyleSettings.GetButtonTextColor();
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
if ( bBackground )
{
@@ -102,7 +96,7 @@ void OSplitterView::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
Invalidate();
}
}
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 7fd4ff4ae31f..b6afedc0881a 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -411,10 +411,10 @@ namespace dbaui
implUpdateURLDependentStates();
}
- OUString OConnectionHelper::impl_getURL( bool _bPrefix ) const
+ OUString OConnectionHelper::impl_getURL() const
{
// get the pure text
- OUString sURL = _bPrefix ? m_pConnectionURL->GetText() : OUString(m_pConnectionURL->GetTextNoPrefix());
+ OUString sURL = m_pConnectionURL->GetTextNoPrefix();
OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" );
@@ -424,15 +424,7 @@ namespace dbaui
{
// get the two parts: prefix and file URL
OUString sTypePrefix, sFileURLDecoded;
- if ( _bPrefix )
- {
- sTypePrefix = m_pCollection->getPrefix( m_eType );
- sFileURLDecoded = m_pCollection->cutPrefix( sURL );
- }
- else
- {
- sFileURLDecoded = sURL;
- }
+ sFileURLDecoded = sURL;
sURL = sTypePrefix;
if ( !sFileURLDecoded.isEmpty() )
@@ -456,7 +448,7 @@ namespace dbaui
OUString OConnectionHelper::getURLNoPrefix( ) const
{
- return impl_getURL( false );
+ return impl_getURL();
}
void OConnectionHelper::setURLNoPrefix( const OUString& _rURL )
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
index e025e00eb165..d6d43925efc6 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
@@ -93,7 +93,7 @@ namespace dbaui
private:
DECL_LINK_TYPED(OnBrowseConnections, Button*, void);
DECL_LINK_TYPED(OnCreateDatabase, Button*, void);
- OUString impl_getURL( bool _bPrefix ) const;
+ OUString impl_getURL() const;
void impl_setURL( const OUString& _rURL, bool _bPrefix );
void implUpdateURLDependentStates() const;
};
diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx
index 8111b634ffe7..e39bcc8b4ec5 100644
--- a/dbaccess/source/ui/inc/TableDesignView.hxx
+++ b/dbaccess/source/ui/inc/TableDesignView.hxx
@@ -36,7 +36,7 @@ namespace dbaui
VclPtr<OTableFieldDescWin> m_pFieldDescWin;
VclPtr<OTableEditorCtrl> m_pEditorCtrl;
- void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+ void ImplInitSettings( bool bBackground );
DECL_LINK_TYPED( SplitHdl, Splitter*, void );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
diff --git a/dbaccess/source/ui/inc/VertSplitView.hxx b/dbaccess/source/ui/inc/VertSplitView.hxx
index dbc1d3b77078..4a36f8668058 100644
--- a/dbaccess/source/ui/inc/VertSplitView.hxx
+++ b/dbaccess/source/ui/inc/VertSplitView.hxx
@@ -32,7 +32,7 @@ namespace dbaui
VclPtr<vcl::Window> m_pRight;
bool m_bVertical;
- void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
+ void ImplInitSettings( bool bBackground );
DECL_LINK_TYPED( SplitHdl, Splitter*, void );
protected:
virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx
index fc067b11aa21..16fa2775ef47 100644
--- a/dbaccess/source/ui/inc/WCopyTable.hxx
+++ b/dbaccess/source/ui/inc/WCopyTable.hxx
@@ -329,7 +329,7 @@ namespace dbaui
virtual bool DeactivatePage() override;
OKButton& GetOKButton() { return static_cast<OKButton&>(*m_pbFinish); }
Wizard_Button_Style GetPressedButton() const { return m_ePressed; }
- void EnableButton(Wizard_Button_Style eStyle, bool bEnable);
+ void EnableNextButton(bool bEnable);
void AddWizardPage(OWizardPage* pPage); // delete page from OCopyTableWizard
void CheckButtons(); // checks which button can be disabled, enabled
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index 001956b7a123..c866e3ec51db 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -131,7 +131,7 @@ IMPL_LINK_NOARG_TYPED( OCopyTable, AppendDataClickHdl, Button*, void )
void OCopyTable::SetAppendDataRadio()
{
- m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,true);
+ m_pParent->EnableNextButton(true);
m_pFT_KeyName->Enable(false);
m_pCB_PrimaryColumn->Enable(false);
m_pEdKeyName->Enable(false);
@@ -140,7 +140,7 @@ void OCopyTable::SetAppendDataRadio()
IMPL_LINK_TYPED( OCopyTable, RadioChangeHdl, Button*, pButton, void )
{
- m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,pButton != m_pRB_View);
+ m_pParent->EnableNextButton(pButton != m_pRB_View);
bool bKey = m_bPKeyAllowed && pButton != m_pRB_View;
m_pFT_KeyName->Enable(bKey && m_pCB_PrimaryColumn->IsChecked());
m_pEdKeyName->Enable(bKey && m_pCB_PrimaryColumn->IsChecked());
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index b85bb7477f86..80a8c05236a4 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -157,7 +157,7 @@ void OWizColumnSelect::ActivatePage( )
m_pOrgColumnNames->RemoveEntry((*aIter)->first);
}
m_pParent->GetOKButton().Enable(m_pNewColumnNames->GetEntryCount() != 0);
- m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,m_pNewColumnNames->GetEntryCount() && m_pParent->getOperation() != CopyTableOperation::AppendData);
+ m_pParent->EnableNextButton(m_pNewColumnNames->GetEntryCount() && m_pParent->getOperation() != CopyTableOperation::AppendData);
m_pColumns_RH->GrabFocus();
}
@@ -416,7 +416,7 @@ void OWizColumnSelect::enableButtons()
m_pParent->m_mNameMapping.clear();
m_pParent->GetOKButton().Enable(bEntries);
- m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,bEntries && m_pParent->getOperation() != CopyTableOperation::AppendData);
+ m_pParent->EnableNextButton(bEntries && m_pParent->getOperation() != CopyTableOperation::AppendData);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 840234b66dea..79f34cab864e 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -977,17 +977,9 @@ void OCopyTableWizard::CheckButtons()
}
}
-void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle, bool bEnable)
+void OCopyTableWizard::EnableNextButton(bool bEnable)
{
- Button* pButton;
- if(eStyle == WIZARD_NEXT)
- pButton = m_pbNext;
- else if(eStyle == WIZARD_PREV)
- pButton = m_pbPrev;
- else
- pButton = m_pbFinish;
- pButton->Enable(bEnable);
-
+ m_pbNext->Enable(bEnable);
}
bool OCopyTableWizard::DeactivatePage()
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 4f49278f6a44..46824121513c 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -132,7 +132,7 @@ void OWizNameMatching::ActivatePage( )
m_pColumn_up_right->Enable( m_pCTRL_RIGHT->GetEntryCount() > 1 );
m_pColumn_down_right->Enable( m_pCTRL_RIGHT->GetEntryCount() > 1 );
- m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,false);
+ m_pParent->EnableNextButton(false);
m_pCTRL_LEFT->GrabFocus();
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 399640cdf0d1..a0f844c9b891 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -954,7 +954,7 @@ void OQueryController::impl_initialize()
bForceInitialDesign = true;
}
- if ( !ensureConnected( false ) )
+ if ( !ensureConnected() )
{ // we have no connection so what else should we do
m_bGraphicalDesign = false;
if ( editingView() )
diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
index 2b92d44af4cb..97f062113e2d 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx
@@ -45,7 +45,7 @@ OTableBorderWindow::OTableBorderWindow(vcl::Window* pParent) : Window(pParent,WB
,m_aHorzSplitter( VclPtr<Splitter>::Create(this) )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
// Children erzeugen
m_pEditorCtrl = VclPtr<OTableEditorCtrl>::Create( this);
m_pFieldDescWin = VclPtr<OTableFieldDescWin>::Create( this );
@@ -114,27 +114,21 @@ IMPL_LINK_TYPED( OTableBorderWindow, SplitHdl, Splitter*, pSplit, void )
}
}
-void OTableBorderWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
+void OTableBorderWindow::ImplInitSettings( bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
// FIXME RenderContext
- if ( bFont )
- {
- vcl::Font aFont = rStyleSettings.GetAppFont();
- if ( IsControlFont() )
- aFont.Merge( GetControlFont() );
- SetPointFont(*this, aFont);
- }
+ vcl::Font aFont = rStyleSettings.GetAppFont();
+ if ( IsControlFont() )
+ aFont.Merge( GetControlFont() );
+ SetPointFont(*this, aFont);
- if ( bFont || bForeground )
- {
- Color aTextColor = rStyleSettings.GetButtonTextColor();
- if ( IsControlForeground() )
- aTextColor = GetControlForeground();
- SetTextColor( aTextColor );
- }
+ Color aTextColor = rStyleSettings.GetButtonTextColor();
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
if ( bBackground )
{
@@ -152,7 +146,7 @@ void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
- ImplInitSettings( true, true, true );
+ ImplInitSettings( true );
Invalidate();
}
}