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