Tag: cws_dev300_rptchart02
User: oj      
Date: 2008-03-12 09:45:21+0000
Modified:
   dba/reportdesign/inc/RptObject.hxx
   dba/reportdesign/inc/UndoEnv.hxx
   dba/reportdesign/source/core/api/ReportDefinition.cxx
   dba/reportdesign/source/core/api/Section.cxx
   dba/reportdesign/source/core/api/Shape.cxx
   dba/reportdesign/source/core/sdr/ReportDrawPage.cxx
   dba/reportdesign/source/core/sdr/RptObject.cxx
   dba/reportdesign/source/core/sdr/UndoActions.cxx
   dba/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
   dba/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx
   dba/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
   dba/reportdesign/source/filter/xml/xmlMasterFields.cxx
   dba/reportdesign/source/filter/xml/xmlfilter.cxx
   dba/reportdesign/source/ui/inspection/DataProviderHandler.cxx
   dba/reportdesign/source/ui/report/InsertFunctions.cxx
   dba/reportdesign/source/ui/report/ReportSection.cxx
   dba/reportdesign/source/ui/report/ViewsWindow.cxx
   dba/reportdesign/source/ui/report/dlgedfac.cxx
   dba/reportdesign/source/ui/report/dlgedfunc.cxx

Log:
 impl chart handling

File Changes:

Directory: /dba/reportdesign/inc/
=================================

File [changed]: RptObject.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/inc/RptObject.hxx?r1=1.5&r2=1.5.4.1
Delta lines:  +15 -10
---------------------
--- RptObject.hxx       2008-03-05 17:18:21+0000        1.5
+++ RptObject.hxx       2008-03-12 09:45:15+0000        1.5.4.1
@@ -215,6 +215,8 @@
     virtual ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet> getAwtComponent();
 
     virtual ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface > getUnoShape();
+    virtual UINT16 GetObjIdentifier() const;
+    virtual UINT32 GetObjInventor() const;
 };
 
 //============================================================================
@@ -225,16 +227,17 @@
        friend class OReportPage;
     friend class DlgEdFactory;
 
+    UINT16 m_nType;
 public:
-    static OOle2Obj* Create( const ::com::sun::star::uno::Reference< 
::com::sun::star::report::XReportComponent>& _xComponent )
+    static OOle2Obj* Create( const ::com::sun::star::uno::Reference< 
::com::sun::star::report::XReportComponent>& _xComponent,UINT16 _nType )
     {
-        return new OOle2Obj( _xComponent );
+        return new OOle2Obj( _xComponent,_nType );
     }
-    OOle2Obj(const ::rtl::OUString& _sComponentName,const 
svt::EmbeddedObjectRef& rNewObjRef, const String& rNewObjName, const Rectangle& 
rNewRect, FASTBOOL bFrame_=FALSE);
+    OOle2Obj(const ::rtl::OUString& _sComponentName,const 
svt::EmbeddedObjectRef& rNewObjRef, const String& rNewObjName, const Rectangle& 
rNewRect,UINT16 _nType, FASTBOOL bFrame_=FALSE);
 
 protected:
-       OOle2Obj(const ::com::sun::star::uno::Reference< 
::com::sun::star::report::XReportComponent>& _xComponent);
-       OOle2Obj(const ::rtl::OUString& _sComponentName);
+       OOle2Obj(const ::com::sun::star::uno::Reference< 
::com::sun::star::report::XReportComponent>& _xComponent,UINT16 _nType);
+       OOle2Obj(const ::rtl::OUString& _sComponentName,UINT16 _nType);
     
 
        virtual void NbcMove( const Size& rSize );
@@ -256,6 +259,8 @@
     virtual ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet> getAwtComponent();
 
     virtual ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface > getUnoShape();
+    virtual UINT16 GetObjIdentifier() const;
+    virtual UINT32 GetObjInventor() const;
 };
 
 //============================================================================
@@ -304,11 +309,11 @@
 
     virtual ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet> getAwtComponent();
 
-    inline sal_uInt16 getObjectId() const { return m_nObjectType; }
-
     static ::rtl::OUString GetDefaultName(const OUnoObject* _pObj);
 
     virtual ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface > getUnoShape();
+    virtual UINT16 GetObjIdentifier() const;
+    virtual UINT32 GetObjInventor() const;
 };
 
 //============================================================================

File [changed]: UndoEnv.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/inc/UndoEnv.hxx?r1=1.2&r2=1.2.100.1
Delta lines:  +4 -2
-------------------
--- UndoEnv.hxx 2007-07-09 11:56:02+0000        1.2
+++ UndoEnv.hxx 2008-03-12 09:45:15+0000        1.2.100.1
@@ -40,6 +40,8 @@
 #include <com/sun/star/container/XContainerListener.hpp>
 #include <com/sun/star/report/XReportDefinition.hpp>
 #include <memory>
+#include <svtools/lstner.hxx>
+
 namespace rptui
 {
        class OXUndoEnvironmentImpl;

Directory: /dba/reportdesign/source/core/api/
=============================================

File [changed]: ReportDefinition.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/ReportDefinition.cxx?r1=1.6&r2=1.6.4.1
Delta lines:  +121 -37
----------------------
--- ReportDefinition.cxx        2008-03-05 17:53:27+0000        1.6
+++ ReportDefinition.cxx        2008-03-12 09:45:16+0000        1.6.4.1
@@ -65,6 +65,12 @@
 #ifndef _COM_SUN_STAR_XML_ATTRIBUTEDATA_HPP_
 #include <com/sun/star/xml/AttributeData.hpp>
 #endif
+#include <com/sun/star/awt/Gradient.hpp>
+
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/LineDash.hpp>
+#include <com/sun/star/drawing/Hatch.hpp>
+
 #include <comphelper/namecontainer.hxx>
 #include <comphelper/broadcasthelper.hxx>
 #include <comphelper/sequence.hxx>
@@ -199,6 +205,7 @@
 #ifndef REPORT_RPTMODEL_HXX
 #include "RptModel.hxx"
 #endif
+#include "UndoEnv.hxx"
 #ifndef RPT_FORMATTEDFIELD_HXX
 #include "FormattedField.hxx"
 #endif
@@ -220,6 +227,7 @@
 #include <svx/svdlayer.hxx>
 #include <svx/xmleohlp.hxx>
 #include <svx/xmlgrhlp.hxx>
+#include <svx/unofill.hxx>
 
 #ifndef _CPPUHELPER_INTERFACECONTAINER_H_
 #include <cppuhelper/interfacecontainer.h>
@@ -628,6 +636,13 @@
        uno::Reference< frame::XController >                    
m_xCurrentController;
     uno::Reference< container::XIndexAccess >               m_xViewData;
     uno::Reference< container::XNameAccess >                m_xStyles;
+    uno::Reference< container::XNameAccess>                 m_xXMLNamespaceMap;
+    uno::Reference< container::XNameAccess>                 m_xGradientTable;
+    uno::Reference< container::XNameAccess>                 m_xHatchTable;
+    uno::Reference< container::XNameAccess>                 m_xBitmapTable;
+    uno::Reference< container::XNameAccess>                 
m_xTransparencyGradientTable;
+    uno::Reference< container::XNameAccess>                 m_xDashTable;
+    uno::Reference< container::XNameAccess>                 m_xMarkerTable;
     uno::Reference< report::XFunctions >                    m_xFunctions;
     uno::Reference< ui::XUIConfigurationManager>            
m_xUIConfigurationManager;
     uno::Reference< util::XNumberFormatsSupplier>           
m_xNumberFormatsSupplier;
@@ -780,6 +795,15 @@
         m_pImpl->m_xFunctions = new OFunctions(this,m_aProps->m_xContext);
         if ( !m_pImpl->m_xStorage.is() )
             m_pImpl->m_xStorage = 
::comphelper::OStorageHelper::GetTemporaryStorage();
+
+        uno::Reference<beans::XPropertySet> 
xStorProps(m_pImpl->m_xStorage,uno::UNO_QUERY);
+        if ( xStorProps.is())
+        {
+            ::rtl::OUString sMediaType;
+            xStorProps->getPropertyValue( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType"))) >>= sMediaType;
+            if ( !sMediaType.getLength() )
+                xStorProps->setPropertyValue( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")),uno::makeAny(MIMETYPE_OASIS_OPENDOCUMENT_REPORT));
+        }
         m_pImpl->m_pObjectContainer.reset( new 
comphelper::EmbeddedObjectContainer(m_pImpl->m_xStorage , 
static_cast<cppu::OWeakObject*>(this) ) );
        }
        catch(uno::Exception)
@@ -815,6 +839,7 @@
                ::comphelper::disposeComponent(m_pImpl->m_xPageFooter);
                ::comphelper::disposeComponent(m_pImpl->m_xDetail);
         ::comphelper::disposeComponent(m_pImpl->m_xFunctions);
+
         //::comphelper::disposeComponent(m_pImpl->m_xStorage);
             // don't dispose, this currently is the task of either the ref 
count going to
             // 0, or of the embedded object (if we're embedded, which is the 
only possible
@@ -825,6 +850,13 @@
         m_pImpl->m_xCurrentController.clear();
         m_pImpl->m_xNumberFormatsSupplier.clear();
         m_pImpl->m_xStyles.clear();
+        m_pImpl->m_xXMLNamespaceMap.clear();
+        m_pImpl->m_xGradientTable.clear();
+        m_pImpl->m_xHatchTable.clear();
+        m_pImpl->m_xBitmapTable.clear();
+        m_pImpl->m_xTransparencyGradientTable.clear();
+        m_pImpl->m_xDashTable.clear();
+        m_pImpl->m_xMarkerTable.clear();
         m_pImpl->m_xUIConfigurationManager.clear();
         m_pImpl->m_pReportModel.reset();
         m_pImpl->m_pObjectContainer.reset();
@@ -1401,6 +1433,9 @@
        aPropVal.Value <<= _xStorageToLoadFrom;
        aDelegatorArguments[nPos] <<= aPropVal;
 
+    rptui::OXUndoEnvironment& rEnv = m_pImpl->m_pReportModel->GetUndoEnv();
+    rptui::OXUndoEnvironment::OUndoEnvLock aLock(rEnv);
+    {
        uno::Reference< document::XFilter > xFilter(
                
m_aProps->m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.OReportFilter")),aDelegatorArguments,m_aProps->m_xContext),
                uno::UNO_QUERY_THROW );
@@ -1415,13 +1450,7 @@
 
     lcl_setModelReadOnly(m_pImpl->m_xStorage,m_pImpl->m_pReportModel);
     m_pImpl->m_pObjectContainer->SwitchPersistence(m_pImpl->m_xStorage);
-       //LLA: if read only, try to load writer
-    // sal_Bool bIsReadOnly = 
aTemp.getUnpackedValueOrDefault(MediaDescriptor::PROP_READONLY(), sal_False); 
-    // if (bIsReadOnly)
-    // {
-    //     // try to open the writer
-    //     bIsReadOnly = sal_True;
-    // }
+    }
 }
 // 
-----------------------------------------------------------------------------
 void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< 
embed::XStorage >& _xStorageToSaveTo, const uno::Sequence< beans::PropertyValue 
>& _aMediaDescriptor ) throw (lang::IllegalArgumentException, io::IOException, 
uno::Exception, uno::RuntimeException)
@@ -1451,7 +1480,7 @@
                static const ::rtl::OUString 
sPropName(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
         ::rtl::OUString sOldMediaType;
         xProp->getPropertyValue(sPropName) >>= sOldMediaType;
-        if ( !xProp->getPropertyValue(sPropName).hasValue() || 
!sOldMediaType.getLength() )
+        if ( !xProp->getPropertyValue(sPropName).hasValue() || 
!sOldMediaType.getLength() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT != 
sOldMediaType )
             xProp->setPropertyValue( sPropName, 
uno::makeAny(MIMETYPE_OASIS_OPENDOCUMENT_REPORT) );
        }
 
@@ -2084,9 +2113,9 @@
        {
         
xShape.set(m_aProps->m_xContext->getServiceManager()->createInstanceWithContext(aServiceSpecifier,m_aProps->m_xContext),uno::UNO_QUERY);
        }
-    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString::createFromAscii("com.sun.star.style.PageStyle") ) == 0 ||
-              aServiceSpecifier.indexOf( 
::rtl::OUString::createFromAscii("com.sun.star.style.FrameStyle") ) == 0 ||
-              aServiceSpecifier.indexOf( 
::rtl::OUString::createFromAscii("com.sun.star.style.GraphicStyle") ) == 0 
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.style.PageStyle") ) == 0 ||
+              aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.style.FrameStyle") ) == 0 ||
+              aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.style.GraphicStyle") ) == 0 
               )
     {
         uno::Reference< style::XStyle> xStyle = new OStyle();
@@ -2097,31 +2126,78 @@
         
         return xStyle.get();
     }
-    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString::createFromAscii("com.sun.star.document.Settings") ) == 0 )
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.Settings") ) == 0 )
     {
         uno::Reference<beans::XPropertySet> xProp = new OStyle();
         
         return xProp.get();
     }
-    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString::createFromAscii("com.sun.star.drawing.Defaults") ) == 0 )
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Defaults") ) == 0 )
     {
         uno::Reference<beans::XPropertySet> xProp = new OStyle();
         return xProp.get();
     }
-    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportEmbeddedObjectResolver")))
 == 0 )
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GradientTable") ) == 0 )
+    {
+        if ( !m_pImpl->m_xGradientTable.is() )
+            
m_pImpl->m_xGradientTable.set(SvxUnoGradientTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
+            //comphelper::NameContainer_createInstance( ::getCppuType( (const 
awt::Gradient*) 0 ) ).get();
+        return m_pImpl->m_xGradientTable;
+    }
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.HatchTable") ) == 0 )
+    {
+        if ( !m_pImpl->m_xHatchTable.is() )
+            
m_pImpl->m_xHatchTable.set(SvxUnoHatchTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
+            //comphelper::NameContainer_createInstance( ::getCppuType( (const 
drawing::Hatch*) 0 ) ).get();
+        return m_pImpl->m_xHatchTable;
+    }
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.BitmapTable") ) == 0 )
+    {
+        if ( !m_pImpl->m_xBitmapTable.is() )
+            
m_pImpl->m_xBitmapTable.set(SvxUnoBitmapTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
+            //comphelper::NameContainer_createInstance( ::getCppuType( (const 
::rtl::OUString*) 0 ) ).get();
+        return m_pImpl->m_xBitmapTable;
+    }
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TransparencyGradientTable") ) 
== 0 )
+    {
+        if ( !m_pImpl->m_xTransparencyGradientTable.is() )
+            
m_pImpl->m_xTransparencyGradientTable.set(SvxUnoTransGradientTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
+            //comphelper::NameContainer_createInstance( ::getCppuType( (const 
awt::Gradient*) 0 ) ).get();
+        return m_pImpl->m_xTransparencyGradientTable;
+    }
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.DashTable") ) == 0 )
+    {
+        if ( !m_pImpl->m_xDashTable.is() )
+            
m_pImpl->m_xDashTable.set(SvxUnoDashTable_createInstance(m_pImpl->m_pReportModel.get()),uno::UNO_QUERY);
+            //comphelper::NameContainer_createInstance( ::getCppuType( (const 
drawing::LineDash*) 0 ) ).get();
+        return m_pImpl->m_xDashTable;
+    }
+    else if( 0 == aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MarkerTable") ) )
+       {
+               if( !m_pImpl->m_xMarkerTable.is() )
+                       
m_pImpl->m_xMarkerTable.set(SvxUnoMarkerTable_createInstance( 
m_pImpl->m_pReportModel.get() ),uno::UNO_QUERY);
+               return m_pImpl->m_xMarkerTable;
+       }
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ImportEmbeddedObjectResolver"))
 == 0 )
         return static_cast< ::cppu::OWeakObject* 
>(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, 
EMBEDDEDOBJECTHELPER_MODE_READ ));
-    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportEmbeddedObjectResolver")))
 == 0 )
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ExportEmbeddedObjectResolver"))
 == 0 )
         return static_cast< ::cppu::OWeakObject* 
>(SvXMLEmbeddedObjectHelper::Create( m_pImpl->m_xStorage,*this, 
EMBEDDEDOBJECTHELPER_MODE_WRITE ));
-    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportGraphicObjectResolver")))
 == 0 )
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ImportGraphicObjectResolver"))
 == 0 )
         return static_cast< ::cppu::OWeakObject* >(new SvXMLGraphicHelper( 
GRAPHICHELPER_MODE_READ ));
-    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportGraphicObjectResolver")))
 == 0 )
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ExportGraphicObjectResolver"))
 == 0 )
         return static_cast< ::cppu::OWeakObject* >(new SvXMLGraphicHelper( 
GRAPHICHELPER_MODE_WRITE ));
-    else if ( aServiceSpecifier.indexOf( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataProvider")))
 == 0 )
+    else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.data.DataProvider")) == 0 )
     {
         uno::Reference<chart2::data::XDatabaseDataProvider> 
xDataProvider(chart2::data::DatabaseDataProvider::createWithConnection( 
m_aProps->m_xContext, m_pImpl->m_xActiveConnection ));
         xDataProvider->setRowLimit(10);
         return uno::Reference< uno::XInterface >(xDataProvider,uno::UNO_QUERY);
     }
+       else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.xml.NamespaceMap")) == 0 )
+       {
+               if ( !m_pImpl->m_xXMLNamespaceMap.is() )
+                       m_pImpl->m_xXMLNamespaceMap = 
comphelper::NameContainer_createInstance( ::getCppuType( (const 
::rtl::OUString*) 0 ) ).get();
+               return m_pImpl->m_xXMLNamespaceMap;
+       }
     else
         xShape.set(SvxUnoDrawMSFactory::createInstance( aServiceSpecifier 
),uno::UNO_QUERY_THROW);
     
@@ -2154,7 +2230,15 @@
         
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportEmbeddedObjectResolver")),
         
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportGraphicObjectResolver")),
 
         
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportGraphicObjectResolver")),
-        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataProvider"))
+        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataProvider")),
+               
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.NamespaceMap")),
+               
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.Settings")),
+        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GradientTable")),
+        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.HatchTable")),
+        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.BitmapTable")),
+        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TransparencyGradientTable")),
+        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DashTable")),
+        
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.MarkerTable"))
        };
 
        static const sal_uInt16 nSvxComponentServiceNameListCount = 
sizeof(aSvxComponentServiceNameList) / sizeof ( aSvxComponentServiceNameList[0] 
);

File [changed]: Section.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/Section.cxx?r1=1.5&r2=1.5.4.1
Delta lines:  +10 -7
--------------------
--- Section.cxx 2008-03-05 17:54:04+0000        1.5
+++ Section.cxx 2008-03-12 09:45:16+0000        1.5.4.1
@@ -214,6 +214,7 @@
 {
        SectionPropertySet::dispose();
        cppu::WeakComponentImplHelperBase::dispose(); 
+    
 }
 // 
-----------------------------------------------------------------------------
 // TODO: VirtualFunctionFinder: This is virtual function! 
@@ -223,8 +224,9 @@
     lang::EventObject aDisposeEvent( static_cast< ::cppu::OWeakObject* >( this 
) );
     m_aContainerListeners.disposeAndClear( aDisposeEvent );
     m_xContext.clear();
+    //m_xDrawPage.clear();
 
-    uno::Reference< report::XReportDefinition> xReport = getReportDefinition();
+    /*uno::Reference< report::XReportDefinition> xReport = 
getReportDefinition();
     ::boost::shared_ptr<rptui::OReportModel> pModel = 
OReportDefinition::getSdrModel(xReport);
     osl_incrementInterlockedCount( &m_refCount );
     while( m_xDrawPage.is() && m_xDrawPage->hasElements() )
@@ -243,7 +245,7 @@
         uno::Reference< report::XSection> xSection = this;
         pModel->DeletePage(pModel->getPage(xSection)->GetPageNum());
     }
-    osl_decrementInterlockedCount( &m_refCount );
+    osl_decrementInterlockedCount( &m_refCount );*/
 }
 //--------------------------------------------------------------------------
 ::rtl::OUString SAL_CALL OSection::getImplementationName(  ) 
throw(uno::RuntimeException)
@@ -279,6 +281,7 @@
         {
             
m_xProxy.set(pModel->createNewPage(this)->getUnoPage(),uno::UNO_QUERY);
             ::comphelper::query_aggregation(m_xProxy,m_xDrawPage);
+            
             // set ourself as delegator
             if ( m_xProxy.is() )
                 m_xProxy->setDelegator( static_cast<cppu::OWeakObject*>(this) 
);
@@ -389,7 +392,6 @@
                         ,1
                         ,m_xContext);
     checkNotPageHeaderFooter();
-       
        set(PROPERTY_FORCENEWPAGE,_forcenewpage,m_nForceNewPage);
 }
 // 
-----------------------------------------------------------------------------
@@ -425,6 +427,7 @@
         ::osl::MutexGuard aGuard(m_aMutex);
         checkNotPageHeaderFooter();
     }
+    
        set(PROPERTY_KEEPTOGETHER,_keeptogether,m_bKeepTogether);
 }
 // 
-----------------------------------------------------------------------------

File [changed]: Shape.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/Shape.cxx?r1=1.4&r2=1.4.4.1
Delta lines:  +20 -4
--------------------
--- Shape.cxx   2008-03-05 17:54:24+0000        1.4
+++ Shape.cxx   2008-03-12 09:45:16+0000        1.4.4.1
@@ -44,6 +44,7 @@
 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
 #include <com/sun/star/beans/XPropertyState.hpp>
 #endif
+#include <com/sun/star/beans/NamedValue.hpp>
 #ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
 #include "core_resource.hrc"
 #endif
@@ -62,6 +63,7 @@
 #ifndef REPORTDESIGN_TOOLS_HXX
 #include "Tools.hxx"
 #endif
+#include "RptObject.hxx"
 #ifndef RPT_FORMATCONDITION_HXX
 #include "FormatCondition.hxx"
 #endif
@@ -70,6 +72,7 @@
 #endif
 #include "ReportHelperImpl.hxx"
 #include <boost/bind.hpp>
+#include <svx/unoshape.hxx>
 // 
=============================================================================
 namespace reportdesign
 {
@@ -336,7 +339,20 @@
 uno::Reference< util::XCloneable > SAL_CALL OShape::createClone(  ) throw 
(uno::RuntimeException)
 {
     uno::Reference< report::XReportComponent> xSource = this;
-    uno::Reference< report::XShape> 
xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_SHAPE),uno::UNO_QUERY_THROW);
+       uno::Reference< report::XReportComponent> xSet;
+       SvxShape* pShape = SvxShape::getImplementation( xSource );
+       if ( pShape )
+       {
+               SdrObject* pObject = pShape->GetSdrObject();
+               if ( pObject )
+               {
+                       SdrObject* pClone = pObject->Clone();
+                       if ( pClone )
+                       {
+                               
xSet.set(pClone->getUnoShape(),uno::UNO_QUERY_THROW );
+                       }
+               }
+       }
        return xSet.get();
 }
 // 
-----------------------------------------------------------------------------

Directory: /dba/reportdesign/source/core/sdr/
=============================================

File [changed]: ReportDrawPage.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/sdr/ReportDrawPage.cxx?r1=1.4&r2=1.4.4.1
Delta lines:  +23 -5
--------------------
--- ReportDrawPage.cxx  2008-03-05 17:58:18+0000        1.4
+++ ReportDrawPage.cxx  2008-03-12 09:45:16+0000        1.4.4.1
@@ -40,6 +40,8 @@
 #include <comphelper/mimeconfighelper.hxx>
 #include <comphelper/classids.hxx>
 #include <comphelper/embeddedobjectcontainer.hxx>
+#include <comphelper/documentconstants.hxx>
+
 #include <svx/svdmodel.hxx>
 #include <com/sun/star/report/XFixedLine.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
@@ -78,6 +80,7 @@
     if ( xSection.is() )
         xFactory.set(xSection->getReportDefinition(),uno::UNO_QUERY);
     uno::Reference< drawing::XShape > xRet;
+       uno::Reference< drawing::XShape > xShape;
     if ( xFactory.is() )
     {
         bool bChangeOrientation = false;
@@ -130,7 +133,17 @@
         if ( pObj->ISA(OUnoObject) )
         {
             OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(pObj);
-            bChangeOrientation = pUnoObj->getObjectId() == OBJ_DLG_HFIXEDLINE;
+            bChangeOrientation = pUnoObj->GetObjIdentifier() == 
OBJ_DLG_HFIXEDLINE;
+            
+                       SvxShapeControl* pShape = new SvxShapeControl( pObj );
+            xShape.set(*pShape,uno::UNO_QUERY);
+                       pShape->setShapeKind(pObj->GetObjIdentifier());
+        }
+               else if ( pObj->ISA(OCustomShape) )
+               {
+                       SvxCustomShape* pShape = new SvxCustomShape( pObj );
+            xShape.set(*pShape,uno::UNO_QUERY);
+                       pShape->setShapeKind(pObj->GetObjIdentifier());
         }
         else if ( pObj->ISA(SdrOle2Obj) )
         {
@@ -160,9 +173,14 @@
                awt::Size aSz( aTmp.Width(), aTmp.Height() );
                 xObj->setVisualAreaSize( nAspect, aSz );
             }
+                       SvxOle2Shape* pShape = new SvxOle2Shape( pObj );
+            xShape.set(*pShape,uno::UNO_QUERY);
+                       pShape->setShapeKind(pObj->GetObjIdentifier());
+                       //xShape = new SvxOle2Shape( pOle2Obj );
         }
 
-        uno::Reference< drawing::XShape > xShape( SvxDrawPage::_CreateShape( 
pObj ) );
+               if ( !xShape.is() )
+                       xShape.set( SvxDrawPage::_CreateShape( pObj ) );
 
         try
         {

File [changed]: RptObject.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/sdr/RptObject.cxx?r1=1.7&r2=1.7.4.1
Delta lines:  +43 -8
--------------------
--- RptObject.cxx       2008-03-05 17:59:50+0000        1.7
+++ RptObject.cxx       2008-03-12 09:45:16+0000        1.7.4.1
@@ -221,7 +221,7 @@
             break;
         case OBJ_DLG_SUBREPORT:
         case OBJ_OLE2:
-            pNewObj = OOle2Obj::Create( _xComponent );
+            pNewObj = OOle2Obj::Create( _xComponent,nType );
             break;
                default:
                        OSL_ENSURE(0,"Unknown object id");
@@ -580,6 +580,16 @@
        DBG_DTOR( rpt_OCustomShape, NULL);
     //mxUnoShape = uno::WeakReference< uno::XInterface >();
 }
+// 
-----------------------------------------------------------------------------
+UINT16 OCustomShape::GetObjIdentifier() const
+{
+       return UINT16(OBJ_CUSTOMSHAPE);
+}
+//----------------------------------------------------------------------------
+UINT32 OCustomShape::GetObjInventor() const
+{
+       return ReportInventor;
+}
 //----------------------------------------------------------------------------
 SdrPage* OCustomShape::GetImplPage() const
 {
@@ -727,6 +737,16 @@
        DBG_DTOR( rpt_OUnoObject, NULL);
     //mxUnoShape = uno::WeakReference< uno::XInterface >();
 }
+// 
-----------------------------------------------------------------------------
+UINT16 OUnoObject::GetObjIdentifier() const
+{
+       return UINT16(m_nObjectType);
+}
+//----------------------------------------------------------------------------
+UINT32 OUnoObject::GetObjInventor() const
+{
+       return ReportInventor;
+}
 //----------------------------------------------------------------------------
 SdrPage* OUnoObject::GetImplPage() const
 {
@@ -943,7 +963,7 @@
 
            Reference<XPropertySet> 
xControlModel(GetUnoControlModel(),uno::UNO_QUERY);
            if ( !m_xMediator.is() && m_xReportComponent.is() && 
xControlModel.is() )
-            m_xMediator = TMediator::createFromQuery(new 
OPropertyMediator(m_xReportComponent.get(),xControlModel,getPropertyNameMap(getObjectId()),_bReverse));
+            m_xMediator = TMediator::createFromQuery(new 
OPropertyMediator(m_xReportComponent.get(),xControlModel,getPropertyNameMap(GetObjIdentifier()),_bReverse));
         OObjectBase::StartListening();
     }
 }
@@ -963,9 +983,10 @@
 //----------------------------------------------------------------------------
 TYPEINIT1(OOle2Obj, SdrOle2Obj);
 DBG_NAME( rpt_OOle2Obj );
-OOle2Obj::OOle2Obj(const uno::Reference< report::XReportComponent>& 
_xComponent)
+OOle2Obj::OOle2Obj(const uno::Reference< report::XReportComponent>& 
_xComponent,UINT16 _nType)
                  :SdrOle2Obj()
                  ,OObjectBase(_xComponent)
+          ,m_nType(_nType)
 {
        DBG_CTOR( rpt_OOle2Obj, NULL);
 
@@ -978,23 +999,37 @@
     //SetObjRef(xEmbed);
 }
 //----------------------------------------------------------------------------
-OOle2Obj::OOle2Obj(const ::rtl::OUString& _sComponentName)
+OOle2Obj::OOle2Obj(const ::rtl::OUString& _sComponentName,UINT16 _nType)
                  :SdrOle2Obj()
                  ,OObjectBase(_sComponentName)
+          ,m_nType(_nType)
 {
        DBG_CTOR( rpt_OOle2Obj, NULL);
+       m_bIsListening = sal_True;
 }
 // 
-----------------------------------------------------------------------------
-OOle2Obj::OOle2Obj(const ::rtl::OUString& _sComponentName,const 
svt::EmbeddedObjectRef& rNewObjRef, const String& rNewObjName, const Rectangle& 
rNewRect, FASTBOOL bFrame_)
+OOle2Obj::OOle2Obj(const ::rtl::OUString& _sComponentName,const 
svt::EmbeddedObjectRef& rNewObjRef, const String& rNewObjName, const Rectangle& 
rNewRect,UINT16 _nType, FASTBOOL bFrame_)
           :SdrOle2Obj(rNewObjRef,rNewObjName,rNewRect,bFrame_)
           ,OObjectBase(_sComponentName)
+          ,m_nType(_nType)
 {
+       m_bIsListening = sal_True;
 }
 //----------------------------------------------------------------------------
 OOle2Obj::~OOle2Obj()
 {
        DBG_DTOR( rpt_OOle2Obj, NULL);
 }
+// 
-----------------------------------------------------------------------------
+UINT16 OOle2Obj::GetObjIdentifier() const
+{
+       return m_nType;
+}
+//----------------------------------------------------------------------------
+UINT32 OOle2Obj::GetObjInventor() const
+{
+       return ReportInventor;
+}
 //----------------------------------------------------------------------------
 SdrPage* OOle2Obj::GetImplPage() const
 {

File [changed]: UndoActions.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/sdr/UndoActions.cxx?r1=1.6&r2=1.6.4.1
Delta lines:  +5 -4
-------------------
--- UndoActions.cxx     2008-03-06 18:43:36+0000        1.6
+++ UndoActions.cxx     2008-03-12 09:45:17+0000        1.6.4.1
@@ -962,6 +962,7 @@
 
//------------------------------------------------------------------------------
 void OXUndoEnvironment::AddElement(const Reference< XInterface >& _rxElement )
 {
+       if ( !IsLocked() )
     m_pImpl->m_aFormatNormalizer.notifyElementInserted( _rxElement );
 
     // if it's a container, start listening at all elements

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

File [changed]: xmlExportDocumentHandler.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx?r1=1.2&r2=1.2.4.1
Delta lines:  +52 -6
--------------------
--- xmlExportDocumentHandler.cxx        2008-03-05 18:02:45+0000        1.2
+++ xmlExportDocumentHandler.cxx        2008-03-12 09:45:17+0000        1.2.4.1
@@ -75,11 +75,26 @@
     return sQName.makeStringAndClear();
 }
 
+void lcl_correctCellAddress(const ::rtl::OUString & _sName, const 
uno::Reference< xml::sax::XAttributeList > & xAttribs)
+{
+    SvXMLAttributeList* pList = 
SvXMLAttributeList::getImplementation(xAttribs);
+    ::rtl::OUString sCellAddress = pList->getValueByName(_sName);
+    const sal_Int32 nPos = sCellAddress.lastIndexOf('$');
+    if ( nPos != -1 )
+    {
+        sCellAddress = sCellAddress.copy(0,nPos);
+        sCellAddress += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("$65535"));
+        pList->RemoveAttribute(_sName);
+        pList->AddAttribute(_sName,sCellAddress);
+    }
+}
+
 ExportDocumentHandler::ExportDocumentHandler(uno::Reference< 
uno::XComponentContext > const & context) :
     m_xContext(context)
     ,m_nCurrentCellIndex(0)
     ,m_bTableRowsStarted(false)
     ,m_bFirstRowExported(false)
+       ,m_bExportChar(false)
 {
 }
 // 
-----------------------------------------------------------------------------
@@ -146,7 +161,6 @@
 
 void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & 
_sName, const uno::Reference< xml::sax::XAttributeList > & xAttribs) throw 
(uno::RuntimeException, xml::sax::SAXException)
 {
-    
     bool bExport = true;
     if ( _sName.equalsAscii("office:chart") )
     {
@@ -180,7 +194,7 @@
         
         
m_xDelegatee->startElement(lcl_createAttribute(XML_NP_OFFICE,XML_REPORT),xNewAttribs);
 
-        const uno::Sequence< ::rtl::OUString > aDetailFields = 
m_xDatabaseDataProvider->getDetailFields();
+        /*const uno::Sequence< ::rtl::OUString > aDetailFields = 
m_xDatabaseDataProvider->getDetailFields();
         if ( aDetailFields.getLength() )
         {
             lcl_exportPrettyPrinting(m_xDelegatee);
@@ -207,7 +221,7 @@
             }
             lcl_exportPrettyPrinting(m_xDelegatee);
             
m_xDelegatee->endElement(lcl_createAttribute(XML_NP_RPT,XML_MASTER_DETAIL_FIELDS));
-        }
+        }*/
         bExport = false;
     }
     else if ( _sName.equalsAscii("table:table") )
@@ -219,6 +233,27 @@
         m_bTableRowsStarted = true;
     else if ( m_bTableRowsStarted && m_bFirstRowExported && 
(_sName.equalsAscii("table:table-row") || 
_sName.equalsAscii("table:table-cell")) )
         bExport = false;
+    else if ( _sName.equalsAscii("chart:plot-area"))
+    {
+        SvXMLAttributeList* pList = 
SvXMLAttributeList::getImplementation(xAttribs);
+        
pList->RemoveAttribute(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("table:cell-range-address")));
+    }
+    else if ( _sName.equalsAscii("chart:categories"))
+    {
+        static ::rtl::OUString 
s_sCellAddress(lcl_createAttribute(XML_NP_TABLE,XML_CELL_RANGE_ADDRESS));
+        lcl_correctCellAddress(s_sCellAddress,xAttribs);
+    }
+    else if ( _sName.equalsAscii("chart:series"))
+    {
+        static ::rtl::OUString 
s_sCellAddress(lcl_createAttribute(XML_NP_CHART,XML_VALUES_CELL_RANGE_ADDRESS));
+        lcl_correctCellAddress(s_sCellAddress,xAttribs);        
+    }
+       else if ( m_bTableRowsStarted && !m_bFirstRowExported && 
_sName.equalsAscii("table:table-cell") )
+       {
+               SvXMLAttributeList* pList = 
SvXMLAttributeList::getImplementation(xAttribs);
+               static ::rtl::OUString 
s_sValue(lcl_createAttribute(XML_NP_OFFICE,XML_VALUE));
+               pList->RemoveAttribute(s_sValue);
+       }
     else if ( m_bTableRowsStarted && _sName.equalsAscii("text:p") )
     {
         if ( !m_bFirstRowExported )
@@ -229,12 +264,17 @@
 
             ::rtl::OUString sFormula;
             if( m_nCurrentCellIndex < m_aColumns.getLength() )
-                sFormula = m_aColumns[m_nCurrentCellIndex];
+            {
+                sFormula += 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("field:["));
+                sFormula += m_aColumns[m_nCurrentCellIndex];
+                sFormula += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
+            }
             
pList->AddAttribute(lcl_createAttribute(XML_NP_RPT,XML_FORMULA),sFormula);
 
             
m_xDelegatee->startElement(lcl_createAttribute(XML_NP_RPT,XML_FORMATTED_TEXT),xNewAttribs);
             
m_xDelegatee->startElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_ELEMENT),NULL);
             
m_xDelegatee->startElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_COMPONENT),NULL);
+                       m_bExportChar = true;
 
             ++m_nCurrentCellIndex;
         }
@@ -269,6 +309,7 @@
         bExport = !m_bFirstRowExported;
         if ( bExport )
         {
+                       m_bExportChar = false;
             
m_xDelegatee->endElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_COMPONENT));
             
m_xDelegatee->endElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_ELEMENT));
             
m_xDelegatee->endElement(lcl_createAttribute(XML_NP_RPT,XML_FORMATTED_TEXT));
@@ -281,8 +322,13 @@
 
 void SAL_CALL ExportDocumentHandler::characters(const ::rtl::OUString & 
aChars) throw (uno::RuntimeException, xml::sax::SAXException)
 {
-    if ( !(m_bTableRowsStarted && m_bFirstRowExported) )
+    if ( !(m_bTableRowsStarted || m_bFirstRowExported) )
         m_xDelegatee->characters(aChars);
+       else if ( m_bExportChar )
+       {
+               static const ::rtl::OUString 
s_sZero(RTL_CONSTASCII_USTRINGPARAM("0"));
+               m_xDelegatee->characters(s_sZero);
+       }
 }
 
 void SAL_CALL ExportDocumentHandler::ignorableWhitespace(const ::rtl::OUString 
& aWhitespaces) throw (uno::RuntimeException, xml::sax::SAXException)

File [changed]: xmlExportDocumentHandler.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlExportDocumentHandler.hxx?r1=1.2&r2=1.2.4.1
Delta lines:  +1 -0
-------------------
--- xmlExportDocumentHandler.hxx        2008-03-05 18:03:02+0000        1.2
+++ xmlExportDocumentHandler.hxx        2008-03-12 09:45:17+0000        1.2.4.1
@@ -102,6 +102,7 @@
     sal_Int32                                                                  
         m_nCurrentCellIndex;
     bool m_bTableRowsStarted;
     bool m_bFirstRowExported;
+       bool m_bExportChar;
 };
 // 
-----------------------------------------------------------------------------
 } // namespace rptxml

File [changed]: xmlImportDocumentHandler.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx?r1=1.2&r2=1.2.4.1
Delta lines:  +10 -2
--------------------
--- xmlImportDocumentHandler.cxx        2008-03-05 18:03:45+0000        1.2
+++ xmlImportDocumentHandler.cxx        2008-03-12 09:45:17+0000        1.2.4.1
@@ -129,7 +129,7 @@
 
 void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & 
_sName, const uno::Reference< xml::sax::XAttributeList > & _xAttrList) throw 
(uno::RuntimeException, xml::sax::SAXException)
 {
-    
+    uno::Reference< xml::sax::XAttributeList > xNewAttribs = _xAttrList;
     bool bExport = true;
     if ( _sName.equalsAscii("office:report") )
     {
@@ -171,6 +171,7 @@
                         break;
                            }
                    }
+                       m_xDatabaseDataProvider->execute();
            }
         catch(uno::Exception&)
            {
@@ -225,9 +226,16 @@
         ||    _sName.equalsAscii("rpt:report-component")
         ||    _sName.equalsAscii("rpt:report-element"))
         bExport = false;
+    else if ( _sName.equalsAscii("chart:plot-area"))
+    {
+        SvXMLAttributeList* pList = new SvXMLAttributeList();
+        xNewAttribs = pList;
+        pList->AppendAttributeList(_xAttrList);
+        
pList->AddAttribute(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("table:cell-range-address")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("local-table.$A$1:.$Z$65536")));
+    }
     
     if ( bExport )
-        m_xDelegatee->startElement(_sName,_xAttrList);
+        m_xDelegatee->startElement(_sName,xNewAttribs);
 }
 
 void SAL_CALL ImportDocumentHandler::endElement(const ::rtl::OUString & 
_sName) throw (uno::RuntimeException, xml::sax::SAXException)

File [changed]: xmlMasterFields.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlMasterFields.cxx?r1=1.5&r2=1.5.4.1
Delta lines:  +6 -5
-------------------
--- xmlMasterFields.cxx 2008-03-05 18:04:14+0000        1.5
+++ xmlMasterFields.cxx 2008-03-12 09:45:17+0000        1.5.4.1
@@ -102,6 +102,7 @@
        }
     if ( !sDetailField.getLength() )
         sDetailField = sMasterField;
+    if ( sMasterField.getLength() )
     m_pReport->addMasterDetailPair(::std::pair< 
::rtl::OUString,::rtl::OUString >(sMasterField,sDetailField));
 }
 // 
-----------------------------------------------------------------------------

File [changed]: xmlfilter.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlfilter.cxx?r1=1.7&r2=1.7.4.1
Delta lines:  +4 -6
-------------------
--- xmlfilter.cxx       2008-03-05 18:06:34+0000        1.7
+++ xmlfilter.cxx       2008-03-12 09:45:17+0000        1.7.4.1
@@ -641,9 +641,7 @@
 
                if ( bRet ) 
                {
-                       uno::Reference< XModifiable > 
xModi(GetModel(),UNO_QUERY);
-                       if ( xModi.is() )
-                               xModi->setModified(sal_False);
+                       m_xReportDefinition->setModified(sal_False);
                }
                else
                {

Directory: /dba/reportdesign/source/ui/inspection/
==================================================

File [changed]: DataProviderHandler.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inspection/DataProviderHandler.cxx?r1=1.2&r2=1.2.4.1
Delta lines:  +23 -26
---------------------
--- DataProviderHandler.cxx     2008-03-05 18:09:53+0000        1.2
+++ DataProviderHandler.cxx     2008-03-12 09:45:18+0000        1.2.4.1
@@ -40,15 +40,12 @@
 #ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
 #include <com/sun/star/lang/XInitialization.hpp>
 #endif
-#ifndef _COMPHELPER_SEQUENCE_HXX_
 #include <comphelper/sequence.hxx>
-#endif
+#include <comphelper/property.hxx>
+#include <comphelper/types.hxx>
 #ifndef REPORTDESIGN_SHARED_UISTRINGS_HRC
 #include "uistrings.hrc"
 #endif
-#ifndef _COMPHELPER_TYPES_HXX_
-#include <comphelper/types.hxx>
-#endif
 #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
 #include <toolkit/helper/vclunohelper.hxx>
 #endif
@@ -197,7 +194,7 @@
             aPropertyMediation.insert( TPropertyNamePair::value_type( 
PROPERTY_MASTERFIELDS, PROPERTY_MASTERFIELDS ) );
             aPropertyMediation.insert( TPropertyNamePair::value_type( 
PROPERTY_DETAILFIELDS, PROPERTY_DETAILFIELDS ) );
 
-            m_xMasterDetails = new OPropertyMediator( m_xDataProvider.get(), 
m_xReportComponent.get(), aPropertyMediation );
+            m_xMasterDetails = new OPropertyMediator( m_xDataProvider.get(), 
m_xReportComponent.get(), aPropertyMediation,sal_True );
         }
         
         //const ::rtl::OUString sRowSet(RTL_CONSTASCII_USTRINGPARAM("RowSet"));
@@ -276,26 +273,6 @@
             break;
         default:
             m_xFormComponentHandler->setPropertyValue(PropertyName, Value);
-            if ( PropertyName == PROPERTY_COMMAND )
-            {
-                
-                uno::Sequence< beans::PropertyValue > aArgs( 4 );
-                aArgs[0] = beans::PropertyValue(
-                    
::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1,
-                    uno::makeAny( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("all")) ), 
beans::PropertyState_DIRECT_VALUE );
-                aArgs[1] = beans::PropertyValue(
-                    ::rtl::OUString::createFromAscii("HasCategories"), -1,
-                    uno::makeAny( sal_True ), 
beans::PropertyState_DIRECT_VALUE );
-                aArgs[2] = beans::PropertyValue(
-                    ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1,
-                    uno::makeAny( sal_False ), 
beans::PropertyState_DIRECT_VALUE );
-                aArgs[3] = beans::PropertyValue(
-                    ::rtl::OUString::createFromAscii("DataRowSource"), -1,
-                    uno::makeAny( chart::ChartDataRowSource_COLUMNS ), 
beans::PropertyState_DIRECT_VALUE );
-                uno::Reference< chart2::data::XDataReceiver > 
xReceiver(m_xChartModel,uno::UNO_QUERY);
-                if ( xReceiver.is() )
-                    xReceiver->setArguments( aArgs );
-            }
             break;
     }
 }
@@ -486,6 +463,26 @@
         bool bDoEnableMasterDetailFields = xReport.is() && 
xReport->getCommand().getLength() && m_xDataProvider->getCommand().getLength();
         InspectorUI->enablePropertyUIElements( PROPERTY_DETAILFIELDS, 
inspection::PropertyLineElement::PrimaryButton, bDoEnableMasterDetailFields );
         InspectorUI->enablePropertyUIElements( PROPERTY_MASTERFIELDS, 
inspection::PropertyLineElement::PrimaryButton, bDoEnableMasterDetailFields );
+
+        sal_Bool bModified = xReport->isModified();
+        // this fills the chart again
+               uno::Sequence< beans::PropertyValue > aArgs( 4 );
+        aArgs[0] = beans::PropertyValue(
+            ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1,
+            uno::makeAny( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("all")) 
), beans::PropertyState_DIRECT_VALUE );
+        aArgs[1] = beans::PropertyValue(
+            ::rtl::OUString::createFromAscii("HasCategories"), -1,
+            uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE );
+        aArgs[2] = beans::PropertyValue(
+            ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1,
+            uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE );
+        aArgs[3] = beans::PropertyValue(
+            ::rtl::OUString::createFromAscii("DataRowSource"), -1,
+            uno::makeAny( chart::ChartDataRowSource_COLUMNS ), 
beans::PropertyState_DIRECT_VALUE );
+        uno::Reference< chart2::data::XDataReceiver > 
xReceiver(m_xChartModel,uno::UNO_QUERY_THROW);
+        xReceiver->setArguments( aArgs );
+        if ( !bModified )
+            xReport->setModified(sal_False);
     }
     else
     {

Directory: /dba/reportdesign/source/ui/report/
==============================================

File [changed]: InsertFunctions.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/InsertFunctions.cxx?r1=1.2&r2=1.2.4.1
Delta lines:  +8 -1
-------------------
--- InsertFunctions.cxx 2008-03-05 18:12:28+0000        1.2
+++ InsertFunctions.cxx 2008-03-12 09:45:18+0000        1.2.4.1
@@ -45,7 +45,7 @@
 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
 #include <com/sun/star/beans/XPropertySet.hpp>
 #endif
-
+#include <com/sun/star/embed/XEmbedPersist.hpp>
 //------------------------------------------------------------------------
 
 #include <toolkit/helper/vclunohelper.hxx>
@@ -173,6 +173,13 @@
 
             if( xChartModel.is() )
                 xChartModel->unlockControllers();
+
+                       //uno::Reference < embed::XEmbedPersist > xPersist( 
xObj, uno::UNO_QUERY );
+   //         if ( xPersist.is() )
+   //         {
+   //             xPersist->storeOwn();
+   //             xPersist->saveCompleted( sal_True );
+   //         }
         }
     }
 }

File [changed]: ReportSection.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportSection.cxx?r1=1.8&r2=1.8.4.1
Delta lines:  +35 -37
---------------------
--- ReportSection.cxx   2008-03-05 18:13:26+0000        1.8
+++ ReportSection.cxx   2008-03-12 09:45:18+0000        1.8.4.1
@@ -302,15 +302,22 @@
             {
                 try
                 {
-                    uno::Sequence< uno::Reference<util::XCloneable> > aCopies;
+                    uno::Sequence< uno::Reference<report::XReportComponent> > 
aCopies;
                     pIter->Value >>= aCopies;
-                    const uno::Reference<util::XCloneable>* pCopiesIter = 
aCopies.getConstArray();
-                    const uno::Reference<util::XCloneable>* pCopiesEnd = 
pCopiesIter + aCopies.getLength();
+                    const uno::Reference<report::XReportComponent>* 
pCopiesIter = aCopies.getConstArray();
+                    const uno::Reference<report::XReportComponent>* pCopiesEnd 
= pCopiesIter + aCopies.getLength();
                     for (;pCopiesIter != pCopiesEnd ; ++pCopiesIter)
                     {
-                        uno::Reference< report::XReportComponent> 
xComponent(*pCopiesIter,uno::UNO_QUERY_THROW);
-                        uno::Reference< report::XReportComponent> 
xClone(xComponent->createClone(),uno::UNO_QUERY_THROW);
-                        Rectangle 
aRet(VCLPoint(xClone->getPosition()),VCLSize(xClone->getSize()));
+                                               SvxShape* pShape = 
SvxShape::getImplementation( *pCopiesIter );
+                        SdrObject* pObject = pShape ? pShape->GetSdrObject() : 
NULL;
+                                               if ( pObject )
+                                               {
+                            pObject->SetPage( m_pPage );
+                                                       pObject->SetModel( 
m_pModel.get() );
+                                       SdrInsertReason 
aReason(SDRREASON_VIEWCALL);
+                                       
m_pPage->InsertObject(pObject,CONTAINER_APPEND,&aReason);
+
+                                                       Rectangle 
aRet(VCLPoint((*pCopiesIter)->getPosition()),VCLSize((*pCopiesIter)->getSize()));
                         aRet.setHeight(aRet.getHeight() + 1);
                         aRet.setWidth(aRet.getWidth() + 1);
                         bool bOverlapping = true;
@@ -320,23 +327,14 @@
                             if ( bOverlapping )
                             {
                                 aRet.Move(0,aRet.getHeight()+1);
-                                xClone->setPositionY(aRet.Top());
+                                                                       
(*pCopiesIter)->setPositionY(aRet.Top());
                             }
                         }
-                        if ( !bOverlapping )
-                        {
-                            m_xSection->add(xClone.get());
-                            SvxShape* pShape = SvxShape::getImplementation( 
xClone );
-                            SdrObject* pObject = pShape ? 
pShape->GetSdrObject() : NULL;
-                            OSL_ENSURE( pObject, "OReportSection::Paste: no 
SdrObject for the shape!" );
-                            if ( pObject )
-                            {
                                 m_pView->AddUndo( 
m_pView->GetModel()->GetSdrUndoFactory().CreateUndoNewObject( *pObject ) );
                                 m_pView->MarkObj( pObject, 
m_pView->GetSdrPageView() );
                             }
                         }
                     }
-                }
                 catch(uno::Exception&)
                 {
                     OSL_ENSURE(0,"Exception caught while pasting a new 
object!");
@@ -420,7 +418,7 @@
     const SdrMarkList& rMarkedList = m_pView->GetMarkedObjectList();
        const ULONG nMark = rMarkedList.GetMarkCount();
 
-    ::std::vector< uno::Reference<util::XCloneable> > aCopies;
+    ::std::vector< uno::Reference<report::XReportComponent> > aCopies;
     aCopies.reserve(nMark);
 
     SdrUndoFactory& rUndo = m_pView->GetModel()->GetSdrUndoFactory();
@@ -434,8 +432,8 @@
                {
             try
             {
-                uno::Reference<report::XReportComponent> xComponent = 
pObj->getReportComponent();
-                aCopies.push_back(xComponent->createClone());
+                SdrObject* pNeuObj = pSdrObject->Clone();
+                
aCopies.push_back(uno::Reference<report::XReportComponent>(pNeuObj->getUnoShape(),uno::UNO_QUERY));
                 if ( _bEraseAnddNoClone )
                 {
                     m_pView->AddUndo( rUndo.CreateUndoDeleteObject( 
*pSdrObject ) );
@@ -457,7 +455,7 @@
         _rAllreadyCopiedObjects.realloc( nLength + 1);
         beans::NamedValue* pNewValue = _rAllreadyCopiedObjects.getArray() + 
nLength;
         pNewValue->Name = m_xSection->getName();
-        pNewValue->Value <<= uno::Sequence< uno::Reference<util::XCloneable> 
>(&(*aCopies.begin()),aCopies.size());
+        pNewValue->Value <<= uno::Sequence< 
uno::Reference<report::XReportComponent> >(&(*aCopies.begin()),aCopies.size());
     }
 }
 //----------------------------------------------------------------------------

File [changed]: ViewsWindow.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ViewsWindow.cxx?r1=1.7&r2=1.7.22.1
Delta lines:  +5 -5
-------------------
--- ViewsWindow.cxx     2008-01-29 13:52:21+0000        1.7
+++ ViewsWindow.cxx     2008-03-12 09:45:18+0000        1.7.22.1
@@ -1456,6 +1456,7 @@
     OSL_ENSURE(aIter != aEnd,"This can never happen!");
     if ( _rPnt.Y() < 0 )
     {
+        if ( nCount )
         --aIter;
         for (; nCount && (_rPnt.Y() < 0); --nCount)
         {
@@ -1582,7 +1583,6 @@
             }
             pInSection->getSectionWindow()->Paste(aAllreadyCopiedObjects,true);
         }
-        
getView()->getReportView()->getController()->getUndoMgr()->LeaveListAction(); 
     }
     else
        {

File [changed]: dlgedfac.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/dlgedfac.cxx?r1=1.3&r2=1.3.4.1
Delta lines:  +5 -5
-------------------
--- dlgedfac.cxx        2008-03-05 18:13:41+0000        1.3
+++ dlgedfac.cxx        2008-03-12 09:45:18+0000        1.3.4.1
@@ -126,10 +126,10 @@
                 pObjFactory->pNewObj = new OCustomShape(SERVICE_SHAPE);
                 break;
             case OBJ_DLG_SUBREPORT:
-                pObjFactory->pNewObj = new OOle2Obj(SERVICE_REPORTDEFINITION);
+                pObjFactory->pNewObj = new 
OOle2Obj(SERVICE_REPORTDEFINITION,OBJ_DLG_SUBREPORT);
                 break;
             case OBJ_OLE2:
-                pObjFactory->pNewObj = new 
OOle2Obj(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument")));
+                pObjFactory->pNewObj = new 
OOle2Obj(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument")),OBJ_OLE2);
                 break;
                    default:
                            OSL_ENSURE(0,"Unknown object id");

File [changed]: dlgedfunc.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/dlgedfunc.cxx?r1=1.7&r2=1.7.4.1
Delta lines:  +18 -4
--------------------
--- dlgedfunc.cxx       2008-03-05 18:14:05+0000        1.7
+++ dlgedfunc.cxx       2008-03-12 09:45:18+0000        1.7.4.1
@@ -45,6 +45,8 @@
 #include <vcl/svapp.hxx>
 #include <svx/unolingu.hxx>
 #include <com/sun/star/linguistic2/XSpellChecker1.hpp>
+#include <com/sun/star/embed/EmbedStates.hpp>
+
 #include <svx/svdetc.hxx>
 #include <svx/editstat.hxx>
 #include <svx/svdoutl.hxx>
@@ -758,8 +760,20 @@
                    m_pParent->getViewsWindow()->BegMarkObj( m_aMDPos ,m_pView);
                }
         else
+        {
+            if ( aVEvt.pRootObj && aVEvt.pRootObj->GetObjIdentifier() == 
OBJ_OLE2 )
+            {
+                SdrOle2Obj* pObj = dynamic_cast<SdrOle2Obj*>(aVEvt.pRootObj);
+                pObj->AddOwnLightClient();
+                pObj->GetObjRef()->changeState( embed::EmbedStates::UI_ACTIVE 
);
+                
+            }
+            else
+            {
             m_pView->SdrBeginTextEdit( 
aVEvt.pRootObj,m_pView->GetSdrPageView(),m_pParent,sal_False );
     }
+        }
+    }
 
        return TRUE;
 }




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

Reply via email to