desktop/source/lib/init.cxx | 35 + include/vcl/svapp.hxx | 2 include/vcl/weld.hxx | 2 sfx2/source/control/unoctitm.cxx | 27 + sfx2/source/dialog/basedlgs.cxx | 6 sw/UIConfig_swriter.mk | 1 sw/source/ui/dialog/wordcountdialog.cxx | 12 sw/source/uibase/inc/wordcountdialog.hxx | 2 sw/uiconfig/swriter/ui/wordcount-mobile.ui | 661 +++++++++++++++++++++++++++++ vcl/Library_vcl.mk | 1 vcl/inc/jsdialog/jsdialogbuilder.hxx | 100 ++++ vcl/inc/salvtables.hxx | 7 vcl/jsdialog/jsdialogbuilder.cxx | 155 ++++++ vcl/source/app/salvtables.cxx | 2 vcl/source/app/weldutils.cxx | 4 vcl/source/window/builder.cxx | 19 vcl/source/window/dialog.cxx | 2 vcl/source/window/layout.cxx | 2 18 files changed, 1024 insertions(+), 16 deletions(-)
New commits: commit 411fe777a8d3439cac2bc9c4f45162630e7a3cdc Author: Szymon Kłos <[email protected]> AuthorDate: Fri May 8 09:25:13 2020 +0200 Commit: Szymon Kłos <[email protected]> CommitDate: Thu May 14 16:54:07 2020 +0200 notebookbar: send uno items state update Change-Id: I56b9c64f11631bd28520b9294aef7d6db8da5733 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93700 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d01f9cb8251d..6a95b2656409 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2644,7 +2644,40 @@ static void doc_iniUnoCommands () OUString(".uno:OnlineAutoFormat"), OUString(".uno:InsertSymbol"), OUString(".uno:EditRegion"), - OUString(".uno:ThesaurusDialog") + OUString(".uno:ThesaurusDialog"), + OUString(".uno:Orientation"), + OUString(".uno:ObjectAlignLeft"), + OUString(".uno:ObjectAlignRight"), + OUString(".uno:AlignCenter"), + OUString(".uno:TransformPosX"), + OUString(".uno:TransformPosY"), + OUString(".uno:TransformWidth"), + OUString(".uno:TransformHeight"), + OUString(".uno:ObjectBackOne"), + OUString(".uno:SendToBack"), + OUString(".uno:ObjectForwardOne"), + OUString(".uno:BringToFront"), + OUString(".uno:WrapRight"), + OUString(".uno:WrapThrough"), + OUString(".uno:WrapLeft"), + OUString(".uno:WrapIdeal"), + OUString(".uno:WrapOn"), + OUString(".uno:WrapOff"), + OUString(".uno:UpdateCurIndex"), + OUString(".uno:InsertCaptionDialog"), + OUString(".uno:FormatGroup"), + OUString(".uno:SplitTable"), + OUString(".uno:MergeCells"), + OUString(".uno:DeleteNote"), + OUString(".uno:AcceptChanges"), + OUString(".uno:FormatPaintbrush"), + OUString(".uno:SetDefault"), + OUString(".uno:ParaLeftToRight"), + OUString(".uno:ParaRightToLeft"), + OUString(".uno:ParaspaceIncrease"), + OUString(".uno:ParaspaceDecrease"), + OUString(".uno:AcceptTrackedChange"), + OUString(".uno:RejectTrackedChange") }; util::URL aCommandURL; diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 6a217b14f880..ee44b0bc7639 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1081,6 +1081,33 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c aEvent.FeatureURL.Path == "SortDescending" || aEvent.FeatureURL.Path == "AcceptAllTrackedChanges" || aEvent.FeatureURL.Path == "RejectAllTrackedChanges" || + aEvent.FeatureURL.Path == "AcceptTrackedChange" || + aEvent.FeatureURL.Path == "RejectTrackedChange" || + aEvent.FeatureURL.Path == "NextTrackedChange" || + aEvent.FeatureURL.Path == "PreviousTrackedChange" || + aEvent.FeatureURL.Path == "FormatGroup" || + aEvent.FeatureURL.Path == "ObjectBackOne" || + aEvent.FeatureURL.Path == "SendToBack" || + aEvent.FeatureURL.Path == "ObjectForwardOne" || + aEvent.FeatureURL.Path == "BringToFront" || + aEvent.FeatureURL.Path == "WrapRight" || + aEvent.FeatureURL.Path == "WrapThrough" || + aEvent.FeatureURL.Path == "WrapLeft" || + aEvent.FeatureURL.Path == "WrapIdeal" || + aEvent.FeatureURL.Path == "WrapOn" || + aEvent.FeatureURL.Path == "WrapOff" || + aEvent.FeatureURL.Path == "UpdateCurIndex" || + aEvent.FeatureURL.Path == "InsertCaptionDialog" || + aEvent.FeatureURL.Path == "MergeCells" || + aEvent.FeatureURL.Path == "SplitTable" || + aEvent.FeatureURL.Path == "DeleteNote" || + aEvent.FeatureURL.Path == "AcceptChanges" || + aEvent.FeatureURL.Path == "FormatPaintbrush" || + aEvent.FeatureURL.Path == "SetDefault" || + aEvent.FeatureURL.Path == "ParaLeftToRight" || + aEvent.FeatureURL.Path == "ParaRightToLeft" || + aEvent.FeatureURL.Path == "ParaspaceIncrease" || + aEvent.FeatureURL.Path == "ParaspaceDecrease" || aEvent.FeatureURL.Path == "TableDialog" || aEvent.FeatureURL.Path == "FormatCellDialog" || aEvent.FeatureURL.Path == "FontDialog" || commit 8ed0df48bbaf97982920a034c5f0b5b30306114a Author: Szymon Kłos <[email protected]> AuthorDate: Fri Feb 28 13:47:22 2020 +0100 Commit: Szymon Kłos <[email protected]> CommitDate: Thu May 14 16:53:17 2020 +0200 jsdialog: Common weld::Widget implementation Change-Id: Iab21652c6abaf143fb421d6030f6acc394733bcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94073 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index a82732d05f5a..98126bfcc12f 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -36,7 +36,31 @@ public: bool bTakeOwnership = false) override; }; -class VCL_DLLPUBLIC JSLabel : public SalInstanceLabel, public JSDialogSender +template <class BaseInstanceClass, class VclClass> +class JSWidget : public BaseInstanceClass, public JSDialogSender +{ +public: + JSWidget(VclPtr<vcl::Window> aOwnedToplevel, VclClass* pObject, SalInstanceBuilder* pBuilder, + bool bTakeOwnership) + : BaseInstanceClass(pObject, pBuilder, bTakeOwnership) + , JSDialogSender(aOwnedToplevel) + { + } + + virtual void show() override + { + BaseInstanceClass::show(); + notifyDialogState(); + } + + virtual void hide() override + { + BaseInstanceClass::hide(); + notifyDialogState(); + } +}; + +class VCL_DLLPUBLIC JSLabel : public JSWidget<SalInstanceLabel, FixedText> { public: JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel, SalInstanceBuilder* pBuilder, @@ -44,7 +68,7 @@ public: virtual void set_label(const OUString& rText) override; }; -class VCL_DLLPUBLIC JSEntry : public SalInstanceEntry, public JSDialogSender +class VCL_DLLPUBLIC JSEntry : public JSWidget<SalInstanceEntry, ::Edit> { public: JSEntry(VclPtr<vcl::Window> aOwnedToplevel, ::Edit* pEntry, SalInstanceBuilder* pBuilder, @@ -52,7 +76,7 @@ public: virtual void set_text(const OUString& rText) override; }; -class VCL_DLLPUBLIC JSListBox : public SalInstanceComboBoxWithoutEdit, public JSDialogSender +class VCL_DLLPUBLIC JSListBox : public JSWidget<SalInstanceComboBoxWithoutEdit, ::ListBox> { public: JSListBox(VclPtr<vcl::Window> aOwnedToplevel, ::ListBox* pListBox, SalInstanceBuilder* pBuilder, @@ -62,7 +86,7 @@ public: virtual void remove(int pos) override; }; -class VCL_DLLPUBLIC JSComboBox : public SalInstanceComboBoxWithEdit, public JSDialogSender +class VCL_DLLPUBLIC JSComboBox : public JSWidget<SalInstanceComboBoxWithEdit, ::ComboBox> { public: JSComboBox(VclPtr<vcl::Window> aOwnedToplevel, ::ComboBox* pComboBox, diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 62fd9e16b24a..52fa6a19a8e1 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -86,8 +86,7 @@ std::unique_ptr<weld::ComboBox> JSInstanceBuilder::weld_combo_box(const OString& JSLabel::JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel, SalInstanceBuilder* pBuilder, bool bTakeOwnership) - : SalInstanceLabel(pLabel, pBuilder, bTakeOwnership) - , JSDialogSender(aOwnedToplevel) + : JSWidget<SalInstanceLabel, FixedText>(aOwnedToplevel, pLabel, pBuilder, bTakeOwnership) { } @@ -99,8 +98,7 @@ void JSLabel::set_label(const OUString& rText) JSEntry::JSEntry(VclPtr<vcl::Window> aOwnedToplevel, ::Edit* pEntry, SalInstanceBuilder* pBuilder, bool bTakeOwnership) - : SalInstanceEntry(pEntry, pBuilder, bTakeOwnership) - , JSDialogSender(aOwnedToplevel) + : JSWidget<SalInstanceEntry, ::Edit>(aOwnedToplevel, pEntry, pBuilder, bTakeOwnership) { } @@ -112,8 +110,8 @@ void JSEntry::set_text(const OUString& rText) JSListBox::JSListBox(VclPtr<vcl::Window> aOwnedToplevel, ::ListBox* pListBox, SalInstanceBuilder* pBuilder, bool bTakeOwnership) - : SalInstanceComboBoxWithoutEdit(pListBox, pBuilder, bTakeOwnership) - , JSDialogSender(aOwnedToplevel) + : JSWidget<SalInstanceComboBoxWithoutEdit, ::ListBox>(aOwnedToplevel, pListBox, pBuilder, + bTakeOwnership) { } @@ -132,8 +130,8 @@ void JSListBox::remove(int pos) JSComboBox::JSComboBox(VclPtr<vcl::Window> aOwnedToplevel, ::ComboBox* pComboBox, SalInstanceBuilder* pBuilder, bool bTakeOwnership) - : SalInstanceComboBoxWithEdit(pComboBox, pBuilder, bTakeOwnership) - , JSDialogSender(aOwnedToplevel) + : JSWidget<SalInstanceComboBoxWithEdit, ::ComboBox>(aOwnedToplevel, pComboBox, pBuilder, + bTakeOwnership) { } commit d8730e2303e8533212a58dad60eaa15d6f711f31 Author: Szymon Kłos <[email protected]> AuthorDate: Tue Feb 25 13:03:34 2020 +0100 Commit: Szymon Kłos <[email protected]> CommitDate: Thu May 14 16:52:34 2020 +0200 jsdialog: weld::ComboBox Change-Id: I672d2fd170e94e0b3e05384461983e5ae4a0ab35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94072 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 956c3001fc22..a82732d05f5a 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -7,6 +7,7 @@ #include <vcl/virdev.hxx> #include <vcl/builder.hxx> #include <salvtables.hxx> +#include <vcl/combobox.hxx> class JSDialogSender { @@ -31,6 +32,8 @@ public: bool bTakeOwnership = false) override; virtual std::unique_ptr<weld::Entry> weld_entry(const OString& id, bool bTakeOwnership = false) override; + virtual std::unique_ptr<weld::ComboBox> weld_combo_box(const OString& id, + bool bTakeOwnership = false) override; }; class VCL_DLLPUBLIC JSLabel : public SalInstanceLabel, public JSDialogSender @@ -49,4 +52,25 @@ public: virtual void set_text(const OUString& rText) override; }; +class VCL_DLLPUBLIC JSListBox : public SalInstanceComboBoxWithoutEdit, public JSDialogSender +{ +public: + JSListBox(VclPtr<vcl::Window> aOwnedToplevel, ::ListBox* pListBox, SalInstanceBuilder* pBuilder, + bool bTakeOwnership); + virtual void insert(int pos, const OUString& rStr, const OUString* pId, + const OUString* pIconName, VirtualDevice* pImageSurface) override; + virtual void remove(int pos) override; +}; + +class VCL_DLLPUBLIC JSComboBox : public SalInstanceComboBoxWithEdit, public JSDialogSender +{ +public: + JSComboBox(VclPtr<vcl::Window> aOwnedToplevel, ::ComboBox* pComboBox, + SalInstanceBuilder* pBuilder, bool bTakeOwnership); + virtual void insert(int pos, const OUString& rStr, const OUString* pId, + const OUString* pIconName, VirtualDevice* pImageSurface) override; + virtual void remove(int pos) override; + virtual void set_entry_text(const OUString& rText) override; +}; + #endif \ No newline at end of file diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index ca8b5f0a110b..b308f5f8bc8c 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -617,7 +617,7 @@ class SalInstanceComboBox : public SalInstanceContainer, public virtual weld::Co { protected: // owner for ListBox/ComboBox UserData - std::vector<std::unique_ptr<OUString>> m_aUserData; + std::vector<std::shared_ptr<OUString>> m_aUserData; VclPtr<vcl_type> m_xComboBox; public: diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index fc1c7a0159e9..62fd9e16b24a 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -72,6 +72,18 @@ std::unique_ptr<weld::Entry> JSInstanceBuilder::weld_entry(const OString& id, bo : nullptr; } +std::unique_ptr<weld::ComboBox> JSInstanceBuilder::weld_combo_box(const OString& id, + bool bTakeOwnership) +{ + vcl::Window* pWidget = m_xBuilder->get<vcl::Window>(id); + ::ComboBox* pComboBox = dynamic_cast<::ComboBox*>(pWidget); + if (pComboBox) + return std::make_unique<JSComboBox>(m_aOwnedToplevel, pComboBox, this, bTakeOwnership); + ListBox* pListBox = dynamic_cast<ListBox*>(pWidget); + return pListBox ? std::make_unique<JSListBox>(m_aOwnedToplevel, pListBox, this, bTakeOwnership) + : nullptr; +} + JSLabel::JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel, SalInstanceBuilder* pBuilder, bool bTakeOwnership) : SalInstanceLabel(pLabel, pBuilder, bTakeOwnership) @@ -97,3 +109,49 @@ void JSEntry::set_text(const OUString& rText) SalInstanceEntry::set_text(rText); notifyDialogState(); } + +JSListBox::JSListBox(VclPtr<vcl::Window> aOwnedToplevel, ::ListBox* pListBox, + SalInstanceBuilder* pBuilder, bool bTakeOwnership) + : SalInstanceComboBoxWithoutEdit(pListBox, pBuilder, bTakeOwnership) + , JSDialogSender(aOwnedToplevel) +{ +} + +void JSListBox::insert(int pos, const OUString& rStr, const OUString* pId, + const OUString* pIconName, VirtualDevice* pImageSurface) +{ + SalInstanceComboBoxWithoutEdit::insert(pos, rStr, pId, pIconName, pImageSurface); + notifyDialogState(); +} + +void JSListBox::remove(int pos) +{ + SalInstanceComboBoxWithoutEdit::remove(pos); + notifyDialogState(); +} + +JSComboBox::JSComboBox(VclPtr<vcl::Window> aOwnedToplevel, ::ComboBox* pComboBox, + SalInstanceBuilder* pBuilder, bool bTakeOwnership) + : SalInstanceComboBoxWithEdit(pComboBox, pBuilder, bTakeOwnership) + , JSDialogSender(aOwnedToplevel) +{ +} + +void JSComboBox::insert(int pos, const OUString& rStr, const OUString* pId, + const OUString* pIconName, VirtualDevice* pImageSurface) +{ + SalInstanceComboBoxWithEdit::insert(pos, rStr, pId, pIconName, pImageSurface); + notifyDialogState(); +} + +void JSComboBox::remove(int pos) +{ + SalInstanceComboBoxWithEdit::remove(pos); + notifyDialogState(); +} + +void JSComboBox::set_entry_text(const OUString& rText) +{ + SalInstanceComboBoxWithEdit::set_entry_text(rText); + notifyDialogState(); +} commit 6a947fe26a651384974052c3c0acb2d88f123d18 Author: Szymon Kłos <[email protected]> AuthorDate: Mon Feb 24 18:35:18 2020 +0100 Commit: Szymon Kłos <[email protected]> CommitDate: Thu May 14 16:38:47 2020 +0200 Resend jsdialog on entry change Change-Id: Ic255b8ba56f5b355a95ddc9a9587e1747b66702a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94071 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 9d8c68516320..956c3001fc22 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -8,6 +8,19 @@ #include <vcl/builder.hxx> #include <salvtables.hxx> +class JSDialogSender +{ + VclPtr<vcl::Window> m_aOwnedToplevel; + +public: + JSDialogSender(VclPtr<vcl::Window> aOwnedToplevel) + : m_aOwnedToplevel(aOwnedToplevel) + { + } + + void notifyDialogState(); +}; + class VCL_DLLPUBLIC JSInstanceBuilder : public SalInstanceBuilder { public: @@ -16,16 +29,24 @@ public: bool bTakeOwnership = true) override; virtual std::unique_ptr<weld::Label> weld_label(const OString& id, bool bTakeOwnership = false) override; + virtual std::unique_ptr<weld::Entry> weld_entry(const OString& id, + bool bTakeOwnership = false) override; }; -class VCL_DLLPUBLIC JSLabel : public SalInstanceLabel +class VCL_DLLPUBLIC JSLabel : public SalInstanceLabel, public JSDialogSender { - VclPtr<vcl::Window> m_aOwnedToplevel; - public: JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel, SalInstanceBuilder* pBuilder, bool bTakeOwnership); virtual void set_label(const OUString& rText) override; }; +class VCL_DLLPUBLIC JSEntry : public SalInstanceEntry, public JSDialogSender +{ +public: + JSEntry(VclPtr<vcl::Window> aOwnedToplevel, ::Edit* pEntry, SalInstanceBuilder* pBuilder, + bool bTakeOwnership); + virtual void set_text(const OUString& rText) override; +}; + #endif \ No newline at end of file diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 8807c3a35907..fc1c7a0159e9 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -7,6 +7,23 @@ using namespace weld; +void JSDialogSender::notifyDialogState() +{ + if (!m_aOwnedToplevel) + return; + + const vcl::ILibreOfficeKitNotifier* pNotifier = m_aOwnedToplevel->GetLOKNotifier(); + if (pNotifier) + { + std::stringstream aStream; + boost::property_tree::ptree aTree = m_aOwnedToplevel->DumpAsPropertyTree(); + aTree.put("id", m_aOwnedToplevel->GetLOKWindowId()); + boost::property_tree::write_json(aStream, aTree); + const std::string message = aStream.str(); + pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message.c_str()); + } +} + JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile) : SalInstanceBuilder(dynamic_cast<SalInstanceWidget*>(pParent) @@ -48,25 +65,35 @@ std::unique_ptr<weld::Label> JSInstanceBuilder::weld_label(const OString& id, bo return std::make_unique<JSLabel>(m_aOwnedToplevel, pLabel, this, bTakeOwnership); } +std::unique_ptr<weld::Entry> JSInstanceBuilder::weld_entry(const OString& id, bool bTakeOwnership) +{ + Edit* pEntry = m_xBuilder->get<Edit>(id); + return pEntry ? std::make_unique<JSEntry>(m_aOwnedToplevel, pEntry, this, bTakeOwnership) + : nullptr; +} + JSLabel::JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel, SalInstanceBuilder* pBuilder, bool bTakeOwnership) : SalInstanceLabel(pLabel, pBuilder, bTakeOwnership) - , m_aOwnedToplevel(aOwnedToplevel) + , JSDialogSender(aOwnedToplevel) { } void JSLabel::set_label(const OUString& rText) { SalInstanceLabel::set_label(rText); - - const vcl::ILibreOfficeKitNotifier* pNotifier = m_aOwnedToplevel->GetLOKNotifier(); - if (pNotifier) - { - std::stringstream aStream; - boost::property_tree::ptree aTree = m_aOwnedToplevel->DumpAsPropertyTree(); - aTree.put("id", m_aOwnedToplevel->GetLOKWindowId()); - boost::property_tree::write_json(aStream, aTree); - const std::string message = aStream.str(); - pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message.c_str()); - } + notifyDialogState(); }; + +JSEntry::JSEntry(VclPtr<vcl::Window> aOwnedToplevel, ::Edit* pEntry, SalInstanceBuilder* pBuilder, + bool bTakeOwnership) + : SalInstanceEntry(pEntry, pBuilder, bTakeOwnership) + , JSDialogSender(aOwnedToplevel) +{ +} + +void JSEntry::set_text(const OUString& rText) +{ + SalInstanceEntry::set_text(rText); + notifyDialogState(); +} commit 43aa6897526fbc44e13d3295e97dfebbc8430e23 Author: Szymon Kłos <[email protected]> AuthorDate: Wed Mar 18 09:57:09 2020 +0100 Commit: Szymon Kłos <[email protected]> CommitDate: Thu May 14 16:36:06 2020 +0200 Move messagedialog header to shared include Change-Id: Ice8d01d2bb62667667a4c5f0366120cdb7600472 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94040 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/vcl/inc/messagedialog.hxx b/include/vcl/messagedialog.hxx similarity index 100% rename from vcl/inc/messagedialog.hxx rename to include/vcl/messagedialog.hxx diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 1d22eae9f115..ca8b5f0a110b 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -13,7 +13,7 @@ #include <vcl/lstbox.hxx> #include <vcl/tabctrl.hxx> #include <vcl/layout.hxx> -#include <messagedialog.hxx> +#include <vcl/messagedialog.hxx> class SalInstanceBuilder : public weld::Builder { diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 2711b40f1a67..46eaacfce0e3 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -34,7 +34,7 @@ #include <strings.hrc> #include <svdata.hxx> #include <svimpbox.hxx> -#include <messagedialog.hxx> +#include <vcl/messagedialog.hxx> #include <treeglue.hxx> #include <unotools/accessiblerelationsethelper.hxx> #include <unotools/configmgr.hxx> diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index bed4f6367993..0765c7e19292 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -53,7 +53,7 @@ #include <iconview.hxx> #include <svdata.hxx> #include <bitmaps.hlst> -#include <messagedialog.hxx> +#include <vcl/messagedialog.hxx> #include <window.h> #include <xmlreader/xmlreader.hxx> #include <desktop/crashreport.hxx> diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 393ab24d4f90..4fd582d1eaf8 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -56,7 +56,7 @@ #include <vcl/uitest/uiobject.hxx> #include <vcl/uitest/logger.hxx> #include <vcl/IDialogRenderable.hxx> -#include <messagedialog.hxx> +#include <vcl/messagedialog.hxx> #include <salframe.hxx> #include <iostream> diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 9c5a36304a21..b6c1b6ee65eb 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -16,7 +16,7 @@ #include <vcl/stdtext.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> -#include <messagedialog.hxx> +#include <vcl/messagedialog.hxx> #include <window.h> #include <boost/multi_array.hpp> #include <boost/property_tree/ptree.hpp> commit 88aa042cdbbb3071f7ba9f0ff558c6ce85e4b10d Author: Szymon Kłos <[email protected]> AuthorDate: Tue Feb 18 15:41:56 2020 +0100 Commit: Szymon Kłos <[email protected]> CommitDate: Thu May 14 16:34:37 2020 +0200 Create weld::Builder implementation for JSDialog and use for WordCountDialog on mobile Change-Id: I12c3455ff9b16c30918067f9282b72f49141a308 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94041 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 95e46500a899..7392ef3be86f 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -1340,7 +1340,7 @@ public: // For vclbootstrapprotector: static void setDeInitHook(Link<LinkParamNone*,void> const & hook); - static weld::Builder* CreateBuilder(weld::Widget* pParent, const OUString &rUIFile); + static weld::Builder* CreateBuilder(weld::Widget* pParent, const OUString &rUIFile, bool bMobile = false); static weld::Builder* CreateInterimBuilder(vcl::Window* pParent, const OUString &rUIFile); //for the duration of same SfxTabPages in mixed parent types static weld::Builder* CreateInterimBuilder(weld::Widget* pParent, const OUString &rUIFile); //for the duration of same SfxTabPages in mixed parent types diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 940b2b0fb7c5..6e719fd23239 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -2075,7 +2075,7 @@ protected: public: GenericDialogController(weld::Widget* pParent, const OUString& rUIFile, - const OString& rDialogId); + const OString& rDialogId, bool bMobile = false); virtual Dialog* getDialog() override; virtual ~GenericDialogController() COVERITY_NOEXCEPT_FALSE override; }; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 905d27fd3a3e..3008399895ac 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -39,6 +39,8 @@ #include <sfx2/viewsh.hxx> #include <sfx2/sfxhelp.hxx> #include <workwin.hxx> +#include <sfx2/lokhelper.hxx> +#include <comphelper/lok.hxx> using namespace ::com::sun::star::uno; @@ -409,7 +411,9 @@ void SfxFloatingWindow::FillInfo(SfxChildWinInfo& rInfo) const SfxDialogController::SfxDialogController(weld::Widget* pParent, const OUString& rUIFile, const OString& rDialogId) - : GenericDialogController(pParent, rUIFile, rDialogId) + : GenericDialogController(pParent, rUIFile, rDialogId, + comphelper::LibreOfficeKit::isActive() + && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) { m_xDialog->SetInstallLOKNotifierHdl(LINK(this, SfxDialogController, InstallLOKNotifierHdl)); m_xDialog->connect_toplevel_focus_changed(LINK(this, SfxDialogController, FocusChangeHdl)); diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 6635c3fcdc43..73c74636c482 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -464,6 +464,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/backendtest/outputdevice/polyline \ vcl/backendtest/outputdevice/polyline_b2d \ vcl/backendtest/outputdevice/rectangle \ + vcl/jsdialog/jsdialogbuilder \ )) $(eval $(call gb_Library_add_cobjects,vcl,\ diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx new file mode 100644 index 000000000000..9d8c68516320 --- /dev/null +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -0,0 +1,31 @@ +#ifndef INCLUDED_VCL_INC_JSDIALOG_JSDIALOG_HXX +#define INCLUDED_VCL_INC_JSDIALOG_JSDIALOG_HXX + +#include <vcl/weld.hxx> +#include <comphelper/string.hxx> +#include <vcl/sysdata.hxx> +#include <vcl/virdev.hxx> +#include <vcl/builder.hxx> +#include <salvtables.hxx> + +class VCL_DLLPUBLIC JSInstanceBuilder : public SalInstanceBuilder +{ +public: + JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile); + virtual std::unique_ptr<weld::Dialog> weld_dialog(const OString& id, + bool bTakeOwnership = true) override; + virtual std::unique_ptr<weld::Label> weld_label(const OString& id, + bool bTakeOwnership = false) override; +}; + +class VCL_DLLPUBLIC JSLabel : public SalInstanceLabel +{ + VclPtr<vcl::Window> m_aOwnedToplevel; + +public: + JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel, SalInstanceBuilder* pBuilder, + bool bTakeOwnership); + virtual void set_label(const OUString& rText) override; +}; + +#endif \ No newline at end of file diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 4a8d70bcf16a..1d22eae9f115 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -17,7 +17,7 @@ class SalInstanceBuilder : public weld::Builder { -private: +protected: std::unique_ptr<VclBuilder> m_xBuilder; VclPtr<vcl::Window> m_aOwnedToplevel; @@ -930,6 +930,7 @@ private: VclPtr<CheckBox> m_xCheckButton; DECL_LINK(ToggleHdl, CheckBox&, void); + public: SalInstanceCheckButton(CheckBox* pButton, SalInstanceBuilder* pBuilder, bool bTakeOwnership); diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx new file mode 100644 index 000000000000..8807c3a35907 --- /dev/null +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -0,0 +1,72 @@ +#include <jsdialog/jsdialogbuilder.hxx> +#include <sal/log.hxx> +#include <boost/property_tree/json_parser.hpp> +#include <comphelper/lok.hxx> +#include <vcl/dialog.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> + +using namespace weld; + +JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, + const OUString& rUIFile) + : SalInstanceBuilder(dynamic_cast<SalInstanceWidget*>(pParent) + ? dynamic_cast<SalInstanceWidget*>(pParent)->getWidget() + : nullptr, + rUIRoot, rUIFile) +{ +} + +std::unique_ptr<weld::Dialog> JSInstanceBuilder::weld_dialog(const OString& id, bool bTakeOwnership) +{ + ::Dialog* pDialog = m_xBuilder->get<::Dialog>(id); + std::unique_ptr<weld::Dialog> pRet(pDialog ? new SalInstanceDialog(pDialog, this, false) + : nullptr); + if (bTakeOwnership && pDialog) + { + assert(!m_aOwnedToplevel && "only one toplevel per .ui allowed"); + m_aOwnedToplevel.set(pDialog); + m_xBuilder->drop_ownership(pDialog); + } + + const vcl::ILibreOfficeKitNotifier* pNotifier = pDialog->GetLOKNotifier(); + if (pNotifier) + { + std::stringstream aStream; + boost::property_tree::ptree aTree = m_aOwnedToplevel->DumpAsPropertyTree(); + aTree.put("id", m_aOwnedToplevel->GetLOKWindowId()); + boost::property_tree::write_json(aStream, aTree); + const std::string message = aStream.str(); + pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message.c_str()); + } + + return pRet; +} + +std::unique_ptr<weld::Label> JSInstanceBuilder::weld_label(const OString& id, bool bTakeOwnership) +{ + ::FixedText* pLabel = m_xBuilder->get<FixedText>(id); + return std::make_unique<JSLabel>(m_aOwnedToplevel, pLabel, this, bTakeOwnership); +} + +JSLabel::JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel, + SalInstanceBuilder* pBuilder, bool bTakeOwnership) + : SalInstanceLabel(pLabel, pBuilder, bTakeOwnership) + , m_aOwnedToplevel(aOwnedToplevel) +{ +} + +void JSLabel::set_label(const OUString& rText) +{ + SalInstanceLabel::set_label(rText); + + const vcl::ILibreOfficeKitNotifier* pNotifier = m_aOwnedToplevel->GetLOKNotifier(); + if (pNotifier) + { + std::stringstream aStream; + boost::property_tree::ptree aTree = m_aOwnedToplevel->DumpAsPropertyTree(); + aTree.put("id", m_aOwnedToplevel->GetLOKWindowId()); + boost::property_tree::write_json(aStream, aTree); + const std::string message = aStream.str(); + pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message.c_str()); + } +}; diff --git a/vcl/source/app/weldutils.cxx b/vcl/source/app/weldutils.cxx index 8fc3a16459cf..32251e5400f4 100644 --- a/vcl/source/app/weldutils.cxx +++ b/vcl/source/app/weldutils.cxx @@ -40,8 +40,8 @@ DialogController::~DialogController() COVERITY_NOEXCEPT_FALSE {} Dialog* GenericDialogController::getDialog() { return m_xDialog.get(); } GenericDialogController::GenericDialogController(weld::Widget* pParent, const OUString& rUIFile, - const OString& rDialogId) - : m_xBuilder(Application::CreateBuilder(pParent, rUIFile)) + const OString& rDialogId, bool bIsMobile) + : m_xBuilder(Application::CreateBuilder(pParent, rUIFile, bIsMobile)) , m_xDialog(m_xBuilder->weld_dialog(rDialogId)) { } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 91bf9857b102..bed4f6367993 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -64,6 +64,8 @@ #include <tools/diagnose_ex.h> #include <wizdlg.hxx> #include <tools/svlibrary.h> +#include <comphelper/lok.hxx> +#include <jsdialog/jsdialogbuilder.hxx> #ifdef DISABLE_DYNLOADING #include <dlfcn.h> @@ -147,9 +149,20 @@ namespace } #endif -weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString &rUIFile) +weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString &rUIFile, bool bMobile) { - return ImplGetSVData()->mpDefInst->CreateBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile); + bool bUseJSBuilder = false; + + if (bMobile) + { + if (rUIFile == "modules/swriter/ui/wordcount-mobile.ui") + bUseJSBuilder = true; + } + + if (bUseJSBuilder) + return new JSInstanceBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile); + else + return ImplGetSVData()->mpDefInst->CreateBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile); } weld::Builder* Application::CreateInterimBuilder(vcl::Window* pParent, const OUString &rUIFile) commit 8b0726e20682d5c26978bacb747bd043ab60f622 Author: Szymon Kłos <[email protected]> AuthorDate: Mon Feb 24 19:10:52 2020 +0100 Commit: Szymon Kłos <[email protected]> CommitDate: Thu May 14 15:37:58 2020 +0200 Add mobile version of WordCountDialog Change-Id: Icf8d8b0993d8d307925a28cae4a178c0c4bde48a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94042 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 65de527c3b89..ca9821c4c3f5 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -290,6 +290,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 4d7f3b6e1d9d..110f588d2cc3 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -31,6 +31,10 @@ #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() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) SwWordCountFloatDlg::~SwWordCountFloatDlg() { @@ -85,6 +89,8 @@ void SwWordCountFloatDlg::showCJK(bool bShowCJK) { m_xCurrentCjkcharsFT->set_visible(bShowCJK); m_xDocCjkcharsFT->set_visible(bShowCJK); + if (m_xCjkcharsLabelFT2) + m_xCjkcharsLabelFT2->set_visible(bShowCJK); m_xCjkcharsLabelFT->set_visible(bShowCJK); } @@ -92,6 +98,8 @@ void SwWordCountFloatDlg::showStandardizedPages(bool bShowStandardizedPages) { m_xCurrentStandardizedPagesFT->set_visible(bShowStandardizedPages); m_xDocStandardizedPagesFT->set_visible(bShowStandardizedPages); + if (m_xStandardizedPagesLabelFT2) + m_xStandardizedPagesLabelFT2->set_visible(bShowStandardizedPages); m_xStandardizedPagesLabelFT->set_visible(bShowStandardizedPages); } @@ -99,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")) @@ -111,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 5a8ae3d522d2..dafc87ea0913 100644 --- a/sw/source/uibase/inc/wordcountdialog.hxx +++ b/sw/source/uibase/inc/wordcountdialog.hxx @@ -40,7 +40,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> _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
