[Libreoffice-commits] core.git: reportdesign/source

Kohei Yoshida kohei.yoshida at collabora.com
Mon Apr 14 15:56:38 PDT 2014


 reportdesign/source/ui/dlg/Formula.cxx  |    6 ++++--
 reportdesign/source/ui/inc/Formula.hxx  |   11 ++++++++++-
 reportdesign/source/ui/misc/UITools.cxx |   11 ++++++++++-
 3 files changed, 24 insertions(+), 4 deletions(-)

New commits:
commit 6bb7fa8df523d3ae7b9945009fb1034f28cb0a0a
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Apr 14 18:56:12 2014 -0400

    fdo#76294: Fix the build.
    
    Change-Id: I123751e9f08faaccc06649c2f8b29a9a33548312

diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 75ddb03..5fe7375 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -46,7 +46,8 @@ FormulaDialog::FormulaDialog(Window* pParent
                              , const uno::Reference<lang::XMultiServiceFactory>& _xServiceFactory
                              , const ::boost::shared_ptr< IFunctionManager >&  _pFunctionMgr
                              , const OUString& _sFormula
-                             , const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& _xRowSet)
+                             , const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& _xRowSet
+                             , svl::SharedStringPool& rStrPool )
     : FormulaModalDialog( pParent, false,false,false,_pFunctionMgr.get(),this)
     ,m_aFunctionManager(_pFunctionMgr)
     ,m_pFormulaData(new FormEditData())
@@ -56,6 +57,7 @@ FormulaDialog::FormulaDialog(Window* pParent
     ,m_sFormula("=")
     ,m_nStart(0)
     ,m_nEnd(1)
+    ,mrStringPool(rStrPool)
 {
     if ( !_sFormula.isEmpty() )
     {
@@ -255,7 +257,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
 ::std::auto_ptr<formula::FormulaTokenArray> FormulaDialog::convertToTokenArray(const uno::Sequence< sheet::FormulaToken >& _aTokenList)
 {
     ::std::auto_ptr<formula::FormulaTokenArray> pArray(new FormulaTokenArray());
-    pArray->Fill(_aTokenList, NULL);
+    pArray->Fill(_aTokenList, mrStringPool, NULL);
     return pArray;
 }
 
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index 030e438..d3b2f10 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -30,6 +30,11 @@ namespace com { namespace sun { namespace star { namespace lang {
     class XMultiServiceFactory;
 } } } }
 
+namespace svl {
+
+class SharedStringPool;
+
+}
 
 namespace rptui
 {
@@ -51,13 +56,17 @@ class FormulaDialog : public formula::FormulaModalDialog,
     sal_Int32                   m_nStart;
     sal_Int32                   m_nEnd;
 
+    svl::SharedStringPool& mrStringPool;
+
     DECL_LINK( OnClickHdl, OAddFieldWindow*);
 public:
     FormulaDialog( Window* pParent
         , const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _xServiceFactory
         , const ::boost::shared_ptr< formula::IFunctionManager >& _pFunctionMgr
         , const OUString& _sFormula
-        , const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& _xRowSet);
+        , const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& _xRowSet
+        , svl::SharedStringPool& rStrPool );
+
     virtual ~FormulaDialog();
 
     // IFormulaEditorHelper
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index f85721f..7533d84 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -77,9 +77,11 @@
 #include <svx/unoprov.hxx>
 
 #include <unotools/pathoptions.hxx>
+#include <unotools/charclass.hxx>
 #include <svtools/ctrltool.hxx>
 #include <svl/itempool.hxx>
 #include <svl/itemset.hxx>
+#include <svl/sharedstringpool.hxx>
 
 #include <comphelper/propmultiplex.hxx>
 #include <comphelper/namedvaluecollection.hxx>
@@ -1029,7 +1031,14 @@ bool openDialogFormula_nothrow( OUString& _in_out_rFormula
         {
             ::boost::shared_ptr< formula::IFunctionManager > pFormulaManager(new FunctionManager(xMgr) );
             ReportFormula aFormula( _in_out_rFormula );
-            FormulaDialog aDlg(pParent,xServiceFactory,pFormulaManager,aFormula.getUndecoratedContent(),_xRowSet);
+
+            LanguageTag aLangTag(LANGUAGE_SYSTEM);
+            CharClass aCC(_xContext, aLangTag);
+            svl::SharedStringPool aStringPool(&aCC);
+
+            FormulaDialog aDlg(
+                pParent, xServiceFactory, pFormulaManager, aFormula.getUndecoratedContent(), _xRowSet, aStringPool);
+
             bSuccess = aDlg.Execute() == RET_OK;
             if ( bSuccess )
             {


More information about the Libreoffice-commits mailing list