summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-18 09:57:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-18 11:13:05 +0200
commitc932e26138d9dda1d3dad5e2472a79d42c0a816c (patch)
tree28652c256477174a536094bf398e65dc1d0ad045 /toolkit
parente530689ef6ba79a26162670580ba28f9b09eb689 (diff)
loplugin:constparams in toolkit,ucb,xmlhelp
Change-Id: I2287bf468aae5008e25aa8b1bc0b63cff7bb1bf1 Reviewed-on: https://gerrit.libreoffice.org/40117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/stylesettings.cxx8
-rw-r--r--toolkit/source/awt/vclxwindow.cxx4
-rw-r--r--toolkit/source/awt/vclxwindows.cxx9
-rw-r--r--toolkit/source/controls/animatedimages.cxx2
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx4
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx2
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx2
-rw-r--r--toolkit/source/helper/unowrapper.cxx4
8 files changed, 17 insertions, 18 deletions
diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx
index 353267044110..f0e7375d9547 100644
--- a/toolkit/source/awt/stylesettings.cxx
+++ b/toolkit/source/awt/stylesettings.cxx
@@ -127,7 +127,7 @@ namespace toolkit
namespace
{
- sal_Int32 lcl_getStyleColor( WindowStyleSettings_Data& i_rData, Color const & (StyleSettings::*i_pGetter)() const )
+ sal_Int32 lcl_getStyleColor( WindowStyleSettings_Data const & i_rData, Color const & (StyleSettings::*i_pGetter)() const )
{
const VclPtr<vcl::Window>& pWindow = i_rData.pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings();
@@ -135,7 +135,7 @@ namespace toolkit
return (aStyleSettings.*i_pGetter)().GetColor();
}
- void lcl_setStyleColor( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( Color const & ), const sal_Int32 i_nColor )
+ void lcl_setStyleColor( WindowStyleSettings_Data const & i_rData, void (StyleSettings::*i_pSetter)( Color const & ), const sal_Int32 i_nColor )
{
VclPtr<vcl::Window> pWindow = i_rData.pOwningWindow->GetWindow();
AllSettings aAllSettings = pWindow->GetSettings();
@@ -145,7 +145,7 @@ namespace toolkit
pWindow->SetSettings( aAllSettings );
}
- FontDescriptor lcl_getStyleFont( WindowStyleSettings_Data& i_rData, vcl::Font const & (StyleSettings::*i_pGetter)() const )
+ FontDescriptor lcl_getStyleFont( WindowStyleSettings_Data const & i_rData, vcl::Font const & (StyleSettings::*i_pGetter)() const )
{
const VclPtr<vcl::Window>& pWindow = i_rData.pOwningWindow->GetWindow();
const AllSettings aAllSettings = pWindow->GetSettings();
@@ -153,7 +153,7 @@ namespace toolkit
return VCLUnoHelper::CreateFontDescriptor( (aStyleSettings.*i_pGetter)() );
}
- void lcl_setStyleFont( WindowStyleSettings_Data& i_rData, void (StyleSettings::*i_pSetter)( vcl::Font const &),
+ void lcl_setStyleFont( WindowStyleSettings_Data const & i_rData, void (StyleSettings::*i_pSetter)( vcl::Font const &),
vcl::Font const & (StyleSettings::*i_pGetter)() const, const FontDescriptor& i_rFont )
{
VclPtr<vcl::Window> pWindow = i_rData.pOwningWindow->GetWindow();
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index bc221aae7a0c..ff20d4af4388 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -311,7 +311,7 @@ Reference< XStyleSettings > VCLXWindowImpl::getStyleSettings()
// Uses an out-parameter instead of return value, due to the object reference
-void ImplInitWindowEvent( css::awt::WindowEvent& rEvent, vcl::Window* pWindow )
+void ImplInitWindowEvent( css::awt::WindowEvent& rEvent, vcl::Window const * pWindow )
{
Point aPos = pWindow->GetPosPixel();
Size aSz = pWindow->GetSizePixel();
@@ -384,7 +384,7 @@ void VCLXWindow::resumeVclEventListening( )
--mpImpl->mnListenerLockLevel;
}
-void VCLXWindow::notifyWindowRemoved( vcl::Window& _rWindow )
+void VCLXWindow::notifyWindowRemoved( vcl::Window const & _rWindow )
{
if ( mpImpl->getContainerListeners().getLength() )
{
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 2cab3bd553e4..6725fac94276 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -188,7 +188,7 @@ namespace toolkit
_pWindow->SetSettings( aSettings );
}
- static Any getVisualEffect( vcl::Window* _pWindow )
+ static Any getVisualEffect( vcl::Window const * _pWindow )
{
Any aEffect;
@@ -2578,11 +2578,10 @@ sal_Int32 SAL_CALL VCLXMultiPage::insertTab()
{
TabControl *pTabControl = getTabControl();
VclPtrInstance<TabPage> pTab( pTabControl );
- OUString title ("");
- return static_cast< sal_Int32 >( insertTab( pTab, title ) );
+ return static_cast< sal_Int32 >( insertTab( pTab, OUString() ) );
}
-sal_uInt16 VCLXMultiPage::insertTab( TabPage* pPage, OUString& sTitle )
+sal_uInt16 VCLXMultiPage::insertTab( TabPage* pPage, OUString const & sTitle )
{
TabControl *pTabControl = getTabControl();
sal_uInt16 id = sal::static_int_cast< sal_uInt16 >( mTabId++ );
@@ -3706,7 +3705,7 @@ void VCLXScrollBar::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
}
}
-css::awt::Size SAL_CALL VCLXScrollBar::implGetMinimumSize( vcl::Window* p )
+css::awt::Size SAL_CALL VCLXScrollBar::implGetMinimumSize( vcl::Window const * p )
{
long n = p->GetSettings().GetStyleSettings().GetScrollBarSize();
return css::awt::Size( n, n );
diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx
index 4cc68e798f61..338265947515 100644
--- a/toolkit/source/controls/animatedimages.cxx
+++ b/toolkit/source/controls/animatedimages.cxx
@@ -222,7 +222,7 @@ namespace toolkit {
throw IndexOutOfBoundsException( OUString(), i_context );
}
- void lcl_notify( ::osl::ClearableMutexGuard& i_guard, ::cppu::OBroadcastHelper& i_broadcaseHelper,
+ void lcl_notify( ::osl::ClearableMutexGuard& i_guard, ::cppu::OBroadcastHelper const & i_broadcaseHelper,
void ( SAL_CALL XContainerListener::*i_notificationMethod )( const ContainerEvent& ),
const sal_Int32 i_accessor, const Sequence< OUString >& i_imageURLs, const Reference< XInterface >& i_context )
{
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 2a26fdf76b79..edee732e8452 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -1323,7 +1323,7 @@ void ControlContainerBase::createPeer( const Reference< XToolkit > & rxToolkit,
UnoControlContainer::createPeer( rxToolkit, rParentPeer );
}
-void ControlContainerBase::ImplInsertControl( Reference< XControlModel >& rxModel, const OUString& rName )
+void ControlContainerBase::ImplInsertControl( Reference< XControlModel > const & rxModel, const OUString& rName )
{
Reference< XPropertySet > xP( rxModel, UNO_QUERY );
@@ -1344,7 +1344,7 @@ void ControlContainerBase::ImplInsertControl( Reference< XControlModel >& rxMode
}
}
-void ControlContainerBase::ImplRemoveControl( Reference< XControlModel >& rxModel )
+void ControlContainerBase::ImplRemoveControl( Reference< XControlModel > const & rxModel )
{
Sequence< Reference< XControl > > aControls = getControls();
Reference< XControl > xCtrl = StdTabController::FindControl( aControls, rxModel );
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index fc585806aceb..8de29806ed17 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -478,7 +478,7 @@ void UnoDialogControl::setMenuBar( const Reference< XMenuBar >& rxMenuBar )
xTW->setMenuBar( mxMenuBar );
}
}
-static ::Size ImplMapPixelToAppFont( OutputDevice* pOutDev, const ::Size& aSize )
+static ::Size ImplMapPixelToAppFont( OutputDevice const * pOutDev, const ::Size& aSize )
{
::Size aTmp = pOutDev->PixelToLogic( aSize, MapUnit::MapAppFont );
return aTmp;
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index 7b0e3d8ebb5d..f42a0ee6f45f 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -225,7 +225,7 @@ void UnoControlTabPage::createPeer( const Reference< XToolkit > & rxToolkit, con
}
}
-static ::Size ImplMapPixelToAppFont( OutputDevice* pOutDev, const ::Size& aSize )
+static ::Size ImplMapPixelToAppFont( OutputDevice const * pOutDev, const ::Size& aSize )
{
::Size aTmp = pOutDev->PixelToLogic( aSize, MapUnit::MapAppFont );
return aTmp;
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index d3d92c342a8a..285ab210631c 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -39,7 +39,7 @@
using namespace ::com::sun::star;
-css::uno::Reference< css::awt::XWindowPeer > CreateXWindow( vcl::Window* pWindow )
+css::uno::Reference< css::awt::XWindowPeer > CreateXWindow( vcl::Window const * pWindow )
{
switch ( pWindow->GetType() )
{
@@ -204,7 +204,7 @@ void UnoWrapper::ReleaseAllGraphics( OutputDevice* pOutDev )
}
-static bool lcl_ImplIsParent( vcl::Window* pParentWindow, vcl::Window* pPossibleChild )
+static bool lcl_ImplIsParent( vcl::Window const * pParentWindow, vcl::Window* pPossibleChild )
{
vcl::Window* pWindow = ( pPossibleChild != pParentWindow ) ? pPossibleChild : nullptr;
while ( pWindow && ( pWindow != pParentWindow ) )