User: ihi     
Date: 2007-11-20 18:57:56+0000
Modified:
   dba/reportdesign/source/core/api/ReportDefinition.cxx

Log:
 INTEGRATION: CWS reportdesign01 (1.4.20); FILE MERGED
 2007/09/20 10:49:28 oj 1.4.20.2: #i79167# use named value
 2007/09/06 09:07:43 oj 1.4.20.1: #i77507# check for width, height of a fixed 
line

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.4&r2=1.5
Delta lines:  +18 -6
--------------------
--- ReportDefinition.cxx        2007-08-03 09:53:39+0000        1.4
+++ ReportDefinition.cxx        2007-11-20 18:57:54+0000        1.5
@@ -2099,10 +2099,18 @@
     ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
 
     uno::Reference< drawing::XShape > xShape;
+    sal_Int32 nOrientation = 1;
     const uno::Any* pIter = _aArgs.getConstArray();
     const uno::Any* pEnd         = pIter + _aArgs.getLength();
-    for(;pIter != pEnd && !xShape.is();++pIter)
-        xShape.set(*pIter,uno::UNO_QUERY);
+    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;
+    }
 
     uno::Reference< uno::XInterface > xReportComponent;
     if ( xShape.is() )
@@ -2123,7 +2131,7 @@
         }
         else if ( aServiceSpecifier == SERVICE_FIXEDLINE)
         {
-            xReportComponent = static_cast<cppu::OWeakObject*>(new 
OFixedLine(m_aProps->m_xContext,this,xShape));
+            xReportComponent = static_cast<cppu::OWeakObject*>(new 
OFixedLine(m_aProps->m_xContext,this,xShape,nOrientation));
             if ( xShape.is() )
                 throw uno::Exception();
         }
@@ -2197,8 +2205,12 @@
     uno::Reference< uno::XInterface > xReturn;
     {
         uno::Sequence< uno::Any > aArgs(1);
-        aArgs[0] <<= xShape;
-        xShape.clear();
+        {
+            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;




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

Reply via email to