diff options
-rw-r--r-- | sc/source/filter/inc/sheetdatabuffer.hxx | 9 | ||||
-rw-r--r-- | sc/source/filter/oox/sheetdatabuffer.cxx | 32 | ||||
-rw-r--r-- | sc/source/filter/oox/sheetdatacontext.cxx | 9 |
3 files changed, 1 insertions, 49 deletions
diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx index 563145e2e210..e826bd2d9954 100644 --- a/sc/source/filter/inc/sheetdatabuffer.hxx +++ b/sc/source/filter/inc/sheetdatabuffer.hxx @@ -143,12 +143,6 @@ public: const ::com::sun::star::table::CellRangeAddress& rRange, const DataTableModel& rModel ); - /** Creates a named range with a special name for a shared formula with the - specified base address and formula definition (BIFF only). */ - void createSharedFormula( - const ::com::sun::star::table::CellAddress& rCellAddr, - const ApiTokenSequence& rTokens ); - /** Sets default cell formatting for the specified range of rows. */ void setRowFormat( sal_Int32 nRow, sal_Int32 nXfId, bool bCustomFormat ); /** Merges the cells in the passed cell range. */ @@ -173,9 +167,6 @@ private: const ::com::sun::star::table::CellAddress& rCellAddr, const ApiTokenSequence& rTokens ); - /** Creates a named range with a special name for a shared formula with the - specified base address and formula definition. */ - void createSharedFormula( const BinAddress& rMapKey, const ApiTokenSequence& rTokens ); /** Creates a formula token array representing the shared formula with the passed identifier. */ ApiTokenSequence resolveSharedFormula( const BinAddress& rMapKey ) const; diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index 174842a001bc..99e80547a9c9 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -276,11 +276,6 @@ void SheetDataBuffer::createTableOperation( const CellRangeAddress& rRange, cons maTableOperations.push_back( TableOperation( rRange, rModel ) ); } -void SheetDataBuffer::createSharedFormula( const CellAddress& rCellAddr, const ApiTokenSequence& rTokens ) -{ - createSharedFormula( BinAddress( rCellAddr ), rTokens ); -} - void SheetDataBuffer::setRowFormat( sal_Int32 nRow, sal_Int32 nXfId, bool bCustomFormat ) { // set row formatting @@ -554,33 +549,6 @@ void SheetDataBuffer::setCellFormula( const CellAddress& rCellAddr, const ApiTok } } -void SheetDataBuffer::createSharedFormula( const BinAddress& rMapKey, const ApiTokenSequence& rTokens ) -{ - // create the defined name that will represent the shared formula - OUString aName = OUStringBuffer().appendAscii( RTL_CONSTASCII_STRINGPARAM( "__shared_" ) ). - append( static_cast< sal_Int32 >( getSheetIndex() + 1 ) ). - append( sal_Unicode( '_' ) ).append( rMapKey.mnRow ). - append( sal_Unicode( '_' ) ).append( rMapKey.mnCol ).makeStringAndClear(); - ScRangeData* pScRangeData = createNamedRangeObject( aName, rTokens, 0 ); - pScRangeData->SetType(RT_SHARED); - - // get and store the token index of the defined name - OSL_ENSURE( maSharedFormulas.count( rMapKey ) == 0, "SheetDataBuffer::createSharedFormula - shared formula exists already" ); - sal_Int32 nTokenIndex = static_cast< sal_Int32 >( pScRangeData->GetIndex() ); - if( nTokenIndex >= 0 ) try - { - // store the token index in the map - maSharedFormulas[ rMapKey ] = nTokenIndex; - // retry to insert a pending shared formula cell - if( mbPendingSharedFmla ) - setCellFormula( maSharedFmlaAddr, resolveSharedFormula( maSharedBaseAddr ) ); - } - catch( Exception& ) - { - } - mbPendingSharedFmla = false; -} - ApiTokenSequence SheetDataBuffer::resolveSharedFormula( const BinAddress& rMapKey ) const { sal_Int32 nTokenIndex = ContainerHelper::getMapElement( maSharedFormulas, rMapKey, -1 ); diff --git a/sc/source/filter/oox/sheetdatacontext.cxx b/sc/source/filter/oox/sheetdatacontext.cxx index 24be4d7d2d44..3aaaaac79cae 100644 --- a/sc/source/filter/oox/sheetdatacontext.cxx +++ b/sc/source/filter/oox/sheetdatacontext.cxx @@ -578,17 +578,10 @@ void SheetDataContext::importDataTable( SequenceInputStream& rStrm ) } } -void SheetDataContext::importSharedFmla( SequenceInputStream& rStrm ) +void SheetDataContext::importSharedFmla( SequenceInputStream& /*rStrm*/ ) { - if( readFormulaRef( rStrm ) && maFmlaData.isValidSharedRef( maCellData.maCellAddr ) ) - { - ApiTokenSequence aTokens = mrFormulaParser.importFormula( maCellData.maCellAddr, FORMULATYPE_SHAREDFORMULA, rStrm ); - mrSheetData.createSharedFormula( maCellData.maCellAddr, aTokens ); - } } -// ============================================================================ - } // namespace xls } // namespace oox |