From f50a3677380f611b4cc5f86258ca4dc543c8dc3e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 25 Aug 2014 14:14:33 +0100 Subject: convert MSG_COMCORE_ASKSEARCH with custom buttons to .ui Change-Id: I5066c850a22a9dcf0778878a160bbedee6fba81d --- sw/UIConfig_swriter.mk | 1 + sw/inc/comcore.hrc | 1 - sw/source/core/crsr/viscrs.cxx | 5 +- sw/source/ui/app/app.src | 7 --- sw/uiconfig/swriter/ui/asksearchdialog.ui | 84 +++++++++++++++++++++++++++++++ 5 files changed, 88 insertions(+), 10 deletions(-) create mode 100644 sw/uiconfig/swriter/ui/asksearchdialog.ui diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 6af4be8260fa..25fa197b0f1a 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -65,6 +65,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/addressblockdialog \ sw/uiconfig/swriter/ui/alreadyexistsdialog \ sw/uiconfig/swriter/ui/asciifilterdialog \ + sw/uiconfig/swriter/ui/asksearchdialog \ sw/uiconfig/swriter/ui/assignfieldsdialog \ sw/uiconfig/swriter/ui/assignstylesdialog \ sw/uiconfig/swriter/ui/attachnamedialog \ diff --git a/sw/inc/comcore.hrc b/sw/inc/comcore.hrc index 5affd93b6ff9..5b26debe70f0 100644 --- a/sw/inc/comcore.hrc +++ b/sw/inc/comcore.hrc @@ -24,7 +24,6 @@ // Strings #define STR_COMCORE_READERROR (RC_COMCORE_BEGIN + 0) -#define MSG_COMCORE_ASKSEARCH (RC_COMCORE_BEGIN + 1) #define STR_TABLE_DEFNAME (RC_COMCORE_BEGIN + 2) #define STR_GRAPHIC_DEFNAME (RC_COMCORE_BEGIN + 3) #define STR_OBJECT_DEFNAME (RC_COMCORE_BEGIN + 4) diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index b76702822ab0..f53ac0b27d4d 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -601,7 +601,8 @@ short SwShellCrsr::MaxReplaceArived() } while( pShell != ( pSh = (SwViewShell*)pSh->GetNext() ) ); { - nRet = QueryBox( pDlg, SW_RES( MSG_COMCORE_ASKSEARCH )).Execute(); + nRet = MessageDialog(pDlg, "AskSearchDialog", + "modules/swriter/ui/asksearchdialog.ui").Execute(); } for( sal_uInt16 n = 0; n < aArr.size(); ++n ) diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src index e8f7b7129bb5..4da399beeb7d 100644 --- a/sw/source/ui/app/app.src +++ b/sw/source/ui/app/app.src @@ -371,13 +371,6 @@ String STR_STATSTR_SWGPRTOLENOTIFY Text [ en-US ] = "Adapt Objects..."; }; -QueryBox MSG_COMCORE_ASKSEARCH -{ - Buttons = WB_YES_NO_CANCEL ; - DefButton = WB_DEF_YES ; - Message [ en-US ] = "To proceed with this action, you must first turn off the \"undo\" function. Do you want to turn off the \"undo\" function?" ; -}; - Bitmap RID_GRAPHIC_REPLACEBMP { File = "grafikei.bmp" ; diff --git a/sw/uiconfig/swriter/ui/asksearchdialog.ui b/sw/uiconfig/swriter/ui/asksearchdialog.ui new file mode 100644 index 000000000000..32b568eeed93 --- /dev/null +++ b/sw/uiconfig/swriter/ui/asksearchdialog.ui @@ -0,0 +1,84 @@ + + + + + + False + 12 + False + dialog + True + question + To proceed with this action, you must first turn off the "undo" function. Do you want to turn off the "undo" function? + + + False + vertical + 24 + + + False + end + + + gtk-no + True + True + True + True + True + + + False + True + 0 + + + + + gtk-yes + True + True + True + True + True + True + True + + + False + True + 1 + + + + + gtk-cancel + True + True + True + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + + no + yes + cancel + + + -- cgit