diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-04 11:35:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-04 11:48:05 +0200 |
commit | 03614918c028e82df353308837864c6fc7ff992c (patch) | |
tree | 631bc863274856e739e9d15c05f302e87383e751 /sc | |
parent | fb6c99f21e03afb85d00459ca1e1abb07e71d126 (diff) |
loplugin:unuseddefaultparam in sc
Change-Id: Id461fc600bec5fe372875c2dcf405997fcf9f0b4
Diffstat (limited to 'sc')
40 files changed, 101 insertions, 158 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index a7d79ac15652..0e545be5578f 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -323,7 +323,7 @@ public: inline size_t hash() const; /// "A1" or "$A$1" or R1C1 or R[1]C[1] - OUString GetColRowString( bool bAbsolute = false ) const; + OUString GetColRowString() const; }; inline void ScAddress::PutInOrder( ScAddress& rAddress ) diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index edef1809a867..d7a6aadd4f28 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -234,7 +234,7 @@ public: bool HasSelectionMatrixFragment(const ScMarkData& rMark) const; bool GetFirstVisibleAttr( SCROW& rFirstRow ) const; - bool GetLastVisibleAttr( SCROW& rLastRow, bool bFullFormattedArea = false ) const; + bool GetLastVisibleAttr( SCROW& rLastRow ) const; bool HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const; bool IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow = 0, SCROW nEndRow = MAXROW ) const; @@ -346,7 +346,7 @@ public: svl::SharedString GetSharedString( SCROW nRow ) const; void SetRawString( SCROW nRow, const OUString& rStr ); - void SetRawString( SCROW nRow, const svl::SharedString& rStr, bool bBroadcast = true ); + void SetRawString( SCROW nRow, const svl::SharedString& rStr ); void SetRawString( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const svl::SharedString& rStr, bool bBroadcast = true ); void SetValue( SCROW nRow, double fVal ); void SetValues( SCROW nRow, const std::vector<double>& rVals ); @@ -517,8 +517,7 @@ public: bool GetNextSpellingCell(SCROW& nRow, bool bInSel, const ScMarkData& rData) const; void StartListeningFormulaCells( - sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt, SCROW nRow1, SCROW nRow2, - SCROW* pStartRow = nullptr ); + sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt, SCROW nRow1, SCROW nRow2 ); void EndListeningFormulaCells( sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx index 3775f9ddf2d4..856d938f7d8a 100644 --- a/sc/inc/dociter.hxx +++ b/sc/inc/dociter.hxx @@ -351,12 +351,6 @@ public: row position of the found entry are returned, otherwise invalid. - @param bSearchForEqualAfterMismatch - Continue searching for an equal entry even if the - last entry matching the range was found, in case - the data is not sorted. Is always done if regular - expressions are involved. - The search does not stop when encountering a string and does not assume that no values follow anymore. If querying for a string a mismatch on the first @@ -368,8 +362,7 @@ public: iterator is not usable anymore except for obtaining the number format! */ - bool FindEqualOrSortedLastInRange( SCCOL& nFoundCol, - SCROW& nFoundRow, bool bSearchForEqualAfterMismatch = false ); + bool FindEqualOrSortedLastInRange( SCCOL& nFoundCol, SCROW& nFoundRow ); }; class ScDocAttrIterator // all attribute areas diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 30a8d9fc744b..541a0cc2e0f9 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1199,8 +1199,7 @@ public: SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr, const ScMarkData* pTabMark = nullptr ); - SC_DLLPUBLIC void DeleteRow( const ScRange& rRange, - ScDocument* pRefUndoDoc = nullptr ); + SC_DLLPUBLIC void DeleteRow( const ScRange& rRange ); bool InsertCol( SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr, @@ -1211,8 +1210,7 @@ public: SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr, const ScMarkData* pTabMark = nullptr ); - void DeleteCol( const ScRange& rRange, - ScDocument* pRefUndoDoc = nullptr ); + void DeleteCol( const ScRange& rRange ); bool CanInsertRow( const ScRange& rRange ) const; bool CanInsertCol( const ScRange& rRange ) const; @@ -1615,7 +1613,7 @@ public: bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const; bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const; - bool ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr) const; + bool ColFiltered(SCCOL nCol, SCTAB nTab) const; SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered); SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const; SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const; diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx index f759c64d5724..959dbc4eb379 100644 --- a/sc/inc/dpoutput.hxx +++ b/sc/inc/dpoutput.hxx @@ -109,7 +109,7 @@ public: void Output(); //! Refresh? ScRange GetOutputRange( sal_Int32 nRegionType = css::sheet::DataPilotOutputRangeType::WHOLE ); - ScRange GetOutputRange( sal_Int32 nRegionType = css::sheet::DataPilotOutputRangeType::WHOLE ) const; + ScRange GetOutputRange() const; long GetHeaderRows(); bool HasError(); // range overflow or exception from source diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx index a34caebfda6e..340d579247a0 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -134,8 +134,8 @@ public: /// Creates a copy of SfxItemSet if bRememberCopy set void SetDefaults( const SfxItemSet& rDefaults, bool bRememberCopy = true ); - /// Becomes the owner of the SfxItemSet if bTakeOwnership set - void SetDefaults( SfxItemSet* pDefaults, bool bTakeOwnership = true ); + /// Becomes the owner of the SfxItemSet + void SetDefaults( SfxItemSet* pDefaults ); /// Set the item in the default ItemSet which is created /// if it doesn't exist yet. diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx index 9f215f633621..4f93743eb0b6 100644 --- a/sc/inc/filter.hxx +++ b/sc/inc/filter.hxx @@ -104,8 +104,7 @@ class SAL_DLLPUBLIC_RTTI ScFormatFilterPlugin { // various export filters virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, rtl_TextEncoding eDest ) = 0; virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest ) = 0; - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, - sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0; + virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) = 0; virtual void ScExportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, bool bAll, const OUString& rStreamPath, OUString& rNonConvertibleChars, const OUString& rFilterOptions ) = 0; virtual void ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) = 0; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 496378e92b93..95d3225c985e 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -449,7 +449,7 @@ public: void UndoToTable( sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab, const ScMarkData* pMarkData = nullptr ); + InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab ); void CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCsCOL nDx, SCsROW nDy, ScTable* pTable); @@ -711,7 +711,7 @@ public: void SetManualHeight( SCROW nStartRow, SCROW nEndRow, bool bManual ); sal_uInt16 GetColWidth( SCCOL nCol, bool bHiddenAsZero = true ) const; - sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol, bool bHiddenAsZero = true ) const; + sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol ) const; SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow = nullptr, SCROW* pEndRow = nullptr, bool bHiddenAsZero = true ) const; sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true ) const; sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale ) const; diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 2823d6332c69..e9c3833ffe12 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -2898,14 +2898,14 @@ bool ScColumn::GetFirstVisibleAttr( SCROW& rFirstRow ) const return false; } -bool ScColumn::GetLastVisibleAttr( SCROW& rLastRow, bool bFullFormattedArea ) const +bool ScColumn::GetLastVisibleAttr( SCROW& rLastRow ) const { if (pAttrArray) { // row of last cell is needed SCROW nLastData = GetLastDataPos(); // always including notes, 0 if none - return pAttrArray->GetLastVisibleAttr( rLastRow, nLastData, bFullFormattedArea ); + return pAttrArray->GetLastVisibleAttr( rLastRow, nLastData ); } else return false; diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index f37ae4e54009..b350e4211aa4 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -2393,7 +2393,7 @@ void ScColumn::SetRawString( SCROW nRow, const OUString& rStr ) SetRawString(nRow, aSS); } -void ScColumn::SetRawString( SCROW nRow, const svl::SharedString& rStr, bool bBroadcast ) +void ScColumn::SetRawString( SCROW nRow, const svl::SharedString& rStr ) { if (!ValidRow(nRow)) return; @@ -2404,8 +2404,7 @@ void ScColumn::SetRawString( SCROW nRow, const svl::SharedString& rStr, bool bBr CellStorageModified(); - if (bBroadcast) - BroadcastNewCell(nRow); + BroadcastNewCell(nRow); } void ScColumn::SetRawString( diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 4cb643f93b37..f426d8d0fb68 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -1255,10 +1255,6 @@ public: } } - SCROW getStartRow() const - { - return mnStartRow; - } }; class EndListeningFormulaCellsHandler @@ -1346,15 +1342,10 @@ public: void ScColumn::StartListeningFormulaCells( sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt, - SCROW nRow1, SCROW nRow2, SCROW* pStartRow ) + SCROW nRow1, SCROW nRow2 ) { StartListeningFormulaCellsHandler aFunc(rStartCxt, rEndCxt); sc::ProcessBlock(maCells.begin(), maCells, aFunc, nRow1, nRow2); - - if (pStartRow) - // start row position may be smaller than nRow1 in case the formula - // group starts before nRow1 position. - *pStartRow = aFunc.getStartRow(); } void ScColumn::EndListeningFormulaCells( diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 760d9b4a0ea3..f9387c7e449d 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -1277,7 +1277,7 @@ void ScQueryCellIterator::AdvanceQueryParamEntryField() } bool ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol, - SCROW& nFoundRow, bool bSearchForEqualAfterMismatch ) + SCROW& nFoundRow ) { // Set and automatically reset mpParam->mbRangeLookup when returning. We // could use comphelper::FlagRestorationGuard, but really, that one is @@ -1412,7 +1412,7 @@ bool ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol, maCurPos = aPosSave; return true; } - if ( (bSearchForEqualAfterMismatch || mpParam->eSearchType != utl::SearchParam::SRCH_NORMAL) && + if ( (mpParam->eSearchType != utl::SearchParam::SRCH_NORMAL) && StoppedOnMismatch() ) { // Assume found entry to be the last value less than respectively diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 731c8c1df11c..73eb510db9e0 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1407,12 +1407,11 @@ void ScDocument::DeleteRow( SCCOL nStartCol, SCTAB nStartTab, pChartListenerCollection->UpdateDirtyCharts(); } -void ScDocument::DeleteRow( const ScRange& rRange, ScDocument* pRefUndoDoc ) +void ScDocument::DeleteRow( const ScRange& rRange ) { DeleteRow( rRange.aStart.Col(), rRange.aStart.Tab(), rRange.aEnd.Col(), rRange.aEnd.Tab(), - rRange.aStart.Row(), static_cast<SCSIZE>(rRange.aEnd.Row()-rRange.aStart.Row()+1), - pRefUndoDoc ); + rRange.aStart.Row(), static_cast<SCSIZE>(rRange.aEnd.Row()-rRange.aStart.Row()+1) ); } bool ScDocument::CanInsertCol( const ScRange& rRange ) const @@ -1599,12 +1598,11 @@ void ScDocument::DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTA pChartListenerCollection->UpdateDirtyCharts(); } -void ScDocument::DeleteCol( const ScRange& rRange, ScDocument* pRefUndoDoc ) +void ScDocument::DeleteCol( const ScRange& rRange ) { DeleteCol( rRange.aStart.Row(), rRange.aStart.Tab(), rRange.aEnd.Row(), rRange.aEnd.Tab(), - rRange.aStart.Col(), static_cast<SCSIZE>(rRange.aEnd.Col()-rRange.aStart.Col()+1), - pRefUndoDoc ); + rRange.aStart.Col(), static_cast<SCSIZE>(rRange.aEnd.Col()-rRange.aStart.Col()+1) ); } // for Area-Links: Insert/delete cells, when the range is changed. @@ -4389,12 +4387,12 @@ bool ScDocument::HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) con return maTabs[nTab]->HasFilteredRows(nStartRow, nEndRow); } -bool ScDocument::ColFiltered(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol) const +bool ScDocument::ColFiltered(SCCOL nCol, SCTAB nTab) const { if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size()) || !maTabs[nTab]) return false; - return maTabs[nTab]->ColFiltered(nCol, pFirstCol); + return maTabs[nTab]->ColFiltered(nCol); } void ScDocument::SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered) diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 425e93859287..c75f570ea661 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -1174,7 +1174,7 @@ ScRange ScDPOutput::GetOutputRange( sal_Int32 nRegionType ) return ScRange(aStartPos.Col(), aStartPos.Row(), nTab, nTabEndCol, nTabEndRow, nTab); } -ScRange ScDPOutput::GetOutputRange( sal_Int32 nRegionType ) const +ScRange ScDPOutput::GetOutputRange() const { using namespace ::com::sun::star::sheet; @@ -1182,16 +1182,6 @@ ScRange ScDPOutput::GetOutputRange( sal_Int32 nRegionType ) const return ScRange(ScAddress::INITIALIZE_INVALID); SCTAB nTab = aStartPos.Tab(); - switch (nRegionType) - { - case DataPilotOutputRangeType::RESULT: - return ScRange(nDataStartCol, nDataStartRow, nTab, nTabEndCol, nTabEndRow, nTab); - case DataPilotOutputRangeType::TABLE: - return ScRange(aStartPos.Col(), nTabStartRow, nTab, nTabEndCol, nTabEndRow, nTab); - default: - OSL_ENSURE(nRegionType == DataPilotOutputRangeType::WHOLE, "ScDPOutput::GetOutputRange: unknown region type"); - break; - } return ScRange(aStartPos.Col(), aStartPos.Row(), nTab, nTabEndCol, nTabEndRow, nTab); } diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index aabf837edece..419821b89b4d 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1194,7 +1194,7 @@ void ScTable::CopyToTable( void ScTable::UndoToTable( sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, - InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab, const ScMarkData* pMarkData ) + InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab ) { if (ValidColRow(nCol1, nRow1) && ValidColRow(nCol2, nRow2)) { @@ -1204,7 +1204,7 @@ void ScTable::UndoToTable( for ( SCCOL i = 0; i <= MAXCOL; i++) { if ( i >= nCol1 && i <= nCol2 ) - aCol[i].UndoToColumn(rCxt, nRow1, nRow2, nFlags, bMarked, pDestTab->aCol[i], pMarkData); + aCol[i].UndoToColumn(rCxt, nRow1, nRow2, nFlags, bMarked, pDestTab->aCol[i]); else aCol[i].CopyToColumn(rCxt, 0, MAXROW, InsertDeleteFlags::FORMULA, false, pDestTab->aCol[i]); } @@ -2834,7 +2834,7 @@ sal_uInt16 ScTable::GetColWidth( SCCOL nCol, bool bHiddenAsZero ) const return (sal_uInt16) STD_COL_WIDTH; } -sal_uLong ScTable::GetColWidth( SCCOL nStartCol, SCCOL nEndCol, bool bHiddenAsZero ) const +sal_uLong ScTable::GetColWidth( SCCOL nStartCol, SCCOL nEndCol ) const { if (!ValidCol(nStartCol) || !ValidCol(nEndCol) || nStartCol > nEndCol) return 0; @@ -2844,7 +2844,7 @@ sal_uLong ScTable::GetColWidth( SCCOL nStartCol, SCCOL nEndCol, bool bHiddenAsZe SCCOL nLastHiddenCol = -1; for (SCCOL nCol = nStartCol; nCol <= nEndCol; ++nCol) { - if (bHiddenAsZero && nCol > nLastHiddenCol) + if (nCol > nLastHiddenCol) bHidden = ColHidden(nCol, nullptr, &nLastHiddenCol); if (bHidden) diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 6d5ceaa1332b..b7d9a71fb08c 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -325,8 +325,7 @@ void PopDoubleRef( ScRange & rRange, short & rParam, size_t & rRefInList ); void PopDoubleRef( ScRange&, bool bDontCheckForTableOp = false ); void DoubleRefToVars( const formula::FormulaToken* p, SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, - SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, - bool bDontCheckForTableOp = false ); + SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2 ); ScDBRangeBase* PopDBDoubleRef(); void PopDoubleRef(SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2 ); diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index d4a69c776eff..5542be679e7f 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -2235,7 +2235,7 @@ void ScRange::IncEndRowSticky( SCsROW nDelta ) aEnd.IncRow( nDelta); // was greater than MAXROW, caller should know.. } -OUString ScAddress::GetColRowString( bool bAbsolute ) const +OUString ScAddress::GetColRowString() const { OUStringBuffer aString; @@ -2245,20 +2245,13 @@ OUString ScAddress::GetColRowString( bool bAbsolute ) const case formula::FormulaGrammar::CONV_OOO: case formula::FormulaGrammar::CONV_XL_A1: case formula::FormulaGrammar::CONV_XL_OOX: - if (bAbsolute) - aString.append("$"); - lcl_ScColToAlpha( aString, nCol); - - if ( bAbsolute ) - aString.append("$"); - aString.append(OUString::number(nRow+1)); break; case formula::FormulaGrammar::CONV_XL_R1C1: - lcl_r1c1_append_r ( aString, nRow, bAbsolute, detailsOOOa1 ); - lcl_r1c1_append_c ( aString, nCol, bAbsolute, detailsOOOa1 ); + lcl_r1c1_append_r ( aString, nRow, false/*bAbsolute*/, detailsOOOa1 ); + lcl_r1c1_append_c ( aString, nCol, false/*bAbsolute*/, detailsOOOa1 ); break; } diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index 9da65b285813..82dd082da091 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -507,12 +507,12 @@ void ScEditEngineDefaulter::SetDefaults( const SfxItemSet& rSet, bool bRememberC EnableUndo( true ); } -void ScEditEngineDefaulter::SetDefaults( SfxItemSet* pSet, bool bTakeOwnership ) +void ScEditEngineDefaulter::SetDefaults( SfxItemSet* pSet ) { if ( bDeleteDefaults ) delete pDefaults; pDefaults = pSet; - bDeleteDefaults = bTakeOwnership; + bDeleteDefaults = true; if ( pDefaults ) SetDefaults( *pDefaults, false ); } diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index f316862d1993..107158eb8757 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -969,13 +969,12 @@ void ScInterpreter::PopSingleRef( ScAddress& rAdr ) void ScInterpreter::DoubleRefToVars( const formula::FormulaToken* p, SCCOL& rCol1, SCROW &rRow1, SCTAB& rTab1, - SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2, - bool bDontCheckForTableOp ) + SCCOL& rCol2, SCROW &rRow2, SCTAB& rTab2 ) { const ScComplexRefData& rCRef = *p->GetDoubleRef(); SingleRefToVars( rCRef.Ref1, rCol1, rRow1, rTab1); SingleRefToVars( rCRef.Ref2, rCol2, rRow2, rTab2); - if (!pDok->m_TableOpList.empty() && !bDontCheckForTableOp) + if (!pDok->m_TableOpList.empty()) { ScRange aRange( rCol1, rRow1, rTab1, rCol2, rRow2, rTab2 ); if ( IsTableOpInRange( aRange ) ) diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx index e1a197ab09fc..9a8016d01d72 100644 --- a/sc/source/filter/dif/difexp.cxx +++ b/sc/source/filter/dif/difexp.cxx @@ -47,8 +47,9 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* pDoc, } FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, - const ScRange&rRange, const rtl_TextEncoding eCharSet, sal_uInt32 nDifOption ) + const ScRange&rRange, const rtl_TextEncoding eCharSet ) { + sal_uInt32 nDifOption = SC_DIFOPT_EXCEL; OSL_ENSURE( rRange.aStart <= rRange.aEnd, "*ScExportDif(): Range not sorted!" ); OSL_ENSURE( rRange.aStart.Tab() == rRange.aEnd.Tab(), "ScExportDif(): only one table please!" ); diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 11a4bf3e9d4c..d372e8a1d036 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -421,7 +421,7 @@ private: void AppendNameToken( sal_uInt16 nNameIdx, sal_uInt8 nSpaces = 0 ); void AppendMissingNameToken( const OUString& rName, sal_uInt8 nSpaces = 0 ); void AppendNameXToken( sal_uInt16 nExtSheet, sal_uInt16 nExtName, sal_uInt8 nSpaces = 0 ); - void AppendMacroCallToken( const XclExpExtFuncData& rExtFuncData, sal_uInt8 nSpaces = 0 ); + void AppendMacroCallToken( const XclExpExtFuncData& rExtFuncData ); void AppendAddInCallToken( const XclExpExtFuncData& rExtFuncData ); void AppendEuroToolCallToken( const XclExpExtFuncData& rExtFuncData ); @@ -2352,10 +2352,10 @@ void XclExpFmlaCompImpl::AppendNameXToken( sal_uInt16 nExtSheet, sal_uInt16 nExt Append( 0, (meBiff <= EXC_BIFF5) ? 12 : 2 ); } -void XclExpFmlaCompImpl::AppendMacroCallToken( const XclExpExtFuncData& rExtFuncData, sal_uInt8 nSpaces ) +void XclExpFmlaCompImpl::AppendMacroCallToken( const XclExpExtFuncData& rExtFuncData ) { sal_uInt16 nNameIdx = GetNameManager().InsertMacroCall( rExtFuncData.maFuncName, rExtFuncData.mbVBasic, true, rExtFuncData.mbHidden ); - AppendNameToken( nNameIdx, nSpaces ); + AppendNameToken( nNameIdx ); } void XclExpFmlaCompImpl::AppendAddInCallToken( const XclExpExtFuncData& rExtFuncData ) diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 7b7f23dbf601..ae9857b784ee 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -325,10 +325,10 @@ void XclExpStream::WriteUnicodeBuffer( const ScfUInt16Vec& rBuffer, sal_uInt8 nF // Xcl has an obscure sense of whether starting a new record or not, // and crashes if it encounters the string header at the very end of a record. // Thus we add 1 to give some room, seems like they do it that way but with another count (10?) -void XclExpStream::WriteByteString( const OString& rString, sal_uInt16 nMaxLen ) +void XclExpStream::WriteByteString( const OString& rString ) { SetSliceSize( 0 ); - sal_Size nLen = ::std::min< sal_Size >( rString.getLength(), nMaxLen ); + sal_Size nLen = ::std::min< sal_Size >( rString.getLength(), 0x00FF ); nLen = ::std::min< sal_Size >( nLen, 0xFF ); sal_uInt16 nLeft = PrepareWrite(); diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx index 1ac074e2a11d..ca271fc2f569 100644 --- a/sc/source/filter/excel/xestring.cxx +++ b/sc/source/filter/excel/xestring.cxx @@ -113,9 +113,9 @@ void XclExpString::Assign( const OUString& rString, XclStrFlags nFlags, sal_uInt Build( rString.getStr(), rString.getLength(), nFlags, nMaxLen ); } -void XclExpString::Assign( sal_Unicode cChar, XclStrFlags nFlags ) +void XclExpString::Assign( sal_Unicode cChar ) { - Build( &cChar, 1, nFlags, EXC_STR_MAXLEN ); + Build( &cChar, 1, EXC_STR_DEFAULT, EXC_STR_MAXLEN ); } void XclExpString::AssignByte( diff --git a/sc/source/filter/inc/addressconverter.hxx b/sc/source/filter/inc/addressconverter.hxx index a2679da45fb3..4fabc8383874 100644 --- a/sc/source/filter/inc/addressconverter.hxx +++ b/sc/source/filter/inc/addressconverter.hxx @@ -94,7 +94,7 @@ struct BinAddress inline explicit BinAddress( const ScAddress& rAddr ) : mnCol( rAddr.Col() ), mnRow( rAddr.Row() ) {} void read( SequenceInputStream& rStrm ); - void read( BiffInputStream& rStrm, bool bCol16Bit = true ); + void read( BiffInputStream& rStrm ); }; inline bool operator<( const BinAddress& rL, const BinAddress& rR ) @@ -130,7 +130,7 @@ struct BinRange inline explicit BinRange( const css::table::CellRangeAddress& rRange ) : maFirst( rRange.StartColumn, rRange.StartRow ), maLast( rRange.EndColumn, rRange.EndRow ) {} void read( SequenceInputStream& rStrm ); - void read( BiffInputStream& rStrm, bool bCol16Bit = true ); + void read( BiffInputStream& rStrm ); }; inline SequenceInputStream& operator>>( SequenceInputStream& rStrm, BinRange& orRange ) diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx index e2a385b98ab4..bb6b1c1106ae 100644 --- a/sc/source/filter/inc/ftools.hxx +++ b/sc/source/filter/inc/ftools.hxx @@ -289,8 +289,7 @@ public: // various export filters virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, rtl_TextEncoding eDest ) override; virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest ) override; - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, - sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) override; + virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) override; virtual void ScExportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, bool bAll, const OUString& rStreamPath, OUString& rNonConvertibleChars, const OUString& rFilterOptions ) override; virtual void ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) override; diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index 4e4b8367273c..901e7dabf0d7 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -127,9 +127,7 @@ public: // (slice length setting has no effect here -> disabled automatically) /** Writes string length field and OString buffer. */ - void WriteByteString( - const OString& rString, - sal_uInt16 nMaxLen = 0x00FF ); + void WriteByteString( const OString& rString ); /** Writes 8-bit character buffer. */ void WriteCharBuffer( const ScfUInt8Vec& rBuffer ); diff --git a/sc/source/filter/inc/xestring.hxx b/sc/source/filter/inc/xestring.hxx index 0b8c5eab5475..c1fb351f89ac 100644 --- a/sc/source/filter/inc/xestring.hxx +++ b/sc/source/filter/inc/xestring.hxx @@ -70,11 +70,8 @@ public: XclStrFlags nFlags = EXC_STR_DEFAULT, sal_uInt16 nMaxLen = EXC_STR_MAXLEN ); - /** Assigns a Unicode character, converts this object to a BIFF8 Unicode string. - @param nFlags Modifiers for string export. */ - void Assign( - sal_Unicode cChar, - XclStrFlags nFlags = EXC_STR_DEFAULT ); + /** Assigns a Unicode character, converts this object to a BIFF8 Unicode string. */ + void Assign( sal_Unicode cChar ); /** Assigns an unformatted string, converts this object to a BIFF2-BIFF7 byte string. @param nFlags Modifiers for string export. diff --git a/sc/source/filter/oox/addressconverter.cxx b/sc/source/filter/oox/addressconverter.cxx index bbc4a3df3846..6b4cc34c8eb3 100644 --- a/sc/source/filter/oox/addressconverter.cxx +++ b/sc/source/filter/oox/addressconverter.cxx @@ -87,10 +87,10 @@ void BinAddress::read( SequenceInputStream& rStrm ) mnCol = rStrm.readInt32(); } -void BinAddress::read( BiffInputStream& rStrm, bool bCol16Bit ) +void BinAddress::read( BiffInputStream& rStrm ) { mnRow = rStrm.readuInt16(); - mnCol = bCol16Bit ? rStrm.readuInt16() : rStrm.readuInt8(); + mnCol = rStrm.readuInt16(); } void BinRange::read( SequenceInputStream& rStrm ) @@ -101,12 +101,12 @@ void BinRange::read( SequenceInputStream& rStrm ) maLast.mnCol = rStrm.readInt32(); } -void BinRange::read( BiffInputStream& rStrm, bool bCol16Bit ) +void BinRange::read( BiffInputStream& rStrm ) { maFirst.mnRow = rStrm.readuInt16(); maLast.mnRow = rStrm.readuInt16(); - maFirst.mnCol = bCol16Bit ? rStrm.readuInt16() : rStrm.readuInt8(); - maLast.mnCol = bCol16Bit ? rStrm.readuInt16() : rStrm.readuInt8(); + maFirst.mnCol = rStrm.readuInt16(); + maLast.mnCol = rStrm.readuInt16(); } void BinRangeList::read( SequenceInputStream& rStrm ) diff --git a/sc/source/ui/cctrl/cbuttonw.cxx b/sc/source/ui/cctrl/cbuttonw.cxx index 47b38332482f..436aa4ecd426 100644 --- a/sc/source/ui/cctrl/cbuttonw.cxx +++ b/sc/source/ui/cctrl/cbuttonw.cxx @@ -50,8 +50,7 @@ void ScDDComboBoxButton::SetOptSizePixel() void ScDDComboBoxButton::Draw( const Point& rAt, const Size& rSize, - bool bState, - bool bBtnIn /* = false */ ) + bool bState ) { if ( rSize.Width() == 0 || rSize.Height() == 0 ) return; @@ -70,13 +69,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt, DecorationView aDecoView( pOut); - DrawButtonFlags nButtonStyle = DrawButtonFlags::Default; - if( bBtnIn ) // gedrueckt? - { - nButtonStyle = DrawButtonFlags::Pressed; - } - - aInnerRect=aDecoView.DrawButton( aBtnRect, nButtonStyle ); + aInnerRect=aDecoView.DrawButton( aBtnRect, DrawButtonFlags::Default ); aInnerRect.Left() += 1; aInnerRect.Top() += 1; diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index e8b6cd88857b..09f87e6f441a 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2826,11 +2826,11 @@ void ScDocShell::SetDocumentModified() * Drawing also needs to be updated for the normal SetDocumentModified * e.g.: when deleting tables etc. */ -void ScDocShell::SetDrawModified( bool bIsModified /* = true */ ) +void ScDocShell::SetDrawModified() { - bool bUpdate = bIsModified != IsModified(); + bool bUpdate = !IsModified(); - SetModified( bIsModified ); + SetModified(); SfxBindings* pBindings = GetViewBindings(); if (bUpdate) @@ -2842,25 +2842,22 @@ void ScDocShell::SetDrawModified( bool bIsModified /* = true */ ) } } - if (bIsModified) + if (pBindings) { - if (pBindings) - { - // #i105960# Undo etc used to be volatile. - // They always have to be invalidated, including drawing layer or row height changes - // (but not while pPaintLockData is set). - pBindings->Invalidate( SID_UNDO ); - pBindings->Invalidate( SID_REDO ); - pBindings->Invalidate( SID_REPEAT ); - } + // #i105960# Undo etc used to be volatile. + // They always have to be invalidated, including drawing layer or row height changes + // (but not while pPaintLockData is set). + pBindings->Invalidate( SID_UNDO ); + pBindings->Invalidate( SID_REDO ); + pBindings->Invalidate( SID_REPEAT ); + } - if ( aDocument.IsChartListenerCollectionNeedsUpdate() ) - { - aDocument.UpdateChartListenerCollection(); - SfxGetpApp()->Broadcast(SfxSimpleHint( SC_HINT_DRAW_CHANGED )); // Navigator - } - SC_MOD()->AnythingChanged(); + if ( aDocument.IsChartListenerCollectionNeedsUpdate() ) + { + aDocument.UpdateChartListenerCollection(); + SfxGetpApp()->Broadcast(SfxSimpleHint( SC_HINT_DRAW_CHANGED )); // Navigator } + SC_MOD()->AnythingChanged(); } void ScDocShell::SetInUndo(bool bSet) diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 460a92f3993b..509f05f250ec 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2223,7 +2223,7 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin { virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, rtl_TextEncoding ) override { return eERR_INTERN; } virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress&, const rtl_TextEncoding ) override {} - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding, sal_uInt32 ) override { return eERR_INTERN; } + virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding ) override { return eERR_INTERN; } virtual void ScExportHTML( SvStream&, const OUString&, ScDocument*, const ScRange&, const rtl_TextEncoding, bool, const OUString&, OUString&, const OUString& ) override {} virtual void ScExportRTF( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding ) override {} diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 7ef76adcf926..20d58591cb86 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -82,7 +82,7 @@ public: void Init(); void ShowReference(const OUString& rStr); - void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ); + void ReleaseFocus( formula::RefEdit* pEdit ); void HideReference( bool bDoneRefMode = true ); void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ); void RefInputDone( bool bForced = false ); diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx index 49d58536b9e6..a78d71e4eeba 100644 --- a/sc/source/ui/inc/cbutton.hxx +++ b/sc/source/ui/inc/cbutton.hxx @@ -36,8 +36,7 @@ public: void Draw( const Point& rAt, const Size& rSize, - bool bState, - bool bBtnIn = false ); + bool bState ); void Draw( bool bState ) { Draw( aBtnPos, aBtnSize, bState ); } diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 3545654c51ce..74bf9155e375 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -332,7 +332,7 @@ public: void UpdatePaintExt( sal_uInt16& rExtFlags, const ScRange& rRange ); void SetDocumentModified(); - void SetDrawModified( bool bIsModified = true ); + void SetDrawModified(); void LockPaint(); void UnlockPaint(); diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx index 177024db1df2..7bd015f304c0 100644 --- a/sc/source/ui/inc/mtrindlg.hxx +++ b/sc/source/ui/inc/mtrindlg.hxx @@ -41,7 +41,7 @@ public: virtual ~ScMetricInputDlg(); virtual void dispose() override; - long GetInputValue( FieldUnit eUnit = FUNIT_TWIP ) const; + long GetInputValue() const; private: VclPtr<MetricField> m_pEdValue; diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 61f377568369..2644952b400e 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -164,7 +164,7 @@ public: bool bCursorOnly = false ); void ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem* pNewOuter, - const SvxBoxInfoItem* pNewInner, bool bRecord = true ); + const SvxBoxInfoItem* pNewInner ); void ApplyUserItemSet( const SfxItemSet& rItemSet ); @@ -189,7 +189,7 @@ public: void DeleteCells( DelCellCmd eCmd ); bool InsertCells( InsCellCmd eCmd, bool bRecord = true, bool bPartOfPaste = false ); - void DeleteMulti( bool bRows, bool bRecord = true ); + void DeleteMulti( bool bRows ); void DeleteContents( InsertDeleteFlags nFlags ); @@ -197,8 +197,7 @@ public: bool bWidth, const std::vector<sc::ColRowSpan>& rRanges, ScSizeMode eMode, sal_uInt16 nSizeTwips, bool bRecord = true, bool bPaint = true, ScMarkData* pMarkData = nullptr ); - void SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips, - bool bRecord = true ); + void SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips ); bool AdjustBlockHeight( bool bPaint = true, ScMarkData* pMarkData = nullptr ); bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow ); @@ -290,7 +289,7 @@ public: void DoThesaurus(); /** Generic implementation of sheet conversion functions. */ - void DoSheetConversion( const ScConversionParam& rParam, bool bRecord = true ); + void DoSheetConversion( const ScConversionParam& rParam ); void SetPrintRanges( bool bEntireSheet, const OUString* pPrint, diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index c44ec1bedbc7..9998a05ef6f1 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -285,11 +285,11 @@ void ScFormulaReferenceHelper::ShowReference(const OUString& rStr) } } -void ScFormulaReferenceHelper::ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton ) +void ScFormulaReferenceHelper::ReleaseFocus( formula::RefEdit* pEdit ) { if( !pRefEdit && pEdit ) { - m_pDlg->RefInputStart( pEdit, pButton ); + m_pDlg->RefInputStart( pEdit ); } ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx index cedfcbe1e487..869ffc8060f1 100644 --- a/sc/source/ui/miscdlgs/mtrindlg.cxx +++ b/sc/source/ui/miscdlgs/mtrindlg.cxx @@ -70,7 +70,7 @@ void ScMetricInputDlg::dispose() ModalDialog::dispose(); } -long ScMetricInputDlg::GetInputValue( FieldUnit eUnit ) const +long ScMetricInputDlg::GetInputValue() const { /* with decimal digits @@ -91,7 +91,7 @@ long ScMetricInputDlg::GetInputValue( FieldUnit eUnit ) const */ // first cut off the decimal digits - not that great... - return sal::static_int_cast<long>( m_pEdValue->Denormalize( m_pEdValue->GetValue( eUnit ) ) ); + return sal::static_int_cast<long>( m_pEdValue->Denormalize( m_pEdValue->GetValue( FUNIT_TWIP ) ) ); } // Handler: diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index a4fe4b81e5cc..6fac2e8b6fed 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -425,7 +425,7 @@ void ScViewFunc::DoHangulHanjaConversion() DoSheetConversion( aConvParam ); } -void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bRecord ) +void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam ) { SCCOL nCol; SCROW nRow; @@ -437,7 +437,8 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bR ScSplitPos eWhich = rViewData.GetActivePart(); EditView* pEditView = nullptr; bool bIsEditMode = rViewData.HasEditView(eWhich); - if (bRecord && !rDoc.IsUndoEnabled()) + bool bRecord = true; + if (!rDoc.IsUndoEnabled()) bRecord = false; if (bIsEditMode) // edit mode active { diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 2631be4ec804..c3d74241be3b 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -998,12 +998,13 @@ void ScViewFunc::ApplyAttr( const SfxPoolItem& rAttrItem ) // patterns and borders void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem* pNewOuter, - const SvxBoxInfoItem* pNewInner, bool bRecord ) + const SvxBoxInfoItem* pNewInner ) { ScDocument* pDoc = GetViewData().GetDocument(); ScMarkData aFuncMark( GetViewData().GetMarkData() ); // local copy for UnmarkFiltered ScViewUtil::UnmarkFiltered( aFuncMark, pDoc ); - if (bRecord && !pDoc->IsUndoEnabled()) + bool bRecord = true; + if (!pDoc->IsUndoEnabled()) bRecord = false; bool bRemoveAdjCellBorder = false; @@ -1546,7 +1547,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd ) Unmark(); } -void ScViewFunc::DeleteMulti( bool bRows, bool bRecord ) +void ScViewFunc::DeleteMulti( bool bRows ) { ScDocShell* pDocSh = GetViewData().GetDocShell(); ScDocShellModificator aModificator( *pDocSh ); @@ -1555,6 +1556,7 @@ void ScViewFunc::DeleteMulti( bool bRows, bool bRecord ) ScMarkData aFuncMark( GetViewData().GetMarkData() ); // local copy for UnmarkFiltered ScViewUtil::UnmarkFiltered( aFuncMark, &rDoc ); + bool bRecord = true; if (!rDoc.IsUndoEnabled()) bRecord = false; @@ -2107,8 +2109,7 @@ void ScViewFunc::SetWidthOrHeight( // column width/row height (via marked range) -void ScViewFunc::SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips, - bool bRecord) +void ScViewFunc::SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips ) { ScMarkData& rMark = GetViewData().GetMarkData(); @@ -2127,7 +2128,7 @@ void ScViewFunc::SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt std::vector<sc::ColRowSpan> aRanges = bWidth ? rMark.GetMarkedColSpans() : rMark.GetMarkedRowSpans(); - SetWidthOrHeight(bWidth, aRanges, eMode, nSizeTwips, bRecord); + SetWidthOrHeight(bWidth, aRanges, eMode, nSizeTwips); rMark.MarkToSimple(); } |