User: hr      
Date: 2007-08-02 14:33:15+0000
Modified:
   dba/reportdesign/source/filter/xml/xmlFunction.cxx

Log:
 INTEGRATION: CWS rpt23fix01 (1.2.2); FILE MERGED
 2007/07/12 12:59:57 oj 1.2.2.1: #i77832# #i77146# impl group on and interval

File Changes:

Directory: /dba/reportdesign/source/filter/xml/
===============================================

File [changed]: xmlFunction.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlFunction.cxx?r1=1.2&r2=1.3
Delta lines:  +22 -11
---------------------
--- xmlFunction.cxx     2007-07-09 11:56:17+0000        1.2
+++ xmlFunction.cxx     2007-08-02 14:33:12+0000        1.3
@@ -75,9 +75,11 @@
                                ,const OUString& _sLocalName
                                ,const Reference< XAttributeList > & _xAttrList 
                 ,const Reference< XFunctionsSupplier >&        _xFunctions
+                ,bool _bAddToReport
                                ) :
        SvXMLImportContext( _rImport, nPrfx, _sLocalName )
     ,m_xFunctions(_xFunctions->getFunctions())
+    ,m_bAddToReport(_bAddToReport)
 {
     DBG_CTOR( rpt_OXMLFunction,NULL);
 
@@ -112,6 +114,7 @@
                                        m_xFunction->setPreEvaluated(sValue == 
s_sTRUE);
                                        break;
                 case XML_TOK_INITIAL_FORMULA:
+                    if ( sValue.getLength() )
                                        
m_xFunction->setInitialFormula(beans::Optional< 
::rtl::OUString>(sal_True,ORptFilter::convertFormula(sValue)));
                                        break;
                 case XML_TOK_DEEP_TRAVERSING:
@@ -141,6 +144,13 @@
 // 
-----------------------------------------------------------------------------
 void OXMLFunction::EndElement()
 {
+    if ( m_bAddToReport )
+    {
+        GetOwnImport().insertFunction(m_xFunction);
+        m_xFunction.clear();
+    }
+    else
+    {
        try
        {
                
m_xFunctions->insertByIndex(m_xFunctions->getCount(),uno::makeAny(m_xFunction));
@@ -149,6 +159,7 @@
        {
                OSL_ENSURE(0,"Exception catched!");
        }
+    }
 }
 // 
-----------------------------------------------------------------------------
 //----------------------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to