Tag: cws_src680_reportdesign02
User: oj      
Date: 2008-01-08 06:05:33+0000
Modified:
   dba/reportdesign/source/filter/xml/xmlExport.cxx
   dba/reportdesign/source/filter/xml/xmlExport.hxx

Log:
 #i77039# export numberformat of formatcondition from parent formattedfield

File Changes:

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

File [changed]: xmlExport.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlExport.cxx?r1=1.5.36.4&r2=1.5.36.5
Delta lines:  +11 -7
--------------------
--- xmlExport.cxx       2007-12-20 13:15:26+0000        1.5.36.4
+++ xmlExport.cxx       2008-01-08 06:05:31+0000        1.5.36.5
@@ -813,7 +813,7 @@
                                    for (sal_Int32 j = 0; j < nFormatCount ; 
++j)
                                    {
                                            uno::Reference< 
report::XFormatCondition > xCond(xFormattedField->getByIndex(j),uno::UNO_QUERY);
-                                           exportAutoStyle(xCond.get());
+                                           
exportAutoStyle(xCond.get(),xFormattedField);
                                    } // for (sal_Int32 j = 0; j < nCount ; ++j)
                            } 
                            catch(uno::Exception&)
@@ -1256,7 +1256,7 @@
     return bGroupExported;
 }
 // 
-----------------------------------------------------------------------------
-void ORptExport::exportAutoStyle(XPropertySet* _xProp)
+void ORptExport::exportAutoStyle(XPropertySet* _xProp,const 
Reference<XFormattedField>& _xParentFormattedField)
 {
     const uno::Reference<report::XReportControlFormat> 
xFormat(_xProp,uno::UNO_QUERY);
        if ( xFormat.is() )
@@ -1373,9 +1373,13 @@
             }
         }
         const Reference<XFormattedField> 
xFormattedField(_xProp,uno::UNO_QUERY);
-        if ( xFormattedField.is() && !aPropertyStates.empty() )
+        if ( (_xParentFormattedField.is() || xFormattedField.is()) && 
!aPropertyStates.empty() )
         {
-            sal_Int32 nNumberFormat = xFormattedField->getFormatKey();
+            sal_Int32 nNumberFormat = 0;
+            if ( _xParentFormattedField.is() )
+                nNumberFormat = _xParentFormattedField->getFormatKey();
+            else
+                nNumberFormat = xFormattedField->getFormatKey();
             {
                 sal_Int32 nStyleMapIndex = 
m_xCellStylesExportPropertySetMapper->getPropertySetMapper()->FindEntryIndex( 
CTF_RPT_NUMBERFORMAT );
                 addDataStyle(nNumberFormat);

File [changed]: xmlExport.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlExport.hxx?r1=1.6&r2=1.6.22.1
Delta lines:  +1 -1
-------------------
--- xmlExport.hxx       2007-11-02 11:25:24+0000        1.6
+++ xmlExport.hxx       2008-01-08 06:05:31+0000        1.6.22.1
@@ -221,7 +221,7 @@
        void                                    exportSectionAutoStyle(const 
Reference<XSection>& _xProp);
        void                                    exportReportElement(const 
Reference<XReportControlModel>& _xReportElement);
        void                                    exportFormatConditions(const 
Reference<XReportControlModel>& _xReportElement);
-       void                                    exportAutoStyle(XPropertySet* 
_xProp);
+       void                                    exportAutoStyle(XPropertySet* 
_xProp,const Reference<XFormattedField>& _xParentFormattedField = 
Reference<XFormattedField>());
        void                                    exportAutoStyle(const 
Reference<XSection>& _xProp);
     void                    exportReportComponentAutoStyles(const 
Reference<XSection>& _xProp);
        void                                    collectComponentStyles();




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

Reply via email to