From 80343351c9444bba7a5ac98f22fddbbecf5abb9f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 28 Aug 2018 13:43:50 +0200 Subject: loplugin:constantparam (2) Change-Id: I528f22876497f87159e3b9453362ebbfb55b7092 --- .../controller/dialogs/dlg_ObjectProperties.cxx | 26 +++++++++++----------- dbaccess/source/ui/dlg/dbadmin.cxx | 6 ++--- filter/source/xsltfilter/OleHandler.cxx | 2 +- include/oox/export/drawingml.hxx | 2 +- include/package/Deflater.hxx | 2 +- include/sfx2/tabdlg.hxx | 1 - oox/source/export/drawingml.cxx | 3 ++- oox/source/export/shapes.cxx | 2 +- package/source/zipapi/Deflater.cxx | 6 ++--- package/source/zipapi/ZipOutputEntry.cxx | 2 +- sc/source/filter/excel/xicontent.cxx | 12 +++++----- sc/source/filter/inc/formulabase.hxx | 3 +-- sc/source/filter/oox/formulabase.cxx | 18 +++++++-------- sc/source/ui/dataprovider/dataprovider.cxx | 5 ++--- sc/source/ui/docshell/docsh.cxx | 3 +-- sc/source/ui/inc/dataprovider.hxx | 2 +- sfx2/source/dialog/dinfdlg.cxx | 2 +- sfx2/source/dialog/tabdlg.cxx | 5 ++--- sw/source/uibase/app/docsh2.cxx | 2 +- 19 files changed, 48 insertions(+), 56 deletions(-) diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 26e2a6cc1164..6d509a41b66e 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -350,7 +350,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, AddTabPage(RID_SVXPAGE_TRANSPARENCE, SchResId(STR_PAGE_TRANSPARENCY)); AddTabPage(RID_SVXPAGE_CHAR_NAME, SchResId(STR_PAGE_FONT)); AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SchResId(STR_PAGE_FONT_EFFECTS)); - AddTabPage(TP_ALIGNMENT, SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::Create, nullptr); + AddTabPage(TP_ALIGNMENT, SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::Create); if( aCJKOptions.IsAsianTypographyEnabled() ) AddTabPage(RID_SVXPAGE_PARA_ASIAN, SchResId(STR_PAGE_ASIAN)); break; @@ -361,7 +361,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, AddTabPage(RID_SVXPAGE_TRANSPARENCE, SchResId(STR_PAGE_TRANSPARENCY)); AddTabPage(RID_SVXPAGE_CHAR_NAME, SchResId(STR_PAGE_FONT)); AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SchResId(STR_PAGE_FONT_EFFECTS)); - AddTabPage(TP_LEGEND_POS, SchResId(STR_PAGE_POSITION), SchLegendPosTabPage::Create, nullptr); + AddTabPage(TP_LEGEND_POS, SchResId(STR_PAGE_POSITION), SchLegendPosTabPage::Create); if( aCJKOptions.IsAsianTypographyEnabled() ) AddTabPage(RID_SVXPAGE_PARA_ASIAN, SchResId(STR_PAGE_ASIAN)); break; @@ -369,12 +369,12 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, case OBJECTTYPE_DATA_SERIES: case OBJECTTYPE_DATA_POINT: if( m_pParameter->ProvidesSecondaryYAxis() || m_pParameter->ProvidesOverlapAndGapWidth() || m_pParameter->ProvidesMissingValueTreatments() ) - AddTabPage(TP_OPTIONS, SchResId(STR_PAGE_OPTIONS),SchOptionTabPage::Create, nullptr); + AddTabPage(TP_OPTIONS, SchResId(STR_PAGE_OPTIONS),SchOptionTabPage::Create); if( m_pParameter->ProvidesStartingAngle()) - AddTabPage(TP_POLAROPTIONS, SchResId(STR_PAGE_OPTIONS),PolarOptionsTabPage::Create, nullptr); + AddTabPage(TP_POLAROPTIONS, SchResId(STR_PAGE_OPTIONS),PolarOptionsTabPage::Create); if( m_pParameter->HasGeometryProperties() ) - AddTabPage(TP_LAYOUT, SchResId(STR_PAGE_LAYOUT),SchLayoutTabPage::Create, nullptr); + AddTabPage(TP_LAYOUT, SchResId(STR_PAGE_LAYOUT),SchLayoutTabPage::Create); if(m_pParameter->HasAreaProperties()) { @@ -387,7 +387,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, case OBJECTTYPE_DATA_LABEL: case OBJECTTYPE_DATA_LABELS: AddTabPage(RID_SVXPAGE_LINE, SchResId(STR_PAGE_BORDER)); - AddTabPage(TP_DATA_DESCR, SchResId(STR_OBJECT_DATALABELS), DataLabelsTabPage::Create, nullptr); + AddTabPage(TP_DATA_DESCR, SchResId(STR_OBJECT_DATALABELS), DataLabelsTabPage::Create); AddTabPage(RID_SVXPAGE_CHAR_NAME, SchResId(STR_PAGE_FONT)); AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, SchResId(STR_PAGE_FONT_EFFECTS)); if( aCJKOptions.IsAsianTypographyEnabled() ) @@ -398,12 +398,12 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, case OBJECTTYPE_AXIS: { if( m_pParameter->HasScaleProperties() ) - AddTabPage(TP_SCALE, SchResId(STR_PAGE_SCALE), ScaleTabPage::Create, nullptr); + AddTabPage(TP_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(TP_AXIS_POSITIONS, SchResId(STR_PAGE_POSITIONING), AxisPositionsTabPage::Create, nullptr); + AddTabPage(TP_AXIS_POSITIONS, SchResId(STR_PAGE_POSITIONING), AxisPositionsTabPage::Create); AddTabPage(RID_SVXPAGE_LINE, SchResId(STR_PAGE_LINE)); - AddTabPage(TP_AXIS_LABEL, SchResId(STR_OBJECT_LABEL), SchAxisLabelTabPage::Create, nullptr); + AddTabPage(TP_AXIS_LABEL, SchResId(STR_OBJECT_LABEL), SchAxisLabelTabPage::Create); if( m_pParameter->HasNumberProperties() ) AddTabPage(RID_SVXPAGE_NUMBERFORMAT, SchResId(STR_PAGE_NUMBERS)); AddTabPage(RID_SVXPAGE_CHAR_NAME, SchResId(STR_PAGE_FONT)); @@ -414,12 +414,12 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, } case OBJECTTYPE_DATA_ERRORS_X: - AddTabPage(TP_XERRORBAR, SchResId(STR_PAGE_XERROR_BARS), ErrorBarsTabPage::Create, nullptr); + AddTabPage(TP_XERRORBAR, SchResId(STR_PAGE_XERROR_BARS), ErrorBarsTabPage::Create); AddTabPage(RID_SVXPAGE_LINE, SchResId(STR_PAGE_LINE)); break; case OBJECTTYPE_DATA_ERRORS_Y: - AddTabPage(TP_YERRORBAR, SchResId(STR_PAGE_YERROR_BARS), ErrorBarsTabPage::Create, nullptr); + AddTabPage(TP_YERRORBAR, SchResId(STR_PAGE_YERROR_BARS), ErrorBarsTabPage::Create); AddTabPage(RID_SVXPAGE_LINE, SchResId(STR_PAGE_LINE)); break; @@ -434,7 +434,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, break; case OBJECTTYPE_DATA_CURVE: - AddTabPage(TP_TRENDLINE, SchResId(STR_PAGE_TRENDLINE_TYPE), TrendlineTabPage::Create, nullptr); + AddTabPage(TP_TRENDLINE, SchResId(STR_PAGE_TRENDLINE_TYPE), TrendlineTabPage::Create); AddTabPage(RID_SVXPAGE_LINE, SchResId(STR_PAGE_LINE)); break; @@ -465,7 +465,7 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent, /* When rotation is supported for equation text boxes, use SchAlignmentTabPage::Create here. The special SchAlignmentTabPage::CreateWithoutRotation can be deleted. */ - AddTabPage(TP_ALIGNMENT, SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::CreateWithoutRotation, nullptr); + AddTabPage(TP_ALIGNMENT, SchResId(STR_PAGE_ALIGNMENT), SchAlignmentTabPage::CreateWithoutRotation); break; default: break; diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 5075f47c4a37..9e750469f186 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -98,7 +98,7 @@ void ODbAdminDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) void ODbAdminDialog::addDetailPage(sal_uInt16 _nPageId, const char* pTextId, CreateTabPage _pCreateFunc) { - AddTabPage(_nPageId, DBA_RES(pTextId), _pCreateFunc, nullptr); + AddTabPage(_nPageId, DBA_RES(pTextId), _pCreateFunc); m_aCurrentDetailPages.push(_nPageId); } @@ -158,7 +158,7 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName case ::dbaccess::DST_USERDEFINE10: { OUString aTitle(DBA_RES(STR_PAGETITLE_ADVANCED)); - AddTabPage(PAGE_USERDRIVER, aTitle, ODriversSettings::CreateUser, nullptr, 1); + AddTabPage(PAGE_USERDRIVER, aTitle, ODriversSettings::CreateUser, 1); m_aCurrentDetailPages.push(PAGE_USERDRIVER); } break; @@ -200,7 +200,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou ::dbaccess::ODsnTypeCollection* pCollection = rCollectionItem.getCollection(); if ( pCollection->determineType(getDatasourceType( *m_pExampleSet )) == ::dbaccess::DST_MYSQL_NATIVE ) { - AddTabPage( PAGE_MYSQL_NATIVE, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE, nullptr ); + AddTabPage( PAGE_MYSQL_NATIVE, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE ); RemoveTabPage("advanced"); m_nMainPageID = PAGE_MYSQL_NATIVE; } diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx index 29d6962bef03..0df04004a94d 100644 --- a/filter/source/xsltfilter/OleHandler.cxx +++ b/filter/source/xsltfilter/OleHandler.cxx @@ -205,7 +205,7 @@ namespace XSLT std::unique_ptr< ::ZipUtils::Deflater> compresser(new ::ZipUtils::Deflater(sal_Int32(3), false)); compresser->setInputSegment(oledata); compresser->finish(); - int compressedDataLength = compresser->doDeflateSegment(output, 0, oledata.getLength()); + int compressedDataLength = compresser->doDeflateSegment(output, oledata.getLength()); compresser.reset(); //realloc the data length Sequence compressed(compressedDataLength); diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index f9f8670c051d..449e77da78e1 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -234,7 +234,7 @@ public: void WritePresetShape( const char* pShape , std::vector< std::pair> & rAvList ); void WritePresetShape( const char* pShape ); - void WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, const css::beans::PropertyValue& rProp ); + void WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, const css::beans::PropertyValue& rProp ); bool WriteCustomGeometry( const css::uno::Reference& rXShape, const SdrObjCustomShape& rSdrObjCustomShape); diff --git a/include/package/Deflater.hxx b/include/package/Deflater.hxx index 2ecb7636ff19..1fbff8cec8f8 100644 --- a/include/package/Deflater.hxx +++ b/include/package/Deflater.hxx @@ -48,7 +48,7 @@ public: bool needsInput( ); void finish( ); bool finished( ) { return bFinished;} - sal_Int32 doDeflateSegment( css::uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ); + sal_Int32 doDeflateSegment( css::uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewLength ); sal_Int64 getTotalIn( ); sal_Int64 getTotalOut( ); void reset( ); diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 527151810619..64a8ebc5d6ae 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -153,7 +153,6 @@ public: void AddTabPage( sal_uInt16 nId, const OUString &rRiderText, CreateTabPage pCreateFunc, // != 0 - GetTabPageRanges pRangesFunc, // can be 0 sal_uInt16 nPos = TAB_APPEND); void AddTabPage( sal_uInt16 nId, diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index b42bdb67caad..2b74cb83ce85 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2568,7 +2568,7 @@ std::map< OString, std::vector > lcl_getAdjNames() return aRet; } -void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, const PropertyValue& rProp ) +void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool bPredefinedHandlesUsed, const PropertyValue& rProp ) { static std::map< OString, std::vector > aAdjMap = lcl_getAdjNames(); // If there are predefined adj names for this shape type, look them up now. @@ -2589,6 +2589,7 @@ void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool b ) { SAL_INFO("oox.shape", "adj seq len: " << aAdjustmentSeq.getLength()); + sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0; if ( bPredefinedHandlesUsed ) EscherPropertyContainer::LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted ); diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 37f5d38aa3fe..33266663d794 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -1002,7 +1002,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape ) if( nAdjustmentValuesIndex != -1 ) { WritePresetShape( sPresetShape, eShapeType, bPredefinedHandlesUsed, - 0/*nAdjustmentsWhichNeedsToBeConverted*/, aGeometrySeq[ nAdjustmentValuesIndex ] ); + aGeometrySeq[ nAdjustmentValuesIndex ] ); } else WritePresetShape( sPresetShape ); diff --git a/package/source/zipapi/Deflater.cxx b/package/source/zipapi/Deflater.cxx index d50317357ef1..9d9bbe30bb70 100644 --- a/package/source/zipapi/Deflater.cxx +++ b/package/source/zipapi/Deflater.cxx @@ -108,10 +108,10 @@ void Deflater::finish( ) { bFinish = true; } -sal_Int32 Deflater::doDeflateSegment( uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) +sal_Int32 Deflater::doDeflateSegment( uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewLength ) { - OSL_ASSERT( !(nNewOffset < 0 || nNewLength < 0 || nNewOffset + nNewLength > rBuffer.getLength())); - return doDeflateBytes(rBuffer, nNewOffset, nNewLength); + OSL_ASSERT( !(nNewLength < 0 || nNewLength > rBuffer.getLength())); + return doDeflateBytes(rBuffer, /*nNewOffset*/0, nNewLength); } sal_Int64 Deflater::getTotalIn( ) { diff --git a/package/source/zipapi/ZipOutputEntry.cxx b/package/source/zipapi/ZipOutputEntry.cxx index 2b6410700971..5aa16a0738a5 100644 --- a/package/source/zipapi/ZipOutputEntry.cxx +++ b/package/source/zipapi/ZipOutputEntry.cxx @@ -192,7 +192,7 @@ void ZipOutputEntry::write( const Sequence< sal_Int8 >& rBuffer ) void ZipOutputEntry::doDeflate() { - sal_Int32 nLength = m_aDeflater.doDeflateSegment(m_aDeflateBuffer, 0, m_aDeflateBuffer.getLength()); + sal_Int32 nLength = m_aDeflater.doDeflateSegment(m_aDeflateBuffer, m_aDeflateBuffer.getLength()); if ( nLength > 0 ) { diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index ab31d5d4307d..e75c945662d8 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -129,14 +129,12 @@ void lclAppendString32( OUString& rString, XclImpStream& rStrm, bool b16Bit ) lclAppendString32( rString, rStrm, rStrm.ReaduInt32(), b16Bit ); } -/** Reads 32-bit string length and ignores following character array. - @param b16Bit true = 16-bit characters, false = 8-bit characters. */ -void lclIgnoreString32( XclImpStream& rStrm, bool b16Bit ) +/** Reads 32-bit string length and ignores following 16-bit character array. */ +void lclIgnoreString32( XclImpStream& rStrm ) { sal_uInt32 nChars(0); nChars = rStrm.ReaduInt32(); - if( b16Bit ) - nChars *= 2; + nChars *= 2; rStrm.Ignore( nChars ); } @@ -262,10 +260,10 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& rStrm ) // description (ignore) if( ::get_flag( nFlags, EXC_HLINK_DESCR ) ) - lclIgnoreString32( rStrm, true ); + lclIgnoreString32( rStrm ); // target frame (ignore) !! DESCR/FRAME - is this the right order? (never seen them together) if( ::get_flag( nFlags, EXC_HLINK_FRAME ) ) - lclIgnoreString32( rStrm, true ); + lclIgnoreString32( rStrm ); // URL fields are zero-terminated - do not let the stream replace them // in the lclAppendString32() with the '?' character. diff --git a/sc/source/filter/inc/formulabase.hxx b/sc/source/filter/inc/formulabase.hxx index 3f359c07e1bf..74e3d8508502 100644 --- a/sc/source/filter/inc/formulabase.hxx +++ b/sc/source/filter/inc/formulabase.hxx @@ -297,7 +297,7 @@ private: class ApiTokenIterator { public: - explicit ApiTokenIterator( const ApiTokenSequence& rTokens, sal_Int32 nSpacesOpCode, bool bSkipSpaces ); + explicit ApiTokenIterator( const ApiTokenSequence& rTokens, sal_Int32 nSpacesOpCode ); bool is() const { return mpToken != mpTokenEnd; } const ApiToken* operator->() const { return mpToken; } @@ -310,7 +310,6 @@ private: const ApiToken* mpToken; /// Pointer to current token of the token sequence. const ApiToken* mpTokenEnd; /// Pointer behind last token of the token sequence. const sal_Int32 mnSpacesOpCode; /// Op-code for whitespace tokens. - const bool mbSkipSpaces; /// true = Skip whitespace tokens. }; // List of API op-codes ======================================================= diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 476f0deba2cd..edc5615934ce 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -139,11 +139,10 @@ ApiTokenSequence ApiTokenVector::toSequence() const // token sequence iterator ==================================================== -ApiTokenIterator::ApiTokenIterator( const ApiTokenSequence& rTokens, sal_Int32 nSpacesOpCode, bool bSkipSpaces ) : +ApiTokenIterator::ApiTokenIterator( const ApiTokenSequence& rTokens, sal_Int32 nSpacesOpCode ) : mpToken( rTokens.getConstArray() ), mpTokenEnd( rTokens.getConstArray() + rTokens.getLength() ), - mnSpacesOpCode( nSpacesOpCode ), - mbSkipSpaces( bSkipSpaces ) + mnSpacesOpCode( nSpacesOpCode ) { skipSpaces(); } @@ -160,9 +159,8 @@ ApiTokenIterator& ApiTokenIterator::operator++() void ApiTokenIterator::skipSpaces() { - if( mbSkipSpaces ) - while( is() && (mpToken->OpCode == mnSpacesOpCode) ) - ++mpToken; + while( is() && (mpToken->OpCode == mnSpacesOpCode) ) + ++mpToken; } // function data ============================================================== @@ -1593,7 +1591,7 @@ OUString FormulaProcessorBase::generateApiArray( const Matrix< Any >& rMatrix ) Any FormulaProcessorBase::extractReference( const ApiTokenSequence& rTokens ) const { - ApiTokenIterator aTokenIt( rTokens, OPCODE_SPACES, true ); + ApiTokenIterator aTokenIt( rTokens, OPCODE_SPACES ); if( aTokenIt.is() && (aTokenIt->OpCode == OPCODE_PUSH) ) { Any aRefAny = aTokenIt->Data; @@ -1622,7 +1620,7 @@ void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges, orRanges.RemoveAll(); TokenToRangeListState eState = STATE_OPEN; sal_Int32 nParenLevel = 0; - for( ApiTokenIterator aIt( rTokens, OPCODE_SPACES, true ); aIt.is() && (eState != STATE_ERROR); ++aIt ) + for( ApiTokenIterator aIt( rTokens, OPCODE_SPACES ); aIt.is() && (eState != STATE_ERROR); ++aIt ) { sal_Int32 nOpCode = aIt->OpCode; switch( eState ) @@ -1668,13 +1666,13 @@ void FormulaProcessorBase::extractCellRangeList( ScRangeList& orRanges, bool FormulaProcessorBase::extractString( OUString& orString, const ApiTokenSequence& rTokens ) const { - ApiTokenIterator aTokenIt( rTokens, OPCODE_SPACES, true ); + ApiTokenIterator aTokenIt( rTokens, OPCODE_SPACES ); return aTokenIt.is() && (aTokenIt->OpCode == OPCODE_PUSH) && (aTokenIt->Data >>= orString) && !(++aTokenIt).is(); } bool FormulaProcessorBase::extractSpecialTokenInfo( ApiSpecialTokenInfo& orTokenInfo, const ApiTokenSequence& rTokens ) const { - ApiTokenIterator aTokenIt( rTokens, OPCODE_SPACES, true ); + ApiTokenIterator aTokenIt( rTokens, OPCODE_SPACES ); return aTokenIt.is() && (aTokenIt->OpCode == OPCODE_BAD) && (aTokenIt->Data >>= orTokenInfo); } diff --git a/sc/source/ui/dataprovider/dataprovider.cxx b/sc/source/ui/dataprovider/dataprovider.cxx index ade7eeb95f95..353d19d42b76 100644 --- a/sc/source/ui/dataprovider/dataprovider.cxx +++ b/sc/source/ui/dataprovider/dataprovider.cxx @@ -125,7 +125,7 @@ void ExternalDataSource::setDBData(const OUString& rDBName) { if (!mpDBDataManager) { - mpDBDataManager.reset(new ScDBDataManager(rDBName, false, mpDoc)); + mpDBDataManager.reset(new ScDBDataManager(rDBName, mpDoc)); } else { @@ -246,9 +246,8 @@ void ScDBDataManager::WriteToDoc(ScDocument& rDoc) pDocShell->PostPaint(aDestRange, PaintPartFlags::All); } -ScDBDataManager::ScDBDataManager(const OUString& rDBName, bool /*bAllowResize*/, ScDocument* pDoc): +ScDBDataManager::ScDBDataManager(const OUString& rDBName, ScDocument* pDoc): maDBName(rDBName), - //mbAllowResize(bAllowResize), mpDoc(pDoc) { } diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 076d52c20afa..63c3f3ac745d 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -3064,8 +3064,7 @@ VclPtr ScDocShell::CreateDocumentInfoDialog( const SfxIte pDlg->AddFontTabPage(); pDlg->AddTabPage( 42, ScResId( STR_DOC_STAT ), - ScDocStatPageCreate, - nullptr); + ScDocStatPageCreate); } return pDlg; } diff --git a/sc/source/ui/inc/dataprovider.hxx b/sc/source/ui/inc/dataprovider.hxx index 61d1e112f14f..9f1d0a179e51 100644 --- a/sc/source/ui/inc/dataprovider.hxx +++ b/sc/source/ui/inc/dataprovider.hxx @@ -135,7 +135,7 @@ class ScDBDataManager ScDocument* mpDoc; public: - ScDBDataManager(const OUString& rDBName, bool bAllowResize, ScDocument* pDoc); + ScDBDataManager(const OUString& rDBName, ScDocument* pDoc); ~ScDBDataManager(); void SetDatabase(const OUString& rDBName); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 96cf828f4042..ea9cf40d5d9c 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1210,7 +1210,7 @@ void SfxDocumentInfoDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) void SfxDocumentInfoDialog::AddFontTabPage() { - AddTabPage( FONT_PAGE_ID, SfxResId( STR_FONT_TABPAGE ), SfxDocumentFontsPage::Create, nullptr); + AddTabPage( FONT_PAGE_ID, SfxResId( STR_FONT_TABPAGE ), SfxDocumentFontsPage::Create); } // class CustomPropertiesYesNoButton ------------------------------------- diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index fcd58a9cdc44..87b414b6fed2 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -634,7 +634,7 @@ void SfxTabDialog::Start_Impl() void SfxTabDialog::AddTabPage( sal_uInt16 nId, const OUString &rRiderText ) { - AddTabPage( nId, rRiderText, nullptr, nullptr ); + AddTabPage( nId, rRiderText, nullptr ); } /* @@ -686,14 +686,13 @@ void SfxTabDialog::AddTabPage sal_uInt16 nId, const OUString& rRiderText, CreateTabPage pCreateFunc, - GetTabPageRanges pRangesFunc, sal_uInt16 nPos ) { DBG_ASSERT( TAB_PAGE_NOTFOUND == m_pTabCtrl->GetPagePos( nId ), "Double Page-Ids in the Tabpage" ); m_pTabCtrl->InsertPage( nId, rRiderText, nPos ); - m_pImpl->aData.push_back( new Data_Impl(nId, "", pCreateFunc, pRangesFunc ) ); + m_pImpl->aData.push_back( new Data_Impl(nId, "", pCreateFunc, nullptr ) ); } void SfxTabDialog::RemoveTabPage( sal_uInt16 nId ) diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 2fb423f0ded4..957803246b80 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -160,7 +160,7 @@ VclPtr SwDocShell::CreateDocumentInfoDialog(const SfxItem { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); pDlg->AddFontTabPage(); - pDlg->AddTabPage(RID_SW_TP_DOC_STAT, SwResId(STR_DOC_STAT), pFact->GetTabPageCreatorFunc(RID_SW_TP_DOC_STAT), nullptr); + pDlg->AddTabPage(RID_SW_TP_DOC_STAT, SwResId(STR_DOC_STAT), pFact->GetTabPageCreatorFunc(RID_SW_TP_DOC_STAT)); } } return pDlg; -- cgit