[Libreoffice-commits] .: svx/source

Muthu Subramanian sumuthu at kemper.freedesktop.org
Wed Jun 29 00:14:04 PDT 2011


 svx/source/table/cell.cxx |   14 ++++++++++++++
 svx/source/table/cell.hxx |    2 ++
 2 files changed, 16 insertions(+)

New commits:
commit 5e6f45e11889db3382989544812613779434e270
Author: Muthu Subramanian <sumuthu at novell.com>
Date:   Wed Jun 29 12:59:42 2011 +0530

    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.

diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 0749dd1..16a0adb 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 32ba7b3..bf17c12 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);


More information about the Libreoffice-commits mailing list