[Libreoffice-commits] core.git: include/svx svx/source sw/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 13 03:22:32 UTC 2020


 include/svx/srchdlg.hxx             |    4 +++-
 include/svx/strings.hrc             |    2 ++
 svx/source/dialog/srchdlg.cxx       |    4 ++++
 sw/source/uibase/uiview/viewmdi.cxx |    4 ++--
 4 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 6e71005fb44a402b364233964a203f7c1e33b4c4
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Fri Jan 10 21:58:44 2020 -0900
Commit:     Jim Raykowski <raykowj at gmail.com>
CommitDate: Mon Jan 13 04:21:54 2020 +0100

    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 at gmail.com>

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]);


More information about the Libreoffice-commits mailing list