Kaydet (Commit) 906f8e89 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constantparam

Change-Id: I593ccc2fb43321caf3ff64d0c348b1bac742ad18
Reviewed-on: https://gerrit.libreoffice.org/63025
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 7f48fa81
......@@ -346,7 +346,7 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
AddTabPage("transparent", SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE);
AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME);
AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS);
AddTabPage("alignment", SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::Create, nullptr);
AddTabPage("alignment", SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::Create);
if( aCJKOptions.IsAsianTypographyEnabled() )
AddTabPage("asian", SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN);
break;
......@@ -357,7 +357,7 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
AddTabPage("transparent", SchResId(STR_PAGE_TRANSPARENCY), RID_SVXPAGE_TRANSPARENCE);
AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME);
AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS);
AddTabPage("legendpos", SchResId(STR_PAGE_POSITION), SchLegendPosTabPage::Create, nullptr);
AddTabPage("legendpos", SchResId(STR_PAGE_POSITION), SchLegendPosTabPage::Create);
if (aCJKOptions.IsAsianTypographyEnabled())
AddTabPage("asian", SchResId(STR_PAGE_ASIAN), RID_SVXPAGE_PARA_ASIAN);
break;
......@@ -365,12 +365,12 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
case OBJECTTYPE_DATA_SERIES:
case OBJECTTYPE_DATA_POINT:
if( m_pParameter->ProvidesSecondaryYAxis() || m_pParameter->ProvidesOverlapAndGapWidth() || m_pParameter->ProvidesMissingValueTreatments() )
AddTabPage("options", SchResId(STR_PAGE_OPTIONS),SchOptionTabPage::Create, nullptr);
AddTabPage("options", SchResId(STR_PAGE_OPTIONS),SchOptionTabPage::Create);
if( m_pParameter->ProvidesStartingAngle())
AddTabPage("polaroptions", SchResId(STR_PAGE_OPTIONS), PolarOptionsTabPage::Create, nullptr);
AddTabPage("polaroptions", SchResId(STR_PAGE_OPTIONS), PolarOptionsTabPage::Create);
if( m_pParameter->HasGeometryProperties() )
AddTabPage("layout", SchResId(STR_PAGE_LAYOUT), SchLayoutTabPage::Create, nullptr);
AddTabPage("layout", SchResId(STR_PAGE_LAYOUT), SchLayoutTabPage::Create);
if(m_pParameter->HasAreaProperties())
{
......@@ -383,7 +383,7 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
case OBJECTTYPE_DATA_LABEL:
case OBJECTTYPE_DATA_LABELS:
AddTabPage("border", SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE);
AddTabPage("datalabels", SchResId(STR_OBJECT_DATALABELS), DataLabelsTabPage::Create, nullptr);
AddTabPage("datalabels", SchResId(STR_OBJECT_DATALABELS), DataLabelsTabPage::Create);
AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME);
AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), RID_SVXPAGE_CHAR_EFFECTS);
if( aCJKOptions.IsAsianTypographyEnabled() )
......@@ -394,12 +394,12 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
case OBJECTTYPE_AXIS:
{
if( m_pParameter->HasScaleProperties() )
AddTabPage("scale", SchResId(STR_PAGE_SCALE), ScaleTabPage::Create, nullptr);
AddTabPage("scale", SchResId(STR_PAGE_SCALE), ScaleTabPage::Create);
if( m_pParameter->HasScaleProperties() )//no positioning page for z axes so far as the tickmarks are not shown so far
AddTabPage("axispos", SchResId(STR_PAGE_POSITIONING), AxisPositionsTabPage::Create, nullptr);
AddTabPage("axispos", SchResId(STR_PAGE_POSITIONING), AxisPositionsTabPage::Create);
AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE);
AddTabPage("axislabel", SchResId(STR_OBJECT_LABEL), SchAxisLabelTabPage::Create, nullptr);
AddTabPage("axislabel", SchResId(STR_OBJECT_LABEL), SchAxisLabelTabPage::Create);
if( m_pParameter->HasNumberProperties() )
AddTabPage("numberformat", SchResId(STR_PAGE_NUMBERS), RID_SVXPAGE_NUMBERFORMAT);
AddTabPage("fontname", SchResId(STR_PAGE_FONT), RID_SVXPAGE_CHAR_NAME);
......@@ -410,12 +410,12 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
}
case OBJECTTYPE_DATA_ERRORS_X:
AddTabPage("xerrorbar", SchResId(STR_PAGE_XERROR_BARS), ErrorBarsTabPage::Create, nullptr);
AddTabPage("xerrorbar", SchResId(STR_PAGE_XERROR_BARS), ErrorBarsTabPage::Create);
AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE);
break;
case OBJECTTYPE_DATA_ERRORS_Y:
AddTabPage("yerrorbar", SchResId(STR_PAGE_YERROR_BARS), ErrorBarsTabPage::Create, nullptr);
AddTabPage("yerrorbar", SchResId(STR_PAGE_YERROR_BARS), ErrorBarsTabPage::Create);
AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE);
break;
......@@ -430,7 +430,7 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
break;
case OBJECTTYPE_DATA_CURVE:
AddTabPage("trendline", SchResId(STR_PAGE_TRENDLINE_TYPE), TrendlineTabPage::Create, nullptr);
AddTabPage("trendline", SchResId(STR_PAGE_TRENDLINE_TYPE), TrendlineTabPage::Create);
AddTabPage("border", SchResId(STR_PAGE_LINE), RID_SVXPAGE_LINE);
break;
......@@ -462,7 +462,7 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
/* When rotation is supported for equation text boxes, use
SchAlignmentTabPage::Create here. The special
SchAlignmentTabPage::CreateWithoutRotation can be deleted. */
AddTabPage("alignment", SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::CreateWithoutRotation, nullptr);
AddTabPage("alignment", SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::CreateWithoutRotation);
}
break;
default:
......
codemaker/source/javamaker/classfile.hxx:152
codemaker/source/javamaker/classfile.hxx:153
void codemaker::javamaker::ClassFile::ClassFile(enum codemaker::javamaker::ClassFile::AccessFlags,const class rtl::OString &,const class rtl::OString &,const class rtl::OString &)
enum codemaker::javamaker::ClassFile::AccessFlags accessFlags setBits=0x1
codemaker/source/javamaker/classfile.hxx:167
codemaker/source/javamaker/classfile.hxx:168
void codemaker::javamaker::ClassFile::addField(enum codemaker::javamaker::ClassFile::AccessFlags,const class rtl::OString &,const class rtl::OString &,unsigned short,const class rtl::OString &)
enum codemaker::javamaker::ClassFile::AccessFlags accessFlags setBits=0x1
cui/source/options/webconninfo.hxx:35
......@@ -10,19 +10,19 @@ cui/source/options/webconninfo.hxx:35
dbaccess/source/filter/xml/xmlExport.hxx:171
void dbaxml::ODBExport::ODBExport(const class com::sun::star::uno::Reference<class com::sun::star::uno::XComponentContext> &,const class rtl::OUString &,enum SvXMLExportFlags)
enum SvXMLExportFlags nExportFlag setBits=0x400 clearBits=0x200
include/basegfx/polygon/b2dpolygontools.hxx:143
include/basegfx/polygon/b2dpolygontools.hxx:144
enum CutFlagValue findCut(const class basegfx::B2DPoint &,const class basegfx::B2DVector &,const class basegfx::B2DPoint &,const class basegfx::B2DVector &,enum CutFlagValue,double *,double *)
enum CutFlagValue aCutFlags setBits=0x1
include/framework/framelistanalyzer.hxx:181
void framework::FrameListAnalyzer::FrameListAnalyzer(const class com::sun::star::uno::Reference<class com::sun::star::frame::XFramesSupplier> &,const class com::sun::star::uno::Reference<class com::sun::star::frame::XFrame> &,enum FrameAnalyzerFlags)
enum FrameAnalyzerFlags eDetectMode setBits=0x4
include/sfx2/objsh.hxx:464
include/sfx2/objsh.hxx:468
void SfxObjectShell::FinishedLoading(enum SfxLoadedFlags)
enum SfxLoadedFlags nWhich setBits=0x1
include/svtools/brwbox.hxx:438
void BrowseBox::InsertDataColumn(unsigned short,const class rtl::OUString &,long,enum HeaderBarItemBits,unsigned short)
enum HeaderBarItemBits nBits setBits=0x410 clearBits=0x3ac
include/svtools/wizardmachine.hxx:172
include/svtools/wizardmachine.hxx:178
void svt::OWizardMachine::OWizardMachine(class vcl::Window *,enum WizardButtonFlags)
enum WizardButtonFlags _nButtonFlags setBits=0xf
include/vcl/gdimtf.hxx:195
......@@ -43,13 +43,13 @@ sc/source/ui/view/cellsh1.cxx:115
sc/source/ui/view/cellsh1.cxx:138
class rtl::OUString FlagsToString(enum InsertDeleteFlags,enum InsertDeleteFlags)
enum InsertDeleteFlags nFlagsMask setBits=0x87f clearBits=0x700
sw/source/core/view/viewsh.cxx:730
sw/source/core/view/viewsh.cxx:734
void lcl_InvalidateAllContent(class SwViewShell &,enum SwInvalidateFlags)
enum SwInvalidateFlags nInv setBits=0x2
sw/source/filter/html/swhtml.hxx:671
void SwHTMLParser::SetFrameFormatAttrs(class SfxItemSet &,enum HtmlFrameFormatFlags,class SfxItemSet &)
enum HtmlFrameFormatFlags nFlags setBits=0x1
sw/source/filter/ww8/wrtw8esh.cxx:1534
sw/source/filter/ww8/wrtw8esh.cxx:1529
enum ShapeFlag AddMirrorFlags(enum ShapeFlag,const class SwMirrorGrf &)
enum ShapeFlag nFlags setBits=0xa00 clearBits=0x5ef
xmloff/inc/MetaExportComponent.hxx:32
......
......@@ -86,7 +86,7 @@ void ODbAdminDialog::PageCreated(const OString& rId, SfxTabPage& _rPage)
void ODbAdminDialog::addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc)
{
AddTabPage(rPageId, DBA_RES(pTextId), pCreateFunc, nullptr);
AddTabPage(rPageId, DBA_RES(pTextId), pCreateFunc);
}
void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName)
......@@ -145,7 +145,7 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName
case ::dbaccess::DST_USERDEFINE10:
{
OUString aTitle(DBA_RES(STR_PAGETITLE_ADVANCED));
AddTabPage("user" + OString(static_cast<int>(eType)), aTitle, ODriversSettings::CreateUser, nullptr);
AddTabPage("user" + OString(static_cast<int>(eType)), aTitle, ODriversSettings::CreateUser);
}
break;
default:
......@@ -186,7 +186,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou
if ( pCollection->determineType(getDatasourceType( *m_xExampleSet )) == ::dbaccess::DST_MYSQL_NATIVE )
{
OString sMySqlNative("mysqlnative");
AddTabPage(sMySqlNative, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE, nullptr);
AddTabPage(sMySqlNative, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE);
RemoveTabPage("advanced");
m_sMainPageID = sMySqlNative;
}
......
......@@ -265,8 +265,7 @@ public:
void AddTabPage(const OString& rName, // Name of the label for the new page to create
const OUString& rLabel, // UI Label for the new page to create
CreateTabPage pCreateFunc, // != 0
GetTabPageRanges pRangesFunc); // can be 0
CreateTabPage pCreateFunc); // != 0
void AddTabPage(const OString& rName, // Name of the label for the new page to create
const OUString& rLabel, // UI Label for the new page to create
......
......@@ -1155,7 +1155,6 @@ public:
sal_Int32 nIndex = 0,
sal_Int32 nLen = -1,
SalLayoutFlags flags = SalLayoutFlags::NONE,
vcl::TextLayoutCache const* = nullptr,
const SalLayoutGlyphs* pLayoutCache = nullptr);
long GetTextArray( const OUString& rStr, long* pDXAry,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
......
......@@ -1181,7 +1181,7 @@ public:
sal_uInt16 GetChildCount() const;
vcl::Window* GetChild( sal_uInt16 nChild ) const;
vcl::Window* GetWindow( GetWindowType nType ) const;
bool IsChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
bool IsChild( const vcl::Window* pWindow ) const;
bool IsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const;
/// Add all children to rAllChildren recursively.
......
......@@ -454,7 +454,7 @@ public:
ScTokenArray* CompileString( const OUString& rFormula, const OUString& rFormulaNmsp );
const ScAddress& GetPos() const { return aPos; }
void MoveRelWrap( SCCOL nMaxCol, SCROW nMaxRow );
void MoveRelWrap();
static void MoveRelWrap( const ScTokenArray& rArr, const ScDocument* pDoc, const ScAddress& rPos,
SCCOL nMaxCol, SCROW nMaxRow );
......
......@@ -4769,7 +4769,7 @@ bool ScCompiler::HandleRange()
AdjustSheetLocalNameRelReferences( nSheetTab - aPos.Tab());
SetRelNameReference();
MoveRelWrap(MAXCOL, MAXROW);
MoveRelWrap();
}
maArrIterator.Reset();
if ( bAddPair )
......@@ -4826,7 +4826,7 @@ bool ScCompiler::HandleExternalReference(const FormulaToken& _aToken)
if (FormulaTokenArrayPlainIterator(*pNew).GetNextReference() != nullptr)
{
SetRelNameReference();
MoveRelWrap(MAXCOL, MAXROW);
MoveRelWrap();
}
maArrIterator.Reset();
return GetToken();
......@@ -4874,14 +4874,14 @@ void ScCompiler::SetRelNameReference()
// Wrap-adjust relative references of a RangeName to current position,
// don't call for other token arrays!
void ScCompiler::MoveRelWrap( SCCOL nMaxCol, SCROW nMaxRow )
void ScCompiler::MoveRelWrap()
{
for ( auto t: pArr->References() )
{
if ( t->GetType() == svSingleRef || t->GetType() == svExternalSingleRef )
ScRefUpdate::MoveRelWrap( pDoc, aPos, nMaxCol, nMaxRow, SingleDoubleRefModifier( *t->GetSingleRef() ).Ref() );
ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, SingleDoubleRefModifier( *t->GetSingleRef() ).Ref() );
else
ScRefUpdate::MoveRelWrap( pDoc, aPos, nMaxCol, nMaxRow, *t->GetDoubleRef() );
ScRefUpdate::MoveRelWrap( pDoc, aPos, MAXCOL, MAXROW, *t->GetDoubleRef() );
}
}
......
......@@ -263,7 +263,7 @@ void ScRangeData::UpdateSymbol( OUStringBuffer& rBuffer, const ScAddress& rPos )
{
std::unique_ptr<ScTokenArray> pTemp( pCode->Clone() );
ScCompiler aComp(pDoc, rPos, *pTemp, formula::FormulaGrammar::GRAM_DEFAULT);
aComp.MoveRelWrap(MAXCOL, MAXROW);
aComp.MoveRelWrap();
aComp.CreateStringFromTokenArray( rBuffer );
}
......
......@@ -2000,12 +2000,11 @@ void SfxTabDialogController::AddTabPage(const OString &rName /* Page ID */,
void SfxTabDialogController::AddTabPage(const OString &rName, /* Page ID */
const OUString& rRiderText,
CreateTabPage pCreateFunc /* Pointer to the Factory Method */,
GetTabPageRanges pRangesFunc /* Pointer to the Method for querying Ranges onDemand */)
CreateTabPage pCreateFunc /* Pointer to the Factory Method */)
{
assert(!m_xTabCtrl->get_page(rName) && "Double Page-Ids in the Tabpage");
m_xTabCtrl->append_page(rName, rRiderText);
AddTabPage(rName, pCreateFunc, pRangesFunc);
AddTabPage(rName, pCreateFunc, nullptr);
}
void SfxTabDialogController::AddTabPage(const OString &rName, const OUString& rRiderText,
......
......@@ -1815,7 +1815,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
aGlyphsKey = SwTextGlyphsKey{ &rInf.GetOut(), *pStr, nTmpIdx, nLen };
pGlyphs = lcl_CreateLayout(aGlyphsKey, m_aTextGlyphs[aGlyphsKey]);
rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, pKernArray.get(),
nTmpIdx , nLen, SalLayoutFlags::NONE, nullptr, pGlyphs );
nTmpIdx , nLen, SalLayoutFlags::NONE, pGlyphs );
if (bBullet)
{
rInf.GetOut().Push();
......
......@@ -924,7 +924,6 @@ float OutputDevice::approximate_digit_width() const
void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
const long* pDXAry,
sal_Int32 nIndex, sal_Int32 nLen, SalLayoutFlags flags,
vcl::TextLayoutCache const*const pLayoutCache,
const SalLayoutGlyphs* pSalLayoutCache )
{
assert(!is_double_buffered_window());
......@@ -945,7 +944,7 @@ void OutputDevice::DrawTextArray( const Point& rStartPt, const OUString& rStr,
if( mbOutputClipped )
return;
std::unique_ptr<SalLayout> pSalLayout = ImplLayout(rStr, nIndex, nLen, rStartPt, 0, pDXAry, flags, pLayoutCache, pSalLayoutCache);
std::unique_ptr<SalLayout> pSalLayout = ImplLayout(rStr, nIndex, nLen, rStartPt, 0, pDXAry, flags, nullptr, pSalLayoutCache);
if( pSalLayout )
{
ImplDrawText( *pSalLayout );
......
......@@ -1111,11 +1111,11 @@ vcl::Window* Window::GetWindow( GetWindowType nType ) const
return nullptr;
}
bool Window::IsChild( const vcl::Window* pWindow, bool bSystemWindow ) const
bool Window::IsChild( const vcl::Window* pWindow ) const
{
do
{
if ( !bSystemWindow && pWindow->ImplIsOverlapWindow() )
if ( pWindow->ImplIsOverlapWindow() )
break;
pWindow = pWindow->ImplGetParent();
......
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