Commit Graph

11124 Commits

Author SHA1 Message Date
Stephan Bergmann
a51ac4d2bb Add variadic PartialWeakComponentImplHelper, remove need for implbase_var.hxx
Change-Id: Iad3417822b2ab3afb75da09c311a0bf07af5e2e4
2015-06-22 21:48:36 +02:00
Caolán McNamara
3cb7db75ac gtk3: native render the comically oversized gtk3 spinbuttons
Change-Id: I3e97200d59a97271617a6e9a88c807a07a33edfe
2015-06-22 15:48:46 +01:00
Caolán McNamara
90134af864 cppcheck: noExplicitConstructor
Change-Id: I913f983bb0f55e05bb5ec8994ee75a7e7d69bd1b
2015-06-22 15:46:13 +01:00
Andrea Gelmini
aade27554d Fix typos
Change-Id: I60ed5eb658d50cbc7dc572facb5463b7527b4d9b
Reviewed-on: https://gerrit.libreoffice.org/16408
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-22 12:36:21 +00:00
Laurent Godard
a64999511a 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>
2015-06-22 04:59:07 +00:00
Caolán McNamara
1f116adb7c callcatcher: update unused code
Change-Id: I29b3f1408b814a1424d8bab232e9ac618901b4c2
2015-06-20 14:20:33 +01:00
Stephan Bergmann
e46e8d1945 Shall this produce a string representation of a number?
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
2015-06-19 11:04:14 +02:00
Andrea Gelmini
ae150c6a54 Fix typos
Change-Id: Ibfa971952cd330ddf430e7e951c5c235d2ae6bd8
Reviewed-on: https://gerrit.libreoffice.org/16314
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-06-18 11:44:56 +00:00
Takeshi Abe
0980095619 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
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>
2015-06-17 15:50:45 +00:00
Stephan Bergmann
8e1ad96626 Some missing SolarMutexGuard around VclPtr acquire/release
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
2015-06-17 15:24:19 +02:00
Andrea Gelmini
3fa7b0b70f Fix typos
Change-Id: Id8c7cf460cba5af89891c470e1aaa61b227d356e
Reviewed-on: https://gerrit.libreoffice.org/16310
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:25:13 +00:00
Andrea Gelmini
814af9f1e5 Fix typos
Change-Id: Icfb885b72d51edc886851cf503c56fa12b8f559f
Reviewed-on: https://gerrit.libreoffice.org/16309
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:21:07 +00:00
Andrea Gelmini
01532b1ab8 Fix typos
Change-Id: I28cfc629dc3d6ef54128615452667ccce86c1072
Reviewed-on: https://gerrit.libreoffice.org/16297
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 11:05:58 +00:00
Andrea Gelmini
9b7e1bf43d Fix typos
Change-Id: Ieaf67cf597e05dbae5affa153af907fda4462a41
Reviewed-on: https://gerrit.libreoffice.org/16295
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-06-16 10:59:53 +00:00
Noel Grandin
4729774b24 remove unnecessary check for null when calling delete
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
2015-06-15 14:46:41 +02:00
Noel Grandin
4ea281a3cc cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
2015-06-15 13:34:14 +02:00
Andrea Gelmini
c3c45ff7ef Fix typos
Change-Id: Id05ea8cf8aed878bedfe73c274df3c67b64bad37
Reviewed-on: https://gerrit.libreoffice.org/16263
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-15 06:53:19 +00:00
Antoine Cœur
fd29a623e7 spelling
Change-Id: I5ccbb5a2b31192cea96fbb0f4ab926af86e94c9d
Reviewed-on: https://gerrit.libreoffice.org/16223
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Philippe Jung <phil.jung@free.fr>
2015-06-12 15:41:17 +00:00
Caolán McNamara
88b104f44a coverity#1302618 deref of NULL
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
2015-06-10 22:11:33 +01:00
Stephan Bergmann
670100fcfb Remove FastLoader optimization
...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
2015-06-10 12:36:54 +02:00
Miklos Vajna
9eee43a887 dbaccess: gcc-4.7 error: '<::' cannot begin a template-argument list
Change-Id: I27547009862b50a1cb0244c144c46c0aadef65f3
2015-06-09 14:29:17 +02:00
Noel Grandin
81b954718f loplugin:unnecessaryvirtuals
Improve the plugin a little.
Create a python script to process the output.
Run it again.

Change-Id: I05c21d8a21c8f4243af739c412fda0a521f9b5f0
2015-06-09 10:06:57 +02:00
Stephan Bergmann
8538026000 loplugin:cstylecast: deal with remaining pointer casts
Change-Id: If951c1982314c5a045d51bc4fff62a3e2b265e08
2015-06-08 16:24:31 +02:00
Jan Holesovsky
9535d5d1fd \<the the\> -> the
Change-Id: I9d820446411eb7dfca37bb3baf5e994f4ba6f421
2015-06-08 10:29:27 +02:00
Miklos Vajna
cd33c5355f dbaccess: avoid pointless ucbhelper::Content instance in case of embedding
Change-Id: Ibc3d7a0d9b3373f17aa8d1da081946814904e6d5
2015-06-08 09:54:40 +02:00
Miklos Vajna
4101949b2a dbaccess: set correct BaseURI for vnd.sun.star.pkg:// URLs on load
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
2015-06-08 09:54:39 +02:00
Noel Grandin
3f72218069 Apply new VclPtr clang plugin to catch potential problems.
Omit the plugin, and sw's FrameControlsManager for now.

Change-Id: Ifb98a2e6e03a9d099efc1668305b96bd9142ca5f
Reviewed-on: https://gerrit.libreoffice.org/16117
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-06-06 20:26:54 +00:00
Miklos Vajna
1f1ad7ac0d dbaccess: let ODatabaseDocument::impl_writeStorage_throw() respect BaseURI
Change-Id: Id30aaa624b9a1b0bbef016ef0b35bd39f19f6439
2015-06-05 13:10:40 +02:00
Noel Grandin
81610561ed uno::Sequence provides now begin and end
use begin() and end() when calling std::copy on an uno::Sequence

Inspired by commit b34b648fc3
"uno::Sequence provides now begin and end"

Change-Id: I08e8c3fd6144e77b95a26f85bc0daf6a9edeeb0b
Reviewed-on: https://gerrit.libreoffice.org/16057
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-04 06:35:44 +00:00
umairshahid
d6e7dcb343 A small hint on how to specify the database URL should be helpful to users
Change-Id: I7a84951b571b8c0a583907283f3b69fab1b5984b
Reviewed-on: https://gerrit.libreoffice.org/15978
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-02 13:15:01 +00:00
Miklos Vajna
b499739c43 dbaccess: add support for storing ODatabaseDocument to a sub-storage
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
2015-06-01 12:30:26 +02:00
Stephan Bergmann
08e278b411 loplugin:implicitboolconversion
Change-Id: Ic0c6487661286efa04452427fc3a64da747c2ce8
2015-05-31 13:55:45 +02:00
Lionel Elie Mamane
d6d19acaca do not try to get bookmark when in invalid position
Change-Id: I64fc14e527af4f0f846bbfae84cf8d1d2914b6b9
2015-05-30 17:32:51 +02:00
Lionel Elie Mamane
b4e6dd8200 handle getParameters being called before execute()
Change-Id: If81e745ee15df3848c6577a9e979672523718daf
2015-05-30 17:32:50 +02:00
Lionel Elie Mamane
8607f8b552 tdf#82591 ORowSetBase::getRow handles insert row correctly
and critically for this bug, modified row, too.

Change-Id: I11c418d8926cabe81fcdb65d7293a4283e566f7a
2015-05-30 17:32:48 +02:00
Michael Meeks
ba81e5c6bd tdf#91702 - fix stack-based MessBox allocation.
Change-Id: I62dd164e281911d9db3de453789a5badc7cd5fd7
Reviewed-on: https://gerrit.libreoffice.org/15954
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-29 12:16:28 +00:00
Stephan Bergmann
1166efc5f9 loplugin:redundantcast: const_cast to same type
Change-Id: Ib80d28bf3680fc7ff1f11f3d143a103075b7ef75
2015-05-29 12:04:19 +02:00
Noel Grandin
49ea2258d4 loplugin:loopvartoosmall
Change-Id: I5518e40a30bdad53470cc52b59eff04ab6d873d4
2015-05-29 08:48:41 +02:00
Noel Grandin
abb7747222 simplify
Change-Id: I74288b1a29a928d14a022f39b63bbdab1517c68a
2015-05-29 08:48:09 +02:00
Noel Grandin
6c1cabe677 loplugin:unnecessarysuperclass, merge IWarningsContainer..
..into WarningsContainer

Change-Id: I682528a4eb1b1298faf12b2d498db65f94800cd5
Reviewed-on: https://gerrit.libreoffice.org/15905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-29 06:46:40 +00:00
Caolán McNamara
2ecf0ced9d VclPtr: assert with query dialog open on closing query design
Change-Id: I40d196462ff2e37d86ca367d3a150c94872715f1
2015-05-28 15:21:03 +01:00
Caolán McNamara
82f15336cf VclPtr: undisposed things and dispose order on query design window close
Change-Id: I3070d52e15febe2f5981ffdf5d665e28fa4f799b
2015-05-28 15:07:43 +01:00
Tomaž Vajngerl
02482eef01 fix drawing treelistbox with redefined background in dbaccess
Change-Id: Ia55797e3e42309f9d37d5335088f7657d99954de
2015-05-28 18:56:01 +09:00
Tomaž Vajngerl
ee25bc3cad fix Base's titlewindow font, font color and background
Change-Id: Ide9c30385d15d0b8303f25d1a9eef132a32ec7d2
2015-05-28 18:56:01 +09:00
Philippe Jung
1379e2feaa Rewrite all calls like Dialog(params).Execute()
Replace all calls looking like
  ADialog(some params).Execute()
by
  ScopedVclPtrInstance<ADialog>::Create(some parms)->Execute()

Change-Id: I0b6f0a9ea5ef0a749ffa30ce131e9dc989604639
Reviewed-on: https://gerrit.libreoffice.org/15915
Tested-by: Jenkins <ci@libreoffice.org>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-28 08:44:31 +00:00
Stephan Bergmann
9549fb88f0 Prevent accidental mis-uses of VclPtr address-of operator
Change-Id: Ie3588d502e9545ea64bf836b2a0bdc0caead2247
2015-05-27 11:40:36 +02:00
Stephan Bergmann
668408fa1c Fix accidental mis-uses of VclPtr address-of operator
Change-Id: I3a82423378d3198a25f90ddfbf42af55d85c96fb
2015-05-27 11:40:22 +02:00
Noel Grandin
15e64391ae tdf#91543 - TABLE DESIGN window menu option Close causes BASE to crash
Change-Id: Ib169950f4e33dc71db66fd9a938838b568d2cc22
2015-05-26 13:08:45 +02:00
Noel Grandin
bb7ce3137d convert INVALIDATE constants to scoped enum
fixing a bug in Window::ImplMoveAllInvalidateRegions, and improving the
IDL docs for XWindowPeer

Change-Id: Idb774ac913945db2ac7c492c11cf86c370624c3d
2015-05-26 08:30:18 +02:00
Michael Meeks
e4097762dd Audit all PostUserEvent calls and instrument for VclPtr.
Hold a reference on the VclPtr while we're waiting for the UserEvent.

Change-Id: I55c2671ca12eb14761c6a7dffd551af71547ecbd
2015-05-25 21:38:08 +01:00