[Libreoffice-commits] .: sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Aug 16 21:35:50 PDT 2011
sc/source/filter/excel/xiescher.cxx | 15 ++--
sc/source/filter/excel/xltools.cxx | 126 +++++++++++++++++++-----------------
sc/source/filter/inc/xiescher.hxx | 10 +-
sc/source/filter/inc/xltools.hxx | 32 ++++-----
4 files changed, 97 insertions(+), 86 deletions(-)
New commits:
commit ba0cd696766669c8e8cedd8d2789f0c28d60f1c9
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date: Wed Aug 17 00:36:11 2011 -0400
String to rtl::OUString.
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index fe269ab..123c337 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -392,7 +392,9 @@ void XclImpDrawObjBase::SetAnchor( const XclObjAnchor& rAnchor )
mbHasAnchor = true;
}
-void XclImpDrawObjBase::SetDffData( const DffObjData& rDffObjData, const String& rObjName, const String& rHyperlink, bool bVisible, bool bAutoMargin )
+void XclImpDrawObjBase::SetDffData(
+ const DffObjData& rDffObjData, const rtl::OUString& rObjName, const rtl::OUString& rHyperlink,
+ bool bVisible, bool bAutoMargin )
{
mnDffShapeId = rDffObjData.nShapeId;
mnDffFlags = rDffObjData.nSpFlags;
@@ -483,8 +485,7 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb
// macro and hyperlink
// removed oracle/sun check for mbSimpleMacro ( no idea what its for )
- if( (maMacroName.Len() > 0 ) ||
- (maHyperlink.Len() > 0) )
+ if (!maMacroName.isEmpty() || !maHyperlink.isEmpty())
{
if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, sal_True ) )
{
@@ -519,7 +520,7 @@ void XclImpDrawObjBase::ReadName5( XclImpStream& rStrm, sal_uInt16 nNameLen )
void XclImpDrawObjBase::ReadMacro3( XclImpStream& rStrm, sal_uInt16 nMacroSize )
{
- maMacroName.Erase();
+ maMacroName = rtl::OUString();
rStrm.Ignore( nMacroSize );
// skip padding byte for word boundaries, not contained in nMacroSize
if( rStrm.GetRecPos() & 1 ) rStrm.Ignore( 1 );
@@ -527,19 +528,19 @@ void XclImpDrawObjBase::ReadMacro3( XclImpStream& rStrm, sal_uInt16 nMacroSize )
void XclImpDrawObjBase::ReadMacro4( XclImpStream& rStrm, sal_uInt16 nMacroSize )
{
- maMacroName.Erase();
+ maMacroName = rtl::OUString();
rStrm.Ignore( nMacroSize );
}
void XclImpDrawObjBase::ReadMacro5( XclImpStream& rStrm, sal_uInt16 nMacroSize )
{
- maMacroName.Erase();
+ maMacroName = rtl::OUString();
rStrm.Ignore( nMacroSize );
}
void XclImpDrawObjBase::ReadMacro8( XclImpStream& rStrm )
{
- maMacroName.Erase();
+ maMacroName = rtl::OUString();
if( rStrm.GetRecLeft() > 6 )
{
// macro is stored in a tNameXR token containing a link to a defined name
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index 74ea981..3737116 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -467,9 +467,9 @@ String XclTools::GetXclFontName( const String& rFontName )
// built-in defined names -----------------------------------------------------
-const String XclTools::maDefNamePrefix( RTL_CONSTASCII_USTRINGPARAM( "Excel_BuiltIn_" ) );
+const OUString XclTools::maDefNamePrefix( RTL_CONSTASCII_USTRINGPARAM( "Excel_BuiltIn_" ) );
-const String XclTools::maDefNamePrefixXml ( RTL_CONSTASCII_USTRINGPARAM( "_xlnm." ) );
+const OUString XclTools::maDefNamePrefixXml ( RTL_CONSTASCII_USTRINGPARAM( "_xlnm." ) );
static const sal_Char* const ppcDefNames[] =
{
@@ -511,20 +511,20 @@ String XclTools::GetBuiltInDefNameXml( sal_Unicode cBuiltIn )
return String( maDefNamePrefixXml ).Append( GetXclBuiltInDefName( cBuiltIn ) );
}
-sal_Unicode XclTools::GetBuiltInDefNameIndex( const String& rDefName )
+sal_Unicode XclTools::GetBuiltInDefNameIndex( const OUString& rDefName )
{
- xub_StrLen nPrefixLen = maDefNamePrefix.Len();
- if( rDefName.EqualsIgnoreCaseAscii( maDefNamePrefix, 0, nPrefixLen ) )
+ sal_Int32 nPrefixLen = maDefNamePrefix.getLength();
+ if( String(rDefName).EqualsIgnoreCaseAscii( maDefNamePrefix, 0, nPrefixLen ) )
{
for( sal_Unicode cBuiltIn = 0; cBuiltIn < EXC_BUILTIN_UNKNOWN; ++cBuiltIn )
{
- String aBuiltInName( GetXclBuiltInDefName( cBuiltIn ) );
- xub_StrLen nBuiltInLen = aBuiltInName.Len();
- if( rDefName.EqualsIgnoreCaseAscii( aBuiltInName, nPrefixLen, nBuiltInLen ) )
+ OUString aBuiltInName(GetXclBuiltInDefName(cBuiltIn));
+ sal_Int32 nBuiltInLen = aBuiltInName.getLength();
+ if( String(rDefName).EqualsIgnoreCaseAscii( aBuiltInName, nPrefixLen, nBuiltInLen ) )
{
// name can be followed by underline or space character
xub_StrLen nNextCharPos = nPrefixLen + nBuiltInLen;
- sal_Unicode cNextChar = (rDefName.Len() > nNextCharPos) ? rDefName.GetChar( nNextCharPos ) : '\0';
+ sal_Unicode cNextChar = (rDefName.getLength() > nNextCharPos) ? rDefName.getStr()[nNextCharPos] : '\0';
if( (cNextChar == '\0') || (cNextChar == ' ') || (cNextChar == '_') )
return cBuiltIn;
}
@@ -535,8 +535,8 @@ sal_Unicode XclTools::GetBuiltInDefNameIndex( const String& rDefName )
// built-in style names -------------------------------------------------------
-const String XclTools::maStyleNamePrefix1( RTL_CONSTASCII_USTRINGPARAM( "Excel_BuiltIn_" ) );
-const String XclTools::maStyleNamePrefix2( RTL_CONSTASCII_USTRINGPARAM( "Excel Built-in " ) );
+const OUString XclTools::maStyleNamePrefix1( RTL_CONSTASCII_USTRINGPARAM( "Excel_BuiltIn_" ) );
+const OUString XclTools::maStyleNamePrefix2( RTL_CONSTASCII_USTRINGPARAM( "Excel Built-in " ) );
static const sal_Char* const ppcStyleNames[] =
{
@@ -552,9 +552,9 @@ static const sal_Char* const ppcStyleNames[] =
"Followed_Hyperlink"
};
-String XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const String& rName, sal_uInt8 nLevel )
+OUString XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const OUString& rName, sal_uInt8 nLevel )
{
- String aStyleName;
+ OUString aStyleName;
if( nStyleId == EXC_STYLE_NORMAL ) // "Normal" becomes "Default" style
{
@@ -562,57 +562,61 @@ String XclTools::GetBuiltInStyleName( sal_uInt8 nStyleId, const String& rName, s
}
else
{
- aStyleName = maStyleNamePrefix1;
+ rtl::OUStringBuffer aBuf(maStyleNamePrefix1);
if( nStyleId < SAL_N_ELEMENTS( ppcStyleNames ) )
- aStyleName.AppendAscii( ppcStyleNames[ nStyleId ] );
- else if( rName.Len() > 0 )
- aStyleName.Append( rName );
+ aBuf.appendAscii(ppcStyleNames[nStyleId]);
+ else if (!rName.isEmpty())
+ aBuf.append(rName);
else
- aStyleName.Append( String::CreateFromInt32( nStyleId ) );
+ aBuf.append(static_cast<sal_Int32>(nStyleId));
+
if( (nStyleId == EXC_STYLE_ROWLEVEL) || (nStyleId == EXC_STYLE_COLLEVEL) )
- aStyleName.Append( String::CreateFromInt32( nLevel + 1 ) );
+ aBuf.append(static_cast<sal_Int32>(nLevel+1));
+
+ aStyleName = aBuf.makeStringAndClear();
}
return aStyleName;
}
-String XclTools::GetBuiltInStyleName( const String& rStyleName )
+OUString XclTools::GetBuiltInStyleName( const OUString& rStyleName )
{
- return String( maStyleNamePrefix1 ).Append( rStyleName );
+ rtl::OUStringBuffer aBuf(maStyleNamePrefix1);
+ aBuf.append(rStyleName);
+ return aBuf.makeStringAndClear();
}
-bool XclTools::IsBuiltInStyleName( const String& rStyleName, sal_uInt8* pnStyleId, xub_StrLen* pnNextChar )
+bool XclTools::IsBuiltInStyleName( const OUString& rStyleName, sal_uInt8* pnStyleId, sal_Int32* pnNextChar )
{
// "Default" becomes "Normal"
- if( rStyleName == ScGlobal::GetRscString( STR_STYLENAME_STANDARD ) )
+ if (rStyleName.equals(ScGlobal::GetRscString(STR_STYLENAME_STANDARD)))
{
if( pnStyleId ) *pnStyleId = EXC_STYLE_NORMAL;
- if( pnNextChar ) *pnNextChar = rStyleName.Len();
+ if( pnNextChar ) *pnNextChar = rStyleName.getLength();
return true;
}
// try the other built-in styles
sal_uInt8 nFoundId = 0;
- xub_StrLen nNextChar = 0;
+ sal_Int32 nNextChar = 0;
- xub_StrLen nPrefixLen = 0;
- if( rStyleName.EqualsIgnoreCaseAscii( maStyleNamePrefix1, 0, maStyleNamePrefix1.Len() ) )
- nPrefixLen = maStyleNamePrefix1.Len();
- else if( rStyleName.EqualsIgnoreCaseAscii( maStyleNamePrefix2, 0, maStyleNamePrefix2.Len() ) )
- nPrefixLen = maStyleNamePrefix2.Len();
+ sal_Int32 nPrefixLen = 0;
+ if( String(rStyleName).EqualsIgnoreCaseAscii( maStyleNamePrefix1, 0, maStyleNamePrefix1.getLength() ) )
+ nPrefixLen = maStyleNamePrefix1.getLength();
+ else if( String(rStyleName).EqualsIgnoreCaseAscii( maStyleNamePrefix2, 0, maStyleNamePrefix2.getLength() ) )
+ nPrefixLen = maStyleNamePrefix2.getLength();
if( nPrefixLen > 0 )
{
- String aShortName;
for( sal_uInt8 nId = 0; nId < SAL_N_ELEMENTS( ppcStyleNames ); ++nId )
{
if( nId != EXC_STYLE_NORMAL )
{
- aShortName.AssignAscii( ppcStyleNames[ nId ] );
- if( rStyleName.EqualsIgnoreCaseAscii( aShortName, nPrefixLen, aShortName.Len() ) &&
- (nNextChar < nPrefixLen + aShortName.Len()) )
+ OUString aShortName = rtl::OUString::createFromAscii(ppcStyleNames[nId]);
+ if( String(rStyleName).EqualsIgnoreCaseAscii( aShortName, nPrefixLen, aShortName.getLength() ) &&
+ (nNextChar < nPrefixLen + aShortName.getLength()))
{
nFoundId = nId;
- nNextChar = nPrefixLen + aShortName.Len();
+ nNextChar = nPrefixLen + aShortName.getLength();
}
}
}
@@ -630,24 +634,24 @@ bool XclTools::IsBuiltInStyleName( const String& rStyleName, sal_uInt8* pnStyleI
return nPrefixLen > 0; // also return true for unknown built-in styles
}
-bool XclTools::GetBuiltInStyleId( sal_uInt8& rnStyleId, sal_uInt8& rnLevel, const String& rStyleName )
+bool XclTools::GetBuiltInStyleId( sal_uInt8& rnStyleId, sal_uInt8& rnLevel, const OUString& rStyleName )
{
sal_uInt8 nStyleId;
- xub_StrLen nNextChar;
+ sal_Int32 nNextChar;
if( IsBuiltInStyleName( rStyleName, &nStyleId, &nNextChar ) && (nStyleId != EXC_STYLE_USERDEF) )
{
if( (nStyleId == EXC_STYLE_ROWLEVEL) || (nStyleId == EXC_STYLE_COLLEVEL) )
{
- String aLevel( rStyleName, nNextChar, STRING_LEN );
- sal_Int32 nLevel = aLevel.ToInt32();
- if( (String::CreateFromInt32( nLevel ) == aLevel) && (nLevel > 0) && (nLevel <= EXC_STYLE_LEVELCOUNT) )
+ OUString aLevel = rStyleName.copy(nNextChar);
+ sal_Int32 nLevel = aLevel.toInt32();
+ if (OUString::valueOf(nLevel) == aLevel && nLevel > 0 && nLevel <= EXC_STYLE_LEVELCOUNT)
{
rnStyleId = nStyleId;
rnLevel = static_cast< sal_uInt8 >( nLevel - 1 );
return true;
}
}
- else if( rStyleName.Len() == nNextChar )
+ else if( rStyleName.getLength() == nNextChar )
{
rnStyleId = nStyleId;
rnLevel = EXC_STYLE_NOLEVEL;
@@ -661,25 +665,29 @@ bool XclTools::GetBuiltInStyleId( sal_uInt8& rnStyleId, sal_uInt8& rnLevel, cons
// conditional formatting style names -----------------------------------------
-const String XclTools::maCFStyleNamePrefix1( RTL_CONSTASCII_USTRINGPARAM( "Excel_CondFormat_" ) );
-const String XclTools::maCFStyleNamePrefix2( RTL_CONSTASCII_USTRINGPARAM( "ConditionalStyle_" ) );
+const OUString XclTools::maCFStyleNamePrefix1( RTL_CONSTASCII_USTRINGPARAM( "Excel_CondFormat_" ) );
+const OUString XclTools::maCFStyleNamePrefix2( RTL_CONSTASCII_USTRINGPARAM( "ConditionalStyle_" ) );
-String XclTools::GetCondFormatStyleName( SCTAB nScTab, sal_Int32 nFormat, sal_uInt16 nCondition )
+rtl::OUString XclTools::GetCondFormatStyleName( SCTAB nScTab, sal_Int32 nFormat, sal_uInt16 nCondition )
{
- return String( maCFStyleNamePrefix1 ).Append( String::CreateFromInt32( nScTab + 1 ) ).
- Append( '_' ).Append( String::CreateFromInt32( nFormat + 1 ) ).
- Append( '_' ).Append( String::CreateFromInt32( nCondition + 1 ) );
+ rtl::OUStringBuffer aBuf(maCFStyleNamePrefix1);
+ aBuf.append(static_cast<sal_Int32>(nScTab+1));
+ aBuf.append('_');
+ aBuf.append(static_cast<sal_Int32>(nFormat+1));
+ aBuf.append('_');
+ aBuf.append(static_cast<sal_Int32>(nCondition+1));
+ return aBuf.makeStringAndClear();
}
-bool XclTools::IsCondFormatStyleName( const String& rStyleName, xub_StrLen* pnNextChar )
+bool XclTools::IsCondFormatStyleName( const OUString& rStyleName )
{
- xub_StrLen nPrefixLen = 0;
- if( rStyleName.EqualsIgnoreCaseAscii( maCFStyleNamePrefix1, 0, maCFStyleNamePrefix1.Len() ) )
- nPrefixLen = maCFStyleNamePrefix1.Len();
- else if( rStyleName.EqualsIgnoreCaseAscii( maCFStyleNamePrefix2, 0, maCFStyleNamePrefix2.Len() ) )
- nPrefixLen = maCFStyleNamePrefix2.Len();
- if( pnNextChar ) *pnNextChar = nPrefixLen;
- return nPrefixLen > 0;
+ if( String(rStyleName).EqualsIgnoreCaseAscii( maCFStyleNamePrefix1, 0, maCFStyleNamePrefix1.getLength() ) )
+ return true;
+
+ if( String(rStyleName).EqualsIgnoreCaseAscii( maCFStyleNamePrefix2, 0, maCFStyleNamePrefix2.getLength() ) )
+ return true;
+
+ return false;
}
// stream handling ------------------------------------------------------------
@@ -701,7 +709,7 @@ void XclTools::SkipSubStream( XclImpStream& rStrm )
const OUString XclTools::maSbMacroPrefix( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:" ) );
const OUString XclTools::maSbMacroSuffix( RTL_CONSTASCII_USTRINGPARAM( "?language=Basic&location=document" ) );
-OUString XclTools::GetSbMacroUrl( const String& rMacroName, SfxObjectShell* pDocShell )
+OUString XclTools::GetSbMacroUrl( const OUString& rMacroName, SfxObjectShell* pDocShell )
{
OSL_ENSURE( rMacroName.Len() > 0, "XclTools::GetSbMacroUrl - macro name is empty" );
::ooo::vba::MacroResolvedInfo aMacroInfo = ::ooo::vba::resolveVBAMacro( pDocShell, rMacroName, false );
@@ -710,14 +718,14 @@ OUString XclTools::GetSbMacroUrl( const String& rMacroName, SfxObjectShell* pDoc
return OUString();
}
-OUString XclTools::GetSbMacroUrl( const String& rModuleName, const String& rMacroName, SfxObjectShell* pDocShell )
+OUString XclTools::GetSbMacroUrl( const OUString& rModuleName, const OUString& rMacroName, SfxObjectShell* pDocShell )
{
OSL_ENSURE( rModuleName.Len() > 0, "XclTools::GetSbMacroUrl - module name is empty" );
OSL_ENSURE( rMacroName.Len() > 0, "XclTools::GetSbMacroUrl - macro name is empty" );
return GetSbMacroUrl( rModuleName + OUString( sal_Unicode( '.' ) ) + rMacroName, pDocShell );
}
-String XclTools::GetXclMacroName( const OUString& rSbMacroUrl )
+OUString XclTools::GetXclMacroName( const OUString& rSbMacroUrl )
{
sal_Int32 nSbMacroUrlLen = rSbMacroUrl.getLength();
sal_Int32 nMacroNameLen = nSbMacroUrlLen - maSbMacroPrefix.getLength() - maSbMacroSuffix.getLength();
@@ -727,7 +735,7 @@ String XclTools::GetXclMacroName( const OUString& rSbMacroUrl )
sal_Int32 nPrjDot = rSbMacroUrl.indexOf( '.', maSbMacroPrefix.getLength() ) + 1;
return rSbMacroUrl.copy( nPrjDot, nSbMacroUrlLen - nPrjDot - maSbMacroSuffix.getLength() );
}
- return String::EmptyString();
+ return rtl::OUString();
}
// read/write colors ----------------------------------------------------------
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index f1a9d2b..975dac9 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -80,7 +80,9 @@ public:
/** Sets the object anchor explicitly. */
void SetAnchor( const XclObjAnchor& rAnchor );
/** Sets shape data from DFF stream. */
- void SetDffData( const DffObjData& rDffObjData, const String& rObjName, const String& rHyperlink, bool bVisible, bool bAutoMargin );
+ void SetDffData(
+ const DffObjData& rDffObjData, const rtl::OUString& rObjName, const rtl::OUString& rHyperlink,
+ bool bVisible, bool bAutoMargin );
/** If set to false, the SdrObject will not be created, processed, or inserted into the draw page. */
inline void SetProcessSdrObj( bool bProcess ) { mbProcessSdr = bProcess; }
@@ -96,7 +98,7 @@ public:
/** Returns the name of this object, may generate a default name. */
virtual rtl::OUString GetObjName() const;
/** Returns associated macro name, if set, otherwise zero length string. */
- inline const String& GetMacroName() const { return maMacroName; }
+ inline const rtl::OUString& GetMacroName() const { return maMacroName; }
/** Returns the shape identifier used in the DFF stream. */
inline sal_uInt32 GetDffShapeId() const { return mnDffShapeId; }
@@ -193,8 +195,8 @@ private:
sal_uInt32 mnDffShapeId; /// Shape ID from DFF stream.
sal_uInt32 mnDffFlags; /// Shape flags from DFF stream.
rtl::OUString maObjName; /// Name of the object.
- String maMacroName; /// Name of an attached macro.
- String maHyperlink; /// On-click hyperlink URL.
+ rtl::OUString maMacroName; /// Name of an attached macro.
+ rtl::OUString maHyperlink; /// On-click hyperlink URL.
bool mbHasAnchor; /// true = maAnchor is initialized.
bool mbHidden; /// true = Object is hidden.
bool mbVisible; /// true = Object is visible.
diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx
index 9edd3f6..e219cb6 100644
--- a/sc/source/filter/inc/xltools.hxx
+++ b/sc/source/filter/inc/xltools.hxx
@@ -195,7 +195,7 @@ public:
@descr Ignores any characters following a valid representation of a built-in name.
@param pcBuiltIn (out-param) If not 0, the index of the built-in name will be returned here.
@return true = passed string is a built-in name; false = user-defined name. */
- static sal_Unicode GetBuiltInDefNameIndex( const String& rDefName );
+ static sal_Unicode GetBuiltInDefNameIndex( const rtl::OUString& rDefName );
// built-in style names ---------------------------------------------------
@@ -204,13 +204,13 @@ public:
@param rName Default name for unknown styles.
@param nLevel The zero-based outline level for RowLevel and ColLevel styles.
@return The style name or an empty string, if the parameters are not valid. */
- static String GetBuiltInStyleName( sal_uInt8 nStyleId, const String& rName, sal_uInt8 nLevel );
+ static rtl::OUString GetBuiltInStyleName( sal_uInt8 nStyleId, const rtl::OUString& rName, sal_uInt8 nLevel );
/** Returns the passed style name with a special built-in prefix. */
- static String GetBuiltInStyleName( const String& rStyleName );
+ static rtl::OUString GetBuiltInStyleName( const rtl::OUString& rStyleName );
/** Returns true, if the passed string is a name of an Excel built-in style.
@param pnStyleId If not 0, the found style identifier will be returned here.
@param pnNextChar If not 0, the index of the char after the evaluated substring will be returned here. */
- static bool IsBuiltInStyleName( const String& rStyleName, sal_uInt8* pnStyleId = 0, xub_StrLen* pnNextChar = 0 );
+ static bool IsBuiltInStyleName( const rtl::OUString& rStyleName, sal_uInt8* pnStyleId = 0, sal_Int32* pnNextChar = 0 );
/** Returns the Excel built-in style identifier of a passed style name.
@param rnStyleId The style identifier is returned here.
@param rnLevel The zero-based outline level for RowLevel and ColLevel styles is returned here.
@@ -218,7 +218,7 @@ public:
@return true = passed string is a built-in style name, false = user style. */
static bool GetBuiltInStyleId(
sal_uInt8& rnStyleId, sal_uInt8& rnLevel,
- const String& rStyleName );
+ const rtl::OUString& rStyleName );
// conditional formatting style names -------------------------------------
@@ -227,10 +227,10 @@ public:
@param nFormat The zero-based index of the conditional formatting.
@param nCondition The zero-based index of the condition.
@return A style sheet name in the form "Excel_CondFormat_<sheet>_<format>_<condition>". */
- static String GetCondFormatStyleName( SCTAB nScTab, sal_Int32 nFormat, sal_uInt16 nCondition );
+ static rtl::OUString GetCondFormatStyleName( SCTAB nScTab, sal_Int32 nFormat, sal_uInt16 nCondition );
/** Returns true, if the passed string is a name of a conditional format style created by Excel import.
@param pnNextChar If not 0, the index of the char after the evaluated substring will be returned here. */
- static bool IsCondFormatStyleName( const String& rStyleName, xub_StrLen* pnNextChar = 0 );
+ static bool IsCondFormatStyleName( const rtl::OUString& rStyleName );
// stream handling --------------------------------------------------------
@@ -240,20 +240,20 @@ public:
// Basic macro names ------------------------------------------------------
/** Returns the full StarBasic macro URL from an Excel macro name. */
- static ::rtl::OUString GetSbMacroUrl( const String& rMacroName, SfxObjectShell* pDocShell = 0 );
+ static ::rtl::OUString GetSbMacroUrl( const rtl::OUString& rMacroName, SfxObjectShell* pDocShell = 0 );
/** Returns the full StarBasic macro URL from an Excel module and macro name. */
- static ::rtl::OUString GetSbMacroUrl( const String& rModuleName, const String& rMacroName, SfxObjectShell* pDocShell = 0 );
+ static ::rtl::OUString GetSbMacroUrl( const rtl::OUString& rModuleName, const rtl::OUString& rMacroName, SfxObjectShell* pDocShell = 0 );
/** Returns the Excel macro name from a full StarBasic macro URL. */
- static String GetXclMacroName( const ::rtl::OUString& rSbMacroUrl );
+ static ::rtl::OUString GetXclMacroName( const ::rtl::OUString& rSbMacroUrl );
// ------------------------------------------------------------------------
private:
- static const String maDefNamePrefix; /// Prefix for built-in defined names.
- static const String maDefNamePrefixXml; /// Prefix for built-in defined names for OOX
- static const String maStyleNamePrefix1; /// Prefix for built-in cell style names.
- static const String maStyleNamePrefix2; /// Prefix for built-in cell style names from OOX filter.
- static const String maCFStyleNamePrefix1; /// Prefix for cond. formatting style names.
- static const String maCFStyleNamePrefix2; /// Prefix for cond. formatting style names from OOX filter.
+ static const ::rtl::OUString maDefNamePrefix; /// Prefix for built-in defined names.
+ static const ::rtl::OUString maDefNamePrefixXml; /// Prefix for built-in defined names for OOX
+ static const ::rtl::OUString maStyleNamePrefix1; /// Prefix for built-in cell style names.
+ static const ::rtl::OUString maStyleNamePrefix2; /// Prefix for built-in cell style names from OOX filter.
+ static const ::rtl::OUString maCFStyleNamePrefix1; /// Prefix for cond. formatting style names.
+ static const ::rtl::OUString maCFStyleNamePrefix2; /// Prefix for cond. formatting style names from OOX filter.
static const ::rtl::OUString maSbMacroPrefix; /// Prefix for StarBasic macros.
static const ::rtl::OUString maSbMacroSuffix; /// Suffix for StarBasic macros.
More information about the Libreoffice-commits
mailing list