summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@novell.com>2011-06-29 23:00:20 +0530
committerMuthu Subramanian <sumuthu@novell.com>2011-06-29 23:03:46 +0530
commit969af6fdbb35fa5bd75132055d0b4fc111354db5 (patch)
treeda5e6a892fb9d763c65bb9d428921b2bfb7332ad /oox
parent839aa0f06f6d3acabb3c349633e7c2a344237f97 (diff)
Revert patch to change .idl
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/xls/worksheethelper.hxx7
-rw-r--r--oox/source/xls/sheetdatacontext.cxx15
-rw-r--r--oox/source/xls/workbookfragment.cxx7
-rw-r--r--oox/source/xls/worksheethelper.cxx13
4 files changed, 4 insertions, 38 deletions
diff --git a/oox/inc/oox/xls/worksheethelper.hxx b/oox/inc/oox/xls/worksheethelper.hxx
index 2f596fe4e22e..e31c8f69711b 100644
--- a/oox/inc/oox/xls/worksheethelper.hxx
+++ b/oox/inc/oox/xls/worksheethelper.hxx
@@ -323,13 +323,6 @@ public:
void putValue(
const ::com::sun::star::table::CellAddress& rAddress,
double fValue ) const;
- void putFormulaResult(
- const ::com::sun::star::table::CellAddress& rAddress,
- double fValue ) const;
- void putFormulaString(
- const ::com::sun::star::table::CellAddress& rAddress,
- const ::rtl::OUString& rText ) const;
-
/** Inserts a string cell directly into the Calc sheet. */
void putString(
const ::com::sun::star::table::CellAddress& rAddress,
diff --git a/oox/source/xls/sheetdatacontext.cxx b/oox/source/xls/sheetdatacontext.cxx
index 36011518cb92..569126e0ebad 100644
--- a/oox/source/xls/sheetdatacontext.cxx
+++ b/oox/source/xls/sheetdatacontext.cxx
@@ -163,8 +163,8 @@ void SheetDataContext::onCharacters( const OUString& rChars )
maCellValue = rChars;
break;
case XLS_TOKEN( f ):
- maCellValue = rChars;
- mrSheetData.putFormulaString( maCellData.maCellAddr, maCellValue );
+ if( maFmlaData.mnFormulaType != XML_TOKEN_INVALID )
+ maTokens = mrFormulaParser.importFormula( maCellData.maCellAddr, rChars );
break;
}
}
@@ -177,8 +177,8 @@ void SheetDataContext::onEndElement()
if( mbHasFormula ) switch( maFmlaData.mnFormulaType )
{
case XML_normal:
- //mrSheetData.setFormulaCell( maCellData, maTokens );
- break;
+ mrSheetData.setFormulaCell( maCellData, maTokens );
+ break;
case XML_shared:
if( maFmlaData.mnSharedId >= 0 )
{
@@ -240,13 +240,6 @@ void SheetDataContext::onEndElement()
mrSheetData.setBlankCell( maCellData );
}
}
- else if( maCellValue.getLength() > 0 ) switch( maCellData.mnCellType )
- {
- case XML_n:
- /* Set the pre-loaded value */
- mrSheetData.putFormulaResult( maCellData.maCellAddr, maCellValue.toDouble() );
- break;
- }
}
}
diff --git a/oox/source/xls/workbookfragment.cxx b/oox/source/xls/workbookfragment.cxx
index 9d22f5fdf937..96fd34f0c100 100644
--- a/oox/source/xls/workbookfragment.cxx
+++ b/oox/source/xls/workbookfragment.cxx
@@ -29,7 +29,6 @@
#include "oox/xls/workbookfragment.hxx"
#include <com/sun/star/table/CellAddress.hpp>
-#include <com/sun/star/sheet/XCalculatable.hpp>
#include "oox/core/filterbase.hxx"
#include "oox/drawingml/themefragmenthandler.hxx"
#include "oox/helper/attributelist.hxx"
@@ -60,7 +59,6 @@ namespace xls {
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::table;
using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::sheet;
using namespace ::oox::core;
using ::oox::drawingml::ThemeFragmentHandler;
@@ -315,11 +313,6 @@ void WorkbookFragment::finalizeImport()
// final conversions, e.g. calculation settings and view settings
finalizeWorkbookImport();
-
- // Recalculate (only changed ones)
- Reference< XCalculatable > xCalculatable( getDocument(), UNO_QUERY );
- if( xCalculatable.is() )
- xCalculatable->calculate();
}
// private --------------------------------------------------------------------
diff --git a/oox/source/xls/worksheethelper.cxx b/oox/source/xls/worksheethelper.cxx
index b4bb373d3f9f..068c89cde2d9 100644
--- a/oox/source/xls/worksheethelper.cxx
+++ b/oox/source/xls/worksheethelper.cxx
@@ -1654,19 +1654,6 @@ void WorksheetHelper::putValue( const CellAddress& rAddress, double fValue ) con
if( xCell.is() ) xCell->setValue( fValue );
}
-void WorksheetHelper::putFormulaResult( const CellAddress& rAddress, double fValue ) const
-{
- Reference< XCell > xCell = getCell( rAddress );
- OSL_ENSURE( xCell.is(), "WorksheetHelper::putFormulaResult - missing cell interface" );
- if( xCell.is() ) xCell->setFormulaResult( fValue );
-}
-
-void WorksheetHelper::putFormulaString( const CellAddress& rAddress, const OUString& rFormula ) const
-{
- Reference< XCell > xCell = getCell( rAddress );
- if( xCell.is() ) xCell->setFormulaString( rFormula );
-}
-
void WorksheetHelper::putString( const CellAddress& rAddress, const OUString& rText ) const
{
Reference< XText > xText( getCell( rAddress ), UNO_QUERY );