sw/UIConfig_swriter.mk | 2 + sw/source/ui/app/app.src | 7 ---- sw/source/ui/inc/app.hrc | 1 sw/source/ui/uiview/srcview.cxx | 24 +++++++++++--- sw/source/ui/uiview/view.src | 12 ------- sw/source/ui/uiview/viewsrch.cxx | 22 ++++++++++--- sw/uiconfig/swriter/ui/querycontinuebegindialog.ui | 35 +++++++++++++++++++++ sw/uiconfig/swriter/ui/querycontinueenddialog.ui | 35 +++++++++++++++++++++ 8 files changed, 108 insertions(+), 30 deletions(-)
New commits: commit f34881370ac9d9f499e00143ca840ba88021843f Author: Caolán McNamara <caol...@redhat.com> Date: Sat Aug 17 15:43:54 2013 +0100 convert continue queryboxes to .ui Change-Id: I8e23eb484177ccd47b7780ccafbdf8b377ea57e1 diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 907c251..61f22dc 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -132,6 +132,8 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/outlinenumbering \ sw/uiconfig/swriter/ui/outlinenumberingpage \ sw/uiconfig/swriter/ui/outlinepositionpage \ + sw/uiconfig/swriter/ui/querycontinuebegindialog \ + sw/uiconfig/swriter/ui/querycontinueenddialog \ sw/uiconfig/swriter/ui/querydefaultcompatdialog \ sw/uiconfig/swriter/ui/querysavelabeldialog \ sw/uiconfig/swriter/ui/queryshowchangesdialog \ diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index b305602..c3ceef3 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -633,12 +633,26 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, { InfoBox( 0, SW_RES(MSG_NOT_FOUND)).Execute(); } - else if(!bRecursive && RET_YES == - QueryBox(0, SW_RES( bForward ? MSG_SEARCH_END - : MSG_SEARCH_START)).Execute()) + else if(!bRecursive) { - pTextView->SetSelection( TextSelection( aPaM, aPaM ) ); - StartSearchAndReplace( rSearchItem, sal_False, sal_False, sal_True ); + int nRet; + + if (!bForward) + { + nRet = MessageDialog(0, "QueryContinueEndDialog", + "modules/swriter/ui/querycontinueenddialog.ui").Execute(); + } + else + { + nRet = MessageDialog(0, "QueryContinueBeginDialog", + "modules/swriter/ui/querycontinuebegindialog.ui").Execute(); + } + + if (nRet == RET_YES) + { + pTextView->SetSelection( TextSelection( aPaM, aPaM ) ); + StartSearchAndReplace( rSearchItem, sal_False, sal_False, sal_True ); + } } } } diff --git a/sw/source/ui/uiview/view.src b/sw/source/ui/uiview/view.src index 2dafb93..471a176 100644 --- a/sw/source/ui/uiview/view.src +++ b/sw/source/ui/uiview/view.src @@ -53,18 +53,6 @@ QueryBox DLG_SPECIAL_FORCED DEFBUTTON = WB_DEF_NO ; Message [ en-US ] = "Check special regions is deactivated. Check anyway?" ; }; -QueryBox MSG_SEARCH_END -{ - Buttons = WB_YES_NO ; - DefButton = WB_DEF_YES ; - Message [ en-US ] = "%PRODUCTNAME Writer has searched to the end of the document. Do you want to continue at the beginning?" ; -}; -QueryBox MSG_SEARCH_START -{ - Buttons = WB_YES_NO ; - DefButton = WB_DEF_YES ; - Message [ en-US ] = "%PRODUCTNAME Writer has searched to the beginning of the document. Do you want to continue at the end?" ; -}; InfoBox MSG_NO_MERGE_ENTRY { Message [ en-US ] = "Could not merge documents." ; diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index e89b7ea..2df0a38 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -39,6 +39,7 @@ #include <svx/srchdlg.hxx> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> +#include <vcl/layout.hxx> #include <vcl/msgbox.hxx> #include <vcl/wrkwin.hxx> #include "editeng/unolingu.hxx" @@ -501,11 +502,22 @@ sal_Bool SwView::SearchAndWrap(sal_Bool bApi) m_pWrtShell->EndAllAction(); // Try again with WrapAround? - if( bApi || RET_NO == QueryBox( GetParentWindow( m_pSrchDlg ), - SW_RES( DOCPOS_START == aOpts.eEnd - ? MSG_SEARCH_START - : MSG_SEARCH_END ) - ).Execute() ) + int nRet = RET_NO; + if( !bApi ) + { + if (DOCPOS_START == aOpts.eEnd) + { + nRet = MessageDialog(GetParentWindow(m_pSrchDlg), "QueryContinueEndDialog", + "modules/swriter/ui/querycontinueenddialog.ui").Execute(); + } + else + { + nRet = MessageDialog(GetParentWindow(m_pSrchDlg), "QueryContinueBeginDialog", + "modules/swriter/ui/querycontinuebegindialog.ui").Execute(); + } + } + + if (nRet == RET_NO) { m_bFound = sal_False; m_pWrtShell->Pop(); diff --git a/sw/uiconfig/swriter/ui/querycontinuebegindialog.ui b/sw/uiconfig/swriter/ui/querycontinuebegindialog.ui new file mode 100644 index 0000000..23c72f7 --- /dev/null +++ b/sw/uiconfig/swriter/ui/querycontinuebegindialog.ui @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkMessageDialog" id="QueryContinueBeginDialog"> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="title" translatable="yes">Continue at the beginning?</property> + <property name="resizable">False</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <property name="message_type">question</property> + <property name="buttons">yes-no</property> + <property name="text" translatable="yes">Do you want to continue at the beginning?</property> + <property name="secondary_text" translatable="yes">%PRODUCTNAME Writer has searched to the end of the document.</property> + <child internal-child="vbox"> + <object class="GtkBox" id="messagedialog-vbox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">24</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="messagedialog-action_area"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> +</interface> diff --git a/sw/uiconfig/swriter/ui/querycontinueenddialog.ui b/sw/uiconfig/swriter/ui/querycontinueenddialog.ui new file mode 100644 index 0000000..b7ab825 --- /dev/null +++ b/sw/uiconfig/swriter/ui/querycontinueenddialog.ui @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkMessageDialog" id="QueryContinueEndDialog"> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="title" translatable="yes">Continue at the end?</property> + <property name="resizable">False</property> + <property name="type_hint">dialog</property> + <property name="skip_taskbar_hint">True</property> + <property name="message_type">question</property> + <property name="buttons">yes-no</property> + <property name="text" translatable="yes">Do you want to continue at the end?</property> + <property name="secondary_text" translatable="yes">%PRODUCTNAME Writer has searched to the beginning of the document.</property> + <child internal-child="vbox"> + <object class="GtkBox" id="messagedialog-vbox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">24</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="messagedialog-action_area"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> +</interface> commit 5a66d854814edeb7183b76ceeeeba260cf0621fd Author: Caolán McNamara <caol...@redhat.com> Date: Sat Aug 17 15:27:04 2013 +0100 another unused QueryBox Change-Id: Ia317f09260853602f4dd313a0577de192834b1c5 diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src index ea73203..0d6cc20 100644 --- a/sw/source/ui/app/app.src +++ b/sw/source/ui/app/app.src @@ -445,13 +445,6 @@ QueryBox MSG_CLPBRD_CLEAR Message [ en-US ] = "You have a large amount of data saved in the clipboard.\nShould the clipboard contents remain available for other applications?" ; }; -QueryBox MSG_SAVE_HTML_QUERY -{ - BUTTONS = WB_YES_NO_CANCEL ; - DEFBUTTON = WB_DEF_YES ; - Message [ en-US ] = "Conversion into HTML format \nmay cause information loss. \nDo you want to save the document?" ; -}; - String STR_ABSTRACT_TITLE { Text [ en-US ] = "Abstract: " ; diff --git a/sw/source/ui/inc/app.hrc b/sw/source/ui/inc/app.hrc index ddb3335..1023c4e 100644 --- a/sw/source/ui/inc/app.hrc +++ b/sw/source/ui/inc/app.hrc @@ -30,7 +30,6 @@ // Messages #define MSG_ERROR_SEND_MAIL ( RC_APP_BEGIN + 6) -#define MSG_SAVE_HTML_QUERY ( RC_APP_BEGIN + 7) // For the interface because the RID_APP_BEGIN is now Desktop. #define RID_SW_NAME ( RC_APP_BEGIN + 8)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits