diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-18 08:50:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-18 10:57:21 +0100 |
commit | a107bdfdfc1baf73f14055262d64bf616fc0a889 (patch) | |
tree | 2e4cbadd538f5e8d495fb8953a5a7939c8ab2bb5 /basctl | |
parent | 3b6091ca42cd2d9f230e7d81648c34f3d7085107 (diff) |
ErrorBox->MessageDialog
Change-Id: I57d4e43460e40d3aff54873280eddbb18c12446b
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 3 | ||||
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/basobj3.cxx | 6 | ||||
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/macrodlg.cxx | 8 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.cxx | 10 |
7 files changed, 25 insertions, 26 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index d820fe91f1f6..330d37b71633 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -52,7 +52,7 @@ #include <vcl/xtextedt.hxx> #include <vcl/settings.hxx> #include <toolkit/helper/vclunohelper.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <cassert> #include <basic/codecompletecache.hxx> #include <svtools/miscopt.hxx> @@ -317,7 +317,7 @@ bool ModulWindow::BasicExecute() { if ( !aDocument.allowMacros() ) { - WarningBox( this, WB_OK, IDE_RESSTR(RID_STR_CANNOTRUNMACRO)).Execute(); + MessageDialog(this, IDE_RESSTR(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING).Execute(); return false; } } @@ -455,7 +455,7 @@ bool ModulWindow::LoadBasic() bDone = true; } else - ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_COULDNTREAD) ).Execute(); + MessageDialog(this, IDE_RESSTR(RID_STR_COULDNTREAD)).Execute(); } return bDone; } @@ -501,7 +501,7 @@ bool ModulWindow::SaveBasicSource() bDone = true; } else - ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId(RID_STR_COULDNTWRITE).toString() ).Execute(); + MessageDialog(this, IDEResId(RID_STR_COULDNTWRITE)).Execute(); } return bDone; diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index ab106f611beb..1e1e84fa6761 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -52,6 +52,7 @@ #include <svl/whiter.hxx> #include <tools/diagnose_ex.h> #include <tools/urlobj.hxx> +#include <vcl/layout.hxx> #include <vcl/msgbox.hxx> #include <vcl/settings.hxx> #include <xmlscript/xmldlg_imexp.hxx> @@ -858,7 +859,7 @@ bool DialogWindow::SaveDialog() } } else - ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_COULDNTWRITE)).Execute(); + MessageDialog(this, IDE_RESSTR(RID_STR_COULDNTWRITE)).Execute(); } return bDone; diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 9fc771c19325..f2edd2b10166 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -38,7 +38,7 @@ #include <framework/documentundoguard.hxx> #include <tools/diagnose_ex.h> #include <unotools/moduleoptions.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <vector> #include <algorithm> @@ -160,7 +160,7 @@ bool RenameModule ( if ( rDocument.hasModule( rLibName, rNewName ) ) { - ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2) ); + MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)); aError.Execute(); return false; } @@ -168,7 +168,7 @@ bool RenameModule ( // #i74440 if ( rNewName.isEmpty() ) { - ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) ); + MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)); aError.Execute(); return false; } @@ -342,7 +342,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, { // error bError = true; - ErrorBox( NULL, WB_OK | WB_DEF_OK, IDEResId(RID_STR_ERRORCHOOSEMACRO).toString() ).Execute(); + MessageDialog(NULL, IDEResId(RID_STR_ERRORCHOOSEMACRO)).Execute(); } } } diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index 359f9dfecd1e..1ac3d3d4cc8f 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <algorithm> #include <basic/basmgr.hxx> #include <basic/sbmeth.hxx> @@ -171,7 +171,7 @@ bool RenameDialog ( if ( rDocument.hasDialog( rLibName, rNewName ) ) { - ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2) ); + MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)); aError.Execute(); return false; } @@ -179,7 +179,7 @@ bool RenameDialog ( // #i74440 if ( rNewName.isEmpty() ) { - ErrorBox aError( pErrorParent, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) ); + MessageDialog aError(pErrorParent, IDE_RESSTR(RID_STR_BADSBXNAME)); aError.Execute(); return false; } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 7da4f1797840..718b6e3ba908 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -35,7 +35,7 @@ #include <sfx2/viewfrm.hxx> #include <svl/intitem.hxx> #include <svl/stritem.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <tools/stream.hxx> namespace basctl @@ -548,7 +548,7 @@ TabBarAllowRenamingReturnCode TabBar::AllowRenaming() bool const bValid = IsValidSbxName(GetEditText()); if ( !bValid ) - ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId(RID_STR_BADSBXNAME).toString() ).Execute(); + MessageDialog(this, IDEResId(RID_STR_BADSBXNAME)).Execute(); return bValid ? TABBAR_RENAMING_YES : TABBAR_RENAMING_NO; } @@ -789,7 +789,7 @@ bool QueryDel( const OUString& rName, const ResId& rId, Window* pParent ) aNameBuf.append('\''); aNameBuf.insert(0, '\''); aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear()); - QueryBox aQueryBox( pParent, WB_YES_NO | WB_DEF_YES, aQuery ); + MessageDialog aQueryBox(pParent, aQuery, VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); return ( aQueryBox.Execute() == RET_YES ); } @@ -854,7 +854,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, if ( !bOK ) { - ErrorBox aErrorBox( Application::GetDefDialogParent(), WB_OK, IDE_RESSTR(RID_STR_WRONGPASSWORD) ); + MessageDialog aErrorBox(Application::GetDefDialogParent(), IDE_RESSTR(RID_STR_WRONGPASSWORD)); aErrorBox.Execute(); } } diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 8fd1b942fec7..fb8621255a31 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <macrodlg.hxx> #include <macrodlg.hrc> @@ -622,7 +622,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); if ( aDocument.isDocument() && !aDocument.allowMacros() ) { - WarningBox( this, WB_OK, IDEResId(RID_STR_CANNOTRUNMACRO).toString() ).Execute(); + MessageDialog(this, IDEResId(RID_STR_CANNOTRUNMACRO), VCL_MESSAGE_WARNING).Execute(); return 0; } } @@ -631,7 +631,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) { if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) ) { - ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId(RID_STR_BADSBXNAME).toString() ).Execute(); + MessageDialog(this, IDEResId(RID_STR_BADSBXNAME)).Execute(); m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) ); m_pMacroNameEdit->GrabFocus(); return 0; @@ -699,7 +699,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) { if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) ) { - ErrorBox( this, WB_OK | WB_DEF_OK, IDEResId(RID_STR_BADSBXNAME).toString() ).Execute(); + MessageDialog(this, IDEResId(RID_STR_BADSBXNAME)).Execute(); m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) ); m_pMacroNameEdit->GrabFocus(); return 1; diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index dbae1502e23d..9586a4ff88d4 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -35,7 +35,7 @@ #include <sfx2/viewfrm.hxx> #include <svl/itemset.hxx> #include <svl/stritem.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <tools/diagnose_ex.h> #include <xmlscript/xmldlg_imexp.hxx> #include <svtools/treelistentry.hxx> @@ -99,7 +99,7 @@ bool ExtTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewT { if ( !IsValidSbxName(rNewText) ) { - ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) ).Execute(); + MessageDialog(this, IDE_RESSTR(RID_STR_BADSBXNAME)).Execute(); return false; } @@ -816,8 +816,7 @@ void ObjectPage::NewDialog() if ( aDocument.hasDialog( aLibName, aDlgName ) ) { - ErrorBox( this, WB_OK | WB_DEF_OK, - IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2) ).Execute(); + MessageDialog(this, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)).Execute(); } else { @@ -1014,8 +1013,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument, } catch (const container::ElementExistException& ) { - ErrorBox( pWin, WB_OK | WB_DEF_OK, - IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2) ).Execute(); + MessageDialog(pWin, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED2)).Execute(); } catch (const container::NoSuchElementException& ) { |