Commit Graph

9804 Commits

Author SHA1 Message Date
Noel Grandin
f49b6d89fd loplugin:finalclasses in svtools
Change-Id: I596342a3d32e116ac5994b60a5bd8717d4f6a5dd
Reviewed-on: https://gerrit.libreoffice.org/43733
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-24 10:54:23 +02:00
Julien Nabet
fe22bdc3b5 tdf#113368: fix crash when closing dialog opened with Basic
See bt https://bugs.documentfoundation.org/attachment.cgi?id=137222
3  0x00007fffebe196b7 in vcl::Window::GrabFocus() (this=0x0) at /tinderbox/buildslave/source/libo-master/vcl/source/window/window.cxx:3003
4  0x00007fffee473602 in FileControl::GetFocus() (this=0x28760b0) at /tinderbox/buildslave/source/libo-master/svtools/source/control/filectrl.cxx:177
5  0x00007fffebe1c99b in vcl::Window::CompatGetFocus() (this=0x28760b0) at /tinderbox/buildslave/source/libo-master/vcl/source/window/window.cxx:3694
6  0x00007fffebd62672 in vcl::Window::ImplGrabFocus(GetFocusFlags) (this=0x28760b0, nFlags=GetFocusFlags::NONE) at /tinderbox/buildslave/source/libo-master/vcl/source/window/mouse.cxx:377
7  0x00007fffebe196b7 in vcl::Window::GrabFocus() (this=0x28760b0) at /tinderbox/buildslave/source/libo-master/vcl/source/window/window.cxx:3003
8  0x00007fffebe0bfc5 in vcl::Window::dispose() (this=0x28778b0) at /tinderbox/buildslave/source/libo-master/vcl/source/window/window.cxx:449
9  0x00007fffebe6536c in Control::dispose() (this=0x28778b0) at /tinderbox/buildslave/source/libo-master/vcl/source/control/ctrl.cxx:65
10 0x00007fffebe6a4b6 in Edit::dispose() (this=0x28778b0) at /tinderbox/buildslave/source/libo-master/vcl/source/control/edit.cxx:265
11 0x00007fffebfa5ac0 in VclReferenceBase::disposeOnce() (this=0x2877bc8) at /tinderbox/buildslave/source/libo-master/vcl/source/outdev/vclreferencebase.cxx:42
12 0x00007fffee41f948 in VclPtr<Edit>::disposeAndClear() (this=0x28762c0) at /tinderbox/buildslave/source/libo-master/include/vcl/vclptr.hxx:208
13 0x00007fffee472f0e in FileControl::dispose() (this=0x28760b0) at /tinderbox/buildslave/source/libo-master/svtools/source/control/filectrl.cxx:89

Change-Id: I97fd3679a8692893047c22ff3e452a5c3e3f25c3
Reviewed-on: https://gerrit.libreoffice.org/43731
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-24 07:07:17 +02:00
Stephan Bergmann
92236b3eab loplugin:includeform: svtools
Change-Id: I7a25c2db8c097ae4512c8a8b7d8a272905b46e50
2017-10-23 22:45:51 +02:00
Noel Grandin
87a9979c89 overload std::hash for OUString and OString
no need to explicitly specify it anymore

Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23 08:15:35 +02:00
Noel Grandin
ead920a48a loplugin:redundantcast handle dynamic_cast
Change-Id: I7855c76e820efce96778b1c19ec71dffcc4b4abb
Reviewed-on: https://gerrit.libreoffice.org/43621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-21 15:44:11 +02:00
Takeshi Abe
44f54bf392 svtools: SvTreeListEntry's copy ctor is unnecessary
Change-Id: Idce8773d96e30dacfc9ce13fdb9b399c2a8bf341
Reviewed-on: https://gerrit.libreoffice.org/43485
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-20 07:56:44 +02:00
Noel Grandin
facb86ea01 use std::unique_ptr in SvTreeList
Change-Id: Ibfba32d6855532aeb42c45f493a4f01f7d0cd4ee
Reviewed-on: https://gerrit.libreoffice.org/43475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-18 10:18:51 +02:00
Noel Grandin
3035a8066f use rtl::Reference in SvXMLEmbeddedObjectHelper
instead of manual ref-counting

Change-Id: I559ebb3871dd3dd4a160bd83a259e36dd2f7b4d6
Reviewed-on: https://gerrit.libreoffice.org/43200
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-06 16:12:44 +02:00
Noel Grandin
aacf28c8ab Revert "remove handing of deprecated Storage path option"
This reverts commit b71fdc67ed.

since Jochen indicates that there is a bug in it

Change-Id: I786a7885a308cb43b99d9930ed385a75bbcd9495
Reviewed-on: https://gerrit.libreoffice.org/43192
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-06 13:07:31 +02:00
Jochen Nitschke
b71fdc67ed remove handing of deprecated Storage path option
The only user of StoragePath was
TemplateFolderCacheImpl::openCacheStream which uses TempPath for
the cache file now.

Change-Id: Ia21b5aa804222f28a3af3779a0ecc4789c1860b3
Reviewed-on: https://gerrit.libreoffice.org/41087
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-05 09:01:19 +02:00
Noel Grandin
2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Noel Grandin
2b6385a9f5 convert TPB_DISPLAY_NAME constants to scoped enum
Change-Id: I0e4f9ce3392e48fc82c232ba3e6581f3b0d9af9f
Reviewed-on: https://gerrit.libreoffice.org/43083
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-03 16:55:11 +02:00
Noel Grandin
d3971ec256 new loplugin:blockblock
Change-Id: I7b68b70fa4c7234e8882f7627026959a596968fd
Reviewed-on: https://gerrit.libreoffice.org/43025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-03 08:41:11 +02:00
Muhammet Kara
50da5d0d1c simplify some OUString compareTo calls
to either startsWith or == or !=

Change-Id: I595dd9d89d32134827980c4ba10f88584430137d
Reviewed-on: https://gerrit.libreoffice.org/42988
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-01 15:58:22 +02:00
Caolán McNamara
3043863d68 Resolves: tdf#112656 don't reset to default font if a custom font was set
the list has been laid out with the smaller custom font, including
calculating the bounding box of the entry, then rendered with the
default larger font

Change-Id: I2ae569c9857d4e1016cbf55da4c3334c63dcf5f6
Reviewed-on: https://gerrit.libreoffice.org/42910
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2017-10-01 10:26:53 +02:00
Johnny_M
79c28873d6 Translate German comments and debug strings (leftovers)
Change-Id: I4ab8fbae47037f6e21c51713d1c51aaa5dc61f40
Reviewed-on: https://gerrit.libreoffice.org/42967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-30 20:58:27 +02:00
Maxim Monastirsky
0582d54d89 WB_MOVEABLE should not trigger tearoff mode
As any .ui based docking window gets it unconditionally,
see extractDeferredBits function in builder.cxx.

Change-Id: I339a72989ad09d8ea7106f5690fc950ee7ba35da
2017-09-29 13:02:33 +03:00
Stephan Bergmann
9e0be8a76e Remove dead code behind Calc "Live Data Streams" dialog's "scriptdata" button
...that has been disabled and hidden ever since
4c90ed782a "Actually hide these two radio buttons
(since there is no choice now)."

This removes the sole user of SvScriptStream.  (Unfortunately, removing the no
longer needed

  #include <osl/process.h>

from include/tools/stream.hxx triggered an avalanche of missing includes
elsewhere.)

Change-Id: I7b0e683b14c0eaf7f4737f62adc9d691826380c0
Reviewed-on: https://gerrit.libreoffice.org/42916
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-09-28 19:13:29 +02:00
Tor Lillqvist
8e7897588d Rename the basegfx::tools namespace to basegfx::utils
Reduce potential confusion with the global tools namespace. Will
hopefully make it possible to remove the annoying initial :: when
referring to the global tools namespace. Unless we have even more
tools subnamespaces somewhere.

Thorsten said it was OK.

Change-Id: Id088dfe8f4244cb79df9aa988995b31a1758c996
Reviewed-on: https://gerrit.libreoffice.org/42644
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-09-26 14:18:41 +02:00
Jim Raykowski
0b4bf5840e tdf#49634 Fix positioning of focus rectangle in Navigator content tree
https://bugs.documentfoundation.org/show_bug.cgi?id=49634

Change-Id: I3beb41142281b2cda337b457ed287a2cc1f665a6
Reviewed-on: https://gerrit.libreoffice.org/42364
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-09-26 13:56:19 +02:00
Maxim Monastirsky
e867b19754 tdf#106762 Base SvxColorToolBoxControl on svt::PopupWindowController
This allows us to support tearoff without breaking gtk3/wayland.
SvxColorWindow no longer inherits from FloatingWindow, so several
call sites need also to be changed to use DockingManager.

Change-Id: I5d0bc611bbd2a8b9bfd4335212d0ae7e8fc10593
2017-09-24 15:37:28 +03:00
Noel Grandin
ee6bdeec8d loplugin:flatten in svl..svx
and implement a check in the plugin to prevent us modifying the
same patch of source code twice. This logic should probably be moved
into plugin.cxx at some point.

Change-Id: I7ebff6424cc8733bb2c8f7dba75eaaec68649290
Reviewed-on: https://gerrit.libreoffice.org/42660
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-23 09:04:48 +02:00
Eike Rathke
fe76af877a Check availability of XPageCursor
Change-Id: I458655d52992e40c2330ec10628fcea0fdc00f76
Reviewed-on: https://gerrit.libreoffice.org/42655
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-22 21:54:14 +02:00
Eike Rathke
d026980813 GetGraphicSource: use DocumentToGraphicRenderer::isShapeSelected()
Change-Id: I50852360a29b4d5fd08277fcb2198f7956f9ebe0
Reviewed-on: https://gerrit.libreoffice.org/42654
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-22 21:53:20 +02:00
Eike Rathke
3b06d9df29 Introduce DocumentToGraphicRenderer::isShapeSelected()
Change-Id: I66fc0e39a7a35969b937253c88326516949ea7e7
Reviewed-on: https://gerrit.libreoffice.org/42653
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-22 21:52:30 +02:00
Eike Rathke
d80ba7354c Ditch now unused GraphicExportDialog, GraphicExportOptionsDialog
That was a dead end anyway, trying to partly reimplement
SvFilterOptionsDialog ExportDialog, instead of implementing the
necessary bits to use that one which has everything.

Change-Id: Icde7422f2c2d7e26c07dfe921a4abda41e222b09
Reviewed-on: https://gerrit.libreoffice.org/42503
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-22 13:28:31 +02:00
Tor Lillqvist
e4a4260646 Bin obsolete comment
Change-Id: Id3a3fd5317aef2acdc30605f816c2656990a94b6
2017-09-22 11:49:26 +03:00
Samuel Mehrbrodt
d99b65c864 Rename GetSelectEntryPos -> GetSelectedEntryPos
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4
Reviewed-on: https://gerrit.libreoffice.org/42283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:45:38 +02:00
Samuel Mehrbrodt
b649e5bf1d Rename GetSelectEntry -> GetSelectedEntry
Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce
Reviewed-on: https://gerrit.libreoffice.org/42282
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:44:00 +02:00
Noel Grandin
31d7894d8b unused aDDLastRectPos in SvxIconChoiceCtrl_Impl
since

    commit bf2373daf5
    Date:   Tue Jul 26 23:32:40 2011 +0200
    callcatcher: remove unused methods

Change-Id: I2eef2bdcd40d4b4b1da8cf7ca95b0194ea99216f
2017-09-20 08:42:30 +02:00
Eike Rathke
7c8db52424 Writer export to PNG,JPG: switch to proper SvFilterOptionsDialog
With all bells and whistles, instead of the crude size/dpi JPG dialog
even for PNG.

Change-Id: I695a78643e07900822ec9253ac818efd52339cc0
Reviewed-on: https://gerrit.libreoffice.org/42498
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 21:03:00 +02:00
Eike Rathke
9d46ee5e17 Call getCurrentPageWriter() only for Writer
Change-Id: I81dd61c33a0bc69e43d3325b297c44e5b7b732bd
Reviewed-on: https://gerrit.libreoffice.org/42496
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 20:49:32 +02:00
Eike Rathke
5214e841b6 Detect Writer doc independent of selection, we'll need that later
Change-Id: Ieddbcd3e8b750ec4b32643aec0433f8638ee46ee
Reviewed-on: https://gerrit.libreoffice.org/42495
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 20:43:57 +02:00
Eike Rathke
cb9d99dbb5 DocumentToGraphicRenderer: suppress selection for Writer, it doesn't work
See FIXME comment.

Change-Id: I7511f5b498029fedcbd0c39d5ec67288782330ae
Reviewed-on: https://gerrit.libreoffice.org/42493
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 20:31:23 +02:00
Eike Rathke
0d3dd9cf78 DocumentToGraphicRenderer: current page is 1 if selection
Change-Id: I0d26cd4da6f39c27b06df53596f9f405c5b0771f
Reviewed-on: https://gerrit.libreoffice.org/42491
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 20:00:17 +02:00
Eike Rathke
76b116e507 oops..
Change-Id: I78c5bff1cc7503de066b151658f01fdc5d4b303b
Reviewed-on: https://gerrit.libreoffice.org/42490
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 19:12:51 +02:00
Eike Rathke
cb6cbbd5ca Introduce DocumentToGraphicRenderer::hasSelection() and maSelection
Change-Id: Ib7a9df04eb1b8646e20f58c3f9af3ee2dbbb13db
Reviewed-on: https://gerrit.libreoffice.org/42489
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 19:09:22 +02:00
Eike Rathke
179da6befe Rename getCurrentPageWriter() to getCurrentPage()
... and let getCurrentPageWriter() be a private implementation detail.

Change-Id: Iaa14d8eab81e5750fbaf45adc6aab66eee9018eb
Reviewed-on: https://gerrit.libreoffice.org/42488
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 18:56:29 +02:00
Eike Rathke
d915987bfc 'a'CurrentPage gets on my nerves
Change-Id: Ifb6137048d7206c1f3a718331ed8b42f746052bb
Reviewed-on: https://gerrit.libreoffice.org/42487
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 18:52:29 +02:00
Eike Rathke
9c90cf14cc Writer export to PNG|JPG dialog preparation, current page number nonsense
... if selection, workaround to get SvFilterOptionsDialog displayed.

Change-Id: I7ebf2bfa8054555db2365078a02effd88ce5836f
Reviewed-on: https://gerrit.libreoffice.org/42486
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-19 18:38:18 +02:00
Eike Rathke
dc49b07446 renderToGraphic: assert document and target size
Specifically a document width or height of 0 leads to div/0 =>
-nan(0x8000000000000) => MapMode with 2147483648 => Fraction numerator
overflow assert. Catch already here.

Change-Id: I06588c64104733c2df8c2e1d6983ad95c9a74e57
2017-09-19 14:41:51 +02:00
Ulrich Gemkow
c686dc4f33 tdf#43157 Replace DBG_ASSERT() with assert() in tabbar.cxx
Change-Id: I6a7cc500c973b09236d90a3bfb044407c58fc2ef
Reviewed-on: https://gerrit.libreoffice.org/42142
Reviewed-by: Teodor Mircea Ionita <admin@shinnok.com>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-09-19 00:56:56 +02:00
Eike Rathke
b149201a07 Export to PNG: use proper dialog and filter options, tdf#108317
... and not the crude JPG ones.

The com.sun.star.svtools.SvFilterOptionsDialog service has all we need,
so teach it to cope with non-Graphics source documents and let
ExportDialog handle that as well, just the actual rendering needs to go
via GraphicExportFilter (and effectively DocumentToGraphicRenderer), so
don't let that overwrite the properties set by the filter dialog.
Switching to the dialog then is just a matter of changing the
UIComponent in filter/source/config/fragments/filters/calc_png_Export

The same mechanism probably could be used by Writer as well by adjusting
filter/source/config/fragments/filters/writer_png_Export.xcu and maybe
filter/source/config/fragments/filters/writer_jpg_Export.xcu
in which case the GraphicExportOptionsDialog likely would be moot
then.

Also, it looks like a
filter/source/config/fragments/filters/calc_jpg_Export.xcu
(which doesn't exist yet) could be possible using the same mechanism.

Change-Id: I1fb9b33a6490dc39d7591b2b5913be182bb820e5
Reviewed-on: https://gerrit.libreoffice.org/42421
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2017-09-18 18:10:41 +02:00
Eike Rathke
bd352d6e1c Move initialization to where it belongs
Change-Id: Ifff6cf6a9849b4089f6aabe56bb5de7a414e939a
2017-09-18 16:51:30 +02:00
Noel Grandin
3c695c5ba0 msDescription in SvtRulerAccessible is unused
ever since

    commit 2b12a5b87b
    Date:   Mon Feb 10 09:29:34 2014 +0000
    the return of callcatcher

Change-Id: I62021793e5ca90cba9d2e6998f5ac30da33764f7
2017-09-18 13:47:29 +02:00
Noel Grandin
e6e619b380 aFocusRect in CheckBoxControl is unused
ever since

    commit ff09f8d6ef
    Date:   Thu Mar 27 13:40:07 2003 +0000
    MWS_SRX644: migrate branch mws_srx644 -> HEAD

Change-Id: I71905a95a86757be59abeee6140ef57516176a6a
2017-09-18 13:47:29 +02:00
Noel Grandin
cb315646e2 headString in SvTreeListBox is unused
ever since being added in

    commit b755fb8c0f
    Date:   Mon Nov 25 16:15:58 2013 +0000
    Integrate branch of IAccessible2

Change-Id: Iebb8d30d53cc08e7cc35d610f04db8ed6c853b70
2017-09-18 13:47:29 +02:00
Noel Grandin
5685ee25aa improve redundantcast loplugin
to find c-style casts where the expression is a templated method

Change-Id: Ifbd1e2cdc72d906fc95a7ec0f9408c3f6d2a836b
Reviewed-on: https://gerrit.libreoffice.org/42275
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14 14:43:43 +02:00
Noel Grandin
158434ee87 no need to call GetNumerator() / GetDenominator() for Fraction
simplify the calculations - why have a Fraction and then just split
it up for the calculation?

Change-Id: I81af95e1ee1633f77e088c0990f308b1c169a6a2
Reviewed-on: https://gerrit.libreoffice.org/42242
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13 15:47:04 +02:00
Noel Grandin
1b1afc10f4 Fraction: make conversion operators and constructor explicit
and simplify some of the calculations that needed to be changed.

Which resulted in one unit test needing to change by one pixel,
let's hope not an indication of a real problem.

Change-Id: Ie56434f35f4e58d21ee6f671392e93dc7542fca3
Reviewed-on: https://gerrit.libreoffice.org/42240
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13 15:46:47 +02:00