diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 08:41:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 12:27:51 +0100 |
commit | 8ab6621cac3a43acfb61222dbf434df496230b36 (patch) | |
tree | 3d9a72cd2f87fb4b8bbe8611723d6a321a23d4e3 /svx | |
parent | 57a4337e254b485df33dc01e508bb936adc6ec75 (diff) |
QueryBox RID_QRY_REMOVE_* -> MessageDialog + string
Change-Id: Ife33eeaf38daf1aebc1ea35634ca56fae5c89d34
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.src | 6 | ||||
-rw-r--r-- | svx/source/form/datanavi.cxx | 31 | ||||
-rw-r--r-- | svx/source/form/datanavi.src | 36 |
4 files changed, 34 insertions, 45 deletions
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index be7e9da21b6c..34de399fedb2 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -33,7 +33,7 @@ #include <vcl/xtextedt.hxx> #include <vcl/settings.hxx> #include <tools/urlobj.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/layout.hxx> #include <vcl/svapp.hxx> #include <rtl/ustrbuf.hxx> #include <vcl/scrbar.hxx> @@ -822,7 +822,7 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry, short impl_askUserForWizardCancel(Window* pParent, sal_Int16 nRes) { - QueryBox aQuery(pParent, SVX_RES(nRes)); + MessageDialog aQuery(pParent, SVX_RES(nRes), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); if (aQuery.Execute() == RET_YES) return DLG_RET_OK; else @@ -1150,7 +1150,7 @@ IMPL_LINK_NOARG(RecoveryDialog, CancelButtonHdl) switch (m_eRecoveryState) { case RecoveryDialog::E_RECOVERY_PREPARED: - if (impl_askUserForWizardCancel(this, RID_SVXQB_EXIT_RECOVERY) != DLG_RET_CANCEL) + if (impl_askUserForWizardCancel(this, RID_SVXSTR_QUERY_EXIT_RECOVERY) != DLG_RET_CANCEL) { m_eRecoveryState = RecoveryDialog::E_RECOVERY_CANCELED; execute(); diff --git a/svx/source/dialog/docrecovery.src b/svx/source/dialog/docrecovery.src index 0e5e89548812..eb55d1f54fa5 100644 --- a/svx/source/dialog/docrecovery.src +++ b/svx/source/dialog/docrecovery.src @@ -22,11 +22,9 @@ #include "docrecovery.hrc" -QueryBox RID_SVXQB_EXIT_RECOVERY +String RID_SVXSTR_QUERY_EXIT_RECOVERY { - BUTTONS = WB_YES_NO ; - DEFBUTTON = WB_DEF_YES ; - Message [ en-US ] = "Are you sure you want to cancel the %PRODUCTNAME document recovery?"; + Text [ en-US ] = "Are you sure you want to cancel the %PRODUCTNAME document recovery?"; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 69b24e2e8abd..9f2a0eb3a3b4 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -941,13 +941,13 @@ namespace svxform DBG_ASSERT( pNode->m_xNode.is(), "XFormsPage::RemoveEntry(): no XNode" ); css::xml::dom::NodeType eChildType = pNode->m_xNode->getNodeType(); bool bIsElement = ( eChildType == css::xml::dom::NodeType_ELEMENT_NODE ); - sal_uInt16 nResId = bIsElement ? RID_QRY_REMOVE_ELEMENT : RID_QRY_REMOVE_ATTRIBUTE; + sal_uInt16 nResId = bIsElement ? RID_STR_QRY_REMOVE_ELEMENT : RID_STR_QRY_REMOVE_ATTRIBUTE; OUString sVar = bIsElement ? OUString(ELEMENTNAME) : OUString(ATTRIBUTENAME); - QueryBox aQBox( this, SVX_RES( nResId ) ); - OUString sMessText = aQBox.GetMessText(); + MessageDialog aQBox(this, SVX_RES(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + OUString sMessText = aQBox.get_primary_text(); sMessText = sMessText.replaceFirst( sVar, m_xUIHelper->getNodeDisplayName( pNode->m_xNode, sal_False ) ); - aQBox.SetMessText( sMessText ); + aQBox.set_primary_text(sMessText); if ( aQBox.Execute() == RET_YES ) { SvTreeListEntry* pParent = m_pItemList->GetParent( pEntry ); @@ -973,7 +973,7 @@ namespace svxform { DBG_ASSERT( pNode->m_xPropSet.is(), "XFormsPage::RemoveEntry(): no propset" ); bool bSubmission = ( DGTSubmission == m_eGroup ); - sal_uInt16 nResId = bSubmission ? RID_QRY_REMOVE_SUBMISSION : RID_QRY_REMOVE_BINDING; + sal_uInt16 nResId = bSubmission ? RID_STR_QRY_REMOVE_SUBMISSION : RID_STR_QRY_REMOVE_BINDING; OUString sProperty = bSubmission ? OUString(PN_SUBMISSION_ID) : OUString(PN_BINDING_ID); OUString sSearch = bSubmission ? OUString(SUBMISSIONNAME) : OUString(BINDINGNAME); OUString sName; @@ -985,10 +985,11 @@ namespace svxform { SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" ); } - QueryBox aQBox( this, SVX_RES( nResId ) ); - OUString sMessText = aQBox.GetMessText(); + MessageDialog aQBox(this, SVX_RES(nResId), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + OUString sMessText = aQBox.get_primary_text(); sMessText = sMessText.replaceFirst( sSearch, sName); - aQBox.SetMessText( sMessText ); + aQBox.set_primary_text(sMessText); if ( aQBox.Execute() == RET_YES ) { try @@ -1577,10 +1578,11 @@ namespace svxform } else if (sIdent == "modelsremove") { - QueryBox aQBox( this, SVX_RES( RID_QRY_REMOVE_MODEL ) ); - OUString sText = aQBox.GetMessText(); + MessageDialog aQBox(this, SVX_RES( RID_STR_QRY_REMOVE_MODEL), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + OUString sText = aQBox.get_primary_text(); sText = sText.replaceFirst( MODELNAME, sSelectedModel ); - aQBox.SetMessText( sText ); + aQBox.set_primary_text(sText); if ( aQBox.Execute() == RET_YES ) { try @@ -1677,10 +1679,11 @@ namespace svxform if ( pPage ) { OUString sInstName = pPage->GetInstanceName(); - QueryBox aQBox( this, SVX_RES( RID_QRY_REMOVE_INSTANCE ) ); - OUString sMessText = aQBox.GetMessText(); + MessageDialog aQBox(this, SVX_RES(RID_STR_QRY_REMOVE_INSTANCE), + VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO); + OUString sMessText = aQBox.get_primary_text(); sMessText = sMessText.replaceFirst( INSTANCENAME, sInstName ); - aQBox.SetMessText( sMessText ); + aQBox.set_primary_text(sMessText); if ( aQBox.Execute() == RET_YES ) { bool bDoRemove = false; diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src index 2f75ef3360de..debd9eec8acb 100644 --- a/svx/source/form/datanavi.src +++ b/svx/source/form/datanavi.src @@ -60,46 +60,34 @@ ImageList RID_SVXIL_DATANAVI IdCount = { 6 ; } ; }; -QueryBox RID_QRY_REMOVE_MODEL +String RID_STR_QRY_REMOVE_MODEL { - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Deleting the model '$MODELNAME' affects all controls currently bound to this model.\nDo you really want to delete this model?" ; + Text [ en-US ] = "Deleting the model '$MODELNAME' affects all controls currently bound to this model.\nDo you really want to delete this model?" ; }; -QueryBox RID_QRY_REMOVE_INSTANCE +String RID_STR_QRY_REMOVE_INSTANCE { - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Deleting the instance '$INSTANCENAME' affects all controls currently bound to this instance.\nDo you really want to delete this instance?" ; + Text [ en-US ] = "Deleting the instance '$INSTANCENAME' affects all controls currently bound to this instance.\nDo you really want to delete this instance?" ; }; -QueryBox RID_QRY_REMOVE_ELEMENT +String RID_STR_QRY_REMOVE_ELEMENT { - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Deleting the element '$ELEMENTNAME' affects all controls currently bound to this element.\nDo you really want to delete this element?" ; + Text [ en-US ] = "Deleting the element '$ELEMENTNAME' affects all controls currently bound to this element.\nDo you really want to delete this element?" ; }; -QueryBox RID_QRY_REMOVE_ATTRIBUTE +String RID_STR_QRY_REMOVE_ATTRIBUTE { - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Do you really want to delete the attribute '$ATTRIBUTENAME'?" ; + Text [ en-US ] = "Do you really want to delete the attribute '$ATTRIBUTENAME'?" ; }; -QueryBox RID_QRY_REMOVE_SUBMISSION +String RID_STR_QRY_REMOVE_SUBMISSION { - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Deleting the submission '$SUBMISSIONNAME' affects all controls currently bound to this submission.\n\nDo you really want to delete this submission?" ; + Text [ en-US ] = "Deleting the submission '$SUBMISSIONNAME' affects all controls currently bound to this submission.\n\nDo you really want to delete this submission?" ; }; -QueryBox RID_QRY_REMOVE_BINDING +String RID_STR_QRY_REMOVE_BINDING { - Buttons = WB_YES_NO ; - DefButton = WB_DEF_NO ; - Message [ en-US ] = "Deleting the binding '$BINDINGNAME' affects all controls currently bound to this binding.\n\nDo you really want to delete this binding?" ; + Text [ en-US ] = "Deleting the binding '$BINDINGNAME' affects all controls currently bound to this binding.\n\nDo you really want to delete this binding?" ; }; MessBox RID_QRY_LINK_WARNING |