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>
On the one hand, the code had apparently treated nIdx as a sal_Unicode character
value ever since its inception in e718950884 "new
querydesign." On the other hand, the preceding BROW_VIS_ROW case does produce
strings "0" and "1".
Change-Id: Ife6e98ba32146cc469b722fa4f013c12152b5505
This may reduce some degree of dependency on boost.
Done by running a script like:
git grep -l '#include *.boost/scoped_array.hpp.' \
| xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
| xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'
... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.
Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
At least OutputDevice::acquire/release use a plain unguarded int and ++, --, so
apparently rely on the SolarMutex being locked whenever they are called. Fixed
those places that caused "make check" to fail for me when temporarily adding
DBG_TESTSOLARMUTEX() to OutputDevice::acquire/release. (A recurring pattern is
that a class fails to ensure the SolarMutex is locked around the destruction of
non-null VclPtr members.)
Change-Id: I77cba6f3908f2de1b516ce28f1c3c43b3f57a9c5
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'
Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
on examination this PreparePaint virtual is only called from
SvTreeListBox::PaintEntry1
and PaintEntry1 is only called from SvImpLBox::Paint in a
for(sal_uInt16 n=0; n< nCount && pEntry; n++)
{
/*long nMaxRight=*/
pView->PaintEntry1
loop so pEntry always exists given that test. Re-jig things
so these families of method take a reference instead of a pointer
so verifying it cannot be NULL and a whole pile of else paths
fall away
Change-Id: Ied40acb1c2263c21b4447832f8cb86f64ed9e80d
...that was introduced in b88a62cc97 "CWS-TOOLING:
integrate CWS dbaperf2," apparently to speed up later activity by pre-loading a
JVM or Calc.
The problem is that any spawned FastLoader thread was never joined, so could
still run during exit. That caused many spurious failures of
CppunitTest_sw_uiwriter after df726c8b3e
"CppunitTest_sw_uiwriter: add embedded data source definition testcase"
triggered spawning such FastLoader threads there.
Adding code to join any spawned FastLoader thread is not easy, though. For one,
it is not clear whether there would not be very many (terminated, waiting to be
joined, thus still holding up system resources) such treads when doing the join
in ~DatasourceURLListener or DatasourceURLListener::disposing. For another, a
naive attempt at joining in ~DatasourceURLListener leads to deadlock, as it is
called with the SolarMutex locked and the E_CALC branch in FastLoader::run
blocks waiting to acquire it.
Thus, the best approach appears to be to remove this optimization. Hopefully,
that does not have too dire performance impacts on typcial user scenarios.
Change-Id: Ifeab013ddd8acee1289423facba0c120684e9325
With this, in case the embedded data source definition has an URL like:
<db:file-based-database xlink:href="../../calc-data-source.ods/" db:media-type="application/vnd.oasis.opendocument.spreadsheet"/>
That's resolved to
file:///path/to/directory/of/Writer/doc/calc-data-source.ods correctly.
Change-Id: Ieb67f9f5ae104689c6dadc14ec84c66bec70a687
When Writer creates an embedded data source definition, it should be
stored on the storage of the Writer document, so Writer sets the
TargetStorage and StreamRelPath parameters of the storeAsURL() call.
Let ODatabaseDocument::impl_storeAs_throw() and
ODatabaseDocument::impl_writeStorage_throw() respect these, so the save
actually succeeds.
Change-Id: I4568ef96204a219b813142d7b5eebe9f1ec5e22e