Tag: cws_dev300_dba31a
User: oj      
Date: 2008-07-10 06:44:45+0000
Modified:
   dba/reportdesign/source/core/api/ReportDefinition.cxx
   dba/reportdesign/source/core/inc/Tools.hxx
   dba/reportdesign/source/core/sdr/RptModel.cxx
   dba/reportdesign/source/core/sdr/RptObject.cxx

Log:
 #i88727# new area prop for shapes and some model changes

File Changes:

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.10&r2=1.10.4.1
Delta lines:  +28 -5
--------------------
--- ReportDefinition.cxx        2008-06-25 14:15:35+0000        1.10
+++ ReportDefinition.cxx        2008-07-10 06:44:41+0000        1.10.4.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: ReportDefinition.cxx,v $
- * $Revision: 1.10 $
+ * $Revision: 1.10.4.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -1394,6 +1394,19 @@
     aDelegatorArguments.realloc(nArgsLen+1);
     aDelegatorArguments[nArgsLen++] <<= xInfoSet;
 
+     uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
+    uno::Reference< document::XGraphicObjectResolver >      xGrfResolver;
+    SvXMLGraphicHelper* pGraphicHelper = 
SvXMLGraphicHelper::Create(_xStorageToSaveTo,GRAPHICHELPER_MODE_WRITE);
+    xGrfResolver = pGraphicHelper;
+    pGraphicHelper->release();
+    SvXMLEmbeddedObjectHelper* pEmbeddedObjectHelper = 
SvXMLEmbeddedObjectHelper::Create( _xStorageToSaveTo,*this, 
EMBEDDEDOBJECTHELPER_MODE_WRITE );
+    xObjectResolver = pEmbeddedObjectHelper;
+    pEmbeddedObjectHelper->release();
+
+    aDelegatorArguments.realloc(nArgsLen+2);
+    aDelegatorArguments[nArgsLen++] <<= xGrfResolver;
+    aDelegatorArguments[nArgsLen++] <<= xObjectResolver;
+
        uno::Reference<XComponent> 
xCom(static_cast<OWeakObject*>(this),uno::UNO_QUERY);
        if( !bErr )
        {
@@ -2007,7 +2020,7 @@
     return m_pImpl->m_pReportModel;
 }
 // 
-----------------------------------------------------------------------------
-::boost::shared_ptr<rptui::OReportModel> 
OReportDefinition::getSdrModel(uno::Reference< report::XReportDefinition >& 
_xReportDefinition)
+::boost::shared_ptr<rptui::OReportModel> OReportDefinition::getSdrModel(const 
uno::Reference< report::XReportDefinition >& _xReportDefinition)
 {
     ::boost::shared_ptr<rptui::OReportModel> pReportModel;
     uno::Reference< lang::XUnoTunnel > xUT( _xReportDefinition, uno::UNO_QUERY 
);
@@ -2181,9 +2194,19 @@
     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.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ImportGraphicObjectResolver"))
 == 0 )
-        return static_cast< ::cppu::OWeakObject* >(new SvXMLGraphicHelper( 
GRAPHICHELPER_MODE_READ ));
+    {
+        SvXMLGraphicHelper* pGraphicHelper = 
SvXMLGraphicHelper::Create(m_pImpl->m_xStorage,GRAPHICHELPER_MODE_WRITE);
+        uno::Reference< uno::XInterface> xRet(static_cast< 
::cppu::OWeakObject* >(pGraphicHelper));
+        pGraphicHelper->release();
+        return xRet;
+    }
     else if ( aServiceSpecifier.reverseCompareToAsciiL( 
RTL_CONSTASCII_STRINGPARAM("com.sun.star.document.ExportGraphicObjectResolver"))
 == 0 )
-        return static_cast< ::cppu::OWeakObject* >(new SvXMLGraphicHelper( 
GRAPHICHELPER_MODE_WRITE ));
+    {
+        SvXMLGraphicHelper* pGraphicHelper = 
SvXMLGraphicHelper::Create(m_pImpl->m_xStorage,GRAPHICHELPER_MODE_WRITE);
+        uno::Reference< uno::XInterface> xRet(static_cast< 
::cppu::OWeakObject* >(pGraphicHelper));
+        pGraphicHelper->release();
+        return xRet;
+    }
     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 ));

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

File [changed]: Tools.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/inc/Tools.hxx?r1=1.4&r2=1.4.30.1
Delta lines:  +4 -4
-------------------
--- Tools.hxx   2008-04-10 18:21:57+0000        1.4
+++ Tools.hxx   2008-07-10 06:44:42+0000        1.4.30.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: Tools.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.30.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -93,7 +93,7 @@
     public:
         template<typename T> static void setSize(const 
::com::sun::star::awt::Size& aSize,T* _pShape)
         {
-            OSL_ENSURE(aSize.Width > 0 && aSize.Height > 0,"Illegal with or 
height!");
+            OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal with or 
height!");
 
             ::osl::MutexGuard aGuard(_pShape->m_aMutex);
             if ( _pShape->m_aProps.aComponent.m_xShape.is() )
@@ -112,7 +112,7 @@
             if ( _pShape->m_aProps.aComponent.m_xShape.is() )
             {
                 ::com::sun::star::awt::Size aSize = 
_pShape->m_aProps.aComponent.m_xShape->getSize();
-                OSL_ENSURE(aSize.Width > 0 && aSize.Height > 0,"Illegal with 
or height!");
+                OSL_ENSURE(aSize.Width >= 0 && aSize.Height >= 0,"Illegal with 
or height!");
                 return aSize;
             }
                return 
::com::sun::star::awt::Size(_pShape->m_aProps.aComponent.m_nWidth,_pShape->m_aProps.aComponent.m_nHeight);

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

File [changed]: RptModel.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/sdr/RptModel.cxx?r1=1.4&r2=1.4.30.1
Delta lines:  +5 -3
-------------------
--- RptModel.cxx        2008-04-10 18:26:29+0000        1.4
+++ RptModel.cxx        2008-07-10 06:44:42+0000        1.4.30.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: RptModel.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.30.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -33,6 +33,8 @@
 #include "RptPage.hxx"
 #include <dbaccess/singledoccontroller.hxx>
 #include <tools/debug.hxx>
+#include <svtools/pathoptions.hxx>
+
 #include "UndoActions.hxx"
 #include "UndoEnv.hxx"
 #include "ReportUndoFactory.hxx"
@@ -57,7 +59,7 @@
 //----------------------------------------------------------------------------
 
 OReportModel::OReportModel(::reportdesign::OReportDefinition* 
_pReportDefinition) :
-       SdrModel(NULL,_pReportDefinition)
+       SdrModel(SvtPathOptions().GetPalettePath(),NULL,_pReportDefinition)
        ,m_pController(NULL)
     ,m_pReportDefinition(_pReportDefinition)
 {

File [changed]: RptObject.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/sdr/RptObject.cxx?r1=1.8.26.3&r2=1.8.26.4
Delta lines:  +2 -3
-------------------
--- RptObject.cxx       2008-06-24 12:06:44+0000        1.8.26.3
+++ RptObject.cxx       2008-07-10 06:44:42+0000        1.8.26.4
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: RptObject.cxx,v $
- * $Revision: 1.8.26.3 $
+ * $Revision: 1.8.26.4 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -495,7 +495,6 @@
        SetPropsFromRect(rRect);
 }
 //----------------------------------------------------------------------------
-
 FASTBOOL OCustomShape::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
 {
        FASTBOOL bResult = SdrObjCustomShape::EndCreate(rStat, eCmd);




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

Reply via email to