summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2020-01-10 21:58:44 -0900
committerJim Raykowski <raykowj@gmail.com>2020-01-13 04:21:54 +0100
commit6e71005fb44a402b364233964a203f7c1e33b4c4 (patch)
tree72aa1f5d4993a59ff716c3bc3f648960508cd7e0
parent628189b73465b811fd7083e1fdc8533443b52588 (diff)
tdf#115600 Fix navigate by reminder wrap messages
Navigating by reminders is done in the order which reminders are set. This patch corrects wrap messages displayed when first and last reminders are reached and continued from the last and first reminder. Change-Id: Iaea1965df149a029b4b1e2df059a8d73306f901c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86629 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
-rw-r--r--include/svx/srchdlg.hxx4
-rw-r--r--include/svx/strings.hrc2
-rw-r--r--svx/source/dialog/srchdlg.cxx4
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx4
4 files changed, 11 insertions, 3 deletions
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 9a0bf9ea381d..5c27e2de9e79 100644
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -77,7 +77,9 @@ enum class SearchLabel
NotFound,
StartWrapped,
EndWrapped,
- NavElementNotFound
+ NavElementNotFound,
+ ReminderStartWrapped,
+ ReminderEndWrapped
};
class SvxSearchDialog;
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 3eea6ce8aa4c..993b03a9c8e9 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1290,6 +1290,8 @@
#define RID_SVXSTR_SEARCH_NAV_ELEMENT_NOT_FOUND NC_("RID_SVXSTR_SEARCH_NAV_ELEMENT_NOT_FOUND", "Navigation Element not found")
#define RID_SVXSTR_SEARCH_START NC_("RID_SVXSTR_SEARCH_START", "Reached the beginning of the document")
#define RID_SVXSTR_SEARCH_START_WRAPPED NC_("RID_SVXSTR_SEARCH_START_WRAPPED", "Reached the beginning of the document, continued from the end")
+#define RID_SVXSTR_SEARCH_REMINDER_START_WRAPPED NC_("RID_SVXSTR_SEARCH_REMINDER_START_WRAPPED", "Reached the first reminder, continued from the last")
+#define RID_SVXSTR_SEARCH_REMINDER_END_WRAPPED NC_("RID_SVXSTR_SEARCH_REMINDER_END_WRAPPED", "Reached the last reminder, continued from the first")
#define RID_SVXDLG_BMPMASK_STR_PALETTE NC_("RID_SVXDLG_BMPMASK_STR_PALETTE", "Color Palette")
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 14e6573241c3..64f7681db67f 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2473,6 +2473,10 @@ void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL)
sStr = SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND);
else if (rSL == SearchLabel::NavElementNotFound)
sStr = SvxResId(RID_SVXSTR_SEARCH_NAV_ELEMENT_NOT_FOUND);
+ else if (rSL == SearchLabel::ReminderEndWrapped)
+ sStr = SvxResId(RID_SVXSTR_SEARCH_REMINDER_END_WRAPPED);
+ else if (rSL == SearchLabel::ReminderStartWrapped)
+ sStr = SvxResId(RID_SVXSTR_SEARCH_REMINDER_START_WRAPPED);
lcl_SetSearchLabelWindow(sStr);
if (SvxSearchDialogWrapper *pWrp = static_cast<SvxSearchDialogWrapper*>( SfxViewFrame::Current()->
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 1b660148326d..adea583c4289 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -492,7 +492,7 @@ IMPL_LINK( SwView, MoveNavigationHdl, void*, p, void )
if (m_nActMark >= MAX_MARKS || m_nActMark >= static_cast<sal_Int32>(vNavMarkNames.size()))
{
m_nActMark = 0;
- SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::EndWrapped );
+ SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::ReminderEndWrapped );
}
}
else
@@ -501,7 +501,7 @@ IMPL_LINK( SwView, MoveNavigationHdl, void*, p, void )
if (m_nActMark < 0 || m_nActMark >= static_cast<sal_Int32>(vNavMarkNames.size()))
{
m_nActMark = vNavMarkNames.size()-1;
- SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::StartWrapped );
+ SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::ReminderStartWrapped );
}
}
rSh.GotoMark(vNavMarkNames[m_nActMark]);