summaryrefslogtreecommitdiff
path: root/include/svl/hint.hxx
AgeCommit message (Collapse)AuthorFilesLines
44 hoursavoid some dynamic_cast in SwTextFrameNoel Grandin1-0/+6
Change-Id: Ib73063871472727f27b552b1074d9d3872269b44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168231 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
3 daysavoid dynamic_cast in SwCursorShellNoel Grandin1-0/+1
Change-Id: Ic66c427f5096aea53d6634874d98620dd91744b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168165 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
3 daysavoid dynamic_cast in SwTOXBaseNoel Grandin1-0/+2
Change-Id: Iac8f502bf200f599d44f52504a3b70a1a21b370b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
3 daysavoid dynamic_cast in SwTextNodeNoel Grandin1-0/+2
Change-Id: Id7ee5e922b7e99d1f3bade3b94285283eb07ae68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168163 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
3 daysavoid dynamic_cast in ModifyChangedHintNoel Grandin1-0/+2
Change-Id: I78d9fc4984bf4313222c943816f81d31924dff26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168133 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
3 daysavoid dynamic_cast in SwXRedlineNoel Grandin1-0/+2
Change-Id: Id39e34c0f1b68639d3adf0092d753cb5dfb4cb0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
4 daysavoid dynamic_cast in PostItMgrNoel Grandin1-0/+2
Change-Id: Ieb571b8f39de1ffbc5cf1ce257204dca9bdb649e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
4 daysavoid dynamic_cast in SwView::NotifyNoel Grandin1-0/+3
Change-Id: Id2b8f0f85165d442a5e3a54ee2e3b433f53b3613 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168120 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-04-04fix 'tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::Notify'Noel Grandin1-2/+2
I messed up in commit 9c5fda14fff397d5d503f749ad019791d7e4ef83 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Mar 6 16:20:41 2024 +0200 tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::Notify and forgot to actually use the new SfxHintId::StyleSheetModifiedExtended I created in the constructor of the SfxStyleSheetHint class Change-Id: Ica661a156d72c8a4b8ad415b6f45fe5d3458ba26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165787 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::NotifyNoel Grandin1-0/+2
shaves 2% off the load time Change-Id: I579825bd6101b57a44b0f3118ede17ec2393d9d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-06Related: cool#7373 add an SfxHintId::ThisIsAnSfxEventHintCaolán McNamara1-1/+2
to avoid cost of dynamic_cast of SdrHint to SfxEventHint Change-Id: Ie0366b7d7ba828d8ffabeed4d65d7c7b275a3ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157633 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-01remove AUTOFMT_DOCNODEBjoern Michaelsen1-0/+1
- remove obsolete GetInfo()s - introduce SwFormat::IsUsed() - move handling from GetInfo to SwClientNotify - make sure SwAutoFormatUsedHint is forwarded to clients where needed (e.g. SwTextFormatColl, SwDDETable, SwPageDesc, ...) Change-Id: I07d9e94ee791ca6e738b4eb3e597055ad8fbe755 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155504 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-08-03move SwVirtPageNumInfo to SfxHintBjoern Michaelsen1-0/+1
- also remove now obsolete GetInfo overrides Change-Id: Iaac75ed2e53daead06242ce4620fd2b879909e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155061 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-04-04RES_TBLHEADINGCHG no more ...Bjoern Michaelsen1-0/+1
- replaced LegacyModifyHint by a proper SfxHint - Refactor SwTabFrame for table heading change: * split out Invalidate(SwTabFrameInvFlags) * split out HandleTableHeadlineChange() Change-Id: I374db7a3b16a3062d6ad54c32527ec1056cbc00b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149929 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-25refactor DocPosUpdate, part 2Bjoern Michaelsen1-0/+2
- separate the message send from the field manager to the fields containing no start index from those send from the field to the frames containing an index - use member functions where possible: SwFieldType, SwFormatField, SwTextNode Change-Id: I488e4003b75bf7b0ae700f39e2364d6e34a8bbfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147490 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-02-21replace RES_TITLE_CHANGED and RES_DESCRIPTION_CHANGED with SfxHintsBjoern Michaelsen1-0/+2
Change-Id: I8342722dc4235508c86683fd292bd525247a9910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147134 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-15replace RES_GRAPHIC_PIECE_ARRIVED and RES_LINKED_GRAPHIC_STREAM_ARRIVEDBjoern Michaelsen1-0/+3
- also use SfxHintIds and get rid of some dynamic_casts Change-Id: Id12d72fb726c1d747008f72defd6ba9eba3ba253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146820 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-09-26introduce sw::SectionHidden as plain SfxHintBjoern Michaelsen1-0/+1
Change-Id: I7412c16d0ffd4cf38a1b4186f81703443cdf6fbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140576 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2022-09-25unwrap SwDelChr to plain SfxHintBjoern Michaelsen1-0/+1
Change-Id: Ief37a8025181b6cc8a6e484e2726d8a8d92f57ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140567 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2022-09-25unwrap SwInsText to a plain SfxHintBjoern Michaelsen1-0/+1
- also add some constnesss and move some things to private Change-Id: I67a45e1326361b5a8f7e320b3525e74e93b1ef12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140556 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2022-09-24unwrap SwDelText to a plain SfxHintBjoern Michaelsen1-0/+1
Change-Id: I559f8f1e837830426e820dace6226618c5e0fc62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140210 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2022-09-24Replace RES_NAME_CHANGED with an SfxHint for stronger typingBjoern Michaelsen1-0/+1
Change-Id: I0bbe9dc4e10491aafcc623c2add62a246ea67d80 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139961 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2022-09-06Related: tdf#150307 Use SfxHintId::ScAreasChanged, tdf#137577 follow-upEike Rathke1-2/+0
... instead of ScTablesRenamed, as ScAreasChanged (confusingly named) was meant exactly for this and also updates the Navigator. Change-Id: I6d90b82e6d5121e69c1a40af369be36544ad1b3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139453 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2022-07-27tdf#119840 elide some dynamic_castNoel Grandin1-0/+1
Change-Id: Iafaedf26231bac142759d2bf667dfba083cf0122 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137503 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-15tdf#119840 elide some dynamic_cast costNoel Grandin1-2/+22
when opening a large writer file, shaves off about 5% off load time Change-Id: I501d0ebfbaec572e7c93c1dbc3f0cfaab3938f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-12elide some dynamic_castNoel Grandin1-0/+6
Change-Id: I32c804e64cf219364e27ad6d9549c68c1f737a19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137003 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-24Recheck include/[s-x]* with IWYUGabor Kelemen1-1/+0
See tdf#42949 for motivation Change-Id: Iaebddd648c52c175da17d2a55a1e8de82c213f4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127330 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-06make it clearer that ScHint is modifiedLuboš Luňák1-1/+1
It's somewhat confusing that an accessor is provided to give a reference to internal data and then the object is modified indirectly using the reference. It appears to be only for performance reasons, so I thought that inlining the ctor and ctor could help the compiler to optimize this, but apparently it can't move this outside of the loop, so at least make it clearer. Change-Id: I72cf15d1446daa559ac4079b9478e53694d7d198 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126394 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-06-21create SfxHintId::SwLegacyModify idNoel Grandin1-0/+1
to avoid expensive dynamic_casts in writer Change-Id: Ic73ae7d4af985043f8533913b33939e3445ec7de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117586 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-31Related: tdf#137577 Update Name Box range name list on sheet renameEike Rathke1-0/+2
... for sheet-local names that include the sheet name. Introduce SfxHintId::ScTablesRenamed for this as the existing ScTablesChanged is fired quite too often. Change-Id: I94c3479bba4d4cc8b75905e3fa4f35d9a8737870 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113391 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2020-12-25missing include (std::to_string)Stephan Bergmann1-0/+1
Change-Id: I23d920cd8046ba089805afd9864831610f59f92d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108264 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-30tdf#137013 fix Writer find toolbar ui regressionsJim Raykowski1-0/+2
introduced by enhancement patch tdf#132366 Change-Id: I951fcd7891c75e7fbf715581c316b4446d967cd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103499 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2020-09-20tdf#132366 Writer enhancement that highlights search resultsJim Raykowski1-0/+3
This enhancement selects outline headings in the Writer Navigator content tree according to 'Find All' search results. It does this when the content navigation view is set to show headings content only. Change-Id: I77dabcdd38c8877b7f8a177689da094638d5fe00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92886 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-04-23tdf#113266 slow opening XLS with 45 MB drawingNoel Grandin1-0/+3
Some hot-spots around dynamic_cast of SdrHint, so avoid that by creating special SfxHintId::ThisIsAnSdrHint The most common CPU hot-spot was in SvxShape::Notify, the other changes are just for consistency. Also remove some dead code in ScShapeChildren, the Notify method was doing nothing useful. Change-Id: I696db1fcafc09bb10bf23ac673de292746141491 Reviewed-on: https://gerrit.libreoffice.org/71108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-12make SwFormat a ::sw::BroadcastingModifyBjoern Michaelsen1-1/+3
- clean up SwSection..Hint: Lazily reusing the Dying HintId is evil - switch the SwChartDataSequence to SvtListener - add some description to RuntimeException Change-Id: I897a63030f207cabe4d1ba7de0c25c6c581ffd1f Reviewed-on: https://gerrit.libreoffice.org/65816 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
2018-09-04tdf#118967 Batch all a11y notificationsPaul Trojahn1-8/+2
Currently all a11y notifications get send out immediately, which often ends up formatting the document before it is ready. With the current EnterBlockNotifications()/LeaveBlockNotifications() system it is difficult to find all places that need blocking and any change in the a11y code might require additional blocking in unpredictable places. By queueing all notifications by default and only sending them out when the document is ready, we can make sure that it can't be corrupted. Change-Id: I9599c7b57eb5b8f8f0575de57fcc8bab171f78ff Reviewed-on: https://gerrit.libreoffice.org/58703 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-27svl: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann1-0/+6
...by explicitly defaulting the copy/move functions (and, where needed in turn, also a default ctor) for classes that have a user-declared dtor that does nothing other than an implicitly-defined one would do, but needs to be user- declared because it is virtual and potentially serves as a key function to emit the vtable, or is non-public, etc. Change-Id: I8c900426c49701afc94094115ec0c2d5b1af90d9 Reviewed-on: https://gerrit.libreoffice.org/58102 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-03-20Add debug output operator<< for SfxHintId, SvMacroItemId, and SfxEventHintIdTor Lillqvist1-0/+84
Change-Id: I36fd3efc630d99643fb7db3b89f777d4054ec87d Reviewed-on: https://gerrit.libreoffice.org/51651 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-12-19loplugin:unusedenumconstantsNoel Grandin1-3/+0
Change-Id: I9dc4b369872a7c6c076ae9be1dcdf2f8385af8a7 Reviewed-on: https://gerrit.libreoffice.org/46684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-18clear the data provider cache after import, tdf#111960Markus Mohrhard1-0/+1
This might also fix some problems with normal ODS files and not just with FODS files when we recompile formulas after the whole import. Change-Id: Iec05d2052ca5ce3bdf03abf02d502e4537fd3082 Reviewed-on: https://gerrit.libreoffice.org/46672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-12-07lokit: add .uno:DocumentRepair commandHenry Castro1-0/+1
Change-Id: I5b13ea6f4785bc91c29111fa63c4a1b0ea9b2660 Reviewed-on: https://gerrit.libreoffice.org/38908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-11-08sw lok: add Accept/Reject All tracked changes, tdf#101977Henry Castro1-0/+1
Change-Id: I04d747343e24cb498a621c965d034d0791411d83 Reviewed-on: https://gerrit.libreoffice.org/44311 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-10-22sc lok: fix spell checking languages in CalcHenry Castro1-0/+1
Change-Id: Iadcc3b55a30ce2a2c785366fb3807ff6e4bda1fe Reviewed-on: https://gerrit.libreoffice.org/43581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com>
2017-10-20tdf#112100 Select shape name in NavigatorTamas Bunth1-0/+1
After the selection of a shape the shape name is selected in the Navigator tab under the Drawing Objects entry. It scrolls to the corresponding entry as well in case the scrollbar is visible. Change-Id: I298e8fe6bdab01eb20c53e1730812192c46770c5 Reviewed-on: https://gerrit.libreoffice.org/43566 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-06-06add COVERITY_NOEXCEPT_FALSECaolán McNamara1-1/+1
to markup dtors that coverity warns might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4 Reviewed-on: https://gerrit.libreoffice.org/38318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-18New HintId and unit test for hidden rows and SUBTOTAL, tdf#93171 follow-upArul Michael1-0/+1
Adding new Hintid for HideRows so that we notify only formulas with subtotal and aggregate function for recalculation. Added unit testing. Change-Id: I44f2e45acaf697f91744bc8202f27b218faa5b43
2017-02-15remove unused AccessibilityChanged from SfxHintId enumNoel Grandin1-1/+0
Change-Id: Ic2d413002466e92d38a7a918b3f7e04d3c9eebf2
2016-12-08convert SFX_HINT to scoped enumNoel Grandin1-25/+93
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-11-24use o3tl::typed_flags in ConfigurationListener::ConfigurationChangedNoel Grandin1-1/+0
Change-Id: I0ad7c02953aa53168dc242f1f374ab871728c84e
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke1-1/+29
There were over 150 places in *::Notify() functions that did some dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast operations come with quite some cost, so avoid if possible. Specifically for ScFormulaCell::Notify() that created a bottleneck in scenarios where cells were notified that already handled a previous notification. In mass operations doing the dynamic_cast before it could be decided whether having to act on it or not this made 2/3 of all time spent in the Notify() call. To get rid of that rename/move SfxSimpleHint to SfxHint and let classes derive from SfxHint instead of SfxSimpleHint. This comes only with a slight cost that an additional sal_uInt32 is transported in such hints, initialized to 0, but this is neglectable compared to the huge gain. For the rare cases where a Notify() actually expects both, an SfxHint (formerly SfxSimpleHint) and a derived hint, this changed order of the dynamic_cast involved so the simple SfxHint::GetId() is handled last. Modules using such combinations can further optimize by treating the simple SfxHint::GetId() first once verified that none of the other derived hints use an ID not equal to zero respectively none of the ID values the simple hint uses. Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce Reviewed-on: https://gerrit.libreoffice.org/29205 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>