Kaydet (Commit) 288abe5a authored tarafından Noel Grandin's avatar Noel Grandin

convert sc/source/filter/ftools/*.cxx from String to OUString

Change-Id: I9bd526369a7840a430f014f23dc60d8dad671e2b
üst 594515e6
......@@ -152,20 +152,20 @@ Color ScfTools::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8
OUString ScfTools::ConvertToScDefinedName(const OUString& rName )
{
//fdo#37872: we don't allow points in range names any more
String sName = rName.replace(static_cast<sal_Unicode>('.'),
OUString sName = rName.replace(static_cast<sal_Unicode>('.'),
static_cast<sal_Unicode>('_'));
xub_StrLen nLen = sName.Len();
xub_StrLen nLen = sName.getLength();
if( nLen && !ScCompiler::IsCharFlagAllConventions( sName, 0, SC_COMPILER_C_CHAR_NAME ) )
sName.SetChar( 0, '_' );
sName = sName.replaceAt( 0, 1, "_" );
for( xub_StrLen nPos = 1; nPos < nLen; ++nPos )
if( !ScCompiler::IsCharFlagAllConventions( sName, nPos, SC_COMPILER_C_NAME ) )
sName.SetChar( nPos, '_' );
sName = sName.replaceAt( nPos, 1, "_" );
return sName;
}
// *** streams and storages *** -----------------------------------------------
SotStorageRef ScfTools::OpenStorageRead( SotStorageRef xStrg, const String& rStrgName )
SotStorageRef ScfTools::OpenStorageRead( SotStorageRef xStrg, const OUString& rStrgName )
{
SotStorageRef xSubStrg;
if( xStrg.Is() && xStrg->IsContained( rStrgName ) )
......@@ -173,7 +173,7 @@ SotStorageRef ScfTools::OpenStorageRead( SotStorageRef xStrg, const String& rStr
return xSubStrg;
}
SotStorageRef ScfTools::OpenStorageWrite( SotStorageRef xStrg, const String& rStrgName )
SotStorageRef ScfTools::OpenStorageWrite( SotStorageRef xStrg, const OUString& rStrgName )
{
SotStorageRef xSubStrg;
if( xStrg.Is() )
......@@ -181,7 +181,7 @@ SotStorageRef ScfTools::OpenStorageWrite( SotStorageRef xStrg, const String& rSt
return xSubStrg;
}
SotStorageStreamRef ScfTools::OpenStorageStreamRead( SotStorageRef xStrg, const String& rStrmName )
SotStorageStreamRef ScfTools::OpenStorageStreamRead( SotStorageRef xStrg, const OUString& rStrmName )
{
SotStorageStreamRef xStrm;
if( xStrg.Is() && xStrg->IsContained( rStrmName ) && xStrg->IsStream( rStrmName ) )
......@@ -189,7 +189,7 @@ SotStorageStreamRef ScfTools::OpenStorageStreamRead( SotStorageRef xStrg, const
return xStrm;
}
SotStorageStreamRef ScfTools::OpenStorageStreamWrite( SotStorageRef xStrg, const String& rStrmName )
SotStorageStreamRef ScfTools::OpenStorageStreamWrite( SotStorageRef xStrg, const OUString& rStrmName )
{
OSL_ENSURE( !xStrg || !xStrg->IsContained( rStrmName ), "ScfTools::OpenStorageStreamWrite - stream exists already" );
SotStorageStreamRef xStrm;
......
......@@ -163,14 +163,14 @@ public:
// *** streams and storages *** -----------------------------------------------
/** Tries to open an existing storage with the specified name in the passed storage (read-only). */
static SotStorageRef OpenStorageRead( SotStorageRef xStrg, const String& rStrgName );
static SotStorageRef OpenStorageRead( SotStorageRef xStrg, const OUString& rStrgName );
/** Creates and opens a storage with the specified name in the passed storage (read/write). */
static SotStorageRef OpenStorageWrite( SotStorageRef xStrg, const String& rStrgName );
static SotStorageRef OpenStorageWrite( SotStorageRef xStrg, const OUString& rStrgName );
/** Tries to open an existing stream with the specified name in the passed storage (read-only). */
static SotStorageStreamRef OpenStorageStreamRead( SotStorageRef xStrg, const String& rStrmName );
static SotStorageStreamRef OpenStorageStreamRead( SotStorageRef xStrg, const OUString& rStrmName );
/** Creates and opens a stream with the specified name in the passed storage (read/write). */
static SotStorageStreamRef OpenStorageStreamWrite( SotStorageRef xStrg, const String& rStrmName );
static SotStorageStreamRef OpenStorageStreamWrite( SotStorageRef xStrg, const OUString& rStrmName );
// *** item handling *** ------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment