summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
Diffstat (limited to 'uui')
-rw-r--r--uui/source/alreadyopen.cxx2
-rw-r--r--uui/source/alreadyopen.hxx2
-rw-r--r--uui/source/fltdlg.cxx10
-rw-r--r--uui/source/fltdlg.hxx8
-rw-r--r--uui/source/iahndl-authentication.cxx16
-rw-r--r--uui/source/iahndl-filter.cxx2
-rw-r--r--uui/source/iahndl-ssl.cxx22
-rw-r--r--uui/source/logindlg.cxx4
-rw-r--r--uui/source/logindlg.hxx22
-rw-r--r--uui/source/loginerr.hxx50
-rw-r--r--uui/source/masterpasscrtdlg.cxx6
-rw-r--r--uui/source/masterpassworddlg.cxx2
-rw-r--r--uui/source/nameclashdlg.cxx6
-rw-r--r--uui/source/openlocked.cxx2
-rw-r--r--uui/source/openlocked.hxx2
-rw-r--r--uui/source/passworddlg.hxx6
-rw-r--r--uui/source/secmacrowarnings.cxx37
-rw-r--r--uui/source/secmacrowarnings.hxx2
-rw-r--r--uui/source/trylater.cxx2
-rw-r--r--uui/source/trylater.hxx2
20 files changed, 105 insertions, 100 deletions
diff --git a/uui/source/alreadyopen.cxx b/uui/source/alreadyopen.cxx
index 002d05244542..b3e8326f95d6 100644
--- a/uui/source/alreadyopen.cxx
+++ b/uui/source/alreadyopen.cxx
@@ -20,7 +20,7 @@
#include "ids.hrc"
#include "alreadyopen.hxx"
-AlreadyOpenQueryBox::AlreadyOpenQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage, sal_Bool bIsStoring ) :
+AlreadyOpenQueryBox::AlreadyOpenQueryBox( Window* pParent, ResMgr* pResMgr, const OUString& aMessage, sal_Bool bIsStoring ) :
MessBox(pParent, 0,
ResId(STR_ALREADYOPEN_TITLE, *pResMgr).toString(),
aMessage )
diff --git a/uui/source/alreadyopen.hxx b/uui/source/alreadyopen.hxx
index 1d39af80da69..0dcce44325ff 100644
--- a/uui/source/alreadyopen.hxx
+++ b/uui/source/alreadyopen.hxx
@@ -24,7 +24,7 @@
class AlreadyOpenQueryBox : public MessBox
{
public:
- AlreadyOpenQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage, sal_Bool bIsStoring );
+ AlreadyOpenQueryBox( Window* pParent, ResMgr* pResMgr, const OUString& aMessage, sal_Bool bIsStoring );
~AlreadyOpenQueryBox();
};
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index ebedfbc9ee39..5ffbec2459c5 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -76,7 +76,7 @@ FilterDialog::FilterDialog( Window* pParentWindow ,
@onerror -
@threadsafe no
*//*-*************************************************************************************************************/
-void FilterDialog::SetURL( const String& sURL )
+void FilterDialog::SetURL( const OUString& sURL )
{
// convert it and use given pure string as fallback if conversion failed
m_ftURL.SetText( impl_buildUIFileName(sURL) );
@@ -142,8 +142,8 @@ bool FilterDialog::AskForFilter( FilterNameListPtr& pSelectedItem )
{
if( ModalDialog::Execute() == RET_OK )
{
- String sEntry = m_lbFilters.GetSelectEntry();
- if( sEntry.Len() > 0 )
+ OUString sEntry = m_lbFilters.GetSelectEntry();
+ if( !sEntry.isEmpty() )
{
int nPos = m_lbFilters.GetSelectEntryPos();
if( nPos < (int)(m_pFilterNames->size()) )
@@ -183,7 +183,7 @@ class StringCalculator : public ::cppu::WeakImplHelper1< ::com::sun::star::util:
sal_Int32 SAL_CALL queryStringWidth( const OUString& sString ) throw( ::com::sun::star::uno::RuntimeException )
{
- return (sal_Int32)(m_pDevice->GetTextWidth(String(sString)));
+ return (sal_Int32)(m_pDevice->GetTextWidth(sString));
}
private:
@@ -204,7 +204,7 @@ class StringCalculator : public ::cppu::WeakImplHelper1< ::com::sun::star::util:
@onerror We return given name without any changes.
@threadsafe no
*//*-*************************************************************************************************************/
-String FilterDialog::impl_buildUIFileName( const String& sName )
+OUString FilterDialog::impl_buildUIFileName( const OUString& sName )
{
OUString sShortName( sName );
diff --git a/uui/source/fltdlg.hxx b/uui/source/fltdlg.hxx
index a156fb2fd58c..590646860cc3 100644
--- a/uui/source/fltdlg.hxx
+++ b/uui/source/fltdlg.hxx
@@ -36,8 +36,8 @@ namespace uui
struct FilterNamePair
{
- String sInternal;
- String sUI ;
+ OUString sInternal;
+ OUString sUI ;
};
typedef ::std::vector< FilterNamePair > FilterNameList ;
@@ -49,14 +49,14 @@ class FilterDialog : public ModalDialog
public:
FilterDialog ( Window* pParentWindow ,
ResMgr* pResMgr );
- void SetURL ( const String& sURL );
+ void SetURL ( const OUString& sURL );
void ChangeFilters( const FilterNameList* pFilterNames );
bool AskForFilter ( FilterNameListPtr& pSelectedItem );
// helper (or hided functions!)
private:
short Execute() { return RET_CANCEL; };
- String impl_buildUIFileName( const String& sURL );
+ OUString impl_buildUIFileName( const OUString& sURL );
// member
private:
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index ef1b260eb4af..0f5f7283dbab 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -72,9 +72,9 @@ executeLoginDialog(
bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials();
sal_uInt16 nFlags = 0;
- if (rInfo.GetPath().Len() == 0)
+ if (rInfo.GetPath().isEmpty())
nFlags |= LF_NO_PATH;
- if (rInfo.GetErrorText().Len() == 0)
+ if (rInfo.GetErrorText().isEmpty())
nFlags |= LF_NO_ERRORTEXT;
if (!bAccount)
nFlags |= LF_NO_ACCOUNT;
@@ -90,7 +90,7 @@ executeLoginDialog(
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
boost::scoped_ptr< LoginDialog > xDialog(
new LoginDialog( pParent, nFlags, rInfo.GetServer(), rRealm, xManager.get()));
- if (rInfo.GetErrorText().Len() != 0)
+ if (!rInfo.GetErrorText().isEmpty())
xDialog->SetErrorText(rInfo.GetErrorText());
xDialog->SetName(rInfo.GetUserName());
if (bAccount)
@@ -353,12 +353,12 @@ handleAuthenticationRequest_(
}
}
// Empty user name can not be valid:
- else if (aInfo.GetUserName().Len() != 0)
+ else if (!aInfo.GetUserName().isEmpty())
{
uno::Sequence< OUString >
- aPassList(aInfo.GetAccount().Len() == 0 ? 1 : 2);
+ aPassList(aInfo.GetAccount().isEmpty() ? 1 : 2);
aPassList[0] = aInfo.GetPassword();
- if (aInfo.GetAccount().Len() != 0)
+ if (!aInfo.GetAccount().isEmpty())
aPassList[1] = aInfo.GetAccount();
if (aInfo.GetIsRememberPassword())
@@ -552,8 +552,8 @@ executePasswordDialog(
pDialog->SetMinLen(0);
rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL );
- rInfo.SetPassword( bIsPasswordToModify ? String() : pDialog->GetPassword() );
- rInfo.SetPasswordToModify( bIsPasswordToModify ? pDialog->GetPassword() : String() );
+ rInfo.SetPassword( bIsPasswordToModify ? OUString() : pDialog->GetPassword() );
+ rInfo.SetPasswordToModify( bIsPasswordToModify ? pDialog->GetPassword() : OUString() );
}
}
catch (std::bad_alloc const &)
diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx
index d631d0479025..031ef91ff0a0 100644
--- a/uui/source/iahndl-filter.cxx
+++ b/uui/source/iahndl-filter.cxx
@@ -148,7 +148,7 @@ handleNoSuchFilterRequest_(
OUString("Name"), OUString());
aPair.sUI = lProps.getUnpackedValueOrDefault(
OUString("UIName"), OUString());
- if ( (!aPair.sInternal.Len()) || (!aPair.sUI.Len() ) )
+ if ( aPair.sInternal.isEmpty() || aPair.sUI.isEmpty() )
{
continue;
}
diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx
index c75b82202779..41117b861a69 100644
--- a/uui/source/iahndl-ssl.cxx
+++ b/uui/source/iahndl-ssl.cxx
@@ -52,23 +52,25 @@ using namespace com::sun::star;
namespace {
-String
-getContentPart( const String& _rRawString )
+OUString
+getContentPart( const OUString& _rRawString )
{
// search over some parts to find a string
static char const * aIDs[] = { "CN=", "OU=", "O=", "E=", NULL };
- String sPart;
+ OUString sPart;
int i = 0;
while ( aIDs[i] )
{
- String sPartId = OUString::createFromAscii( aIDs[i++] );
- xub_StrLen nContStart = _rRawString.Search( sPartId );
- if ( nContStart != STRING_NOTFOUND )
+ OUString sPartId = OUString::createFromAscii( aIDs[i++] );
+ sal_Int32 nContStart = _rRawString.indexOf( sPartId );
+ if ( nContStart != -1 )
{
- nContStart = nContStart + sPartId.Len();
- xub_StrLen nContEnd
- = _rRawString.Search( sal_Unicode( ',' ), nContStart );
- sPart = String( _rRawString, nContStart, nContEnd - nContStart );
+ nContStart = nContStart + sPartId.getLength();
+ sal_Int32 nContEnd = _rRawString.indexOf( sal_Unicode( ',' ), nContStart );
+ if ( nContEnd != -1 )
+ sPart = _rRawString.copy( nContStart, nContEnd - nContStart );
+ else
+ sPart = _rRawString.copy( nContStart );
break;
}
}
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index a5d67b921f1f..8d9d96abd5f9 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -315,7 +315,7 @@ void LoginDialog::SetUseSystemCredentials( sal_Bool bUse )
void LoginDialog::ClearPassword()
{
- aPasswordED.SetText( String() );
+ aPasswordED.SetText( OUString() );
if ( aNameED.GetText().isEmpty() )
aNameED.GrabFocus();
@@ -325,7 +325,7 @@ void LoginDialog::ClearPassword()
void LoginDialog::ClearAccount()
{
- aAccountED.SetText( String() );
+ aAccountED.SetText( OUString() );
aAccountED.GrabFocus();
};
diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx
index 71d6fbf2fc55..7aad21103c41 100644
--- a/uui/source/logindlg.hxx
+++ b/uui/source/logindlg.hxx
@@ -77,21 +77,21 @@ public:
ResMgr * pResMgr );
virtual ~LoginDialog();
- String GetPath() const { return aPathED.GetText(); }
- void SetPath( const String& rNewPath ) { aPathED.SetText( rNewPath ); }
- String GetName() const { return aNameED.GetText(); }
- void SetName( const String& rNewName ) { aNameED.SetText( rNewName ); }
- String GetPassword() const { return aPasswordED.GetText(); }
- void SetPassword( const String& rNew ) { aPasswordED.SetText( rNew ); }
- String GetAccount() const { return aAccountED.GetText(); }
- void SetAccount( const String& rNew ) { aAccountED.SetText( rNew ); }
+ OUString GetPath() const { return aPathED.GetText(); }
+ void SetPath( const OUString& rNewPath ) { aPathED.SetText( rNewPath ); }
+ OUString GetName() const { return aNameED.GetText(); }
+ void SetName( const OUString& rNewName ) { aNameED.SetText( rNewName ); }
+ OUString GetPassword() const { return aPasswordED.GetText(); }
+ void SetPassword( const OUString& rNew ) { aPasswordED.SetText( rNew ); }
+ OUString GetAccount() const { return aAccountED.GetText(); }
+ void SetAccount( const OUString& rNew ) { aAccountED.SetText( rNew ); }
sal_Bool IsSavePassword() const { return aSavePasswdBtn.IsChecked(); }
void SetSavePassword( sal_Bool bSave ) { aSavePasswdBtn.Check( bSave ); }
- void SetSavePasswordText( const String& rTxt ) { aSavePasswdBtn.SetText( rTxt ); }
+ void SetSavePasswordText( const OUString& rTxt ) { aSavePasswdBtn.SetText( rTxt ); }
sal_Bool IsUseSystemCredentials() const { return aUseSysCredsCB.IsChecked(); }
void SetUseSystemCredentials( sal_Bool bUse );
- void SetErrorText( const String& rTxt ) { aErrorInfo.SetText( rTxt ); }
- void SetLoginRequestText( const String& rTxt ) { aRequestInfo.SetText( rTxt ); }
+ void SetErrorText( const OUString& rTxt ) { aErrorInfo.SetText( rTxt ); }
+ void SetLoginRequestText( const OUString& rTxt ) { aRequestInfo.SetText( rTxt ); }
void ClearPassword();
void ClearAccount();
};
diff --git a/uui/source/loginerr.hxx b/uui/source/loginerr.hxx
index b069c4f553d3..ea8070d05eaf 100644
--- a/uui/source/loginerr.hxx
+++ b/uui/source/loginerr.hxx
@@ -35,14 +35,14 @@
class LoginErrorInfo
{
private:
- String m_aTitle;
- String m_aServer;
- String m_aAccount;
- String m_aUserName;
- String m_aPassword;
- String m_aPasswordToModify;
- String m_aPath;
- String m_aErrorText;
+ OUString m_aTitle;
+ OUString m_aServer;
+ OUString m_aAccount;
+ OUString m_aUserName;
+ OUString m_aPassword;
+ OUString m_aPasswordToModify;
+ OUString m_aPath;
+ OUString m_aErrorText;
sal_uInt8 m_nFlags;
sal_uInt16 m_nRet;
bool m_bRecommendToOpenReadonly;
@@ -54,15 +54,15 @@ public:
{
}
- const String& GetTitle() const { return m_aTitle; }
- const String& GetServer() const { return m_aServer; }
- const String& GetAccount() const { return m_aAccount; }
- const String& GetUserName() const { return m_aUserName; }
- const String& GetPassword() const { return m_aPassword; }
- const String& GetPasswordToModify() const { return m_aPasswordToModify; }
- bool IsRecommendToOpenReadonly() const { return m_bRecommendToOpenReadonly; }
- const String& GetPath() const { return m_aPath; }
- const String& GetErrorText() const { return m_aErrorText; }
+ const OUString& GetTitle() const { return m_aTitle; }
+ const OUString& GetServer() const { return m_aServer; }
+ const OUString& GetAccount() const { return m_aAccount; }
+ const OUString& GetUserName() const { return m_aUserName; }
+ const OUString& GetPassword() const { return m_aPassword; }
+ const OUString& GetPasswordToModify() const { return m_aPasswordToModify; }
+ bool IsRecommendToOpenReadonly() const { return m_bRecommendToOpenReadonly; }
+ const OUString& GetPath() const { return m_aPath; }
+ const OUString& GetErrorText() const { return m_aErrorText; }
sal_Bool GetCanRememberPassword() const { return ( m_nFlags & LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD ); }
sal_Bool GetIsRememberPersistent() const { return ( m_nFlags & LOGINERROR_FLAG_REMEMBER_PERSISTENT ); }
sal_Bool GetIsRememberPassword() const { return ( m_nFlags & LOGINERROR_FLAG_IS_REMEMBER_PASSWORD ); }
@@ -75,23 +75,23 @@ public:
sal_uInt8 GetFlags() const { return m_nFlags; }
sal_uInt16 GetResult() const { return m_nRet; }
- void SetTitle( const String& aTitle )
+ void SetTitle( const OUString& aTitle )
{ m_aTitle = aTitle; }
- void SetServer( const String& aServer )
+ void SetServer( const OUString& aServer )
{ m_aServer = aServer; }
- void SetAccount( const String& aAccount )
+ void SetAccount( const OUString& aAccount )
{ m_aAccount = aAccount; }
- void SetUserName( const String& aUserName )
+ void SetUserName( const OUString& aUserName )
{ m_aUserName = aUserName; }
- void SetPassword( const String& aPassword )
+ void SetPassword( const OUString& aPassword )
{ m_aPassword = aPassword; }
- void SetPasswordToModify( const String& aPassword )
+ void SetPasswordToModify( const OUString& aPassword )
{ m_aPasswordToModify = aPassword; }
void SetRecommendToOpenReadonly( bool bVal )
{ m_bRecommendToOpenReadonly = bVal; }
- void SetPath( const String& aPath )
+ void SetPath( const OUString& aPath )
{ m_aPath = aPath; }
- void SetErrorText( const String& aErrorText )
+ void SetErrorText( const OUString& aErrorText )
{ m_aErrorText = aErrorText; }
void SetFlags( sal_uInt8 nFlags )
{ m_nFlags = nFlags; }
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index 345ab0d10bf5..792147694c57 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -42,11 +42,11 @@ IMPL_LINK_NOARG(MasterPasswordCreateDialog, OKHdl_Impl)
EndDialog( RET_OK );
else
{
- String aErrorMsg( ResId( STR_ERROR_PASSWORDS_NOT_IDENTICAL, *pResourceMgr ));
+ OUString aErrorMsg( ResId( STR_ERROR_PASSWORDS_NOT_IDENTICAL, *pResourceMgr ));
ErrorBox aErrorBox( this, WB_OK, aErrorMsg );
aErrorBox.Execute();
- m_pEDMasterPasswordCrt->SetText( String() );
- m_pEDMasterPasswordRepeat->SetText( String() );
+ m_pEDMasterPasswordCrt->SetText( OUString() );
+ m_pEDMasterPasswordRepeat->SetText( OUString() );
m_pEDMasterPasswordCrt->GrabFocus();
}
return 1;
diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx
index 07f11af3f554..ca3d11be2780 100644
--- a/uui/source/masterpassworddlg.cxx
+++ b/uui/source/masterpassworddlg.cxx
@@ -48,7 +48,7 @@ MasterPasswordDialog::MasterPasswordDialog
get(m_pOKBtn, "ok");
if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER )
{
- String aErrorMsg( ResId( STR_ERROR_MASTERPASSWORD_WRONG, *pResourceMgr ));
+ OUString aErrorMsg( ResId( STR_ERROR_MASTERPASSWORD_WRONG, *pResourceMgr ));
ErrorBox aErrorBox( pParent, WB_OK, aErrorMsg );
aErrorBox.Execute();
}
diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx
index 20c8bad93c03..2d83a53ba077 100644
--- a/uui/source/nameclashdlg.cxx
+++ b/uui/source/nameclashdlg.cxx
@@ -71,7 +71,7 @@ NameClashDialog::NameClashDialog( Window* pParent, ResMgr* pResMgr,
maBtnRename.SetClickHdl( aLink );
maBtnCancel.SetClickHdl( aLink );
- String aInfo;
+ OUString aInfo;
if ( bAllowOverwrite )
{
aInfo = ResId(STR_RENAME_OR_REPLACE, *pResMgr).toString();
@@ -88,8 +88,8 @@ NameClashDialog::NameClashDialog( Window* pParent, ResMgr* pResMgr,
maSameName = ResId(STR_SAME_NAME_USED, *pResMgr).toString();
- aInfo.SearchAndReplaceAscii( "%NAME", rClashingName );
- aInfo.SearchAndReplaceAscii( "%FOLDER", aPath );
+ aInfo = aInfo.replaceFirst( "%NAME", rClashingName );
+ aInfo = aInfo.replaceFirst( "%FOLDER", aPath );
maFTMessage.SetText( aInfo );
if ( !rProposedNewName.isEmpty() )
maEDNewName.SetText( rProposedNewName );
diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx
index f58a871f79c1..20904a5a2e5b 100644
--- a/uui/source/openlocked.cxx
+++ b/uui/source/openlocked.cxx
@@ -20,7 +20,7 @@
#include "ids.hrc"
#include "openlocked.hxx"
-OpenLockedQueryBox::OpenLockedQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage ) :
+OpenLockedQueryBox::OpenLockedQueryBox( Window* pParent, ResMgr* pResMgr, const OUString& aMessage ) :
MessBox(pParent, 0,
ResId(STR_OPENLOCKED_TITLE, *pResMgr).toString(),
aMessage )
diff --git a/uui/source/openlocked.hxx b/uui/source/openlocked.hxx
index 073a1e5c1105..d94e896f3a36 100644
--- a/uui/source/openlocked.hxx
+++ b/uui/source/openlocked.hxx
@@ -24,7 +24,7 @@
class OpenLockedQueryBox : public MessBox
{
public:
- OpenLockedQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage );
+ OpenLockedQueryBox( Window* pParent, ResMgr* pResMgr, const OUString& aMessage );
~OpenLockedQueryBox();
};
diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx
index 5646016e8ecd..69d4990c2bd8 100644
--- a/uui/source/passworddlg.hxx
+++ b/uui/source/passworddlg.hxx
@@ -40,8 +40,8 @@ class PasswordDialog : public ModalDialog
CancelButton aCancelBtn;
HelpButton aHelpBtn;
FixedLine aFixedLine1;
- sal_uInt16 nMinLen;
- String aPasswdMismatch;
+ sal_uInt16 nMinLen;
+ OUString aPasswdMismatch;
DECL_LINK(OKHdl_Impl, void *);
@@ -51,7 +51,7 @@ public:
bool bOpenToModify = false, bool bIsSimplePasswordRequest = false );
void SetMinLen( sal_uInt16 nMin ) { nMinLen = nMin; }
- String GetPassword() const { return aEDPassword.GetText(); }
+ OUString GetPassword() const { return aEDPassword.GetText(); }
private:
::com::sun::star::task::PasswordRequestMode nDialogMode;
diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx
index 8e98e3cef63c..57f383918a9f 100644
--- a/uui/source/secmacrowarnings.cxx
+++ b/uui/source/secmacrowarnings.cxx
@@ -45,19 +45,22 @@ using namespace ::com::sun::star;
namespace
{
- String GetContentPart( const String& _rRawString, const String& _rPartId )
+ OUString GetContentPart( const OUString& _rRawString, const OUString& _rPartId )
{
- String s;
+ OUString s;
- xub_StrLen nContStart = _rRawString.Search( _rPartId );
- if( nContStart != STRING_NOTFOUND )
+ sal_Int32 nContStart = _rRawString.indexOf( _rPartId );
+ if( nContStart != -1 )
{
- nContStart = nContStart + _rPartId.Len();
+ nContStart = nContStart + _rPartId.getLength();
++nContStart; // now it's start of content, directly after Id
- xub_StrLen nContEnd = _rRawString.Search( sal_Unicode( ',' ), nContStart );
+ sal_Int32 nContEnd = _rRawString.indexOf( sal_Unicode( ',' ), nContStart );
- s = String( _rRawString, nContStart, nContEnd - nContStart );
+ if ( nContEnd != -1 )
+ s = _rRawString.copy( nContStart, nContEnd - nContStart );
+ else
+ s = _rRawString.copy( nContStart );
}
return s;
@@ -103,7 +106,7 @@ short MacroWarning::Execute()
return ModalDialog::Execute();
}
-void MacroWarning::SetDocumentURL( const String& rDocURL )
+void MacroWarning::SetDocumentURL( const OUString& rDocURL )
{
maDocNameFI.SetText( rDocURL );
}
@@ -222,10 +225,10 @@ void MacroWarning::InitControls()
}
// check if some buttontexts are to wide
- String sText = maViewSignsBtn.GetText();
+ OUString sText = maViewSignsBtn.GetText();
long nTxtW = maViewSignsBtn.GetTextWidth( sText );
const long nOffset = 12;
- if ( sText.Search( '~' ) == STRING_NOTFOUND )
+ if ( sText.indexOf( '~' ) == -1 )
nTxtW += nOffset;
long nBtnW = maViewSignsBtn.GetSizePixel().Width();
if ( nTxtW >= nBtnW )
@@ -245,13 +248,13 @@ void MacroWarning::InitControls()
maSignsFI.SetSizePixel( aNewSize );
}
// if the button text (we compare with the longest of both) is too wide, then broaden the buttons
- String sText1 = maEnableBtn.GetText();
+ OUString sText1 = maEnableBtn.GetText();
long nTxtW1 = maEnableBtn.GetTextWidth( sText1 );
- if ( sText1.Search( '~' ) == STRING_NOTFOUND )
+ if ( sText1.indexOf( '~' ) == -1 )
nTxtW1 += nOffset;
- String sText2 = maDisableBtn.GetText();
+ OUString sText2 = maDisableBtn.GetText();
long nTxtW2 = maDisableBtn.GetTextWidth( sText2 );
- if ( sText2.Search( '~' ) == STRING_NOTFOUND )
+ if ( sText2.indexOf( '~' ) == -1 )
nTxtW2 += nOffset;
nTxtW = std::max( nTxtW1, nTxtW2 );
nBtnW = maEnableBtn.GetSizePixel().Width();
@@ -334,12 +337,12 @@ void MacroWarning::SetStorage( const css::uno::Reference < css::embed::XStorage
{
mpInfos = &rInfos;
OUString aCN_Id("CN");
- String s;
+ OUString s;
s = GetContentPart( rInfos[ 0 ].Signer->getSubjectName(), aCN_Id );
for( sal_Int32 i = 1 ; i < nCnt ; ++i )
{
- s.AppendAscii( "\n" );
+ s += "\n";
s += GetContentPart( rInfos[ i ].Signer->getSubjectName(), aCN_Id );
}
@@ -354,7 +357,7 @@ void MacroWarning::SetCertificate( const css::uno::Reference< css::security::XCe
if( mxCert.is() )
{
OUString aCN_Id("CN");
- String s;
+ OUString s;
s = GetContentPart( mxCert->getSubjectName(), aCN_Id );
maSignsFI.SetText( s );
maViewSignsBtn.Enable();
diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx
index cd6a0cd79cbe..d3b14282fa50 100644
--- a/uui/source/secmacrowarnings.hxx
+++ b/uui/source/secmacrowarnings.hxx
@@ -77,7 +77,7 @@ public:
virtual short Execute();
- void SetDocumentURL( const String& rDocURL );
+ void SetDocumentURL( const OUString& rDocURL );
void SetStorage( const cssu::Reference < css::embed::XStorage >& rxStore,
const OUString& aODFVersion,
diff --git a/uui/source/trylater.cxx b/uui/source/trylater.cxx
index 57825c15ebe6..93170a1a3fa3 100644
--- a/uui/source/trylater.cxx
+++ b/uui/source/trylater.cxx
@@ -20,7 +20,7 @@
#include "ids.hrc"
#include "trylater.hxx"
-TryLaterQueryBox::TryLaterQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage ) :
+TryLaterQueryBox::TryLaterQueryBox( Window* pParent, ResMgr* pResMgr, const OUString& aMessage ) :
MessBox(pParent, 0,
ResId(STR_TRYLATER_TITLE, *pResMgr).toString(),
aMessage )
diff --git a/uui/source/trylater.hxx b/uui/source/trylater.hxx
index 3a0ea9533131..abaaf2e91d61 100644
--- a/uui/source/trylater.hxx
+++ b/uui/source/trylater.hxx
@@ -24,7 +24,7 @@
class TryLaterQueryBox : public MessBox
{
public:
- TryLaterQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage );
+ TryLaterQueryBox( Window* pParent, ResMgr* pResMgr, const OUString& aMessage );
~TryLaterQueryBox();
};