ooo-build r12942 - trunk/patches/test/vba



Author: noelpwer
Date: Mon Jun 23 16:34:02 2008
New Revision: 12942
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12942&view=rev

Log:
add support for converting XL addresse to
"com.sun.star.table.Cell[Range]AddressConversion"


Modified:
   trunk/patches/test/vba/ObjectModule.diff

Modified: trunk/patches/test/vba/ObjectModule.diff
==============================================================================
--- trunk/patches/test/vba/ObjectModule.diff	(original)
+++ trunk/patches/test/vba/ObjectModule.diff	Mon Jun 23 16:34:02 2008
@@ -1125,6 +1125,19 @@
  	ModuleSizeExceededRequest.idl\
  
  # ------------------------------------------------------------------
+diff --git sc/inc/addruno.hxx sc/inc/addruno.hxx
+index bc9391a..fad1f03 100644
+--- sc/inc/addruno.hxx
++++ sc/inc/addruno.hxx
+@@ -50,7 +50,7 @@ private:
+     sal_Int32               nRefSheet;
+     sal_Bool                bIsRange;
+ 
+-    sal_Bool                ParseUIString( const String& rUIString );
++    sal_Bool                ParseUIString( const String& rUIString, ScAddress::Convention eConv = ScAddress::CONV_OOO );
+ 
+ public:
+ 
 diff --git sc/inc/document.hxx sc/inc/document.hxx
 index d32e28c..e23cbfd 100644
 --- sc/inc/document.hxx
@@ -1154,6 +1167,18 @@
  	inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
  					GetServiceManager() const { return xServiceManager; }
  
+diff --git sc/inc/unonames.hxx sc/inc/unonames.hxx
+index 4193574..a1350aa 100644
+--- sc/inc/unonames.hxx
++++ sc/inc/unonames.hxx
+@@ -590,6 +590,7 @@
+ #define SC_UNONAME_ADDRESS          "Address"
+ #define SC_UNONAME_UIREPR           "UserInterfaceRepresentation"
+ #define SC_UNONAME_PERSREPR         "PersistentRepresentation"
++#define SC_UNONAME_XL_A1_REPR       "XL_A1_Representation"
+ #define SC_UNONAME_REFSHEET         "ReferenceSheet"
+ 
+ // --> PB 2004-08-23 #i33095# Security Options
 diff --git sc/source/core/data/documen2.cxx sc/source/core/data/documen2.cxx
 index e506a03..feb8746 100644
 --- sc/source/core/data/documen2.cxx
@@ -1528,6 +1553,100 @@
      aDocument.EnableUndo( TRUE );
      bIsEmpty = FALSE;
  
+diff --git sc/source/ui/unoobj/addruno.cxx sc/source/ui/unoobj/addruno.cxx
+index b417b7e..4f313f2 100644
+--- sc/source/ui/unoobj/addruno.cxx
++++ sc/source/ui/unoobj/addruno.cxx
+@@ -72,7 +72,7 @@ void ScAddressConversionObj::Notify( Sfx
+     }
+ }
+ 
+-sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString )
++sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString, ScAddress::Convention eConv )
+ {
+     if (!pDocShell)
+         return sal_False;
+@@ -81,7 +81,7 @@ sal_Bool ScAddressConversionObj::ParseUI
+     sal_Bool bSuccess = sal_False;
+     if ( bIsRange )
+     {
+-        USHORT nResult = aRange.ParseAny( rUIString, pDoc );
++        USHORT nResult = aRange.ParseAny( rUIString, pDoc, eConv );
+         if ( nResult & SCA_VALID )
+         {
+             if ( ( nResult & SCA_TAB_3D ) == 0 )
+@@ -95,7 +95,7 @@ sal_Bool ScAddressConversionObj::ParseUI
+     }
+     else
+     {
+-        USHORT nResult = aRange.aStart.Parse( rUIString, pDoc );
++        USHORT nResult = aRange.aStart.Parse( rUIString, pDoc, eConv );
+         if ( nResult & SCA_VALID )
+         {
+             if ( ( nResult & SCA_TAB_3D ) == 0 )
+@@ -119,6 +119,7 @@ uno::Reference<beans::XPropertySetInfo> 
+         {
+             {MAP_CHAR_LEN(SC_UNONAME_ADDRESS),  0,  &getCppuType((table::CellRangeAddress*)0), 0, 0 },
+             {MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
++            {MAP_CHAR_LEN(SC_UNONAME_XL_A1_REPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
+             {MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0,  &getCppuType((sal_Int32*)0),        0, 0 },
+             {MAP_CHAR_LEN(SC_UNONAME_UIREPR),   0,  &getCppuType((rtl::OUString*)0),    0, 0 },
+             {0,0,0,0,0,0}
+@@ -132,6 +133,7 @@ uno::Reference<beans::XPropertySetInfo> 
+         {
+             {MAP_CHAR_LEN(SC_UNONAME_ADDRESS),  0,  &getCppuType((table::CellAddress*)0), 0, 0 },
+             {MAP_CHAR_LEN(SC_UNONAME_PERSREPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
++            {MAP_CHAR_LEN(SC_UNONAME_XL_A1_REPR), 0,  &getCppuType((rtl::OUString*)0),    0, 0 },
+             {MAP_CHAR_LEN(SC_UNONAME_REFSHEET), 0,  &getCppuType((sal_Int32*)0),        0, 0 },
+             {MAP_CHAR_LEN(SC_UNONAME_UIREPR),   0,  &getCppuType((rtl::OUString*)0),    0, 0 },
+             {0,0,0,0,0,0}
+@@ -193,8 +195,11 @@ void SAL_CALL ScAddressConversionObj::se
+             bSuccess = ParseUIString( aUIString );
+         }
+     }
+-    else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) )
++    else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
+     {
++        ScAddress::Convention aConv = ScAddress::CONV_OOO; 
++        if ( aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
++            aConv = ScAddress::CONV_XL_A1; 
+         //  parse the file format string
+         rtl::OUString sRepresentation;
+         if (aValue >>= sRepresentation)
+@@ -215,7 +220,7 @@ void SAL_CALL ScAddressConversionObj::se
+             }
+ 
+             //  parse the rest like a UI string
+-            bSuccess = ParseUIString( aUIString );
++            bSuccess = ParseUIString( aUIString, aConv );
+         }
+     }
+     else
+@@ -268,17 +273,21 @@ uno::Any SAL_CALL ScAddressConversionObj
+             aRange.aStart.Format( aFormatStr, nFlags, pDoc );
+         aRet <<= rtl::OUString( aFormatStr );
+     }
+-    else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) )
++    else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
+     {
++        ScAddress::Convention aConv = ScAddress::CONV_OOO; 
++        if ( aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
++            aConv = ScAddress::CONV_XL_A1; 
++
+         //  generate file format string - always include sheet
+         String aFormatStr;
+-        aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc );
++        aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc, aConv );
+         if ( bIsRange )
+         {
+             //  manually concatenate range so both parts always have the sheet name
+             aFormatStr.Append( (sal_Unicode) ':' );
+             String aSecond;
+-            aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc );
++            aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc, aConv );
+             aFormatStr.Append( aSecond );
+         }
+         aRet <<= rtl::OUString( aFormatStr );
 diff --git sc/source/ui/unoobj/docuno.cxx sc/source/ui/unoobj/docuno.cxx
 index 1dcc337..55e67bd 100644
 --- sc/source/ui/unoobj/docuno.cxx
@@ -1800,7 +1919,7 @@
  		mnForeColor = 0x80000008;
  		nBorderColor = 0x80000006;
 diff --git svx/source/msfilter/msocximex.cxx svx/source/msfilter/msocximex.cxx
-index 143c66b..9a63a94 100644
+index 143c66b..6af2878 100644
 --- svx/source/msfilter/msocximex.cxx
 +++ svx/source/msfilter/msocximex.cxx
 @@ -49,6 +49,10 @@
@@ -1875,7 +1994,7 @@
 +         {
 +             // we need this service to properly convert XL notation also
 +             // Should be easy to extend
-+             xConvertor->setPropertyValue( C2U( "PersistentRepresentation" ), uno::makeAny( msCtrlSource ) );
++             xConvertor->setPropertyValue( C2U( "XL_A1_Representation" ), uno::makeAny( msCtrlSource ) );
 +             xConvertor->getPropertyValue( C2U( "Address" ) ) >>= aAddress;    
 +         }
 +        
@@ -1903,7 +2022,7 @@
 +         {
 +             // we need this service to properly convert XL notation also
 +             // Should be easy to extend
-+             xConvertor->setPropertyValue( C2U( "PersistentRepresentation" ), uno::makeAny( msRowSource ) );
++             xConvertor->setPropertyValue( C2U( "XL_A1_Representation" ), uno::makeAny( msRowSource ) );
 +             xConvertor->getPropertyValue( C2U( "Address" ) ) >>= aAddress;    
 +         }
 +        



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]