diff options
-rw-r--r-- | comphelper/inc/comphelper/SelectionMultiplex.hxx | 5 | ||||
-rw-r--r-- | comphelper/source/misc/SelectionMultiplex.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/inc/sheetdatabuffer.hxx | 45 | ||||
-rw-r--r-- | sc/source/filter/oox/sheetdatabuffer.cxx | 58 | ||||
-rwxr-xr-x | unusedcode.easy | 3 |
5 files changed, 0 insertions, 121 deletions
diff --git a/comphelper/inc/comphelper/SelectionMultiplex.hxx b/comphelper/inc/comphelper/SelectionMultiplex.hxx index 390b3ff47970..56e8375fd215 100644 --- a/comphelper/inc/comphelper/SelectionMultiplex.hxx +++ b/comphelper/inc/comphelper/SelectionMultiplex.hxx @@ -56,11 +56,6 @@ namespace comphelper virtual void _disposing(const ::com::sun::star::lang::EventObject& _rSource) throw( ::com::sun::star::uno::RuntimeException); protected: - /** If the derivee also owns the mutex which we know as reference, then call this within your - derivee's dtor. - */ - void disposeAdapter(); - // pseudo-private. Making it private now could break compatibility void setAdapter( OSelectionChangeMultiplexer* _pAdapter ); }; diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx index ca267e7f3ca7..aa3092d1886d 100644 --- a/comphelper/source/misc/SelectionMultiplex.cxx +++ b/comphelper/source/misc/SelectionMultiplex.cxx @@ -47,16 +47,6 @@ void OSelectionChangeListener::_disposing(const EventObject&) throw( RuntimeExce } //------------------------------------------------------------------ -void OSelectionChangeListener::disposeAdapter() -{ - if ( m_pAdapter ) - m_pAdapter->dispose(); - - // will automatically set a new adapter - OSL_ENSURE( !m_pAdapter, "OSelectionChangeListener::disposeAdapter: what did dispose do?" ); -} - -//------------------------------------------------------------------ void OSelectionChangeListener::setAdapter(OSelectionChangeMultiplexer* pAdapter) { if (m_pAdapter) diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx index 898d03949256..7c4e32ef769a 100644 --- a/sc/source/filter/inc/sheetdatabuffer.hxx +++ b/sc/source/filter/inc/sheetdatabuffer.hxx @@ -90,48 +90,6 @@ struct DataTableModel // ============================================================================ -/** Stores position and contents of a range of cells for optimized import. */ -class CellBlock : public WorksheetHelper -{ -public: - explicit CellBlock( const WorksheetHelper& rHelper, const ValueRange& rColSpan, sal_Int32 nRow ); - - /** Writes all buffered cells into the Calc sheet. */ - void finalizeImport(); - -private: - /** Fills unused cells before passed index with empty strings. */ - void fillUnusedCells( sal_Int32 nIndex ); - -private: - /** Stores position and string data of a rich-string cell. */ - struct RichStringCell - { - ::com::sun::star::table::CellAddress - maCellAddr; /// The address of the rich-string cell. - RichStringRef mxString; /// The string with rich formatting. - const Font* mpFirstPortionFont; /// Font information from cell for first text portion. - - explicit RichStringCell( - const ::com::sun::star::table::CellAddress& rCellAddr, - const RichStringRef& rxString, - const Font* pFirstPortionFont ); - }; - typedef ::std::list< RichStringCell > RichStringCellList; - - ::com::sun::star::table::CellRangeAddress - maRange; /// Cell range covered by this cell block. - RichStringCellList maRichStrings; /// Cached rich-string cells. - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > - maCellArray; /// The array of cells of this cell block. - ::com::sun::star::uno::Any* - mpCurrCellRow; /// Pointer to first cell of current row (last row in maCellArray). - const sal_Int32 mnRowLength; /// Number of cells covered by row of this cell block. - sal_Int32 mnFirstFreeIndex; /// Relative index of first unused cell in current row. -}; - -// ============================================================================ - /** Manages all cell blocks currently in use. */ class CellBlockBuffer : public WorksheetHelper { @@ -146,11 +104,8 @@ public: private: typedef ::std::map< sal_Int32, ValueRangeVector > ColSpanVectorMap; - typedef RefMap< sal_Int32, CellBlock > CellBlockMap; ColSpanVectorMap maColSpans; /// Buffereed column spans, mapped by row index. - CellBlockMap maCellBlocks; /// All open cell blocks, mapped by last (!) column of the block span. - CellBlockMap::iterator maCellBlockIt; /// Pointer to cell block currently in use. sal_Int32 mnCurrRow; /// Current row index used for buffered cell import. }; diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index 0ce3594eb183..a608c00ef32e 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -120,67 +120,10 @@ DataTableModel::DataTableModel() : // ============================================================================ -namespace { - -const sal_Int32 CELLBLOCK_MAXROWS = 16; /// Number of rows in a cell block. - -} // namespace - -CellBlock::CellBlock( const WorksheetHelper& rHelper, const ValueRange& rColSpan, sal_Int32 nRow ) : - WorksheetHelper( rHelper ), - maRange( rHelper.getSheetIndex(), rColSpan.mnFirst, nRow, rColSpan.mnLast, nRow ), - mnRowLength( rColSpan.mnLast - rColSpan.mnFirst + 1 ), - mnFirstFreeIndex( 0 ) -{ - maCellArray.realloc( 1 ); - maCellArray[ 0 ].realloc( mnRowLength ); - mpCurrCellRow = maCellArray[ 0 ].getArray(); -} - -void CellBlock::finalizeImport() -{ - // fill last cells in last row with empty strings (placeholder for empty cells) - fillUnusedCells( mnRowLength ); - // insert all buffered cells into the Calc sheet - try - { - Reference< XCellRangeData > xRangeData( getCellRange( maRange ), UNO_QUERY_THROW ); - xRangeData->setDataArray( maCellArray ); - } - catch( Exception& ) - { - } - // insert uncacheable cells separately - for( RichStringCellList::const_iterator aIt = maRichStrings.begin(), aEnd = maRichStrings.end(); aIt != aEnd; ++aIt ) - putRichString( aIt->maCellAddr, *aIt->mxString, aIt->mpFirstPortionFont ); -} - -// private -------------------------------------------------------------------- - -CellBlock::RichStringCell::RichStringCell( const CellAddress& rCellAddr, const RichStringRef& rxString, const Font* pFirstPortionFont ) : - maCellAddr( rCellAddr ), - mxString( rxString ), - mpFirstPortionFont( pFirstPortionFont ) -{ -} - -void CellBlock::fillUnusedCells( sal_Int32 nIndex ) -{ - if( mnFirstFreeIndex < nIndex ) - { - Any* pCellEnd = mpCurrCellRow + nIndex; - for( Any* pCell = mpCurrCellRow + mnFirstFreeIndex; pCell < pCellEnd; ++pCell ) - *pCell <<= OUString(); - } -} - -// ============================================================================ - CellBlockBuffer::CellBlockBuffer( const WorksheetHelper& rHelper ) : WorksheetHelper( rHelper ), mnCurrRow( -1 ) { - maCellBlockIt = maCellBlocks.end(); } void CellBlockBuffer::setColSpans( sal_Int32 nRow, const ValueRangeSet& rColSpans ) @@ -193,7 +136,6 @@ void CellBlockBuffer::setColSpans( sal_Int32 nRow, const ValueRangeSet& rColSpan void CellBlockBuffer::finalizeImport() { - maCellBlocks.forEachMem( &CellBlock::finalizeImport ); } // ============================================================================ diff --git a/unusedcode.easy b/unusedcode.easy index 7e7b5ad0ae08..a56d38bcf73f 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -299,7 +299,6 @@ cairocanvas::SpriteDeviceHelper::getSurface() cairocanvas::TextLayout::draw(_cairo*) canvas::createSurfaceProxyManager(boost::shared_ptr<canvas::IRenderModule> const&) cmis::Content::exchangeIdentity(com::sun::star::uno::Reference<com::sun::star::ucb::XContentIdentifier> const&) -comphelper::OSelectionChangeListener::disposeAdapter() comphelper::detail::ConfigurationWrapper::getGroupReadWrite(boost::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&) const comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue(rtl::OUString const&) const comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue(boost::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&, com::sun::star::uno::Any const&) const @@ -321,8 +320,6 @@ nullcanvas::SpriteCanvasHelper::opaqueUpdate(basegfx::B2DConnectedRanges<canvas: nullcanvas::SpriteCanvasHelper::scrollUpdate(basegfx::B2DRange const&, basegfx::B2DRange const&, basegfx::B2DConnectedRanges<canvas::SpriteRedrawManager::SpriteInfo>::ConnectedComponents const&) oox::drawingml::TextParagraphProperties::dump() const oox::xls::BiffDrawingObjectBase::BiffDrawingObjectBase(oox::xls::WorksheetHelper const&) -oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange const&, int) -oox::xls::CellBlock::RichStringCell::RichStringCell(com::sun::star::table::CellAddress const&, boost::shared_ptr<oox::xls::RichString> const&, oox::xls::Font const*) sd::LeftDrawPaneShell::RegisterInterface(SfxModule*) sd::LeftImpressPaneShell::RegisterInterface(SfxModule*) sd::ToolPanelPaneShell::RegisterInterface(SfxModule*) |