Commit Graph

611 Commits

Author SHA1 Message Date
Miklos Vajna
189d3e10c7 sw: fix some IWYU warnings
Change-Id: I0241707fcdf1d22131ce35fb64488fcf6d669675
Reviewed-on: https://gerrit.libreoffice.org/52750
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-12 09:08:08 +02:00
Miklos Vajna
3613c299f6 sw: fix some IWYU warnings
Change-Id: I3682cc475de8342e4cdf122a35f6c1cfddd4c01e
Reviewed-on: https://gerrit.libreoffice.org/51677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-21 09:27:53 +01:00
Miklos Vajna
7bde30fd65 Fix some IWYU warnings
Change-Id: If1e6727e4b5bb225495e20d5dfb78fa5da770f75
Reviewed-on: https://gerrit.libreoffice.org/50060
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-21 12:14:18 +01:00
Michael Stahl
f311dc973e sw: convert DELETEZ to unique_ptr in SwDoc
Change-Id: Ice9957fefea98a878281f64ab129a452a31f27bb
Reviewed-on: https://gerrit.libreoffice.org/49668
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-14 10:11:44 +01:00
Johnny_M
499bff1f06 Translate German variable names
Akt -> Current in SwDoc and SwTable

Change-Id: Ie8c5194b81e8dc5078616603215726a0a51b1617
Reviewed-on: https://gerrit.libreoffice.org/49537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-12 11:07:42 +01:00
Miklos Vajna
152e022f1e Fix some IWYU warnings
Change-Id: Ie1639cc4017d696ea3fd9ffb96f1559aa3ac6397
Reviewed-on: https://gerrit.libreoffice.org/49340
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-08 13:11:55 +01:00
Noel Grandin
51ee91a3ca TypedWhichId in sw(1)
Change-Id: If9330b2ea7e40f4775b1edd9611d35c6ddf31a00
Reviewed-on: https://gerrit.libreoffice.org/49185
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-05 07:53:31 +01:00
Noel Grandin
20e5f64215 loplugin:unused-returns in sw
Change-Id: I753fcdd35d461880a8d8160213cabd465cfde967
Reviewed-on: https://gerrit.libreoffice.org/48189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-30 07:20:51 +01:00
Caolán McNamara
86e9d28c58 coverity#1401307 Uncaught exception
and

coverity#1401308 Uncaught exception

Change-Id: Ia8ab29a45888cf9b1014e4e4ac32c5de930a2935
Reviewed-on: https://gerrit.libreoffice.org/48688
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-26 21:32:32 +01:00
Michael Stahl
7dbe76266c sw: convert SwDoc::mpDBManager to unique_ptr
Very odd things are happening in dbmgr.cxx to override this member,
so add a 2nd member that points to the DBManager that is actually used.

Change-Id: If5d4ea1e4951a0406fddcb71302c53ee7b37a34e
2018-01-25 19:47:44 +01:00
Miklos Vajna
fc2d155f42 Fix some IWYU warnings
Change-Id: I4b6e799c1afc2a762a3729ee89f3226c59a6eef8
Reviewed-on: https://gerrit.libreoffice.org/48462
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-24 10:14:09 +01:00
Caolán McNamara
13624b4796 out of date 'define private public' comment
Change-Id: I21663a7eef846244f330b3236a2ff1a2efae15bb
Reviewed-on: https://gerrit.libreoffice.org/48174
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-19 14:37:35 +01:00
Miklos Vajna
53ef918a68 sw: lazy load table autoformats for style purposes
Commit b7138e03eb (GSoC Writer Table
Styles; Import bugfix, 2016-07-26) changed the SwDoc ctor to always load
the table autoformats, which is expensive for simple documents. Avoid
the load in the ctor by switching to lazy-load and adding a way to count
the number of styles without loading the autoformats when there would be
none.

(mpTableStyles -> m_pTableStyles was only necessary to see if there is
access outside GetTableStyles() to this member, but there were not any.)

Times for 100 hello world inputs: 3863 -> 2753 ms is spent in XHTML-load + ODT
export + close (71% of original).

Change-Id: I6737e7712c775573b56c8b0566e8e7fb615edee6
Reviewed-on: https://gerrit.libreoffice.org/47820
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-13 01:05:09 +01:00
Noel Grandin
4855257e52 loplugin:passstuffbyref improved return in sw
Change-Id: I4484ac461761e4c46364b4f473c7e62f8ec72103
Reviewed-on: https://gerrit.libreoffice.org/47243
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-02 12:19:10 +01:00
Noel Grandin
0093ae5f2c loplugin:countusersofdefaultparams in sw (3)
Change-Id: I2657c1146bc377135e13116f32dbf518f8815417
Reviewed-on: https://gerrit.libreoffice.org/45318
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-27 13:50:34 +01:00
Noel Grandin
c40d9ecd91 loplugin:unnecessaryvirtual
Change-Id: I5696c853daa16c9e55ff046d67102ba3042bfea8
Reviewed-on: https://gerrit.libreoffice.org/44459
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-09 07:27:39 +01:00
Noel Grandin
5f41f7b33e loplugin:constantparam in sw
Change-Id: Ia477de0fb910f6a8fbb0a5054f4bdb43dd9ff381
Reviewed-on: https://gerrit.libreoffice.org/43951
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27 20:37:02 +02:00
Stephan Bergmann
62f47bb2a5 loplugin:includeform: sw
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
2017-10-23 22:45:50 +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
Jan-Marek Glogowski
53da556c60 Don't schedule the Idle job for busy documents
This refactors DocumentTimerManager to export the busy status
independent of the Idle function. This way it can be ignored in
the Scheduler while the document is busy,

Change-Id: Icec2075d3338ad8dd4440678eb0570d7fe887778
Reviewed-on: https://gerrit.libreoffice.org/43197
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-10-06 15:03:35 +02:00
Noel Grandin
cc483d0470 tdf#112292 - fix memory leak and use more auto ref counting in sw
this bug was introduced in

    commit a754294ac7
    use rtl::Reference in SwDocFac instead of manual acquire/release

fix it by using automatic ref-counting (i.e. rtl::Reference) everywhere.

Note that the logic in SwViewShell::~SwViewShell is somewhat
interesting.
From my reading of it, it was previously potentially calling
getIDocumentLayoutAccess on an SwDoc that had just been deleted.

So if there is a problem with this commit I would look there first.

Change-Id: I95b6b7e7523689c8b56063af642c3a84cbdcd331
Reviewed-on: https://gerrit.libreoffice.org/43131
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-05 13:49:22 +02:00
Noel Grandin
20356442cd loplugin:mergeclasses merge IInterface with SwDoc
Change-Id: I6d400540c878db4504f6830aa9a3a6a381162520
Reviewed-on: https://gerrit.libreoffice.org/43127
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-04 15:06:04 +02:00
Johnny_M
06c07c0dc1 Translate German comments/debug strings (leftovers in dirs starmath to sysui)
Translates leftovers found using a custom regex.

Additionally translated:
- One randomly found comment in /reportdesign
- Test strings in /stoc/test (let's see if it works)

Change-Id: I5f893c194c4b56b5365700928a3b8b63936d03e2
Reviewed-on: https://gerrit.libreoffice.org/41583
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-08-28 12:03:56 +02:00
Noel Grandin
98d7b40986 loplugin:constparams in sw part2
Change-Id: I51ae0e8caaf46f141d3d15ace47612df1e476de7
Reviewed-on: https://gerrit.libreoffice.org/40735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 21:32:05 +02:00
Noel Grandin
5176c1dd60 loplugin:constparams in sw part1
Change-Id: Id8d8afe268a82585ec2d3699411073dfb905d6ba
Reviewed-on: https://gerrit.libreoffice.org/40734
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03 20:49:15 +02:00
Noel Grandin
fb8b0585d9 loplugin:checkunusedparams in sw
Change-Id: I8a6b2647375a54720cd9fd765cc51c9ff43c8190
Reviewed-on: https://gerrit.libreoffice.org/40682
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-02 20:52:47 +02:00
Noel Grandin
4732e65646 loplugin:unusedfields in sw
Change-Id: Iad2bddb2359af3e7da40175d17d2d3ed7eda5be6
Reviewed-on: https://gerrit.libreoffice.org/40229
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 12:09:00 +02:00
Noel Grandin
31a85a9a13 convert UNO event ids to scoped enum
I'm fairly sure there are more simplifications that could be make here.
It seems like we have both an ID and a string name for all of these
events, and we could probably get by with just one of those, or
alternately, centralise the name<->id mapping somewhere

Change-Id: I978073822ddbebce94ac5b560fea675bea905a35
Reviewed-on: https://gerrit.libreoffice.org/40392
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25 12:21:22 +02:00
Michael Stahl
4a932d3b67 sw: comment cosmetics
Change-Id: I572bf8b28738e82e2f207b5201a0c27d9d9b623d
2017-07-06 23:29:42 +02:00
Noel Grandin
09a4d2faa4 loplugin:unusedfields in sw
Change-Id: I807f93757bfddf17f71568f1e3c174229f169f18
Reviewed-on: https://gerrit.libreoffice.org/39409
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03 10:19:03 +02:00
Justin Luth
9d6bf9d45d tdf#74177 writer: ignoring comment allows number recognition
The presence of an annotation anchor was causing number recognition
to fail in Writer's table cells. Formulas accessing the cell
read a value of zero.

Annotation anchors are only used in SW right now, so SVL didn't
want the overhead in their code. So this wrapper function should
be called first to cleanup SW specific things that interfere
with number recognition.  Specifically known to be needed in
cellfml.cxx, but converted everywhere for consistency.

The formula in older documents is not "fixed" during document loading
since the table/formulas are not refreshed at load time.
Only documents saved with incorrect results will notice this,
and any cursor access inside the table will cause a refresh.
Printing also causes a refresh (but not print preview or PDF export).

So this patch only fixes document creation or modification, which
should be adequate for this bug.

Change-Id: Ib46f2b7899ae9a0fdc3aae5887bb2d61535d29f3
Reviewed-on: https://gerrit.libreoffice.org/32909
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-06-07 06:53:41 +02:00
Noel Grandin
0aa7c716cc loplugin:checkunusedparams in sw(part2)
Change-Id: Ic6829542628ed1f5ed7d6b3d6be1d28ed1b5c75b
Reviewed-on: https://gerrit.libreoffice.org/37292
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08 11:40:01 +02:00
Noel Grandin
90f94f399e loplugin:checkunusedparams in sw(part1)
Change-Id: I4847b0f96033016e020212fb8d7331309db25b55
Reviewed-on: https://gerrit.libreoffice.org/37287
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08 08:31:04 +02:00
Noel Grandin
925dabe8fd Revert "SwTOXTypes can just be a std::vector typedef"
This reverts commit f894da4e687302702d14218138f96ed1c4983124.

the default behaviour of SwVectorModifyBase is to free the
elements in it's destructor

Change-Id: I7a34fe5cc3cb8ffbcbb92068f4bb816dfd9acd43
Reviewed-on: https://gerrit.libreoffice.org/37168
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02 22:00:57 +02:00
Caolán McNamara
de9106a511 Revert "SwFieldTypes can just be a std::vector typedef"
This reverts commit 5eaad8eb1d.

cause it now leaks as the ~SwVectorModifyBase base deletes the entries

Change-Id: I02374f4b439b9cf3e8f331aa9c6892b4418f37f0
2017-05-02 15:40:28 +01:00
Noel Grandin
5eaad8eb1d SwFieldTypes can just be a std::vector typedef
Change-Id: I10b43a71c8cedc6efbb30056d3da7fd431f04791
Reviewed-on: https://gerrit.libreoffice.org/37121
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02 08:17:55 +02:00
Noel Grandin
680e723533 SwTOXTypes can just be a std::vector typedef
Change-Id: I0b20f4dfdbc692e9122f64a11b65bd4234e00ee7
Reviewed-on: https://gerrit.libreoffice.org/37120
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-01 18:42:17 +02:00
Noel Grandin
518cf484c7 convert TableMergeErr to scoped enum
Change-Id: Ie3d15845e47c514411baadecff92025f3e0c4e21
Reviewed-on: https://gerrit.libreoffice.org/36476
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-13 08:49:43 +02:00
Noel Grandin
890d679071 convert TableChgWidthHeightType to o3tl::typed_flags
Change-Id: I9009f3302f4d117744d80f8816ddd177bae6639d
Reviewed-on: https://gerrit.libreoffice.org/36460
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-13 08:48:23 +02:00
Andrea Gelmini
402aa305b7 Fix typos
Change-Id: Ia87318cb323d403cdff947da0b70e0d2aabaacd4
Reviewed-on: https://gerrit.libreoffice.org/35657
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-25 16:13:45 +00:00
dennisroczek
b49b79ae27 fix typo: bee --> be or been
* Removed old comment cruft
* clean up some indentation

Change-Id: I0ddbd66aec0f27d7563dc4c2cfa2e095a48cda46
Reviewed-on: https://gerrit.libreoffice.org/35134
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-22 11:30:04 +00:00
Andrea Gelmini
47a9523f3f Fix typos + some German translations
Change-Id: I1c5bb725ffdf72363279436ad9bbb88064228253
Reviewed-on: https://gerrit.libreoffice.org/35406
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-19 10:05:45 +00:00
Jochen Nitschke
b224dadbca drop upcasts
Change-Id: I188cac932d34472c4e0adbc7fc31ff9f6f9e4898
Reviewed-on: https://gerrit.libreoffice.org/35339
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-17 19:14:31 +00:00
Stephan Bergmann
a6ded3b013 Clean up integers representing positions in SwOutlineNodes vectors
Change-Id: If1a6a9cb61ffd355a85835127e7c893969833587
2017-03-16 09:30:20 +01:00
Noel Grandin
8ccbc16b5e convert SvxFrameDirection to scoped enum
Based on the casts in chart2/source/view/main/ChartView.cxx
and the similarity of naming of values, I conclude that this
enum was intended to abstract over css::text::WritingMode2.

Added a comment to that effect.

Change-Id: I3af8bbe8b6ac8c4a9375f6ccde145b98b9c69a57
Reviewed-on: https://gerrit.libreoffice.org/35164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-15 08:35:10 +00:00
Noel Grandin
427678b9cf remove noise UUUU tags in comments
Change-Id: Id8a2940ae7348bf75ca967f31adf8489dc678d00
Reviewed-on: https://gerrit.libreoffice.org/35161
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-14 08:23:53 +00:00
Stephan Bergmann
6cb9e6dad7 Remove redundant 'inline' keyword
...from function definitions occurring within class definitions.  Done with
a rewriting Clang plugin (to be pushed later).

Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8
Reviewed-on: https://gerrit.libreoffice.org/34874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03 20:55:50 +00:00
Noel Grandin
b8d977c017 convert CharCompressType to scoped enum
and move it to svl, where it belongs

Change-Id: Ic4d846419dfe2dd85de5ade8ed1a041867bbf1dc
2017-02-13 08:17:42 +02:00
Noel Grandin
62232e60bf convert SplitTable_HeadlineOption to scoped enum
Change-Id: I5a9ea036b8827a84e646488b2b57012ebadd4d0a
2017-02-13 08:17:42 +02:00
Jan-Marek Glogowski
bf110d40ef Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:

  1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
  2. split the inheritance of Idle from Timer again to maintain
     different Link<>s and move all common code into a TimerBase.

While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.

And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.

It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).

Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-23 20:49:05 +01:00