Kaydet (Commit) 7c610a2a authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constantparam

Change-Id: I9fbfa6163c1d4650c52b00dc911972f07fe7c0e5
Reviewed-on: https://gerrit.libreoffice.org/56778
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 7de66670
......@@ -37,7 +37,7 @@ sc/inc/rangelst.hxx:48
sc/inc/rangeutl.hxx:162
void ScRangeStringConverter::GetStringFromAddress(class rtl::OUString &,const class ScAddress &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool,enum ScRefFlags)
enum ScRefFlags nFormatFlags setBits=0x8008 clearBits=0x7ff0
sc/inc/xmlwrap.hxx:92
sc/inc/xmlwrap.hxx:89
_Bool ScXMLImportWrapper::Import(enum ImportFlags,class ErrCode &)
enum ImportFlags nMode setBits=0x1
sc/source/ui/view/cellsh1.cxx:111
......@@ -52,7 +52,7 @@ sw/source/core/view/viewsh.cxx:716
sw/source/filter/html/swhtml.hxx:713
void SwHTMLParser::SetFrameFormatAttrs(class SfxItemSet &,enum HtmlFrameFormatFlags,class SfxItemSet &)
enum HtmlFrameFormatFlags nFlags setBits=0x1
sw/source/filter/ww8/wrtw8esh.cxx:1529
sw/source/filter/ww8/wrtw8esh.cxx:1540
enum ShapeFlag AddMirrorFlags(enum ShapeFlag,const class SwMirrorGrf &)
enum ShapeFlag nFlags setBits=0xa00 clearBits=0x5ef
xmloff/inc/MetaExportComponent.hxx:32
......
......@@ -240,9 +240,8 @@ namespace connectivity
public:
ONDXNode(){}
ONDXNode(const ONDXKey& rKey,
ONDXPagePtr aPagePtr = ONDXPagePtr())
:aChild(aPagePtr),aKey(rKey) {}
ONDXNode(const ONDXKey& rKey)
:aKey(rKey) {}
// Does the node point to a page?
bool HasChild() const {return aChild.HasPage();}
......
......@@ -594,11 +594,10 @@ private:
public:
SVGFileInfo(
const uno::Reference<io::XInputStream>& xInput,
sal_Int32 nFirstBytesSize = 4096)
const uno::Reference<io::XInputStream>& xInput)
: mxInput(xInput),
mnFirstBytes(),
mnFirstBytesSize(nFirstBytesSize),
mnFirstBytesSize(2048),
mnFirstRead(0),
mbProcessed(false),
mbIsSVG(false)
......@@ -668,7 +667,7 @@ OUString SAL_CALL SVGFilter::detect(Sequence<PropertyValue>& rDescriptor)
try
{
SVGFileInfo aSVGFileInfo(xInput, 2048);
SVGFileInfo aSVGFileInfo(xInput);
if(aSVGFileInfo.isSVG())
{
......
......@@ -44,8 +44,7 @@ typedef ::std::vector< AddonStatusbarItem > AddonStatusbarItemContainer;
namespace StatusbarMerger
{
bool IsCorrectContext( const ::rtl::OUString& aContext,
const ::rtl::OUString& aModuleIdentifier );
bool IsCorrectContext( const ::rtl::OUString& aContext );
bool ConvertSeqSeqToVector( const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > >& rSequence,
AddonStatusbarItemContainer& rContainer );
......
......@@ -477,7 +477,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc
for ( sal_uInt32 i = 0; i < nCount; i++ )
{
MergeStatusbarInstruction &rInstruction = aMergeInstructions[i];
if ( !StatusbarMerger::IsCorrectContext( rInstruction.aMergeContext, "" ) )
if ( !StatusbarMerger::IsCorrectContext( rInstruction.aMergeContext ) )
continue;
AddonStatusbarItemContainer aItems;
......
......@@ -113,7 +113,7 @@ bool lcl_MergeItems( StatusBar* pStatusbar,
for ( sal_Int32 i = 0; i < nSize; i++ )
{
const AddonStatusbarItem& rItem = rAddonItems[i];
if ( !StatusbarMerger::IsCorrectContext( rItem.aContext, OUString() ) )
if ( !StatusbarMerger::IsCorrectContext( rItem.aContext ) )
continue;
sal_uInt16 nInsPos = nPos + nModIndex + i;
......@@ -155,10 +155,9 @@ bool lcl_RemoveItems( StatusBar* pStatusbar,
}
bool StatusbarMerger::IsCorrectContext(
const OUString& rContext,
const OUString& rModuleIdentifier )
const OUString& rContext )
{
return (( rContext.getLength() == 0 ) || ( rContext.indexOf( rModuleIdentifier ) >= 0 ));
return rContext.isEmpty();
}
bool StatusbarMerger::ConvertSeqSeqToVector(
......
......@@ -249,7 +249,6 @@ private:
DECL_DLLPRIVATE_LINK(ActivatePageHdl, const OString&, void);
DECL_DLLPRIVATE_LINK(DeactivatePageHdl, const OString&, bool);
SAL_DLLPRIVATE void Init_Impl(bool bFmtFlag);
SAL_DLLPRIVATE void CreatePages();
SAL_DLLPRIVATE void setPreviewsToSamePlace();
......
......@@ -144,8 +144,7 @@ private:
NamedColor GetAutoColor() const;
public:
ColorWindow(const OUString& rCommand,
std::shared_ptr<PaletteManager> const & rPaletteManager,
ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager,
BorderColorStatus& rBorderColorStatus,
sal_uInt16 nSlotId,
const css::uno::Reference< css::frame::XFrame >& rFrame,
......
......@@ -93,7 +93,7 @@ private:
bool mbResetForeground : 1;
bool mbResetBackground : 1;
SVX_DLLPRIVATE void ResetSettings(bool bForeground, bool bBackground);
SVX_DLLPRIVATE void ResetSettings();
SVX_DLLPRIVATE void ApplySettings(vcl::RenderContext& rRenderContext);
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
SVX_DLLPRIVATE static void SetFontSize(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont);
......
......@@ -457,7 +457,7 @@ ScNoteCaptionCreator::ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& r
}
}
void removeFromDrawPageAndFree( const std::shared_ptr< SdrCaptionObj >& pCaption, bool bIgnoreUndo = false )
void removeFromDrawPageAndFree( const std::shared_ptr< SdrCaptionObj >& pCaption )
{
SdrPage* pDrawPage(pCaption->getSdrPageFromSdrObject());
SAL_WARN_IF( !pDrawPage, "sc.core", "ScCaptionPtr::removeFromDrawPageAndFree - object without drawing page");
......@@ -465,15 +465,12 @@ void removeFromDrawPageAndFree( const std::shared_ptr< SdrCaptionObj >& pCaption
{
pDrawPage->RecalcObjOrdNums();
bool bRecording = false;
if (!bIgnoreUndo)
{
ScDrawLayer* pDrawLayer(dynamic_cast< ScDrawLayer* >(&pCaption->getSdrModelFromSdrObject()));
SAL_WARN_IF( !pDrawLayer, "sc.core", "ScCaptionPtr::removeFromDrawPageAndFree - object without drawing layer");
// create drawing undo action (before removing the object to have valid draw page in undo action)
bRecording = (pDrawLayer && pDrawLayer->IsRecording());
if (bRecording)
pDrawLayer->AddCalcUndo( new ScUndoDelSdrCaptionObj( pCaption ));
}
ScDrawLayer* pDrawLayer(dynamic_cast< ScDrawLayer* >(&pCaption->getSdrModelFromSdrObject()));
SAL_WARN_IF( !pDrawLayer, "sc.core", "ScCaptionPtr::removeFromDrawPageAndFree - object without drawing layer");
// create drawing undo action (before removing the object to have valid draw page in undo action)
bRecording = (pDrawLayer && pDrawLayer->IsRecording());
if (bRecording)
pDrawLayer->AddCalcUndo( new ScUndoDelSdrCaptionObj( pCaption ));
// remove the object from the drawing page, delete if undo is disabled
pDrawPage->RemoveObject( pCaption->GetOrdNum() );
}
......
......@@ -1461,11 +1461,6 @@ SfxTabDialogController::SfxTabDialogController
, m_pSet(pItemSet ? new SfxItemSet(*pItemSet) : nullptr)
, m_pOutSet(nullptr)
, m_pRanges(nullptr)
{
Init_Impl(/*bEditFmt*/false);
}
void SfxTabDialogController::Init_Impl(bool /*bFmtFlag*/)
{
m_pImpl.reset(new TabDlg_Impl(m_xTabCtrl->get_n_pages()));
m_pImpl->bHideResetBtn = !m_xResetBtn->get_visible();
......
......@@ -1441,10 +1441,10 @@ Size SvxFontPrevWindow::GetOptimalSize() const
return getPreviewStripSize(*this);
}
void FontPrevWindow::ResetSettings(bool bForeground, bool bBackground)
void FontPrevWindow::ResetSettings()
{
mbResetForeground = bForeground;
mbResetBackground = bBackground;
mbResetForeground = true;
mbResetBackground = true;
Invalidate();
}
......@@ -1489,7 +1489,7 @@ void FontPrevWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
initFont(pImpl->maCJKFont);
initFont(pImpl->maCTLFont);
ResetSettings(true, true);
ResetSettings();
}
FontPrevWindow::FontPrevWindow()
......@@ -1514,7 +1514,7 @@ SvxFont& FontPrevWindow::GetCJKFont()
void FontPrevWindow::StyleUpdated()
{
ResetSettings(true, true);
ResetSettings();
CustomWidgetController::StyleUpdated();
}
......
......@@ -1364,8 +1364,7 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand,
}
}
ColorWindow::ColorWindow(const OUString& rCommand,
std::shared_ptr<PaletteManager> const & rPaletteManager,
ColorWindow::ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager,
BorderColorStatus& rBorderColorStatus,
sal_uInt16 nSlotId,
const Reference< XFrame >& rFrame,
......@@ -1375,7 +1374,6 @@ ColorWindow::ColorWindow(const OUString& rCommand,
: ToolbarPopupBase(rFrame)
, m_xBuilder(Application::CreateBuilder(pMenuButton, "svx/ui/colorwindow.ui"))
, theSlotId(nSlotId)
, maCommand(rCommand)
, mpParentWindow(pParentWindow)
, mpMenuButton(pMenuButton)
, mxPaletteManager(rPaletteManager)
......@@ -3788,7 +3786,6 @@ void ColorListBox::createColorWindow()
EnsurePaletteManager();
m_xColorWindow.reset(new ColorWindow(
OUString() /*m_aCommandURL*/,
m_xPaletteManager,
m_aBorderColorStatus,
0, // slotID
......
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