diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-05-06 23:28:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-07 08:19:51 +0100 |
commit | 535e9e7f7d2ddf312a2b77350e94606584778709 (patch) | |
tree | db37c2c6e8f5820833d61686f29d512eb27fd0db /uui/source | |
parent | 0672b7a929576f902c48058e712c7d1a5711ac64 (diff) |
tidy ResId String/rtl::OUString cast foo
Change-Id: I1e8fca182a27efb403e903b424ca4c1c0d3acc49
Diffstat (limited to 'uui/source')
-rw-r--r-- | uui/source/alreadyopen.cxx | 10 | ||||
-rw-r--r-- | uui/source/filechanged.cxx | 8 | ||||
-rw-r--r-- | uui/source/iahndl-locking.cxx | 18 | ||||
-rw-r--r-- | uui/source/iahndl.cxx | 4 | ||||
-rw-r--r-- | uui/source/lockfailed.cxx | 6 | ||||
-rw-r--r-- | uui/source/nameclashdlg.cxx | 6 | ||||
-rw-r--r-- | uui/source/openlocked.cxx | 6 | ||||
-rw-r--r-- | uui/source/passworddlg.cxx | 12 | ||||
-rw-r--r-- | uui/source/trylater.cxx | 6 |
9 files changed, 37 insertions, 39 deletions
diff --git a/uui/source/alreadyopen.cxx b/uui/source/alreadyopen.cxx index fbe6a7f3793f..3d9a7265fb15 100644 --- a/uui/source/alreadyopen.cxx +++ b/uui/source/alreadyopen.cxx @@ -31,23 +31,23 @@ AlreadyOpenQueryBox::AlreadyOpenQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage, sal_Bool bIsStoring ) : MessBox(pParent, 0, - String( ResId( STR_ALREADYOPEN_TITLE, *pResMgr ) ), + ResId(STR_ALREADYOPEN_TITLE, *pResMgr).toString(), aMessage ) { SetImage( QueryBox::GetStandardImage() ); if ( bIsStoring ) { - AddButton( String( ResId( STR_ALREADYOPEN_RETRY_SAVE_BTN, *pResMgr ) ), RET_YES, + AddButton( ResId(STR_ALREADYOPEN_RETRY_SAVE_BTN, *pResMgr).toString(), RET_YES, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON ); - AddButton( String( ResId( STR_ALREADYOPEN_SAVE_BTN, *pResMgr ) ), RET_NO, 0 ); + AddButton( ResId(STR_ALREADYOPEN_SAVE_BTN, *pResMgr).toString(), RET_NO, 0 ); AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); } else { - AddButton( String( ResId( STR_ALREADYOPEN_READONLY_BTN, *pResMgr ) ), RET_YES, + AddButton( ResId(STR_ALREADYOPEN_READONLY_BTN, *pResMgr).toString(), RET_YES, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON ); - AddButton( String( ResId( STR_ALREADYOPEN_OPEN_BTN, *pResMgr ) ), RET_NO, 0 ); + AddButton( ResId(STR_ALREADYOPEN_OPEN_BTN, *pResMgr).toString(), RET_NO, 0 ); AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); } diff --git a/uui/source/filechanged.cxx b/uui/source/filechanged.cxx index 0a41fa8d7dbc..c926d942440e 100644 --- a/uui/source/filechanged.cxx +++ b/uui/source/filechanged.cxx @@ -31,17 +31,17 @@ FileChangedQueryBox::FileChangedQueryBox( Window* pParent, ResMgr* pResMgr ) : MessBox(pParent, 0, - String( ResId( STR_FILECHANGED_TITLE, *pResMgr ) ), + ResId(STR_FILECHANGED_TITLE, *pResMgr).toString(), String::EmptyString() ) { SetImage( QueryBox::GetStandardImage() ); - AddButton( String( ResId( STR_FILECHANGED_SAVEANYWAY_BTN, *pResMgr ) ), RET_YES, - BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON ); + AddButton(ResId(STR_FILECHANGED_SAVEANYWAY_BTN, *pResMgr).toString(), RET_YES, + BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON); AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); SetButtonHelpText( RET_YES, String::EmptyString() ); - SetMessText( String( ResId( STR_FILECHANGED_MSG, *pResMgr ) ) ); + SetMessText(ResId(STR_FILECHANGED_MSG, *pResMgr).toString()); } FileChangedQueryBox::~FileChangedQueryBox() diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx index 5ed5c01ae062..e7235e5dc486 100644 --- a/uui/source/iahndl-locking.cxx +++ b/uui/source/iahndl-locking.cxx @@ -97,10 +97,9 @@ handleLockedDocumentRequest_( { aArguments.push_back( !aInfo.isEmpty() ? aInfo - : ::rtl::OUString( String( - ResId( STR_UNKNOWNUSER, - *xManager.get() ) ) ) ); - aMessage = String( ResId( STR_OPENLOCKED_MSG, *xManager.get() ) ); + : ResId( STR_UNKNOWNUSER, + *xManager.get() ).toString() ); + aMessage = ResId(STR_OPENLOCKED_MSG, *xManager.get()).toString(); aMessage = UUIInteractionHelper::replaceMessageWithArguments( aMessage, aArguments ); @@ -112,10 +111,9 @@ handleLockedDocumentRequest_( { aArguments.push_back( !aInfo.isEmpty() ? aInfo - : ::rtl::OUString( String( - ResId( STR_UNKNOWNUSER, - *xManager.get() ) ) ) ); - aMessage = String( ResId( STR_TRYLATER_MSG, *xManager.get() ) ); + : ResId( STR_UNKNOWNUSER, + *xManager.get() ).toString() ); + aMessage = ResId(STR_TRYLATER_MSG, *xManager.get()).toString(); aMessage = UUIInteractionHelper::replaceMessageWithArguments( aMessage, aArguments ); @@ -127,10 +125,10 @@ handleLockedDocumentRequest_( nMode == UUI_DOC_OWN_SAVE_LOCK ) { aArguments.push_back( aInfo ); - aMessage = String( ResId( nMode == UUI_DOC_OWN_SAVE_LOCK + aMessage = ResId(nMode == UUI_DOC_OWN_SAVE_LOCK ? STR_ALREADYOPEN_SAVE_MSG : STR_ALREADYOPEN_MSG, - *xManager.get() ) ); + *xManager.get() ).toString(); aMessage = UUIInteractionHelper::replaceMessageWithArguments( aMessage, aArguments ); diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 8816ea971383..907b07036084 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -1312,10 +1312,10 @@ UUIInteractionHelper::handleGenericErrorRequest( rtl::OUString aTitle( utl::ConfigManager::getProductName() ); ::rtl::OUString aErrTitle - = String( ResId( nError == ERRCODE_SFX_BROKENSIGNATURE + = ResId( nError == ERRCODE_SFX_BROKENSIGNATURE ? STR_WARNING_BROKENSIGNATURE_TITLE : STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE, - *xManager.get() ) ); + *xManager.get() ).toString(); if ( !aTitle.isEmpty() && !aErrTitle.isEmpty() ) aTitle += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " - " ) ); diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx index bc2e7c383c5d..325eeac8fdc2 100644 --- a/uui/source/lockfailed.cxx +++ b/uui/source/lockfailed.cxx @@ -33,7 +33,7 @@ LockFailedQueryBox::LockFailedQueryBox( Window* pParent, ResMgr* pResMgr ) : MessBox(pParent, 0, - String( ResId( STR_LOCKFAILED_TITLE, *pResMgr ) ), + ResId(STR_LOCKFAILED_TITLE, *pResMgr).toString(), String::EmptyString() ) { SetImage( ErrorBox::GetStandardImage() ); @@ -41,8 +41,8 @@ LockFailedQueryBox::LockFailedQueryBox( Window* pParent, ResMgr* pResMgr ) : AddButton( BUTTON_OK, RET_OK, BUTTONDIALOG_OKBUTTON ); AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); - SetMessText( String( ResId( STR_LOCKFAILED_MSG, *pResMgr ) ) ); - SetCheckBoxText( String( ResId( STR_LOCKFAILED_DONTSHOWAGAIN, *pResMgr ) ) ); + SetMessText(ResId(STR_LOCKFAILED_MSG, *pResMgr ).toString()); + SetCheckBoxText(ResId(STR_LOCKFAILED_DONTSHOWAGAIN, *pResMgr).toString()); } LockFailedQueryBox::~LockFailedQueryBox() diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx index f6beaf81df12..52357e4f80e1 100644 --- a/uui/source/nameclashdlg.cxx +++ b/uui/source/nameclashdlg.cxx @@ -83,11 +83,11 @@ NameClashDialog::NameClashDialog( Window* pParent, ResMgr* pResMgr, String aInfo; if ( bAllowOverwrite ) { - aInfo = String( ResId( STR_RENAME_OR_REPLACE, *pResMgr ) ); + aInfo = ResId(STR_RENAME_OR_REPLACE, *pResMgr).toString(); } else { - aInfo = String( ResId( STR_NAME_CLASH_RENAME_ONLY, *pResMgr ) ); + aInfo = ResId(STR_NAME_CLASH_RENAME_ONLY, *pResMgr).toString(); maBtnOverwrite.Hide(); } @@ -95,7 +95,7 @@ NameClashDialog::NameClashDialog( Window* pParent, ResMgr* pResMgr, if ( osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL( rTargetFolderURL, aPath ) ) aPath = rTargetFolderURL; - maSameName = String ( ResId( STR_SAME_NAME_USED, *pResMgr ) ); + maSameName = ResId(STR_SAME_NAME_USED, *pResMgr).toString(); aInfo.SearchAndReplaceAscii( "%NAME", rClashingName ); aInfo.SearchAndReplaceAscii( "%FOLDER", aPath ); diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx index 0c1d9178b546..fc04f055b49c 100644 --- a/uui/source/openlocked.cxx +++ b/uui/source/openlocked.cxx @@ -31,15 +31,15 @@ OpenLockedQueryBox::OpenLockedQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage ) : MessBox(pParent, 0, - String( ResId( STR_OPENLOCKED_TITLE, *pResMgr ) ), + ResId(STR_OPENLOCKED_TITLE, *pResMgr).toString(), aMessage ) { SetImage( QueryBox::GetStandardImage() ); - AddButton( String( ResId( STR_OPENLOCKED_OPENREADONLY_BTN, *pResMgr ) ), RET_YES, + AddButton(ResId(STR_OPENLOCKED_OPENREADONLY_BTN, *pResMgr).toString(), RET_YES, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON); - AddButton( String( ResId( STR_OPENLOCKED_OPENCOPY_BTN, *pResMgr ) ), RET_NO, 0); + AddButton(ResId(STR_OPENLOCKED_OPENCOPY_BTN, *pResMgr).toString(), RET_NO, 0); AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); SetButtonHelpText( RET_YES, String() ); diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 946e47e818c2..e36f5789cc82 100644 --- a/uui/source/passworddlg.cxx +++ b/uui/source/passworddlg.cxx @@ -73,13 +73,13 @@ PasswordDialog::PasswordDialog( { const sal_uInt16 nOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG; const sal_uInt16 nErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : nOpenToModifyErrStrId; - String aErrorMsg( ResId( nErrStrId, *pResourceMgr )); + rtl::OUString aErrorMsg(ResId(nErrStrId, *pResourceMgr).toString()); ErrorBox aErrorBox( this, WB_OK, aErrorMsg ); aErrorBox.Execute(); } // default settings for enter password or reenter passwd... - String aTitle( ResId( STR_TITLE_ENTER_PASSWORD, *pResourceMgr ) ); + rtl::OUString aTitle(ResId(STR_TITLE_ENTER_PASSWORD, *pResourceMgr).toString()); aFTConfirmPassword.Hide(); aEDConfirmPassword.Hide(); aFTConfirmPassword.Enable( sal_False ); @@ -88,9 +88,9 @@ PasswordDialog::PasswordDialog( // settings for create password if (nDialogMode == task::PasswordRequestMode_PASSWORD_CREATE) { - aTitle = String( ResId( STR_TITLE_CREATE_PASSWORD, *pResourceMgr ) ); + aTitle = ResId(STR_TITLE_CREATE_PASSWORD, *pResourceMgr).toString(); - aFTConfirmPassword.SetText( String( ResId( STR_CONFIRM_SIMPLE_PASSWORD, *pResourceMgr ) ) ); + aFTConfirmPassword.SetText(ResId(STR_CONFIRM_SIMPLE_PASSWORD, *pResourceMgr).toString()); aFTConfirmPassword.Show(); aEDConfirmPassword.Show(); @@ -116,12 +116,12 @@ PasswordDialog::PasswordDialog( SetText( aTitle ); sal_uInt16 nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN; - aFTPassword.SetText( String( ResId( nStrId, *pResourceMgr ) ) ); + aFTPassword.SetText(ResId(nStrId, *pResourceMgr).toString()); aFTPassword.SetText( aFTPassword.GetText() + aDocURL ); if (bIsSimplePasswordRequest) { DBG_ASSERT( aDocURL.isEmpty(), "A simple password request should not have a document URL! Use document password request instead." ); - aFTPassword.SetText( String( ResId( STR_ENTER_SIMPLE_PASSWORD, *pResourceMgr ) ) ); + aFTPassword.SetText(ResId(STR_ENTER_SIMPLE_PASSWORD, *pResourceMgr).toString()); } FreeResource(); diff --git a/uui/source/trylater.cxx b/uui/source/trylater.cxx index d8aaad203270..69d952870e4a 100644 --- a/uui/source/trylater.cxx +++ b/uui/source/trylater.cxx @@ -31,14 +31,14 @@ TryLaterQueryBox::TryLaterQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage ) : MessBox(pParent, 0, - String( ResId( STR_TRYLATER_TITLE, *pResMgr ) ), + ResId(STR_TRYLATER_TITLE, *pResMgr).toString(), aMessage ) { SetImage( QueryBox::GetStandardImage() ); - AddButton( String( ResId( STR_TRYLATER_RETRYSAVING_BTN, *pResMgr ) ), RET_YES, + AddButton(ResId(STR_TRYLATER_RETRYSAVING_BTN, *pResMgr).toString(), RET_YES, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON); - AddButton( String( ResId( STR_TRYLATER_SAVEAS_BTN, *pResMgr ) ), RET_NO, 0); + AddButton(ResId(STR_TRYLATER_SAVEAS_BTN, *pResMgr).toString(), RET_NO, 0); AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); SetButtonHelpText( RET_YES, String::EmptyString() ); |