Tag: cws_src680_rpt23fix02 User: oj Date: 2007-07-26 08:15:47+0000 Modified: dba/reportdesign/source/core/api/Section.cxx dba/reportdesign/source/core/sdr/RptPage.cxx dba/reportdesign/source/ui/inc/GeometryHandler.hxx dba/reportdesign/source/ui/inspection/GeometryHandler.cxx
Log: #i77907# remove shapes when section is in disposing and dispose the shape afterwards File Changes: Directory: /dba/reportdesign/source/core/api/ ============================================= File [changed]: Section.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/Section.cxx?r1=1.2.4.1&r2=1.2.4.2 Delta lines: +11 -0 -------------------- --- Section.cxx 2007-07-24 12:48:02+0000 1.2.4.1 +++ Section.cxx 2007-07-26 08:15:44+0000 1.2.4.2 @@ -223,6 +223,17 @@ 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() ) + { + try + { + uno::Reference< drawing::XShape> xShape(m_xDrawPage->getByIndex(0),uno::UNO_QUERY); + m_xDrawPage->remove(xShape); + ::comphelper::disposeComponent(xShape); + } + catch(const uno::Exception&) + {} + } if ( pModel ) { uno::Reference< report::XSection> xSection = this; Directory: /dba/reportdesign/source/core/sdr/ ============================================= File [changed]: RptPage.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/sdr/RptPage.cxx?r1=1.2&r2=1.2.4.1 Delta lines: +4 -5 ------------------- --- RptPage.cxx 2007-07-09 11:56:16+0000 1.2 +++ RptPage.cxx 2007-07-26 08:15:44+0000 1.2.4.1 @@ -86,7 +86,6 @@ OReportPage::~OReportPage() { DBG_DTOR( rpt_OReportPage,NULL); - Clear(); } //---------------------------------------------------------------------------- Directory: /dba/reportdesign/source/ui/inc/ =========================================== File [changed]: GeometryHandler.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inc/GeometryHandler.hxx?r1=1.2&r2=1.2.4.1 Delta lines: +4 -4 ------------------- --- GeometryHandler.hxx 2007-07-09 11:56:30+0000 1.2 +++ GeometryHandler.hxx 2007-07-26 08:15:45+0000 1.2.4.1 @@ -152,7 +152,7 @@ virtual ::sal_Bool SAL_CALL suspend(::sal_Bool Suspend) throw (::com::sun::star::uno::RuntimeException); protected: - virtual ~GeometryHandler() {} + virtual ~GeometryHandler(); private: GeometryHandler(GeometryHandler &); // not defined void operator =(GeometryHandler &); // not defined Directory: /dba/reportdesign/source/ui/inspection/ ================================================== File [changed]: GeometryHandler.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/inspection/GeometryHandler.cxx?r1=1.2.4.2&r2=1.2.4.3 Delta lines: +16 -3 -------------------- --- GeometryHandler.cxx 2007-07-25 14:07:01+0000 1.2.4.2 +++ GeometryHandler.cxx 2007-07-26 08:15:45+0000 1.2.4.3 @@ -295,12 +295,13 @@ aParser = ReportFormula( bIsField || bIsParam ? ReportFormula::Field : ReportFormula::Expression, sName ); return aParser.getCompleteFormula(); } - +DBG_NAME(rpt_GeometryHandler) GeometryHandler::GeometryHandler(uno::Reference< uno::XComponentContext > const & context) : GeometryHandler_Base(m_aMutex), m_xContext(context), m_pInfoService(new OPropertyInfoService()) { + DBG_CTOR(rpt_GeometryHandler,NULL); try { uno::Reference< lang::XMultiComponentFactory > xFac = m_xContext->getServiceManager(); @@ -311,7 +312,11 @@ { } } - +// ----------------------------------------------------------------------------- +GeometryHandler::~GeometryHandler() +{ + DBG_DTOR(rpt_GeometryHandler,NULL); +} //------------------------------------------------------------------------ ::rtl::OUString SAL_CALL GeometryHandler::getImplementationName( ) throw(uno::RuntimeException) { @@ -355,7 +360,15 @@ // disposed, do it here. void SAL_CALL GeometryHandler::disposing() { + try + { ::comphelper::disposeComponent(m_xFormComponentHandler); + ::comphelper::disposeComponent(m_xTypeConverter); + m_xReportComponent.clear(); + m_xRowSet.clear(); + } + catch(uno::Exception&) + {} } void SAL_CALL GeometryHandler::addEventListener(const uno::Reference< lang::XEventListener > & xListener) throw (uno::RuntimeException) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
