[Libreoffice-commits] core.git: 3 commits - extensions/source include/sfx2 include/svx sfx2/source svx/source

Caolán McNamara caolanm at redhat.com
Mon Aug 25 04:28:29 PDT 2014


 extensions/source/abpilot/abpresid.hrc |   17 ++-------------
 extensions/source/abpilot/abspilot.cxx |    4 +--
 extensions/source/abpilot/abspilot.src |   14 +++---------
 include/sfx2/newstyle.hxx              |    4 +--
 include/sfx2/sfx.hrc                   |    4 ---
 include/svx/dialogs.hrc                |    4 ---
 include/svx/fmresids.hrc               |   14 +++++-------
 sfx2/source/appl/app.hrc               |    6 ++---
 sfx2/source/appl/app.src               |   24 +++++++---------------
 sfx2/source/dialog/dialog.hrc          |    2 -
 sfx2/source/dialog/dinfdlg.cxx         |    4 +--
 sfx2/source/dialog/dinfdlg.src         |    6 +----
 sfx2/source/dialog/newstyle.cxx        |   19 ++++-------------
 sfx2/source/dialog/newstyle.src        |    6 +----
 sfx2/source/dialog/templdlg.cxx        |   12 ++++++-----
 sfx2/source/doc/doc.hrc                |    2 -
 sfx2/source/doc/doc.src                |    6 +----
 sfx2/source/doc/guisaveas.cxx          |    8 ++++---
 sfx2/source/doc/objserv.cxx            |    7 ++----
 sfx2/source/inc/sfxlocal.hrc           |    2 -
 sfx2/source/view/view.hrc              |    2 -
 sfx2/source/view/view.src              |    6 +----
 sfx2/source/view/viewfrm.cxx           |   11 ++++++----
 svx/source/dialog/docrecovery.cxx      |    6 ++---
 svx/source/dialog/docrecovery.src      |    6 +----
 svx/source/form/datanavi.cxx           |   31 +++++++++++++++-------------
 svx/source/form/datanavi.src           |   36 +++++++++++----------------------
 27 files changed, 105 insertions(+), 158 deletions(-)

New commits:
commit 27d79b12e17a93f6e4eab2a3c09d423a4a04a63d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 25 10:45:11 2014 +0100

    QueryBox RID_QRY_* -> MessageDialog + string
    
    Change-Id: I3349a513a1e1b6fefd1f0f07a8a0798a325d87db

diff --git a/extensions/source/abpilot/abpresid.hrc b/extensions/source/abpilot/abpresid.hrc
index ac716b0..2ab08cc 100644
--- a/extensions/source/abpilot/abpresid.hrc
+++ b/extensions/source/abpilot/abpresid.hrc
@@ -28,7 +28,6 @@
 #define RID_PAGE_START                  RID_ABP_START
 #define RID_STRING_START                RID_ABP_START
 #define RID_UNTYPED_START               RID_ABP_START
-#define RID_QUERYBOX_START              RID_ABP_START
 #define RID_BITMAP_START                RID_ABP_START
 
 // strings
@@ -46,18 +45,11 @@
 #define RID_STR_MANUAL_FIELD_MAPPING    ( RID_STRING_START +  10 )
 #define RID_STR_FINAL_CONFIRM           ( RID_STRING_START +  11 )
 #define RID_STR_NEEDTYPESELECTION       ( RID_STRING_START +  12 )
+#define RID_STR_QRY_NO_EVO_GW           ( RID_STRING_START +  13 )
+#define RID_STR_QRY_NOTABLES            ( RID_STRING_START +  14 )
 // please adjust RID_STRING_END (below) when adding new strings
 
-#define RID_STRING_END                  RID_STR_NEEDTYPESELECTION
-
-// query boxes
-
-#define RID_QRY_NOTABLES                ( RID_QUERYBOX_START +  0 )
-// please adjust RID_QUERYBOX_END (below) when adding new query boxes
-
-#define RID_QRY_NO_EVO_GW               ( RID_QUERYBOX_START +  1 )
-
-#define RID_QUERYBOX_END                RID_QRY_NO_EVO_GW
+#define RID_STRING_END                  RID_STR_QRY_NOTABLES
 
 // untyped resources
 
@@ -78,9 +70,6 @@
 #if RID_STRING_END > RID_ABP_END
     #error "please adjust the resource id ranges!!"
 #endif
-#if RID_QUERYBOX_END > RID_ABP_END
-    #error "please adjust the resource id ranges!!"
-#endif
 #if RID_UNTYPED_END > RID_ABP_END
     #error "please adjust the resource id ranges!!"
 #endif
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index a93dd1e..bfe4cb1 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -28,7 +28,7 @@
 #include "admininvokationpage.hxx"
 #include "tableselectionpage.hxx"
 #include <vcl/waitobj.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
 #include <vcl/settings.hxx>
 #include "abpfinalpage.hxx"
 #include "fieldmappingpage.hxx"
@@ -276,7 +276,7 @@ namespace abp
 
             if ( aTables.empty() )
             {
-                if ( RET_YES != QueryBox( this, ModuleRes( ( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_QRY_NO_EVO_GW : RID_QRY_NOTABLES ) ) ).Execute() )
+                if (RET_YES != MessageDialog(this, ModuleRes(( getSettings().eType == AST_EVOLUTION_GROUPWISE ? RID_STR_QRY_NO_EVO_GW : RID_STR_QRY_NOTABLES)), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute())
                 {
                     // cannot ask the user, or the user chose to use this data source, though there are no tables
                     bAllow = false;
diff --git a/extensions/source/abpilot/abspilot.src b/extensions/source/abpilot/abspilot.src
index 985915b..bb8ac22 100644
--- a/extensions/source/abpilot/abspilot.src
+++ b/extensions/source/abpilot/abspilot.src
@@ -54,20 +54,14 @@ String RID_STR_NEEDTYPESELECTION
     Text [ en-US ] = "Please select a type of address book.";
 };
 
-QueryBox RID_QRY_NOTABLES
+String RID_STR_QRY_NOTABLES
 {
-    Buttons = WB_YES_NO;
-    DefButton = WB_DEF_NO;
-
-    Message [ en-US ] = "The data source does not contain any tables.\nDo you want to set it up as an address data source, anyway?";
+    Text [ en-US ] = "The data source does not contain any tables.\nDo you want to set it up as an address data source, anyway?";
 };
 
-QueryBox RID_QRY_NO_EVO_GW
+String RID_STR_QRY_NO_EVO_GW
 {
-    Buttons = WB_YES_NO;
-    DefButton = WB_DEF_NO;
-
-    Message [ en-US ] = "You don't seem to have any GroupWise account configured in Evolution.\nDo you want to set it up as an address data source, anyway?";
+    Text [ en-US ] = "You don't seem to have any GroupWise account configured in Evolution.\nDo you want to set it up as an address data source, anyway?";
 };
 
 String RID_STR_DEFAULT_NAME
commit 702b981d9a9bd079a98660153747aee7337424fa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 25 08:54:32 2014 +0100

    QueryBox MSG_QUERY_OPENASTEMPLATE -> MessageDialog + string
    
    Change-Id: I031a145ca62e3bf7e74b9d447ff8bb041974daa6

diff --git a/include/sfx2/newstyle.hxx b/include/sfx2/newstyle.hxx
index 1a646e6..e649490 100644
--- a/include/sfx2/newstyle.hxx
+++ b/include/sfx2/newstyle.hxx
@@ -23,7 +23,7 @@
 #include <sal/config.h>
 #include <sfx2/dllapi.h>
 #include <vcl/button.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
 #include <vcl/combobox.hxx>
 #include <vcl/dialog.hxx>
 #include <vcl/fixed.hxx>
@@ -36,7 +36,7 @@ private:
     ComboBox* m_pColBox;
     OKButton* m_pOKBtn;
 
-    QueryBox                aQueryOverwriteBox;
+    MessageDialog aQueryOverwriteBox;
     SfxStyleSheetBasePool&  rPool;
 
     DECL_DLLPRIVATE_LINK( OKHdl, Control * );
diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc
index 0a9b8a2..6c8d6e1 100644
--- a/include/sfx2/sfx.hrc
+++ b/include/sfx2/sfx.hrc
@@ -106,8 +106,6 @@
 
 // temporary due to compatibility
 
-#define MSG_QUERY_LASTVERSION               RID_SFX_START
-
 #define RID_APPLICATION                     RID_SFX_START
 #define RID_DEFAULTIMAGELIST_SC             (RID_SFX_START+15)
 #define RID_DEFAULTIMAGELIST_LC             (RID_SFX_START+17)
@@ -142,7 +140,7 @@
 #define STR_KB                              (RID_SFX_START+112)
 #define STR_MB                              (RID_SFX_START+113)
 #define STR_GB                              (RID_SFX_START+114)
-
+#define STR_QUERY_LASTVERSION               (RID_SFX_START+115)
 #define STR_STANDARD_SHORTCUT               (RID_SFX_START+117)
 #define STR_REPAIREDDOCUMENT                (RID_SFX_START+118)
 #define STR_ERRUNOEVENTBINDUNG              (RID_SFX_START+119)
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index f1ec60e..a4aaf0e 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -100,9 +100,9 @@
 
 #define RID_DESKTOP                             (RID_SFX_APP_START + 184)
 
-#define RID_XMLSEC_QUERY_LOSINGSIGNATURE        (RID_SFX_APP_START + 186)
-#define RID_XMLSEC_QUERY_SAVEBEFORESIGN         (RID_SFX_APP_START + 187)
-#define RID_QUERY_CANCELCHECKOUT                (RID_SFX_APP_START + 188)
+#define RID_SVXSTR_XMLSEC_QUERY_LOSINGSIGNATURE (RID_SFX_APP_START + 186)
+#define RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN  (RID_SFX_APP_START + 187)
+#define STR_QUERY_CANCELCHECKOUT                (RID_SFX_APP_START + 188)
 
 #define STR_INFO_WRONGDOCFORMAT                 (RID_SFX_APP_START + 190)
 
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index 66f22b6..a18b076 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -53,11 +53,9 @@ String STR_GB
 {
     Text [ en-US ] = "GB" ;
 };
-QueryBox MSG_QUERY_LASTVERSION
+String STR_QUERY_LASTVERSION
 {
-    Buttons = WB_YES_NO ;
-    DefButton = WB_DEF_NO ;
-    Message [ en-US ] = "Cancel all changes?" ;
+    Text [ en-US ] = "Cancel all changes?" ;
 };
 
 String STR_NO_WEBBROWSER_FOUND
@@ -345,25 +343,19 @@ String RID_DESKTOP
     Text = "%PRODUCTNAME" ;
 };
 
-QueryBox RID_XMLSEC_QUERY_LOSINGSIGNATURE
+String RID_SVXSTR_XMLSEC_QUERY_LOSINGSIGNATURE
 {
-    Buttons = WB_YES_NO ;
-    DefButton = WB_DEF_NO ;
-    Message [ en-US ] = "Saving will remove all existing signatures.\nDo you want to continue saving the document?" ;
+    Text [ en-US ] = "Saving will remove all existing signatures.\nDo you want to continue saving the document?" ;
 };
 
-QueryBox RID_XMLSEC_QUERY_SAVEBEFORESIGN
+String RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN
 {
-    Buttons = WB_YES_NO ;
-    DefButton = WB_DEF_YES ;
-    Message [ en-US ] = "The document has to be saved before it can be signed.\nDo you want to save the document?" ;
+    Text [ en-US ] = "The document has to be saved before it can be signed.\nDo you want to save the document?" ;
 };
 
-QueryBox RID_QUERY_CANCELCHECKOUT
+String STR_QUERY_CANCELCHECKOUT
 {
-    Buttons = WB_YES_NO ;
-    DefButton = WB_DEF_YES ;
-    Message [ en-US ] = "This will discard all changes on the server since check-out.\nDo you want to proceed?" ;
+    Text [ en-US ] = "This will discard all changes on the server since check-out.\nDo you want to proceed?" ;
 };
 
 String STR_INFO_WRONGDOCFORMAT
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 1cf86cd..74eaba9 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -34,7 +34,7 @@
 
 #define RID_DLG_ALIEN_WARNING           ( RC_DIALOG_BEGIN + 0)
 #define STR_RESET                       ( RC_DIALOG_BEGIN + 0)
-#define MSG_OVERWRITE                   ( RC_DIALOG_BEGIN + 1)
+#define STR_QUERY_OVERWRITE             ( RC_DIALOG_BEGIN + 1)
 #define STR_TABPAGE_INVALIDNAME         ( RC_DIALOG_BEGIN + 13)
 #define STR_TABPAGE_INVALIDSTYLE        ( RC_DIALOG_BEGIN + 14)
 #define STR_POOL_STYLE_NAME             ( RC_DIALOG_BEGIN + 16)
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 7ba8c7e..d92fa6b 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -18,7 +18,7 @@
  */
 
 #include <tools/urlobj.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
 #include <svl/eitem.hxx>
 #include <vcl/svapp.hxx>
 #include <unotools/localedatawrapper.hxx>
@@ -1601,7 +1601,7 @@ void CustomPropertiesWindow::ValidateLine( CustomPropertyLine* pLine, bool bIsFr
         if ( bIsFromTypeBox ) // LoseFocus of TypeBox
             pLine->m_bTypeLostFocus = true;
         Window* pParent = GetParent()->GetParent();
-        if ( QueryBox( pParent, SfxResId( SFX_QB_WRONG_TYPE ) ).Execute() == RET_OK )
+        if (MessageDialog(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL).Execute() == RET_OK)
             pLine->m_aTypeBox.SelectEntryPos( m_aTypeBox.GetEntryPos( (void*)CUSTOM_TYPE_TEXT ) );
         else
             pLine->m_aValueEdit.GrabFocus();
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index 8f6ad2e..ac379b1 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -172,11 +172,9 @@ Image SFX_IMG_PROPERTY_REMOVE
     MaskColor = Color { Red=0xffff; Green=0x0000; Blue=0xffff; };
 };
 
-QueryBox SFX_QB_WRONG_TYPE
+String STR_SFX_QUERY_WRONG_TYPE
 {
-    Buttons = WB_OK_CANCEL ;
-    DefButton = WB_DEF_OK ;
-    Message [ en-US ] = "The value entered does not match the specified type.\nThe value will be stored as text." ;
+    Text [ en-US ] = "The value entered does not match the specified type.\nThe value will be stored as text." ;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index b2927b6..56ae0e9 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -50,8 +50,6 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
     return 0;
 }
 
-
-
 IMPL_LINK_INLINE_START( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
 {
     m_pOKBtn->Enable( !comphelper::string::remove(pBox->GetText(), ' ').isEmpty() );
@@ -59,16 +57,11 @@ IMPL_LINK_INLINE_START( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
 }
 IMPL_LINK_INLINE_END( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
 
-// CTOR / DTOR -----------------------------------------------------------
-
-SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool ) :
-
-    ModalDialog( pParent, "CreateStyleDialog", "sfx/ui/newstyle.ui" ),
-
-    aQueryOverwriteBox  ( this, SfxResId( MSG_OVERWRITE ) ),
-
-    rPool( rInPool )
-
+SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool )
+    : ModalDialog(pParent, "CreateStyleDialog", "sfx/ui/newstyle.ui")
+    , aQueryOverwriteBox(this, SfxResId(STR_QUERY_OVERWRITE),
+                         VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)
+    , rPool(rInPool)
 {
     get(m_pColBox, "stylename");
     m_pColBox->set_width_request(m_pColBox->approximate_char_width() * 25);
@@ -87,8 +80,6 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool
     }
 }
 
-
-
 SfxNewStyleDlg::~SfxNewStyleDlg()
 {
 }
diff --git a/sfx2/source/dialog/newstyle.src b/sfx2/source/dialog/newstyle.src
index 10c7744..d595e55 100644
--- a/sfx2/source/dialog/newstyle.src
+++ b/sfx2/source/dialog/newstyle.src
@@ -21,11 +21,9 @@
 #include "dialog.hrc"
 #include <sfx2/sfxcommands.h>
 
-QueryBox MSG_OVERWRITE
+String STR_QUERY_OVERWRITE
 {
-    Buttons = WB_YES_NO ;
-    DefButton = WB_DEF_NO ;
-    Message [ en-US ] = "Style already exists. Overwrite?" ;
+    Text [ en-US ] = "Style already exists. Overwrite?" ;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 7b022d3..09f30ce 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -2115,11 +2115,13 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
         // we only want to show the dialog once and if we want to delete a style in use (UX-advice)
         if ( bUsedStyle )
         {
-            #if defined UNX
-                QueryBox aBox( SfxGetpApp()->GetTopWindow(), WB_YES_NO | WB_DEF_NO, aMsg );
-            #else
-                QueryBox aBox( GetWindow(), WB_YES_NO | WB_DEF_NO , aMsg );
-            #endif
+        #if defined UNX
+            MessageDialog aBox(SfxGetpApp()->GetTopWindow(), aMsg,
+                               VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
+        #else
+            MessageDialog aBox(GetWindow(), aMsg,
+                               VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
+        #endif
             aApproved = aBox.Execute() == RET_YES;
         }
 
diff --git a/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc
index 997c78c..4517815 100644
--- a/sfx2/source/doc/doc.hrc
+++ b/sfx2/source/doc/doc.hrc
@@ -135,7 +135,7 @@
 #define STR_ERROR_DELETE_TEMPLATE_DIR       (RID_SFX_DOC_START+123)
 #define STR_DOCINFO_INFOFIELD               (RID_SFX_DOC_START+124)
 
-#define MSG_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN (RID_SFX_DOC_START+125)
+#define STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN (RID_SFX_DOC_START+125)
 #define STR_XMLSEC_ODF12_EXPECTED           (RID_SFX_DOC_START+126)
 
 #define STR_QRYTEMPL_MESSAGE                (RID_SFX_DOC_START+127)
diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src
index 7c71343..4bffbda 100644
--- a/sfx2/source/doc/doc.src
+++ b/sfx2/source/doc/doc.src
@@ -347,11 +347,9 @@ String STR_XMLSEC_ODF12_EXPECTED
     Text [ en-US ] = "The document format version is set to ODF 1.1 (OpenOffice.org 2.x) in Tools-Options-Load/Save-General. Signing documents requires ODF 1.2 (OpenOffice.org 3.x).";
 };
 
-QueryBox MSG_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN
+String STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN
 {
-    Buttons = WB_YES_NO ;
-    DefButton = WB_DEF_YES ;
-    Message [ en-US ] = "The document has to be saved before it can be signed. Saving the document removes all present signatures.\nDo you want to save the document?";
+    Text [ en-US ] = "The document has to be saved before it can be signed. Saving the document removes all present signatures.\nDo you want to save the document?";
 };
 
 String STR_QRYTEMPL_MESSAGE
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index cf18115..e19e517 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -63,7 +63,7 @@
 #include <tools/urlobj.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/mimeconfighelper.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
 #include <vcl/window.hxx>
 #include <toolkit/awt/vclxwindow.hxx>
 
@@ -666,7 +666,8 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus )
         {
             // notify the user that SaveAs is going to be done
             Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel );
-            QueryBox aMessageBox( pWin, WB_OK_CANCEL | WB_DEF_OK, SfxResId(STR_NEW_FILENAME_SAVE).toString() );
+            MessageDialog aMessageBox(pWin, SfxResId(STR_NEW_FILENAME_SAVE),
+                                      VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL);
             if ( aMessageBox.Execute() == RET_OK )
                 nResult = STATUS_SAVEAS;
             else
@@ -1438,7 +1439,8 @@ bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel,
            || SIGNATURESTATE_SIGNATURES_NOTVALIDATED == nDocumentSignatureState
            || SIGNATURESTATE_SIGNATURES_PARTIAL_OK == nDocumentSignatureState)
         {
-            if ( QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_LOSINGSIGNATURE ) ).Execute() != RET_YES )
+            if (MessageDialog(NULL, SfxResId(RID_SVXSTR_XMLSEC_QUERY_LOSINGSIGNATURE),
+                              VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() != RET_YES)
             {
                 // the user has decided not to store the document
                 throw task::ErrorCodeIOException(
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 2f87469..d365ed8 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -46,7 +46,6 @@
 #include <com/sun/star/security/DocumentDigitalSignatures.hpp>
 #include <tools/urlobj.hxx>
 #include <svl/whiter.hxx>
-#include <vcl/msgbox.hxx>
 #include <vcl/layout.hxx>
 #include <svl/intitem.hxx>
 #include <svl/eitem.hxx>
@@ -865,7 +864,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
         }
         case SID_CANCELCHECKOUT:
         {
-            if (  QueryBox( NULL, SfxResId( RID_QUERY_CANCELCHECKOUT ) ).Execute( ) == RET_YES )
+            if (MessageDialog(NULL, SfxResId(STR_QUERY_CANCELCHECKOUT), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() == RET_YES)
             {
                 CancelCheckOut( );
 
@@ -1427,8 +1426,8 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
         if ( nVersion >= SvtSaveOptions::ODFVER_012 )
         {
 
-            if ( (bHasSign && QueryBox( NULL, SfxResId( MSG_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN ) ).Execute() == RET_YES)
-              || (!bHasSign && QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_SAVEBEFORESIGN ) ).Execute() == RET_YES) )
+            if ( (bHasSign && MessageDialog(NULL, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() == RET_YES)
+              || (!bHasSign && MessageDialog(NULL, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO).Execute() == RET_YES) )
             {
                 sal_uInt16 nId = SID_SAVEDOC;
                 if ( !GetMedium() || GetMedium()->GetName().isEmpty() )
diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
index 7cf92f2..4a57060 100644
--- a/sfx2/source/inc/sfxlocal.hrc
+++ b/sfx2/source/inc/sfxlocal.hrc
@@ -36,6 +36,7 @@
 #define STR_SFX_UNDOCK                      (RID_SFX_SFXLOCAL_START +  8)
 #define STR_SFX_TASK_PANE_VIEW              (RID_SFX_SFXLOCAL_START +  9)
 #define STR_SFX_TASKS                       (RID_SFX_SFXLOCAL_START + 10)
+#define STR_SFX_QUERY_WRONG_TYPE            (RID_SFX_SFXLOCAL_START + 11)
 
 // Controls --------------------------------------------------------------
 
@@ -44,7 +45,6 @@
 #define SFX_LB_PROPERTY_TYPE                (RID_SFX_SFXLOCAL_START +  4)
 #define SFX_PB_PROPERTY_REMOVE              (RID_SFX_SFXLOCAL_START +  5)
 #define SFX_WIN_PROPERTY_YESNO              (RID_SFX_SFXLOCAL_START +  6)
-#define SFX_QB_WRONG_TYPE                   (RID_SFX_SFXLOCAL_START +  7)
 #define SFX_FLD_DATE                        (RID_SFX_SFXLOCAL_START +  10)
 #define SFX_FLD_TIME                        (RID_SFX_SFXLOCAL_START +  11)
 #define SFX_FLD_DURATION                    (RID_SFX_SFXLOCAL_START +  12)
diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc
index 42fe1a16..3c37432 100644
--- a/sfx2/source/view/view.hrc
+++ b/sfx2/source/view/view.hrc
@@ -35,7 +35,7 @@
 
 #define STR_ERROR_SAVE_TEMPLATE             (RID_SFX_VIEW_START+33)
 
-#define MSG_QUERY_OPENASTEMPLATE            (RID_SFX_VIEW_START+41)
+#define STR_QUERY_OPENASTEMPLATE            (RID_SFX_VIEW_START+41)
 #define STR_CANT_CLOSE                      (RID_SFX_VIEW_START+42)
 
 #endif
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
index d2ea1f7..c4213fc 100644
--- a/sfx2/source/view/view.src
+++ b/sfx2/source/view/view.src
@@ -73,11 +73,9 @@ String STR_ERROR_SEND_MAIL
     Text [ en-US ] = "An error occurred in sending the message. Possible errors could be a missing user account or a defective setup.\nPlease check the %PRODUCTNAME settings or your e-mail program settings." ;
 };
 
-QueryBox MSG_QUERY_OPENASTEMPLATE
+String STR_QUERY_OPENASTEMPLATE
 {
-    Buttons = WB_YES_NO ;
-    DefButton = WB_DEF_NO ;
-    Message [ en-US ] = "This document cannot be edited, possibly due to missing access rights. Do you want to edit a copy of the document?" ;
+    Text [ en-US ] = "This document cannot be edited, possibly due to missing access rights. Do you want to edit a copy of the document?" ;
 };
 String STR_REPAIREDDOCUMENT
 {
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index bbabaa3..a01e916 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -41,7 +41,7 @@
 #include <svl/slstitm.hxx>
 #include <svl/whiter.hxx>
 #include <svl/undo.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
 #include <svtools/sfxecode.hxx>
 #include <svtools/miscopt.hxx>
 #include <svtools/ehdl.hxx>
@@ -491,7 +491,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                     if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() )
                     {
                         // ::com::sun::star::sdbcx::User offering to open it as a template
-                        QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_OPENASTEMPLATE) );
+                        MessageDialog aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
+                                           VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
                         if ( RET_YES == aBox.Execute() )
                         {
                             SfxApplication* pApp = SfxGetpApp();
@@ -574,7 +575,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
             if ( bDo && GetFrame().DocIsModified_Impl() &&
                  !rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
             {
-                QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_LASTVERSION) );
+                MessageDialog aBox(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION),
+                                   VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
                 bDo = ( RET_YES == aBox.Execute() );
             }
 
@@ -750,7 +752,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
                     if ( bForEdit && SID_EDITDOC == rReq.GetSlot() )
                     {
                         // ask user for opening as template
-                        QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_OPENASTEMPLATE) );
+                        MessageDialog aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
+                                           VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
                         if ( RET_YES == aBox.Execute() )
                         {
                             SfxAllItemSet aSet( pApp->GetPool() );
commit 8ab6621cac3a43acfb61222dbf434df496230b36
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Aug 25 08:41:08 2014 +0100

    QueryBox RID_QRY_REMOVE_* -> MessageDialog + string
    
    Change-Id: Ife33eeaf38daf1aebc1ea35634ca56fae5c89d34

diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 0c7f4d3..4303397 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -187,9 +187,6 @@
 
 #define RID_SVXDLG_COMPRESSGRAPHICS         (RID_SVX_START + 142)
 
-// QueryBox for Exit Recovery Wizard
-#define RID_SVXQB_EXIT_RECOVERY             (RID_SVX_START + 215)
-
 #define RID_SVXCTRL_RECTBTNS                (RID_SVX_START + 226)
 
 // ResId's for Starone impl. bitmaps
@@ -241,6 +238,7 @@
 #define RID_SVXSTR_WRITER_STYLES            (RID_SVX_START +  83)
 #define RID_SVXSTR_CALC_STYLES              (RID_SVX_START +  85)
 #define RID_SVXSTR_SEARCH_NOT_FOUND         (RID_SVX_START +  88)
+#define RID_SVXSTR_QUERY_EXIT_RECOVERY      (RID_SVX_START +  89)
 // ResIds for the PageDialog
 
 // Strings of the ToolBox-Controls from tbcontrl.cxx
diff --git a/include/svx/fmresids.hrc b/include/svx/fmresids.hrc
index eeb0789..3282bf0 100644
--- a/include/svx/fmresids.hrc
+++ b/include/svx/fmresids.hrc
@@ -86,20 +86,18 @@
 
 // QueryBox-Id's -----------------------------------------------------------
 #define RID_QRY_SAVEMODIFIED                        (RID_FORMS_START + 1)
-#define RID_QRY_REMOVE_MODEL                        (RID_FORMS_START + 2)
-#define RID_QRY_REMOVE_INSTANCE                     (RID_FORMS_START + 3)
-#define RID_QRY_REMOVE_ELEMENT                      (RID_FORMS_START + 4)
-#define RID_QRY_REMOVE_ATTRIBUTE                    (RID_FORMS_START + 5)
 #define RID_QRY_LINK_WARNING                        (RID_FORMS_START + 6)
-#define RID_QRY_REMOVE_SUBMISSION                   (RID_FORMS_START + 7)
-#define RID_QRY_REMOVE_BINDING                      (RID_FORMS_START + 8)
 
 // String-Id's -----------------------------------------------------------
 #define RID_STR_INVALID_XMLNAME                     (RID_FORMS_START + 1)
 #define RID_STR_INVALID_XMLPREFIX                   (RID_FORMS_START + 2)
 #define RID_STR_DOUBLE_MODELNAME                    (RID_FORMS_START + 3)
 #define RID_STR_EMPTY_SUBMISSIONNAME                (RID_FORMS_START + 4)
-
+#define RID_STR_QRY_REMOVE_BINDING                  (RID_FORMS_START + 5)
+#define RID_STR_QRY_REMOVE_SUBMISSION               (RID_FORMS_START + 6)
+#define RID_STR_QRY_REMOVE_ATTRIBUTE                (RID_FORMS_START + 7)
+#define RID_STR_QRY_REMOVE_ELEMENT                  (RID_FORMS_START + 8)
+#define RID_STR_QRY_REMOVE_INSTANCE                 (RID_FORMS_START + 9)
 #define RID_STR_FORMSHELL                           (RID_FORMS_START +  10)
 #define RID_STR_STDFORMNAME                         (RID_FORMS_START +  11)
 #define RID_STR_REC_TEXT                            (RID_FORMS_START +  12)
@@ -156,7 +154,7 @@
 #define RID_STR_FILTER_FILTER_OR                    (RID_FORMS_START +  80)
 #define RID_STR_PROPTITLE_FORMATTED                 (RID_FORMS_START +  81)
 #define RID_STR_SYNTAXERROR                         (RID_FORMS_START +  82)
-    // FREE
+#define RID_STR_QRY_REMOVE_MODEL                    (RID_FORMS_START +  83)
 #define RID_STR_NOCONTROLS_FOR_EXTERNALDISPLAY      (RID_FORMS_START +  84)
 #define RID_STR_AUTOFIELD                           (RID_FORMS_START +  89)
 #define RID_STR_SVT_SQL_SYNTAX_ERROR                (RID_FORMS_START +  90)
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index be7e9da..34de399 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 0e5e895..eb55d1f 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 69b24e2..9f2a0eb 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 2f75ef33..debd9ee 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


More information about the Libreoffice-commits mailing list