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

Gulsah Kose gulsah.1004 at gmail.com
Thu May 24 07:25:23 UTC 2018


 sw/source/uibase/docvw/HeaderFooterWin.cxx |    5 +++++
 sw/uiconfig/swriter/ui/headerfootermenu.ui |    8 ++++++++
 2 files changed, 13 insertions(+)

New commits:
commit 2a93d2a4af7bb72b155f91e18239cc1b5bc90a4e
Author: Gulsah Kose <gulsah.1004 at gmail.com>
Date:   Wed May 23 09:53:10 2018 +0300

    [Pardus] tdf#92685 Add insert page count option to header menu
    
    This patch is sponsored by ULAKBIM/Pardus project.
    
    Change-Id: I5ecca4f58ec0ecf6a639153b52a4424af1966820
    Signed-off-by: Gulsah Kose <gulsah.1004 at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/54687
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index e8fe4b84bfe3..e1c157ee3afe 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -466,6 +466,11 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& rIdent)
         SfxViewFrame* pVFrame = rSh.GetView().GetViewFrame();
         pVFrame->GetBindings().Execute(FN_INSERT_FLD_PGNUMBER);
     }
+    else if (rIdent == "insert_pagecount")
+    {
+        SfxViewFrame* pVFrame = rSh.GetView().GetViewFrame();
+        pVFrame->GetBindings().Execute(FN_INSERT_FLD_PGCOUNT);
+    }
 }
 
 void SwHeaderFooterWin::SetReadonly( bool bReadonly )
diff --git a/sw/uiconfig/swriter/ui/headerfootermenu.ui b/sw/uiconfig/swriter/ui/headerfootermenu.ui
index 6167ff654469..03edd05c8271 100644
--- a/sw/uiconfig/swriter/ui/headerfootermenu.ui
+++ b/sw/uiconfig/swriter/ui/headerfootermenu.ui
@@ -35,5 +35,13 @@
         <property name="use_underline">True</property>
       </object>
     </child>
+    <child>
+      <object class="GtkMenuItem" id="insert_pagecount">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes" context="headerfootermenu|insert_pagecount">Insert Page Count</property>
+        <property name="use_underline">True</property>
+      </object>
+    </child>
   </object>
 </interface>


More information about the Libreoffice-commits mailing list