User: rt      
Date: 2008-06-16 13:30:12+0000
Modified:
   dba/reportdesign/source/core/api/Shape.cxx

Log:
 INTEGRATION: CWS rptchart02 (1.4.4); FILE MERGED
 2008/04/30 13:03:34 oj 1.4.4.3: #i88843# impl clone method
 2008/04/16 06:28:00 oj 1.4.4.2: RESYNC: (1.4-1.5); FILE MERGED
 2008/03/12 09:45:16 oj 1.4.4.1: impl chart handling

File Changes:

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

File [changed]: Shape.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/Shape.cxx?r1=1.5&r2=1.6
Delta lines:  +35 -11
---------------------
--- Shape.cxx   2008-04-10 18:15:07+0000        1.5
+++ Shape.cxx   2008-06-16 13:30:10+0000        1.6
@@ -28,23 +28,25 @@
  *
  ************************************************************************/
 #include "Shape.hxx"
+
+#include <com/sun/star/beans/NamedValue.hpp>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
-#ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
-#include "corestrings.hrc"
-#endif
 #include <com/sun/star/beans/XPropertyState.hpp>
-#ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
-#include "core_resource.hrc"
-#endif
-#include "core_resource.hxx"
+#include <com/sun/star/text/ParagraphVertAlign.hpp>
+#include <comphelper/property.hxx>
 #include <comphelper/sequence.hxx>
 #include <tools/debug.hxx>
-#include <comphelper/property.hxx>
+#include <tools/diagnose_ex.h>
+#include <boost/bind.hpp>
+#include <svx/unoshape.hxx>
+
+#include "corestrings.hrc"
+#include "core_resource.hrc"
+#include "core_resource.hxx"
 #include "Tools.hxx"
+#include "RptObject.hxx"
 #include "FormatCondition.hxx"
-#include <com/sun/star/text/ParagraphVertAlign.hpp>
 #include "ReportHelperImpl.hxx"
-#include <boost/bind.hpp>
 // 
=============================================================================
 namespace reportdesign
 {
@@ -311,7 +313,29 @@
 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;
+    try
+    {
+           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 );
+
+                    // ::comphelper::copyProperties(xSource.get(),xSet.get());
+                           }
+                   }
+           } // if ( pShape )
+    }
+    catch(const uno::Exception&)
+    {
+        DBG_UNHANDLED_EXCEPTION();
+    }
        return xSet.get();
 }
 // 
-----------------------------------------------------------------------------




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

Reply via email to