diff options
author | Muthu Subramanian <sumuthu@novell.com> | 2011-06-29 12:59:42 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@novell.com> | 2011-06-29 12:59:42 +0530 |
commit | e8696e99dbc05a83625083e805f4d330451aa04a (patch) | |
tree | 0c9cb9f64cdde67f285fdf075aea3dcdd0664965 /svx/source | |
parent | 8aa6bc4ddbd87fad3a169447f43c7c0630f28858 (diff) |
Improved xlsx formula import.
Now uses the values present in the import document
rather than calculating the formula. This speeds up
document loading.
TODO: Extend this to string results as well.
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/table/cell.cxx | 14 | ||||
-rw-r--r-- | svx/source/table/cell.hxx | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index d0f8f1693af7..ea3a7e1343cd 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -929,6 +929,20 @@ void SAL_CALL Cell::setFormula( const OUString& aFormula ) throw (RuntimeExcepti // ----------------------------------------------------------------------------- +void SAL_CALL Cell::setFormulaString( const OUString& aFormula ) throw (RuntimeException) +{ + setFormula( aFormula ); +} + +// ----------------------------------------------------------------------------- + +void SAL_CALL Cell::setFormulaResult( const double nValue ) throw (RuntimeException) +{ + mfValue = nValue; +} + +// ----------------------------------------------------------------------------- + double SAL_CALL Cell::getValue( ) throw (RuntimeException) { return mfValue; diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx index be22b33f1aad..b7d8e09fe675 100644 --- a/svx/source/table/cell.hxx +++ b/svx/source/table/cell.hxx @@ -139,6 +139,8 @@ public: // XCell SVX_DLLPRIVATE virtual ::rtl::OUString SAL_CALL getFormula() throw (::com::sun::star::uno::RuntimeException); SVX_DLLPRIVATE virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setFormulaString( const ::rtl::OUString& aFormula ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setFormulaResult( const double nValue ) throw (::com::sun::star::uno::RuntimeException); SVX_DLLPRIVATE virtual double SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException); SVX_DLLPRIVATE virtual void SAL_CALL setValue( double nValue ) throw (::com::sun::star::uno::RuntimeException); SVX_DLLPRIVATE virtual ::com::sun::star::table::CellContentType SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); |