Kaydet (Commit) 871035d7 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constparams in various

Change-Id: Id15f3562f42afa6c679cea3c839172557ead0395
Reviewed-on: https://gerrit.libreoffice.org/40624Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst d09b943f
......@@ -125,7 +125,7 @@ public:
the future).
*/
VirtualMachine(JavaVM * pVm, int nVersion, bool bDestroy,
JNIEnv * pMainThreadEnv);
JNIEnv const * pMainThreadEnv);
private:
VirtualMachine(VirtualMachine &) = delete;
......
......@@ -18,7 +18,7 @@ namespace apitest {
class XElementAccess
{
public:
XElementAccess(css::uno::Type& rType): maType(rType) {}
XElementAccess(css::uno::Type const & rType): maType(rType) {}
void testGetElementType();
void testHasElements();
......
......@@ -36,7 +36,7 @@ private:
private:
/// helpers
void implSaveScreenshot(const Bitmap& rScreenshot, const OString& rScreenshotId);
void saveScreenshot(VclAbstractDialog& rDialog);
void saveScreenshot(VclAbstractDialog const & rDialog);
void saveScreenshot(Dialog& rDialog);
/// helper method to populate maKnownDialogs, called in setUp(). Needs to be
......
......@@ -73,7 +73,7 @@ namespace ooo
/** Returns the VBA document implementation object representing the passed UNO document model. */
VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getVBADocument( const css::uno::Reference< css::frame::XModel >& xModel );
VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getUnoDocModule( const OUString& aModName, SfxObjectShell* pShell );
VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getUnoDocModule( const OUString& aModName, SfxObjectShell const * pShell );
/// @throws css::uno::RuntimeException
VBAHELPER_DLLPUBLIC SfxObjectShell* getSfxObjShell( const css::uno::Reference< css::frame::XModel >& xModel );
......@@ -95,7 +95,7 @@ namespace ooo
VBAHELPER_DLLPUBLIC void dispatchRequests( const css::uno::Reference< css::frame::XModel>& xModel, const OUString& aUrl );
VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< css::frame::XModel>& xModel, const OUString & aUrl, const css::uno::Sequence< css::beans::PropertyValue >& sProps );
VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell* pView, sal_uInt16 nSlot );
VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell const * pView, sal_uInt16 nSlot );
VBAHELPER_DLLPUBLIC sal_Int32 OORGBToXLRGB( sal_Int32 );
VBAHELPER_DLLPUBLIC sal_Int32 XLRGBToOORGB( sal_Int32 );
VBAHELPER_DLLPUBLIC css::uno::Any OORGBToXLRGB( const css::uno::Any& );
......@@ -104,8 +104,8 @@ namespace ooo
// the object when passed to IsNull will return true. aNULL
// contains an empty object reference
VBAHELPER_DLLPUBLIC const css::uno::Any& aNULL();
VBAHELPER_DLLPUBLIC void PrintOutHelper( SfxViewShell* pViewShell, const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, bool bSelection );
VBAHELPER_DLLPUBLIC void PrintPreviewHelper( const css::uno::Any& EnableChanges, SfxViewShell* );
VBAHELPER_DLLPUBLIC void PrintOutHelper( SfxViewShell const * pViewShell, const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, bool bSelection );
VBAHELPER_DLLPUBLIC void PrintPreviewHelper( const css::uno::Any& EnableChanges, SfxViewShell const * );
VBAHELPER_DLLPUBLIC void WaitUntilPreviewIsClosed( SfxViewFrame* );
/** Extracts a boolean value from the passed Any, which may contain a Boolean or an integer or floating-point value.
......
......@@ -60,7 +60,7 @@ VirtualMachine::AttachGuard::~AttachGuard()
}
VirtualMachine::VirtualMachine(JavaVM * pVm, int nVersion, bool bDestroy,
JNIEnv * pMainThreadEnv):
JNIEnv const * pMainThreadEnv):
m_pVm(pVm), m_nVersion(nVersion), m_bDestroy(bDestroy)
{
(void) pMainThreadEnv; // avoid warnings
......
......@@ -80,7 +80,7 @@ void ScreenshotTest::implSaveScreenshot(const Bitmap& rScreenshot, const OString
aPNGWriter.Write(aNew);
}
void ScreenshotTest::saveScreenshot(VclAbstractDialog& rDialog)
void ScreenshotTest::saveScreenshot(VclAbstractDialog const & rDialog)
{
const Bitmap aScreenshot(rDialog.createScreenshot());
......
......@@ -66,7 +66,7 @@ private:
mIndices[ msNames[ nIndex ] ] = nIndex;
}
}
void getNestedControls( ControlVec& vControls, uno::Reference< awt::XControlContainer >& xContainer )
void getNestedControls( ControlVec& vControls, uno::Reference< awt::XControlContainer > const & xContainer )
{
uno::Sequence< uno::Reference< awt::XControl > > aControls = xContainer->getControls();
const uno::Reference< awt::XControl >* pCtrl = aControls.getConstArray();
......
......@@ -225,7 +225,7 @@ ScVbaUserForm::setValue( const OUString& aPropertyName, const uno::Any& aValue )
}
uno::Reference< awt::XControl >
ScVbaUserForm::nestedSearch( const OUString& aPropertyName, uno::Reference< awt::XControlContainer >& xContainer )
ScVbaUserForm::nestedSearch( const OUString& aPropertyName, uno::Reference< awt::XControlContainer > const & xContainer )
{
uno::Reference< awt::XControl > xControl = xContainer->getControl( aPropertyName );
if ( !xControl.is() )
......
......@@ -42,7 +42,7 @@ public:
/// @throws css::uno::RuntimeException
ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
virtual ~ScVbaUserForm() override;
static css::uno::Reference< css::awt::XControl > nestedSearch( const OUString& aPropertyName, css::uno::Reference< css::awt::XControlContainer >& xContainer );
static css::uno::Reference< css::awt::XControl > nestedSearch( const OUString& aPropertyName, css::uno::Reference< css::awt::XControlContainer > const & xContainer );
// XUserForm
virtual void SAL_CALL RePaint( ) override;
virtual void SAL_CALL Show( ) override;
......
......@@ -120,7 +120,7 @@ aNULL()
return aNULLL;
}
void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 nSlot)
void dispatchExecute(SfxViewShell const * pViewShell, sal_uInt16 nSlot)
{
SfxViewFrame* pViewFrame = nullptr;
if ( pViewShell )
......@@ -335,7 +335,7 @@ XLRGBToOORGB( const uno::Any& aCol )
return uno::makeAny( nCol );
}
void PrintOutHelper( SfxViewShell* pViewShell, const uno::Any& From, const uno::Any& To, const uno::Any& Copies, const uno::Any& Preview, const uno::Any& /*ActivePrinter*/, const uno::Any& /*PrintToFile*/, const uno::Any& Collate, const uno::Any& PrToFileName, bool bUseSelection )
void PrintOutHelper( SfxViewShell const * pViewShell, const uno::Any& From, const uno::Any& To, const uno::Any& Copies, const uno::Any& Preview, const uno::Any& /*ActivePrinter*/, const uno::Any& /*PrintToFile*/, const uno::Any& Collate, const uno::Any& PrToFileName, bool bUseSelection )
{
sal_Int32 nTo = 0;
sal_Int32 nFrom = 0;
......@@ -419,7 +419,7 @@ void PrintOutHelper( SfxViewShell* pViewShell, const uno::Any& From, const uno::
// of this method
}
void PrintPreviewHelper( const css::uno::Any& /*EnableChanges*/, SfxViewShell* pViewShell )
void PrintPreviewHelper( const css::uno::Any& /*EnableChanges*/, SfxViewShell const * pViewShell )
{
SfxViewFrame* pViewFrame = nullptr;
if ( pViewShell )
......@@ -1106,7 +1106,7 @@ uno::Reference< XHelperInterface > getVBADocument( const uno::Reference< frame::
return xIf;
}
uno::Reference< XHelperInterface > getUnoDocModule( const OUString& aModName, SfxObjectShell* pShell )
uno::Reference< XHelperInterface > getUnoDocModule( const OUString& aModName, SfxObjectShell const * pShell )
{
uno::Reference< XHelperInterface > xIf;
if ( pShell )
......
......@@ -32,7 +32,7 @@ class X11OpenGLSalVirtualDevice : public SalVirtualDevice
int mnHeight;
public:
X11OpenGLSalVirtualDevice( SalGraphics *pGraphics,
X11OpenGLSalVirtualDevice( SalGraphics const *pGraphics,
long &nDX, long &nDY,
const SystemGraphicsData *pData,
X11SalGraphics* pNewGraphics);
......
......@@ -58,7 +58,7 @@ public:
virtual void DestroyObject( SalObject* pObject ) override;
/// Gtk vclplug needs to pass GtkSalGraphics to X11SalVirtualDevice, so create it, and pass as pNewGraphics.
static SalVirtualDevice* CreateX11VirtualDevice(SalGraphics* pGraphics, long &nDX, long &nDY,
static SalVirtualDevice* CreateX11VirtualDevice(SalGraphics const * pGraphics, long &nDX, long &nDY,
DeviceFormat eFormat, const SystemGraphicsData* pData, X11SalGraphics* pNewGraphics);
virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
......
......@@ -44,7 +44,7 @@ class X11SalVirtualDevice : public SalVirtualDevice
bool bExternPixmap_;
public:
X11SalVirtualDevice(SalGraphics *pGraphics, long &nDX, long &nDY,
X11SalVirtualDevice(SalGraphics const *pGraphics, long &nDX, long &nDY,
DeviceFormat eFormat, const SystemGraphicsData *pData, X11SalGraphics* pNewGraphics);
virtual ~X11SalVirtualDevice() override;
......
......@@ -32,7 +32,7 @@ void X11SalGraphics::Init( X11OpenGLSalVirtualDevice *pDevice )
mxImpl->Init();
}
X11OpenGLSalVirtualDevice::X11OpenGLSalVirtualDevice( SalGraphics* pGraphics,
X11OpenGLSalVirtualDevice::X11OpenGLSalVirtualDevice( SalGraphics const * pGraphics,
long &nDX, long &nDY,
const SystemGraphicsData *pData,
X11SalGraphics* pNewGraphics) :
......@@ -46,7 +46,7 @@ X11OpenGLSalVirtualDevice::X11OpenGLSalVirtualDevice( SalGraphics* pGraphics,
assert( pData == nullptr ); (void)pData;
mpDisplay = vcl_sal::getSalDisplay(GetGenericData());
mnXScreen = pGraphics ? static_cast<X11SalGraphics*>(pGraphics)->GetScreenNumber() :
mnXScreen = pGraphics ? static_cast<X11SalGraphics const *>(pGraphics)->GetScreenNumber() :
vcl_sal::getSalDisplay(GetGenericData())->GetDefaultXScreen();
mnWidth = nDX;
mnHeight = nDY;
......
......@@ -35,7 +35,7 @@
#include <vcl/opengl/OpenGLHelper.hxx>
#include <opengl/x11/salvd.hxx>
SalVirtualDevice* X11SalInstance::CreateX11VirtualDevice(SalGraphics* pGraphics,
SalVirtualDevice* X11SalInstance::CreateX11VirtualDevice(SalGraphics const * pGraphics,
long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData,
X11SalGraphics* pNewGraphics)
{
......@@ -88,7 +88,7 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap,
mxImpl->Init();
}
X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long &nDY,
X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics const * pGraphics, long &nDX, long &nDY,
DeviceFormat eFormat, const SystemGraphicsData *pData,
X11SalGraphics* pNewGraphics) :
pGraphics_(pNewGraphics),
......@@ -140,7 +140,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long
{
nDX_ = nDX;
nDY_ = nDY;
m_nXScreen = pGraphics ? static_cast<X11SalGraphics*>(pGraphics)->GetScreenNumber() :
m_nXScreen = pGraphics ? static_cast<X11SalGraphics const *>(pGraphics)->GetScreenNumber() :
vcl_sal::getSalDisplay(GetGenericData())->GetDefaultXScreen();
hDrawable_ = limitXCreatePixmap( GetXDisplay(),
pDisplay_->GetDrawable( m_nXScreen ),
......
......@@ -119,7 +119,7 @@ GtkWindow* RunDialog::GetTransientFor()
return pParent;
}
RunDialog::RunDialog( GtkWidget *pDialog, uno::Reference< awt::XExtendedToolkit >& rToolkit ) :
RunDialog::RunDialog( GtkWidget *pDialog, uno::Reference< awt::XExtendedToolkit > const & rToolkit ) :
cppu::WeakComponentImplHelper< awt::XTopWindowListener, frame::XTerminateListener >( maLock ),
mpDialog(pDialog), mxToolkit(rToolkit)
{
......
......@@ -98,7 +98,7 @@ public:
virtual void SAL_CALL notifyTermination( const css::lang::EventObject& aEvent ) override;
public:
RunDialog(GtkWidget *pDialog,
css::uno::Reference< css::awt::XExtendedToolkit > &rToolkit
css::uno::Reference< css::awt::XExtendedToolkit > const &rToolkit
);
virtual ~RunDialog() override;
gint run();
......
......@@ -74,8 +74,8 @@ private:
public:
CertificateChooser(vcl::Window* pParent,
css::uno::Reference< css::uno::XComponentContext>& rxCtx,
std::vector< css::uno::Reference< css::xml::crypto::XXMLSecurityContext > >& rxSecurityContexts);
css::uno::Reference< css::uno::XComponentContext> const & rxCtx,
std::vector< css::uno::Reference< css::xml::crypto::XXMLSecurityContext > > const & rxSecurityContexts);
virtual ~CertificateChooser() override;
virtual void dispose() override;
......
......@@ -35,8 +35,8 @@
using namespace css;
CertificateChooser::CertificateChooser(vcl::Window* _pParent,
uno::Reference<uno::XComponentContext>& _rxCtx,
std::vector< css::uno::Reference< css::xml::crypto::XXMLSecurityContext > >& rxSecurityContexts)
uno::Reference<uno::XComponentContext> const & _rxCtx,
std::vector< css::uno::Reference< css::xml::crypto::XXMLSecurityContext > > const & rxSecurityContexts)
: ModalDialog(_pParent, "SelectCertificateDialog", "xmlsec/ui/selectcertificatedialog.ui"),
mvUserData()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment