diff options
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/source/ui/dialog/wordcountdialog.cxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/inc/wordcountdialog.hxx | 2 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/wordcount-mobile.ui | 661 |
4 files changed, 676 insertions, 1 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 4167a4eee307..0faa1b16bc20 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -286,6 +286,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/warnemaildialog \ sw/uiconfig/swriter/ui/watermarkdialog \ sw/uiconfig/swriter/ui/wordcount \ + sw/uiconfig/swriter/ui/wordcount-mobile \ sw/uiconfig/swriter/ui/wrapdialog \ sw/uiconfig/swriter/ui/wrappage \ )) diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index 30148e8bb83b..6080bb6c166d 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -30,6 +30,11 @@ #include <svl/cjkoptions.hxx> #include <unotools/localedatawrapper.hxx> #include <vcl/settings.hxx> +#include <vcl/svapp.hxx> +#include <comphelper/lok.hxx> +#include <sfx2/lokhelper.hxx> + +#define IS_MOBILE (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() && SfxViewShell::Current()->isLOKMobilePhone()) SwWordCountFloatDlg::~SwWordCountFloatDlg() { @@ -84,6 +89,8 @@ void SwWordCountFloatDlg::showCJK(bool bShowCJK) { m_xCurrentCjkcharsFT->show(bShowCJK); m_xDocCjkcharsFT->show(bShowCJK); + if (m_xCjkcharsLabelFT2) + m_xCjkcharsLabelFT2->show(bShowCJK); m_xCjkcharsLabelFT->show(bShowCJK); } @@ -91,6 +98,8 @@ void SwWordCountFloatDlg::showStandardizedPages(bool bShowStandardizedPages) { m_xCurrentStandardizedPagesFT->show(bShowStandardizedPages); m_xDocStandardizedPagesFT->show(bShowStandardizedPages); + if (m_xStandardizedPagesLabelFT2) + m_xStandardizedPagesLabelFT2->show(bShowStandardizedPages); m_xStandardizedPagesLabelFT->show(bShowStandardizedPages); } @@ -98,7 +107,7 @@ SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* _pBindings, SfxChildWindow* pChild, weld::Window *pParent, SfxChildWinInfo const * pInfo) - : SfxModelessDialogController(_pBindings, pChild, pParent, "modules/swriter/ui/wordcount.ui", "WordCountDialog") + : SfxModelessDialogController(_pBindings, pChild, pParent, IS_MOBILE ? OUString("modules/swriter/ui/wordcount-mobile.ui") : OUString("modules/swriter/ui/wordcount.ui"), "WordCountDialog") , m_xCurrentWordFT(m_xBuilder->weld_label("selectwords")) , m_xCurrentCharacterFT(m_xBuilder->weld_label("selectchars")) , m_xCurrentCharacterExcludingSpacesFT(m_xBuilder->weld_label("selectcharsnospaces")) @@ -110,7 +119,9 @@ SwWordCountFloatDlg::SwWordCountFloatDlg(SfxBindings* _pBindings, , m_xDocCjkcharsFT(m_xBuilder->weld_label("doccjkchars")) , m_xDocStandardizedPagesFT(m_xBuilder->weld_label("docstandardizedpages")) , m_xCjkcharsLabelFT(m_xBuilder->weld_label("cjkcharsft")) + , m_xCjkcharsLabelFT2(m_xBuilder->weld_label("cjkcharsft2")) , m_xStandardizedPagesLabelFT(m_xBuilder->weld_label("standardizedpages")) + , m_xStandardizedPagesLabelFT2(m_xBuilder->weld_label("standardizedpages2")) { showCJK(SvtCJKOptions().IsAnyEnabled()); showStandardizedPages(officecfg::Office::Writer::WordCount::ShowStandardizedPageCount::get()); diff --git a/sw/source/uibase/inc/wordcountdialog.hxx b/sw/source/uibase/inc/wordcountdialog.hxx index 7e2730f7d0aa..b3afc1393268 100644 --- a/sw/source/uibase/inc/wordcountdialog.hxx +++ b/sw/source/uibase/inc/wordcountdialog.hxx @@ -42,7 +42,9 @@ class SwWordCountFloatDlg : public SfxModelessDialogController std::unique_ptr<weld::Label> m_xDocCjkcharsFT; std::unique_ptr<weld::Label> m_xDocStandardizedPagesFT; std::unique_ptr<weld::Label> m_xCjkcharsLabelFT; + std::unique_ptr<weld::Label> m_xCjkcharsLabelFT2; std::unique_ptr<weld::Label> m_xStandardizedPagesLabelFT; + std::unique_ptr<weld::Label> m_xStandardizedPagesLabelFT2; public: SwWordCountFloatDlg(SfxBindings* pBindings, diff --git a/sw/uiconfig/swriter/ui/wordcount-mobile.ui b/sw/uiconfig/swriter/ui/wordcount-mobile.ui new file mode 100644 index 000000000000..37129797d11d --- /dev/null +++ b/sw/uiconfig/swriter/ui/wordcount-mobile.ui @@ -0,0 +1,661 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.20.4 --> +<interface domain="sw"> + <requires lib="gtk+" version="3.18"/> + <object class="GtkDialog" id="WordCountDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes" context="wordcount-mobile|WordCountDialog">Word Count</property> + <property name="default_width">0</property> + <property name="default_height">0</property> + <property name="destroy_with_parent">True</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="close"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + <property name="secondary">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">6</property> + <property name="margin_right">6</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="label" translatable="yes" context="wordcount-mobile|label9">Selection</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="documentlabel-mobile"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="label" translatable="yes" context="wordcount-mobile|label10">Document</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">6</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="wordslabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="wordcount-mobile|label1">Words</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="inclspaceslabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="wordcount-mobile|label2">Characters including spaces</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="exclspaceslabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="wordcount-mobile|label3">Characters excluding spaces</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="cjkcharsft"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label" translatable="yes" context="wordcount-mobile|cjkcharsft">Asian characters and Korean syllables</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">4</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="standardizedpages"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label" translatable="yes" context="wordcount-mobile|standardizedpages">Standardized pages</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">5</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="standardizedpages2"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label" translatable="yes" context="wordcount-mobile|standardizedpages">Standardized pages</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">11</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="cjkcharsft2"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="label" translatable="yes" context="wordcount-mobile|cjkcharsft">Asian characters and Korean syllables</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">10</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="exclspaceslabel2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="wordcount-mobile|label3">Characters excluding spaces</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">9</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="wordslabel2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="wordcount-mobile|label1">Words</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">7</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="docstandardizedpages"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">11</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="doccjkchars"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">10</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="doccharsnospaces"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">9</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="docchars"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">8</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="docwords"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">7</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="selectstandardizedpages"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">5</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="selectcjkchars"> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">4</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="selectcharsnospaces"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">3</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="selectchars"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="selectwords"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="hexpand">True</property> + <property name="label"> 0</property> + <property name="justify">right</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkLabel" id="inclspaceslabel2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" context="wordcount-mobile|label2">Characters including spaces</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">8</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="-7">close</action-widget> + <action-widget response="-11">help</action-widget> + </action-widgets> + <child> + <placeholder/> + </child> + </object> + <object class="GtkSizeGroup" id="sizegroup1"> + <property name="ignore_hidden">True</property> + </object> +</interface> |