Sorry, I forgot to attach the patch.
Here's what I've done so far.
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 1afe40e..72c9752 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -2319,6 +2319,21 @@
           <value xml:lang="en-US">Continue previous numbering</value>
         </prop>
       </node>
+      <node oor:name=".uno:NavigationPopup" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Navigate by</value>
+        </prop>
+      </node>
+      <node oor:name=".uno:ScrollToPrevious" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Previous Page</value>
+        </prop>
+      </node>
+      <node oor:name=".uno:ScrollToNext" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Next Page</value>
+        </prop>
+      </node>
       <node oor:name=".uno:NavigateBack" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Back</value>
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 2c7afac..4ed35a4 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -204,8 +204,7 @@ included in c-context files, so c++ style stuff will cause problems.
 #define FN_DROP_REGION_LINK     (FN_VIEW + 38)  /**/
 #define FN_DROP_REGION_COPY     (FN_VIEW + 39)  /**/
 
-#define FN_SCROLL_NAVIGATION    (FN_VIEW + 40)  /* Navigation Controller in the scrollbar */
-#define FN_SCROLL_NEXT_PREV     (FN_VIEW + 41)  /* processes MoveType */
+#define FN_SCROLL_NAVIGATION    (FN_VIEW + 40)  /* Navigation Controller */
 
 #define FN_VIEW_HIDDEN_PARA     (FN_VIEW + 42)  /* View hidden paragraphs */
 #define FN_VIEW_SMOOTH_SCROLL   (FN_VIEW + 43)
@@ -223,6 +222,10 @@ included in c-context files, so c++ style stuff will cause problems.
 #define FN_VSCROLL_METRIC        (FN_VIEW + 54) /* Metric vertical scrollbar */
 #define FN_VIEW_NOTES            (FN_VIEW + 55)
 
+#define FN_NAVIGATION_POPUP     (FN_VIEW + 56)  /* Navigation Popup */
+#define FN_SCROLL_PREV          (FN_VIEW + 57)  /* uno:ScrollToPrevious */
+#define FN_SCROLL_NEXT          (FN_VIEW + 58)  /* uno:ScrollToNext */
+
 /*--------------------------------------------------------------------
     Region: Insert
  --------------------------------------------------------------------*/
diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi
index 54152af..7513606 100644
--- a/sw/sdi/_viewsh.sdi
+++ b/sw/sdi/_viewsh.sdi
@@ -76,7 +76,15 @@ interface BaseTextEditView
         ExecMethod = NoExec ;
         StateMethod = NoState ;
     ]
-    FN_SCROLL_NEXT_PREV
+    FN_NAVIGATION_POPUP
+    [
+        ExecMethod = Execute;
+    ]
+    FN_SCROLL_PREV
+    [
+        ExecMethod = Execute;
+    ]
+    FN_SCROLL_NEXT
     [
         ExecMethod = Execute;
     ]
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 9cb8c62..0f66712 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -6803,9 +6803,56 @@ SfxBoolItem ScrollNavigation FN_SCROLL_NAVIGATION
     GroupId = GID_VIEW;
 ]
 
-//--------------------------------------------------------------------------
-SfxVoidItem ScrollNextPrev FN_SCROLL_NEXT_PREV
-( SfxBoolItem ScrollNextPrev FN_SCROLL_NEXT_PREV )
+SfxVoidItem NavigationPopup FN_NAVIGATION_POPUP
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = FALSE,
+    HasCoreId = FALSE,
+    HasDialog = FALSE,
+    ReadOnlyDoc = TRUE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Synchron;
+
+    /* config: */
+    AccelConfig = FALSE,
+    MenuConfig = FALSE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = FALSE,
+    GroupId = GID_NAVIGATOR;
+]
+
+SfxVoidItem ScrollToPrevious FN_SCROLL_PREV
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = FALSE,
+    HasCoreId = FALSE,
+    HasDialog = FALSE,
+    ReadOnlyDoc = TRUE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Synchron;
+
+    /* config: */
+    AccelConfig = FALSE,
+    MenuConfig = FALSE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = FALSE,
+    GroupId = GID_NAVIGATOR;
+]
+
+SfxVoidItem ScrollToNext FN_SCROLL_NEXT
+()
 [
     /* flags: */
     AutoUpdate = FALSE,
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index a9c96c7..73f1bcd 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -559,15 +559,12 @@ IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet)
     }
     else
     {
-        SfxBoolItem aNext(FN_SCROLL_NEXT_PREV, NID_NEXT == nSet);
-        Any a;
-        Sequence< PropertyValue > aArgs( 1 );
-        aArgs[0].Name = "ScrollNextPrev";
-        aNext.QueryValue( a );
-        aArgs[0].Value = a;
+        Sequence< PropertyValue > aArgs;
+        OUString cmd(".uno:ScrollToPrevious");
+        if (NID_NEXT == nSet)
+            cmd = OUString(".uno:ScrollToNext");
         SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ),
-                                     OUString( ".uno:ScrollNextPrev" ),
-                                     aArgs );
+                                     cmd, aArgs );
     }
     return 0;
 }
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 9c04f53..125036e 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -1005,19 +1005,26 @@ void SwView::Execute(SfxRequest &rReq)
             lcl_SetAllTextToDefaultLanguage( *m_pWrtShell, RES_CHRATR_CJK_LANGUAGE );
         }
         break;
-        case FN_SCROLL_NEXT_PREV:
-            if(pArgs && pArgs->GetItemState(FN_SCROLL_NEXT_PREV, sal_False, &pItem))
-            {
-                // call the handlers of PageUp/DownButtons, only
-                bool* pbNext = new bool ( ((const SfxBoolItem*)pItem)->GetValue() );
-                // #i75416# move the execution of the search to an asynchronously called static link
-                Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), pbNext );
-            }
-            break;
+        case FN_SCROLL_PREV:
+        case FN_SCROLL_NEXT:
+        {
+            // call the handlers of PageUp/DownButtons, only
+            bool *pbNext = new bool(true); // FN_SCROLL_NEXT
+            if (nSlot == FN_SCROLL_PREV)
+                *pbNext = false;
+            // #i75416# move the execution of the search to an asynchronously called static link
+            Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), pbNext );
+        }
+        break;
+        case FN_NAVIGATION_POPUP:
+        {
+            fprintf(stderr, "Popup\n");
+        }
+        break;
         case SID_JUMPTOMARK:
             if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_JUMPTOMARK, sal_False, &pItem))
                 JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() );
-            break;
+        break;
         case SID_GALLERY :
             GetViewFrame()->ChildWindowExecute(rReq);
         break;
diff --git a/sw/uiconfig/swriter/toolbar/findbar.xml b/sw/uiconfig/swriter/toolbar/findbar.xml
index 4e8ec6b..13e84ad 100644
--- a/sw/uiconfig/swriter/toolbar/findbar.xml
+++ b/sw/uiconfig/swriter/toolbar/findbar.xml
@@ -26,4 +26,8 @@
   <toolbar:toolbaritem xlink:href=".uno:MatchCase"/>
   <toolbar:toolbarseparator/>
   <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/>
+  <toolbar:toolbarseparator/>
+  <toolbar:toolbaritem xlink:href=".uno:ScrollToPrevious"/>
+  <toolbar:toolbaritem xlink:href=".uno:NavigationPopup"/>
+  <toolbar:toolbaritem xlink:href=".uno:ScrollToNext"/>
 </toolbar:toolbar>
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to