ooo-build r15562 - trunk/patches/dev300
- From: rengelhard svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15562 - trunk/patches/dev300
- Date: Wed, 18 Mar 2009 09:20:51 +0000 (UTC)
Author: rengelhard
Date: Wed Mar 18 09:20:51 2009
New Revision: 15562
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15562&view=rev
Log:
actually add
Added:
trunk/patches/dev300/cws-dba31k.diff
Added: trunk/patches/dev300/cws-dba31k.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/cws-dba31k.diff Wed Mar 18 09:20:51 2009
@@ -0,0 +1,417 @@
+Index: reportdesign/source/core/sdr/ReportDrawPage.cxx
+===================================================================
+--- reportdesign/source/core/sdr/ReportDrawPage.cxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/sdr/ReportDrawPage.cxx (.../cws/dba31k) (Revision 269606)
+@@ -30,6 +30,7 @@
+
+ #include "ReportDrawPage.hxx"
+ #include "RptObject.hxx"
++#include "RptModel.hxx"
+ #include "RptDef.hxx"
+ #include "corestrings.hrc"
+ #include <comphelper/mimeconfighelper.hxx>
+@@ -143,20 +144,8 @@
+
+ try
+ {
+- uno::Sequence< uno::Any > aArgs(bChangeOrientation ? 2 : 1);
+- {
+- beans::NamedValue aValue;
+- aValue.Name = PROPERTY_SHAPE;
+- aValue.Value <<= xShape; xShape.clear(); // keep exactly *one* reference!
+- aArgs[0] <<= aValue;
+- if ( bChangeOrientation )
+- {
+- aValue.Name = PROPERTY_ORIENTATION;
+- aValue.Value <<= sal_Int32(0);
+- aArgs[1] <<= aValue;
+- }
+- }
+- xRet.set( xFactory->createInstanceWithArguments( sServiceName, aArgs ), uno::UNO_QUERY_THROW );
++ OReportModel* pRptModel = static_cast<OReportModel*>(pObj->GetModel());
++ xRet.set( pRptModel->createShape(sServiceName,xShape,bChangeOrientation ? 0 : -1), uno::UNO_QUERY_THROW );
+ }
+ catch( const uno::Exception& )
+ {
+Index: reportdesign/source/core/sdr/RptModel.cxx
+===================================================================
+--- reportdesign/source/core/sdr/RptModel.cxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/sdr/RptModel.cxx (.../cws/dba31k) (Revision 269606)
+@@ -48,10 +48,15 @@
+ #include "rptui_slotid.hrc"
+ #include "RptDef.hxx"
+ #include "corestrings.hrc"
++#include "FixedLine.hxx"
++#include "FormattedField.hxx"
++#include "FixedText.hxx"
++#include "ImageControl.hxx"
++#include "Shape.hxx"
+
+ namespace rptui
+ {
+-
++using namespace reportdesign;
+ using namespace com::sun::star;
+ DBG_NAME( rpt_OReportModel )
+ TYPEINIT1(OReportModel,SdrModel);
+@@ -179,6 +184,53 @@
+ {
+ return uno::Reference< uno::XInterface >(getReportDefinition(),uno::UNO_QUERY);
+ }
++// -----------------------------------------------------------------------------
++uno::Reference< uno::XInterface > OReportModel::createShape(const ::rtl::OUString& aServiceSpecifier,uno::Reference< drawing::XShape >& _rShape,sal_Int32 nOrientation)
++{
++ uno::Reference< uno::XInterface > xRet;
++ if ( _rShape.is() )
++ {
++ if ( aServiceSpecifier == SERVICE_FORMATTEDFIELD )
++ {
++ uno::Reference<report::XFormattedField> xProp = new OFormattedField(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape);
++ xRet = xProp;
++ if ( _rShape.is() )
++ throw uno::Exception();
++ xProp->setPropertyValue( PROPERTY_FORMATSSUPPLIER, uno::makeAny(uno::Reference< util::XNumberFormatsSupplier >(*m_pReportDefinition,uno::UNO_QUERY)) );
++ }
++ else if ( aServiceSpecifier == SERVICE_FIXEDTEXT)
++ {
++ xRet = static_cast<cppu::OWeakObject*>(new OFixedText(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape));
++ if ( _rShape.is() )
++ throw uno::Exception();
++ }
++ else if ( aServiceSpecifier == SERVICE_FIXEDLINE)
++ {
++ xRet = static_cast<cppu::OWeakObject*>(new OFixedLine(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape,nOrientation));
++ if ( _rShape.is() )
++ throw uno::Exception();
++ }
++ else if ( aServiceSpecifier == SERVICE_IMAGECONTROL )
++ {
++ xRet = static_cast<cppu::OWeakObject*>(new OImageControl(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape));
++ if ( _rShape.is() )
++ throw uno::Exception();
++ }
++ else if ( aServiceSpecifier == SERVICE_REPORTDEFINITION )
++ {
++ xRet = static_cast<cppu::OWeakObject*>(new OReportDefinition(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape));
++ if ( _rShape.is() )
++ throw uno::Exception();
++ }
++ else if ( _rShape.is() )
++ {
++ xRet = static_cast<cppu::OWeakObject*>(new OShape(m_pReportDefinition->getContext(),m_pReportDefinition,_rShape,aServiceSpecifier));
++ if ( _rShape.is() )
++ throw uno::Exception();
++ }
++ }
++ return xRet;
++}
+ //==================================================================
+ } //rptui
+ //==================================================================
+Index: reportdesign/source/core/api/ImageControl.cxx
+===================================================================
+--- reportdesign/source/core/api/ImageControl.cxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/api/ImageControl.cxx (.../cws/dba31k) (Revision 269606)
+@@ -182,10 +182,6 @@
+ {
+ ImageControlPropertySet::dispose();
+ cppu::WeakComponentImplHelperBase::dispose();
+- uno::Reference< report::XImageControl> xHoldAlive = this;
+- {
+- m_aProps.dispose(m_refCount);
+- }
+ }
+ // -----------------------------------------------------------------------------
+ ::rtl::OUString OImageControl::getImplementationName_Static( ) throw(uno::RuntimeException)
+Index: reportdesign/source/core/api/ReportDefinition.cxx
+===================================================================
+--- reportdesign/source/core/api/ReportDefinition.cxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/api/ReportDefinition.cxx (.../cws/dba31k) (Revision 269606)
+@@ -705,7 +705,6 @@
+ {
+ ReportDefinitionPropertySet::dispose();
+ cppu::WeakComponentImplHelperBase::dispose();
+- m_aProps->dispose(m_refCount);
+ }
+ // -----------------------------------------------------------------------------
+ void SAL_CALL OReportDefinition::disposing()
+@@ -2069,68 +2068,19 @@
+ ::osl::MutexGuard aGuard(m_aMutex);
+ ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
+
+-
+- uno::Reference< drawing::XShape > xShape;
+- uno::Reference< embed::XStorage > xStorage;
+- sal_Int32 nOrientation = 1;
+- const uno::Any* pIter = _aArgs.getConstArray();
+- const uno::Any* pEnd = pIter + _aArgs.getLength();
+- for(;pIter != pEnd ;++pIter)
+- {
+- beans::NamedValue aValue;
+- *pIter >>= aValue;
+- if ( aValue.Name == PROPERTY_SHAPE )
+- xShape.set(aValue.Value,uno::UNO_QUERY);
+- else if ( aValue.Name == PROPERTY_ORIENTATION )
+- aValue.Value >>= nOrientation;
+- else if( aValue.Name.equalsAscii( "Storage" ) )
+- aValue.Value >>= xStorage;
+- }
+-
+ uno::Reference< uno::XInterface > xRet;
+- if ( xShape.is() )
++ if ( aServiceSpecifier.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportEmbeddedObjectResolver"))) == 0 )
+ {
+- if ( aServiceSpecifier == SERVICE_FORMATTEDFIELD )
++ uno::Reference< embed::XStorage > xStorage;
++ const uno::Any* pIter = _aArgs.getConstArray();
++ const uno::Any* pEnd = pIter + _aArgs.getLength();
++ for(;pIter != pEnd ;++pIter)
+ {
+- uno::Reference<report::XFormattedField> xProp = new OFormattedField(m_aProps->m_xContext,this,xShape);
+- xRet = xProp;
+- if ( xShape.is() )
+- throw uno::Exception();
+- xProp->setPropertyValue( PROPERTY_FORMATSSUPPLIER, uno::makeAny(uno::Reference< util::XNumberFormatsSupplier >(*this,uno::UNO_QUERY)) );
+- }
+- else if ( aServiceSpecifier == SERVICE_FIXEDTEXT)
+- {
+- xRet = static_cast<cppu::OWeakObject*>(new OFixedText(m_aProps->m_xContext,this,xShape));
+- if ( xShape.is() )
+- throw uno::Exception();
+- }
+- else if ( aServiceSpecifier == SERVICE_FIXEDLINE)
+- {
+- xRet = static_cast<cppu::OWeakObject*>(new OFixedLine(m_aProps->m_xContext,this,xShape,nOrientation));
+- if ( xShape.is() )
+- throw uno::Exception();
+- }
+- else if ( aServiceSpecifier == SERVICE_IMAGECONTROL )
+- {
+- xRet = static_cast<cppu::OWeakObject*>(new OImageControl(m_aProps->m_xContext,this,xShape));
+- if ( xShape.is() )
+- throw uno::Exception();
+- }
+- else if ( aServiceSpecifier == SERVICE_REPORTDEFINITION )
+- {
+- xRet = static_cast<cppu::OWeakObject*>(new OReportDefinition(m_aProps->m_xContext,this,xShape));
+- if ( xShape.is() )
+- throw uno::Exception();
+- }
+- else if ( xShape.is() )
+- {
+- xRet = static_cast<cppu::OWeakObject*>(new OShape(m_aProps->m_xContext,this,xShape,aServiceSpecifier));
+- if ( xShape.is() )
+- throw uno::Exception();
+- }
+- }
+- else if ( aServiceSpecifier.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportEmbeddedObjectResolver"))) == 0 )
+- {
++ beans::NamedValue aValue;
++ *pIter >>= aValue;
++ if( aValue.Name.equalsAscii( "Storage" ) )
++ aValue.Value >>= xStorage;
++ } // for(;pIter != pEnd ;++pIter)
+ m_pImpl->m_pObjectContainer->SwitchPersistence(xStorage);
+ xRet = static_cast< ::cppu::OWeakObject* >(SvXMLEmbeddedObjectHelper::Create( xStorage,*this, EMBEDDEDOBJECTHELPER_MODE_READ ));
+ }
+@@ -2256,19 +2206,7 @@
+ else
+ xShape.set(SvxUnoDrawMSFactory::createInstance( aServiceSpecifier ),uno::UNO_QUERY_THROW);
+
+-
+- uno::Reference< uno::XInterface > xReturn;
+- {
+- uno::Sequence< uno::Any > aArgs(1);
+- {
+- beans::NamedValue aValue;
+- aValue.Name = PROPERTY_SHAPE;
+- aValue.Value <<= xShape; xShape.clear(); // keep exactly *one* reference!
+- aArgs[0] <<= aValue;
+- }
+- xReturn = createInstanceWithArguments(aServiceSpecifier,aArgs);
+- }
+- return xReturn;
++ return m_pImpl->m_pReportModel->createShape(aServiceSpecifier,xShape);
+ }
+ //-----------------------------------------------------------------------------
+ uno::Sequence< ::rtl::OUString > SAL_CALL OReportDefinition::getAvailableServiceNames(void) throw( uno::RuntimeException )
+@@ -2770,6 +2708,11 @@
+ }
+ return m_pImpl->m_xDocumentProperties;
+ }
++// -----------------------------------------------------------------------------
++uno::Reference< uno::XComponentContext > OReportDefinition::getContext() const
++{
++ return m_aProps->m_xContext;
++}
+ // =============================================================================
+ }// namespace reportdesign
+ // =============================================================================
+Index: reportdesign/source/core/api/FormattedField.cxx
+===================================================================
+--- reportdesign/source/core/api/FormattedField.cxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/api/FormattedField.cxx (.../cws/dba31k) (Revision 269606)
+@@ -116,12 +116,8 @@
+ {
+ FormattedFieldPropertySet::dispose();
+ cppu::WeakComponentImplHelperBase::dispose();
+- uno::Reference< report::XFormattedField> xHoldAlive = this;
+- {
+- m_xFormatsSupplier.clear();
+- m_xFunction.clear();
+- m_aProps.dispose(m_refCount);
+- }
++ m_xFormatsSupplier.clear();
++ m_xFunction.clear();
+ }
+ // -----------------------------------------------------------------------------
+ ::rtl::OUString OFormattedField::getImplementationName_Static( ) throw(uno::RuntimeException)
+Index: reportdesign/source/core/api/ReportControlModel.cxx
+===================================================================
+--- reportdesign/source/core/api/ReportControlModel.cxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/api/ReportControlModel.cxx (.../cws/dba31k) (Revision 269606)
+@@ -152,13 +152,12 @@
+ throw lang::IndexOutOfBoundsException();
+ }
+ // -----------------------------------------------------------------------------
+-void OReportControlModel::dispose(oslInterlockedCount& _rRefCount)
++void OReportControlModel::dispose()
+ {
+ m_aFormatConditions.clear();
+ lang::EventObject aDisposeEvent( m_pOwner );
+ aContainerListeners.disposeAndClear( aDisposeEvent );
+ m_aFormatConditions.clear();
+- aComponent.dispose(_rRefCount);
+ }
+ // -----------------------------------------------------------------------------
+ bool OReportControlModel::isInterfaceForbidden(const uno::Type& _rType)
+Index: reportdesign/source/core/api/ReportComponent.cxx
+===================================================================
+--- reportdesign/source/core/api/ReportComponent.cxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/api/ReportComponent.cxx (.../cws/dba31k) (Revision 269606)
+@@ -41,7 +41,7 @@
+ #include "ReportControlModel.hxx"
+ #include <com/sun/star/reflection/XProxyFactory.hpp>
+ #include <com/sun/star/text/ParagraphVertAlign.hpp>
+-#include <svx/unoshape.hxx>
++// #include <svx/unoshape.hxx>
+ #include <svx/unolingu.hxx>
+ #include <svtools/syslocale.hxx>
+ #include <svtools/lingucfg.hxx>
+@@ -122,10 +122,6 @@
+ {
+ osl_incrementInterlockedCount( &_rRefCount );
+ {
+- // decrement the count from ReportDrawPage.cxx aArgs[0] <<= SvxDrawPage::_CreateShape( pObj );
+- SvxShape* pShape = SvxShape::getImplementation( _xShape );
+- if ( pShape )
+- pShape->release();
+ m_xProxy.set(_xShape,uno::UNO_QUERY);
+ ::comphelper::query_aggregation(m_xProxy,m_xShape);
+ ::comphelper::query_aggregation(m_xProxy,m_xProperty);
+@@ -138,23 +134,9 @@
+ if ( m_xProxy.is() )
+ m_xProxy->setDelegator( _xTunnel );
+ }
+- // do not decrement the refcount again, this will be done from the any ReportDrawPage.cxx aArgs[0] <<= SvxDrawPage::_CreateShape( pObj ); , otherwise it will delete the object
+- //osl_decrementInterlockedCount( &_rRefCount );
++ osl_decrementInterlockedCount( &_rRefCount );
+ }
+ // -----------------------------------------------------------------------------
+-void OReportComponentProperties::dispose(oslInterlockedCount& _rRefCount)
+-{
+- if ( m_xProxy.is() )
+- osl_decrementInterlockedCount( &_rRefCount );
+- //m_xShape.clear();
+- //m_xTypeProvider.clear();
+- //m_xUnoTunnel.clear();
+- //m_xServiceInfo.clear();
+- //m_xProperty.clear();
+- m_xContext.clear();
+- m_xFactory.clear();
+-}
+-// -----------------------------------------------------------------------------
+ OReportComponentProperties::~OReportComponentProperties()
+ {
+ if ( m_xProxy.is() )
+Index: reportdesign/source/core/api/Shape.cxx
+===================================================================
+--- reportdesign/source/core/api/Shape.cxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/api/Shape.cxx (.../cws/dba31k) (Revision 269606)
+@@ -126,10 +126,6 @@
+ {
+ ShapePropertySet::dispose();
+ cppu::WeakComponentImplHelperBase::dispose();
+- uno::Reference< report::XShape> xHoldAlive = this;
+- {
+- m_aProps.dispose(m_refCount);
+- }
+ }
+ // -----------------------------------------------------------------------------
+ ::rtl::OUString OShape::getImplementationName_Static( ) throw(uno::RuntimeException)
+Index: reportdesign/source/core/api/FixedText.cxx
+===================================================================
+--- reportdesign/source/core/api/FixedText.cxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/api/FixedText.cxx (.../cws/dba31k) (Revision 269606)
+@@ -110,9 +110,6 @@
+ FixedTextPropertySet::dispose();
+ cppu::WeakComponentImplHelperBase::dispose();
+ uno::Reference< report::XFixedText> xHoldAlive = this;
+- {
+- m_aProps.dispose(m_refCount);
+- }
+ }
+ // -----------------------------------------------------------------------------
+ ::rtl::OUString OFixedText::getImplementationName_Static( ) throw(uno::RuntimeException)
+Index: reportdesign/source/core/inc/ReportControlModel.hxx
+===================================================================
+--- reportdesign/source/core/inc/ReportControlModel.hxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/inc/ReportControlModel.hxx (.../cws/dba31k) (Revision 269606)
+@@ -115,7 +115,7 @@
+ ,bPrintWhenGroupChange(sal_False)
+ {}
+
+- void dispose(oslInterlockedCount& _rRefCount);
++ void dispose();
+
+ // XContainer
+ void addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+Index: reportdesign/source/core/inc/ReportComponent.hxx
+===================================================================
+--- reportdesign/source/core/inc/ReportComponent.hxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/source/core/inc/ReportComponent.hxx (.../cws/dba31k) (Revision 269606)
+@@ -85,8 +85,6 @@
+ void setShape(::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _xShape
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent>& _xTunnel
+ ,oslInterlockedCount& _rRefCount);
+-
+- void dispose(oslInterlockedCount& _rRefCount);
+ };
+ }
+ #endif // RPT_REPORTCOMPONENT_HXX
+Index: reportdesign/inc/ReportDefinition.hxx
+===================================================================
+--- reportdesign/inc/ReportDefinition.hxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/inc/ReportDefinition.hxx (.../cws/dba31k) (Revision 269606)
+@@ -364,6 +364,8 @@
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > getInteractionHandler() const;
+ virtual bool isEnableSetModified() const;
+
++ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getContext() const;
++
+ private:
+ /** loads the report definition from the given storage
+
+Index: reportdesign/inc/RptModel.hxx
+===================================================================
+--- reportdesign/inc/RptModel.hxx (.../tags/OOO310_m5) (Revision 269606)
++++ reportdesign/inc/RptModel.hxx (.../cws/dba31k) (Revision 269606)
+@@ -96,6 +96,8 @@
+ /// returns the XReportDefinition which the OReportModel belongs to
+ ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >
+ getReportDefinition() const;
++
++ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createShape(const ::rtl::OUString& aServiceSpecifier,::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rShape,sal_Int32 nOrientation = -1);
+ };
+ }
+ #endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]