summaryrefslogtreecommitdiff
path: root/svx/source/gallery2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-04 11:25:23 +0200
committerNoel Grandin <noel@peralex.com>2013-09-05 08:55:00 +0200
commit949915430b1a2a69fcb08c3fc679fa068968539c (patch)
treeba851a7f1d815e9b42897610bc9524739614373a /svx/source/gallery2
parent40d7608667014d54562658daec4650d068621e90 (diff)
convert svx/inc/*.hxx from String to OUString
Change-Id: I446812579d1f30fdeef94ca9d77e6cd961226100
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r--svx/source/gallery2/galbrws2.cxx19
-rw-r--r--svx/source/gallery2/galobj.cxx26
-rw-r--r--svx/source/gallery2/galtheme.cxx6
3 files changed, 26 insertions, 25 deletions
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 7ac642535826..e0cdbcc7692d 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -750,7 +750,7 @@ sal_Bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow )
return bRet;
}
-void GalleryBrowser2::SelectTheme( const String& rThemeName )
+void GalleryBrowser2::SelectTheme( const OUString& rThemeName )
{
delete mpIconView, mpIconView = NULL;
delete mpListView, mpListView = NULL;
@@ -1222,7 +1222,7 @@ void GalleryBrowser2::Execute( sal_uInt16 nId )
{
String aNewTitle( aDlg->GetTitle() );
- if( ( !aNewTitle.Len() && pObj->GetTitle().Len() ) || ( aNewTitle != aOldTitle ) )
+ if( ( !aNewTitle.Len() && !pObj->GetTitle().isEmpty() ) || ( aNewTitle != aOldTitle ) )
{
if( !aNewTitle.Len() )
aNewTitle = String( RTL_CONSTASCII_USTRINGPARAM( "__<empty>__" ) );
@@ -1274,16 +1274,16 @@ void GalleryBrowser2::Execute( sal_uInt16 nId )
}
}
-String GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObject& rObj, sal_uIntPtr nItemTextFlags )
+OUString GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObject& rObj, sal_uIntPtr nItemTextFlags )
{
- String aRet;
+ OUString aRet;
INetURLObject aURL(rObj.GetURL());
if( nItemTextFlags & GALLERY_ITEM_THEMENAME )
{
aRet += rTheme.GetName();
- aRet += String( RTL_CONSTASCII_USTRINGPARAM( " - " ) );
+ aRet += " - ";
}
if( nItemTextFlags & GALLERY_ITEM_TITLE )
@@ -1312,7 +1312,7 @@ String GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObject
aRet += String(aURL.getFSysPath( INetURLObject::FSYS_DETECT ));
if( aPath.Len() && ( nItemTextFlags & GALLERY_ITEM_TITLE ) )
- aRet += ')';
+ aRet += ")";
}
return aRet;
@@ -1328,9 +1328,9 @@ INetURLObject GalleryBrowser2::GetURL() const
return aURL;
}
-String GalleryBrowser2::GetFilterName() const
+OUString GalleryBrowser2::GetFilterName() const
{
- String aFilterName;
+ OUString aFilterName;
if( mpCurTheme && mnCurActionPos != 0xffffffff )
{
@@ -1339,7 +1339,8 @@ String GalleryBrowser2::GetFilterName() const
if( ( SGA_OBJ_BMP == eObjKind ) || ( SGA_OBJ_ANIM == eObjKind ) )
{
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
- INetURLObject aURL; mpCurTheme->GetURL( mnCurActionPos, aURL );
+ INetURLObject aURL;
+ mpCurTheme->GetURL( mnCurActionPos, aURL );
sal_uInt16 nFilter = rFilter.GetImportFormatNumberForShortName( aURL.GetExtension() );
if( GRFILTER_FORMAT_DONTKNOW != nFilter )
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 2ae07e92c8e0..95f986a4aafa 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -175,7 +175,7 @@ sal_Bool SgaObject::CreateThumb( const Graphic& rGraphic )
// ------------------------------------------------------------------------
-void SgaObject::WriteData( SvStream& rOut, const String& rDestDir ) const
+void SgaObject::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
static const sal_uInt32 nInventor = COMPAT_FORMAT( 'S', 'G', 'A', '3' );
@@ -227,16 +227,16 @@ void SgaObject::ReadData(SvStream& rIn, sal_uInt16& rReadVersion )
// ------------------------------------------------------------------------
-const String SgaObject::GetTitle() const
+const OUString SgaObject::GetTitle() const
{
- String aReturnValue( aTitle );
+ OUString aReturnValue( aTitle );
if ( !getenv( "GALLERY_SHOW_PRIVATE_TITLE" ) )
{
if ( comphelper::string::getTokenCount(aReturnValue, ':') == 3 )
{
- String aPrivateInd ( aReturnValue.GetToken( 0, ':' ) );
- String aResourceName( aReturnValue.GetToken( 1, ':' ) );
- sal_Int32 nResId ( aReturnValue.GetToken( 2, ':' ).ToInt32() );
+ String aPrivateInd ( aReturnValue.getToken( 0, ':' ) );
+ String aResourceName( aReturnValue.getToken( 1, ':' ) );
+ sal_Int32 nResId ( aReturnValue.getToken( 2, ':' ).toInt32() );
if ( aPrivateInd.EqualsAscii( "private" ) &&
aResourceName.Len() && ( nResId > 0 ) && ( nResId < 0x10000 ) )
{
@@ -261,7 +261,7 @@ const String SgaObject::GetTitle() const
// ------------------------------------------------------------------------
-void SgaObject::SetTitle( const String& rTitle )
+void SgaObject::SetTitle( const OUString& rTitle )
{
aTitle = rTitle;
}
@@ -307,7 +307,7 @@ SgaObjectBmp::SgaObjectBmp( const INetURLObject& rURL )
// ------------------------------------------------------------------------
-SgaObjectBmp::SgaObjectBmp( const Graphic& rGraphic, const INetURLObject& rURL, const String& )
+SgaObjectBmp::SgaObjectBmp( const Graphic& rGraphic, const INetURLObject& rURL, const OUString& )
{
if( FileExists( rURL ) )
Init( rGraphic, rURL );
@@ -323,7 +323,7 @@ void SgaObjectBmp::Init( const Graphic& rGraphic, const INetURLObject& rURL )
// ------------------------------------------------------------------------
-void SgaObjectBmp::WriteData( SvStream& rOut, const String& rDestDir ) const
+void SgaObjectBmp::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
// Version setzen
SgaObject::WriteData( rOut, rDestDir );
@@ -410,7 +410,7 @@ BitmapEx SgaObjectSound::GetThumbBmp() const
// ------------------------------------------------------------------------
-void SgaObjectSound::WriteData( SvStream& rOut, const String& rDestDir ) const
+void SgaObjectSound::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
rOut << (sal_uInt16) eSoundType;
@@ -446,7 +446,7 @@ SgaObjectAnim::SgaObjectAnim()
SgaObjectAnim::SgaObjectAnim( const Graphic& rGraphic,
const INetURLObject& rURL,
- const String& )
+ const OUString& )
{
aURL = rURL;
bIsValid = CreateThumb( rGraphic );
@@ -462,7 +462,7 @@ SgaObjectINet::SgaObjectINet()
// ------------------------------------------------------------------------
-SgaObjectINet::SgaObjectINet( const Graphic& rGraphic, const INetURLObject& rURL, const String& rFormatName ) :
+SgaObjectINet::SgaObjectINet( const Graphic& rGraphic, const INetURLObject& rURL, const OUString& rFormatName ) :
SgaObjectAnim ( rGraphic, rURL, rFormatName )
{
}
@@ -599,7 +599,7 @@ sal_Bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel )
// ------------------------------------------------------------------------
-void SgaObjectSvDraw::WriteData( SvStream& rOut, const String& rDestDir ) const
+void SgaObjectSvDraw::WriteData( SvStream& rOut, const OUString& rDestDir ) const
{
SgaObject::WriteData( rOut, rDestDir );
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOut, aTitle, RTL_TEXTENCODING_UTF8);
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 882a57a3f554..34213379045e 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -409,7 +409,7 @@ bool GalleryTheme::InsertObject( const SgaObject& rObj, sal_uIntPtr nInsertPos )
GalleryObject aNewEntry;
// update title of new object if necessary
- if( !rObj.GetTitle().Len() )
+ if( rObj.GetTitle().isEmpty() )
{
SgaObject* pOldObj = ImplReadSgaObject( pFoundEntry );
@@ -419,8 +419,8 @@ bool GalleryTheme::InsertObject( const SgaObject& rObj, sal_uIntPtr nInsertPos )
delete pOldObj;
}
}
- else if( rObj.GetTitle() == String( RTL_CONSTASCII_USTRINGPARAM( "__<empty>__" ) ) )
- ( (SgaObject&) rObj ).SetTitle( String() );
+ else if( rObj.GetTitle() == "__<empty>__" )
+ ( (SgaObject&) rObj ).SetTitle( "" );
ImplWriteSgaObject( rObj, nInsertPos, &aNewEntry );
pFoundEntry->nOffset = aNewEntry.nOffset;