summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-12 13:10:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-14 06:40:30 +0000
commit1e49e33c26950b606714c0dafb26cbcb2aeb3877 (patch)
treee510fd3a5babf1712d136b866120bea4dd5b8f1a /cui/source
parente1822c809b137859382139aace0c08be4547c157 (diff)
loplugin:constantparam in chart2..connectivity
Change-Id: Ic9e1bd36a11c7148fa7595a2b6c6de9bd7a8653d Reviewed-on: https://gerrit.libreoffice.org/28834 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx14
-rw-r--r--cui/source/dialogs/iconcdlg.cxx24
-rw-r--r--cui/source/dialogs/newtabledlg.cxx4
-rw-r--r--cui/source/dialogs/scriptdlg.cxx5
-rw-r--r--cui/source/factory/dlgfact.cxx4
-rw-r--r--cui/source/inc/autocdlg.hxx4
-rw-r--r--cui/source/inc/iconcdlg.hxx8
-rw-r--r--cui/source/inc/newtabledlg.hxx2
-rw-r--r--cui/source/inc/numfmt.hxx2
-rw-r--r--cui/source/inc/scriptdlg.hxx2
-rw-r--r--cui/source/options/connpoolconfig.cxx4
-rw-r--r--cui/source/options/connpoolsettings.cxx4
-rw-r--r--cui/source/options/connpoolsettings.hxx2
-rw-r--r--cui/source/tabpages/numfmt.cxx4
14 files changed, 27 insertions, 56 deletions
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 725e0cba2248..8a1d65859002 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -100,8 +100,7 @@ namespace svx
public:
void Paint( OutputDevice& _rDevice, const Rectangle& _rRect, DrawTextFlags _nTextStyle,
- Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation,
- vcl::ControlLayoutData* _pLayoutData = nullptr );
+ Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation );
};
PseudoRubyText::PseudoRubyText()
@@ -118,13 +117,8 @@ namespace svx
void PseudoRubyText::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect, DrawTextFlags _nTextStyle,
- Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation,
- vcl::ControlLayoutData* _pLayoutData )
+ Rectangle* _pPrimaryLocation, Rectangle* _pSecondaryLocation )
{
- bool bLayoutOnly = (nullptr != _pLayoutData);
- MetricVector* pTextMetrics = bLayoutOnly ? &_pLayoutData->m_aUnicodeBoundRects : nullptr;
- OUString* pDisplayText = bLayoutOnly ? &_pLayoutData->m_aDisplayText : nullptr;
-
Size aPlaygroundSize(_rRect.GetSize());
// the font for the secondary text:
@@ -194,10 +188,10 @@ namespace svx
nDrawTextStyle &= ~DrawTextFlags( DrawTextFlags::Right | DrawTextFlags::Left | DrawTextFlags::Bottom | DrawTextFlags::Top );
nDrawTextStyle |= DrawTextFlags::Center | DrawTextFlags::VCenter;
- rRenderContext.DrawText( aPrimaryRect, m_sPrimaryText, nDrawTextStyle, pTextMetrics, pDisplayText );
+ rRenderContext.DrawText( aPrimaryRect, m_sPrimaryText, nDrawTextStyle );
{
FontSwitch aFontRestore(rRenderContext, aSmallerFont);
- rRenderContext.DrawText( aSecondaryRect, m_sSecondaryText, nDrawTextStyle, pTextMetrics, pDisplayText );
+ rRenderContext.DrawText( aSecondaryRect, m_sSecondaryText, nDrawTextStyle );
}
// outta here
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index fbaaf4753159..3e38e4da4bf1 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -155,12 +155,11 @@ VCL_BUILDER_FACTORY_ARGS(SvtIconChoiceCtrl,
WB_NODRAGSELECTION | WB_TABSTOP);
IconChoiceDialog::IconChoiceDialog ( vcl::Window* pParent, const OUString& rID,
- const OUString& rUIXMLDescription,
- const SfxItemSet *pItemSet )
+ const OUString& rUIXMLDescription )
: ModalDialog ( pParent, rID, rUIXMLDescription ),
mnCurrentPageId ( USHRT_MAX ),
- pSet ( pItemSet ),
+ pSet ( nullptr ),
pOutSet ( nullptr ),
pExampleSet ( nullptr ),
pRanges ( nullptr ),
@@ -273,12 +272,9 @@ SvxIconChoiceCtrlEntry* IconChoiceDialog::AddTabPage(
CreatePage pCreateFunc /* != 0 */
)
{
- IconChoicePageData* pData = new IconChoicePageData ( nId, pCreateFunc,
- nullptr );
+ IconChoicePageData* pData = new IconChoicePageData ( nId, pCreateFunc );
maPageList.push_back( pData );
- pData->fnGetRanges = nullptr;
-
sal_uInt16 *pId = new sal_uInt16 ( nId );
SvxIconChoiceCtrlEntry* pEntry = m_pIconCtrl->InsertEntry( rIconText, rChoiceIcon );
pEntry->SetUserData ( static_cast<void*>(pId) );
@@ -531,20 +527,6 @@ const sal_uInt16* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool )
std::vector<sal_uInt16> aUS;
size_t nCount = maPageList.size();
- for ( size_t i = 0; i < nCount; ++i )
- {
- IconChoicePageData* pData = maPageList[ i ];
- if ( pData->fnGetRanges )
- {
- const sal_uInt16* pTmpRanges = (pData->fnGetRanges)();
- const sal_uInt16* pIter = pTmpRanges;
-
- sal_uInt16 nLen;
- for( nLen = 0; *pIter; ++nLen, ++pIter )
- ;
- aUS.insert( aUS.end(), pTmpRanges, pTmpRanges + nLen );
- }
- }
// remove double Id's
{
diff --git a/cui/source/dialogs/newtabledlg.cxx b/cui/source/dialogs/newtabledlg.cxx
index a83e11ac991f..6c02303647f2 100644
--- a/cui/source/dialogs/newtabledlg.cxx
+++ b/cui/source/dialogs/newtabledlg.cxx
@@ -21,8 +21,8 @@
#include "dialmgr.hxx"
#include "newtabledlg.hxx"
-SvxNewTableDialog::SvxNewTableDialog( vcl::Window* pParent )
- : m_pDialog( VclPtr<ModalDialog>::Create( pParent, "NewTableDialog", "cui/ui/newtabledialog.ui" ) )
+SvxNewTableDialog::SvxNewTableDialog()
+ : m_pDialog( VclPtr<ModalDialog>::Create( nullptr, "NewTableDialog", "cui/ui/newtabledialog.ui" ) )
{
m_pDialog->get(mpNumRows, "rows");
m_pDialog->get(mpNumColumns, "columns");
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 95e4fbc3ebc6..3cceae8a9a74 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -71,7 +71,7 @@ using namespace css::document;
void ShowErrorDialog( const Any& aException )
{
- std::unique_ptr<SvxScriptErrorDialog> pDlg(new SvxScriptErrorDialog( nullptr, aException ));
+ std::unique_ptr<SvxScriptErrorDialog> pDlg(new SvxScriptErrorDialog( aException ));
pDlg->Execute();
}
@@ -1434,8 +1434,7 @@ OUString GetErrorMessage( const css::uno::Any& aException )
}
-SvxScriptErrorDialog::SvxScriptErrorDialog(
- vcl::Window* , css::uno::Any aException )
+SvxScriptErrorDialog::SvxScriptErrorDialog( css::uno::Any aException )
: m_sMessage()
{
SolarMutexGuard aGuard;
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 94ca9e671fad..f748ab491e69 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -956,7 +956,7 @@ VclAbstractRefreshableDialog * AbstractDialogFactory_Impl::CreateActualizeProgre
VclAbstractDialog*
AbstractDialogFactory_Impl::CreateScriptErrorDialog(const css::uno::Any& rException)
{
- return new SvxScriptErrorDialog(nullptr, rException);
+ return new SvxScriptErrorDialog(rException);
}
AbstractScriptSelectorDialog*
@@ -1506,7 +1506,7 @@ SvxAbstractSplittTableDialog* AbstractDialogFactory_Impl::CreateSvxSplittTableDi
SvxAbstractNewTableDialog* AbstractDialogFactory_Impl::CreateSvxNewTableDialog()
{
- return new SvxNewTableDialog( nullptr );
+ return new SvxNewTableDialog;
}
VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog(
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index 45cd694f6be6..5005acf32a2c 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -73,8 +73,8 @@ class OfaACorrCheckListBox : public SvSimpleTable
virtual void KeyInput( const KeyEvent& rKEvt ) override;
public:
- OfaACorrCheckListBox(SvSimpleTableContainer& rParent, WinBits nBits = WB_BORDER)
- : SvSimpleTable(rParent, nBits)
+ OfaACorrCheckListBox(SvSimpleTableContainer& rParent)
+ : SvSimpleTable(rParent, WB_BORDER)
{
}
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 3cc6f7c5b568..6f9eda810afd 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -39,22 +39,19 @@ class IconChoicePage;
// Create-Function
typedef VclPtr<IconChoicePage> (*CreatePage)(vcl::Window *pParent, IconChoiceDialog* pDlg, const SfxItemSet &rAttrSet);
-typedef const sal_uInt16* (*GetPageRanges)(); // gives international Which-value
/// Data-structure for pages in dialog
struct IconChoicePageData
{
sal_uInt16 nId;
CreatePage fnCreatePage; ///< pointer to the factory
- GetPageRanges fnGetRanges; ///< pointer to the ranges-function
VclPtr<IconChoicePage> pPage; ///< the TabPage itself
bool bRefresh; ///< Flag: page has to be newly initialized
// constructor
- IconChoicePageData( sal_uInt16 Id, CreatePage fnPage, GetPageRanges fnRanges )
+ IconChoicePageData( sal_uInt16 Id, CreatePage fnPage )
: nId ( Id ),
fnCreatePage ( fnPage ),
- fnGetRanges ( fnRanges ),
pPage ( nullptr ),
bRefresh ( false )
{}
@@ -154,8 +151,7 @@ protected:
public:
// the IconChoiceCtrl's could also be set in the Ctor
- IconChoiceDialog ( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription,
- const SfxItemSet * pItemSet = nullptr );
+ IconChoiceDialog ( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription );
virtual ~IconChoiceDialog () override;
virtual void dispose() override;
diff --git a/cui/source/inc/newtabledlg.hxx b/cui/source/inc/newtabledlg.hxx
index ccf25f63d110..6dd1de126ae4 100644
--- a/cui/source/inc/newtabledlg.hxx
+++ b/cui/source/inc/newtabledlg.hxx
@@ -34,7 +34,7 @@ private:
VclPtr<NumericField> mpNumRows;
public:
- SvxNewTableDialog( vcl::Window* pWindow );
+ SvxNewTableDialog();
virtual ~SvxNewTableDialog() override;
virtual short Execute() override;
diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index 0429601d5d0a..fac8bccfe8dd 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -53,7 +53,7 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
public:
- SvxNumberPreview(vcl::Window* pParent, WinBits nStyle = WB_BORDER);
+ SvxNumberPreview(vcl::Window* pParent);
void NotifyChange( const OUString& rPrevStr, const Color* pColor = nullptr );
};
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index b158ffe8fdfd..94732fcf6d9f 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -190,7 +190,7 @@ private:
public:
- SvxScriptErrorDialog( vcl::Window* parent, css::uno::Any aException );
+ SvxScriptErrorDialog( css::uno::Any aException );
virtual ~SvxScriptErrorDialog() override;
diff --git a/cui/source/options/connpoolconfig.cxx b/cui/source/options/connpoolconfig.cxx
index 6a2292ac216c..1cbc2ca6a522 100644
--- a/cui/source/options/connpoolconfig.cxx
+++ b/cui/source/options/connpoolconfig.cxx
@@ -93,7 +93,7 @@ namespace offapp
++aLoopDrivers
)
{
- aSettings.push_back(DriverPooling(*aLoopDrivers, 120));
+ aSettings.push_back(DriverPooling(*aLoopDrivers));
}
// then look for which of them settings are stored in the configuration
@@ -121,7 +121,7 @@ namespace offapp
if (aLookup == aSettings.end())
{ // do not know the driver - add it
- aSettings.push_back(DriverPooling(sThisDriverName, 120));
+ aSettings.push_back(DriverPooling(sThisDriverName));
// and the position of the new entry
aLookup = aSettings.end();
diff --git a/cui/source/options/connpoolsettings.cxx b/cui/source/options/connpoolsettings.cxx
index 7eb2d8e82929..6bc676cfbe39 100644
--- a/cui/source/options/connpoolsettings.cxx
+++ b/cui/source/options/connpoolsettings.cxx
@@ -23,10 +23,10 @@
namespace offapp
{
- DriverPooling::DriverPooling( const OUString& _rName, const sal_Int32 _nTimeout )
+ DriverPooling::DriverPooling( const OUString& _rName )
:sName(_rName)
,bEnabled(false)
- ,nTimeoutSeconds(_nTimeout)
+ ,nTimeoutSeconds(120)
{
}
diff --git a/cui/source/options/connpoolsettings.hxx b/cui/source/options/connpoolsettings.hxx
index 6cb1b0de3a33..07b607730953 100644
--- a/cui/source/options/connpoolsettings.hxx
+++ b/cui/source/options/connpoolsettings.hxx
@@ -37,7 +37,7 @@ namespace offapp
bool bEnabled;
sal_Int32 nTimeoutSeconds;
- DriverPooling( const OUString& _rName, const sal_Int32 _nTimeout );
+ DriverPooling( const OUString& _rName );
bool operator == (const DriverPooling& _rR) const;
bool operator != (const DriverPooling& _rR) const { return !operator ==(_rR); }
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index e5768dcfdf39..e0f460a47a0c 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -77,8 +77,8 @@ const sal_uInt16 SvxNumberFormatTabPage::pRanges[] =
#*
#************************************************************************/
-SvxNumberPreview::SvxNumberPreview(vcl::Window* pParent, WinBits nStyle)
- : Window(pParent, nStyle)
+SvxNumberPreview::SvxNumberPreview(vcl::Window* pParent)
+ : Window(pParent, WB_BORDER)
, mnPos(-1)
, mnChar(0x0)
{