diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-18 16:35:31 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-24 08:27:56 +0000 |
commit | 3caf31b05d7bbf3d50a1bbda6c8b95982cb5c2b5 (patch) | |
tree | b281c279936763f21a9f07047246dfdc72e8d4fe /sc/source | |
parent | 2c8e66129f14c6d0b9174d27546e233b3995d8d4 (diff) |
loplugin:unusedmethods in sc
Change-Id: Ic378126a30be853d10fe174c451cee3c6ded404f
Reviewed-on: https://gerrit.libreoffice.org/25109
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source')
40 files changed, 2 insertions, 794 deletions
diff --git a/sc/source/core/data/colcontainer.cxx b/sc/source/core/data/colcontainer.cxx index bbe45fc0a9ec..a4cf1c677953 100644 --- a/sc/source/core/data/colcontainer.cxx +++ b/sc/source/core/data/colcontainer.cxx @@ -22,11 +22,6 @@ #include "column.hxx" #include "document.hxx" -ScColContainer::ScColContainer( ScDocument* pDoc ): - aCols( ScColumnVector() ), - pDocument( pDoc ) -{} - ScColContainer::ScColContainer( ScDocument* pDoc, const size_t nSize ) { pDocument = pDoc; @@ -40,40 +35,6 @@ ScColContainer::~ScColContainer() Clear(); } -void ScColContainer::CreateCol( SCCOL nColIdx, SCTAB nTab ) -{ - assert( nColIdx >= 0 ); - SCCOL nSize = size(); - if ( nColIdx < nSize ) - return; - else - { - aCols.resize( nColIdx + 1, nullptr ); - for ( SCCOL nNewColIdx = nSize; nNewColIdx <= nColIdx; ++nNewColIdx ) - { - aCols[nNewColIdx] = new ScColumn; - aCols[nNewColIdx]->Init( nNewColIdx, nTab, pDocument ); - // TODO: Apply any full row formatting / document formatting - } - } -} - -void ScColContainer::DeleteLastCols( SCSIZE nCols ) -{ - SCCOL nSize = size(); - SCCOL nFirstColToDelete = nSize - nCols; - if ( !ColumnExists( nFirstColToDelete ) ) - return; - - for ( SCCOL nColToDelete = nFirstColToDelete; nColToDelete < nSize; ++nColToDelete ) - { - if ( !pDocument->IsInDtorClear() ) - aCols[nColToDelete]->FreeNotes(); - aCols[nColToDelete]->PrepareBroadcastersForDestruction(); - delete aCols[nColToDelete]; - aCols.resize( static_cast<size_t>( nFirstColToDelete ) ); - } -} bool ScColContainer::ColumnExists( SCCOL nColIdx ) const { diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 0ef57f5990c4..1a088851aa4f 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -91,12 +91,6 @@ void ScFormulaListener::startListening(ScTokenArray* pArr, const ScRange& rRange } } -void ScFormulaListener::resetTokenArray(ScTokenArray* pArray, const ScRange& rRange) -{ - stopListening(); - startListening(pArray, rRange); -} - void ScFormulaListener::addTokenArray(ScTokenArray* pArray, const ScRange& rRange) { startListening(pArray, rRange); @@ -595,18 +589,6 @@ void ScColorScaleFormat::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) (*it)->UpdateMoveTab(rCxt); } -bool ScColorScaleFormat::NeedsRepaint() const -{ - for(ScColorScaleEntries::const_iterator itr = begin(), itrEnd = end(); - itr != itrEnd; ++itr) - { - if((*itr)->NeedsRepaint()) - return true; - } - return false; -} - - condformat::ScFormatEntryType ScColorScaleFormat::GetType() const { return condformat::COLORSCALE; @@ -721,12 +703,6 @@ void ScDataBarFormat::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) mpFormatData->mpLowerLimit->UpdateMoveTab(rCxt); } -bool ScDataBarFormat::NeedsRepaint() const -{ - return mpFormatData->mpUpperLimit->NeedsRepaint() || - mpFormatData->mpLowerLimit->NeedsRepaint(); -} - double ScDataBarFormat::getMin(double nMin, double nMax) const { switch(mpFormatData->mpLowerLimit->GetType()) @@ -1059,17 +1035,6 @@ void ScIconSetFormat::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) } } -bool ScIconSetFormat::NeedsRepaint() const -{ - for(const_iterator itr = begin(); itr != end(); ++itr) - { - if ((*itr)->NeedsRepaint()) - return true; - } - - return false; -} - ScIconSetFormat::iterator ScIconSetFormat::begin() { return mpFormatData->m_Entries.begin(); diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 00b7e4842925..0e559307efa9 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1754,17 +1754,6 @@ const SvtBroadcaster* ScColumn::GetBroadcaster(SCROW nRow) const return maBroadcasters.get<SvtBroadcaster*>(nRow); } -const SvtBroadcaster* ScColumn::GetBroadcaster( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const -{ - sc::BroadcasterStoreType::const_position_type aPos = maBroadcasters.position(rBlockPos.miBroadcasterPos, nRow); - rBlockPos.miBroadcasterPos = aPos.first; - - if (aPos.first->type != sc::element_type_broadcaster) - return nullptr; - - return sc::broadcaster_block::at(*aPos.first->data, aPos.second); -} - void ScColumn::DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2 ) { rBlockPos.miBroadcasterPos = diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index f7368a56de67..684498c8616c 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -2257,11 +2257,6 @@ size_t ScConditionalFormatList::size() const return m_ConditionalFormats.size(); } -bool ScConditionalFormatList::empty() const -{ - return m_ConditionalFormats.empty(); -} - void ScConditionalFormatList::erase( sal_uLong nIndex ) { for( iterator itr = begin(); itr != end(); ++itr ) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 4d0ea1e39a65..78ed21f57b6b 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2408,15 +2408,6 @@ void ScDocument::DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, const S pTab->DeleteBroadcasters(rBlockPos, rTopPos.Col(), rTopPos.Row(), rTopPos.Row()+nLength-1); } -bool ScDocument::HasBroadcaster( SCTAB nTab, SCCOL nCol ) const -{ - const ScTable* pTab = FetchTable(nTab); - if (!pTab) - return false; - - return pTab->HasBroadcaster(nCol); -} - #if DEBUG_COLUMN_STORAGE void ScDocument::DumpFormulaGroups( SCTAB nTab, SCCOL nCol ) const { diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 4da81389a1ef..60b0311068d2 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -1173,17 +1173,6 @@ ScRange ScDPOutput::GetOutputRange( sal_Int32 nRegionType ) return ScRange(aStartPos.Col(), aStartPos.Row(), nTab, nTabEndCol, nTabEndRow, nTab); } -ScRange ScDPOutput::GetOutputRange() const -{ - using namespace ::com::sun::star::sheet; - - if (!bSizesValid) - return ScRange(ScAddress::INITIALIZE_INVALID); - - SCTAB nTab = aStartPos.Tab(); - return ScRange(aStartPos.Col(), aStartPos.Row(), nTab, nTabEndCol, nTabEndRow, nTab); -} - bool ScDPOutput::HasError() { CalcSizes(); diff --git a/sc/source/core/tool/typedstrdata.cxx b/sc/source/core/tool/typedstrdata.cxx index 97f571b88436..649ca160a224 100644 --- a/sc/source/core/tool/typedstrdata.cxx +++ b/sc/source/core/tool/typedstrdata.cxx @@ -92,11 +92,6 @@ ScTypedStrData::ScTypedStrData( const ScTypedStrData& rCpy ) : meStrType(rCpy.meStrType), mbIsDate( rCpy.mbIsDate ) {} -bool ScTypedStrData::IsStrData() const -{ - return meStrType != Value; -} - FindTypedStrData::FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens) : maVal(rVal), mbCaseSens(bCaseSens) {} diff --git a/sc/source/filter/inc/addressconverter.hxx b/sc/source/filter/inc/addressconverter.hxx index 4fabc8383874..52d3c5929cdc 100644 --- a/sc/source/filter/inc/addressconverter.hxx +++ b/sc/source/filter/inc/addressconverter.hxx @@ -120,15 +120,6 @@ struct BinRange BinAddress maFirst; BinAddress maLast; - inline explicit BinRange() {} - inline explicit BinRange( const BinAddress& rAddr ) : maFirst( rAddr ), maLast( rAddr ) {} - inline explicit BinRange( const BinAddress& rFirst, const BinAddress& rLast ) : maFirst( rFirst ), maLast( rLast ) {} - inline explicit BinRange( sal_Int32 nCol1, sal_Int32 nRow1, sal_Int32 nCol2, sal_Int32 nRow2 ) : - maFirst( nCol1, nRow1 ), maLast( nCol2, nRow2 ) {} - inline explicit BinRange( const css::table::CellAddress& rAddr ) : maFirst( rAddr ), maLast( rAddr ) {} - inline explicit BinRange( const css::table::CellAddress& rFirst, const css::table::CellAddress& rLast ) : maFirst( rFirst ), maLast( rLast ) {} - 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 ); }; @@ -339,31 +330,12 @@ public: @return true = Converted address is valid (no index overflow). */ bool convertToCellAddress( - css::table::CellAddress& orAddress, - const OUString& rString, - sal_Int16 nSheet, - bool bTrackOverflow ); - - /** Tries to convert the passed string to a single cell address. - - @param orAddress (out-parameter) Returns the converted cell address. - @param rString Cell address string in A1 notation. - @param nSheet Sheet index to be inserted into orAddress (will be checked). - @param bTrackOverflow true = Update the internal overflow flags, if - the address is outside of the supported sheet limits. - @return true = Converted address is valid (no index overflow). - */ - bool convertToCellAddress( ScAddress& orAddress, const OUString& rString, sal_Int16 nSheet, bool bTrackOverflow ); bool convertToCellAddress( - css::table::CellAddress& rAddress, - const char* pStr, sal_Int16 nSheet, bool bTrackOverflow ); - - bool convertToCellAddress( ScAddress& rAddress, const char* pStr, sal_Int16 nSheet, bool bTrackOverflow ); @@ -413,21 +385,6 @@ public: @return true = Converted address is valid (no index overflow). */ bool convertToCellAddress( - css::table::CellAddress& orAddress, - const BinAddress& rBinAddress, - sal_Int16 nSheet, - bool bTrackOverflow ); - - /** Tries to convert the passed address to a single cell address. - - @param orAddress (out-parameter) Returns the converted cell address. - @param rBinAddress Binary cell address struct. - @param nSheet Sheet index to be inserted into orAddress (will be checked). - @param bTrackOverflow true = Update the internal overflow flags, if - the address is outside of the supported sheet limits. - @return true = Converted address is valid (no index overflow). - */ - bool convertToCellAddress( ScAddress& orAddress, const BinAddress& rBinAddress, sal_Int16 nSheet, diff --git a/sc/source/filter/inc/defnamesbuffer.hxx b/sc/source/filter/inc/defnamesbuffer.hxx index 95b26d312902..da1024672e03 100644 --- a/sc/source/filter/inc/defnamesbuffer.hxx +++ b/sc/source/filter/inc/defnamesbuffer.hxx @@ -81,7 +81,6 @@ public: /** Returns the original name as imported from or exported to the file. */ const OUString& getUpcaseModelName() const; /** Returns an Any with a SingleReference or ComplexReference, or an empty Any. */ - css::uno::Any getReference( const css::table::CellAddress& rBaseAddr ) const; css::uno::Any getReference( const ScAddress& rBaseAddr ) const; protected: diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx index f30b354aba25..727c96c7f6d0 100644 --- a/sc/source/filter/inc/excrecds.hxx +++ b/sc/source/filter/inc/excrecds.hxx @@ -100,8 +100,6 @@ protected: inline ExcBoolRecord() : bVal( false ) {} public: - inline ExcBoolRecord( const bool bDefault ) : bVal( bDefault ) {} - virtual sal_Size GetLen() const override; }; diff --git a/sc/source/filter/inc/externallinkbuffer.hxx b/sc/source/filter/inc/externallinkbuffer.hxx index d22e91b18a41..b3430528f0e5 100644 --- a/sc/source/filter/inc/externallinkbuffer.hxx +++ b/sc/source/filter/inc/externallinkbuffer.hxx @@ -123,8 +123,6 @@ class LinkSheetRange { public: inline explicit LinkSheetRange() { setDeleted(); } - inline explicit LinkSheetRange( sal_Int32 nFirst, sal_Int32 nLast ) { setRange( nFirst, nLast ); } - inline explicit LinkSheetRange( sal_Int32 nDocLink, sal_Int32 nFirst, sal_Int32 nLast ) { setExternalRange( nDocLink, nFirst, nLast ); } /** Sets this struct to deleted state. */ void setDeleted(); diff --git a/sc/source/filter/inc/formulabase.hxx b/sc/source/filter/inc/formulabase.hxx index daaecebe67fa..c88d4fb48c60 100644 --- a/sc/source/filter/inc/formulabase.hxx +++ b/sc/source/filter/inc/formulabase.hxx @@ -654,10 +654,6 @@ public: @param bAbsolute True = adds dollar signs before column and row. */ static OUString generateAddress2dString( - const css::table::CellAddress& rAddress, - bool bAbsolute ); - - static OUString generateAddress2dString( const ScAddress& rAddress, bool bAbsolute ); diff --git a/sc/source/filter/inc/formulaparser.hxx b/sc/source/filter/inc/formulaparser.hxx index 8f654e323829..93ade65f49ea 100644 --- a/sc/source/filter/inc/formulaparser.hxx +++ b/sc/source/filter/inc/formulaparser.hxx @@ -105,20 +105,11 @@ public: /** Converts an OOXML formula string. */ ApiTokenSequence importFormula( - const css::table::CellAddress& rBaseAddr, - const OUString& rFormulaString ) const; - - ApiTokenSequence importFormula( const ScAddress& rBaseAddr, const OUString& rFormulaString ) const; /** Imports and converts a BIFF12 token array from the passed stream. */ ApiTokenSequence importFormula( - const css::table::CellAddress& rBaseAddr, - FormulaType eType, - SequenceInputStream& rStrm ) const; - - ApiTokenSequence importFormula( const ScAddress& rBaseAddr, FormulaType eType, SequenceInputStream& rStrm ) const; diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index 31bb32b84e4d..ecc0ac860630 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -263,7 +263,6 @@ struct ScHTMLSize SCCOL mnCols; SCROW mnRows; - inline explicit ScHTMLSize() : mnCols( 0 ), mnRows( 0 ) {} inline explicit ScHTMLSize( SCCOL nCols, SCROW nRows ) : mnCols( nCols ), mnRows( nRows ) {} inline void Set( SCCOL nCols, SCROW nRows ) diff --git a/sc/source/filter/inc/namebuff.hxx b/sc/source/filter/inc/namebuff.hxx index 4a551756af35..dc770d41d992 100644 --- a/sc/source/filter/inc/namebuff.hxx +++ b/sc/source/filter/inc/namebuff.hxx @@ -45,17 +45,12 @@ private: static sal_uInt32 MakeHashCode( const OUString& ); public: inline StringHashEntry( const OUString& ); - inline StringHashEntry(); inline void operator =( const sal_Char* ); inline void operator =( const OUString& ); inline void operator =( const StringHashEntry& ); inline bool operator ==( const StringHashEntry& ) const; }; -inline StringHashEntry::StringHashEntry() -{ -} - inline StringHashEntry::StringHashEntry( const OUString& r ) : aString( r ) { nHash = MakeHashCode( r ); @@ -197,13 +192,6 @@ private: // 0xFFFD -> should be in the same workbook, but not found bool bSWB; bool bLink; - Cont( const OUString& rFilePathAndName, const OUString& rTabName ) : - aFile( rFilePathAndName ), - aTab( rTabName ) - { - nTabNum = 0xFFFF; // -> table not created yet - bSWB = bLink = false; - } Cont( const OUString& rFilePathAndName, const OUString& rTabName, const bool bSameWB ) : aFile( rFilePathAndName ), diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx index 05fe4cb60ef9..48fed0944f82 100644 --- a/sc/source/filter/inc/orcusinterface.hxx +++ b/sc/source/filter/inc/orcusinterface.hxx @@ -479,48 +479,5 @@ public: void setStatusIndicator(const css::uno::Reference<css::task::XStatusIndicator>& rIndicator); }; -class ScOrcusTable : public orcus::spreadsheet::iface::import_table -{ -private: - SCTAB mnTab; - ScDocument& mrDoc; - ScOrcusAutoFilter maAutoFilter; - - ScRange maRange; - OUString maName; - -public: - ScOrcusTable(SCTAB nTab, ScDocument& rDoc); - virtual ~ScOrcusTable(); - - virtual orcus::spreadsheet::iface::import_auto_filter* get_auto_filter() override; - - virtual void set_identifier(size_t id) override; - - virtual void set_range(const char* p_ref, size_t n_ref) override; - - virtual void set_totals_row_count(size_t row_count) override; - - virtual void set_name(const char* p, size_t n) override; - - virtual void set_display_name(const char* p, size_t n) override; - - virtual void set_column_count(size_t n) override; - - virtual void set_column_identifier(size_t id) override; - virtual void set_column_name(const char* p, size_t n) override; - virtual void set_column_totals_row_label(const char* p, size_t n) override; - virtual void set_column_totals_row_function(orcus::spreadsheet::totals_row_function_t func) override; - virtual void commit_column() override; - - virtual void set_style_name(const char* p, size_t n) override; - virtual void set_style_show_first_column(bool b) override; - virtual void set_style_show_last_column(bool b) override; - virtual void set_style_show_row_stripes(bool b) override; - virtual void set_style_show_column_stripes(bool b) override; - - virtual void commit() override; -}; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx index 108d2e5c0a9d..9d5c54e8cb9d 100644 --- a/sc/source/filter/inc/sheetdatabuffer.hxx +++ b/sc/source/filter/inc/sheetdatabuffer.hxx @@ -56,10 +56,8 @@ struct CellFormulaModel explicit CellFormulaModel(); /** Returns true, if the passed cell address is valid for an array formula. */ - bool isValidArrayRef( const css::table::CellAddress& rCellAddr ); bool isValidArrayRef( const ScAddress& rCellAddr ); /** Returns true, if the passed cell address is valid for a shared formula. */ - bool isValidSharedRef( const css::table::CellAddress& rCellAddr ); bool isValidSharedRef( const ScAddress& rCellAddr ); }; @@ -126,9 +124,6 @@ public: void setDateCell( const CellModel& rModel, const OUString& rDateString ); void createSharedFormula( - const css::table::CellAddress& rRange, - const ApiTokenSequence& rTokens); - void createSharedFormula( const ScAddress& rRange, const ApiTokenSequence& rTokens); @@ -147,10 +142,6 @@ public: void setMergedRange( const css::table::CellRangeAddress& rRange ); /** Sets a standard number format (constant from com.sun.star.util.NumberFormat) to the specified cell. */ void setStandardNumFmt( - const css::table::CellAddress& rCellAddr, - sal_Int16 nStdNumFmt ); - - void setStandardNumFmt( const ScAddress& rCellAddr, sal_Int16 nStdNumFmt ); @@ -162,10 +153,6 @@ public: /** Sets the passed formula token array into a cell. */ void setCellFormula( - const css::table::CellAddress& rCellAddr, - const ApiTokenSequence& rTokens ); - - void setCellFormula( const ScAddress& rCellAddr, const ApiTokenSequence& rTokens ); private: @@ -173,7 +160,6 @@ private: /** Creates a formula token array representing the shared formula with the passed identifier. */ - ApiTokenSequence resolveSharedFormula( const css::table::CellAddress& rMapKey ) const; ApiTokenSequence resolveSharedFormula( const ScAddress& rMapKey ) const; /** Inserts the passed array formula into the sheet. */ @@ -234,9 +220,7 @@ private: sal_Int32 mnHorAlign; /// Horizontal alignment in the range. explicit MergedRange( const css::table::CellRangeAddress& rRange ); - explicit MergedRange( const css::table::CellAddress& rAddress, sal_Int32 nHorAlign ); explicit MergedRange( const ScAddress& rAddress, sal_Int32 nHorAlign ); - bool tryExpand( const css::table::CellAddress& rAddress, sal_Int32 nHorAlign ); bool tryExpand( const ScAddress& rAddress, sal_Int32 nHorAlign ); }; typedef ::std::list< MergedRange > MergedRangeList; diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx index 1b5480945023..b4813386cce8 100644 --- a/sc/source/filter/inc/stylesbuffer.hxx +++ b/sc/source/filter/inc/stylesbuffer.hxx @@ -901,10 +901,8 @@ public: void writeFillToPropertyMap( PropertyMap& rPropMap, sal_Int32 nFillId ) const; /** Writes the cell formatting attributes of the specified XF to the passed property set. */ - void writeCellXfToPropertySet( PropertySet& rPropSet, sal_Int32 nXfId ) const; - void writeCellXfToDoc( ScDocumentImport& rDoc, const css::table::CellRangeAddress& rRange, sal_Int32 nXfId ) const; + void writeCellXfToDoc( ScDocumentImport& rDoc, const css::table::CellRangeAddress& rRange, sal_Int32 nXfId ) const; - bool hasBorder( sal_Int32 nBorderId ) const; private: typedef RefVector< Font > FontVector; typedef RefVector< Border > BorderVector; diff --git a/sc/source/filter/inc/tool.h b/sc/source/filter/inc/tool.h index 9c47e620b39b..7ae32136a521 100644 --- a/sc/source/filter/inc/tool.h +++ b/sc/source/filter/inc/tool.h @@ -62,12 +62,6 @@ public: pAttr = &rAttr; } - FormIdent( sal_uInt8 nFormat, sal_uInt8 nSt ) - { - nStamp = MAKE_STAMP( nFormat, nSt ); - pAttr = NULL; - } - StampTyp GetStamp( void ) const { return nStamp; diff --git a/sc/source/filter/inc/worksheethelper.hxx b/sc/source/filter/inc/worksheethelper.hxx index 20be70ad824b..a00e4e48c30c 100644 --- a/sc/source/filter/inc/worksheethelper.hxx +++ b/sc/source/filter/inc/worksheethelper.hxx @@ -250,7 +250,6 @@ public: void setVmlDrawingPath( const OUString& rVmlDrawingPath ); /** Extends the used area of this sheet by the passed cell position. */ - void extendUsedArea( const css::table::CellAddress& rAddress ); void extendUsedArea( const ScAddress& rAddress ); /** Extends the used area of this sheet by the passed cell range. */ void extendUsedArea( const css::table::CellRangeAddress& rRange ); @@ -278,19 +277,13 @@ public: void setRowModel( const RowModel& rModel ); /** Inserts a value cell directly into the Calc sheet. */ - void putValue( const css::table::CellAddress& rAddress, double fValue ); void putValue( const ScAddress& rAddress, double fValue ); /** Inserts a string cell directly into the Calc sheet. */ - void putString( const css::table::CellAddress& rAddress, const OUString& rText ); void putString( const ScAddress& rAddress, const OUString& rText ); /** Inserts a rich-string cell directly into the Calc sheet. */ void putRichString( - const css::table::CellAddress& rAddress, - const RichString& rString, const oox::xls::Font* pFirstPortionFont ); - - void putRichString( const ScAddress& rAddress, const RichString& rString, const oox::xls::Font* pFirstPortionFont ); @@ -307,29 +300,19 @@ public: /** Final import of drawing objects. Has to be called after all content has been imported */ void finalizeDrawingImport(); - void setCellFormula( const css::table::CellAddress& rTokenAddress, const OUString& ); void setCellFormula( const ScAddress& rTokenAddress, const OUString& ); void setCellFormula( - const css::table::CellAddress& rAddr, sal_Int32 nSharedId, - const OUString& rCellValue, sal_Int32 nValueType ); - void setCellFormula( const ScAddress& rAddr, sal_Int32 nSharedId, const OUString& rCellValue, sal_Int32 nValueType ); - void setCellArrayFormula( const css::table::CellRangeAddress& rRangeAddress, const css::table::CellAddress& rTokenAddress, const OUString& ); void setCellArrayFormula( const css::table::CellRangeAddress& rRangeAddress, const ScAddress& rTokenAddress, const OUString& ); void createSharedFormulaMapEntry( - const css::table::CellAddress& rAddress, - sal_Int32 nSharedId, const OUString& rTokens ); - void createSharedFormulaMapEntry( const ScAddress& rAddress, sal_Int32 nSharedId, const OUString& rTokens ); void setCellFormulaValue( - const css::table::CellAddress& rAddress, const OUString& rValueStr, sal_Int32 nCellType ); - void setCellFormulaValue( const ScAddress& rAddress, const OUString& rValueStr, sal_Int32 nCellType ); private: diff --git a/sc/source/filter/inc/xladdress.hxx b/sc/source/filter/inc/xladdress.hxx index b0c65a375fc1..1723c8aa6925 100644 --- a/sc/source/filter/inc/xladdress.hxx +++ b/sc/source/filter/inc/xladdress.hxx @@ -63,7 +63,6 @@ struct XclRange inline explicit XclRange( ScAddress::Uninitialized e ) : maFirst( e ), maLast( e ) {} inline explicit XclRange() {} inline explicit XclRange( const XclAddress& rPos ) : maFirst( rPos ), maLast( rPos ) {} - inline explicit XclRange( const XclAddress& rFirst, const XclAddress& rLast ) : maFirst( rFirst ), maLast( rLast ) {} inline explicit XclRange( sal_uInt16 nCol1, sal_uInt32 nRow1, sal_uInt16 nCol2, sal_uInt32 nRow2 ) : maFirst( nCol1, nRow1 ), maLast( nCol2, nRow2 ) {} diff --git a/sc/source/filter/oox/addressconverter.cxx b/sc/source/filter/oox/addressconverter.cxx index 6b4cc34c8eb3..5c434c5b6cdb 100644 --- a/sc/source/filter/oox/addressconverter.cxx +++ b/sc/source/filter/oox/addressconverter.cxx @@ -389,24 +389,6 @@ bool AddressConverter::convertToCellAddressUnchecked( return bRes; } -bool AddressConverter::convertToCellAddress( CellAddress& orAddress, - const OUString& rString, sal_Int16 nSheet, bool bTrackOverflow ) -{ - return - convertToCellAddressUnchecked( orAddress, rString, nSheet ) && - checkCellAddress( orAddress, bTrackOverflow ); -} - -bool AddressConverter::convertToCellAddress( - css::table::CellAddress& rAddress, - const char* pStr, sal_Int16 nSheet, bool bTrackOverflow ) -{ - if (!convertToCellAddressUnchecked(rAddress, pStr, nSheet)) - return false; - - return checkCellAddress(rAddress, bTrackOverflow); -} - bool AddressConverter::convertToCellAddress( ScAddress& orAddress, const OUString& rString, sal_Int16 nSheet, bool bTrackOverflow ) { @@ -454,13 +436,6 @@ void AddressConverter::convertToCellAddressUnchecked( ScAddress& orAddress, orAddress.SetRow(rBinAddress.mnRow); } -bool AddressConverter::convertToCellAddress( CellAddress& orAddress, - const BinAddress& rBinAddress, sal_Int16 nSheet, bool bTrackOverflow ) -{ - convertToCellAddressUnchecked( orAddress, rBinAddress, nSheet ); - return checkCellAddress( orAddress, bTrackOverflow ); -} - bool AddressConverter::convertToCellAddress( ScAddress& orAddress, const BinAddress& rBinAddress, sal_Int16 nSheet, bool bTrackOverflow ) { diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx index e22d4b60409f..feb6c2f166cd 100644 --- a/sc/source/filter/oox/defnamesbuffer.cxx +++ b/sc/source/filter/oox/defnamesbuffer.cxx @@ -145,17 +145,6 @@ void lclConvertRefFlags( sal_Int32& ornFlags, sal_Int32& ornAbsPos, sal_Int32& o } } -void lclConvertSingleRefFlags( SingleReference& orApiRef, const CellAddress& rBaseAddr, bool bColRel, bool bRowRel ) -{ - using namespace ::com::sun::star::sheet::ReferenceFlags; - lclConvertRefFlags( - orApiRef.Flags, orApiRef.Column, orApiRef.RelativeColumn, - rBaseAddr.Column, COLUMN_RELATIVE, bColRel ); - lclConvertRefFlags( - orApiRef.Flags, orApiRef.Row, orApiRef.RelativeRow, - rBaseAddr.Row, ROW_RELATIVE, bRowRel ); -} - void lclConvertSingleRefFlags( SingleReference& orApiRef, const ScAddress& rBaseAddr, bool bColRel, bool bRowRel ) { using namespace ::com::sun::star::sheet::ReferenceFlags; @@ -167,26 +156,6 @@ void lclConvertSingleRefFlags( SingleReference& orApiRef, const ScAddress& rBase rBaseAddr.Row(), ROW_RELATIVE, bRowRel ); } -Any lclConvertReference( const Any& rRefAny, const CellAddress& rBaseAddr, sal_uInt16 nRelFlags ) -{ - if( rRefAny.has< SingleReference >() && !getFlag( nRelFlags, BIFF_REFFLAG_COL2REL ) && !getFlag( nRelFlags, BIFF_REFFLAG_ROW2REL ) ) - { - SingleReference aApiRef; - rRefAny >>= aApiRef; - lclConvertSingleRefFlags( aApiRef, rBaseAddr, getFlag( nRelFlags, BIFF_REFFLAG_COL1REL ), getFlag( nRelFlags, BIFF_REFFLAG_ROW1REL ) ); - return Any( aApiRef ); - } - if( rRefAny.has< ComplexReference >() ) - { - ComplexReference aApiRef; - rRefAny >>= aApiRef; - lclConvertSingleRefFlags( aApiRef.Reference1, rBaseAddr, getFlag( nRelFlags, BIFF_REFFLAG_COL1REL ), getFlag( nRelFlags, BIFF_REFFLAG_ROW1REL ) ); - lclConvertSingleRefFlags( aApiRef.Reference2, rBaseAddr, getFlag( nRelFlags, BIFF_REFFLAG_COL2REL ), getFlag( nRelFlags, BIFF_REFFLAG_ROW2REL ) ); - return Any( aApiRef ); - } - return Any(); -} - Any lclConvertReference( const Any& rRefAny, const ScAddress& rBaseAddr, sal_uInt16 nRelFlags ) { if( rRefAny.has< SingleReference >() && !getFlag( nRelFlags, BIFF_REFFLAG_COL2REL ) && !getFlag( nRelFlags, BIFF_REFFLAG_ROW2REL ) ) @@ -231,34 +200,6 @@ const OUString& DefinedNameBase::getUpcaseModelName() const return maUpModelName; } -Any DefinedNameBase::getReference( const CellAddress& rBaseAddr ) const -{ - if( maRefAny.hasValue() && (maModel.maName.getLength() >= 2) && (maModel.maName[ 0 ] == '\x01') ) - { - sal_Unicode cFlagsChar = getUpcaseModelName()[ 1 ]; - if( ('A' <= cFlagsChar) && (cFlagsChar <= 'P') ) - { - sal_uInt16 nRelFlags = static_cast< sal_uInt16 >( cFlagsChar - 'A' ); - if( maRefAny.has< ExternalReference >() ) - { - ExternalReference aApiExtRef; - maRefAny >>= aApiExtRef; - Any aRefAny = lclConvertReference( aApiExtRef.Reference, rBaseAddr, nRelFlags ); - if( aRefAny.hasValue() ) - { - aApiExtRef.Reference <<= aRefAny; - return Any( aApiExtRef ); - } - } - else - { - return lclConvertReference( maRefAny, rBaseAddr, nRelFlags ); - } - } - } - return Any(); -} - Any DefinedNameBase::getReference( const ScAddress& rBaseAddr ) const { if( maRefAny.hasValue() && (maModel.maName.getLength() >= 2) && (maModel.maName[ 0 ] == '\x01') ) diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index e0b445f075fa..db721d5bd201 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -1622,11 +1622,6 @@ FormulaProcessorBase::FormulaProcessorBase( const WorkbookHelper& rHelper ) : { } -OUString FormulaProcessorBase::generateAddress2dString( const CellAddress& rAddress, bool bAbsolute ) -{ - return generateAddress2dString( BinAddress( rAddress ), bAbsolute ); -} - OUString FormulaProcessorBase::generateAddress2dString( const ScAddress& rAddress, bool bAbsolute ) { return generateAddress2dString( BinAddress( rAddress ), bAbsolute ); diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx index c09cd0065061..a78b84b69123 100644 --- a/sc/source/filter/oox/formulaparser.cxx +++ b/sc/source/filter/oox/formulaparser.cxx @@ -2557,16 +2557,6 @@ FormulaParser::~FormulaParser() { } -ApiTokenSequence FormulaParser::importFormula( const CellAddress& rBaseAddress, const OUString& rFormulaString ) const -{ - return mxImpl->importOoxFormula( rBaseAddress, rFormulaString ); -} - -ApiTokenSequence FormulaParser::importFormula( const CellAddress& rBaseAddress, FormulaType eType, SequenceInputStream& rStrm ) const -{ - return mxImpl->importBiff12Formula( rBaseAddress, eType, rStrm ); -} - ApiTokenSequence FormulaParser::importFormula( const ScAddress& rBaseAddress, const OUString& rFormulaString ) const { return mxImpl->importOoxFormulaSc( rBaseAddress, rFormulaString ); diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index bad8050d035a..3182088fc7c2 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -80,14 +80,6 @@ CellFormulaModel::CellFormulaModel() : { } -bool CellFormulaModel::isValidArrayRef( const CellAddress& rCellAddr ) -{ - return - (maFormulaRef.Sheet == rCellAddr.Sheet) && - (maFormulaRef.StartColumn == rCellAddr.Column) && - (maFormulaRef.StartRow == rCellAddr.Row); -} - bool CellFormulaModel::isValidArrayRef( const ScAddress& rCellAddr ) { return @@ -96,14 +88,6 @@ bool CellFormulaModel::isValidArrayRef( const ScAddress& rCellAddr ) (maFormulaRef.StartRow == rCellAddr.Row() ); } -bool CellFormulaModel::isValidSharedRef( const CellAddress& rCellAddr ) -{ - return - (maFormulaRef.Sheet == rCellAddr.Sheet) && - (maFormulaRef.StartColumn <= rCellAddr.Column) && (rCellAddr.Column <= maFormulaRef.EndColumn) && - (maFormulaRef.StartRow <= rCellAddr.Row) && (rCellAddr.Row <= maFormulaRef.EndRow); -} - bool CellFormulaModel::isValidSharedRef( const ScAddress& rCellAddr ) { return @@ -233,14 +217,6 @@ void SheetDataBuffer::setDateCell( const CellModel& rModel, const OUString& rDat setValueCell( rModel, fValue ); } -void SheetDataBuffer::createSharedFormula(const CellAddress& rAddr, const ApiTokenSequence& rTokens) -{ - BinAddress aAddr(rAddr); - maSharedFormulas[aAddr] = rTokens; - if( mbPendingSharedFmla ) - setCellFormula( maSharedFmlaAddr, resolveSharedFormula( maSharedBaseAddr ) ); -} - void SheetDataBuffer::createSharedFormula(const ScAddress& rAddr, const ApiTokenSequence& rTokens) { BinAddress aAddr(rAddr); @@ -340,21 +316,6 @@ void SheetDataBuffer::setMergedRange( const CellRangeAddress& rRange ) maMergedRanges.push_back( MergedRange( rRange ) ); } -void SheetDataBuffer::setStandardNumFmt( const CellAddress& rCellAddr, sal_Int16 nStdNumFmt ) -{ - try - { - Reference< XNumberFormatsSupplier > xNumFmtsSupp( getDocument(), UNO_QUERY_THROW ); - Reference< XNumberFormatTypes > xNumFmtTypes( xNumFmtsSupp->getNumberFormats(), UNO_QUERY_THROW ); - sal_Int32 nIndex = xNumFmtTypes->getStandardFormat( nStdNumFmt, Locale() ); - PropertySet aPropSet( getCell( rCellAddr ) ); - aPropSet.setProperty( PROP_NumberFormat, nIndex ); - } - catch( Exception& ) - { - } -} - void SheetDataBuffer::setStandardNumFmt( const ScAddress& rCellAddr, sal_Int16 nStdNumFmt ) { try @@ -580,29 +541,12 @@ SheetDataBuffer::MergedRange::MergedRange( const CellRangeAddress& rRange ) : { } -SheetDataBuffer::MergedRange::MergedRange( const CellAddress& rAddress, sal_Int32 nHorAlign ) : - maRange( rAddress.Sheet, rAddress.Column, rAddress.Row, rAddress.Column, rAddress.Row ), - mnHorAlign( nHorAlign ) -{ -} - SheetDataBuffer::MergedRange::MergedRange( const ScAddress& rAddress, sal_Int32 nHorAlign ) : maRange( rAddress.Tab(), rAddress.Col(), rAddress.Row(), rAddress.Col(), rAddress.Row() ), mnHorAlign( nHorAlign ) { } -bool SheetDataBuffer::MergedRange::tryExpand( const CellAddress& rAddress, sal_Int32 nHorAlign ) -{ - if( (mnHorAlign == nHorAlign) && (maRange.StartRow == rAddress.Row) && - (maRange.EndRow == rAddress.Row) && (maRange.EndColumn + 1 == rAddress.Column) ) - { - ++maRange.EndColumn; - return true; - } - return false; -} - bool SheetDataBuffer::MergedRange::tryExpand( const ScAddress& rAddress, sal_Int32 nHorAlign ) { if( (mnHorAlign == nHorAlign) && (maRange.StartRow == rAddress.Row() ) && @@ -614,14 +558,6 @@ bool SheetDataBuffer::MergedRange::tryExpand( const ScAddress& rAddress, sal_Int return false; } -void SheetDataBuffer::setCellFormula( const CellAddress& rCellAddr, const ApiTokenSequence& rTokens ) -{ - if( rTokens.hasElements() ) - { - putFormulaTokens( rCellAddr, rTokens ); - } -} - void SheetDataBuffer::setCellFormula( const ScAddress& rCellAddr, const ApiTokenSequence& rTokens ) { if( rTokens.hasElements() ) @@ -631,13 +567,6 @@ void SheetDataBuffer::setCellFormula( const ScAddress& rCellAddr, const ApiToken } -ApiTokenSequence SheetDataBuffer::resolveSharedFormula( const CellAddress& rAddr ) const -{ - BinAddress aAddr(rAddr); - ApiTokenSequence aTokens = ContainerHelper::getMapElement( maSharedFormulas, aAddr, ApiTokenSequence() ); - return aTokens; -} - ApiTokenSequence SheetDataBuffer::resolveSharedFormula( const ScAddress& rAddr ) const { BinAddress aAddr(rAddr); diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index f5cc9348bceb..6b056a08fd55 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -3180,12 +3180,6 @@ bool operator==( const Xf& rXf1, const Xf& rXf2 ) return false; } -void StylesBuffer::writeCellXfToPropertySet( PropertySet& rPropSet, sal_Int32 nXfId ) const -{ - if( Xf* pXf = maCellXfs.get( nXfId ).get() ) - pXf->writeToPropertySet( rPropSet ); -} - void StylesBuffer::writeCellXfToDoc( ScDocumentImport& rDoc, const table::CellRangeAddress& rRange, sal_Int32 nXfId ) const { @@ -3196,12 +3190,6 @@ void StylesBuffer::writeCellXfToDoc( pXf->writeToDoc(rDoc, rRange); } -bool StylesBuffer::hasBorder( sal_Int32 nBorderId ) const -{ - Border* pBorder = maBorders.get( nBorderId ).get(); - return pBorder && pBorder->hasBorder(); -} - } // namespace xls } // namespace oox diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 927b6a0d5caa..cda819bafa0f 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -1557,11 +1557,6 @@ void WorksheetHelper::setVmlDrawingPath( const OUString& rVmlDrawingPath ) mrSheetGlob.setVmlDrawingPath( rVmlDrawingPath ); } -void WorksheetHelper::extendUsedArea( const CellAddress& rAddress ) -{ - mrSheetGlob.extendUsedArea( rAddress ); -} - void WorksheetHelper::extendUsedArea( const ScAddress& rAddress ) { mrSheetGlob.extendUsedArea( rAddress ); @@ -1602,54 +1597,23 @@ void WorksheetHelper::setRowModel( const RowModel& rModel ) mrSheetGlob.setRowModel( rModel ); } -void WorksheetHelper::putValue( const CellAddress& rAddress, double fValue ) -{ - ScAddress aAddress; - ScUnoConversion::FillScAddress( aAddress, rAddress ); - getDocImport().setNumericCell(aAddress, fValue); -} - void WorksheetHelper::putValue( const ScAddress& rAddress, double fValue ) { getDocImport().setNumericCell(rAddress, fValue); } void WorksheetHelper::setCellFormulaValue( - const css::table::CellAddress& rAddress, const OUString& rValueStr, sal_Int32 nCellType ) -{ - getFormulaBuffer().setCellFormulaValue(rAddress, rValueStr, nCellType); -} - -void WorksheetHelper::setCellFormulaValue( const ScAddress& rAddress, const OUString& rValueStr, sal_Int32 nCellType ) { getFormulaBuffer().setCellFormulaValue(rAddress, rValueStr, nCellType); } -void WorksheetHelper::putString( const CellAddress& rAddress, const OUString& rText ) -{ - ScAddress aAddress; - ScUnoConversion::FillScAddress( aAddress, rAddress ); - if ( !rText.isEmpty() ) - getDocImport().setStringCell(aAddress, rText); -} - void WorksheetHelper::putString( const ScAddress& rAddress, const OUString& rText ) { if ( !rText.isEmpty() ) getDocImport().setStringCell(rAddress, rText); } -void WorksheetHelper::putRichString( const CellAddress& rAddress, const RichString& rString, const oox::xls::Font* pFirstPortionFont ) -{ - ScEditEngineDefaulter& rEE = getEditEngine(); - - // The cell will own the text object instance returned from convert(). - ScAddress aAddress; - ScUnoConversion::FillScAddress( aAddress, rAddress ); - getDocImport().setEditCell(aAddress, rString.convert(rEE, pFirstPortionFont)); -} - void WorksheetHelper::putRichString( const ScAddress& rAddress, const RichString& rString, const oox::xls::Font* pFirstPortionFont ) { ScEditEngineDefaulter& rEE = getEditEngine(); @@ -1691,47 +1655,24 @@ void WorksheetHelper::finalizeDrawingImport() mrSheetGlob.finalizeDrawingImport(); } -void WorksheetHelper::setCellFormula( const css::table::CellAddress& rTokenAddress, const OUString& rTokenStr ) -{ - getFormulaBuffer().setCellFormula( rTokenAddress, rTokenStr ); -} - void WorksheetHelper::setCellFormula( const ScAddress& rTokenAddress, const OUString& rTokenStr ) { getFormulaBuffer().setCellFormula( rTokenAddress, rTokenStr ); } void WorksheetHelper::setCellFormula( - const css::table::CellAddress& rAddr, sal_Int32 nSharedId, - const OUString& rCellValue, sal_Int32 nValueType ) -{ - getFormulaBuffer().setCellFormula(rAddr, nSharedId, rCellValue, nValueType); -} - -void WorksheetHelper::setCellFormula( const ScAddress& rAddr, sal_Int32 nSharedId, const OUString& rCellValue, sal_Int32 nValueType ) { getFormulaBuffer().setCellFormula(rAddr, nSharedId, rCellValue, nValueType); } -void WorksheetHelper::setCellArrayFormula( const css::table::CellRangeAddress& rRangeAddress, const css::table::CellAddress& rTokenAddress, const OUString& rTokenStr ) -{ - getFormulaBuffer().setCellArrayFormula( rRangeAddress, rTokenAddress, rTokenStr ); -} - void WorksheetHelper::setCellArrayFormula( const css::table::CellRangeAddress& rRangeAddress, const ScAddress& rTokenAddress, const OUString& rTokenStr ) { getFormulaBuffer().setCellArrayFormula( rRangeAddress, rTokenAddress, rTokenStr ); } void WorksheetHelper::createSharedFormulaMapEntry( - const table::CellAddress& rAddress, sal_Int32 nSharedId, const OUString& rTokens ) -{ - getFormulaBuffer().createSharedFormulaMapEntry(rAddress, nSharedId, rTokens); -} - -void WorksheetHelper::createSharedFormulaMapEntry( const ScAddress& rAddress, sal_Int32 nSharedId, const OUString& rTokens ) { getFormulaBuffer().createSharedFormulaMapEntry(rAddress, nSharedId, rTokens); diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index 0bfe90f4e6cd..e8a2dba67ade 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -1255,138 +1255,4 @@ void ScOrcusAutoFilter::commit() SAL_INFO("sc.orcus.autofilter", "commit"); } -ScOrcusTable::ScOrcusTable(SCTAB nTab, ScDocument& rDoc): - mnTab(nTab), - mrDoc(rDoc), - maAutoFilter(rDoc) -{ -} - -ScOrcusTable::~ScOrcusTable() -{ -} - -os::iface::import_auto_filter* ScOrcusTable::get_auto_filter() -{ - return &maAutoFilter; -} - -void ScOrcusTable::set_identifier(size_t id) -{ - SAL_INFO("sc.orcus.table", "set_identifier :" << id); -} - -namespace { - -std::ostream& operator<<(std::ostream& rStrm, const ScAddress& rAddr) -{ - rStrm << "Col: " << rAddr.Col() << ", Row: " << rAddr.Row() << ", Tab: " << rAddr.Tab(); - return rStrm; -} - -std::ostream& operator<<(std::ostream& rStrm, const ScRange& rRange) -{ - rStrm << "aStart: " << rRange.aStart << std::endl; - rStrm << "aEnd: " << rRange.aEnd; - return rStrm; -} - -} - -void ScOrcusTable::set_range(const char* p_ref, size_t n_ref) -{ - OUString aRange(p_ref, n_ref, RTL_TEXTENCODING_UTF8); - SAL_INFO("sc.orcus.table", "set_range: " << aRange); - - maRange.Parse(aRange); - SAL_INFO("sc.orcus.table", "set_range translated range: " << maRange); -} - -void ScOrcusTable::set_totals_row_count(size_t row_count) -{ - SAL_INFO("sc.orcus.table", "set_totals_row_count: " << row_count); -} - -void ScOrcusTable::set_name(const char* p, size_t n) -{ - maName = OUString(p, n, RTL_TEXTENCODING_UTF8); - SAL_INFO("sc.orcus.table", "set_name: " << maName); -} - -void ScOrcusTable::set_display_name(const char* p, size_t n) -{ - OUString aName(p, n, RTL_TEXTENCODING_UTF8); - SAL_INFO("sc.orcus.table", "set_display_name: " << aName); -} - -void ScOrcusTable::set_column_count(size_t n) -{ - SAL_INFO("sc.orcus.table", "set_column_count: " << n); -} - -void ScOrcusTable::set_column_identifier(size_t id) -{ - SAL_INFO("sc.orcus.table", "set_column_identifier: " << id); -} - -void ScOrcusTable::set_column_name(const char* p, size_t n) -{ - OUString aName(p, n, RTL_TEXTENCODING_UTF8); - SAL_INFO("sc.orcus.table", "set_column_name: " << aName); -} - -void ScOrcusTable::set_column_totals_row_label(const char* p, size_t n) -{ - OUString aLabel(p, n, RTL_TEXTENCODING_UTF8); - SAL_INFO("sc.orcus.table", "set_column_totals_row_label: " << aLabel); -} - -void ScOrcusTable::set_column_totals_row_function(os::totals_row_function_t ) -{ - SAL_INFO("sc.orcus.table", "set_column_totals_row_function"); -} - -void ScOrcusTable::commit_column() -{ - SAL_INFO("sc.orcus.table", "commit_column"); -} - -void ScOrcusTable::set_style_name(const char* p, size_t n) -{ - OUString aName(p, n, RTL_TEXTENCODING_UTF8); - SAL_INFO("sc.orcus.table", "set_style_name: " << aName); -} - -void ScOrcusTable::set_style_show_first_column(bool b) -{ - SAL_INFO("sc.orcus.table", "set_style_show_first_column: " << b); -} - -void ScOrcusTable::set_style_show_last_column(bool b) -{ - SAL_INFO("sc.orcus.table", "set_style_show_last_column: " << b); -} - -void ScOrcusTable::set_style_show_row_stripes(bool b) -{ - SAL_INFO("sc.orcus.table", "set_style_show_row_stripes: " << b); -} - -void ScOrcusTable::set_style_show_column_stripes(bool b) -{ - SAL_INFO("sc.orcus.table", "set_style_show_column_stripes: " << b); -} - -void ScOrcusTable::commit() -{ - SAL_INFO("sc.orcus.table", "commit"); - - ScDBData* pDBData = new ScDBData(maName, mnTab, - maRange.aStart.Col(), maRange.aStart.Row(), - maRange.aEnd.Col(), maRange.aEnd.Row()); - - if(!mrDoc.GetDBCollection()->getNamedDBs().insert(pDBData)) - delete pDBData; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/xml/XMLConverter.hxx b/sc/source/filter/xml/XMLConverter.hxx index 81b5519fa8a3..8c8ffe542865 100644 --- a/sc/source/filter/xml/XMLConverter.hxx +++ b/sc/source/filter/xml/XMLConverter.hxx @@ -37,8 +37,7 @@ class DateTime; class ScXMLConverter { public: - inline ScXMLConverter() {} - inline ~ScXMLConverter() {} + ScXMLConverter() = delete; // helper methods static ScDocument* GetScDocument( diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx index 2ad497b959fd..15b339e4cdec 100644 --- a/sc/source/filter/xml/XMLStylesImportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx @@ -36,7 +36,6 @@ struct ScMyStyleNumberFormat OUString sStyleName; sal_Int32 nNumberFormat; - ScMyStyleNumberFormat() : nNumberFormat(-1) {} explicit ScMyStyleNumberFormat(const OUString& rStyleName) : sStyleName(rStyleName), nNumberFormat(-1) {} ScMyStyleNumberFormat(const OUString& rStyleName, const sal_Int32 nFormat) : diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 75904774d971..17eb94d2ca80 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -737,29 +737,6 @@ ScAccessibleTextData* ScAccessibleCellTextData::Clone() const return new ScAccessibleCellTextData( mpViewShell, aCellPos, meSplitPos, mpAccessibleCell ); } -void ScAccessibleCellTextData::GetCellText(const ScAddress& rCellPos, OUString& rText) -{ -// #104893#; don't use the input string -// ScCellTextData::GetCellText(rCellPos, rText); - ScDocument& rDoc = pDocShell->GetDocument(); - // #104893#; use the displayed string - rText = rDoc.GetString(rCellPos.Col(), rCellPos.Row(), rCellPos.Tab()); - if (mpViewShell) - { - const ScViewOptions& aOptions = mpViewShell->GetViewData().GetOptions(); - ScRefCellValue aCell(rDoc, ScAddress(rCellPos.Col(), rCellPos.Row(), rCellPos.Tab())); - if (aCell.meType == CELLTYPE_FORMULA && aOptions.GetOption( VOPT_FORMULAS )) - { - aCell.mpFormula->GetFormula(rText); - } - else if (!aOptions.GetOption( VOPT_NULLVALS )) - { - if ((aCell.meType == CELLTYPE_VALUE || aCell.meType == CELLTYPE_FORMULA) && aCell.getValue() == 0.0) - rText.clear(); - } - } -} - SvxTextForwarder* ScAccessibleCellTextData::GetTextForwarder() { ScCellTextData::GetTextForwarder(); // creates Forwarder and EditEngine diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 1cfb393587a9..2bf014a9ff09 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1528,13 +1528,6 @@ void ScTabStops::CycleFocus( bool bReverse ) // else : all controls are disabled, so can't do anything } -vcl::Window* ScTabStops::GetCurrentControl() -{ - if ( mnCurTabStop >= maControls.size() ) - return nullptr; - return maControls[mnCurTabStop]; -} - void ScTabStops::clear() { mnCurTabStop = 0; diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 471ff0086707..6d31312bc42d 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1455,76 +1455,6 @@ static FormulaToken* convertToToken( ScDocument* pHostDoc, ScDocument* pSrcDoc, return nullptr; } -template<class T> -struct ColumnBatch -{ - ScDocument* mpHostDoc; - ScDocument* mpSrcDoc; - - std::vector<T> maStorage; - CellType meType1; - CellType meType2; - SCROW mnRowStart; - - ColumnBatch( ScDocument* pHostDoc, ScDocument* pSrcDoc, CellType eType1, CellType eType2 ) : - mpHostDoc(pHostDoc), - mpSrcDoc(pSrcDoc), - meType1(eType1), - meType2(eType2), - mnRowStart(-1) {} - - void update(ScRefCellValue& raCell, const SCCOL nCol, const SCROW nRow, ScMatrixRef& xMat) - { - if (raCell.meType == meType1 || raCell.meType == meType2) - { - if (mnRowStart < 0) - mnRowStart = nRow; - maStorage.push_back(getValue(raCell)); - } - else - { - flush(nCol, xMat); - } - } - - void flush(const SCCOL nCol, ScMatrixRef& xMat) - { - if (maStorage.empty()) - return; - putValues(xMat, nCol); - mnRowStart = -1; - maStorage.clear(); - } - - T getValue(ScRefCellValue& raCell) const; - void putValues(ScMatrixRef& xMat, const SCCOL nCol) const; -}; - -template<> -inline svl::SharedString ColumnBatch<svl::SharedString>::getValue(ScRefCellValue& rCell) const -{ - OUString aStr = rCell.getString(mpSrcDoc); - return mpHostDoc->GetSharedStringPool().intern(aStr); -} - -template<class T> -inline T ColumnBatch<T>::getValue(ScRefCellValue& raCell) const -{ - return raCell.mfValue; -} - -template<> -inline void ColumnBatch<svl::SharedString>::putValues(ScMatrixRef& xMat, const SCCOL nCol) const -{ - xMat->PutString(&maStorage.front(), maStorage.size(), nCol, mnRowStart); -} - -template<class T> -inline void ColumnBatch<T>::putValues(ScMatrixRef& xMat, const SCCOL nCol) const -{ - xMat->PutDouble(&maStorage.front(), maStorage.size(), nCol, mnRowStart); -} - static std::unique_ptr<ScTokenArray> convertToTokenArray( ScDocument* pHostDoc, ScDocument* pSrcDoc, ScRange& rRange, vector<ScExternalRefCache::SingleRangeData>& rCacheData ) { diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx index 9ff0c09588d9..c4fb374ebff1 100644 --- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx +++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx @@ -35,7 +35,6 @@ class ScMyAddress : public ScAddress { public: - ScMyAddress() : ScAddress() {} ScMyAddress(SCCOL nColP, SCROW nRowP, SCTAB nTabP) : ScAddress(nColP, nRowP, nTabP) {} ScMyAddress(const ScAddress& rAddress) : ScAddress(rAddress) {} diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx index 8dfea5162682..0bea5fae1145 100644 --- a/sc/source/ui/inc/AccessibleText.hxx +++ b/sc/source/ui/inc/AccessibleText.hxx @@ -91,8 +91,6 @@ public: virtual SvxViewForwarder* GetViewForwarder() override; virtual SvxEditViewForwarder* GetEditViewForwarder( bool bCreate ) override; -protected: - virtual void GetCellText(const ScAddress& rCellPos, OUString& rText) override; private: ScViewForwarder* mpViewForwarder; ScEditViewForwarder* mpEditViewForwarder; diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 20d58591cb86..2ff1edf9327f 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -257,12 +257,6 @@ struct ScRefHdlrImpl: ScRefHdlrImplBase< TBase, bBindRef > struct ScAnyRefDlg : ::ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog> { - template<class T1, class T2, class T3, class T4> - ScAnyRefDlg( const T1 & rt1, const T2 & rt2, const T3& rt3, const T4& rt4 ) - : ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>(rt1, rt2, rt3, rt4) - { - } - template<class T1, class T2, class T3, class T4, class T5> ScAnyRefDlg( const T1 & rt1, const T2 & rt2, const T3& rt3, const T4& rt4, const T5& rt5 ) : ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>(rt1, rt2, rt3, rt4, rt5) diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 8824acb17534..4f1b5cd93ec0 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -215,7 +215,6 @@ public: void AddTabStop( vcl::Window* pWin ); void SetTabStop( vcl::Window* pWin ); void CycleFocus( bool bReverse = false ); - vcl::Window* GetCurrentControl(); void clear(); }; @@ -377,7 +376,6 @@ private: void packWindow(); void setAllMemberState(bool bSet); void selectCurrentMemberOnly(bool bSet); - void cycleFocus(bool bReverse = false); DECL_LINK_TYPED( ButtonHdl, Button*, void ); DECL_LINK_TYPED( TriStateHdl, Button*, void ); diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx index 44d31c1b0332..82ecf28d155b 100644 --- a/sc/source/ui/inc/imoptdlg.hxx +++ b/sc/source/ui/inc/imoptdlg.hxx @@ -32,34 +32,13 @@ class SC_DLLPUBLIC ScImportOptions { public: - ScImportOptions() - : nFieldSepCode(0), nTextSepCode(0), - eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(false), - bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false) - {} ScImportOptions( const OUString& rStr ); - ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const OUString& rStr ) - : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr), - bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false) - { eCharSet = ScGlobal::GetCharsetValue(aStrFont); } - ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc ) : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false), bSaveFormulas(false) { SetTextEncoding( nEnc ); } - ScImportOptions( const ScImportOptions& rCpy ) - : nFieldSepCode (rCpy.nFieldSepCode), - nTextSepCode (rCpy.nTextSepCode), - aStrFont (rCpy.aStrFont), - eCharSet (rCpy.eCharSet), - bFixedWidth (rCpy.bFixedWidth), - bSaveAsShown (rCpy.bSaveAsShown), - bQuoteAllText (rCpy.bQuoteAllText), - bSaveFormulas (rCpy.bSaveFormulas) - {} - ScImportOptions& operator=( const ScImportOptions& rCpy ) { nFieldSepCode = rCpy.nFieldSepCode; diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index f52b030f9e45..3c9cbf318a66 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -935,15 +935,6 @@ ScCellEditSource* ScCellTextData::GetOriginalSource() return pOriginalSource; } -void ScCellTextData::GetCellText(const ScAddress& rCellPos, OUString& rText) -{ - if (pDocShell) - { - ScDocument& rDoc = pDocShell->GetDocument(); - rDoc.GetInputString( rCellPos.Col(), rCellPos.Row(), rCellPos.Tab(), rText ); - } -} - SvxTextForwarder* ScCellTextData::GetTextForwarder() { if (!pEditEngine) |