2344 Commits

Author SHA1 Message Date
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
Noel Grandin
b1f8cf3782 loplugin:singlevalfields
Change-Id: I65f96d9cd24572c8d0946acf4d2d45eb3db83a76
Reviewed-on: https://gerrit.libreoffice.org/30476
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-02 13:06:37 +00:00
Noel Grandin
ee33745ced tdf#103334 - EDITING: Undo on bullet point style
I have checked the normal model and the editing model after UNDO, and
all seems to be well, this is purely a rendering/lack-of-invalidation
issue.

The extra invalidation I add here is restricted to the UNDO case to
prevent tripping up a LOK unit test
(SdTiledRenderingTest::testCursorViews).

I confess to not having followed the invalidation logic all the way to
see why exactly it makes the bug go away.

Change-Id: I34f7d84526462665b1ec09aba966c98cd4e8795f
Reviewed-on: https://gerrit.libreoffice.org/30225
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31 06:04:58 +00:00
Takeshi Abe
b589c4cd87 Omit comparator which is the same as default std::less<key_type>
Change-Id: I72a0b618577caececaaf3eb4df53d4cb192251da
Reviewed-on: https://gerrit.libreoffice.org/30369
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-10-31 03:48:49 +00:00
Noel Grandin
8a22bc93e0 update unnecessaryoverride plugin to find pure forwarding methods
which can be replaced with using declarations.

Is there a more efficient way to code the search? Seems to slow the
build down a little.

Change-Id: I08cda21fa70dce6572e1acc71bf5e6df36bb951f
Reviewed-on: https://gerrit.libreoffice.org/30157
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-28 12:56:17 +00:00
Caolán McNamara
117fc49c97 ScopedVclPtr vs std::unique_ptr for VclAbstractDialog derivatives
Change-Id: I5e43312b6f42ce0c63946f366eaf1e6dcb9629b2
Reviewed-on: https://gerrit.libreoffice.org/30344
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-10-28 09:08:50 +00:00
Noel Grandin
eca5ea9f79 make the AbstractDialog stuff extend from VclReferenceBase
Because some stuff wants to multiple-inherit from VclAbstractDialog and
OutputDevice-subclasses, and we'd prefer to keep all the lifetime
management through a single smart pointer class (VclPtr)

The change in msgbox.cxx and window.cxx is to workaround a bug in
VS2013 to do with virtual inheritance and delegating constructors.

Change-Id: I178e8983b7d20a7d2790aa283be838dca5d14773
Reviewed-on: https://gerrit.libreoffice.org/29140
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-27 06:08:30 +00:00
Caolán McNamara
c484c353ef rework to avoid coverity#1371205 Missing move assignment operator
Change-Id: I117fa0891e8cd1bf339bded93a7ee19d799caf9f
2016-10-26 21:34:33 +01:00
Caolán McNamara
424c7fb6ca we don't need ree after the loop here
Change-Id: Ib288ab3a7abf8f45c1175c36dcd4349dc4ad019f
2016-10-26 21:24:01 +01:00
Noel Grandin
861a322c66 loplugin:expandablemethodds in include/editeng
Change-Id: Iaf56cb9c16a4cbfb9ab1636228c77d1033a334f5
Reviewed-on: https://gerrit.libreoffice.org/30132
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-21 13:00:01 +00:00
Noel Grandin
d76027bb78 add dumpAsXmlEditDoc
to dump the current editing document to editdoc.xml on F12

Change-Id: I1b9cc2edb6429aa0bf651bdd52cac70dfd4db9d0
2016-10-20 09:06:00 +02:00
Noel Grandin
6f96e86dae loplugin:expandablemethodds in editeng..extensions
Change-Id: Ibe1929d74ff460955e39f2ccce3056b2051ddf08
Reviewed-on: https://gerrit.libreoffice.org/30013
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-19 06:31:43 +00:00
Noel Grandin
292560a957 loplugin:unusedmethods
Change-Id: Icf773925c37dde8b7404edac9864e7b10fe113b4
Reviewed-on: https://gerrit.libreoffice.org/29968
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-18 06:15:55 +00:00
Eike Rathke
75c2ecc249 let LanguageTag::convertToLocale() decide when to create a temporary
Change-Id: Iaefddb13192aff1aad912ac9f908c3d12236b94d
2016-10-17 22:06:39 +02:00
Jochen Nitschke
9ac8a57e52 replace <<= with assign for <<= with rhs Any
makeAny and Any ctor return an Any

Change-Id: Iaa361bc315d785f80153acf1009bf47d109728ec
Reviewed-on: https://gerrit.libreoffice.org/29914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-10-17 15:39:13 +00:00
Marco Cecchetti
d4ddc8cb00 LOK: Calc: fixed missed tile invalidations on cell text editing
What's new:
1) when an edit view is killed, the area which was used by the edit
view is invalidated for both own window and other view windows after
the edit view has been destroyed;

2) when an edit view is created or its out area is expanded, the
windows of other views are invalidated too;

3) when a vertical scroll occurs in the edit view area the windows of
other view are invalidated too;

4) same methods renaming since now we add/remove windows not edit
views.

Change-Id: Iac54f5b182c9562f08bb724f9ddde1c26cffa2e7
Reviewed-on: https://gerrit.libreoffice.org/29783
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-14 15:07:56 +00:00