summaryrefslogtreecommitdiff
path: root/include/vcl
AgeCommit message (Collapse)Author
2024-09-13UBSan CppunitTest_editeng_borderline etc. need more RTTI nowStephan Bergmann
...presumably since 5ba893dfb8838b0ef946b52de9ef1336d2ab0512 "use more concrete UNO type in editeng", > DynamicLibraryManagerException: "Failed to load dynamic library: /home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/LinkTarget/CppunitTest/libtest_editeng_borderline.so > /home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libeditenglo.so: undefined symbol: _ZTIN3vcl9unohelper18DragAndDropWrapperE" (<https://ci.libreoffice.org/job/lo_ubsan/3306/>) Change-Id: I4501c3df9f353d9b1244f92b5bbc6fb2dafc24bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173311 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-09-12use more concrete UNO type in editengNoel Grandin
Change-Id: I5cad4808a1e5f10022f8a0441eb81a279d9b6386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173196 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-10use more concrete UNO type in vclNoel Grandin
Change-Id: I157109d11b349e1304a3279471d4ab90b65b5841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-10Add arguments to Last 4 UNO Commands in CrashReport DumpXisco Fauli
Change-Id: I8ea1e95abb62374b51de7b1d37055c216b29e04c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173125 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-09-10tdf#143148 Use pragma once in BitmapConvolutionMatrixFilter.hxxChris Sherlock
Change-Id: If220df8a3bba570e00ba7891f7141892d80da3bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172974 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-09-05tdf#162359 sw: fix the export of comments as PDF annotationsTibor Nagy
Change-Id: If4a8a1a73c382f496b2c6dd4d52271dc6bc87dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172877 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
2024-08-27vcl,filter: replace about 5 hard-coded JPEG PDF export qualitysMichael Stahl
... with a constant; depending on whether FilterData is passed, the effective default is either 80 or 90. Change-Id: Iffaf8baf8f0ae8ea1cc96c299e4c415d91f818f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172469 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2024-08-22tdf#153966 vcl: Fix precision loss laying out right-aligned textJonathan Clark
Previously, characters would appear to 'fidget' while typing right-aligned right-to-left text. This fix contains the following changes: - Removed a floating point truncate during right-align positioning. - Removed unnecessary repeated multiply-add from the main layout loop. Change-Id: I2f070efb6a1387db1595b41023bd0f076064afda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172230 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-08-19SalLayout::InitFont doesn't do anythingCaolán McNamara
there is a MultiSalLayout::InitFont that overrides it, but only forwards InitFont to the first child sub SalLayout, which itself then doesn't do anything. This is possibly the case since: commit 6c436ba09cb35235ce6f4065cf74c9a6ff14a4bd Date: Thu Dec 1 03:33:30 2016 +0200 Kill old Windows layout engines Change-Id: Ic0d347843257d13ee6d6f695488bd053f5a931fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172040 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-16cid#1616498 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1616499 COPY_INSTEAD_OF_MOVE Change-Id: I21b089cab036902a7ba5b725a6eae0f1212f2b31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171923 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-15vcl: add "fillWithData" function to BitmapTools - used in lokTomaž Vajngerl
Change-Id: Ia143a39d2285bbdebf7fcfe709b0c6418d35585c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171589 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-08-14dubious to enable/disable help button based on IsContextHelpEnabledCaolán McNamara
in just the SingleTabController, which is a specific subset of all dialogs, the case of a dialog that hosts a page typically seen in a multi-table dialog. Why should such a dialog have no help, while its sibling containing the same page alongside others would have help, or vice-versa. Change-Id: I3f54c0088e30a396e83e990510ebe7f1f3bc7bda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171848 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-14CairoSDPR: Handle EmphasisMarksArmin Le Grand (Collabora)
Handling EmphasisMarks for direct text rendering was a hard task - the EmphasisMark stuff is deeply buried in vcl (would have needed to move quite some includes from vcl to public) and thus hard to use. It is also quite old (tools Polygon, Rectangle). It was missing in the decomposition of the TextDecoratedPortionPrimitive2D (for good reason), but is needed now. I found a way using a callback lambda function to create the needed geometry in vcl and hand back the needed data to the caller, in this case to the decomposition. Adding it to the decomposition of TextDecoratedPortionPrimitive2D also guarantees that other renderers/usages will do the correct thing and all will look identical. Interestingly EmphasisMarks were never added to Metafiles (see OutputDevice::ImplDrawEmphasisMarks) so they were not 'missing' in Metafile-based exports. But for SDPRs they have to work. I added another encapsulating TextHierarchyPrimitive to encapsulate primitives that do represent EmphasisMarks and added to ignore these in the VclMetafileProcessor2D (as needed). Change-Id: I5b5c1528d86a123df2beb57d8366f05aa71e77cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171826 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-13tdf#130857 VclBuilder: Move handleAtkObject to base classMichael Weghorn
Change-Id: I0f29b53b58f2d65d3409f6416406ba21c2411b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171821 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move handleItems to base classMichael Weghorn
Let the base class do the parsing for items and return a `ComboBoxTextItem`. It has nothing `vcl::Window` specific. (`vcl::Window` specific part is only when this gets applied in `insertItems`, which could probably be reimplemented differently for other subclasses). Change-Id: Ica2f435b48c69fbdfff450b713d91a6fbe985de6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171820 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move size group parsing to base classMichael Weghorn
Move the parsing of size groups from `VclBuilder` to the base class, `BuilderBase` and add a getter, `BuilderBase::getSizeGroups` that currently gets used from `VclBuilder`. Since the parsing is not specific to vcl::Window, make it possible to reuse it from other subclasses. It could e.g. be useful for the WIP QtInstanceBuilder from Omkar's WIP change [1]. [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: I0c44bfda1d5c850679695ab6bd436e4e487df9c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171819 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-13tdf#130857 VclBuilder: Move list store handling to base classMichael Weghorn
This has has nothing vcl::Window specific, so make it reusable by other subclasses, like the WIP QtInstanceBuilder from Omkar's WIP change [1]. [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: I8ef00b9534c8f9d6bf756371133401ac06c05168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171818 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move collectProperty to base classMichael Weghorn
With the translation/localization moved to the base class in Change-Id: I2cefddae0a7e2e2dd4487cc9b9796afb215e2616 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Aug 12 12:52:16 2024 +0200 tdf#130857 VclBuilder: Move locale handling to base class , `VclBuilder::collectProperty` can now be moved there for reuse as well. Change-Id: I159aac8b59dd429b3c7d991c0d2546ae6739bcca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171790 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Extract helper to finalize valueMichael Weghorn
Extract helper method `BuilderBase::finalizeValue` to "finalize" a value, i.e. translate (if applicable) and apply the string hook (if set) from `VclBuilder::handleItems`. It will be reused in `VclBuilder::collectProperty` in an upcoming commit to reduce duplication. Change-Id: I76a41dbe9c830de02cb38b17d3587d49f64d0ff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171788 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move locale handling to base classMichael Weghorn
* Introduce `ParserState` in the `BuilderBase` base class and move the `std::locale m_aResLocale` there from `VclParserState`. * Add a virtual `resetParserState()` method to reset both parser states. * Move `VclBuilder::handleInterfaceDomain` to the base class to let it take care of the handling of the translation domain/locale. * Instead of directly accessing the `m_aResLocale` member of the parser state, introduce a new getter, `getResLocale()`. Moving more of the members from `VclBuilder::m_pVclParserState` to `BuilderBase::m_pParserState` might make sense in future commits in order to reuse code for other implementations (like the WIP QtInstanceBuilder from [1]), so start with a corresponding struct right away instead of a member for just the locale. [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: I2cefddae0a7e2e2dd4487cc9b9796afb215e2616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171786 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Rename ParserState -> VclParserStateMichael Weghorn
This is in preparation of reintroducing `ParserState` in the base class, `BuilderBase`, with the plan to move things not specific to `vcl::Window`s there in the longer run, for reuse for subclasses not using `vcl::Window`, like the WIP `QtInstanceBuilder` from Omkar's pending WIP Gerrit change [1]. [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: I54758554b0093d3eefcd6f1f13f3479bdd07a0ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171785 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Extract helper for interface domainMichael Weghorn
Extract a helper method `VclBuilder::handleInterfaceDomain` that handles the "domain" attribute for the "interface" node that specifies the translation domain. This is more or less extracted from Omkar's WIP Gerrit change <https://gerrit.libreoffice.org/c/core/+/163103/9>. Co-authored-by: OmkarAcharekar <omkaracharekar12@gmail.com> Change-Id: I30ae1362b4d25ca478d2872cd695006a133d73f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171764 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-13tdf#130857 Drop VclBuilder::m_pStringReplaceMichael Weghorn
Just use a local variable and call the `Translate::GetReadStringHook` getter directly in the currently 2 places using it. (Those will be further consolidated to use a helper method in upcoming commits.) Change-Id: I787a4794e6fd727e19bad12d5f61df66f41964c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171763 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-13tdf#130857 VclBuilder: Move m_bLegacy to base classMichael Weghorn
... and introduce a protected getter instead of accessing the member directly. Change-Id: I105cb10b015887ee14bba0c519f03e9ba8b4c3c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171750 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-13tdf#130857 VclBuilder: Move 2 static methods to base classMichael Weghorn
They're not `vcl::Window`-specific and might be helpful for other implementations as well. Change-Id: I8c04706ac36f80bc225a9ad89352b3d4a7c6464f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171749 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-13VclBuilder: Drop UStringPair in favor of StringPairMichael Weghorn
They're the same since commit 116b9d6ddf2b61186b29f0370234eec9c1bbe306 Date: Sun Apr 2 01:18:42 2023 +0300 Avoid conversions between OUString and OString in VCL , so consistently use `StringPair` and drop `UStringPair`. Change-Id: I7120760b006957a81dfac50c85a00c9583242cd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171745 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-11Related: tdf#154959 suitable label printer paper size not auto-selectedCaolán McNamara
a) If the printer is the default, then it doesn't get a paper size auto selected in the paper combobox, even though the preview shows it rendered on a paper size that the printer supports. b) With that fixed, then if the printer is the default one then right paper gets selected automatically, but starting with another and then switching to it gets different results, so throw away the "page cache" on switching pages and get it again. Change-Id: Idd5254eac2668164b02b41a63943f65a222656d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171721 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-07tdf#130857 qt weld: Implement newly added 'escape_ui_str'Michael Weghorn
Implement actual Qt-specific handling in `weld::QtInstanceWidget::escape_ui_str`, newly added in commit ee749f4b43fea3b666c9c3613b232bc8fecf73fa Date: Tue Aug 6 16:47:30 2024 +0200 add polymorph function for VCL/ui specific string escaping For a sample use, see also commit fb56e1e284925937eff4386a7e3655c0f3182640 Date: Wed Jul 31 22:25:01 2024 +0200 tdf#161909: Escape filepaths for password dialog. (See also `vclToQtStringWithAccelerator`, but which would result in the accelerator character '~' to be preserved/converted as an accelerator, which is unintended here.) While at it, also fix a typo in the doc. Change-Id: Ic557a1aa8c6b46257a231627d817f1f7e1d101cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171586 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-07add polymorph function for VCL/ui specific string escapingMoritz Duge
Change-Id: Ie896a1050158acc85f66b8705812e5f6b9717070 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171509 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-08-07cool#9704 calc jsdialog autofilter send disabled entry informationJaume Pujantell
Added the code necessary to disable already filtered entries on jsdialog autofilter, like it is done on desktop UI. Change-Id: I095b7fe0054efcaff2717d05a2ab7bd1d8248b29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171246 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 2815d11bb608a933e14b799cc802825423426d28) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171530 Tested-by: Jenkins
2024-08-05CairoSDPR: direct text rendering using CairoArmin Le Grand (Collabora)
I have added basic support for the text primitives (TextSimplePortionPrimitive2D) to the SDPR Cairo renderer. It can now basically render Text using a fallback to the already existing CairoTextRender. NOTE: This is not yet complete, but for discussion. Change-Id: I9b0c7b6bb4892905576593ef4e2b4071c7663c63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171429 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-02tdf#155636 tdf#155637 tdf#156962 Consistently use non-native controlsMichael Weghorn
Since commit ea36e0502c0bc381577cfa1b1a7fedf0f05d1d72 Date: Tue Oct 4 12:42:33 2022 +0100 tdf#150786 use a 'standard' theme for form controls i.e. ignore system theme so we get the same results on export to pdf regardless of the theme (esp dark) and don't follow the system theme when hosted with a writer/calc/impress document (do continue to use system theme for StarBasic dialogs as seen in BasicIDE) Didn't reuse 'NativeWidgetLook' for this because is currently defaults off, while we currently do use the colors derived from the system theme even when this is off, its really the NWF flag to render using the platform theming engine , form controls in Writer/Calc/Impress documents are supposed to no longer make use of the system theme, but use style settings independent of the platform and system style/theme set. However, `ImplSmallBorderWindowView::Init` could still decide to enable native drawing of borders, in which case it would enable transparency for the control and the control background color would no longer be seen with at least the Qt-based VCL plugins after commit 0e14dbc9ecdf6abae3ae3089e3b4e22f27dd4cb1 Date: Thu May 4 10:24:53 2023 +0100 Resolves: tdf#155029 set StandardStyles before updateFromModel e.g. for the multiline edit control in attachment 195659 from tdf#155637, where `mbNWFBorder = true;` would be set like this: #0 ImplSmallBorderWindowView::Init(OutputDevice*, long, long) (this=0x55af6388e700, pDev=0x55af62d49770, nWidth=214, nHeight=365) at vcl/source/window/brdwin.cxx:458 #1 0x00007fed4de9f168 in ImplBorderWindow::InitView() (this=0x55af638bdb50) at vcl/source/window/brdwin.cxx:1793 #2 0x00007fed4dea08f4 in ImplBorderWindow::UpdateView(bool, Size const&) (this=0x55af638bdb50, bNewView=true, rNewOutSize=Size = {...}) at vcl/source/window/brdwin.cxx:1808 #3 0x00007fed4dea0847 in ImplBorderWindow::DataChanged(DataChangedEvent const&) (this=0x55af638bdb50, rDCEvt=...) at vcl/source/window/brdwin.cxx:1771 #4 0x00007fed4de6fc32 in vcl::WindowOutputDevice::SetSettings(AllSettings const&, bool) (this=0x55af62d49770, rSettings=..., bChild=false) at vcl/source/window/settings.cxx:68 #5 0x00007fed4de6fb19 in vcl::WindowOutputDevice::SetSettings(AllSettings const&, bool) (this=0x55af62d49420, rSettings=..., bChild=false) at vcl/source/window/settings.cxx:52 #6 0x00007fed4de6fa8f in vcl::WindowOutputDevice::SetSettings(AllSettings const&) (this=0x55af62d49420, rSettings=...) at vcl/source/window/settings.cxx:44 #7 0x00007fed4e12d376 in vcl::Window::SetSettings(AllSettings const&) (this=0x55af62fbb530, rSettings=...) at vcl/source/window/window3.cxx:209 #8 0x00007fed501e3374 in UnoControl::createPeer(com::sun::star::uno::Reference<com::sun::star::awt::XToolkit> const&, com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&) (this=0x55af62c79380, rxToolkit=empty uno::Reference, rParentPeer=uno::Reference to (VCLXContainer *) 0x55af61cbc178) at toolkit/source/controls/unocontrol.cxx:1299 #9 0x00007fed5023dc39 in UnoEditControl::createPeer(com::sun::star::uno::Reference<com::sun::star::awt::XToolkit> const&, com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&) (this=0x55af62c79380, rxToolkit=empty uno::Reference, rParentPeer=uno::Reference to (VCLXContainer *) 0x55af61cbc178) at toolkit/source/controls/unocontrols.cxx:241 #10 0x00007fed05f6009f in frm::ORichTextControl::createPeer(com::sun::star::uno::Reference<com::sun::star::awt::XToolkit> const&, com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&) (this=0x55af62c79380, _rToolkit=empty uno::Reference, _rParentPeer=uno::Reference to (VCLXContainer *) 0x55af61cbc178) at forms/source/richtext/richtextcontrol.cxx:163 #11 0x00007fed05e34126 in frm::OControl::createPeer(com::sun::star::uno::Reference<com::sun::star::awt::XToolkit> const&, com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&) (this=0x55af61e17c60, _rxToolkit=empty uno::Reference, _rxParent=uno::Reference to (VCLXContainer *) 0x55af61cbc178) at forms/source/component/FormComponent.cxx:272 #12 0x00007fed50201095 in UnoControlContainer::impl_createControlPeerIfNecessary(com::sun::star::uno::Reference<com::sun::star::awt::XControl> const&) (this=0x55af5eb108c0, _rxControl=uno::Reference to (frm::OEditControl *) 0x55af61e17cc8) at toolkit/source/controls/unocontrolcontainer.cxx:595 #13 0x00007fed501ff973 in UnoControlContainer::impl_addControl(com::sun::star::uno::Reference<com::sun::star::awt::XControl> const&, rtl::OUString const*) (this=0x55af5eb108c0, _rxControl=uno::Reference to (frm::OEditControl *) 0x55af61e17cc8, _pName=0x55af5f0d2670) at toolkit/source/controls/unocontrolcontainer.cxx:608 #14 0x00007fed50201183 in UnoControlContainer::addControl(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::awt::XControl> const&) (this=0x55af5eb108c0, rName="com.sun.star.form.control.TextField", rControl=uno::Reference to (frm::OEditControl *) 0x55af61e17cc8) at toolkit/source/controls/unocontrolcontainer.cxx:628 #15 0x00007fed517f1aff in sdr::contact::ViewObjectContactOfUnoControl_Impl::createControlForDevice(sdr::contact::(anonymous namespace)::IPageViewAccess const&, OutputDevice const&, SdrUnoObj const&, basegfx::B2DHomMatrix const&, basegfx::B2DHomMatrix const&, sdr::contact::(anonymous namespace)::ControlHolder&) (_rPageView=..., _rDevice=..., _rUnoObject=..., _rInitialViewTransformation=..., _rInitialZoomNormalization=..., _out_rControl=...) at svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx:1126 #16 0x00007fed517ee55b in sdr::contact::ViewObjectContactOfUnoControl_Impl::impl_ensureControl_nothrow(sdr::contact::(anonymous namespace)::IPageViewAccess const&, OutputDevice const&, basegfx::B2DHomMatrix const&) (this=0x55af6389c6b0, _rPageView=..., _rDevice=..., _rInitialViewTransformation=...) at svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx:1044 #17 0x00007fed517ee1d2 in sdr::contact::ViewObjectContactOfUnoControl_Impl::ensureControl(basegfx::B2DHomMatrix const*) (this=0x55af6389c6b0, _pInitialViewTransformationOrNULL=0x55af6380a1f0) at svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx:960 #18 0x00007fed517f36a1 in sdr::contact::(anonymous namespace)::LazyControlCreationPrimitive2D::create2DDecomposition(drawinglayer::geometry::ViewInformation2D const&) const (this=0x55af61d38c40, _rViewInformation=...) at svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx:1545 #19 0x00007fed5467691a in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const (this=0x55af61d38c40, rVisitor=..., rViewInformation=...) at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:133 #20 0x00007fed517f358c in sdr::contact::(anonymous namespace)::LazyControlCreationPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const (this=0x55af61d38c40, rVisitor=..., _rViewInformation=...) at svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx:1530 [...] Introduce a new flag `WindowBorderStyle::NONATIVEBORDER` and set it for the newly created control in `UnoControl::createPeer` if the use of the "standard theme" instead of the system style is enabled. Evaluate the flag in `ImplSmallBorderWindowView::Init` to never enable native drawing if it is set to consistently not apply system styling for such controls. Change-Id: Ib12685a3cf98acba035899221feb536f40cda84c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171396 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-02tdf#162259: correctly handle font width on WindowsMike Kaganski
Unlike other platforms, on Windows, the font width is not relative to font height, but to average width of font's glyphs. This is mentioned in LogicalFontInstance::GetScale. 1. In VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D, when calculating the correction for width / height (introduced in commit cc3663bbaed4f65d64154e5f9abb51a5f622f710, 2024-04-20), the already applied X scale is now calculated using unscaled font's width. 2. Commit 8557ea84c9336ba8061246f1f46ddb6e02f413a1 (Exclude getHScale from DirectWrite font rendering, 2024-04-08) was effectively reverted, because I was wrong assuming that the code there was unnecessary. 3. Commit 2092df2a9044f1c2ae4379f48a3201e5867575a8 (tdf#161154: pass "scaling is done externally" information down the stack, 2024-05-18) was also reverted. Change-Id: I8cff39b67a6efd380f7807f5655f401bdb62cc3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171382 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-08-02tdf#155447 a11y: Set accessible ID for WeldEditViewMichael Weghorn
Let `WeldEditAccessible` derive from `XAccessibleContext2` and implement `XAccessibleContext2::getAccessibleId` by returning the accessible ID set in the underlying drawing area. This makes an accessible ID of "sentence" show up in Accerciser for the corresponding edit view in Writer's spell check dialog when using the qt6 VCL plugin, since that is the ID set in the .ui file (cui/uiconfig/ui/spellingdialog.ui). It's not set for gtk3 yet, which uses native GTK widgets, and where the accessible ID is not set for the drawing area yet. Change-Id: I5cf8958118c84c01ecb3545381a05b306ca53163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171320 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-02tdf#155447 a11y: Introduce weld::Widget::get_accessible_id()Michael Weghorn
This will be used in an upcoming commit to implement reporting of the accessible ID for `WeldEditView`. For Qt 6, this uses the API introduced in qtbase commit [1] commit b8b7c58402740204da72e1b1f4ea7321b7bfa540 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Jul 15 16:53:58 2024 +0200 a11y: Add property for QWidget's accessible ID For GTK 4, there is currently no corresponding API; issue [2] suggests to add it. [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b8b7c58402740204da72e1b1f4ea7321b7bfa540 [2] https://gitlab.gnome.org/GNOME/gtk/-/issues/6870 Change-Id: I9bf38b3c2d6d0cf627ac4288695dcc1137c3d120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171319 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-07-31tdf#162280 vcl: consider font family type for glyph cachingMiklos Vajna
Open tdf105820-1.doc from crashtesting in a dbgutil build, save as PDF, we assert in checkGlyphsEqual(). This is a problem since commit 6dfac38bacd449c64a13363797b56aff49cf8f52 (tdf#162072 vcl, fontconfig: consider font-family-generic for substitute, 2024-07-18), because now the font name no longer determines the fallback name alone, so 2 paragraphs may share the cached vcl-level text layout, even if the underlying fallback font is different. One would naively expect that in the SalLayoutGlyphsCache::CachedGlyphsKey ctor, the fontMetric.GetFamilyType() already has the correct family type, but it turns out that is always the default, and only outputDevice->GetFont().GetFamilyType() has the up to date setting: debug:12372:12372: SalLayoutGlyphsCache ctor: output device font family name is 'Verdana', output device font family type is roman, font metric family name is 'Verdana', font metric family type is 'swiss' debug:12372:12372: SalLayoutGlyphsCache ctor: output device font family name is 'Verdana', output device font family type is swiss, font metric family name is 'Verdana', font metric family type is 'swiss' Fix the problem by explicitly including the output device font family type in the cache key. Note that this only happens in practice if the same font is used in the document with different family types, which is probably never the intention of the user. E.g. Verdana is meant to be sans, a serif Verdana is some weird corner-case. Change-Id: Id6cc60809a35a3dcdc6e83122a559ddfbe5d5d0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171280 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-07-31tdf#161765, tdf#115688 Let user choose which animation settings to usePer99
In the accessibility option page, the user can now choose which animation settings to use (OS's or LO's animation setting) and what animations to allow. This fixes also tdf#115688: "Add Checkbox option to disable animated overlay to Tools -> Options -> Accessibility panel" Changes due to this patch: 1. Changes in the GUI of the accessibility option page: - New option "Allow other animations" (Used for "Marching Ants" animation, instead of old expert option "AnimationsEnabled"), now as enum. - Changed option "Allow animated images", now as enum: "System", "No", "Yes" - Changed option "Allow animated text", now as enum: "System", "No", "Yes" - The old animation options in Common.xcs are not renamed, but marked as deprecated and obsolete in their text. These above changes are in the files: [optaccessibilitypage.ui, optaccessibility.hxx, optaccessibility.cxx, Common.xcs] 2. Added functions to compute if the animations of images/text/other are allowed. If "System" is chosen, then use OS’s animation setting. See files: [settings.hxx, settings.cxx] 3. Respect the animation settings of animated images/texts in Draw and Impress. Don't prohibit the user to enable animations in Draw and Impress if the OS's animations are disabled. See file: [objectcontactofpageview.cxx] 4. Respect the animation settings of animated images in Writer. See file: [viewsh.cxx] 5. Respect the "Allow other animations" setting in Calc (for "marching ants" animation). Don't prohibit the user to enable these other animations in LO if the OS's animations are disabled. See file: [overlayobject.cxx] Change-Id: I5173f9b3d8652a17a6ae07164e874143738bcd66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170827 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-07-25tdf#67919 access toolbar button dropdown menu from macOS VoiceOverPatrick Luby
The fix was copied from the following NeoOffice source code files which are licensed under the Mozilla Public License, v. 2.0: https://github.com/neooffice/NeoOffice/blob/NeoOffice-2022_7/accessibility/source/standard/vclxaccessibletoolboxitem.cxx https://github.com/neooffice/NeoOffice/blob/NeoOffice-2022_7/include/vcl/toolbox.hxx https://github.com/neooffice/NeoOffice/blob/NeoOffice-2022_7/vcl/source/window/toolbox.cxx Change-Id: Ibd24c6df4ecd7fdac1c56763d1daec09936a9b31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170426 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-24tdf#161501 icon choice ctrl: Drop WB_HIGHLIGHTFRAMEMichael Weghorn
It is always set, so no need to have an icon choice control specific window bit to specify whether or not to highlight the currently mouse-hovered entry. Just always do it. Change-Id: Ib259b6b1576e1968221c4f98661a3a93e600c93b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170922 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-24tdf#161501 icon choice ctrl: Use a single member for entry rectMichael Weghorn
`SvxIconChoiceCtrlEntry` has two members for maintaining the bound rect: * `aRect`, used almost everywhere * `aGridRect`, used very rarely `SvxIconChoiceCtrl_Impl::FindBoundingRect` calculates a new bounding rect and assigns it to `pEntry->aGridRect`, then calls `SvxIconChoiceCtrl_Impl::Center`, which at first assigns the same value to `pEntry->aRect`, so both are the same there. The other place using the `aGridRect` member is `SvxIconChoiceCtrl_Impl::CalcMaxTextRect` where it's used as a fallback if `aRect` has not been assigned a proper value yet. However, since `aGridRect` is never assigned a useful value apart from `aRect`, there doesn't seem to be much value in doing that, so use `aRect` there, too, and drop the `aGridRect` member altogether and assign directly to `aRect` in `SvxIconChoiceCtrl_Impl::FindBoundingRect` instead. Instead of falling back to `aGridRect` in `SvxIconChoiceCtrl_Impl::CalcMaxTextRect`, add an assert that `aRect` is valid instead, which never triggered in my tests with the "Insert" -> "Hyperlink" and "Format" -> "Page Style" dialogs, so should presumably be fine already. Change-Id: I99f368672523279f530b937a73c3afb655f7853e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170894 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-24tdf#161501 vcl: Make TabitemValue position-awareMichael Weghorn
Add a new `TabBarPosition` enum that describes whether a tab bar is at the top, left, right, or bottom (relative to the tab page content) and make use of that for the new `meTabBarPosition` member for `TabitemValue` that gets used for drawing tab items via the native rendering API. Set the position accordingly for both the vertical tab control (`TabControl`) and `SvxIconChoiceCtrl_Impl`, which implements the tab bar for `VerticalTabControl`. For Qt-based VCL plugins, implement mapping to the corresponding `QTabBar::Shape`. [1] At least the Breeze Qt style uses that shape to decide whether on what side of the tab item to draw the selection/focus indicator. This change by itself doesn't yet make any visual difference for the Breeze style, as the "Top" value/ `QTabBar::RoundedNorth` is the default anyway, and `SvxIconChoiceCtrl_Impl` doesn't yet use the native drawing API for drawing focus/selection, but only for mousehover feedback. The plan is to implement that in a follow-up change. [1] https://doc.qt.io/qt-6/qtabbar.html#Shape-enum Change-Id: Idf1e41d3bc309d152a4a36d14e8617bd6429940c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170841 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-23Resolves: tdf#162161 reexport of specific pdf appears blankCaolán McNamara
the contents of the referenced colorspace obj disappears so it gets rendered blank Change-Id: Iaa76d355b5903c695e74edadc329043156bad3b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170904 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-23loplugin:unusedmethodsNoel Grandin
Change-Id: I1863f86f064f02c7e37425ff6c74e7b370460295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170896 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-17vcl: support for Windows ITaskbarList3 interfaceVasily Melenchuk
And a demo implementation for these features as a taskbar window will become red once LO is displaying any error message. Change-Id: Ifc04026c699059da2e457de2c69e7363e756109c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166740 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-07-16tdf#162002 DOCX import, font embed: only discard subset fonts with few glyphsMiklos Vajna
Commit a9f3c11375525a7708378dd3648febc40db1ad20 (tdf#162002 DOCX import: ignore subsetted embedded fonts for editing, 2024-07-12) decided to ignore all subsetted fonts for editing, improve this a little so we only ignore subsetted fonts when they can't even provide an English alphabet in any form (lowercase, uppercase). This avoids the possible problem that a font is marked as subsetted but it's good enough in practice and we would still throw it away for editing. Change-Id: I0bc0e14ffc0c039f029220991bd16d9e3254f059 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170570 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-07-12tdf#129244: Let ImpGraphic update its buffer for new pixel sizesMike Kaganski
It used getVectorGraphicReplacement once, getting a bitmap with pixel size that depended on the default device DPI, unrelated to the needed bitmap size. It was not updated later, using the cached bitmap for any requested size. The DPI passed to convertPrimitive2DSequenceToBitmapEx must represent the relation between the vector logic size and the pixel size of the generated bitmap, not the target device DPI. This change introduces VectorGraphicData::getBitmap to obtain a bitmap for any requested pixel size, and uses it every time in the introduced ImpGraphic::updateBitmapFromVectorGraphic method every time it needs a new size of the image. Change-Id: Ife1305821fff28f0cd4070615ab032211a5d8c4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170391 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-07-12icon choice ctrl a11y: Don't allow unselecting entryMichael Weghorn
`SvtIconChoiceCtrl` is (only) used in `VerticalTabControl`, and having no tab selected doesn't make much sense. Support for non-single selection modes was dropped in commit af9413cb4ad49c0b4854c08cc2804644220755ae Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Jul 2 11:53:27 2024 +0200 tdf#161853 icon choice ctrl: Drop support for non-single selection modes Consequently, also drop support for explicitly unselecting one or all entries via the `XAccessibleSelection` interface in the corresponding a11y class, `AccessibleIconChoiceCtrl`. Drop the now unused `SvtIconChoiceCtrl::SetNoSelection` and `SvxIconChoiceCtrl_Impl::SetNoSelection`. This is also in line with handling for the the non-vertical tab control used elsewehere. Change-Id: I852b5bf7480daf18bfdf26c3105849c27624ad8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170369 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-10icon choice ctrl: Drop code for non-autoposition modeMichael Weghorn
As shown by Change-Id: I8d19e15d8c6e95cdc5e797e6b9524d9299dc1fdd Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Jul 9 17:32:01 2024 +0200 icon choice ctrl: Always use SvxIconChoiceCtrlPositionMode::AutoArrange , `SvxIconChoiceCtrlPositionMode::AutoArrange` is the only positioning mode that actually gets used, so simplify the code by dropping the effectively unused code for `SvxIconChoiceCtrlPositionMode::Free`. (`git show --ignore-space-change` can help to see the "actual changes" more easily.) Change-Id: Icd5ee30eafefafbf597681e28521d5a566ea0af3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170249 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-10icon choice ctrl: Simplify list pos handlingMichael Weghorn
Instead of storing the current list position in the `SvxIconChoiceCtrlEntry` and having to take care of updating that when entries are added to or removed from the `SvxIconChoiceCtrl_Impl` in order to keep it in sync with the elements in the vector, just calculate and return the vector index in `SvxIconChoiceCtrl_Impl::GetEntryListPos` on demand. Change-Id: Iec4e700c1ccc1261fde778b1b38af4dbac5a14c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170247 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-07-10sd: slideshow render interface and implementationMarco Cecchetti
Interface and implementation to expose the ability to render the slide's layers to a bitmap. Change-Id: I3da48585e498354592e163d84bd29659b233c255 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170214 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>