Commit Graph

10315 Commits

Author SHA1 Message Date
Caolán McNamara
0854e1a6f9 use std::unique_ptr
Change-Id: I5efcfe9ae2d94b34150127917c07dc920fd0e71a
2016-11-11 13:08:19 +00:00
Caolán McNamara
a6d324f30b Resolves: rhbz#1391418 wayland toolbars can't be docked after undocking
see gnome#768128 for extra details

under wayland, given the misery here I'm going to just disable toggling between
docked and undocked under wayland, and throw away user config on toggling
docked/undocked away from the defaults. You can still drag docked things around
to new docking position, but you can't pull them out of the dock to float.

non-wayland is unaffected

Change-Id: Iaa859f3420e6d1b103a8b93d1ad8f82dbffe75d4
Reviewed-on: https://gerrit.libreoffice.org/30752
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-11 08:51:10 +00:00
Noel Grandin
f31d98f63c loplugin:expandablemethods in avmedia..canvas
Change-Id: Ic230f1ef6b1dbe796ac7862a1a7e6a718f9e4e54
Reviewed-on: https://gerrit.libreoffice.org/30753
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 07:00:18 +00:00
Noel Grandin
071e23fee0 add move operators for VclPtr
Change-Id: Ic32894d13aac2d8038afec2efebcc544f1c408af
Reviewed-on: https://gerrit.libreoffice.org/30748
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 06:54:46 +00:00
Stephan Bergmann
8cfa3f4b52 'make screenshot' use-after-free fixes
Change-Id: I4302d0d767a1bf50fd34a78e9aa0ad6d6b0c7a22
2016-11-10 22:00:41 +01:00
Caolán McNamara
ec6fc7a606 Resolves: rhbz#1342828 toolbars jumping around while moved under X
because the start move by wm conflicts with the manual efforts
to position the toolbar.

the move by wm was done to get wayland to move the toolbars, but
(gnome#768128) supporting docking toolbars under wayland is futile
as far as I can see

Change-Id: I502d4617efaf1eb686469e100224e56104ad650d
Reviewed-on: https://gerrit.libreoffice.org/30751
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-10 14:27:39 +00:00
Noel Grandin
ee0e713b53 make comphelper::sequenceToContainer a little smarter
so we don't have to specify the source type

Change-Id: I4106705a39874a8043f0f294a11374404d6cfc3a
Reviewed-on: https://gerrit.libreoffice.org/30713
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10 06:52:26 +00:00
Noel Grandin
5c2c2d8dc4 loplugin:expandablemethods in comphelper..cppuhelper
Change-Id: I9d5487af4729bd3ee4f6450092e4b77f74a12e6d
Reviewed-on: https://gerrit.libreoffice.org/30717
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-10 06:51:53 +00:00
Noel Grandin
2ed4034aa5 Revert "Revert "convert sdr::animation::EventList to o3tl::sorted_vector""
This reverts commit 0e0e3ea312.

and fixes the call to o3tl::sorted_vector::erase that causes a crash.

Change-Id: Ic8ef07eb045a63dc8eaaa33886895f1d8f73098c
Reviewed-on: https://gerrit.libreoffice.org/30715
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 13:09:49 +00:00
Stephan Bergmann
cd61f3eb3d Make sure not to compare different subclasses of Pair
(A related option would be to make those subclasses derive privately from Pair,
but there are a few places that generically operate on any Pair instances, like
Pair::Read/WritePair or SvxShape::ForceMetricToItemPoolMetric/100th_mm.)

Change-Id: I6c638fe65ee5684593fdeab29b144f547e173f4e
2016-11-09 12:17:04 +01:00
Noel Grandin
e74e9586f5 spelling mutext->mutex
Change-Id: If844c07d0d50d1bb9b0a1877c0fde4a198bcf781
2016-11-09 13:14:40 +02:00
Noel Grandin
30e39e4793 loplugin:expandablemethods in drawinglayer..editeng
Change-Id: Ic7fe13651e18b4eec90ef3fd8d7aab81197e0f39
Reviewed-on: https://gerrit.libreoffice.org/30707
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 10:34:31 +00:00
Caolán McNamara
0e0e3ea312 Revert "convert sdr::animation::EventList to o3tl::sorted_vector"
This reverts commit c0c69ccd2a.

because soffice --headless --convert-to odp ooo75571-1.odp crashes
after this change
2016-11-09 10:28:49 +00:00
Tomaž Vajngerl
d115a235bf tdf#103804 reduced register areaScale shader and detection for intel
Some intel drivers crash when areaScale shader with "large" array
is used. This adds a "reduced register" version of the areaScale
shader. We still use the first version of the shader for other
drivers and switch between the 2 implementations with a runtime
detection.

Change-Id: I1860f898c03b40a600eb1b41f7262719382a7171
Reviewed-on: https://gerrit.libreoffice.org/30571
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-11-09 09:56:59 +00:00
Caolán McNamara
e21ef810e1 crashtesting: unexpected exception on novell403458-1.pptx
since

commit 4bcf1872bb
Date:   Thu Oct 13 23:43:41 2016 +0200

    chartx: fix sparse chart import

because

- Matrix< Any > aMatrix( rDataSeq.maData.size(), 1 );
+ Matrix< Any > aMatrix( rDataSeq.mnPointCount, 1 );

where rDataSeq.mnPointCount is -1

Change-Id: I4bb4805dd81a342d4c0ce24e3240154daf53b452
2016-11-09 09:36:19 +00:00
Stephan Bergmann
80af87b0de Revert "Mark Scheduler as non-copyable"
This reverts commit 81e3f5f2fdc9c573c83a37009080e4bb974c7955; had failed to
notice that there are already (Scheduler const & overloads of) copy member
functions (which MSVC complains about, but Clang didn't).
2016-11-09 09:58:33 +01:00
Noel Grandin
3a54589302 convert Primitive2DContainer to std::deque
since we only care about appending to this container, and then
traversing it (normally once). So reduce the re-allocations that
std::vector requires

Change-Id: I206a7b82d9eefc1fa3762c4a03e7b5e21136951f
Reviewed-on: https://gerrit.libreoffice.org/30706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 08:54:01 +00:00
Stephan Bergmann
81e3f5f2fd Mark Scheduler as non-copyable
Change-Id: Iaabc92061a1a49720f473d35251d892dd4b4f756
2016-11-09 09:50:12 +01:00
Noel Grandin
389999abdb make comphelper::containerToSequence a little smarter
So we don't have to specify the source and destination type as often.

Change-Id: Id9e286417a1cb246d163cbc3c536b231a4a92624
Reviewed-on: https://gerrit.libreoffice.org/30700
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 07:48:18 +00:00
Miklos Vajna
b58e3de0cd sfx2: let .uno:SignPDF add a matching button to the infobar
When the user uses .uno:SignPDF to open a PDF file in read-only mode,
then the infobar now has a "Sign Document" button, which is a shortcut
for the File -> Digital Signatures -> Digital Signatures menu item.

Change-Id: I2953a5cb1252c5ff1c395d45c54db1a97b39433e
2016-11-08 13:40:34 +01:00
Caolán McNamara
8bff616ae6 simplify mark points and gluepoints management
Change-Id: I52070cfe4909a13189d9c130114d98565ced9089
2016-11-08 11:22:58 +00:00
Noel Grandin
f2beebbfe7 reduce copying when decomposing drawinglayer primitives
instead of returning a Primitive2DContainer from each method which we
are then going to immediately append to another container, pass down a
single container by reference which we can append to

Change-Id: I0f28a499d2ec54f7111a7044c30099767aa079e1
Reviewed-on: https://gerrit.libreoffice.org/30258
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 10:40:57 +00:00
Noel Grandin
dca61b588a loplugin:expandablemethods in lotuswordpro..package
Change-Id: Ic9827c998f4f78775fdf5c1eaf9d4749d4986102
Reviewed-on: https://gerrit.libreoffice.org/30682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 09:21:06 +00:00
Noel Grandin
f606a6b248 loplugin:unnecessaryvirtual in basctl..chart2
Change-Id: Id4eeb12792c3a66b68a907cb459ab437e3d64e4c
Reviewed-on: https://gerrit.libreoffice.org/30680
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 08:57:05 +00:00
Noel Grandin
c123c528bf loplugin:unnecessaryvirtual in comphelper..forms
Change-Id: Iabe292e68cb84b97f207061347ed6a30309dc9fd
Reviewed-on: https://gerrit.libreoffice.org/30679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:57:57 +00:00
Noel Grandin
990102be61 loplugin:unnecessaryvirtual in hwpfilter..rsc
Change-Id: I2e9df8223d503b813b4c458747e8c44bb8ef8868
Reviewed-on: https://gerrit.libreoffice.org/30661
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08 06:10:25 +00:00
Caolán McNamara
64a708cba9 Revert "Reverts a commit series that cripple windows ci."
with addition of...

- svxlo-SvxColorListBox
+ svxcorelo-SvxColorListBox

This reverts commit db380aab10.

Change-Id: I3af7aa0abb1a430bce64188244404fcbd480b128
Reviewed-on: https://gerrit.libreoffice.org/30598
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-07 21:04:50 +00:00
Michael Stahl
f9028f1945 vcl: improve accounting of SVG images in graphics cache
The problem is that the graphics cache only counts the size of the SVG
text, which is stored in SvgData::maSvgDataArray.  However the
SvgData::maSequence may use a lot more memory, as it may contain
de-compressed bitmaps that are stored as base64-encoded PNGs in the SVG
text.

For example icon-themes/galaxy/brand/flat_logo.svg is 812 Ko but contains
60 Mo of bitmaps.

This may cause excessive memory usage and failure to export documents
due to OOM; according to valgrind massif, the bitmap buffers use 90% of
the heap.

Add a new interface com::sun::util::XAccounting, and implement
it in drawinglayer BasePrimitive2D.  VCL SvgData can't access
drawinglayer via C++ directly so this looks like the best approach.

Change-Id: I5a7c3147733e23473c1decabed24c1f79d951c7d
Reviewed-on: https://gerrit.libreoffice.org/30669
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-11-07 18:52:22 +00:00
Miklos Vajna
055be3f4be sfx2: introduce a new .uno:SignPDF
It's similar to File -> Open, but the file picker only offers PDF files
in this case, and the import is read-only -- i.e. it's the import
equivalent of .uno:ExportToPDF.

Change-Id: I7be9d6711e0ea93643e538575c0604d41cff9b26
2016-11-07 13:46:57 +01:00
Noel Grandin
d4f78fa3b6 loplugin:unnecessaryvirtual in svx..sw
Change-Id: I4ae8de558550e6577c28b95e0aaed74f00d79c29
Reviewed-on: https://gerrit.libreoffice.org/30650
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07 12:06:35 +00:00
Noel Grandin
0f96b3f33f loplugin:unnecessaryvirtual in test..vbahelper
Change-Id: I0e110af6eab798e11f96d0f7d282d59440d91965
Reviewed-on: https://gerrit.libreoffice.org/30649
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07 10:11:33 +00:00
Noel Grandin
41ea741cd8 loplugin:unnecessaryvirtual in sfx2..svtools
Change-Id: Ib34e14806f7cc9a97ecfd68687ab17ee5c1f022b
Reviewed-on: https://gerrit.libreoffice.org/30652
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07 09:39:55 +00:00
Noel Grandin
c0c69ccd2a convert sdr::animation::EventList to o3tl::sorted_vector
instead of home-grown linked list

Change-Id: I7cf24692e7b9919ac83e404e2d0167c3015b97de
Reviewed-on: https://gerrit.libreoffice.org/30569
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-07 06:39:41 +00:00
Maxim Monastirsky
5bd6b61a7c NewMenuController: Remove duplicate async dispatch handling
Change-Id: I881e6781c5ba82b0b998891532f8b7c281567b73
2016-11-06 21:36:25 +02:00
Justin Luth
a5f8c5f933 make a useful function - SvxBoxItem::CalcLineWidth
It saves lots of extra code: no separately checking if a line exists,
and then getting the width.  Closely matches the existing CalcLineSpace.

sc/source/ui/view/printfun.cxx is another place that could use this
heavily to replace their lcl_LineTotal function. Perhaps something
good for an easyHack. (Wait until LO5.4, since much of the logic
should use CalcLineSpace(,true) instead, and that function probably
will have the default bEvenIfNoLine changed to true. Compiler doesn't
like providing "true" when the default value is also "true".)

Change-Id: I298d057b2bf04959434736f6ab2666d2de4222f9
Reviewed-on: https://gerrit.libreoffice.org/30589
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-11-05 20:03:57 +00:00
Norbert Thiebaud
db380aab10 Reverts a commit series that cripple windows ci.
Revert "SvxShadowTabPage::Construct was removed"
 f9a2c1c12e.
Revert "replace OColorPopup with SvxColorWindow"
 f300754bb1.
Revert "drop AutoColorInvalid/SID_ATTR_AUTO_COLOR_INVALID"
 347c2c3345.
Revert "replace last ColorLB use with a listbox of colors"
 604b35bf55.
Revert "simplify, its just a vector of colors"
 351a97ce6b.
Revert "replace user draw with an Image of the color"
 df738e0f8c.
Revert "strip down to the used pieces"
 commit 08d6cd788f.
Revert "move now combined ColorLB to location of last user"
 a19b18ad7c.
Revert "fold ColorListBox and ColorLB together"
 a989a0b1f2.
Revert "move ColorListBox beside sole thing that uses it"
 760a198e69.
Revert "extensions leaks out details of Color Selector, patch it up"
 8bea644d61.
Revert "inherit FillAttrLB from ListBox not ColorListBox"
 d2ce812f1d.
Revert "unify color selectors"
 43bc303148.
2016-11-05 13:42:40 -05:00
Justin Luth
d034f273cb tdf#90070 don't clip flys with borders
regression from commit e598ab0447
very aggressively forced a new frame size via compat setting
CLIPPED_PICTURES on any fly - not just images.

This only affects MS-format documents, EXCEPT that it is a document
property, so if the file every spent any part of it's life in MS-format,
it will always retain that compatibility setting. That explains
why the problem was intermittent for me - and was hard to reproduce
in a clean document, even though I'd seen it in .ODTs.

bIgnoreLine (ignore the fact that there is no visible line)
was a confusing word choice for "if there is no line,
then return a spacing size of zero". bEvenIfNoLine=false is better.

Change-Id: I50a3bdef3a67339ae517ee6319920651bc56f9be
Reviewed-on: https://gerrit.libreoffice.org/30585
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2016-11-05 17:01:57 +00:00
Jan Holesovsky
32bdc50970 We have exactly the same file as include/unotools/ZipPackageHelper.hxx.
Change-Id: I2cc545c50a8ae936e73ff23a200f350809ab8335
2016-11-05 00:11:57 +01:00
Caolán McNamara
f300754bb1 replace OColorPopup with SvxColorWindow
Change-Id: I1aa06f70016b935bb13a0f6e93234eea10ba8b84
2016-11-04 17:14:32 +00:00
Caolán McNamara
347c2c3345 drop AutoColorInvalid/SID_ATTR_AUTO_COLOR_INVALID
it doesn't appear to exist/be implemented and makes
the reportdesigner font dialog from conditional
formatting crash

Change-Id: Iad929fec8aedfa31f6e8f9dfaa0055d61a9ff6f3
2016-11-04 17:14:30 +00:00
Caolán McNamara
351a97ce6b simplify, its just a vector of colors
Change-Id: I7d388739225d371090872a33d30aa3178b20ca6e
2016-11-04 17:14:29 +00:00
Caolán McNamara
a19b18ad7c move now combined ColorLB to location of last user
Change-Id: I5dc1204c28b65d5dca993bf38aea217bbb49e913
2016-11-04 17:14:27 +00:00
Caolán McNamara
a989a0b1f2 fold ColorListBox and ColorLB together
Change-Id: I485109acd7cd4d6c2dc53e29f4b01bfc202a38f3
2016-11-04 17:14:26 +00:00
Caolán McNamara
760a198e69 move ColorListBox beside sole thing that uses it
Change-Id: Ia458ded8881c415badd5d75bddad0daca57a1a25
2016-11-04 17:14:26 +00:00
Caolán McNamara
8bea644d61 extensions leaks out details of Color Selector, patch it up
and rebase it on SvxColorListBox

Change-Id: I3afef689ab0dc3c34e465810d82bf21797907558
2016-11-04 17:14:26 +00:00
Caolán McNamara
d2ce812f1d inherit FillAttrLB from ListBox not ColorListBox
Change-Id: Icd6f51b61ec0d006c10c6a75da649cc83057b9f1
2016-11-04 17:14:26 +00:00
Caolán McNamara
43bc303148 unify color selectors
Note: this removes the use of auto-color from writer's asian text grid, because
its always invisible as far as I can see in practice.

Change-Id: Ie850790d740a4d56c43015e493e093678cef3b4e
2016-11-04 17:14:26 +00:00
Caolán McNamara
54dc3dd96b use default copy and assignment operators
Change-Id: Ic784b3951fcf2f614b62d93d925eec134feb7364
Reviewed-on: https://gerrit.libreoffice.org/30567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-04 16:01:15 +00:00
Tomaž Vajngerl
f4637c07c9 convert Image manual refcounting with std::shader_ptr
Change-Id: I9a086d4a5d2f1b0d1afa3afd155eadcb2ae62ab5
Reviewed-on: https://gerrit.libreoffice.org/30543
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-11-04 08:15:56 +00:00
Miklos Vajna
3e610f8496 vcl: extract PDFWriter::GetDateTime() from PDFWriterImpl
And use it in xmlsecurity when signing an existing PDF. This is
especially important on Windows, where the PKCS#7 blob doesn't have an
(unsigned) timestamp.

Change-Id: I4051dc19a43f8f8114d9f4d02309f28d6754e9ae
2016-11-04 09:13:32 +01:00