From a64999511ae654131d997eec9a3d78478cfc1c75 Mon Sep 17 00:00:00 2001 From: Laurent Godard Date: Thu, 30 Apr 2015 16:56:14 +0200 Subject: new uno sidebar api tdf#91806 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the entry point is SfxBaseController::getSidebar() the Decks and panels are now per SidebarController and not global anymore ' macro example Sub testSidebarApi controller = thisComponent.currentcontroller frameIni = thisComponent.currentcontroller.frame sidebar = thisComponent.currentcontroller.getSidebar() sidebar.setVisible(true) frame = sidebar.getFrame() decks = sidebar.getdecks() c = decks.count h = decks.hasElements() e = decks.getElementNames() a = decks.hasByName("MyDeck") deck = decks.getByName("MyDeck") deck.activate(true) t = deck.getTitle() deck.setTitle("new deck title") deck.moveFirst() deck.moveLast() deck.moveUp() deck.moveDown() index = deck.getOrderIndex() panels = deck.getPanels() ep = panels.getElementnames() ap = panels.hasByName("aPanelName") panel = panels.getByName("aPanelName") panel.setTitle("new panel title") panel.collapse() panel.expand(true) ' expand and collapse other index = panel.getOrderIndex() panel.moveLast() panel.moveFirst() panel.moveDown() panel.moveUp() End Sub Change-Id: I7a4b953f2277dea483bb296ba6ead35de7205ace Reviewed-on: https://gerrit.libreoffice.org/15856 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl Tested-by: Tomaž Vajngerl --- include/dbaccess/genericcontroller.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/dbaccess') diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx index 07a9decc97ca..f1953218ef15 100644 --- a/include/dbaccess/genericcontroller.hxx +++ b/include/dbaccess/genericcontroller.hxx @@ -61,6 +61,8 @@ #include #include +#include + namespace dbtools { class SQLExceptionInfo; @@ -465,6 +467,9 @@ namespace dbaui virtual OUString SAL_CALL getViewControllerName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCreationArguments() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XSidebarProvider > SAL_CALL getSidebar() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + + // ::com::sun::star::frame::XController virtual void SAL_CALL attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; -- cgit