summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2023-01-12comphelper::OCommonAccessibleComponent's XAggregation is apparently unusedStephan Bergmann
It had been using WeakAggComponentImplHelper2 ever since 2f79d5f4794ec7f076bb290702b4c9c0afb2a6c8 "initial checkin - helper for implementing an XAccessibleContext", but all the classes that derive from it (comphelper::OAccessibleComponentHelper, comphelper::OAccessibleExtendedComponentHelper, and classes that in turn derive from those) implement queryInterface (in a way not just forwarding to the base class queryInterface, as would be required for classes implementing XAggregation) rather than queryAggregation, so aggregation was broken and any delegator would be ignored when calling queryInterface on one of the derived classes. Also, without this commit but instead with a local > --- a/include/comphelper/accessiblecomponenthelper.hxx > +++ b/include/comphelper/accessiblecomponenthelper.hxx > @@ -49,6 +49,7 @@ namespace comphelper > :public ::cppu::BaseMutex > ,public OCommonAccessibleComponent_Base > { > + void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); } > friend class OContextEntryGuard; > private: > css::uno::WeakReference< css::accessibility::XAccessible > m_aCreator; // the XAccessible which created our XAccessibleContext on all of Linux, macOS, and Windows: `make check` still succeeded, and running the resulting LibreOffice with the system in some assistive technology narration mode produced audio, all without hitting that injected assert that should have fired if the XAggregation mechanism had been used after all. Change-Id: I47045824d0762a5f3de150a11576694621b163b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145330 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-12drop internal support for 1-bit imagesNoel Grandin
on modern hardware, these are less efficient than regular alpha channels. Also, this greatly simplies the range of stuff that vcl needs to deal with, which will make the upcoming transparency->alpha patch easier to deal with. Enhance vcl::CreateFromData to convert incoming 1-bit data to 8-bit image. Change-Id: I35829da750029fe373d0d2911a669d10bab6ad23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-12Revert "tdf#56258 svx SetOutline: convert to toggle"Justin Luth
This reverts 7.6 commit a9b666b6b839735919923d8911f7e1efe0eb87b0. This causes too many unexpected things for the user. The biggest problem is that it does not join the previous list like the other numbering does. I suppose I could fix that by first calling a UNO command that joins/turns on numbering. However, that is a bit more dangerous with outline, since it modifies spacing / numbering on all levels, and joining can unexpected skip empty paragraphs etc. So best to just always treat the button as a dropdown to indicate to the user that they are applying an outline change. For the present I decided to leave the lighted-up aspect in place, so show that the outline is in effect. In terms of removing the list, which was the main reason for the change in the first place, there are several workarounds. The user has the option to go to "more choices" and remove, or select an all-1s choice and then remove that. Using the bullets button also is an easy option since it seems less restricted than numbering. The overall risk is no different from before, except that it is easier to make those kinds of levels now that the outline button is always available on the toolbar. Change-Id: I64e13f203ae65b2d2b28560ba747ca99d1456578 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145240 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-11svx typo: RelplaceNumRule -> ReplaceNumRuleJustin Luth
Change-Id: Ic11fcf35a7b1a6fb15a4046300639622095ed823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145241 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-11rename BitmapEx::GetAlpha to GetAlphaMaskNoel Grandin
to ease the reading of code related to an upcoming patch to convert transparency to alpha, since there is already a GetAlpha in Color. Change-Id: I1af0f8f6dd94acfe4673c8556c7aff6c20da3f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-11Resolves tdf#152666 - Hide default styles for large listsHeiko Tietze
Show the default styles only if the number of items are low and hide successively otherwise Change-Id: Iefafa0cfee7629fb034b9583d7aed7501475a54a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145268 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-01-09tdf#147906 Use std::hypot for Pythagorean additionLeonid Ryzhov
Change-Id: Ia325af8d9a23e617eb62e6cecab0aa68f1d206f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145089 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-01-06Merge comphelper::OAccessibleContextHelper into ↵Stephan Bergmann
comphelper::OCommonAccessibleComponent Change-Id: I586ae8fe2842fd879ae2ae506c659d06dda16843 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145160 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-06tdf#56258: allow i18npool to define SvxAdjust for outlineJustin Luth
Deciding whether the numbering should be Left, Right, or Center is a rather important setting. Specifically for Roman numerals (which grow very wide as they increment to 7 and 8) the numbering styles set these to right aligned. This really helps for keeping the text nicely aligned. The numbering styles are built-in LO defaults, but locale files can define numbering and outline choices. This patch add the setting for "adjust" on the outline levels. For en_US, it makes sense to right-align roman numeral levels. [The only other highly likely candidate for this that I could find was old Hungarian (SZEKELY_ROVAS), but it doesn't seem to be used in any locale definitions.] I only changed en_US for now, but of course many other locales are also using NumType="3" and NumType="4". This only applies to the toolbar/sidebar SVX code path. The Bullets and Numbering dialog does not currently modify any spacing, so I didn't apply the adjustment either. It also doesn't make sense to do this on single numbering changes (aka ContinuousNumberingLevels or LC_NumberingLevel) because we don't know or control the first line indent there either. But at least for toolbar Outlines, we do change every level, and so can set a (somewhat) appropriate spacing. [Setting SvxAdjust without adjusting the spacing is pointless. Don't make any changes at all if the spacing ends up causing problems.] The Numbering IVX/ivx styles set the firstLineIndent to -174, so I did the same here. This is the scariest part of this change. AFAICS SvxAdjust::Left is a non-locale aDefNumStyle default, so hardcoding that for undefined LC_OutlineNumberingLevel shouldn't be too scary. Change-Id: I52deefe88aa55c55c9531b651411f64accb86f7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144978 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-06tdf#56258 sw toolbar: show SetOutline by defaultJustin Luth
Because I am making improvements to SetOutline, it should be in good enough shape to display it to the general public. If the improvements don't land, or are not considered good enough, then this patch can simply be reverted. I have no intention of backporting this. Change-Id: If2a4926d136086b3ae2d17d157b5a4642d88561e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145097 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-06tdf#56258 svx SetOutline: convert to toggleJustin Luth
The "Outline Format" toolbar button is normally hidden. It didn't check state like the bullet and toggle numbering do. This patch adds that - so it lights up when the text contains a numbering list that matches a valid outline choice. I also added a toggle aspect to the button. Toggling ON is not great. It works fine if there is no numbering yet, but if you are in an outline and toggle off, it won't toggle back on to the same list - it starts a new one. I don't think there is much that can be done about that, since the removal delete the level information too, and outlines are all about multiple levels of numbering. The proper response to an errant toggle off is (multiple) undo(s), not toggle back on. (In the ideal world, it would popup the dropdown choices). Toggling ON does nothing when there are already bullets or numbering. The proper response is to use the dropdown if the desire is to change to an outline format. Toggling OFF is only possible when we are on a valid outline. This is extremely important because otherwise it isn't clear how to remove Outline Numbering's mix of bullets and numbers. (When the selection contains one list with both bullet and number levels, the number and bullet buttons do nothing.) Although not perfect, this is not a bad user experience, so I'm going to push the full patch to gerrit. There is one known obscure case that troubles all methods. If the selection spans multiple list definitions and ends on an un-numbered paragraph, then the toggle-on will happen. It is possible to just not do any toggling and ALWAYS show the dropdown action, but that isn't very consistent with the other related buttons. Change-Id: I6d927604e49711f1da8549be9f3dbf8b8133a06b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145061 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.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>
2023-01-05sw: add the ColorSet from SdrPage into ColorSets in ThemePanelTomaž Vajngerl
Change-Id: I7c4ef103b2be65a8adbad5d4f00304ee22be668f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143997 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-04Related: tdf#150339 remove SID_ATTR_COLOR_STRCaolán McNamara
re: https://gerrit.libreoffice.org/c/core/+/144866 "ColorString is not needed anymore (we used that in LOK previously)." Change-Id: I50a2f0e2ad254afb8ede33b05c89ae40bfeb4d3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144967 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-04tdf#56258 svx: use last defined locale-outline for remaining levelsJustin Luth
When applying an outline numbering choice (one of the 8 predefined per-locale definitions) the toolbar/sidebar would only affect the spacing of 0 - 5 of the defined locale-levels, and only changed the num type of the remainder. Well, that can easily look bad if the indenting and spacing is only partially modified. [The Bullets and Numbering dialog outline grid does not affect spacing at all. That can be better or much worse, depending on the situation.] This "Outline Format" button is normally turned off on Writer's Formatting toolbar. You need to go to Tools - Customize - Toolbars to turn it on. It only seems to work for Writer - it was grayed out/disabled in Draw even when I had it show up in the toolbar. So almost nobody has ever seen or used this I expect. However, I think it is important to get this working, because I want to use this grid-choice code path to be usable for the B&N dialog as well, although that could upset people who already have their spacing right and just want to change the digits. In any case, this nbdtimg DOES already change some spacing, so it should be either all or none. Change-Id: Ib54b6ffe3497f09f0c57ff2db1ec2a946f692fc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145022 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-03jsdialogs: fix generic color label nameSzymon Kłos
update event was triggering other widget change: when opened calc and selected shape first time we saw color text next to other color label Change-Id: I71670ac1273ce96fafc8d20126d9f32151e96d89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143471 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pedro Silva <pedro.silva@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144950 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-01-02Resolves: tdf#150339 two arguments called "Color"Caolán McNamara
from around: commit 780d83771af89e6b27b3618d9c033c3fb29ba803 Date: Mon Nov 4 17:17:58 2019 +0100 jsdialogs: .uno:Color with string argument and: commit 1144712bb99cfb699e73b473ee44351c50a35613 Date: Mon Oct 28 10:19:50 2019 +0100 jsdialogs: make possible to set .uno:BackgroundColor in Writer SvxColorItem Color SID_ATTR_CHAR_COLOR (SfxStringItem Color SID_ATTR_COLOR_STR, SvxColorItem Color SID_ATTR_CHAR_COLOR,... ^^^^^ ^^^^^ rename the most recently added to "ColorString" Change-Id: I9e00be60c768af124be7df800df4b26df83b5267 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144866 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-01oox: add support for importing font scheme into a svx::ThemeTomaž Vajngerl
Change-Id: I862256a17ce84c85174678f3fd03c8ef6661f2c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143995 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-12-31Resolves: tdf#150676 silence SvxColumnItem::QueryValue with 0 arg warningCaolán McNamara
which is commonly seen and not unexpected Change-Id: I3dde49f8cee206985187e9317a354536f18f4e0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144877 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-30tdf#152737: Fix off-by-one errorsKhaled Hosny
Regressions from: commit 718af940435ae9d2ac90374e5880ecb38e96252c Author: Khaled Hosny <khaled@aliftype.com> Date: Fri Dec 16 00:10:34 2022 +0200 tdf#152533: Improve script handling in font preview and: commit bfecacb2487ba9470600e6f64056d9b1816ee96b Author: Khaled Hosny <khaled@aliftype.com> Date: Thu Dec 15 22:51:54 2022 +0200 tdf#152460: Improve script handling in style previews Change-Id: I7b12f5accbd65459d724676efb7bec947a7faaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144880 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-12-29tdf#152683 LO Draw ignoring Undo:Resize Grouped ObjectNoel Grandin
regression from commit 4e24efb563cbe6fec4185b4f7ec3755b2fc05b6b tdf#54857 elide more dynamic_cast Change-Id: I4fbabe64649ee47a9360dd939b5f39d35bd29c51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144858 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-26svx: use array for colors in ColorSet, add consts, rename varsTomaž Vajngerl
Use std::array for colors in ColorSet as there are always only 12 colors for a color scheme. Add "const" to getters where appropriate. Rename maColorSetName to maName in ColorSet - long variable name is not needed. Change-Id: Iacb976a22af2d2585d627b0ba65d98cbe1b825c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143994 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-12-26svx: rename ThemeColorType enum values, use enum instead of indexTomaž Vajngerl
Change-Id: I81c1553205365c4076562474078b3b0aa834b249 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143990 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-12-21qa: hint about tolerance in namesXisco Fauli
As suggested by Mike in https://gerrit.libreoffice.org/c/core/+/144171 Change-Id: I653118985b781ebb1eed71587ae19efe45e1c800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144691 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-21Resolves: tdf#152593 reuse Line Style preview code for Line Width previewCaolán McNamara
Change-Id: I842b3bfaeb63978377ebb3edaef4dfd94ec296a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144651 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-20loplugin:unocast (weld::TransportAsXWindow)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) On macOS, where we implicitly use -fvisibility-inlines-hidden-static-local-var since <https://github.com/llvm/llvm-project/commit/d46f2c51e4c849683434bb5a0fb6164957474b8f> "Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin", the static id local var in weld::TransportAsXWindow::getUnoTunnelId cannot be in an inline function implicitly hidden via -fvisibility-inlines-hidden. Explicitly marking the function as VCL_DLLPUBLIC would help, but would in turn cause MSVC error 2487 ("member of a dll interface class may not be declared with dll interface"). So just make the function non-inline in a new vcl/source/window/weldutils.cxx (which would arguably be the best approach for the whole class, anyway). Change-Id: Ib5615f6aae19346ea05b8b85ff77c0e5ea860994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144331 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-19Resolves: tdf#146933 wire up keypress events for table control widgetsCaolán McNamara
Change-Id: Idc8cc3c24d061537a76a37f4fa84951a41a42657 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144470 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-19[API CHANGE] tdf#85592: deprecate .uno:BackColor, use .uno:CharBackColorJustin Luth
EditEngine stuff uses CharBackColor, while SW used BackColor. Deprecate the SW-only SID. What does this do? It allows the toolbar "Character Highlighting Color" to work with both body text (previously BackColor) and comment text(CharBackColor). Otherwise, the toolbar item was disabled when moving into a comment. (Shapes/Textboxes got their own formatting toolbar, so those are unaffected.) AFAIK, after this commit, SID_ATTR_CHAR_COLOR_BACKGROUND should still work fine for API calls, or for customized toolbars. That's why I didn't try to remove it completely - just deprecate. Do I know what I am doing here? No, although I'm fairly confident nontheless, and I've had some good help from reviewers. Change-Id: I0afcbdb1b91c872f6d47f3c82c573f3b9fea6dfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137334 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-12-16check SfxObjectShell::Current()Caolán McNamara
SfxObjectShell::Current() can return null, it's based on the equally vile SfxViewFrame::Current() Change-Id: Ia5c7783680e9d8e5d3075078f16a2c15cb6f7a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144339 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16loplugin:unocast (SvxLineStyleToolBoxControl)Stephan Bergmann
(See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I13f71f717a8661e0889ab7acf6fe7c7ebbe3dbe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144332 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-16pSh cannot be null here, checked at the start of methodCaolán McNamara
Change-Id: Ia6b8599c7ff185d5beecf6572c0df353320d8ebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144338 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16likely fix for frequent pShell->GetStyleSheetPool crashCaolán McNamara
SfxObjectShell: :Current can return null, it's based on the equally vile SfxViewFrame: :Current Change-Id: I1d937b92188deb06eef36af5d0835e173d588d2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144322 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16svx: check SfxViewFrame::Current()Caolán McNamara
these ones look potentially worth backporting Change-Id: Ie7325cd5548c0c10c6b6df9c1a771d24b029b635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144274 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16Merge sdr::table::TableDesignUser into sdr::table::SdrTableObjImplStephan Bergmann
Change-Id: Ia7841447df4a7db1b5dd9fad93cab66fbca48981 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144316 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-16svx: check SfxViewFrame::Current()Caolán McNamara
SfxViewFrame::Current() is a festering wound, these ones look like they were safe anyway, so no need to backport. But with enough checked static analysis will kick in to flag new unchecked ones. Change-Id: I846a67ca7392182fee6afead8d066fc061ce00be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144253 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-16tdf#152533: Improve script handling in font previewKhaled Hosny
Use Edit Engine to get the script types instead of trying to duplicate (poorly) its behaviour. This has the advantage of handling weak characters and digits properly and is closer to what would happen in the document itself. We probably should go further and render the preview entirely using Edit Engine (since the current code fails short of proper bidi handling), but this is a bigger change. Change-Id: I975cb2d96a4a18dbd8110686ca09649cab0ec2f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144284 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-12-16tdf#152460: Improve script handling in style previewsKhaled Hosny
Use Edit Engine to get the script types instead of trying to duplicate (poorly) its behaviour. This has the advantage of handling weak characters and digits properly and is closer to what would happen in the document itself. We probably should go further and render the preview entirely using Edit Engine (since the current code fails short of proper bidi handling), but this is a bigger change. Change-Id: I79b28067d80f66087e1d5e9399ba1a513de96c8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144283 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-12-15svx: fix null deref in ParaLineSpacingControl::ExecuteLineSpacingXisco Fauli
See https://crashreport.libreoffice.org/stats/signature/svx::ParaLineSpacingControl::ExecuteLineSpacing(long) Change-Id: Ide29a7e78bf1114f0ebc104fa8c245e52d590eea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144239 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-15Resolves: tdf#147640 default optional grids hiddenCaolán McNamara
they are always explicitly toggled on/off by the owner, but this way they will be no-show-all and not make visible on relocating to a new parent Change-Id: If17cb15988118875a680e4d1a04c148f47c7a7b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144219 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-15resave with latest gladeCaolán McNamara
Change-Id: I00d1a4e727e411ea91d2a95b081d2a68f2b90ba2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144218 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-15Resolves: tdf#92051 add tooltips to section/table statusbarCaolán McNamara
Change-Id: I649eabbe266085fdbc0ca9c4a5506c0c2a270721 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144199 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-15UnoApiTest: introduce CPPUNIT_ASSERT_RECTANGLE_EQUALXisco Fauli
and get rid of duplicated code Change-Id: Iccbd3147fab71b43b1725af308df8ed37c807b7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144173 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-12-14Resolves: tdf#152495 crash on dismissing ruby dialog with ESCCaolán McNamara
Change-Id: I26af008a7ee7b105255a1aaacff7ff30813172a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-14table cel->table cellCaolán McNamara
Change-Id: Id817e6da3c445d827584d1ece9aba195f641d506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144165 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-14loplugin:implinheritancehelper in svxNoel Grandin
use more ImplInheritanceHelper to reduce boilerplate Change-Id: I8c966d372b94c2ab1296bc7ed6613da8dae818d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-12-09svx: fix unmaintainable TypeConstant definitionMichael Stahl
Add one new token and every test in CppunitTest_sd_import_tests-smartart fails. Change-Id: I0d79a5000fc2ef9b699ffca3d75199e9479cf561 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143834 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-12-07Resolves: tdf#152301 allow using an existing ColorListBox to speed initCaolán McNamara
Change-Id: I31fb350fd69831e68ca7c60ec758126aab086895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143791 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-07Related: tdf#152301 cache color widget widthCaolán McNamara
Change-Id: I0030980e2259715aa1fa624eb0ee82d5dfc51810 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143778 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-12-06sfx2: rename FN_PARAM_1 to FN_NOUPDATEHenry Castro
The parameter is intended to not update the fields from data source otherwise it will reset to the first record. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I204cd20b8eb0b3f26c204e139c72b479c83bbf0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142276 Tested-by: Jenkins
2022-12-06tdf#152380: add checks for names and values sequences length equalityMike Kaganski
Change-Id: Ibeef551126874bcfffb4e7736588e2e1873f5768 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143681 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>