summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorJean-Noël Rouvignac <jn.rouvignac@gmail.com>2013-02-08 09:06:10 +0100
committerTor Lillqvist <tml@iki.fi>2013-02-08 14:57:16 +0000
commit9e310cc32923ceb4b18d97ce68d54a339b935f01 (patch)
treed79b44b80c15f6bdb3116db4c9b6955a9e6cb4c9 /svtools
parent9c427991d9658a870ee0eb1bdc4cd3b393c93fd5 (diff)
fdo#38838 Some removal/replacement of the String/UniString with OUString
Change-Id: I6daea312198fae3a9717bd8d4fea6371aa4cd275 Reviewed-on: https://gerrit.libreoffice.org/1962 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/dialogs/filedlg2.cxx24
-rw-r--r--svtools/source/dialogs/filedlg2.hxx4
2 files changed, 13 insertions, 15 deletions
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index fb698ea5415f..b46f3246e3a0 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -37,7 +37,7 @@
using namespace com::sun::star;
using namespace com::sun::star::uno;
-typedef ::std::vector< UniString* > UniStringList;
+typedef ::std::vector< OUString > OUStringList;
#define INITCONTROL( p, ControlClass, nBits, aPos, aSize, aTitel, rHelpId ) \
p = new ControlClass( GetPathDialog(), WinBits( nBits ) ); \
@@ -413,27 +413,27 @@ void ImpPathDialog::UpdateEntries( const sal_Bool )
sal_uInt16 nEntries = aDir.Count();
if( nEntries )
{
- UniStringList aSortDirList;
+ OUStringList aSortDirList;
const comphelper::string::NaturalStringSorter& rSorter =
::vcl::unohelper::getNaturalStringSorterForAppLocale();
for ( sal_uInt16 n = 0; n < nEntries; n++ )
{
DirEntry& rEntry = aDir[n];
- UniString aName( rEntry.GetName() );
- if( aName.Len() && ( aName.GetChar(0) != '.' ) && rEntry.Exists() )
+ OUString aName( rEntry.GetName() );
+ if( aName.getLength() && ( aName[0] != '.' ) && rEntry.Exists() )
{
if( FileStat( rEntry ).GetKind() & FSYS_KIND_DIR )
{
size_t l = 0;
for( l = 0; l < aSortDirList.size(); l++ )
- if( rSorter.compare( *aSortDirList[ l ], aName ) > 0 )
+ if( rSorter.compare( aSortDirList[l], aName ) > 0 )
break;
if ( l < aSortDirList.size() ) {
- UniStringList::iterator it = aSortDirList.begin();
+ OUStringList::iterator it = aSortDirList.begin();
::std::advance( it, l );
- aSortDirList.insert( it, new UniString( aName ) );
+ aSortDirList.insert( it, aName );
} else {
- aSortDirList.push_back( new UniString( aName ) );
+ aSortDirList.push_back( aName );
}
}
}
@@ -441,10 +441,8 @@ void ImpPathDialog::UpdateEntries( const sal_Bool )
for( size_t l = 0; l < aSortDirList.size(); l++ )
{
- UniString aEntryStr( aTabString );
- aEntryStr += *aSortDirList[ l ];
+ OUString aEntryStr = aTabString + aSortDirList[l];
pDirList->InsertEntry( aEntryStr );
- delete aSortDirList[ l ];
}
}
@@ -624,7 +622,7 @@ void ImpPathDialog::PostExecute()
{
}
-void ImpPathDialog::SetPath( UniString const & rPath )
+void ImpPathDialog::SetPath( OUString const & rPath )
{
aPath = DirEntry( rPath );
@@ -644,7 +642,7 @@ void ImpPathDialog::SetPath( UniString const & rPath )
pSvPathDialog->LeaveWait();
}
-UniString ImpPathDialog::GetPath() const
+OUString ImpPathDialog::GetPath() const
{
DirEntry aFile( pEdit->GetText() );
aFile.ToAbs();
diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx
index abb5d7940f3f..8f6652d5225c 100644
--- a/svtools/source/dialogs/filedlg2.hxx
+++ b/svtools/source/dialogs/filedlg2.hxx
@@ -99,8 +99,8 @@ public:
ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, sal_Bool bCreateDir );
virtual ~ImpPathDialog();
- virtual void SetPath( const String& rPath );
- virtual String GetPath() const;
+ virtual void SetPath( const OUString& rPath );
+ virtual OUString GetPath() const;
virtual void PreExecute();
virtual void PostExecute();