sc/source/ui/drawfunc/drawsh2.cxx | 1 svx/source/gallery2/galbrws1.cxx | 15 + svx/source/gallery2/galbrws1.hxx | 2 svx/uiconfig/ui/sidebargallery.ui | 316 ++++++++++++++++++++++++++++---------- 4 files changed, 252 insertions(+), 82 deletions(-)
New commits: commit 13838d4cc83dd69c5b1679eb62ee36ba3237f6b2 Author: Heiko Tietze <tietze.he...@gmail.com> AuthorDate: Tue Oct 13 18:10:55 2020 +0200 Commit: Heiko Tietze <heiko.tie...@documentfoundation.org> CommitDate: Wed Oct 14 19:43:02 2020 +0200 Resolves tdf#137447 - Access galleries via tight extensions Button and code added to galbrws1 Change-Id: Ic599cc32980f9a3ee297891f80cefe478c28c302 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104248 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 3ac8bd8ff46b..6cf14753e524 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -38,7 +38,8 @@ #include <svx/strings.hrc> #include <algorithm> #include <svx/dialmgr.hxx> - +#include <comphelper/dispatchcommand.hxx> +#include <com/sun/star/beans/PropertyValue.hpp> #include <svx/svxdlg.hxx> #include <memory> #include <bitmaps.hlst> @@ -52,6 +53,7 @@ GalleryBrowser1::GalleryBrowser1( : mxNewTheme(rBuilder.weld_button("insert")), mxThemes(rBuilder.weld_tree_view("themelist")), + mxMoreGalleries(rBuilder.weld_button("btnMoreGalleries")), mpGallery ( pGallery ), mpExchangeData ( new ExchangeData ), aImgNormal ( RID_SVXBMP_THEME_NORMAL ), @@ -69,6 +71,9 @@ GalleryBrowser1::GalleryBrowser1( mxThemes->connect_key_press(LINK(this, GalleryBrowser1, KeyInputHdl)); mxThemes->set_size_request(-1, mxThemes->get_height_rows(6)); + mxMoreGalleries->set_from_icon_name("cmd/sc_additionsdialog.png"); + mxMoreGalleries->connect_clicked(LINK(this, GalleryBrowser1, OnMoreGalleriesClick)); + // disable creation of new themes if a writable directory is not available if( mpGallery->GetUserURL().GetProtocol() == INetProtocol::NotValid ) mxNewTheme->set_sensitive(false); @@ -367,6 +372,14 @@ void GalleryBrowser1::Notify( SfxBroadcaster&, const SfxHint& rHint ) } } +IMPL_STATIC_LINK_NOARG( GalleryBrowser1, OnMoreGalleriesClick, weld::Button&, void) +{ + css::uno::Sequence<css::beans::PropertyValue> aArgs(1); + aArgs[0].Name = "AdditionsTag"; + aArgs[0].Value <<= OUString("Gallery"); + comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs); +} + IMPL_LINK(GalleryBrowser1, KeyInputHdl, const KeyEvent&, rKEvt, bool) { bool bRet = false; diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index 835a0db4ec9a..222237a72a74 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -45,6 +45,7 @@ private: std::unique_ptr<weld::Button> mxNewTheme; std::unique_ptr<weld::TreeView> mxThemes; + std::unique_ptr<weld::Button> mxMoreGalleries; Gallery* mpGallery; std::unique_ptr<ExchangeData> mpExchangeData; std::unique_ptr<SfxItemSet> mpThemePropsDlgItemSet; @@ -71,6 +72,7 @@ private: DECL_LINK( SelectThemeHdl, weld::TreeView&, void ); DECL_LINK( PopupMenuHdl, const CommandEvent&, bool ); DECL_LINK( KeyInputHdl, const KeyEvent&, bool ); + DECL_STATIC_LINK( GalleryBrowser1, OnMoreGalleriesClick, weld::Button&, void ); public: diff --git a/svx/uiconfig/ui/sidebargallery.ui b/svx/uiconfig/ui/sidebargallery.ui index 6beedd59a5cd..247c396bb355 100644 --- a/svx/uiconfig/ui/sidebargallery.ui +++ b/svx/uiconfig/ui/sidebargallery.ui @@ -1,16 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.2 --> +<!-- Generated with glade 3.38.1 --> <interface domain="svx"> <requires lib="gtk+" version="3.18"/> <object class="GtkImage" id="image1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">svx/res/galicon.png</property> + <property name="can-focus">False</property> + <property name="icon-name">svx/res/galicon.png</property> </object> <object class="GtkImage" id="image2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="icon_name">svx/res/gallist.png</property> + <property name="can-focus">False</property> + <property name="icon-name">svx/res/gallist.png</property> </object> <object class="GtkTreeStore" id="liststore1"> <columns> @@ -32,51 +32,54 @@ <column type="gchararray"/> </columns> </object> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="GalleryPanel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="border_width">6</property> + <property name="border-width">6</property> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid" id="container"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="row_spacing">3</property> - <property name="column_spacing">6</property> + <property name="row-spacing">3</property> + <property name="column-spacing">6</property> <child> <object class="GtkPaned" id="splitter"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> - <property name="wide_handle">True</property> + <property name="wide-handle">True</property> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="shadow_type">in</property> + <property name="shadow-type">in</property> <child> <object class="GtkTreeView" id="themelist"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="model">liststore1</property> - <property name="headers_visible">False</property> - <property name="search_column">1</property> - <property name="show_expanders">False</property> + <property name="headers-visible">False</property> + <property name="search-column">1</property> + <property name="show-expanders">False</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="treeview-selection2"/> </child> @@ -109,10 +112,34 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="resize">False</property> @@ -120,34 +147,36 @@ </packing> </child> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="row_spacing">6</property> + <property name="row-spacing">6</property> <child> + <!-- n-columns=3 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <child> <object class="GtkScrolledWindow" id="galleryscroll"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="gallery"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> <property name="hexpand">True</property> <property name="vexpand">True</property> @@ -157,28 +186,28 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="shadow_type">in</property> + <property name="shadow-type">in</property> <child> <object class="GtkTreeView" id="gallerylist"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="model">liststore2</property> - <property name="headers_visible">False</property> + <property name="headers-visible">False</property> <property name="reorderable">True</property> - <property name="search_column">1</property> - <property name="show_expanders">False</property> + <property name="search-column">1</property> + <property name="show-expanders">False</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="treeview-selection3"/> </child> @@ -202,27 +231,27 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkScrolledWindow" id="previewscroll"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="vscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkViewport"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <child> <object class="GtkDrawingArea" id="preview"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property> <property name="hexpand">True</property> <property name="vexpand">True</property> @@ -232,30 +261,49 @@ </child> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> + <property name="left-attach">2</property> + <property name="top-attach">0</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> + <!-- n-columns=4 n-rows=3 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="column_spacing">3</property> + <property name="column-spacing">3</property> <child> <object class="GtkToggleButton" id="icon"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERY_ICONVIEW">Icon View</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERY_ICONVIEW">Icon View</property> <property name="image">image1</property> - <property name="always_show_image">True</property> + <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="icon-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERY_THEMEITEMS">Theme Items</property> @@ -263,18 +311,18 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkToggleButton" id="list"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERY_LISTVIEW">Detailed View</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERY_LISTVIEW">Detailed View</property> <property name="image">image2</property> - <property name="always_show_image">True</property> + <property name="always-show-image">True</property> <child internal-child="accessible"> <object class="AtkObject" id="list-atkobject"> <property name="AtkObject::accessible-name" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERY_THEMEITEMS">Theme Items</property> @@ -282,47 +330,107 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="label"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">gallery</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">gallery</property> <attributes> <attribute name="weight" value="bold"/> </attributes> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> + <property name="left-attach">2</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkButton" id="insert"> <property name="label" translatable="yes" context="sidebargallery|RID_SVXSTR_GALLERY_CREATETHEME">New...</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="receives-default">True</property> <property name="halign">end</property> <property name="hexpand">True</property> - <property name="use_underline">True</property> + <property name="use-underline">True</property> + </object> + <packing> + <property name="left-attach">2</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="btnMoreGalleries"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="tooltip-text" translatable="yes" context="sidebargallery|btnMoreGalleries">Add more galleries via extension</property> + <child> + <placeholder/> + </child> </object> <packing> - <property name="left_attach">3</property> - <property name="top_attach">0</property> + <property name="left-attach">3</property> + <property name="top-attach">0</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="resize">True</property> @@ -331,15 +439,63 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> </interface> commit de6d4759b3e222b1ccb608d2be51c9476b2ee281 Author: Andrea Gelmini <andrea.gelm...@gelma.net> AuthorDate: Wed Oct 14 17:55:51 2020 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Wed Oct 14 19:42:53 2020 +0200 Removed duplicated include Change-Id: I1c16d73731e76e0569b796c1e5cff17f91fffd95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104317 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index d71042f5642d..cec35f05effa 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -54,7 +54,6 @@ #include <svx/xflclit.hxx> #include <com/sun/star/chart2/XChartDocument.hpp> -#include <com/sun/star/embed/XEmbeddedObject.hpp> #include <sfx2/ipclient.hxx> #include <com/sun/star/drawing/FillStyle.hpp> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits