Commit Graph

64 Commits

Author SHA1 Message Date
Noel Grandin
9b68ce7b0f loplugin:unusedfields in sw part5
Change-Id: I4111ed1dcb04e010ecfb93df3a7e7bf715abf585
Reviewed-on: https://gerrit.libreoffice.org/39044
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21 15:30:43 +02:00
Noel Grandin
f05d0d0582 loplugin:unusedfields in sw part1
Change-Id: Iabbf7f09c0d92b488d7e03f4436f077c5e6e87aa
Reviewed-on: https://gerrit.libreoffice.org/39039
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21 14:22:51 +02:00
Noel Grandin
0265bdb92e convert GRFILTER constants to ERRCODE_GRFILTER_
since various code mixes these constants in with ErrCode values from
other code, let us just make it into real ErrCode values.

Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95
Reviewed-on: https://gerrit.libreoffice.org/38313
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-02 09:00:13 +02:00
Noel Grandin
b35a4cf023 loplugin:checkunusedparams in sw(part5)
Change-Id: Iee48e6c77f1eb57cd8a3a245e5415051b85f4cc1
Reviewed-on: https://gerrit.libreoffice.org/37387
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09 10:44:03 +02:00
Noel Grandin
bad8bb2414 convert SelectionType to scoped enum
Change-Id: Iefdf6d47b1c0189c3b3e39ad5a025e95f18fe6b6
Reviewed-on: https://gerrit.libreoffice.org/36446
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-12 11:34:22 +02:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +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
d8499c45eb convert ShellModes to scoped enum
and drop read-only SHELL_MODE_DRAW_CTRL enumerator

Change-Id: I2ccaeb492912c876b89ff9b5dccaa99e28a268b7
2017-02-13 08:17:42 +02:00
Stephan Bergmann
28a42c1b72 New loplugin:externvar: sw
Change-Id: If850989ee513d29ed373df0c6dd9905ec694026c
2017-01-09 15:40:22 +01:00
Stephan Bergmann
424d17e62e ScTabViewShell::InnerResizePixel must not mark document as modified...
...when merely toggling the edit mode of a Calc document embedded in another
document (via "Insert - Object - OLE Object... - LibreOffice 5.4 Spreadsheet").

Interestingly, none of the other document kinds seem to have this problem.
(Maybe it's even unhelpful that ScTabViewShell::InnerResizePixel calls
SetDocumentModified() at all?)  Anyway, pass this inplaceEditModeChange
information down there.

Change-Id: Iffb24b068419e3608c9f4b5e9645e44e1716aafe
2016-11-30 15:27:25 +01: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
Noel Grandin
9ab408277b loplugin:expandablemethodds in sw(part1)
Change-Id: Ic3a558e6b646b6b6bc4cb7e09a00695553023534
Reviewed-on: https://gerrit.libreoffice.org/30073
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-20 12:17:01 +00:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Jochen Nitschke
0f33526ec2 put all SfxShell feature flags in one typed_flags class
make values unique across modules.
check if flag used in correct module.

Change-Id: I656ffd3d527dd895777e14e1cc933c8b9b3f6e46
Reviewed-on: https://gerrit.libreoffice.org/28906
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-14 20:05:29 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Noel Grandin
579426f798 loplugin:constantparam in sw
Change-Id: Ic49d1c3c7b57fb213964ddc21b0f774c762aad94
2016-09-08 09:23:40 +02:00
Miklos Vajna
7167c2b654 sfx2 lok: introduce SfxViewShell::NotifyCursor()
It allows removing the hide/show cursor hack in
SfxViewShell::registerLibreOfficeKitViewCallback() introduced in commit
4d211384f0 (sfx2 lok: fix missing view
cursors in a new view, 2016-06-20), and instead let the application code
in sw/sc/sd implement the best way to show existing cursors in a new
view.

This way the per-app cleanup of view cursors introduced in commit
bc9b4fd4c8 (lok::Document::destroyView:
clean up view cursors/selections, 2016-07-15) has matching per-app init
code.

This commit just adds the API + adapts existing sw code to use it, sc/sd
still has to be implemented.

Based on a patch by Marco Cecchetti, thanks!

Change-Id: I38510fa4962f405b1b96a79024206c9e7f33cad2
Reviewed-on: https://gerrit.libreoffice.org/28557
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-31 17:18:57 +00:00
Noel Grandin
228d0950f5 loplugin:countusersofdefaultparams
Change-Id: I7150494a56abc6ec9c7fba39cefe3967a475f073
2016-08-25 13:47:05 +02:00
Noel Grandin
a6a2b2826d loplugin:countusersofdefaultparams in sw
Change-Id: I668bfe93d77b06385544651583bcf71f6b5df2fc
2016-08-19 08:15:49 +02:00
Miklos Vajna
cb9362faad sw redlining: support per-view authors
In case there are multiple SwView instances and SetRedlineAuthor() is
called with a non-empty string on them, switching views will keep the
SwModule redline author string up to date as expected.

Change-Id: I363221049dbacd67d7c8f4ff3e778f8032a3bc43
2016-08-18 11:37:59 +02:00
Noel Grandin
95be297746 loplugin:unusedenumvalues in sw
Change-Id: Ia5faa65cd7824183cead2634edab96b5d23a6c02
Reviewed-on: https://gerrit.libreoffice.org/28072
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-17 06:43:45 +00:00
Caolán McNamara
7b355ad06e Resolves: tdf#101382 turn SetMailMergeConfigItem into a shared_ptr
so if the SwView it nominally belongs to is deleted while a
mail merge wizard is open it still exists while the wizard
has a ref to it

Change-Id: I4f5acbcc1ea6404851cf6e0179fd3c795342f726
2016-08-09 14:37:53 +01:00
Miklos Vajna
73c8bc849c sw layout xml dump: mention SfxViewShell addresses
Change-Id: I2e5c8102684494fd3d7c1c70971a09d0c940a124
Reviewed-on: https://gerrit.libreoffice.org/27637
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-29 07:08:00 +00:00
Caolán McNamara
53423cb1f1 Resolves: tdf#98793 create a MailMergeConfigItem if toolbar is active...
and one hasn't been set yet via the mail merge wizard. This
should have the same effect as launching mail merge and cancelling
it, which is given as the workaround

Change-Id: I9deb8173d2e18ccde705a923a74ef8a1175e9393
2016-07-28 16:23:56 +01:00
Noel Grandin
938821fb08 new loplugin overrideparam
verify that parameters on override methods have the same set of default
values for their params as their parent/super-methods do.

Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2
Reviewed-on: https://gerrit.libreoffice.org/27437
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25 06:09:17 +00:00
Miklos Vajna
299b937746 sfx2 lok: expose part number in SfxLokHelper::notifyOtherViews()
This way a client can decide if the view cursor it gets is relevant (the
views show the same part) or not.

Change-Id: I7b274b28f0c4f0509df5071831acf50512eff640
Reviewed-on: https://gerrit.libreoffice.org/27311
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-19 08:31:50 +00:00
Noel Grandin
47f62540bd loplugin:unusedmethods in sw
Change-Id: I05e224bcc7d2b08cf1349c14e3acf274d422e109
Reviewed-on: https://gerrit.libreoffice.org/25145
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-23 11:55:36 +00:00
Noel Grandin
bcb41235de convert SfxStyleFamily to scoped enum
and update the RSC compiler to accept such

In the process fix some confusion in SD where it was confusing
SfxStyleFamily and the index of the relevant family
(which other parts of the code in SVL use)

Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
2016-05-09 10:17:13 +02:00
Stephan Bergmann
85825e0fd5 Avoid reserved identifiers
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-04-22 10:08:07 +02:00
Noel Grandin
9585c8b8c8 loplugin:constantparam in sw
Change-Id: I56925a8fd776b3ee787cc26adbaa08c58dd022c0
2016-03-22 11:47:35 +02:00
Noel Grandin
db93b92d78 loplugin:constantparam in sfx2
Change-Id: I53e690ab8d50fb3ce43ba633fc018e7b66e591cd
Reviewed-on: https://gerrit.libreoffice.org/23321
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-17 11:02:18 +00:00
Noel Grandin
9cc8a26fcd loplugin:unuseddefaultparam in sw
Change-Id: I1a8a25c09ae0c8ba39fcedb032562df93fdd6ba4
2016-03-04 11:48:04 +02:00
Noel Grandin
bd5ceabb53 loplugin:unuseddefaultparam in sfx2
Change-Id: I37afde801a6468c79259fe51acbdea0614c2c8c5
2016-03-02 07:57:36 +02:00
Noel Grandin
1a3ace4d09 loplugin:unuseddefaultparam in sw (part2)
Change-Id: I7eefd83d7f84c0a6301fd3ba37d77463d809e5f9
2016-02-29 08:04:06 +02:00
Noel Grandin
c17ead7dc9 loplugin:commaoperator in sw/
Change-Id: I9b00755707687e4c10c02bf49866571f2c44d8ba
2016-02-22 16:04:36 +02:00
Noel Grandin
2087484c65 use consistent #define checks for the Windows platform
stage 2 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro

In this stage we focus on replacing usage of the WIN macro

Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84
Reviewed-on: https://gerrit.libreoffice.org/22393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17 11:33:57 +00:00
Jan Holesovsky
8045c39318 sw lok: For PgDown/PgUp, don't set the VisArea, instead use a dedicated var.
The m_aVisArea may be changed by many other means (called internally from
LibreOffice), so let's introduce a dedicated offset for PgUp / PgDown handling
overwriting the computed value (if set).

Change-Id: I7c869b1e3582145b58f0185f4df2882d07a81ddf
2016-02-08 13:56:21 +01:00
Marco Cecchetti
7f1ccaf62e sw - single search after find all selects the 2nd occurrence - fixed
Now, after a search all action we place the cursor at the beginning of
the document so that the single search selects the first matching
occurrence in the document instead of the second.

Change-Id: I8c295bcd316c6197154c68ae97eb424ee6cc9904
Reviewed-on: https://gerrit.libreoffice.org/22175
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-02-07 11:49:02 +00:00
Noel Grandin
90d892664a loplugin: unused return values
Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7
Reviewed-on: https://gerrit.libreoffice.org/21628
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-21 07:18:38 +00:00
Noel Grandin
f7e4cf3c27 loplugin:unusedfields in sw
Change-Id: I4d987718bf27766c8cd7f3654db6645e5a7f554a
2015-12-21 12:45:50 +02:00
Maxim Monastirsky
ff35d252ff tdf#93837 Add UNO-based SmartTag menu controller
... and use it for the standalone context menu. The sfx2
controller (SvxSmartTagsControl) is still used for the
submenu variation, and is due to be removed after the new
context menu implementation is in place.

Change-Id: I2f889428eb777149f43d74cf3d081e19ab0ebb4a
Reviewed-on: https://gerrit.libreoffice.org/20169
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-11-26 08:19:23 +00:00
Robinson Tryon
49c2b9808d bin/rename-sw-abbreviations.sh
This commit renames the most annoying abbreviations in Writer (and
partially in the shared code too).

Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8
2015-11-25 06:07:38 -05:00
Noel Grandin
872d209bc6 loplugin:unusedfields in sw/
Change-Id: I0d9c79d0756ef85260d3b69cb1e879d7665bf356
2015-11-24 08:05:02 +02:00
Michael Stahl
306d4f0b6d sw: loplugin:badstatics: remove static SwView::m_pSrchDlg
... and associated copypasta

Change-Id: I59a34da48727c84953ed460c11718d261fc3c5a1
2015-11-13 11:03:07 +01:00
Oliver Specht
fa91dd31f3 5th step to remove tools/rtti.hxx
tools/rtti.hxx removed
completed the interface of some Sdr.*  Items
and removed pseudo items

Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11 10:49:30 +00:00
Stephan Bergmann
01b49802c7 loplugin:nullptr (automatic rewrite)
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
2015-11-10 10:31:53 +01:00
Noel Grandin
7a401e5e83 com::sun::star->css in sw/inc
Change-Id: I6ffdb1deaa32156c65f997a1a1056928b7cd863d
Reviewed-on: https://gerrit.libreoffice.org/19803
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-06 05:44:52 +00:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Miklos Vajna
dce533e06d sw: avoid hang with find-all and shape text
We can't easily have editeng & sw selection at the same time, so just
exlucde shapes in the find-all case for now: better than a hang.

Change-Id: I1090595e8c4bc11eb38ffa486885ad5fab67ab86
2015-10-05 15:53:17 +02:00
Noel Grandin
a19f981ea1 convert Link<> to typed
Change-Id: I684a72cc3eeff0caf27132ff641f0d3b20ff7c08
Reviewed-on: https://gerrit.libreoffice.org/18770
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-22 18:54:52 +00:00