summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-22 14:33:29 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-23 11:37:06 +0000
commitd3c0bf6c8087c4573b181fc5d01a70cffc17c78f (patch)
tree02441702d81d2463283173a1e06dd4ca630f9e36 /sd
parent3e41fd078144094913ed62ae7fce5b91c820f98f (diff)
drop tools/string.hxx include
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/eppt/pptexsoundcollection.cxx56
-rw-r--r--sd/source/filter/eppt/pptexsoundcollection.hxx14
2 files changed, 35 insertions, 35 deletions
diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx
index 00d20470c293..5b277c361318 100644
--- a/sd/source/filter/eppt/pptexsoundcollection.cxx
+++ b/sd/source/filter/eppt/pptexsoundcollection.cxx
@@ -37,9 +37,9 @@
namespace ppt
{
-ExSoundEntry::ExSoundEntry( const String& rString )
-: nFileSize( 0 )
-, aSoundURL( rString )
+ExSoundEntry::ExSoundEntry(const rtl::OUString& rString)
+ : nFileSize(0)
+ , aSoundURL(rString)
{
try
{
@@ -55,13 +55,13 @@ ExSoundEntry::ExSoundEntry( const String& rString )
}
};
-String ExSoundEntry::ImplGetName() const
+rtl::OUString ExSoundEntry::ImplGetName() const
{
INetURLObject aTmp( aSoundURL );
return aTmp.GetName();
}
-String ExSoundEntry::ImplGetExtension() const
+rtl::OUString ExSoundEntry::ImplGetExtension() const
{
INetURLObject aTmp( aSoundURL );
String aExtension( aTmp.GetExtension() );
@@ -70,24 +70,24 @@ String ExSoundEntry::ImplGetExtension() const
return aExtension;
}
-sal_Bool ExSoundEntry::IsSameURL( const String& rURL ) const
+sal_Bool ExSoundEntry::IsSameURL(const rtl::OUString& rURL) const
{
return ( rURL == aSoundURL );
}
sal_uInt32 ExSoundEntry::GetSize( sal_uInt32 nId ) const
{
- String aName( ImplGetName() );
- String aExtension( ImplGetExtension() );
+ rtl::OUString aName( ImplGetName() );
+ rtl::OUString aExtension( ImplGetExtension() );
sal_uInt32 nSize = 8; // SoundContainer Header
- if ( aName.Len() ) // String Atom ( instance 0 - name of sound )
- nSize += aName.Len() * 2 + 8;
- if ( aExtension.Len() ) // String Atom ( instance 1 - extension of sound )
- nSize += aExtension.Len() * 2 + 8;
+ if ( !aName.isEmpty() ) // String Atom ( instance 0 - name of sound )
+ nSize += aName.getLength() * 2 + 8;
+ if ( !aExtension.isEmpty() ) // String Atom ( instance 1 - extension of sound )
+ nSize += aExtension.getLength() * 2 + 8;
- String aId( String::CreateFromInt32( nId ) ); // String Atom ( instance 2 - reference id )
- nSize += 2 * aId.Len() + 8;
+ rtl::OUString aId( rtl::OUString::valueOf(static_cast<sal_Int32>(nId)) ); // String Atom ( instance 2 - reference id )
+ nSize += 2 * aId.getLength() + 8;
nSize += nFileSize + 8; // SoundData Atom
@@ -104,30 +104,30 @@ void ExSoundEntry::Write( SvStream& rSt, sal_uInt32 nId ) const
// create SoundContainer
rSt << (sal_uInt32)( ( EPP_Sound << 16 ) | 0xf ) << (sal_uInt32)( GetSize( nId ) - 8 );
- String aSoundName( ImplGetName() );
- sal_uInt16 i, nSoundNameLen = aSoundName.Len();
+ rtl::OUString aSoundName( ImplGetName() );
+ sal_Int32 i, nSoundNameLen = aSoundName.getLength();
if ( nSoundNameLen )
{
// name of sound ( instance 0 )
rSt << (sal_uInt32)( EPP_CString << 16 ) << (sal_uInt32)( nSoundNameLen * 2 );
- for ( i = 0; i < nSoundNameLen; i++ )
- rSt << aSoundName.GetChar( i );
+ for ( i = 0; i < nSoundNameLen; ++i )
+ rSt << aSoundName[i];
}
- String aExtension( ImplGetExtension() );
- sal_uInt32 nExtensionLen = aExtension.Len();
+ rtl::OUString aExtension( ImplGetExtension() );
+ sal_Int32 nExtensionLen = aExtension.getLength();
if ( nExtensionLen )
{
// extension of sound ( instance 1 )
rSt << (sal_uInt32)( ( EPP_CString << 16 ) | 16 ) << (sal_uInt32)( nExtensionLen * 2 );
- for ( i = 0; i < nExtensionLen; i++ )
- rSt << aExtension.GetChar( i );
+ for ( i = 0; i < nExtensionLen; ++i )
+ rSt << aExtension[i];
}
// id of sound ( instance 2 )
- String aId( String::CreateFromInt32( nId ) );
- sal_uInt32 nIdLen = aId.Len();
+ rtl::OUString aId( rtl::OUString::valueOf(static_cast<sal_Int32>(nId) ) );
+ sal_Int32 nIdLen = aId.getLength();
rSt << (sal_uInt32)( ( EPP_CString << 16 ) | 32 ) << (sal_uInt32)( nIdLen * 2 );
- for ( i = 0; i < nIdLen; i++ )
- rSt << aId.GetChar( i );
+ for ( i = 0; i < nIdLen; ++i )
+ rSt << aId[i];
rSt << (sal_uInt32)( EPP_SoundData << 16 ) << (sal_uInt32)( nFileSize );
sal_uInt32 nBytesLeft = nFileSize;
@@ -152,10 +152,10 @@ void ExSoundEntry::Write( SvStream& rSt, sal_uInt32 nId ) const
}
}
-sal_uInt32 ExSoundCollection::GetId( const String& rString )
+sal_uInt32 ExSoundCollection::GetId(const rtl::OUString& rString)
{
sal_uInt32 nSoundId = 0;
- if( rString.Len() )
+ if (!rString.isEmpty())
{
const sal_uInt32 nSoundCount = maEntries.size();
boost::ptr_vector<ExSoundEntry>::const_iterator iter;
diff --git a/sd/source/filter/eppt/pptexsoundcollection.hxx b/sd/source/filter/eppt/pptexsoundcollection.hxx
index cc7eaa80d9dc..f9f1c58a7fe8 100644
--- a/sd/source/filter/eppt/pptexsoundcollection.hxx
+++ b/sd/source/filter/eppt/pptexsoundcollection.hxx
@@ -34,7 +34,7 @@
#ifdef DBG_ANIM_LOG
#include <stdio.h>
#endif
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
#include <tools/stream.hxx>
namespace ppt
@@ -43,17 +43,17 @@ namespace ppt
class ExSoundEntry
{
sal_uInt32 nFileSize;
- String aSoundURL;
+ rtl::OUString aSoundURL;
- String ImplGetName() const;
- String ImplGetExtension() const;
+ rtl::OUString ImplGetName() const;
+ rtl::OUString ImplGetExtension() const;
public :
- sal_Bool IsSameURL( const String& rURL ) const;
+ sal_Bool IsSameURL(const rtl::OUString& rURL) const;
sal_uInt32 GetFileSize( ) const { return nFileSize; };
- ExSoundEntry( const String& rSoundURL );
+ ExSoundEntry(const rtl::OUString& rSoundURL);
// returns the size of a complete SoundContainer
sal_uInt32 GetSize( sal_uInt32 nId ) const;
@@ -64,7 +64,7 @@ class ExSoundCollection
{
public:
- sal_uInt32 GetId( const String& );
+ sal_uInt32 GetId(const rtl::OUString&);
// returns the size of a complete SoundCollectionContainer
sal_uInt32 GetSize() const;