User: hr      
Date: 2007-08-03 12:45:24+0000
Modified:
   dba/reportdesign/source/ui/inspection/GeometryHandler.cxx

Log:
 INTEGRATION: CWS rpt23fix02 (1.2.4); FILE MERGED
 2007/07/30 05:36:11 oj 1.2.4.4: #80161# apply gcc3 patch for strings
 2007/07/26 08:15:45 oj 1.2.4.3: #i77907# remove shapes when section is in 
disposing and dispose the shape afterwards
 2007/07/25 14:07:01 oj 1.2.4.2: #i77721# #i79958# dnd and selection across 
sections impl
 2007/07/24 12:48:06 oj 1.2.4.1: merge from rpt23fix01

File Changes:

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.3&r2=1.4
Delta lines:  +23 -8
--------------------
--- GeometryHandler.cxx 2007-08-02 14:38:38+0000        1.3
+++ GeometryHandler.cxx 2007-08-03 12:45:21+0000        1.4
@@ -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)
 {
@@ -658,9 +671,8 @@
         if ( nDisplayUnit != -1 )
             xNumericControl->setDisplayUnit( nDisplayUnit );
         uno::Reference< report::XReportComponent> 
xComp(m_xReportComponent,uno::UNO_QUERY);
-        if ( xComp.is() )
+        if ( xComp.is() && xComp->getSection().is() )
         {
-            OSL_ENSURE(xComp->getSection().is(),"No Section!");
             uno::Reference< report::XReportDefinition > xReport = 
xComp->getSection()->getReportDefinition();
             OSL_ENSURE(xReport.is(),"Why is the report definition NULL!");
             if ( xReport.is() )
@@ -832,6 +844,7 @@
                 sal_Int32 nPosX = 0;
                 aPropertyValue >>= nPosX;
                 uno::Reference< report::XReportComponent> 
xSourceReportComponent(m_xReportComponent,uno::UNO_QUERY);
+                if ( xSourceReportComponent->getSection().is() )
                 nPosX += 
getStyleProperty<sal_Int32>(xSourceReportComponent->getSection()->getReportDefinition(),PROPERTY_LEFTMARGIN);
                 aPropertyValue <<= nPosX;
             }
@@ -921,6 +934,7 @@
                 sal_Int32 nPosX = 0;
                 aPropertyValue >>= nPosX;
                 uno::Reference< report::XReportComponent> 
xSourceReportComponent(m_xReportComponent,uno::UNO_QUERY);
+                if ( xSourceReportComponent->getSection().is() )
                 nPosX -= 
getStyleProperty<sal_Int32>(xSourceReportComponent->getSection()->getReportDefinition(),PROPERTY_LEFTMARGIN);
                 aPropertyValue <<= nPosX;
                 aControlValue = 
m_xFormComponentHandler->convertToControlValue(PropertyName, aPropertyValue, 
_rControlValueType);
@@ -1167,7 +1181,8 @@
             return false;
         }
 
-        const ::rtl::OUString sPropertyUIName( 
String(ModuleRes(RID_STR_FILTER)) );
+        String aGcc3WorkaroundTemporary( ModuleRes(RID_STR_FILTER));
+        const ::rtl::OUString sPropertyUIName( aGcc3WorkaroundTemporary );
         // initialize the dialog
         uno::Reference< beans::XPropertySet > xDialogProps( xDialog, 
uno::UNO_QUERY_THROW );
         xDialogProps->setPropertyValue( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "QueryComposer" ) ), uno::makeAny( xComposer ) );




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

Reply via email to