[Libreoffice-commits] .: Branch 'feature/container-controls-and-miscbits' - sc/inc sc/source
Noel Power
noelp at kemper.freedesktop.org
Fri Nov 5 09:22:22 PDT 2010
sc/inc/unonames.hxx | 2 +-
sc/source/ui/unoobj/addruno.cxx | 27 +++++++++++++--------------
2 files changed, 14 insertions(+), 15 deletions(-)
New commits:
commit 0c0b77ce59d8de7000a6365310a63708a011510a
Author: Noel Power <noel.power at novell.com>
Date: Thu Nov 4 21:26:31 2010 +0000
Fix logic for XLA1Representation for CellAddress/RangeConversion
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 2b90cf0..1bb5aac 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -619,7 +619,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_XLA1REPR "XLA1Representation"
#define SC_UNONAME_REFSHEET "ReferenceSheet"
// --> PB 2004-08-23 #i33095# Security Options
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index e9618d4..eca77af 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -117,7 +117,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{
{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_XLA1REPR), 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}
@@ -131,7 +131,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScAddressConversionObj::getProp
{
{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_XLA1REPR), 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,11 +193,11 @@ void SAL_CALL ScAddressConversionObj::setPropertyValue( const rtl::OUString& aPr
bSuccess = ParseUIString( aUIString );
}
}
- else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
+ else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) )
{
- ::formula::FormulaGrammar::AddressConvention aConv = ::formula::FormulaGrammar::CONV_OOO;
- if ( aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
- aConv = ::formula::FormulaGrammar::CONV_XL_A1;
+ ::formula::FormulaGrammar::AddressConvention aConv = aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) ?
+ ::formula::FormulaGrammar::CONV_OOO : ::formula::FormulaGrammar::CONV_XL_A1;
+
// parse the file format string
rtl::OUString sRepresentation;
if (aValue >>= sRepresentation)
@@ -271,24 +271,23 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString&
aRange.aStart.Format( aFormatStr, nFlags, pDoc );
aRet <<= rtl::OUString( aFormatStr );
}
- else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
+ else if ( aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) || aNameStr.EqualsAscii( SC_UNONAME_XLA1REPR ) )
{
- ::formula::FormulaGrammar::AddressConvention aConv = ::formula::FormulaGrammar::CONV_OOO;
- if ( aNameStr.EqualsAscii( SC_UNONAME_XL_A1_REPR ) )
- aConv = ::formula::FormulaGrammar::CONV_XL_A1;
+ ::formula::FormulaGrammar::AddressConvention eConv = aNameStr.EqualsAscii( SC_UNONAME_PERSREPR ) ?
+ ::formula::FormulaGrammar::CONV_OOO : ::formula::FormulaGrammar::CONV_XL_A1;
// generate file format string - always include sheet
String aFormatStr;
- aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc, aConv );
+ aRange.aStart.Format( aFormatStr, SCA_VALID | SCA_TAB_3D, pDoc, eConv );
if ( bIsRange )
{
// manually concatenate range so both parts always have the sheet name
aFormatStr.Append( (sal_Unicode) ':' );
String aSecond;
USHORT nFlags = SCA_VALID;
- if( aConv != ::formula::FormulaGrammar::CONV_XL_A1 )
- nFlags |= SCA_TAB_3D;
- aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc, aConv );
+ if( eConv != ::formula::FormulaGrammar::CONV_XL_A1 )
+ nFlags |= SCA_TAB_3D;
+ aRange.aEnd.Format( aSecond, SCA_VALID | SCA_TAB_3D, pDoc, eConv );
aFormatStr.Append( aSecond );
}
aRet <<= rtl::OUString( aFormatStr );
More information about the Libreoffice-commits
mailing list