tdf#150466 notebookbar: hide PrintDefault on compact and standardize

As in the classic toolbars, do not promote direct printing
since it easily leads to mistakes and wasted paper.
Additionally, the printer settings is really never needed,
so it should not have a prominent place, especially on COMPACT.

At the same time, I standardized the File menu:
- always include print (especially useful for accessibility)
- always use the same order
- consistently provide access to print/web preview

Change-Id: I9ffbba179206274b5ed1788e496b7c5aa0503726
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157984
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui b/sc/uiconfig/scalc/ui/notebookbar.ui
index 54419a9..714ad44 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -505,9 +505,16 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
diff --git a/sc/uiconfig/scalc/ui/notebookbar_compact.ui b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
index 810d8e0..7c64e36 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
@@ -745,17 +745,17 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-Print">
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
    <child>
@@ -2865,7 +2865,7 @@
                            <property name="toolbar_style">both-horiz</property>
                            <child>
                              <object class="GtkToolButton" id="Files-PrintDefault">
                                <property name="visible">True</property>
                                <property name="visible">False</property>
                                <property name="action_name">.uno:PrintDefault</property>
                              </object>
                              <packing>
@@ -2904,7 +2904,7 @@
                            <property name="show_arrow">False</property>
                            <child>
                              <object class="GtkToolButton" id="PrinterSetup">
                                <property name="visible">True</property>
                                <property name="visible">False</property>
                                <property name="visible_horizontal">False</property>
                                <property name="action_name">.uno:PrinterSetup</property>
                                <property name="icon_name">sfx2/res/symphony/open_more.png</property>
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
index 8547ef8..364ac83 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui
@@ -730,9 +730,16 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
index e12beff..c605399 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
@@ -1308,9 +1308,16 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
diff --git a/sd/uiconfig/sdraw/ui/notebookbar.ui b/sd/uiconfig/sdraw/ui/notebookbar.ui
index 4f91cd5..eb3f977 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar.ui
@@ -561,9 +561,16 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
diff --git a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
index dc9ecbe..3aa52a0 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
@@ -597,19 +597,26 @@
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-WebHtml">
        <property name="visible">False</property>
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:WebHtml</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">False</property>
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrinterSetup">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
@@ -2752,6 +2759,28 @@
                            <property name="can_focus">True</property>
                            <property name="toolbar_style">both-horiz</property>
                            <child>
                              <object class="GtkToolButton" id="Files-WebHtml">
                                <property name="visible">True</property>
                                <property name="action_name">.uno:WebHtml</property>
                              </object>
                              <packing>
                                <property name="expand">False</property>
                                <property name="homogeneous">False</property>
                              </packing>
                            </child>
                          </object>
                          <packing>
                            <property name="expand">False</property>
                            <property name="fill">True</property>
                            <property name="position">1</property>
                          </packing>
                        </child>
                        <child>
                          <object class="sfxlo-NotebookbarToolBox" id="SectionBottom105b">
                            <property name="visible">True</property>
                            <property name="can_focus">True</property>
                            <property name="toolbar_style">both-horiz</property>
                            <child>
                              <object class="GtkToolButton" id="Files-Print">
                                <property name="visible">True</property>
                                <property name="action_name">.uno:Print</property>
@@ -2765,7 +2794,7 @@
                          <packing>
                            <property name="expand">False</property>
                            <property name="fill">True</property>
                            <property name="position">1</property>
                            <property name="position">2</property>
                          </packing>
                        </child>
                      </object>
@@ -2788,7 +2817,7 @@
                            <property name="toolbar_style">both-horiz</property>
                            <child>
                              <object class="GtkToolButton" id="Files-PrintDefault">
                                <property name="visible">True</property>
                                <property name="visible">False</property>
                                <property name="action_name">.uno:PrintDefault</property>
                              </object>
                              <packing>
@@ -2827,7 +2856,7 @@
                            <property name="show_arrow">False</property>
                            <child>
                              <object class="GtkToolButton" id="PrinterSetup">
                                <property name="visible">True</property>
                                <property name="visible">False</property>
                                <property name="visible_horizontal">False</property>
                                <property name="action_name">.uno:PrinterSetup</property>
                                <property name="icon_name">sfx2/res/symphony/open_more.png</property>
diff --git a/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui
index d306a82..b1f8e93 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar_groupedbar_compact.ui
@@ -798,6 +798,13 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-WebHtml">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:WebHtml</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="PrintD">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
@@ -806,7 +813,7 @@
    </child>
    <child>
      <object class="GtkMenuItem" id="PrintDefaultD">
        <property name="visible">True</property>
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
diff --git a/sd/uiconfig/simpress/ui/notebookbar.ui b/sd/uiconfig/simpress/ui/notebookbar.ui
index 47b3109..cff0d3c 100644
--- a/sd/uiconfig/simpress/ui/notebookbar.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar.ui
@@ -483,9 +483,16 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
diff --git a/sd/uiconfig/simpress/ui/notebookbar_compact.ui b/sd/uiconfig/simpress/ui/notebookbar_compact.ui
index 0d3a9cc..f7d6502 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_compact.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_compact.ui
@@ -596,19 +596,26 @@
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-WebHtml">
        <property name="visible">False</property>
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:WebHtml</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">False</property>
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrinterSetup">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
@@ -3095,7 +3102,7 @@
                            <property name="toolbar_style">both-horiz</property>
                            <child>
                              <object class="GtkToolButton" id="Files-PrintDefault">
                                <property name="visible">True</property>
                                <property name="visible">False</property>
                                <property name="action_name">.uno:PrintDefault</property>
                              </object>
                              <packing>
@@ -3134,7 +3141,7 @@
                            <property name="show_arrow">False</property>
                            <child>
                              <object class="GtkToolButton" id="PrinterSetup">
                                <property name="visible">True</property>
                                <property name="visible">False</property>
                                <property name="visible_horizontal">False</property>
                                <property name="action_name">.uno:PrinterSetup</property>
                                <property name="icon_name">sfx2/res/symphony/open_more.png</property>
diff --git a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui
index f2248d0..2075f82 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui
@@ -778,6 +778,13 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-WebHtml">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:WebHtml</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="PrintD">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
@@ -786,7 +793,7 @@
    </child>
    <child>
      <object class="GtkMenuItem" id="PrintDefaultD">
        <property name="visible">True</property>
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
diff --git a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
index 1c7cbb0..a39708e 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
@@ -842,9 +842,16 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="PrintDefaultD">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="PrintDefaultD">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui b/sw/uiconfig/swriter/ui/notebookbar.ui
index 4a65e01..bc79d1b 100644
--- a/sw/uiconfig/swriter/ui/notebookbar.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar.ui
@@ -259,6 +259,13 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrinterSetup">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
diff --git a/sw/uiconfig/swriter/ui/notebookbar_compact.ui b/sw/uiconfig/swriter/ui/notebookbar_compact.ui
index a183fa3..20a0270 100644
--- a/sw/uiconfig/swriter/ui/notebookbar_compact.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar_compact.ui
@@ -382,16 +382,17 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-Print">
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
    <child>
@@ -3036,7 +3037,7 @@
                            <property name="toolbar_style">both-horiz</property>
                            <child>
                              <object class="GtkToolButton" id="Files-PrintDefault">
                                <property name="visible">True</property>
                                <property name="visible">False</property>
                                <property name="action_name">.uno:PrintDefault</property>
                              </object>
                              <packing>
@@ -3075,7 +3076,7 @@
                            <property name="show_arrow">False</property>
                            <child>
                              <object class="GtkToolButton" id="PrinterSetup">
                                <property name="visible">True</property>
                                <property name="visible">False</property>
                                <property name="visible_horizontal">False</property>
                                <property name="action_name">.uno:PrinterSetup</property>
                                <property name="icon_name">sfx2/res/symphony/open_more.png</property>
diff --git a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui
index a1fdf88..7b3d9a2 100644
--- a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_compact.ui
@@ -1048,9 +1048,16 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>
diff --git a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui
index 409e4b5..430b016 100644
--- a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui
@@ -1038,9 +1038,16 @@
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
      <object class="GtkMenuItem" id="MenuFile-Print">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:Print</property>
      </object>
    </child>
    <child>
      <object class="GtkMenuItem" id="MenuFile-PrintDefault">
        <property name="visible">False</property>
        <property name="can_focus">False</property>
        <property name="action_name">.uno:PrintDefault</property>
      </object>
    </child>