Kaydet (Commit) 31b89aae authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:countusersofdefaultparams in cui

Change-Id: Id3258a664c2ea740419331877f7ce6af5e2559e7
Reviewed-on: https://gerrit.libreoffice.org/45922Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9f9347c2
......@@ -378,7 +378,7 @@ IMPL_LINK( SvxMenuConfigPage, InsertHdl, MenuButton *, pButton, void )
pNameDialog->GetName(aNewName);
SvxConfigEntry* pNewEntryData =
new SvxConfigEntry( aNewName, aNewName, true );
new SvxConfigEntry( aNewName, aNewName, true, /*bParentData*/false );
pNewEntryData->SetName( aNewName );
pNewEntryData->SetUserDefined();
......
......@@ -381,7 +381,7 @@ IMPL_LINK_NOARG( SvxToolbarConfigPage, AddToolbarHdl, Button *, void )
}
SvxConfigEntry* pToolbar =
new SvxConfigEntry( aNewName, aNewURL, true );
new SvxConfigEntry( aNewName, aNewURL, true, /*bParentData*/false );
pToolbar->SetUserDefined();
pToolbar->SetMain();
......
......@@ -429,7 +429,7 @@ MenuSaveInData::GetEntries()
{
if ( pRootEntry == nullptr )
{
pRootEntry.reset( new SvxConfigEntry( "MainMenus", OUString(), true) );
pRootEntry.reset( new SvxConfigEntry( "MainMenus", OUString(), true, /*bParentData*/false) );
if ( m_xMenuSettings.is() )
{
......@@ -528,7 +528,7 @@ bool SaveInData::LoadSubMenus( const uno::Reference< container::XIndexAccess >&
}
SvxConfigEntry* pEntry = new SvxConfigEntry(
aLabel, aCommandURL, xSubMenu.is() );
aLabel, aCommandURL, xSubMenu.is(), /*bParentData*/false );
pEntry->SetUserDefined( bIsUserDefined );
if ( !bUseDefaultLabel )
......@@ -769,7 +769,7 @@ SvxEntries* ContextMenuSaveInData::GetEntries()
typedef std::unordered_map< OUString, bool > MenuInfo;
MenuInfo aMenuInfo;
m_pRootEntry.reset( new SvxConfigEntry( "ContextMenus", OUString(), true ) );
m_pRootEntry.reset( new SvxConfigEntry( "ContextMenus", OUString(), true, /*bParentData*/false ) );
css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aElementsInfo;
try
{
......@@ -808,7 +808,7 @@ SvxEntries* ContextMenuSaveInData::GetEntries()
// Menus without UI name aren't supposed to be customized.
continue;
SvxConfigEntry* pEntry = new SvxConfigEntry( aUIMenuName, aUrl, true );
SvxConfigEntry* pEntry = new SvxConfigEntry( aUIMenuName, aUrl, true, /*bParentData*/false );
pEntry->SetMain();
m_pRootEntry->GetEntries()->push_back( pEntry );
LoadSubMenus( xPopupMenu, aUIMenuName, pEntry, true );
......@@ -1643,7 +1643,7 @@ SvTreeListEntry* SvxConfigPage::AddFunction(
aDisplayName = vcl::CommandInfoProvider::GetLabelForCommand( aURL, aModuleId );
SvxConfigEntry* pNewEntryData =
new SvxConfigEntry( aDisplayName, aURL, false );
new SvxConfigEntry( aDisplayName, aURL, false, /*bParentData*/false );
pNewEntryData->SetUserDefined();
if ( aDisplayName.isEmpty() )
......@@ -1949,7 +1949,7 @@ SvxMainMenuOrganizerDialog::SvxMainMenuOrganizerDialog(
OUString newurl = SvxConfigPageHelper::generateCustomMenuURL( mpEntries );
SvxConfigEntry* pNewEntryData =
new SvxConfigEntry( newname, newurl, true );
new SvxConfigEntry( newname, newurl, true, /*bParentData*/false );
pNewEntryData->SetName( newname );
pNewEntryData->SetUserDefined();
pNewEntryData->SetMain();
......@@ -2258,7 +2258,7 @@ SvxEntries* ToolbarSaveInData::GetEntries()
if ( pRootEntry == nullptr )
{
pRootEntry.reset( new SvxConfigEntry( "MainToolbars", OUString(), true) );
pRootEntry.reset( new SvxConfigEntry( "MainToolbars", OUString(), true, /*bParentData*/false) );
uno::Sequence< uno::Sequence < beans::PropertyValue > > info =
GetConfigManager()->getUIElementsInfo(
......@@ -2302,7 +2302,7 @@ SvxEntries* ToolbarSaveInData::GetEntries()
}
SvxConfigEntry* pEntry = new SvxConfigEntry(
uiname, url, true );
uiname, url, true, /*bParentData*/false );
pEntry->SetMain();
pEntry->SetStyle( GetSystemStyle( url ) );
......@@ -2791,7 +2791,7 @@ void ToolbarSaveInData::LoadToolbar(
}
SvxConfigEntry* pEntry = new SvxConfigEntry(
aLabel, aCommandURL, false );
aLabel, aCommandURL, false, /*bParentData*/false );
pEntry->SetUserDefined( bIsUserDefined );
pEntry->SetVisible( bIsVisible );
......
......@@ -150,7 +150,7 @@ private:
const ControlDataEntry& rEntry,
const Color& rColor,
double fLineWidth,
double fTransparency = 0.0);
double fTransparency);
void RepaintToBuffer(
bool bUseDimmed = false,
bool bPaintHilight = false);
......
......@@ -52,7 +52,7 @@ public:
void FillFunctionsList(
const css::uno::Sequence< css::frame::DispatchInformation >& xCommands,
const VclPtr<SfxConfigFunctionListBox>& pFunctionListBox,
const OUString& filterTerm = OUString() );
const OUString& filterTerm );
OUString MapCommand2UIName(const OUString& sCommand);
/**
......
......@@ -30,8 +30,8 @@ class SvxBorderBackgroundDlg: public SfxTabDialog
public:
SvxBorderBackgroundDlg(vcl::Window *pParent,
const SfxItemSet& rCoreSet,
bool bEnableSelector = false,
bool bEnableDrawingLayerFillStyles = false);
bool bEnableSelector,
bool bEnableDrawingLayerFillStyles);
protected:
virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) override;
......
......@@ -274,8 +274,8 @@ public:
SvxConfigEntry( const OUString& rDisplayName,
const OUString& rCommandURL,
bool bPopup = false,
bool bParentData = false );
bool bPopup,
bool bParentData );
SvxConfigEntry()
:
......@@ -512,7 +512,7 @@ class SvxMainMenuOrganizerDialog : public ModalDialog
public:
SvxMainMenuOrganizerDialog (
vcl::Window*, SvxEntries*,
SvxConfigEntry const *, bool bCreateMenu = false );
SvxConfigEntry const *, bool bCreateMenu );
virtual ~SvxMainMenuOrganizerDialog() override;
virtual void dispose() override;
......
......@@ -199,8 +199,8 @@ class SvxScriptSelectorDialog : public ModalDialog
public:
SvxScriptSelectorDialog (
vcl::Window* pParent = nullptr,
bool bShowSlots = false,
vcl::Window* pParent,
bool bShowSlots,
const css::uno::Reference< css::frame::XFrame >& xFrame = nullptr
);
virtual ~SvxScriptSelectorDialog() override;
......
......@@ -63,8 +63,8 @@ class SvxLineTabDialog final : public SfxTabDialog
public:
SvxLineTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr,
SdrModel* pModel, const SdrObject* pObj = nullptr,
bool bHasObj = true );
SdrModel* pModel, const SdrObject* pObj,
bool bHasObj );
void SetNewDashList( XDashListRef const & pInLst)
{ pNewDashList = pInLst; }
......
......@@ -142,7 +142,7 @@ private:
DECL_LINK(Button2Hdl, Button*, void);
public:
SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const OUString& rDesc, Image const * pImg = nullptr );
SvxMessDialog( vcl::Window* pWindow, const OUString& rText, const OUString& rDesc, Image const * pImg );
virtual ~SvxMessDialog() override;
virtual void dispose() override;
......
......@@ -42,8 +42,8 @@ class SvxDistributePage : public SvxTabPage
public:
SvxDistributePage(vcl::Window* pWindow, const SfxItemSet& rInAttrs,
SvxDistributeHorizontal eHor = SvxDistributeHorizontal::NONE,
SvxDistributeVertical eVer = SvxDistributeVertical::NONE);
SvxDistributeHorizontal eHor,
SvxDistributeVertical eVer);
virtual ~SvxDistributePage() override;
virtual void dispose() override;
......@@ -61,8 +61,8 @@ class SvxDistributeDialog : public SfxSingleTabDialog
public:
SvxDistributeDialog(vcl::Window* pParent, const SfxItemSet& rAttr,
SvxDistributeHorizontal eHor = SvxDistributeHorizontal::NONE,
SvxDistributeVertical eVer = SvxDistributeVertical::NONE);
SvxDistributeHorizontal eHor,
SvxDistributeVertical eVer);
virtual ~SvxDistributeDialog() override;
virtual void dispose() override;
......
......@@ -53,7 +53,7 @@ protected:
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
public:
SvxHyperURLBox( vcl::Window* pParent, INetProtocol eSmart = INetProtocol::File );
SvxHyperURLBox( vcl::Window* pParent, INetProtocol eSmart );
};
......
......@@ -79,7 +79,7 @@ class SvInsertOleDlg : public InsertObjectDialog_Impl
public:
SvInsertOleDlg( vcl::Window* pParent,
const css::uno::Reference < css::embed::XStorage >& xStorage,
const SvObjectServerList* pServers = nullptr );
const SvObjectServerList* pServers );
virtual ~SvInsertOleDlg() override;
virtual void dispose() override;
virtual short Execute() override;
......
......@@ -113,7 +113,7 @@ private:
public:
SvxCaptionTabDialog(vcl::Window* pParent, const SdrView* pView,
SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE);
SvxAnchorIds nAnchorTypes);
/// link for the Writer to validate positions
void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink );
......
......@@ -81,7 +81,7 @@ class SvBaseLinksDlg : public ModalDialog
void SetManager( sfx2::LinkManager* );
public:
SvBaseLinksDlg( vcl::Window * pParent, sfx2::LinkManager*, bool bHtml = false );
SvBaseLinksDlg( vcl::Window * pParent, sfx2::LinkManager*, bool bHtml );
virtual ~SvBaseLinksDlg() override;
virtual void dispose() override;
void SetActLink( sfx2::SvBaseLink const * pLink );
......
......@@ -55,7 +55,7 @@ class SvxNumberingPreview : public vcl::Window
virtual void Paint( vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect ) override;
public:
SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits = WB_BORDER);
SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits);
void SetNumRule(const SvxNumRule* pNum)
{pActNum = pNum; Invalidate();};
......
......@@ -43,7 +43,7 @@ class SvxPostItDialog : public SfxModalDialog
{
public:
SvxPostItDialog(vcl::Window* pParent, const SfxItemSet& rCoreSet,
bool bPrevNext = false);
bool bPrevNext);
virtual ~SvxPostItDialog() override;
virtual void dispose() override;
......
......@@ -55,7 +55,7 @@ public:
SvxTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr,
const SdrView* pView,
SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE);
SvxAnchorIds nAnchorTypes);
//link for the Writer to validate positions
void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink );
......
......@@ -176,7 +176,7 @@ private:
public:
OfaTreeOptionsDialog( vcl::Window* pParent,
const css::uno::Reference< css::frame::XFrame >& _xFrame,
bool bActivateLastSelection = true );
bool bActivateLastSelection );
OfaTreeOptionsDialog( vcl::Window* pParent, const OUString& rExtensionId );
virtual ~OfaTreeOptionsDialog() override;
virtual void dispose() override;
......
......@@ -69,7 +69,7 @@ struct UserData
, aLineage(0)
{}
explicit UserData( Reference<XNameAccess> const & rXNameAccess, int rIndex = 0 )
explicit UserData( Reference<XNameAccess> const & rXNameAccess, int rIndex )
: bIsPropertyPath( false )
, aLineage(rIndex)
, aXNameAccess( rXNameAccess )
......
......@@ -86,7 +86,7 @@ private:
VclPtr<CuiCustomMultilineEdit> m_pEDValue;
public:
CuiAboutConfigValueDialog( vcl::Window* pWindow, const OUString& rValue , int limit = 0);
CuiAboutConfigValueDialog( vcl::Window* pWindow, const OUString& rValue , int limit);
virtual ~CuiAboutConfigValueDialog() override;
virtual void dispose() override;
......
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