186 Commits

Author SHA1 Message Date
Noel Grandin
69f6fbb5d0 tdf#104046 - Slides in the slide pane don't update in realtime
This appears to be a consequence of my change

    commit 942716fee138b68c2af9411384f402b5692a88b2
    convert EID constants to typed_flags

in that change I made a "fix":
    @@ -689,20 +687,20 @@ void
EventMultiplexer::Implementation::CallListeners (EventMultiplexerEvent&
rEv
         ListenerList::const_iterator iListenerEnd
(aCopyListeners.end());
         for (; iListener!=iListenerEnd; ++iListener)
         {
    -        if ((iListener->second && rEvent.meEventId))
    +        if (iListener->second & rEvent.meEventId)
             iListener->first.Call(rEvent);
         }
     }

which causes this bug.

I should have noticed that my "fix" indicates that the event filtering
part of this multiplexing code was never working, and since no-one has
ever complained about, lets just remove all of this unnecessary
complexity.

Change-Id: Id71613d4fd5817ee1358705059e4ce63d57573ad
Reviewed-on: https://gerrit.libreoffice.org/31894
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-12 09:45:03 +00: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
2b3de550ef remove pParentFrame from SfxFrame
Found by the singlevalfields loplugin.

Dead as least as far back as
  commit 93a7b558588be1f12e137329548b706daccc07df
  Author: Frank Schoenheit [fs] <frank.schoenheit@sun.com>
  Date:   Fri Nov 27 21:16:24 2009 +0100
  [CWS autorecovery] merged SfxTopFrame into SfxFrame
  SfxTopFrame was the only class deriving from the abstract class SfxFrame, so both
  can effectively be treated as one class.

Arguably when that commit was done, SfxFrame should also have been renamed
to SfxTopFrame, since that it was it now seems to be.

Expanding the nullptr value off that field means that:
    SfxFrame::GetTopFrame
       always return this
    SfxFrame::IsParent
       always returns false
    SfxViewFrame::GetTopFrame
       is now the same as SfxViewFrame::GetFrame
    SfxViewFrame::GetParentViewFrame
       now returns null

Change-Id: Iac088fa485c3d7299d1553845ced2f5ced3c85f2
Reviewed-on: https://gerrit.libreoffice.org/30485
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03 06:30:11 +00:00
Noel Grandin
04e544dd51 rename sd::Outliner to SdOutliner
having a top level data structure share a name with one of its
supertypes makes it very hard to grep

Change-Id: Id5145c12c8fd9e8c8fb09897896eae0da7bfdefe
2016-10-14 10:11:10 +02:00
Noel Grandin
17ec3b96de pass params to Outliner LINK callbacks on stack
instead of yuck..cough... on itself, which is horribly vulnerable to re-
entrancy

Change-Id: I8f3d6d39ee50fd36b56b431978cf6c2499c375a6
Reviewed-on: https://gerrit.libreoffice.org/29756
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-13 11:16:13 +00:00
Noel Grandin
942716fee1 convert EID constants to typed_flags
Change-Id: I3bcccd8836e54dd33bb079856226fbedd574c824
2016-10-12 08:44:50 +02:00
Noel Grandin
e588aa4d34 convert PageKind to scoped enum
Change-Id: I7f90cf2e96b72031bcfff558794e6cb42ea408e8
2016-10-11 14:32:40 +02:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Noel Grandin
6c87b02840 loplugin:countusersofdefaultparams in sd
Change-Id: I848d9b555a26e9d343efdfaaaec44a2c7d8be5b5
Reviewed-on: https://gerrit.libreoffice.org/27765
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-02 05:34:49 +00:00
Miklos Vajna
4cbaa49c0e svl: implement SfxUndoAction::GetViewShellId() interface in SfxListUndoAction
Client code in sw, sd, sc and svx is adapted, the rest is just a
placeholder for now.

With this, e.g. the undo item for Writer's insert comment properly
tracks which window was used for the insertion.

Change-Id: Idad587e6ca07ba69bf59aa7013b251af8bf95bab
Reviewed-on: https://gerrit.libreoffice.org/27781
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-01 17:04:45 +00:00
Miklos Vajna
6850f4e845 svl: avoid defaulted parameter in SfxUndoManager::EnterListAction()
It's a virtual function, and defaulted parameters there are problematic.

Change-Id: I3f110c7ac36dfda90811b033620286ad9fce1af1
Reviewed-on: https://gerrit.libreoffice.org/27772
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-01 10:32:27 +00:00
Stephan Bergmann
85185f8884 loplugin:redundantcast: redundant static_casts in sd
Change-Id: I843ca15d3515273bd78bf9f111974f9be5252549
2016-07-08 16:47:31 +02:00
Noel Grandin
3e9e667af2 loplugin:unusedmethods SfxLinkUndoAction
Change-Id: I1ad7c2452dd9bc80e7404f41484b9667adbcfa7b
Reviewed-on: https://gerrit.libreoffice.org/25542
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 06:34:32 +00:00
Caolán McNamara
dcc4b29d9b coverity#1361590 Uninitialized scalar field
Change-Id: Idb2ab797294f676e4e734cd272244928adf3f221
2016-05-15 11:01:16 +01:00
Noel Grandin
f469309e26 clang-tidy modernize-loop-convert scaddins to sdext
Change-Id: I63ccc56df1a1de8bc443abb95e520246c457912f
Reviewed-on: https://gerrit.libreoffice.org/24798
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-10 06:29:32 +00:00
Noel Grandin
17076d8ecf convert OUTLINER_MODE to scoped enum
Change-Id: I7ac45d7fbd5e77a105cbe942c6d4fd6cfc8ff909
Reviewed-on: https://gerrit.libreoffice.org/24789
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09 11:15:16 +00:00
Noel Grandin
9391688f61 loplugin:constantfunction in editeng
Change-Id: I8f8414b4867d3248e6d836ed8037de4da41b97f1
Reviewed-on: https://gerrit.libreoffice.org/23331
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-18 06:02:18 +00:00
danielt998
2b31daf74e tdf#95857 Sort out German plurals ...
Made a start in removing the incorrect 'Infos' German plural

Change-Id: Ie989351a7473fc35b563e63ce6a4fb229093af60
Reviewed-on: https://gerrit.libreoffice.org/22301
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-02-12 15:29:25 +00:00
Chris Sherlock
538f276ae0 Formatting changes across all modules
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs

Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:11:34 +00:00
Chris Sherlock
697d445ed0 vcl: take into account the font width is the average font width
I'm changing the Font class function names:

- SetSize       -> SetFontSize
- GetSize       -> GetFontSize
- SetHeight     -> SetFontHeight
- GetHeight     -> GetFontHeight
- SetWidth      -> SetAverageFontWidth
- GetWidth      -> GetAverageFontWidth

That's because it really makes no sense to say that there is a
single constant font width because obviously proportional fonts
don't have one - the best we can do is an average font width,
which is what folks like Microsoft sort of do already. On a fixed
font, the average is still accurate, for obvious reasons :-)

I'm also not a fan of GetSize/SetSize as I find it a might too
generic.

Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70
Reviewed-on: https://gerrit.libreoffice.org/22069
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-04 03:17:26 +00:00
Chris Sherlock
3187193a61 tools: rename FontUnderline to FontLineStyle
Change-Id: I4750ad8569a1003b2f8c29052f3e25003ee433ca
Reviewed-on: https://gerrit.libreoffice.org/21892
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-31 04:31:13 +00:00
Chris Sherlock
cb20f46895 vcl: change Font::SetName() to Font::SetFamilyName()
Change-Id: I9b7bd1ec25955981ebcb9085579cbb9fbaa802d5
Reviewed-on: https://gerrit.libreoffice.org/21560
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-18 05:24:46 +00:00
Norbert Thiebaud
45654a1d4d revert vcl patch series that brok Mac and Windows
revert:
9bc2f3de8672e812f3a67541c6d7069b434a7e42
 vcl: add comment about ImplFontMetric::{Get|Set}LineHeight()
26371f105bc44e04469ec03fc5bb12505e651c6b
 vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()
2dd0b4317372b8022efe3911b38b4fa02956d8b9
 vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual
5ab13bf3ead3539e4ad847656da81e7eb6029652
 vcl: tabify font.hxx
f99550dae55e40e49bf9c9875053fe2abb4c71ca
 vcl: change Font::SetName() to Font::SetFamilyName()
2b297116cb6bb1061c43e5714e2609c8ee9f57d2
 vcl: rename Font::GetName to Font::GetFamilyName

Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62
2016-01-16 12:20:45 -06:00
Chris Sherlock
f99550dae5 vcl: change Font::SetName() to Font::SetFamilyName()
Change-Id: I54a4036544c680c4a49607677af776aa7a433fbc
Reviewed-on: https://gerrit.libreoffice.org/21510
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16 16:12:14 +00:00
Noel Grandin
06d68fb0a1 loplugin:unusedmethods unused return value in sd
Change-Id: I9bf87cad19b7371076fd0b2333c83697021fe0e1
2016-01-14 11:45:21 +02:00
Noel Grandin
980fe3f791 loplugin:unusedfields in sd/
Change-Id: Id6da990828ece02132032285116f3a20de423519
2015-11-23 13:30:53 +02: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
92c697c0e3 loplugin:nullptr (automatic rewrite)
Change-Id: If1b80da64ba575f07b31dce9bc0e34b7eb9f11a4
2015-11-10 10:31:38 +01:00
Stephan Bergmann
c50ab3b3b2 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I60f792a9047d8d9ad9cfc2a442c4dd179efec53a
2015-11-06 09:37:00 +01:00
Andrea Gelmini
e90848edfd Fix typos
Change-Id: Ib96bf8adc3f94fa0b8b306d2a609dd2eea940dd1
Reviewed-on: https://gerrit.libreoffice.org/18974
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 10:21:25 +00:00
Noel Grandin
c439d55042 remove unused Link<> field
Change-Id: If6c5719adf5240e12e798f72b25c5c19a09bc0f6
Reviewed-on: https://gerrit.libreoffice.org/18769
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-22 18:49:07 +00:00
Noel Grandin
1e67e94f1a convert Link<> to typed
Change-Id: If3e2b00092440ebd42ae5b73ae2b0e44c3702683
2015-09-21 08:03:52 +02:00
matteocam
c21780b58f chained editeng: Add methods and basic setup for editing-mode chaining
Change-Id: I8065bebaf2a54170bc7b3ddbd35740bcca42298d
2015-09-20 13:05:15 +02:00
Noel Grandin
008de7099b convert Link<> to typed
Change-Id: I66e81dafa08b2e2a43b4b696741676e093439024
2015-09-17 14:41:59 +02:00
Noel Grandin
7ffa218458 convert Link<> to typed
Change-Id: I93017f16affe16e8e452cd829bc4f9b495670d4d
2015-09-17 08:19:32 +02:00
Noel Grandin
69a06ca6bf convert Link<> to typed
Change-Id: I9ce05712af8300c8bcea6ea0f670b57cce1ca43d
2015-09-16 08:38:55 +02:00
Noel Grandin
0670872ce0 loplugin: defaultparams
Change-Id: I54b72087ea3f38b2430c3c62aaff195bbd301b99
2015-08-20 13:52:17 +02:00
Stephan Bergmann
4cb59a867f Fix IndentingPagesHdl type (and GetIndentingPagesHdl is unused)
Change-Id: Ide5398040678a81e032e91e582b39d516e8c08a8
2015-07-13 11:21:01 +02:00
Stephan Bergmann
7668396d39 loplugin:implicitboolconversion
Change-Id: Id59a7c9402c59e91715f63a88eeed40d2ef9bd92
2015-07-13 10:15:31 +02:00
Noel Grandin
2970ec8438 editeng: make Link<> usage typed
Change-Id: Iec36c7e4f4fbc2ee2ee25d4d0c8488340ba7d8c4
Reviewed-on: https://gerrit.libreoffice.org/16968
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-13 06:58:14 +00:00
Noel Grandin
26ac3ee8b2 editeng, convert to typed Link<>
and remove SvxBrushItem::SetDoneLink since the field it sets
is unused.wq

Change-Id: Ide95a295fa8004f1ddab5e560f01d36d36658a72
Reviewed-on: https://gerrit.libreoffice.org/16943
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-13 06:58:01 +00:00
Miklos Vajna
9a11e59e56 SdrPaintView::AddWindowToPaintView: take a vcl::Window, too
Change-Id: Iedb296732c0819a1d6cdc1c59b3f1718e2cd6d38
2015-07-09 17:04:27 +02:00
Noel Grandin
4729774b24 remove unnecessary check for null when calling delete
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'

Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-06-15 14:46:41 +02:00
Noel Grandin
1df4114245 loplugin:loopvartoosmall
Change-Id: I809e408c994222cfa95ba8f56e4db7bd96be7080
2015-06-02 09:45:16 +02:00
Noel Grandin
23b439a664 convert DEFAULTCONSTANT constant to scoped enum
Change-Id: I5ebd77edfa29d6c6c7acea37e826ef1d625916c3
2015-05-20 09:52:09 +02:00
Stephan Bergmann
f9e73fe26b loplugin:cstylecast: nop between pointer types of exactly same spelling
Change-Id: Ia78ebb57f69c678ddc4ca2b42c82105fa528ff2b
2015-05-11 12:50:39 +02:00
Noel Grandin
bfcb2a1a75 convert DEFAULTFONT_ constants to scoped enum
Change-Id: Ia33e957f6cf530e2639b3c86d9482f642652cb46
2015-05-06 09:01:29 +02:00
Stephan Bergmann
3ead3ad52f Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and
return types, but provide default template arguments that keep the generic,
unsafe "void* in, sal_IntPtr out" behvior.  That way, individual uses of the
Link class can be updated over time.

All the related macros are duplicated with ..._TYPED counterparts, that
additionally take the RetType (except for LINK_TYPED, which manages to infer the
relevant types from the supplied Member).

(It would have been attractive to change the "untyped" LinkStubs from taking a
void* to a properly typed ArgType parameter, too, but that would cause
-fsanitize=function to flag uses of "untyped" Link::Call.)

Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-30 10:20:00 +02:00
Stephan Bergmann
0acd47f68e Remove unnecessary IMPL_LINK[_NOARG]_INLINE_START/END
...just use IMPL_LINK[_NOARG] and let the compiler decide what to inline

Change-Id: I63ec5116df7e79093ebf31193f8c674f1351c0e6
2015-04-29 18:29:59 +02:00
Noel Grandin
a7b7c64afc convert SCRIPTTYPE_ constants to scoped enum
Change-Id: I5be3980ac865162d8d7626556ca47eca4b0ee433
Reviewed-on: https://gerrit.libreoffice.org/15344
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-04-17 07:21:08 +00:00