Kaydet (Commit) f3488137 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert continue queryboxes to .ui

Change-Id: I8e23eb484177ccd47b7780ccafbdf8b377ea57e1
üst 5a66d854
......@@ -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 \
......
......@@ -633,15 +633,29 @@ 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)
{
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 );
}
}
}
}
return nFound;
}
......
......@@ -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." ;
......
......@@ -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();
......
<?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>
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment