diff options
author | Laurent Godard <lgodard.libre@laposte.net> | 2015-04-30 16:56:14 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2015-06-22 04:59:07 +0000 |
commit | a64999511ae654131d997eec9a3d78478cfc1c75 (patch) | |
tree | e2a06cde98747c7f8b1eb409f9c7b1918582c897 /dbaccess | |
parent | d16e154c627ecc0cb21aaf4b28f7f5ae48ebbde1 (diff) |
new uno sidebar api tdf#91806
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 <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 405bb91d2864..42bd37ffe5aa 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -45,6 +45,10 @@ #include "UITools.hxx" #include "commontypes.hxx" +#include <com/sun/star/ui/XSidebarProvider.hpp> +#include <sfx2/sidebar/UnoSidebar.hxx> + + #include <vcl/waitobj.hxx> #include <svl/urihelper.hxx> #include "datasourceconnector.hxx" @@ -72,6 +76,7 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::task; using namespace ::com::sun::star::awt; +using namespace ::com::sun::star::ui; using namespace ::dbtools; using namespace ::comphelper; @@ -367,6 +372,11 @@ Reference< XWindow > SAL_CALL OGenericUnoController::getComponentWindow() throw return VCLUnoHelper::GetInterface( getView() ); } +Reference<XSidebarProvider> SAL_CALL OGenericUnoController::getSidebar() throw (RuntimeException, std::exception) +{ + return NULL; +} + OUString SAL_CALL OGenericUnoController::getViewControllerName() throw (::com::sun::star::uno::RuntimeException, std::exception) { return OUString( "Default" ); |