summaryrefslogtreecommitdiff
path: root/framework/inc
AgeCommit message (Collapse)Author
2024-10-09tdf#163362: write xlink:href in image:images, image:bitmap-index in image:entryMike Kaganski
Those were mandatory prior to commit d367ee2f8c204f351072c0eb10259fd7aa497770, and still mandatory e.g. in AOO. Restore writing those, for interoperability and backward compatibility. Change-Id: I84f33e13e6bade8b2f2dd0cc5e2e0f4a96d50e84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174721 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-11use more concrete UNO type in frameworkNoel Grandin
Change-Id: I3ee54f3967339ab52c04f48a047bc29fc5161680 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173159 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-02Resolves tdf#161725 - Toggle module-specific file types in MRUHeiko Tietze
Change-Id: I254659718f26800d8dab94e51e8cf66857b0992e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171399 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-07-28cool#9082 - lok: cleanup WakeUpThread before forking, then re-start.Michael Meeks
It seems likely that this lingering briefly after various un-identified and tough to reproduce, longer running operations in calc - which is a big ScProgress user - caused problems with background save. Change-Id: I1d0ec56c759dff30c48c8562b6400b57be4a25b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168033 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168052 Tested-by: Jenkins
2024-07-28restore WakeUpThread::joinThreadCaolán McNamara
removed with: commit 4aa2cc878dae3b34b16ccacd9358fda5e6d6a197 loplugin:unusedmethods Change-Id: Ie6006defdfdab23aef0fa9d9b66b125862b760f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171139 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-06-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ia216da9bd7764f2d21aaee761a02eafda88d892e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169257 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-06-13use more concrete UNO types in StatusIndicatorNoel Grandin
Change-Id: I7266cded882bb2d4eb00bdfe565b7c4085c1459d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168777 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-06-13use more concrete UNO types in ProgressBarWrapperNoel Grandin
Change-Id: Ia7f3f3cef44ee7db6850a75c3de307a8b35e3263 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-25WakeupThread - re-factor to have a single shared wakeup thread.Michael Meeks
The WakeupThread is an attempt to avoid needing to call gettimeofday and/or update a visual status bar very regularly, and to have a thread marking the passing of time to emit progress updates infrequently. Re-factor this to have a single time-keeping thread, so it will be easier to shutdown and re-start for LOK; and also to simplify some of the complexity lurking here. Change-Id: Ia95890e5d6041a029484aa3f7df13b59a0397086 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167949 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2024-05-08loplugin:ostr in frameworkNoel Grandin
Change-Id: I2fdc32aa5de6a1315fe69997f9b531259aa78605 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167339 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-02replace createFromAscii with OUString literals in frameworkNoel Grandin
Change-Id: I5209ab1b869492234946f8471a30c70121824198 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167010 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-22improve loplugin:staticmethodsNoel Grandin
Some of the exclusions were too aggressive. Restrict them to only the important classes, which exposes some more places this plugin applies. Change-Id: I1b2d1fb24391adc71ed0984f94168f61a149479f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-12cid#1546235 aArgs is never setCaolán McNamara
Change-Id: I5cdf0cc5031e3636bad4d9fdaa16d724f10c2b75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161965 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-07simplify and modernise ScopedBitmapAccessNoel Grandin
(*) Make all of it use a "Scoped" paradigm (*) pass by value, no need to allocate on heap (*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods. (*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places. Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-23loplugin:fieldcast in LayoutManagerNoel Grandin
Change-Id: I3fc7a2c690344ee6934111cdffc0b23ff2537b44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159841 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-23loplugin:fieldcast in LayoutManagerNoel Grandin
Change-Id: Ib0b56703cd6782d850ab5960a7fa53d15eb443a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159840 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in framework::AddonsToolBarWrapperNoel Grandin
Change-Id: I1fc692581acc805d6c84156d6df57093cf9dff93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159281 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in framework::MenuBarManager::MenuItemHandlerNoel Grandin
Change-Id: I5a98f1bc5783bbd78ba6596ced9bb77cd3037f95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159280 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in framework::MenuBarWrapperNoel Grandin
Change-Id: I7e44ad4db77db5fe4de543f47ffc4b8127e0ebea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159255 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in framework::StatusBarWrapperNoel Grandin
Change-Id: I10198364323ed1886f6f356c964fc68bab8627e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159254 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-10loplugin:fieldcast in framework::ToolBarWrapperNoel Grandin
Change-Id: I4158b4c0b5ce57cca5a2a0978ac951274202c159 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159253 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-12Make NC_ constexpr-friendlyStephan Bergmann
...by moving the char8_t -> char reinterpret_cast out of any potential constexpr paths into a new TranslateId::getId. And demonstrate constexpr'ability by making the aCategories var in OApplicationIconControl::Fill (dbaccess/source/ui/app/AppIconControl.cxx) constexpr. (And there might be more such cases that could now be made constexpr.) Change-Id: I0b4e3292faf8f6b901f9b9e934e1aa6bf0f583ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157862 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-07-23vcl: Drop now unneeded DevicePoint typedefKhaled Hosny
It has been always typedef'd to basegfx::B2DPoint since: commit 5e218b5c51f7d9cd10bd9db832879efca41b9c75 Date: Wed Jan 12 21:19:32 2022 +0000 always use B2DPoint for DevicePoint Change-Id: I9f5202d5a71c77dd79f1759923917c26bf68a9af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154632 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-05-07framework/taskcreator: declare ARGUMENT_HIDDENFORCONVERSION and use itJulien Nabet
Change-Id: Ie4e8c24bf776d0ba0e1b7f986fd506521816d2e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-07framework/inc/taskcreatordefs.hxx: these are bool and not sal_Bool (2)Julien Nabet
Thank you Mike for having spotted it! :-) Change-Id: I210edf2e05eb6ba02ac9cdd999c4f2233819cfa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151476 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-05-07framework/inc/taskcreatordefs.hxx: these are bool and not sal_Bool since 2014Julien Nabet
See a6287e21f1dab6ae382c24ceeb4c0212b7cad2d7 "framework: sal_Bool->bool" + /opt/lo/bin/clang-format -i framework/inc/taskcreatordefs.hxx as requested when submitting patch with logerrit Change-Id: Icb21563590a4104f3cb678db44fc4b5f1d884764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151475 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-28remove dodgy code in OReadToolBoxDocumentHandlerNoel Grandin
comparing hashcodes without doing an actual comparison is not safe. Code was like this since commit 6845330a228f7b516425e2dcb0aa5f2cdfaedc85 Author: Carsten Driesner <cd@openoffice.org> Date: Wed Oct 17 09:57:37 2001 +0000 #87255# support toolbar item style and help id Change-Id: Ie49647da257e6199d9502c916da2dd3d39d52377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-14loplugin:stringviewparam improvementsNoel Grandin
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-02Avoid conversions between OUString and OString in VCLMike Kaganski
Standardize on OUString, which is the main internal string class. Convert from/to OUString only when communicating with respective external APIs. Removes about 200 conversions from the code. Change-Id: I96ecee7c6fd271bb76639220e96d69d2964bed26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-22BaseMutex->std::mutex in PopupMenuControllerBaseNoel Grandin
Change-Id: I26877ac7b6e5e39f511418d978199189c62cca6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147416 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-09tdf#95936: Tooltip not updated in Toolbars after change ShortcutJuergen Funk
The update of all toobars after change the shortcut was missing, this patch update the toolbars now Change-Id: Ibc896dc48c9143307b028a3c271476482111c2c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146678 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-01-29use std:mutex in PropertySetContainerNoel Grandin
instead of SolarMutex, we don't need to lock SolarMutex here, we are not touching any UI stuff Change-Id: I09f2dfd2c5e6e082066a726f8c6d64b4b136a78d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146307 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17tdf#146638 In a titlebar, separator is changed from a hyphen to an emdashRadhey Parekh
Change-Id: Ibf79dfd4c3e2f44ba4564567cd5e3f3650095719 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145542 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-01-17XUnoTunnel->dynamic_cast in RootItemContainerNoel Grandin
Change-Id: I79a44f69dd7233a7e885698d29b929d9831025c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145630 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17XUnoTunnel->dynamic_cast in ConstItemContainerNoel Grandin
Change-Id: I0b3bf3e2c30a150aa3986e05951e0978fc16f1bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145629 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17XUnoTunnel->dynamic_cast in RootActionTriggerContainerNoel Grandin
Change-Id: Ie07b02b2011e4edb23793f6209cc35ccd7607c41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145628 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-15Merge SvXMLAttributeList to comphelper::AttributeListMike Kaganski
And simplify the latter, to always use "CDATA" type (as the former did). "CDATA" was used in all cases but one, where an empty string was used. Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-05Revert all the recent loplugin:unocast changesStephan Bergmann
...as obsoleted by ef533553559fe09b4afab651fc692885d1acf4ed "Rudimentary support for dynamic_cast on UNO proxy objects". This reverts all of: 4cfcc9ac37b90ce64c8402a41eb4638adb185b5c "loplugin:unocast (framework::Desktop)" 03efbf72f4ddf7a84aa8aabef348331bd4b75e8a "loplugin:unocast (vclcanvas::TextLayout)" 80099fdd51a69eaa6c36ca88ef772810e4a777fa "loplugin:unocast (SalGtkXWindow)" cc147f576d8687fb79c77d47d41dc4ba1678a469 "loplugin:unocast (sdext::presenter::CachablePresenterView)" 40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2 "loplugin:unocast (vclcanvas::CanvasFont)" 2d1e7995eae29e2826449eb5179f5fae181794a5 "loplugin:unocast (CairoColorSpace)" 4c0bbe4bd97636207cf71a6aa120c67698891da9 "loplugin:unocast (canvas::ParametricPolyPolygon)" 89803666621c07d1b1ac9d3bd883f0ca192a91a0 "loplugin:unocast (vclcanas::CanvasBitmap)" d5e0c2c8db71878d21c2a7255af08cf5f9a6dd04 "loplugin:unocast (sfx2::DigitalSignatures)" c0c4519e0d5b555f59bbc04cc616454edfd1f4ce "loplugin:unocast (VCLXAccessibleComponent)" feb8b833a6245d42400f42a0bc789dc84594ee6f "loplugin:unocast (VCLXDialog)" 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 "loplugin:unocast (VCLXMultiPage)" f481f036deb1b1b46f3038074c4659f3a91b9c6c "loplugin:unocast (DocumentSettingsSerializer)" 73df933f5fa5932f94e5a1b338a3eda00a9ce354 "loplugin:unocast (css::embed::EmbeddedUpdate)" 420165ab0ef03c0467f9d17f504de2d2fc78f0e6 "loplugin:unocast (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)" 9abe8ee067e6c00f19d8a13346d53c4641c27166 "loplugin:unocast (MutableTreeNode)" 9f3022ceb036f23b4b0994c3e2fbd1001bff225a "loplugin:unocast (VCLXTabPage)" 1be70dda02c12a60778b7607cff2520ae1aa611e "loplugin:unocast (vcl::unotools::VclCanvasBitmap)" d6a70bb641b96e8e5616448c2378131ed62658b4 "loplugin:unocast (basegfx::unotools::UnoPolyPolygon)" 5a14f009e6782c077463c8cbb8e9cea3d7950107 "loplugin:unocast (xmlsecurity::Certificate)" 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 "loplugin:unocast (sd::Annotation)" 0c7585c5fa78887e5459885ed744e8044fd76137 "loplugin:unocast (sd::TextApiObject)" 24e14afd1bfcaed6c200ab081973fba7e47267ca "loplugin:unocast (SignatureVerifierImpl)" 1a7ad0c10d286ce9ae2700ceb2fd50eed1fb43a4 "loplugin:unocast (pcr::PropertyEventTranslation)" a97e2d2702d9a6f37775ccee2c08c4f3b2479c4b "loplugin:unocast (RangePageBreaks)" 19dfdf86ad1f5b08041d8b7a9f196caf881231ab "iloplugin:unocast (pcr::OFormattedNumericControl)" f9785ea595fd8e911f6370e836fa579225b9e571 "loplugin:unocast (frm::OInterfaceContainer)" 5e5f40a4a92a31b0932c690219d002fcf18598cf "loplugin:unocast (ScVbaShapes)" 27b35b2c215b4832d4378ec3a7ecbba926552d06 "loplugin:unocast (ScVbaShapeRange)" cb3108f860065928552a86cf8acc4b3a95718ecf "cid#1517812 Dereference null return value" feba0ddb1521d1142560fe54b7d7696ee910237f "loplugin:unocast (weld::TransportAsXWindow)" 4d6c23216559eb48f9943bb49d6e475a6d64ba15 "loplugin:unocast (oox::ForumlaImExportBase)" 4844c096a8ab6a9a620c410a0949d4499f12a504 "loplugin:unocast (cairocanvas::SurfaceProvider)" 9a0b523e0a84d403b9092176ccec4b3e3efe42d0 "loplugin:unocast (cairocanvas::CanvasBitmap)" 8a5648d8e59b4b007dbbf3824777c19a21efc61e "loplugin:unocast (cairocanvas::TextLayout)" 28c27a0623bc78a0590858f97d03b620985bc84c "loplugin:unocast (cairocanvas::CanvasFont)" 53bc223cb3288e32a417696ee61c29e5f01f209d "loplugin:unocast (cairocanvas::RepaintTarget)" 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec "loplugin:unocast (SvXMLImport)" 068187a898cdd2e26e9b16c348ecc1ed2dee3f29 "loplugin:unocast (VCLXWindow)" 88b4f966202717cd4ad38a30a8eda22c3e69ed35 "loplugin:unocast (sfx2::sidebar::SidebarController)" f1b7a69b280aefe2f1b3b0f32193494fd765f2bd "loplugin:unocast (SvxLineStyleToolBoxControl)" ba76f0ba7e8de4d2953739c952004b7d9af47197 "loplugin:unocast (i18npool::Calendar_gregorian)" 840154daf934d8df52ead1cb7acd798c4d30f007 "loplugin:unocast (framework::AddonsToolBarWrapper)" b0e9c4c5f063cefa9557810e3349bdb9c7493091 "loplugin:unocast (GrammarCheckingIterator)" 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac "loplugin:unocast (ucb::ucp::ext::Content)" 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a "loplugin:unocast (basic::SfxScriptLibraryContainer)" 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad "loplugin:unocast (sdext::presenter::PresenterNotesView)" a98acca8fbc38d3fd5600ae5056a8e42b6d8a40d "loplugin:unocast (SelectionChangeHandler)" c0b59ad6e35b0cb0dea0821e95f95569739078c1 "Consistently use comphelper::getSomethingImpl<I>(aIdentifier, this)" 276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c "loplugin:unocast (vclcanvas::RepaintTarget)" Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-16Use rtl::Reference to avoid a dynamic_castStephan Bergmann
Change-Id: I1a439df62a33c7edccbbe62e373690b17b2f6161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144315 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-14loplugin:implinheritancehelper in frameworkNoel Grandin
use more ImplInheritanceHelper to reduce boilerplate Change-Id: I47eefb8edc2041fa89e64f930b1997566562d51a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144162 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-14loplugin:unocast (framework::AddonsToolBarWrapper)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I8014f683b939da9d638545c77dbddb3e478a385e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144143 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-12tdf#151376 framework: fix calling in-document macros with reused framesMiklos Vajna
The bugdoc has a macro in it, and after closing the document -> start center -> opening it again, you could no longer trigger the macro by clicking on the URL field in the Calc cell. The problem is that we cache protocol handler instances since 3f768cddd28a2f04eb1ffa30bed4474deb6fbfc4 (framework: avoid re-creating protocol handler instances all the time, 2022-05-02) in frames, but we failed to invalidate this cache when the component of the frame changes. Fix the problem by clearing the cache in XFrameImpl::setComponent(), which gets called in this somewhat rare case when a frame gets reused to host a different component. [ No testcase, I'm not sure how to close a document without disposing its XFrame from code. ] Change-Id: I73ee83ec017f476803010cbf9e514315fc797371 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143998 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-11-10Simplify the method and fix its descriptionMike Kaganski
The description had the copy-paste error since commit 648106f879fdf6609db1e0d4c8acb43b3a997833 (Fri Apr 04 16:12:43 2003 +0000) when impl_searchMatchingInterceptor was replaced with findByPattern. Change-Id: I84d8c867b6606ef8adb74df823046b58cf6d9b51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142541 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-28use more string_view in frameworkNoel Grandin
Change-Id: I9a79eef6d41696f1de7569f40d6eaf1d85ff77bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140638 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30tdf#149956 Rework toolbar image flippingMaxim Monastirsky
An unified code, covering both vcl and weld cases. For SidebarToolBox, the controller is created before items are inserted, so we listen for item insert event to set initially correct state. Change-Id: I3841f21883104b4d3f8541c97ec7fa5fc0bec575 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139022 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-30tdf#149956 Remove previous vcl only solutionMaxim Monastirsky
Change-Id: Id67b75856a230e175ccc6328ec0838c78589191b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139020 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-10Unnecessary ToolBox::SetItemText callMaxim Monastirsky
Change-Id: I8d15e9657b3a6d01de9d07130ae3aa8284fbd178 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138037 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>