summaryrefslogtreecommitdiff
path: root/sfx2/source
AgeCommit message (Collapse)Author
2023-06-12sc: fix freeze row/column panesHenry Castro
The UNO command state has changed to Point (row, tab) and Point (col, tab), Otherwise, if the row or column has the same value for all sheets, the state cache will not report any changes to the client side. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I2080f5e664825d81c4fa4dbb2c5d782f188dae64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151344 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151975 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152908 Tested-by: Jenkins
2023-06-11Related: tdf#155507 don't broadcast UI Theme change unless it did changeCaolán McNamara
a problem since: https://github.com/CollaboraOnline/online/commit/b6d4c88f9011845acae5c8537c0826055c8327a2 Change-Id: Iac1189ba7b892324b5f000f5f6240787b3209892 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152799 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-06-09notify async password changeJaume Pujantell
Change-Id: I2d16c9804e65f093239e810d466de35286b28dee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151651 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-06-08restore, not clear, existing interaction handler after saveCaolán McNamara
put things back the way they were found. In this case I want it back to the original state, because a) lok sets its own interaction handler on load b) at framework/source/loadenv/loadenv.cxx:1137 Because that handler supports XInitialization we show the window early c) that happens to be before the menubar is set d) so the menubar changes the size of the window after it is shown e) so Window::ImplPosSizeWindow calls ImplInvalidateFrameRegion(nullptr, InvalidateFlags::Children) f) which sets ImplPaintFlags::PaintAllChildren on the PaintFlags of the workwindow g) which means that when a SwEditWin calls PaintImmediately vcl sees that flag on its WorkWindow grandparent and calls ImplCallPaint with the grandparent, not the SwEditWin. It happens that the grandparent has no LokId so that does nothing. if we clear this interaction on save, then the next joiner instead has no interaction so gets the default one which does not support XInitialization, so the window is not shown before menubar is added, so when it is shown it is already at the final size, so there is no ImplInvalidateFrameRegion and so no ImplPaintFlags::PaintAllChildren bits on the WorkWindow, so PaintImmediately on SwEditWin calls that Invalidate, which is special cased to broadcast the invalidation as a real thing Change-Id: Ie3fde4c53476aada2b1fdabb1dc70b08485074b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152772 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2023-06-07tdf#155376 partially convert SvCTLOptions to officecfgNoel Grandin
When accessibility is enabled, Calc will add tens of thousands of listeners. We then spend a significant chunk of time creating SvCTLOptions objects (attached to ImpEditEngine) and adding and removing those objects from the related listener lists. But the required information is already globally cached by the officecfg module, so we can avoid that overhead and just fetch it directly from officecfg. Change-Id: I7ff55fd7c4926866eb7086812275ba8bd6e84c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152645 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06Revert "tdf#146547 Mark read-only docs as modified"Julien Nabet
This reverts commit e7e9991fd06ba2e0484ae5e6b6acc323ab8bf66b. It generated tdf#155638 "Forms: Form couldn't be closed after it has been opened" Change-Id: I854c194c718cae51fd0081534570269332d119c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152685 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-06-06use more officecfg for SvtMiscOptionsNoel Grandin
Change-Id: I6c87025fc0997b5edbc085fc88333fe9e150eb3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152648 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06sfx2: SfxMedium::Transfer_Impl() ignore exceptions when getting propsMichael Stahl
Somehow (bisected to commit bc48f2656c9a7bc1f41541bff66ec2c4496466a4) this throws an exception now when getting "Title" when storing a new file to a WebDAV server (the server naturally replies with 404). There is already a fallback to get the filename, so just ignore exceptions here so the transfer can succeed. Change-Id: Ic609f2a4f5a67670b2d8eeb74680730053a7d3a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152678 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-06-06SvtCommandOptions only supports CMDOPTION_DISABLEDNoel Grandin
CMDOPTION_NONE is just ignored, so remove this parameter Change-Id: If9de22a6b0522620a267cbc92b118f79e200d999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-06tdf#38742 - Start Center: introduce push pins to favorite documentsAndreas Heinisch
Change-Id: I879e4d93e1da222d9acabb776552ca1cf819574b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152136 Tested-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-06-05tdf#152431 Fix line count resets to zero after 65535Bogdan B
GetLineCount was a sal_uInt16 value, that allows only 65535 lines to be counted. This is changed to sal_Int32 and also the underlying data type for the lines number is changed from sal_uLong to sal_Int32, but not for pages number. With this change, the maximum possible line number is now increased to 2^31-1 = 2,147,483,647. Change-Id: Ibee2d24e638204133f0ef085564016543f73d351 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143173 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-06-05svx: extract theme color generation into ThemeColorPaletteManagerTomaž Vajngerl
The generation of theme colors generation code is moved to the ThemeColorPaletteManager class, so it can be reused. Also change the GetThemeColors return type from std::vector<Color> to std::shared_ptr<theme::ColorSet> as we can now safely do that and simplifies things. Change-Id: I4a54bff889a1f97cb1e30467188dc69e07e8c518 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152588 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-02Resolves tdf#155200 - Don't scale overlay images in start centerHeiko Tietze
Thumbnails don't change their size so overlay must not too Change-Id: I83ff2bb60ec619686b583180ebabe194c4a77b23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152193 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-06-02WaE: fix more warnings I see with gcc-13.1.1Caolán McNamara
Change-Id: I8f1087cb98991363ec78a21a90a55724ba3628ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152466 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152528 Tested-by: Jenkins
2023-06-02lok: accessibility event listener for focused paragraphMarco Cecchetti
LOKDocumentFocusListener keeps track of the currently focused paragraph. Also includes: Author: Andras Timar <andras.timar@collabora.com> Date: Mon May 15 22:06:10 2023 +0200 fix unused exception parameter 'e' Change-Id: Ibfee099e4e9b724648d7500b9ebb4e8ab84989b8 and: Author: Marco Cecchetti <marco.cecchetti@collabora.com> Date: Thu May 4 12:11:53 2023 +0200 lok: a11y: focused paragraph info sent to client For the currently focused paragraph the following data is notified to client: paragraph content, caret position, text selection start/end These data is kept as an instance state so the client can request such info at any time. Change-Id: Ic1a3be0d93472300b1b6a91fb0de5bad87c031aa and: Author: Marco Cecchetti <marco.cecchetti@collabora.com> Date: Sun May 7 11:52:14 2023 +0200 fixup! lok: accessibility event listener for focused paragraph It seems it was not a good idea using a unique_ptr as smart pointer for an instance of LOKDocumentFocusListener Change-Id: I8e6b0f48fee3c5db3c9b074a663f7f3fb96a601e Change-Id: I0fa400694f3129608228ade0b96e0b4e0aee87e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152488 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-06-01Revert "Convert XFastParser into a normal C++ interface"Noel Grandin
This reverts commit 5e68d6cfade45f40b1ad46025a81afe4cb8dd337. Reason for revert: Seems like outside users have been using this API Change-Id: I8814cf1eb4f000eeb4cbbb5db9c282d001465993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152441 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-01Convert XFastParser into a normal C++ interfaceNoel Grandin
There is no need for it to be an UNO interface anymore (ever since we started supporting dynamic_cast on UNO objects). Which means that XImportFilter2 also needs become a C++ interface. Change-Id: Ice2db0f098271bba32b199bd083b08cb8410ce93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-31Resolves: tdf#109149 don't poll the Default Printer Name on every queryCaolán McNamara
We are queried on every change, so on every keystroke, and we are only using this to fill in the printername inside the label of "Print Directly (printer-name)" On Printer::GetDefaultPrinterName() is implemented with GetDefaultPrinter so don't call this excessively. 5 mins seems a reasonable refresh time. Change-Id: I71e87f26ed022241e09f9ab0eed94d09648ec9b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152415 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-05-26use more TypedWhichIdNoel Grandin
which flushed out an inconsistency in how SID_NUMBER_TYPE_FORMAT was being used Change-Id: Ib59ae4c4950136703d18d7485db432a39e3dc39c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152300 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-25use more TypedWhichIdNoel Grandin
Change-Id: I6c54c1276b36cbc71417486ffcee2ef9ef0cff7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-25merge some stringaddsNoel Grandin
found with a lightly tweaked version of the loplugin:stringadd and some hand-holding. Change-Id: I146aadcaf665e98fea89a9cad2df4dc3935622f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-23[API CHANGE] Add createShortCutManager function to uiconfigurationmanager.Gökay Şatır
We need to have different accelerator classes for differnt languages. This PR creates a new accelerator class for different languages. Since current code uses single instance for accelerators, i needed to add a create function. Also we now have an unordered map for different languages and modules. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147157 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148680 Tested-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: Ia646f20b3206f430ece614fc127e8b748044e4c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151798 Tested-by: Jenkins
2023-05-22tdf#146547 Mark read-only docs as modifiedSamuel Mehrbrodt
when an editable section is changed. Change-Id: I588b09f160974d3a3833bfa011fd07f2ee496616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151535 Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-05-17navigator: use toggle available for all appsSzymon Kłos
Change-Id: I3136071ee943b120ebb2ad6491c91d8ebbcd6244 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151573 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151752 Tested-by: Jenkins
2023-05-15LOK: Navi-1 open/close on sidebarAttila Szűcs
Enabling Navigator sidebar in case of LOKit. Change-Id: I3a656fa12822e5866c2cd4fbf82627a88f26903a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151307 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151704 Tested-by: Jenkins
2023-05-12lok: escape notifyWindow messageSzymon Kłos
File properties dialog contains problematic characters. In lok case and nl language it was constructing incorrect message so boost JSON parser was throwing an exception and dialog was not created correctly. Change-Id: I7e81c9407fcbf57355c0890c9540ce1f828904e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146900 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150042 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150389 Tested-by: Jenkins
2023-05-12tdf#134901: update print statistics on PDF exportJustin Luth
From a modern point of view, a PDF export could be considered a print event. If one agrees with that point of view, then updating the print statistics whenever a PDF is generated makes sense. That is what the bug report requested, and what this patch does. That is what MS Word does also. Downsides: -there is no setting for a user to disagree with this bug's POV. -doesn't work for Send - Email a PDF -open a doc: export to PDF: close -> "Do you want to save changes?" -I tested on --headless --convert-to pdf -> no problems -a setting does exist to avoid modified status by printing. -that setting defaults to avoid modifying the status - YAY! -the print date is changed even if the export fails -NEEDS to be changed before export: time needed in PDF itself -didn't seem important enough to waste the time coding it. -for real printers the old print date is restored on failure. Change-Id: I0d1387c1c2c925f3be772c5bdad7187f9f6a4d7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151682 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins Tested-by: Justin Luth <jluth@mail.com>
2023-05-07Simplify some initializations in sfx2/source/doc/printhelper.cxxJulien Nabet
Change-Id: Ia85598b6558f8f34187f40d6f5e5285bbc28abf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151471 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-04tdf#153587 Display CTRL+F in the keyboard shortcuts listJuergen Funk
* Add the missing entry to Accelerators.xcu * Handle vnd.sun.star.findbar:-command the same as .uno commands Change-Id: I69d441d63a6b0478a07c9ef10665b7d59d3334b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151322 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-04-30Use getXWeak in sfx2Mike Kaganski
Change-Id: I364f13308adf8b3257e53da2bc6576088bb958f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150867 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-28survive exporting to pdf without config for fuzzingCaolán McNamara
Change-Id: I229f25a8a15b21257756ecfa008b9e99681003c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151172 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-28optimise find/insert calls to mapsNoel Grandin
Instead of doing two lookups, we can just call insert and then update the mapped-to value if the insert actually succeeded. Change-Id: I3df3b98f0debe6bf74c739dd5850e7714d9c2789 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151030 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-27tdf#151715 sfx2: do not use FORCERELOAD for document stored in /tmpMichael Stahl
This does not fix the actual bug, but is a workaround for a bug somewhere in the Notebookbar code that was exposed by commit 5b5fb5e9c0580ecb70cf65882865bdaf16498fa5 "sfx2: do reload on SID_EDITDOC in SfxViewFrame::ExecReload_Impl()". For an ODF file, the Notebookbar is switched to editable by the call to SetReadOnlyUI() from ReadOnlyUIGuard, but the XLS file takes a different path and SetReadOnlyUI() is called in line 819. Here the SfxViewFrame is not yet connected to the SfxObjectShell so unsurprisingly it does not affect the UI; more surprising is that moving the call to around line 859 leads to the SfxHintId::ModeChanged event being handled in SfxViewFrame::Notify() with lots of things invalidated, but the NotebookBar is entirely unimpressed by that. Change-Id: I16f321bb3444eeae76348e20816af02938c3f46b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151089 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-27Avoid temporary OUString creationMike Kaganski
Change-Id: I1cebcc2cbd36ed83d4898e222929c872f46c08d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151028 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-27tdf#38194 Use a hashed string HSL color approachJim Raykowski
for style name color creation New magic for style name color creation. Change-Id: Ia6eec2dcf04fc2c3c38276bf6eaed73598505947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151079 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-26assume IFrame script/macro support isn't neededCaolán McNamara
seems undocumented at least Change-Id: I316e4f4f25ddb7cf6b7bac4d856a721b987207a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150710 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-26Related: tdf#155017 Stop after the first pop in case the shell was not on stackMike Kaganski
After commit 271f17a6022c64cbbe9befbc66a9eaaa0567d569 (tdf#155017: make sure that the correct shell is popped from SfxDispatcher, 2023-04-26). This restores the previous logic for a hypothetical case of a pop without POP_UNTIL scheduled for a shell, which was not on the stack (so that it wasn't removed in the code added in the commit mentioned above); I haven't a reproducer, but it definitely can happen, given how things work here. So I try to avoid breaking it even further :-) Change-Id: Ied0a1406881fbefe3cf069f816c50da03a41dcd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151034 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-26tdf#155017: make sure that the correct shell is popped from SfxDispatcherMike Kaganski
Honestly, I don't quite understand the idea of using the stack of shells in SfxDispatcher, when the order of addition of shells there does not match the order of removal. After opening the bugdoc, SfxDispatcher has these shells in xImp->aStack (from top to bottom): [8] SwWebView [7] SwWebTableShell [6] SwWebTextShell [5] SwWebListShell [4] FmFormShell [3] SwWebDocShell [2] SfxViewFrame [1] SwModule [0] SfxApplication SfxViewFrame dtor calls ReleaseObjectShell_Impl. * First of all, it calls PopShellAndSubShells_Impl for SfxViewShell; * Then it calls SfxDispatcher::Pop for SfxObjectShell; * Then it calls SfxDispatcher::RemoveShell_Impl for SfxModule; * Then SfxObjectShell is destroyed; * And finally, SfxDispatcher::SetDisableFlags is called. PopShellAndSubShells_Impl (for SfxViewShell) finds the passed SwWebView at the top of the stack (pos. 8), and removes it. SfxDispatcher::Pop for SfxObjectShell queues removal of the passed SwWebDocShell *without* SfxDispatcherPopFlags::POP_UNTIL mode. SfxDispatcher::RemoveShell_Impl first calls Flush, which actually executes the queued actions. At this point, an SwWebTableShell (pos. 7) is the top of the stack; SfxDispatcher::FlushImpl will pop it, and stop (because there was no SfxDispatcherPopFlags::POP_UNTIL at the previous step), so the intended removal of SwWebDocShell (which is at pos. 3) will not happen. Then RemoveShell_Impl will proceed searching for the specific shell (SwModule), and removing specifically that (at pos. 1). At the moment of destruction of object shell, the dispatcher's stack looks like this: [5] SwWebTextShell [4] SwWebListShell [3] FmFormShell [2] SwWebDocShell <-- The problem is here [1] SfxViewFrame [0] SfxApplication and pos.2 points to a destructed object. Finally, SetDisableFlags iterates all the shells still in the stack, setting their flags - and obviously accessing already destroyed object. In debug builds, this crashes reliably; in release builds, where dtors do not fill memory, the access of the just-destroyed objects likely often goes unnoticed. In different documents, the order and the set of shells there is different, e.g. an empty Writer document would have view shell just above object shell, resulting in correct removal of the object shell. I don't know what strategy is intended here. I decided to implement a small change, that makes sure that without POP_UNTIL, popping a shell removes exactly that shell that was requested for removal. Change-Id: I670d024056a5b32d5485f00a4799a8b0bacb6485 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151003 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-25add "m" prefix to member variables - SfxTabPageTomaž Vajngerl
Change-Id: I482c341518948bf92f81d4f89b7e307635220150 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150974 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-25tdf#38194 tdf#106556 Enhancement to highlight direct formatting,Jim Raykowski
paragraph style, and character style use in Writer documents Initial commit to realize direct formatting, paragraph style, and character style highlighting enhancement requests. Highlighting of character direct formatting is turned on/off using .uno:HighlightCharDF. Highlighting of paragraph styles and character styles is turned on/off using a check box in the Sidebar Styles panel. Closing the Sidebar also turns paragraph and character style highlighting off. Paragraph direct formatting is indicated by a hatch pattern over the paragraph style highlight bar and also by "+ Paragraph Direct Formatting" appended to the tooltip that appears showing the name of the paragraph style when the mouse pointer is over the style highlight bar. Colors used for styles highlighting are determined by a hash of the style name. Lightgray is used for character direct formatting. Known issue: Tooltip doesn't show for paragraph style highlighting in tables and in frames where the highlighting bar is drawn outside of the frame. Change-Id: I6e00ee38c1c169bc7c6542a1782c03b2593e1891 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150451 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-04-25Add script to find unused using declarationsGabor Kelemen
As a complementer to clang-tidy-12 --checks="-*,misc-unused-using-decls" Pros: - simple, fast! - finds some more unused declarations, somehow - works on non-linux specific parts of the code - clang-tidy (for me) trips on files with external headers, this does not Change-Id: If2db989114ac5c2841ed2e89ff7bd7a9e419f567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150612 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-24loplugin:unnecessarygetstr extend to more std::string checkingNoel Grandin
suggested by mike kaganski Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-23cid#1524748 Uninitialized pointer fieldCaolán McNamara
Change-Id: I50becae790146538b5996df15301456d83af2ffd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150811 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-23use more TOOLS_WARN_EXCEPTIONNoel Grandin
so we get more complete information when something goes wrong Change-Id: Ia73623f748b0779cf80b0086bd8258791590e9ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-23Run clang-tidy with misc-unused-using-decls on modules [s-t]*Gabor Kelemen
To remove unneeded using declarations. Via the simple script: for i in $(find $dirname -name "*cxx" -o -name "*hxx" ); do clang-tidy-12 --checks="-*,misc-unused-using-decls" "$i"; done Change-Id: I596299084471b2904548d23875866f1583b00b2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150610 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-04-23tdf#153806 a11y Allow opening context menu of fav/recent char w/ keyboardMichael Weghorn
This is similar to commit 1f437264084fd173116965fa4d856aeafdfe7a98 Date: Sun Apr 2 00:36:44 2023 +0300 tdf#153806 a11y: Allow opening context menu in special char dlg using keyboard , but now for the character views in the "Recent Characters" and "Favorite Characters" sections in the special character dialog, and thus addresses this comment from the commit message of the above-mentioned commit: > Adding support for opening the context menu for the > recently used and favorite characters further down > in the special characters dialog is independent of this > and would have to be added separately. Turns out that the position returned by `CommandEvent::GetMousePosPixel` is good for the keyboard case as well, is right in the middle of the char view widget. Change-Id: I9f55b99398d557b19263bf531f6a857d274d3d9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150815 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-04-23sfx2: Pass SvxCharView context menu pos as paramMichael Weghorn
... and drop the `maPosition` member that was used for that purpose only. Change-Id: If449a12e6e8e37c28d7b2b139e20c4c307d41eb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150814 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-04-21loplugin:unnecessarygetstr extend to checking std::string::c_strNoel Grandin
Change-Id: I17398e2a6a31a2c98ba8e54b5c8045f22aee8759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150749 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-20Typo getCurentSfxFilter->getCurrentSfxFilter in sfx2/filedgimpl-helperJulien Nabet
Change-Id: Ia428e81e9ebefcac521354d1eccb39f891fa9656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150685 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-19sfx2: fix crash in StyleList::CustomRenderHdlXisco Fauli
GetFamilyItem() might return nullptr See https://crashreport.libreoffice.org/stats/signature/StyleList::CustomRenderHdl(std::tuple%3COutputDevice%20&,tools::Rectangle%20const%20&,bool,rtl::OUString%20const%20&%3E) Change-Id: I099f045232aac710c4f26148de5e798d00ecc7ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150602 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>