Kaydet (Commit) 7df895ab authored tarafından Noel Grandin's avatar Noel Grandin

convert include/svtools/file*.hxx from String to OUString

Change-Id: Ie0e07c61caba1e15475900622c97e0f0426558d6
üst 21745675
...@@ -45,8 +45,8 @@ private: ...@@ -45,8 +45,8 @@ private:
Edit maEdit; Edit maEdit;
PushButton maButton; PushButton maButton;
String maButtonText; OUString maButtonText;
sal_Bool mbOpenDlg; sal_Bool mbOpenDlg;
Link maDialogCreatedHdl; Link maDialogCreatedHdl;
......
...@@ -34,7 +34,7 @@ namespace svt ...@@ -34,7 +34,7 @@ namespace svt
class SVT_DLLPUBLIC FileURLBox : public SvtURLBox class SVT_DLLPUBLIC FileURLBox : public SvtURLBox
{ {
private: private:
String m_sPreservedText; OUString m_sPreservedText;
public: public:
FileURLBox( Window* _pParent, WinBits _nStyle ); FileURLBox( Window* _pParent, WinBits _nStyle );
...@@ -56,7 +56,7 @@ namespace svt ...@@ -56,7 +56,7 @@ namespace svt
@see SvtURLBox::GetURL @see SvtURLBox::GetURL
*/ */
void DisplayURL( const String& _rURL ); void DisplayURL( const OUString& _rURL );
}; };
//......................................................................... //.........................................................................
......
...@@ -83,12 +83,12 @@ public: ...@@ -83,12 +83,12 @@ public:
SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags ); SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags );
~SvtFileView(); ~SvtFileView();
const String& GetViewURL() const; const OUString& GetViewURL() const;
String GetURL( SvTreeListEntry* pEntry ) const; OUString GetURL( SvTreeListEntry* pEntry ) const;
String GetCurrentURL() const; OUString GetCurrentURL() const;
sal_Bool GetParentURL( String& _rParentURL ) const; sal_Bool GetParentURL( OUString& _rParentURL ) const;
void CreatedFolder( const String& rUrl, const String& rNewFolder ); void CreatedFolder( const OUString& rUrl, const OUString& rNewFolder );
void SetHelpId( const OString& rHelpId ); void SetHelpId( const OString& rHelpId );
const OString& GetHelpId( ) const; const OString& GetHelpId( ) const;
...@@ -108,15 +108,15 @@ public: ...@@ -108,15 +108,15 @@ public:
action asynchronously. action asynchronously.
*/ */
FileViewResult Initialize( FileViewResult Initialize(
const String& rFolderURL, const OUString& rFolderURL,
const String& rFilter, const OUString& rFilter,
const FileViewAsyncAction* pAsyncDescriptor, const FileViewAsyncAction* pAsyncDescriptor,
const ::com::sun::star::uno::Sequence< OUString >& rBlackList const ::com::sun::star::uno::Sequence< OUString >& rBlackList
); );
FileViewResult Initialize( FileViewResult Initialize(
const String& rFolderURL, const OUString& rFolderURL,
const String& rFilter, const OUString& rFilter,
const FileViewAsyncAction* pAsyncDescriptor ); const FileViewAsyncAction* pAsyncDescriptor );
/** initialze the view with a sequence of contents, which have already been obtained elsewhere /** initialze the view with a sequence of contents, which have already been obtained elsewhere
...@@ -128,7 +128,7 @@ public: ...@@ -128,7 +128,7 @@ public:
/** initializes the view with the content of a folder given by an UCB content /** initializes the view with the content of a folder given by an UCB content
*/ */
sal_Bool Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, sal_Bool Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent,
const String& rFilter ); const OUString& rFilter );
/** reads the current content of the current folder again, and applies the given filter to it /** reads the current content of the current folder again, and applies the given filter to it
...@@ -145,7 +145,7 @@ public: ...@@ -145,7 +145,7 @@ public:
action asynchronously. action asynchronously.
*/ */
FileViewResult ExecuteFilter( FileViewResult ExecuteFilter(
const String& rFilter, const OUString& rFilter,
const FileViewAsyncAction* pAsyncDescriptor const FileViewAsyncAction* pAsyncDescriptor
); );
...@@ -188,8 +188,8 @@ public: ...@@ -188,8 +188,8 @@ public:
// EnableContextMenu( sal_True )/EnableDelete(sal_True) disable name replacing! // EnableContextMenu( sal_True )/EnableDelete(sal_True) disable name replacing!
// save and load column size and sort order // save and load column size and sort order
String GetConfigString() const; OUString GetConfigString() const;
void SetConfigString( const String& rCfgStr ); void SetConfigString( const OUString& rCfgStr );
void EndInplaceEditing( bool _bCancel ); void EndInplaceEditing( bool _bCancel );
...@@ -242,7 +242,7 @@ private: ...@@ -242,7 +242,7 @@ private:
public: public:
QueryDeleteDlg_Impl( Window* pParent, QueryDeleteDlg_Impl( Window* pParent,
const String& rName ); const OUString& rName );
void EnableAllButton() { _aAllButton.Enable( sal_True ); } void EnableAllButton() { _aAllButton.Enable( sal_True ); }
QueryDeleteResult_Impl GetResult() const { return _eResult; } QueryDeleteResult_Impl GetResult() const { return _eResult; }
......
...@@ -173,9 +173,9 @@ private: ...@@ -173,9 +173,9 @@ private:
SvtFileView_Impl* mpParent; SvtFileView_Impl* mpParent;
Timer maResetQuickSearch; Timer maResetQuickSearch;
OUString maQuickSearchText; OUString maQuickSearchText;
String msAccessibleDescText; OUString msAccessibleDescText;
String msFolder; OUString msFolder;
String msFile; OUString msFile;
sal_uInt32 mnSearchIndex; sal_uInt32 mnSearchIndex;
sal_Bool mbResizeDisabled : 1; sal_Bool mbResizeDisabled : 1;
sal_Bool mbAutoResize : 1; sal_Bool mbAutoResize : 1;
...@@ -320,7 +320,7 @@ protected: ...@@ -320,7 +320,7 @@ protected:
HashedEntry maHashedURL; // for future purposes when dealing with a set of cached HashedEntry maHashedURL; // for future purposes when dealing with a set of cached
// NameTranslationLists // NameTranslationLists
private: private:
const String maTransFileName; const OUString maTransFileName;
void Init(); // reads the translation file and fills the (internal) list void Init(); // reads the translation file and fills the (internal) list
public: public:
...@@ -338,11 +338,11 @@ public: ...@@ -338,11 +338,11 @@ public:
inline void Update(); // clears list and init inline void Update(); // clears list and init
inline const String& GetTransTableFileName() const; inline const OUString& GetTransTableFileName() const;
// returns the name for the file, which contains the translation strings // returns the name for the file, which contains the translation strings
}; };
inline const String& NameTranslationList::GetTransTableFileName() const inline const OUString& NameTranslationList::GetTransTableFileName() const
{ {
return maTransFileName; return maTransFileName;
} }
...@@ -361,7 +361,7 @@ void NameTranslationList::Init() ...@@ -361,7 +361,7 @@ void NameTranslationList::Init()
if( aTestContent.isDocument() ) if( aTestContent.isDocument() )
{ {
// ... also tests the existence of maTransFile by throwing an Exception // ... also tests the existence of maTransFile by throwing an Exception
String aFsysName( maTransFile.getFSysPath( INetURLObject::FSYS_DETECT ) ); OUString aFsysName( maTransFile.getFSysPath( INetURLObject::FSYS_DETECT ) );
Config aConfig( aFsysName ); Config aConfig( aFsysName );
aConfig.SetGroup( OString(RTL_CONSTASCII_STRINGPARAM("TRANSLATIONNAMES")) ); aConfig.SetGroup( OString(RTL_CONSTASCII_STRINGPARAM("TRANSLATIONNAMES")) );
...@@ -429,7 +429,7 @@ public: ...@@ -429,7 +429,7 @@ public:
virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const; virtual sal_Bool GetTranslation( const OUString& rOriginalName, OUString& rTranslatedName ) const;
void SetActualFolder( const INetURLObject& rActualFolder ); void SetActualFolder( const INetURLObject& rActualFolder );
const String* GetTransTableFileName() const; const OUString* GetTransTableFileName() const;
// returns the name for the file, which contains the translation strings // returns the name for the file, which contains the translation strings
}; };
...@@ -470,9 +470,9 @@ public: ...@@ -470,9 +470,9 @@ public:
IntlWrapper aIntlWrapper; IntlWrapper aIntlWrapper;
String maViewURL; OUString maViewURL;
String maAllFilter; OUString maAllFilter;
String maCurrentFilter; OUString maCurrentFilter;
Image maFolderImage; Image maFolderImage;
Link maOpenDoneLink; Link maOpenDoneLink;
Reference< XCommandEnvironment > mxCmdEnv; Reference< XCommandEnvironment > mxCmdEnv;
...@@ -485,7 +485,7 @@ public: ...@@ -485,7 +485,7 @@ public:
void Clear(); void Clear();
FileViewResult GetFolderContent_Impl( FileViewResult GetFolderContent_Impl(
const String& rFolder, const OUString& rFolder,
const FileViewAsyncAction* pAsyncDescriptor, const FileViewAsyncAction* pAsyncDescriptor,
const ::com::sun::star::uno::Sequence< OUString >& rBlackList = ::com::sun::star::uno::Sequence< OUString >() ); const ::com::sun::star::uno::Sequence< OUString >& rBlackList = ::com::sun::star::uno::Sequence< OUString >() );
...@@ -506,10 +506,10 @@ public: ...@@ -506,10 +506,10 @@ public:
void EntryRemoved( const OUString& rURL ); void EntryRemoved( const OUString& rURL );
void EntryRenamed( OUString& rURL, void EntryRenamed( OUString& rURL,
const OUString& rName ); const OUString& rName );
String FolderInserted( const OUString& rURL, OUString FolderInserted( const OUString& rURL,
const OUString& rTitle ); const OUString& rTitle );
sal_uLong GetEntryPos( const OUString& rURL ); sal_uLong GetEntryPos( const OUString& rURL );
inline void EnableContextMenu( sal_Bool bEnable ); inline void EnableContextMenu( sal_Bool bEnable );
inline void EnableDelete( sal_Bool bEnable ); inline void EnableDelete( sal_Bool bEnable );
...@@ -902,7 +902,7 @@ void ViewTabListBox_Impl::DeleteEntries() ...@@ -902,7 +902,7 @@ void ViewTabListBox_Impl::DeleteEntries()
{ {
svtools::QueryDeleteResult_Impl eResult = svtools::QUERYDELETE_YES; svtools::QueryDeleteResult_Impl eResult = svtools::QUERYDELETE_YES;
SvTreeListEntry* pEntry = FirstSelected(); SvTreeListEntry* pEntry = FirstSelected();
String aURL; OUString aURL;
OString sDialogPosition; OString sDialogPosition;
while ( pEntry && ( eResult != svtools::QUERYDELETE_CANCEL ) ) while ( pEntry && ( eResult != svtools::QUERYDELETE_CANCEL ) )
...@@ -913,7 +913,7 @@ void ViewTabListBox_Impl::DeleteEntries() ...@@ -913,7 +913,7 @@ void ViewTabListBox_Impl::DeleteEntries()
if ( pCurEntry->GetUserData() ) if ( pCurEntry->GetUserData() )
aURL = ( (SvtContentEntry*)pCurEntry->GetUserData() )->maURL; aURL = ( (SvtContentEntry*)pCurEntry->GetUserData() )->maURL;
if ( !aURL.Len() ) if ( aURL.isEmpty() )
continue; continue;
bool canDelete = true; bool canDelete = true;
...@@ -1092,12 +1092,12 @@ OUString ViewTabListBox_Impl::GetAccessibleObjectDescription( ::svt::AccessibleB ...@@ -1092,12 +1092,12 @@ OUString ViewTabListBox_Impl::GetAccessibleObjectDescription( ::svt::AccessibleB
SvtContentEntry* pData = (SvtContentEntry*)pEntry->GetUserData(); SvtContentEntry* pData = (SvtContentEntry*)pEntry->GetUserData();
if ( pData ) if ( pData )
{ {
const String sVar1( RTL_CONSTASCII_USTRINGPARAM( "%1" ) ); const OUString sVar1( "%1" );
const String sVar2( RTL_CONSTASCII_USTRINGPARAM( "%2" ) ); const OUString sVar2( "%2" );
String aText( msAccessibleDescText ); OUString aText( msAccessibleDescText );
aText.SearchAndReplace( sVar1, pData->mbIsFolder ? msFolder : msFile ); aText = aText.replaceAll( sVar1, pData->mbIsFolder ? msFolder : msFile );
aText.SearchAndReplace( sVar2, pData->maURL ); aText = aText.replaceAll( sVar2, pData->maURL );
sRet += OUString( aText ); sRet += aText;
} }
} }
} }
...@@ -1191,9 +1191,9 @@ SvtFileView::~SvtFileView() ...@@ -1191,9 +1191,9 @@ SvtFileView::~SvtFileView()
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
String SvtFileView::GetURL( SvTreeListEntry* pEntry ) const OUString SvtFileView::GetURL( SvTreeListEntry* pEntry ) const
{ {
String aURL; OUString aURL;
if ( pEntry && pEntry->GetUserData() ) if ( pEntry && pEntry->GetUserData() )
aURL = ( (SvtContentEntry*)pEntry->GetUserData() )->maURL; aURL = ( (SvtContentEntry*)pEntry->GetUserData() )->maURL;
return aURL; return aURL;
...@@ -1201,9 +1201,9 @@ String SvtFileView::GetURL( SvTreeListEntry* pEntry ) const ...@@ -1201,9 +1201,9 @@ String SvtFileView::GetURL( SvTreeListEntry* pEntry ) const
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
String SvtFileView::GetCurrentURL() const OUString SvtFileView::GetCurrentURL() const
{ {
String aURL; OUString aURL;
SvTreeListEntry* pEntry = mpImp->mpView->FirstSelected(); SvTreeListEntry* pEntry = mpImp->mpView->FirstSelected();
if ( pEntry && pEntry->GetUserData() ) if ( pEntry && pEntry->GetUserData() )
aURL = ( (SvtContentEntry*)pEntry->GetUserData() )->maURL; aURL = ( (SvtContentEntry*)pEntry->GetUserData() )->maURL;
...@@ -1211,9 +1211,9 @@ String SvtFileView::GetCurrentURL() const ...@@ -1211,9 +1211,9 @@ String SvtFileView::GetCurrentURL() const
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void SvtFileView::CreatedFolder( const String& rUrl, const String& rNewFolder ) void SvtFileView::CreatedFolder( const OUString& rUrl, const OUString& rNewFolder )
{ {
String sEntry = mpImp->FolderInserted( rUrl, rNewFolder ); OUString sEntry = mpImp->FolderInserted( rUrl, rNewFolder );
SvTreeListEntry* pEntry = mpImp->mpView->InsertEntry( sEntry, mpImp->maFolderImage, mpImp->maFolderImage ); SvTreeListEntry* pEntry = mpImp->mpView->InsertEntry( sEntry, mpImp->maFolderImage, mpImp->maFolderImage );
SvtContentEntry* pUserData = new SvtContentEntry( rUrl, sal_True ); SvtContentEntry* pUserData = new SvtContentEntry( rUrl, sal_True );
pEntry->SetUserData( pUserData ); pEntry->SetUserData( pUserData );
...@@ -1226,7 +1226,7 @@ FileViewResult SvtFileView::PreviousLevel( const FileViewAsyncAction* pAsyncDesc ...@@ -1226,7 +1226,7 @@ FileViewResult SvtFileView::PreviousLevel( const FileViewAsyncAction* pAsyncDesc
{ {
FileViewResult eResult = eFailure; FileViewResult eResult = eFailure;
String sParentURL; OUString sParentURL;
if ( GetParentURL( sParentURL ) ) if ( GetParentURL( sParentURL ) )
eResult = Initialize( sParentURL, mpImp->maCurrentFilter, pAsyncDescriptor, mpBlackList ); eResult = Initialize( sParentURL, mpImp->maCurrentFilter, pAsyncDescriptor, mpBlackList );
...@@ -1235,7 +1235,7 @@ FileViewResult SvtFileView::PreviousLevel( const FileViewAsyncAction* pAsyncDesc ...@@ -1235,7 +1235,7 @@ FileViewResult SvtFileView::PreviousLevel( const FileViewAsyncAction* pAsyncDesc
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const sal_Bool SvtFileView::GetParentURL( OUString& rParentURL ) const
{ {
sal_Bool bRet = sal_False; sal_Bool bRet = sal_False;
try try
...@@ -1248,8 +1248,8 @@ sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const ...@@ -1248,8 +1248,8 @@ sal_Bool SvtFileView::GetParentURL( String& rParentURL ) const
Reference< XContent > xParent( xChild->getParent(), UNO_QUERY ); Reference< XContent > xParent( xChild->getParent(), UNO_QUERY );
if ( xParent.is() ) if ( xParent.is() )
{ {
rParentURL = String( xParent->getIdentifier()->getContentIdentifier() ); rParentURL = xParent->getIdentifier()->getContentIdentifier();
bRet = ( rParentURL.Len() > 0 && rParentURL != mpImp->maViewURL ); bRet = !rParentURL.isEmpty() && rParentURL != mpImp->maViewURL;
} }
} }
} }
...@@ -1292,7 +1292,7 @@ void SvtFileView::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) ...@@ -1292,7 +1292,7 @@ void SvtFileView::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, const String& rFilter ) sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, const OUString& rFilter )
{ {
WaitObject aWaitCursor( this ); WaitObject aWaitCursor( this );
...@@ -1315,15 +1315,15 @@ sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com: ...@@ -1315,15 +1315,15 @@ sal_Bool SvtFileView::Initialize( const ::com::sun::star::uno::Reference< ::com:
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
FileViewResult SvtFileView::Initialize( FileViewResult SvtFileView::Initialize(
const String& rURL, const OUString& rURL,
const String& rFilter, const OUString& rFilter,
const FileViewAsyncAction* pAsyncDescriptor, const FileViewAsyncAction* pAsyncDescriptor,
const ::com::sun::star::uno::Sequence< OUString >& rBlackList ) const ::com::sun::star::uno::Sequence< OUString >& rBlackList )
{ {
WaitObject aWaitCursor( this ); WaitObject aWaitCursor( this );
mpBlackList = rBlackList; mpBlackList = rBlackList;
String sPushURL( mpImp->maViewURL ); OUString sPushURL( mpImp->maViewURL );
mpImp->maViewURL = rURL; mpImp->maViewURL = rURL;
FileViewResult eResult = ExecuteFilter( rFilter, pAsyncDescriptor ); FileViewResult eResult = ExecuteFilter( rFilter, pAsyncDescriptor );
...@@ -1346,8 +1346,8 @@ FileViewResult SvtFileView::Initialize( ...@@ -1346,8 +1346,8 @@ FileViewResult SvtFileView::Initialize(
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
FileViewResult SvtFileView::Initialize( FileViewResult SvtFileView::Initialize(
const String& rURL, const OUString& rURL,
const String& rFilter, const OUString& rFilter,
const FileViewAsyncAction* pAsyncDescriptor ) const FileViewAsyncAction* pAsyncDescriptor )
{ {
return Initialize( rURL, rFilter, pAsyncDescriptor, ::com::sun::star::uno::Sequence< OUString >()); return Initialize( rURL, rFilter, pAsyncDescriptor, ::com::sun::star::uno::Sequence< OUString >());
...@@ -1360,7 +1360,7 @@ sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents ) ...@@ -1360,7 +1360,7 @@ sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents )
{ {
WaitObject aWaitCursor( this ); WaitObject aWaitCursor( this );
mpImp->maViewURL = String(); mpImp->maViewURL = "";
mpImp->maCurrentFilter = mpImp->maAllFilter; mpImp->maCurrentFilter = mpImp->maAllFilter;
mpImp->Clear(); mpImp->Clear();
...@@ -1377,10 +1377,9 @@ sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents ) ...@@ -1377,10 +1377,9 @@ sal_Bool SvtFileView::Initialize( const Sequence< OUString >& aContents )
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
FileViewResult SvtFileView::ExecuteFilter( const String& rFilter, const FileViewAsyncAction* pAsyncDescriptor ) FileViewResult SvtFileView::ExecuteFilter( const OUString& rFilter, const FileViewAsyncAction* pAsyncDescriptor )
{ {
mpImp->maCurrentFilter = rFilter; mpImp->maCurrentFilter = rFilter.toAsciiLowerCase();
mpImp->maCurrentFilter.ToLowerAscii();
mpImp->Clear(); mpImp->Clear();
FileViewResult eResult = mpImp->GetFolderContent_Impl( mpImp->maViewURL, pAsyncDescriptor, mpBlackList ); FileViewResult eResult = mpImp->GetFolderContent_Impl( mpImp->maViewURL, pAsyncDescriptor, mpBlackList );
...@@ -1461,7 +1460,7 @@ void SvtFileView::SetFocus() ...@@ -1461,7 +1460,7 @@ void SvtFileView::SetFocus()
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
const String& SvtFileView::GetViewURL() const const OUString& SvtFileView::GetViewURL() const
{ {
return mpImp->maViewURL; return mpImp->maViewURL;
} }
...@@ -1560,28 +1559,28 @@ IMPL_LINK( SvtFileView, HeaderEndDrag_Impl, HeaderBar*, pBar ) ...@@ -1560,28 +1559,28 @@ IMPL_LINK( SvtFileView, HeaderEndDrag_Impl, HeaderBar*, pBar )
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
String SvtFileView::GetConfigString() const OUString SvtFileView::GetConfigString() const
{ {
String sRet; OUString sRet;
HeaderBar* pBar = mpImp->mpView->GetHeaderBar(); HeaderBar* pBar = mpImp->mpView->GetHeaderBar();
DBG_ASSERT( pBar, "invalid headerbar" ); DBG_ASSERT( pBar, "invalid headerbar" );
// sort order // sort order
sRet += OUString::number( mpImp->mnSortColumn ); sRet += OUString::number( mpImp->mnSortColumn );
sRet += ';'; sRet += ";";
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn ); HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW ); sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
sRet += bUp ? '1' : '0'; sRet += bUp ? "1" : "0";
sRet += ';'; sRet += ";";
sal_uInt16 nCount = pBar->GetItemCount(); sal_uInt16 nCount = pBar->GetItemCount();
for ( sal_uInt16 i = 0; i < nCount; ++i ) for ( sal_uInt16 i = 0; i < nCount; ++i )
{ {
sal_uInt16 nId = pBar->GetItemId(i); sal_uInt16 nId = pBar->GetItemId(i);
sRet += OUString::number( nId ); sRet += OUString::number( nId );
sRet += ';'; sRet += ";";
sRet += OUString::number( pBar->GetItemSize( nId ) ); sRet += OUString::number( pBar->GetItemSize( nId ) );
sRet += ';'; sRet += ";";
} }
sRet = comphelper::string::stripEnd(sRet, ';'); sRet = comphelper::string::stripEnd(sRet, ';');
...@@ -1589,14 +1588,14 @@ String SvtFileView::GetConfigString() const ...@@ -1589,14 +1588,14 @@ String SvtFileView::GetConfigString() const
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void SvtFileView::SetConfigString( const String& rCfgStr ) void SvtFileView::SetConfigString( const OUString& rCfgStr )
{ {
HeaderBar* pBar = mpImp->mpView->GetHeaderBar(); HeaderBar* pBar = mpImp->mpView->GetHeaderBar();
DBG_ASSERT( pBar, "invalid headerbar" ); DBG_ASSERT( pBar, "invalid headerbar" );
sal_Int32 nIdx = 0; sal_Int32 nIdx = 0;
mpImp->mnSortColumn = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32(); mpImp->mnSortColumn = (sal_uInt16)rCfgStr.getToken( 0, ';', nIdx ).toInt32();
sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32(); sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.getToken( 0, ';', nIdx ).toInt32();
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn ); HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
if ( bUp ) if ( bUp )
...@@ -1613,8 +1612,8 @@ void SvtFileView::SetConfigString( const String& rCfgStr ) ...@@ -1613,8 +1612,8 @@ void SvtFileView::SetConfigString( const String& rCfgStr )
while ( nIdx != -1 ) while ( nIdx != -1 )
{ {
sal_uInt16 nItemId = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32(); sal_uInt16 nItemId = (sal_uInt16)rCfgStr.getToken( 0, ';', nIdx ).toInt32();
pBar->SetItemSize( nItemId, rCfgStr.GetToken( 0, ';', nIdx ).ToInt32() ); pBar->SetItemSize( nItemId, rCfgStr.getToken( 0, ';', nIdx ).toInt32() );
} }
HeaderSelect_Impl( pBar ); HeaderSelect_Impl( pBar );
...@@ -1677,7 +1676,7 @@ sal_Bool NameTranslator_Impl::GetTranslation( const OUString& rOrg, OUString& rT ...@@ -1677,7 +1676,7 @@ sal_Bool NameTranslator_Impl::GetTranslation( const OUString& rOrg, OUString& rT
return bRet; return bRet;
} }
const String* NameTranslator_Impl::GetTransTableFileName() const const OUString* NameTranslator_Impl::GetTransTableFileName() const
{ {
return mpActFolder? &mpActFolder->GetTransTableFileName() : NULL; return mpActFolder? &mpActFolder->GetTransTableFileName() : NULL;
} }
...@@ -1738,7 +1737,7 @@ void SvtFileView_Impl::Clear() ...@@ -1738,7 +1737,7 @@ void SvtFileView_Impl::Clear()
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
FileViewResult SvtFileView_Impl::GetFolderContent_Impl( FileViewResult SvtFileView_Impl::GetFolderContent_Impl(
const String& rFolder, const OUString& rFolder,
const FileViewAsyncAction* pAsyncDescriptor, const FileViewAsyncAction* pAsyncDescriptor,
const ::com::sun::star::uno::Sequence< OUString >& rBlackList ) const ::com::sun::star::uno::Sequence< OUString >& rBlackList )
{ {
...@@ -1861,14 +1860,14 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter ) ...@@ -1861,14 +1860,14 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter )
{ {
sal_Bool bHideTransFile = mbReplaceNames && mpNameTrans; sal_Bool bHideTransFile = mbReplaceNames && mpNameTrans;
String sHideEntry; OUString sHideEntry;
if( bHideTransFile ) if( bHideTransFile )
{ {
const String* pTransTableFileName = mpNameTrans->GetTransTableFileName(); const OUString* pTransTableFileName = mpNameTrans->GetTransTableFileName();
if( pTransTableFileName ) if( pTransTableFileName )
{ {
sHideEntry = *pTransTableFileName; sHideEntry = *pTransTableFileName;
sHideEntry.ToUpperAscii(); sHideEntry = sHideEntry.toAsciiUpperCase();
} }
else else
bHideTransFile = sal_False; bHideTransFile = sal_False;
...@@ -1899,7 +1898,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter ) ...@@ -1899,7 +1898,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter )
// do the filtering // do the filtering
::std::vector< SortingData_Impl* >::iterator aContentLoop = maContent.begin(); ::std::vector< SortingData_Impl* >::iterator aContentLoop = maContent.begin();
String sCompareString; OUString sCompareString;
do do
{ {
if ( (*aContentLoop)->mbIsFolder ) if ( (*aContentLoop)->mbIsFolder )
...@@ -2259,7 +2258,7 @@ void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending ) ...@@ -2259,7 +2258,7 @@ void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending )
// reset the quick search index // reset the quick search index
mpView->ResetQuickSearch_Impl( NULL ); mpView->ResetQuickSearch_Impl( NULL );
String aEntryURL; OUString aEntryURL;
SvTreeListEntry* pEntry = mpView->GetCurEntry(); SvTreeListEntry* pEntry = mpView->GetCurEntry();
if ( pEntry && pEntry->GetUserData() ) if ( pEntry && pEntry->GetUserData() )
aEntryURL = ( (SvtContentEntry*)pEntry->GetUserData() )->maURL; aEntryURL = ( (SvtContentEntry*)pEntry->GetUserData() )->maURL;
...@@ -2436,7 +2435,7 @@ void SvtFileView_Impl::EntryRenamed( OUString& rURL, ...@@ -2436,7 +2435,7 @@ void SvtFileView_Impl::EntryRenamed( OUString& rURL,
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& rTitle ) OUString SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& rTitle )
{ {
::osl::MutexGuard aGuard( maMutex ); ::osl::MutexGuard aGuard( maMutex );
...@@ -2475,7 +2474,7 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r ...@@ -2475,7 +2474,7 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r
pData->maDisplayText = aValue; pData->maDisplayText = aValue;
maContent.push_back( pData ); maContent.push_back( pData );
return String( aValue ); return aValue;
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
...@@ -2547,7 +2546,7 @@ namespace svtools { ...@@ -2547,7 +2546,7 @@ namespace svtools {
QueryDeleteDlg_Impl::QueryDeleteDlg_Impl QueryDeleteDlg_Impl::QueryDeleteDlg_Impl
( (
Window* pParent, Window* pParent,
const String& rName // entry name const OUString& rName // entry name
) : ) :
ModalDialog( pParent, SvtResId( DLG_SVT_QUERYDELETE ) ), ModalDialog( pParent, SvtResId( DLG_SVT_QUERYDELETE ) ),
......
...@@ -112,10 +112,10 @@ using namespace svtools; ...@@ -112,10 +112,10 @@ using namespace svtools;
struct FolderHistory struct FolderHistory
{ {
String m_sURL; OUString m_sURL;
sal_uLong m_nGroup; sal_uLong m_nGroup;
FolderHistory( const String& _rURL, sal_Int32 _nGroup ) : FolderHistory( const OUString& _rURL, sal_Int32 _nGroup ) :
m_sURL( _rURL ), m_nGroup( _nGroup ) {} m_sURL( _rURL ), m_nGroup( _nGroup ) {}
}; };
...@@ -546,7 +546,7 @@ void SvtFileViewWindow_Impl::OpenFolder( const String& rURL ) ...@@ -546,7 +546,7 @@ void SvtFileViewWindow_Impl::OpenFolder( const String& rURL )
aNewFolderLink.Call( this ); aNewFolderLink.Call( this );
} }
sal_Bool SvtFileViewWindow_Impl::HasPreviousLevel( String& rURL ) const sal_Bool SvtFileViewWindow_Impl::HasPreviousLevel( OUString& rURL ) const
{ {
INetURLObject aViewObj( aFileView.GetViewURL() ); INetURLObject aViewObj( aFileView.GetViewURL() );
INetURLObject aRootObj( aCurrentRootURL ); INetURLObject aRootObj( aCurrentRootURL );
...@@ -1027,7 +1027,7 @@ void SvtTemplateWindow::DoAction( sal_uInt16 nAction ) ...@@ -1027,7 +1027,7 @@ void SvtTemplateWindow::DoAction( sal_uInt16 nAction )
case TI_DOCTEMPLATE_PREV : case TI_DOCTEMPLATE_PREV :
{ {
String aURL; OUString aURL;
if ( pFileWin->HasPreviousLevel( aURL ) ) if ( pFileWin->HasPreviousLevel( aURL ) )
pFileWin->OpenFolder( aURL ); pFileWin->OpenFolder( aURL );
break; break;
...@@ -1035,8 +1035,8 @@ void SvtTemplateWindow::DoAction( sal_uInt16 nAction ) ...@@ -1035,8 +1035,8 @@ void SvtTemplateWindow::DoAction( sal_uInt16 nAction )
case TI_DOCTEMPLATE_PRINT : case TI_DOCTEMPLATE_PRINT :
{ {
String sPrintFile( pFileWin->GetSelectedFile() ); OUString sPrintFile( pFileWin->GetSelectedFile() );
if ( sPrintFile.Len() > 0 ) if ( !sPrintFile.isEmpty() )
PrintFile( sPrintFile ); PrintFile( sPrintFile );
break; break;
} }
......
...@@ -146,7 +146,7 @@ public: ...@@ -146,7 +146,7 @@ public:
String GetSelectedFile() const; String GetSelectedFile() const;
void OpenFolder( const String& rURL ); void OpenFolder( const String& rURL );
sal_Bool HasPreviousLevel( String& rURL ) const; sal_Bool HasPreviousLevel( OUString& rURL ) const;
String GetFolderTitle() const; String GetFolderTitle() const;
void SetFocus(); void SetFocus();
}; };
......
...@@ -37,7 +37,7 @@ namespace svt ...@@ -37,7 +37,7 @@ namespace svt
} }
//--------------------------------------------------------------------- //---------------------------------------------------------------------
void FileURLBox::DisplayURL( const String& _rURL ) void FileURLBox::DisplayURL( const OUString& _rURL )
{ {
String sOldText = GetText(); String sOldText = GetText();
......
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