2409 Commits

Author SHA1 Message Date
Jochen Nitschke
a29bd2dabb cleanup tailing backslashes
Change-Id: Idb4bfc97e7d758c58118742affd9a9345c7a99f2
Reviewed-on: https://gerrit.libreoffice.org/32491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-30 18:48:24 +00:00
Noel Grandin
833e6ca9d2 use std::vector instead of naked array in SfxItemPool
Change-Id: I2d4ac010ff5818e673567cee05700872588918e4
Reviewed-on: https://gerrit.libreoffice.org/32384
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-12-26 18:35:59 +00:00
Noel Grandin
6b8ee3c9ba convert VclButtonsType to scoped enum
Change-Id: I9b91108c18e190060dc71546977aa8a3c11f06e1
Reviewed-on: https://gerrit.libreoffice.org/32285
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
2016-12-21 16:19:37 +00:00
Noel Grandin
f573de2a95 no need to wrap calls to SAL_INFO in #ifdef DBG_UTIL
Change-Id: Ic373a8f145f3f78c3f109e36a9c1dd9156f0dd75
Reviewed-on: https://gerrit.libreoffice.org/32034
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-19 08:29:01 +00:00
Stephan Bergmann
10bf49c18d loplugin:unnecessaryoverride
Change-Id: I24a0e495b64a1db8b7c45f3c68e06ad3301bd9c4
2016-12-16 10:37:26 +01:00
Michael Stahl
5a3b211117 tdf#104488 editeng,svx: throw less Accessible exceptions
For some of these functions it doesn't make sense to throw
DisposedException as they can return a sensible default value.

Particularly AccessibleShape::getAccessibleChildCount() was throwing an
exception that was never caught.

Change-Id: I000149cf9bb0fd13f69650ad8224a8daf26f7bee
2016-12-16 10:20:50 +01:00
Noel Grandin
d15b4e2045 teach sallogareas plugin to catch inconsistencies
Change-Id: I8bcea5ffc74d48148bea78da8c17744e288c069a
Reviewed-on: https://gerrit.libreoffice.org/32004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-15 06:45:14 +00:00
Noel Grandin
3a705ab405 OSL_TRACE->SAL in avmedia..canvas
Change-Id: Id9077ea29e7028c12f40abfd4c57756c863e3cd9
2016-12-13 08:14:00 +02:00
Noel Grandin
c3586b684c OSL_TRACE->SAL in chart2..oox
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2
Reviewed-on: https://gerrit.libreoffice.org/31907
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-13 06:12:00 +00:00
Julien Nabet
b5ae4ccf46 tdf#104540: AccessibleEventNotifier AccessibleBase (editeng)
See https://bugs.documentfoundation.org/attachment.cgi?id=129537 for bt
For the remind, it follows a replace of OSL_ENSURE by an assert, see:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=8228227168a7eb3ebf14629bec87f01536c23970

Change-Id: Id05eeb6e6669232e9b5cc2ef2989827fef3025d0
Reviewed-on: https://gerrit.libreoffice.org/31918
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-12-12 21:40:56 +00:00
Caolán McNamara
510f497f05 coverity#1397045 Unchecked return value
and

coverity#1397044 Unchecked return value

Change-Id: I193bd676e417c35450efa91cb5773c78c998b63f
2016-12-12 09:47:41 +00:00
Khaled Hosny
9db5cfc889 Drop ComplexDisabled flags that does nothing
There is no such thing as simple text layout in this brave new world.

Change-Id: I641b7efa5ec8fdd9839c291e7f2fdb736361ef1e
Reviewed-on: https://gerrit.libreoffice.org/31824
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-11 00:26:54 +00:00
Noel Grandin
a66731982e convert SFX_HINT to scoped enum
Notes

(*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a
dynamic_cast check.

(*) In SC, removed the hint id field from ScIndexHint, no point in
storing the hint id twice

(*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no
point in storing two different hint ids

(*) In some cases, multiple #define's used to map to the same SFX_HINT
value (notably the SFX_HINT_USER* values). I made all of those separate
values.

Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5
Reviewed-on: https://gerrit.libreoffice.org/31751
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08 12:35:09 +00:00
Mike Kaganski
1d74d19a76 Monkey business: Fix typo in comments: et -> ed :)
Change-Id: I91440e8582108b9121ac6525c8ac88ad6f218a60
Reviewed-on: https://gerrit.libreoffice.org/31721
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-12-07 11:28:59 +00:00
Jochen Nitschke
dce3d70d26 use initialization list
guess comments in EditSelection ctors were about
calling copy-ctor directly instead of default-ctor + copy assign

Change-Id: I0f849d7e9af3d3b8c6d8688f549b3539a0c67873
Reviewed-on: https://gerrit.libreoffice.org/31632
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-05 19:25:10 +00:00
Noel Grandin
50151db9f7 convert FSysStyle to o3tl::typed_flags
Change-Id: I58a63a0e6f619442f21827064644ecd8ca57b8ff
2016-12-05 12:49:02 +02:00
Noel Grandin
bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Yossi Zahn
c6db0e0649 tdf#96354 correct broken autocorrect INitial CApitals
Change-Id: If65ec7814c3aed5e4c17294ae57c34550373469d
Reviewed-on: https://gerrit.libreoffice.org/31317
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-12-05 08:20:01 +00:00
Stephan Bergmann
b1dd9a631a loplugin:unnecessaryoverride (dtors) in editeng
Change-Id: I7a268a1e991e84304e5435e0f7b633873f6829eb
2016-12-05 09:04:59 +01:00
Eike Rathke
48aa8dfa60 add a SAL_WARN() for the broken portion continuation
Or should that even be an assert() to force callers to fix things?

Change-Id: Ie0f10394376f088a7af9399ee42503fc403ca094
2016-11-30 19:24:27 +01:00
Eike Rathke
7c20d0174c Resolves: tdf#104152 suppress notifications from EditEngine during Paste
Broadcast once at the end instead to notify a11y.

Change-Id: I12383b6efbbb2b149f0d73c67d8576fcc050b253
2016-11-30 14:48:34 +01:00
Eike Rathke
fff0cf20e4 prevent endlessly creating new lines until out of memory, tdf#104152
Though this just prevents mishappens during reformatting a broken portion that
is in a half-ready state because a11y was notified and attempts to obtain a
paragraph. Solving the real cause means not being called in such state..
However, not going out of memory and also having matching X-values for the
node's text positions that don't make the EditEngine crash later is better than
nothing.

Change-Id: Ifa8d2c5d1766b0f145b8e89ad26a78528db42056
2016-11-30 14:48:34 +01:00
Mike Kaganski
bbda0736ed Use derived classes' methods instead of Pair::A/B
Change-Id: I7ffd9a23dbd00672630bc8412e95525a920c5065
Reviewed-on: https://gerrit.libreoffice.org/31379
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2016-11-29 20:46:53 +00:00
Stephan Bergmann
bffac17a82 Rewrite some (trivial) assignments inside if/while conditions: editeng
Change-Id: I374fcd08bdeb37ff542447142b1b164886e0e5db
2016-11-29 17:21:18 +01:00
TiagoSantos
6bfe94a631 extend markup support (/italic/ and -strikeout-)
* adds to LibreOffice markup support for /italics/ and -strikeout-
* TODO update strings in the Options dialog (they only refer *bold* and
_underline_)
* TODO update documentation with new feature

Change-Id: I6fd7bbd036bf406a9e24500d316e7f28a848faab
Reviewed-on: https://gerrit.libreoffice.org/31076
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-24 07:31:29 +00:00
Noel Grandin
76ab8c76da replace CHAR flags with o3tl::typed_flags
the usage of which looks a little dodgy, because this is a bitmask, but
it's using == everywhere to check them

Change-Id: I8e57d4f943a9048cc457a376ffbdfde0cffe22dd
2016-11-23 11:55:09 +02:00
Noel Grandin
84e3e6ee04 convert DELMODE to scoped enum
Change-Id: Idd3f45adb43930358420dba464dbdb88fe27b91d
2016-11-23 11:55:09 +02:00
Noel Grandin
1a4cb47b27 convert GETCRSR constants to o3tl::typed_flags
Change-Id: Ia367d9a1b73d6c5b7a7989da45af0f002c43413c
2016-11-23 09:34:19 +02:00
Noel Grandin
aebf05f324 convert ATTRSPECIAL to scoped enum
Change-Id: I8abf09dc5f17343945b909887c580e9016a79ac5
2016-11-23 09:19:09 +02:00
Noel Grandin
beb8cfcf32 convert inventorId to scoped enum
SW_DRAWLAYER had the same value as SC_DRAWLAYER, so I merged it into the
ScOrSwDraw enum constant

Change-Id: I5c45d378c00364d11cc960c9e48a6e3f10928724
Reviewed-on: https://gerrit.libreoffice.org/31037
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-21 12:09:09 +00:00
Caolán McNamara
a57300a5fc make this just every so slightly less awful
Change-Id: Iddc39359d426f345eff0abf9fc9616e19597a0a4
2016-11-21 10:51:36 +00:00
Michael Stahl
3662061633 editeng: assert SfxPoolItem::operator==
Change-Id: Ia6c6f4f5af1e3a803b464ab410558984c3861a65
2016-11-18 22:21:55 +01:00
Noel Grandin
72ffa98e89 make the element names in dumpAsXml match the class names
Change-Id: I955facfe3e901fcb76798dab342f96a67d5ac63f
Reviewed-on: https://gerrit.libreoffice.org/30894
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-16 09:20:59 +00:00
David Tardon
27a165cfc9 drop useless semicolons
Change-Id: I039f8ff491b42ea9c3936bf13922df8095434228
2016-11-13 19:08:22 +01:00
Caolán McNamara
5abd8d2eee coverity#1371263 Missing move assignment operator
Change-Id: Ifb4117afac4aa86893e674a581e1a7bb80925ee3
2016-11-11 17:03:11 +00:00
Caolán McNamara
f731296e0c check for self-assignment
Change-Id: I74eb934d19c0b511870e5a675917ca4baaf768cc
2016-11-11 17:03:11 +00:00
Caolán McNamara
4a862a6a01 make it more typical copy ctor
Change-Id: I0367e24b966a5bcc0d4838022ae12054e097270e
2016-11-11 17:03:10 +00:00
Caolán McNamara
d5233a94fd seems dubious to copy the state, but drop the load again bit
if the assigned-to item had loaded its original content, but the assigned-from
item hadn't, then surely the assigned-to item will never load the new content.

if the assigned-to item hadn't loaded its original content, but the
assigned-from had, then why load it again

Change-Id: I68c2cf2682a517e7e630ab6cbc637b35a2b9c7aa
Reviewed-on: https://gerrit.libreoffice.org/30781
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 17:02:38 +00:00
Caolán McNamara
d34572d39d these are going to get overwritten immediately
Change-Id: I065ae2aa2dead0679d05f080124ed54c27f0d68f
2016-11-11 16:21:48 +00:00
Caolán McNamara
763c47724d make this operator= a little less crazy
if SetGraphicPos was called with GPOS_NONE then
xGraphicObject, maStrLink and maStrFilter are
in a suitable state to copy to get the same
results as explicitly forced here

Change-Id: Id072590e92e0c083a3cbc443db0e85d9dbfa73f0
Reviewed-on: https://gerrit.libreoffice.org/30780
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-11 16:13:31 +00:00
Caolán McNamara
7c0bc67279 why have a pimpl with somethings in it and somethings not
Change-Id: I6151defcd9dddf4582ecf8d5952f6f8a825c545a
2016-11-11 15:19:51 +00:00
Caolán McNamara
bc09385ce2 the pStream member makes no sense at all
maybe the PurgeMedia call in sw was meant to be a PurgeGraphic
call originally

(PurgeGraphic since removed by...
commit a22ac2c218870033822120bf0b0d6cfde6ce799f
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Thu Jul 14 22:06:29 2011 +0100

    callcatcher: remove unused methods)

PurgeMedia releasing the stream makes no difference to the only place its used
which is SvxBrushItem::GetGraphicObject which makes a new one every time
anyway.

the SvxBrushItem assignment operator doesn't change the stream
member of the pImpl which looks utterly nuts, so its a good thing
the stream is not reused

Change-Id: Ie0dee22a6640a6916908fcddbc3541ba85034217
2016-11-11 14:47:40 +00:00
Caolán McNamara
af92221020 this looks like a leak to me
Change-Id: Id72d770ec55d6e627a81cc9590cb59f6c84f27b9
2016-11-11 14:47:16 +00:00
Caolán McNamara
edff2837c3 use std::unique_ptr
Change-Id: I03e2fb2d3ad1b0b7e64f93dbee172b119ef7bf40
2016-11-11 14:47:16 +00:00
Noel Grandin
1ba4bb6397 loplugin:countusersofdefaultparams in editeng..rsc
Change-Id: I8a8d13faf228cbc934ae21d6763d92d370eb42ec
2016-11-11 12:12:22 +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
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
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
Justin Luth
d034f273cb tdf#90070 don't clip flys with borders
regression from commit e598ab04476a32a08f18e8f0662fafa5f78f1a4a
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
Noel Grandin
2dfc4c0845 loplugin:oncevar in desktop..filter
Change-Id: I21c47cacbcd68f06eea7ccbbfa6d04fc65e2b7ee
Reviewed-on: https://gerrit.libreoffice.org/30564
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-04 13:15:29 +00:00