sc/inc/AccessibleFilterMenu.hxx | 5 - sc/inc/AccessibleFilterMenuItem.hxx | 3 - sc/inc/colcontainer.hxx | 3 - sc/inc/compiler.hxx | 1 sc/inc/dociter.hxx | 3 - sc/inc/dpoutput.hxx | 1 sc/inc/fillinfo.hxx | 4 - sc/inc/hints.hxx | 3 - sc/inc/viewuno.hxx | 1 sc/source/core/data/colcontainer.cxx | 3 - sc/source/core/data/column4.cxx | 4 - sc/source/core/data/dociter.cxx | 5 - sc/source/core/data/dpoutput.cxx | 6 -- sc/source/core/data/fillinfo.cxx | 43 +--------------- sc/source/core/data/table1.cxx | 2 sc/source/core/tool/compiler.cxx | 4 - sc/source/core/tool/ddelink.cxx | 2 sc/source/core/tool/hints.cxx | 6 -- sc/source/filter/excel/expop2.cxx | 2 sc/source/filter/html/htmlexp.cxx | 3 - sc/source/filter/html/htmlpars.cxx | 8 -- sc/source/filter/inc/addressconverter.hxx | 16 ----- sc/source/filter/inc/eeparser.hxx | 1 sc/source/filter/inc/exp_op.hxx | 9 --- sc/source/filter/inc/htmlexp.hxx | 1 sc/source/filter/inc/lotattr.hxx | 1 sc/source/filter/lotus/lotattr.cxx | 2 sc/source/filter/lotus/lotfilter.hxx | 2 sc/source/filter/lotus/memory.cxx | 2 sc/source/filter/oox/addressconverter.cxx | 13 ---- sc/source/filter/rtf/eeimpars.cxx | 1 sc/source/ui/Accessibility/AccessibleFilterMenu.cxx | 14 ----- sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx | 8 -- sc/source/ui/cctrl/checklistmenu.cxx | 4 - sc/source/ui/unoobj/viewuno.cxx | 9 --- 35 files changed, 22 insertions(+), 173 deletions(-)
New commits: commit 9f4421039a40f385489cb2f3ad8a1b02fb32251c Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Wed Jun 21 16:15:42 2017 +0200 loplugin:unusedfields in sc part3 Change-Id: I7323e8644e5d336d52fa21b063264b0847b5e780 Reviewed-on: https://gerrit.libreoffice.org/39064 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/inc/AccessibleFilterMenu.hxx b/sc/inc/AccessibleFilterMenu.hxx index fe3c42afca83..c206e96f62bf 100644 --- a/sc/inc/AccessibleFilterMenu.hxx +++ b/sc/inc/AccessibleFilterMenu.hxx @@ -119,9 +119,8 @@ public: /// non-UNO methods - void appendMenuItem(const OUString& rName, bool bEnabled, size_t nMenuPos); + void appendMenuItem(const OUString& rName, size_t nMenuPos); void setMenuPos(size_t nMenuPos); - void setEnabled(bool bEnabled); protected: @@ -142,8 +141,6 @@ private: size_t mnMenuPos; VclPtr<ScMenuFloatingWindow> mpWindow; - - bool mbEnabled:1; }; #endif diff --git a/sc/inc/AccessibleFilterMenuItem.hxx b/sc/inc/AccessibleFilterMenuItem.hxx index 06fbc8a2d6db..cefb095c004e 100644 --- a/sc/inc/AccessibleFilterMenuItem.hxx +++ b/sc/inc/AccessibleFilterMenuItem.hxx @@ -75,8 +75,6 @@ public: /// Non-UNO Methods - void setEnabled(bool bEnabled); - protected: virtual tools::Rectangle GetBoundingBoxOnScreen() const override; @@ -92,7 +90,6 @@ private: VclPtr<ScMenuFloatingWindow> mpWindow; size_t mnMenuPos; - bool mbEnabled; }; #endif diff --git a/sc/inc/colcontainer.hxx b/sc/inc/colcontainer.hxx index 92fff8f4a42e..3e97ed048f4d 100644 --- a/sc/inc/colcontainer.hxx +++ b/sc/inc/colcontainer.hxx @@ -32,10 +32,9 @@ class ScColContainer { typedef std::vector<ScColumn*> ScColumnVector; ScColumnVector aCols; - ScDocument* pDocument; public: - ScColContainer( ScDocument* pDoc, const size_t nSize ); + ScColContainer( const size_t nSize ); ~ScColContainer() COVERITY_NOEXCEPT_FALSE; const ScColumn& operator[] ( const size_t nIndex ) const diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 9c35ff4b1b82..78c51264c41c 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -281,7 +281,6 @@ private: const CharClass* pCharClass; // which character classification is used for parseAnyToken sal_uInt16 mnPredetectedReference; // reference when reading ODF, 0 (none), 1 (single) or 2 (double) - SCTAB nMaxTab; // last sheet in document sal_Int32 mnRangeOpPosInSymbol; // if and where a range operator is in symbol const Convention *pConv; ExtendedErrorDetection meExtendedErrorDetection; diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx index b0270c44f907..25c09d6599c1 100644 --- a/sc/inc/dociter.hxx +++ b/sc/inc/dociter.hxx @@ -165,7 +165,6 @@ private: ScDBQueryParamMatrix* mpParam; SCROW mnCurRow; SCROW mnRows; - SCCOL mnCols; }; ::std::unique_ptr<ScDBQueryParamBase> mpParam; @@ -422,8 +421,6 @@ class ScHorizontalCellIterator // walk through all non empty cells in an ar SCCOL nEndCol; SCROW nStartRow; SCROW nEndRow; - SCROW* pNextRows; - SCSIZE* pNextIndices; SCCOL mnCol; SCROW mnRow; ScRefCellValue maCurCell; diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx index 3e99e0e40d93..cf9e25dab7e6 100644 --- a/sc/inc/dpoutput.hxx +++ b/sc/inc/dpoutput.hxx @@ -76,7 +76,6 @@ private: SCROW nTabEndRow; bool bDoFilter:1; bool bResultsError:1; - bool mbHasDataLayout:1; bool bSizesValid:1; bool bSizeOverflow:1; bool mbHeaderLayout:1; // true : grid, false : standard diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx index e02ebd1ed070..2fb74585b557 100644 --- a/sc/inc/fillinfo.hxx +++ b/sc/inc/fillinfo.hxx @@ -114,9 +114,7 @@ struct CellInfo , nClipMark(ScClipMark::NONE) , nWidth(0) , nRotateDir(ScRotateDir::NONE) - , bMarked(false) , bEmptyCellText(false) - , bMerged(false) , bHOverlapped(false) , bVOverlapped(false) , bAutoFilter(false) @@ -157,7 +155,6 @@ struct CellInfo sal_uInt16 nWidth; ScRotateDir nRotateDir; - bool bMarked : 1; bool bEmptyCellText : 1; bool bMerged : 1; bool bHOverlapped : 1; @@ -185,7 +182,6 @@ struct RowInfo SCCOL nRotMaxCol; // SC_ROTMAX_NONE, if nothing bool bEmptyBack:1; - bool bEmptyText:1; bool bAutoFilter:1; bool bPivotButton:1; bool bChanged:1; // TRUE, if not tested diff --git a/sc/inc/hints.hxx b/sc/inc/hints.hxx index 2ffb689bb67b..7dc6dbfa3a56 100644 --- a/sc/inc/hints.hxx +++ b/sc/inc/hints.hxx @@ -78,7 +78,6 @@ class ScLinkRefreshedHint : public SfxHint OUString aDdeAppl; // used for dde links: OUString aDdeTopic; OUString aDdeItem; - sal_uInt8 nDdeMode; ScAddress aDestPos; // used to identify area links //! also use source data for area links? @@ -87,7 +86,7 @@ public: virtual ~ScLinkRefreshedHint() override; void SetSheetLink( const OUString& rSourceUrl ); - void SetDdeLink( const OUString& rA, const OUString& rT, const OUString& rI, sal_uInt8 nM ); + void SetDdeLink( const OUString& rA, const OUString& rT, const OUString& rI ); void SetAreaLink( const ScAddress& rPos ); ScLinkRefType GetLinkType() const { return nLinkType; } diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx index 49c936e99c24..839219677d4b 100644 --- a/sc/inc/viewuno.hxx +++ b/sc/inc/viewuno.hxx @@ -166,7 +166,6 @@ private: void EndMouseListening(); void EndActivationListening(); bool mbLeftMousePressed; - bool mbPendingSelectionChanged; public: ScTabViewObj(ScTabViewShell* pViewSh); ScTabViewObj() = delete; diff --git a/sc/source/core/data/colcontainer.cxx b/sc/source/core/data/colcontainer.cxx index cd185032ee8b..6e334d54580b 100644 --- a/sc/source/core/data/colcontainer.cxx +++ b/sc/source/core/data/colcontainer.cxx @@ -22,9 +22,8 @@ #include "column.hxx" #include "document.hxx" -ScColContainer::ScColContainer( ScDocument* pDoc, const size_t nSize ) +ScColContainer::ScColContainer( const size_t nSize ) { - pDocument = pDoc; aCols.resize( nSize ); for ( size_t nCol = 0; nCol < nSize; ++nCol ) aCols[nCol] = new ScColumn; diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index cafe77043671..7132ed02f732 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -1289,11 +1289,10 @@ class StartListeningFormulaCellsHandler sc::StartListeningContext& mrStartCxt; sc::EndListeningContext& mrEndCxt; SCROW mnStartRow; - SCROW mnEndRow; public: StartListeningFormulaCellsHandler( sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt ) : - mrStartCxt(rStartCxt), mrEndCxt(rEndCxt), mnStartRow(-1), mnEndRow(-1) {} + mrStartCxt(rStartCxt), mrEndCxt(rEndCxt), mnStartRow(-1) {} void operator() ( const sc::CellStoreType::value_type& node, size_t nOffset, size_t nDataSize ) { @@ -1341,7 +1340,6 @@ public: // extends beyond the range, in which case have the excess // formula cells stop listening. size_t nEndGroupPos = (pp - ppBeg) + pFC->GetSharedLength(); - mnEndRow = node.position + nOffset + nEndGroupPos - 1; // absolute row position of the last one in the group. if (nEndGroupPos > nDataSize) { size_t nExcessSize = nEndGroupPos - nDataSize; diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 11290eb1d94c..1d0d89efd2e5 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -522,7 +522,6 @@ ScDBQueryDataIterator::DataAccessMatrix::DataAccessMatrix(ScDBQueryParamMatrix* SCSIZE nC, nR; mpParam->mpMatrix->GetDimensions(nC, nR); mnRows = static_cast<SCROW>(nR); - mnCols = static_cast<SCCOL>(nC); } ScDBQueryDataIterator::DataAccessMatrix::~DataAccessMatrix() @@ -1941,8 +1940,6 @@ ScHorizontalCellIterator::ScHorizontalCellIterator(ScDocument* pDocument, SCTAB if (mnTab >= pDoc->GetTableCount()) OSL_FAIL("try to access index out of bounds, FIX IT"); - pNextRows = new SCROW[ nCol2-nCol1+1 ]; - pNextIndices = new SCSIZE[ nCol2-nCol1+1 ]; maColPositions.reserve( nCol2-nCol1+1 ); SetTab( mnTab ); @@ -1950,8 +1947,6 @@ ScHorizontalCellIterator::ScHorizontalCellIterator(ScDocument* pDocument, SCTAB ScHorizontalCellIterator::~ScHorizontalCellIterator() { - delete [] pNextRows; - delete [] pNextIndices; } void ScHorizontalCellIterator::SetTab( SCTAB nTabP ) diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index a59eb7430ec3..5bd2c12b0551 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -519,7 +519,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS nHeaderSize(0), bDoFilter(bFilter), bResultsError(false), - mbHasDataLayout(false), bSizesValid(false), bSizeOverflow(false), mbHeaderLayout(false) @@ -597,7 +596,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS double fValue; rtl::math::setNan(&fValue); - bool bRowFieldHasMember = false; switch ( eDimOrient ) { case sheet::DataPilotFieldOrientation_COLUMN: @@ -619,7 +617,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS ScDPOutLevelData tmp(nDim, nHierarchy, nLev, nDimPos, nNumFmt, aResult, aName, aCaption, fValue, bHasHiddenMember, bIsDataLayout, false); pRowFields.push_back(tmp); - bRowFieldHasMember = true; } } break; @@ -641,9 +638,6 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS // get number formats from data dimensions if ( bIsDataLayout ) { - if (bRowFieldHasMember) - mbHasDataLayout = true; - OSL_ENSURE( nLevCount == 1, "data layout: multiple levels?" ); if ( eDimOrient == sheet::DataPilotFieldOrientation_COLUMN ) lcl_FillNumberFormats( pColNumFmt, nColFmtCount, xLevRes, xDims ); diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index e8c83e5d280d..083051d52245 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -150,7 +150,6 @@ class RowInfoFiller RowInfo& rThisRowInfo = mpRowInfo[mnArrY]; CellInfo& rInfo = rThisRowInfo.pCellInfo[mnArrX]; rInfo.maCell = rCell; - rThisRowInfo.bEmptyText = false; rInfo.bEmptyCellText = false; ++mnArrY; } @@ -232,7 +231,6 @@ void initRowInfo(ScDocument* pDoc, RowInfo* pRowInfo, const SCSIZE nMaxRow, pThisRowInfo->nRowNo = nY; //TODO: case < 0 ? pThisRowInfo->nHeight = nHeight; pThisRowInfo->bEmptyBack = true; - pThisRowInfo->bEmptyText = true; pThisRowInfo->bChanged = true; pThisRowInfo->bAutoFilter = false; pThisRowInfo->bPivotButton = false; @@ -252,29 +250,17 @@ void initRowInfo(ScDocument* pDoc, RowInfo* pRowInfo, const SCSIZE nMaxRow, } } -void initCellInfo(RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nRotMax, bool bPaintMarks, - const SvxShadowItem* pDefShadow, SCROW nBlockStartY, SCROW nBlockEndY, - SCCOL nBlockStartX, SCCOL nBlockEndX) +void initCellInfo(RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nRotMax, + const SvxShadowItem* pDefShadow) { for (SCSIZE nArrRow = 0; nArrRow < nArrCount; ++nArrRow) { RowInfo& rThisRowInfo = pRowInfo[nArrRow]; - SCROW nY = rThisRowInfo.nRowNo; rThisRowInfo.pCellInfo = new CellInfo[nRotMax + 1 + 2]; // to delete the caller! for (SCCOL nArrCol = 0; nArrCol <= nRotMax+2; ++nArrCol) // Preassign cell info { CellInfo& rInfo = rThisRowInfo.pCellInfo[nArrCol]; - if (bPaintMarks) - { - SCCOL nX; - if (nArrCol>0) - nX = nArrCol-1; - else - nX = MAXCOL+1; // invalid - rInfo.bMarked = (nX >= nBlockStartX && nX <= nBlockEndX && - nY >= nBlockStartY && nY <= nBlockEndY); - } rInfo.bEmptyCellText = true; rInfo.pShadowAttr = pDefShadow; } @@ -399,7 +385,6 @@ void ScDocument::FillInfo( // for block marks of merged cells // with hidden first row/column bool bPaintMarks = false; - bool bSkipMarks = false; SCCOL nBlockStartX = 0, nBlockEndX = 0; SCROW nBlockEndY = 0, nBlockStartY = 0; if (pMarkData && pMarkData->IsMarked()) @@ -413,9 +398,7 @@ void ScDocument::FillInfo( nBlockEndX = aTmpRange.aEnd.Col(); nBlockEndY = aTmpRange.aEnd.Row(); ExtendHidden( nBlockStartX, nBlockStartY, nBlockEndX, nBlockEndY, nTab ); //? needed ? - if (pMarkData->IsMarkNegative()) - bSkipMarks = true; - else + if (!pMarkData->IsMarkNegative()) bPaintMarks = true; } } @@ -450,8 +433,7 @@ void ScDocument::FillInfo( // Allocate cell information only after the test rotation // to nRotMax due to nRotateDir Flag - initCellInfo(pRowInfo, nArrCount, nRotMax, bPaintMarks, pDefShadow, - nBlockStartY, nBlockEndY, nBlockStartX, nBlockEndX); + initCellInfo(pRowInfo, nArrCount, nRotMax, pDefShadow); initColWidths(pRowInfo, this, fColScale, nTab, nCol2, nRotMax); @@ -638,26 +620,11 @@ void ScDocument::FillInfo( do { nThisRow=aThisMarkArr.pData[nIndex].nRow; // End of range - const bool bThisMarked=aThisMarkArr.pData[nIndex].bMarked; do { if ( !RowHidden( nCurRow,nTab ) ) { - if ( bThisMarked ) - { - bool bSkip = bSkipMarks && - nX >= nBlockStartX && - nX <= nBlockEndX && - nCurRow >= nBlockStartY && - nCurRow <= nBlockEndY; - if (!bSkip) - { - RowInfo* pThisRowInfo = &pRowInfo[nArrRow]; - CellInfo* pInfo = &pThisRowInfo->pCellInfo[nArrCol]; - pInfo->bMarked = true; - } - } ++nArrRow; } ++nCurRow; @@ -810,8 +777,6 @@ void ScDocument::FillInfo( if ( aThisMarkArr.Search( nStartY, nIndex ) ) bCellMarked=aThisMarkArr.pData[nIndex].bMarked; } - - pInfo->bMarked = bCellMarked; } } } diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 713c26086844..44ab75965008 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -235,7 +235,7 @@ bool SetOptimalHeightsToRows( ScTable::ScTable( ScDocument* pDoc, SCTAB nNewTab, const OUString& rNewName, bool bColInfo, bool bRowInfo ) : - aCol( pDoc, MAXCOLCOUNT ), + aCol( MAXCOLCOUNT ), aName( rNewName ), aCodeName( rNewName ), nLinkRefreshDelay( 0 ), diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 7b83cc6fcdfc..c30d649bb8d4 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -1752,7 +1752,6 @@ ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos, mbRewind(false), maTabNames(rCxt.getTabNames()) { - nMaxTab = pDoc->GetTableCount() - 1; SetGrammar(rCxt.getGrammar()); } @@ -1776,7 +1775,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos, ScTokenArr SetGrammar( ((eGrammar == formula::FormulaGrammar::GRAM_UNSPECIFIED) ? pDocument->GetGrammar() : eGrammar) ); - nMaxTab = pDoc->GetTableCount() - 1; } ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos ) : @@ -1794,7 +1792,6 @@ ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const ScAddress& rPos ) mbRewind(false), maTabNames(rCxt.getTabNames()) { - nMaxTab = pDoc ? pDoc->GetTableCount() - 1 : 0; SetGrammar(rCxt.getGrammar()); } @@ -1818,7 +1815,6 @@ ScCompiler::ScCompiler( ScDocument* pDocument, const ScAddress& rPos, SetGrammar( ((eGrammar == formula::FormulaGrammar::GRAM_UNSPECIFIED) ? (pDocument ? pDocument->GetGrammar() : formula::FormulaGrammar::GRAM_DEFAULT) : eGrammar)); - nMaxTab = pDoc ? pDoc->GetTableCount() - 1 : 0; } ScCompiler::~ScCompiler() diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index fb2f7fcc3796..bf0778d36989 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -211,7 +211,7 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged( // must be after TrackFormulas //TODO: do this asynchronously? ScLinkRefreshedHint aHint; - aHint.SetDdeLink( aAppl, aTopic, aItem, nMode ); + aHint.SetDdeLink( aAppl, aTopic, aItem ); pDoc->BroadcastUno( aHint ); } diff --git a/sc/source/core/tool/hints.cxx b/sc/source/core/tool/hints.cxx index 581a68771a02..e283eee7192f 100644 --- a/sc/source/core/tool/hints.cxx +++ b/sc/source/core/tool/hints.cxx @@ -51,8 +51,7 @@ ScUpdateRefHint::~ScUpdateRefHint() // ScLinkRefreshedHint - a link has been refreshed ScLinkRefreshedHint::ScLinkRefreshedHint() : - nLinkType( ScLinkRefType::NONE ), - nDdeMode( 0 ) + nLinkType( ScLinkRefType::NONE ) { } @@ -67,13 +66,12 @@ void ScLinkRefreshedHint::SetSheetLink( const OUString& rSourceUrl ) } void ScLinkRefreshedHint::SetDdeLink( - const OUString& rA, const OUString& rT, const OUString& rI, sal_uInt8 nM ) + const OUString& rA, const OUString& rT, const OUString& rI ) { nLinkType = ScLinkRefType::DDE; aDdeAppl = rA; aDdeTopic = rT; aDdeItem = rI; - nDdeMode = nM; } void ScLinkRefreshedHint::SetAreaLink( const ScAddress& rPos ) diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx index ed636897f326..35b3a758e93e 100644 --- a/sc/source/filter/excel/expop2.cxx +++ b/sc/source/filter/excel/expop2.cxx @@ -57,7 +57,7 @@ enum class VBAExportMode } ExportBiff5::ExportBiff5( XclExpRootData& rExpData, SvStream& rStrm ): - ExportTyp( rStrm, &rExpData.mrDoc, rExpData.meTextEnc ), + ExportTyp( rStrm ), XclExpRoot( rExpData ) { // only need part of the Root data diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 727754e5b3c6..ce68397aad54 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -204,7 +204,6 @@ ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const OUString& rBaseURL, ScDocume bTabHasGraphics( false ), bTabAlignedLeft( false ), bCalcAsShown( pDocP->GetDocOptions().IsCalcAsShown() ), - bTableDataWidth( true ), bTableDataHeight( true ), mbSkipImages ( false ), mbSkipHeaderFooter( false ) @@ -782,7 +781,6 @@ void ScHTMLExport::WriteTables() // IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_tbody ); // At least old (3.x, 4.x?) Netscape doesn't follow <TABLE COLS=n> and // <COL WIDTH=x> specified, but needs a width at every column. - bTableDataWidth = true; // widths in first row bool bHasHiddenRows = pDoc->HasHiddenRows(nStartRow, nEndRow, nTab); for ( SCROW nRow=nStartRow; nRow<=nEndRow; nRow++ ) { @@ -805,7 +803,6 @@ void ScHTMLExport::WriteTables() WriteCell( nCol2, nRow, nTab ); bTableDataHeight = false; } - bTableDataWidth = false; // widths only in first row if ( nRow == nEndRow ) IncIndent(-1); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 4811c230c2bc..99769779ffb9 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1521,7 +1521,6 @@ void ScHTMLLayoutParser::FontOn( HtmlImportInfo* pInfo ) void ScHTMLLayoutParser::ProcToken( HtmlImportInfo* pInfo ) { - bool bSetLastToken = true; switch ( pInfo->nToken ) { case HtmlTokenId::META: @@ -1681,13 +1680,8 @@ void ScHTMLLayoutParser::ProcToken( HtmlImportInfo* pInfo ) aString += pInfo->aText; } break; - default: - { // Don't set nHtmlLastToken! - bSetLastToken = false; - } + default: ; } - if ( bSetLastToken ) - nHtmlLastToken = pInfo->nToken; } // HTML DATA QUERY PARSER diff --git a/sc/source/filter/inc/addressconverter.hxx b/sc/source/filter/inc/addressconverter.hxx index 6ca497637493..57f1f33cabcd 100644 --- a/sc/source/filter/inc/addressconverter.hxx +++ b/sc/source/filter/inc/addressconverter.hxx @@ -484,25 +484,9 @@ private: sal_Int16 nMaxXlsTab, sal_Int32 nMaxXlsCol, sal_Int32 nMaxXlsRow ); private: - struct ControlCharacters - { - sal_Unicode mcThisWorkbook; /// Control character: Link to current workbook. - sal_Unicode mcExternal; /// Control character: Link to external workbook/sheet. - sal_Unicode mcThisSheet; /// Control character: Link to current sheet. - sal_Unicode mcInternal; /// Control character: Link to internal sheet. - sal_Unicode mcSameSheet; /// Control character: Link to same sheet (special '!A1' syntax). - - void set( - sal_Unicode cThisWorkbook, sal_Unicode cExternal, - sal_Unicode cThisSheet, sal_Unicode cInternal, - sal_Unicode cSameSheet ); - }; - ScAddress maMaxApiPos; /// Maximum valid cell address in Calc. ScAddress maMaxXlsPos; /// Maximum valid cell address in Excel. ScAddress maMaxPos; /// Maximum valid cell address in Calc/Excel. - ControlCharacters maLinkChars; /// Control characters for external link import (BIFF). - ControlCharacters maDConChars; /// Control characters for DCON* record import (BIFF). bool mbColOverflow; /// Flag for "columns overflow". bool mbRowOverflow; /// Flag for "rows overflow". bool mbTabOverflow; /// Flag for "tables overflow". diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx index 6abe5dfbd8ff..280446e076b7 100644 --- a/sc/source/filter/inc/eeparser.hxx +++ b/sc/source/filter/inc/eeparser.hxx @@ -106,7 +106,6 @@ protected: ScEEParseEntry* pActEntry; ColWidthsMap maColWidths; int nRtfLastToken; - HtmlTokenId nHtmlLastToken; SCCOL nColCnt; SCROW nRowCnt; SCCOL nColMax; diff --git a/sc/source/filter/inc/exp_op.hxx b/sc/source/filter/inc/exp_op.hxx index f02431819ab6..735bf0a16313 100644 --- a/sc/source/filter/inc/exp_op.hxx +++ b/sc/source/filter/inc/exp_op.hxx @@ -36,15 +36,8 @@ protected: ~ExportTyp() {} SvStream& aOut; - ScDocument* pD; - rtl_TextEncoding eTargetCharset; // target character set public: - ExportTyp( SvStream& aStream, ScDocument* pDoc, rtl_TextEncoding eDest ): - aOut( aStream ) - { - eTargetCharset = eDest; - pD = pDoc; - } + ExportTyp( SvStream& aStream ) : aOut( aStream ) {} virtual ErrCode Write() = 0; }; diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx index 1dec146863c5..e685a9f13d4d 100644 --- a/sc/source/filter/inc/htmlexp.hxx +++ b/sc/source/filter/inc/htmlexp.hxx @@ -121,7 +121,6 @@ class ScHTMLExport : public ScExportBase bool bTabAlignedLeft; bool bCalcAsShown; bool bCopyLocalFileToINet; - bool bTableDataWidth; bool bTableDataHeight; bool mbSkipImages; /// If HTML header and footer should be written as well, or just the content itself. diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx index 3c77be21d3e5..ce862d50dada 100644 --- a/sc/source/filter/inc/lotattr.hxx +++ b/sc/source/filter/inc/lotattr.hxx @@ -94,7 +94,6 @@ private: ScDocumentPool* pDocPool; SvxColorItem* ppColorItems[6]; // 0 and 7 are missing! - SvxColorItem* pBlack; SvxColorItem* pWhite; Color* pColTab; std::vector< std::unique_ptr<ENTRY> > aEntries; diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx index 874a56db6ba0..342207d48e3b 100644 --- a/sc/source/filter/lotus/lotattr.cxx +++ b/sc/source/filter/lotus/lotattr.cxx @@ -67,7 +67,6 @@ LotAttrCache::LotAttrCache (LOTUS_ROOT* pLotRoot) ppColorItems[ 4 ] = new SvxColorItem( GetColor( 5 ), ATTR_FONT_COLOR ); ppColorItems[ 5 ] = new SvxColorItem( GetColor( 6 ), ATTR_FONT_COLOR ); // 6 - pBlack = new SvxColorItem( Color( COL_BLACK ), ATTR_FONT_COLOR ); pWhite = new SvxColorItem( Color( COL_WHITE ), ATTR_FONT_COLOR ); } @@ -76,7 +75,6 @@ LotAttrCache::~LotAttrCache() for(SvxColorItem* p : ppColorItems) delete p; - delete pBlack; delete pWhite; delete[] pColTab; diff --git a/sc/source/filter/lotus/lotfilter.hxx b/sc/source/filter/lotus/lotfilter.hxx index c7bdeda44642..1ff433fdefb5 100644 --- a/sc/source/filter/lotus/lotfilter.hxx +++ b/sc/source/filter/lotus/lotfilter.hxx @@ -44,7 +44,6 @@ struct LotusContext std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool; SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard; - ScProtectionAttr* pAttrUnprot; FormCache* pValueFormCache; // -> initialized in memory.cxx @@ -60,7 +59,6 @@ struct LotusContext , pAttrCenter(nullptr) , pAttrRepeat(nullptr) , pAttrStandard(nullptr) - , pAttrUnprot(nullptr) , pValueFormCache(nullptr) { } diff --git a/sc/source/filter/lotus/memory.cxx b/sc/source/filter/lotus/memory.cxx index 51c8dcc3d2e2..72d94d6eae31 100644 --- a/sc/source/filter/lotus/memory.cxx +++ b/sc/source/filter/lotus/memory.cxx @@ -33,7 +33,6 @@ bool MemNew(LotusContext &rContext) rContext.pValueFormCache = new FormCache(rContext.pDoc); // for tool.cxx::PutFormString() - rContext.pAttrUnprot = new ScProtectionAttr( true ); rContext.pAttrRight = new SvxHorJustifyItem( SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY ); rContext.pAttrLeft = new SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY ); rContext.pAttrCenter = new SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY ); @@ -51,7 +50,6 @@ void MemDelete(LotusContext &rContext) delete rContext.pAttrCenter; delete rContext.pAttrRepeat; delete rContext.pAttrStandard; - delete rContext.pAttrUnprot; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/oox/addressconverter.cxx b/sc/source/filter/oox/addressconverter.cxx index 84541bac7306..19af56cdca50 100644 --- a/sc/source/filter/oox/addressconverter.cxx +++ b/sc/source/filter/oox/addressconverter.cxx @@ -78,9 +78,7 @@ AddressConverter::AddressConverter( const WorkbookHelper& rHelper ) : mbRowOverflow( false ), mbTabOverflow( false ) { - maDConChars.set( 0xFFFF, '\x01', 0xFFFF, '\x02', 0xFFFF ); initializeMaxPos( OOX_MAXTAB, OOX_MAXCOL, OOX_MAXROW ); - maLinkChars.set( 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF ); } bool AddressConverter::parseOoxAddress2d( @@ -464,17 +462,6 @@ Sequence<CellRangeAddress> AddressConverter::toApiSequence(const ScRangeList& or // private -------------------------------------------------------------------- -void AddressConverter::ControlCharacters::set( - sal_Unicode cThisWorkbook, sal_Unicode cExternal, - sal_Unicode cThisSheet, sal_Unicode cInternal, sal_Unicode cSameSheet ) -{ - mcThisWorkbook = cThisWorkbook; - mcExternal = cExternal; - mcThisSheet = cThisSheet; - mcInternal = cInternal; - mcSameSheet = cSameSheet; -} - void AddressConverter::initializeMaxPos( sal_Int16 nMaxXlsTab, sal_Int32 nMaxXlsCol, sal_Int32 nMaxXlsRow ) { diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 87b3a0426809..e7b99b25a137 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -612,7 +612,6 @@ ScEEParser::ScEEParser( EditEngine* pEditP ) : pPool( EditEngine::CreatePool() ), pDocPool( new ScDocumentPool ), nRtfLastToken(0), - nHtmlLastToken(HtmlTokenId::NONE), nColCnt(0), nRowCnt(0), nColMax(0), diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx index 2aa8ba93c3e3..92326d3e8cbb 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx @@ -80,8 +80,7 @@ private: ScAccessibleFilterMenu::ScAccessibleFilterMenu(const Reference<XAccessible>& rxParent, ScMenuFloatingWindow* pWin, const OUString& rName, size_t nMenuPos) : ScAccessibleContextBase(rxParent, AccessibleRole::MENU), mnMenuPos(nMenuPos), - mpWindow(pWin), - mbEnabled(true) + mpWindow(pWin) { SetName(rName); } @@ -279,7 +278,7 @@ tools::Rectangle ScAccessibleFilterMenu::GetBoundingBox() const return aRect; } -void ScAccessibleFilterMenu::appendMenuItem(const OUString& rName, bool bEnabled, size_t nMenuPos) +void ScAccessibleFilterMenu::appendMenuItem(const OUString& rName, size_t nMenuPos) { // Check whether this menu item is a sub menu or a regular menu item. ScMenuFloatingWindow* pSubMenu = mpWindow->getSubMenuWindow(nMenuPos); @@ -289,15 +288,11 @@ void ScAccessibleFilterMenu::appendMenuItem(const OUString& rName, bool bEnabled xAccessible = pSubMenu->CreateAccessible(); ScAccessibleFilterMenu* p = static_cast<ScAccessibleFilterMenu*>(xAccessible.get()); - p->setEnabled(bEnabled); p->setMenuPos(nMenuPos); } else { xAccessible.set(new ScAccessibleFilterMenuItem(this, mpWindow, rName, nMenuPos)); - ScAccessibleFilterMenuItem* p = - static_cast<ScAccessibleFilterMenuItem*>(xAccessible.get()); - p->setEnabled(bEnabled); } maMenuItems.push_back(xAccessible); } @@ -307,11 +302,6 @@ void ScAccessibleFilterMenu::setMenuPos(size_t nMenuPos) mnMenuPos = nMenuPos; } -void ScAccessibleFilterMenu::setEnabled(bool bEnabled) -{ - mbEnabled = bEnabled; -} - sal_Int32 ScAccessibleFilterMenu::getMenuItemCount() const { return maMenuItems.size(); diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx index 2712649ab159..58709a46bf2f 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx @@ -42,8 +42,7 @@ ScAccessibleFilterMenuItem::ScAccessibleFilterMenuItem( const Reference<XAccessible>& rxParent, ScMenuFloatingWindow* pWin, const OUString& rName, size_t nMenuPos) : ScAccessibleContextBase(rxParent, AccessibleRole::MENU_ITEM), mpWindow(pWin), - mnMenuPos(nMenuPos), - mbEnabled(true) + mnMenuPos(nMenuPos) { SetName(rName); } @@ -121,11 +120,6 @@ bool ScAccessibleFilterMenuItem::isSelected() const return mpWindow->isMenuItemSelected(mnMenuPos); } -void ScAccessibleFilterMenuItem::setEnabled(bool bEnabled) -{ - mbEnabled = bEnabled; -} - tools::Rectangle ScAccessibleFilterMenuItem::GetBoundingBoxOnScreen() const { if (!mpWindow->IsVisible()) diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 42d56f2ad821..ad8ac8b79be8 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -286,7 +286,7 @@ Reference<XAccessible> ScMenuFloatingWindow::CreateAccessible() for (itr = itrBeg; itr != itrEnd; ++itr) { size_t nPos = ::std::distance(itrBeg, itr); - p->appendMenuItem(itr->maText, itr->mbEnabled, nPos); + p->appendMenuItem(itr->maText, nPos); } } @@ -594,7 +594,7 @@ void ScMenuFloatingWindow::fillMenuItemsToAccessible(ScAccessibleFilterMenu* pAc for (itr = itrBeg; itr != itrEnd; ++itr) { size_t nPos = ::std::distance(itrBeg, itr); - pAccMenu->appendMenuItem(itr->maText, itr->mbEnabled, nPos); + pAccMenu->appendMenuItem(itr->maText, nPos); } } diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index d76a9fcfb7cc..56a8f44a75f6 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -447,8 +447,7 @@ ScTabViewObj::ScTabViewObj( ScTabViewShell* pViewSh ) : nPreviousTab( 0 ), bDrawSelModeSet(false), bFilteredRangeSelection(false), - mbLeftMousePressed(false), - mbPendingSelectionChanged(false) + mbLeftMousePressed(false) { if (pViewSh) nPreviousTab = pViewSh->GetViewData().GetTabNo(); @@ -1259,7 +1258,6 @@ bool ScTabViewObj::MouseReleased( const awt::MouseEvent& e ) { try { - mbPendingSelectionChanged = false; ScTabViewShell* pViewSh = GetViewShell(); ScViewData& rViewData = pViewSh->GetViewData(); ScDocShell* pDocSh = rViewData.GetDocShell(); @@ -1721,7 +1719,6 @@ void ScTabViewObj::SelectionChanged() } if ( !mbLeftMousePressed ) // selection still in progress { - mbPendingSelectionChanged = false; try { uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( rDoc.GetVbaEventProcessor(), uno::UNO_SET_THROW ); @@ -1733,10 +1730,6 @@ void ScTabViewObj::SelectionChanged() { } } - else - { - mbPendingSelectionChanged = true; - } } // XPropertySet (view options) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits