summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2024-03-07tdf#158773 reduce dynamic_cast in AttributeProperties::NotifyNoel Grandin
Change-Id: I29143d4908454be819acec16732533ff5caa1055 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164530 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07tdf#158773 reduce dynamic_cast'ing in TextProperties::NotifyNoel Grandin
Change-Id: If4a68433c57fdf3da56891fa0b4be6f8a991d929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07Simplify some basegfx::fTools::*orEqual callsNoel Grandin
Comparing with zero is simple - the implementation of basegfx::fTools::moreOrEqual calls rtl_math_approxEqual eventually, which special-zases zero. Change-Id: I62f10f63f103d91a201dfeb20e5b3f9010f377c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-07Simplify a comparisonMike Kaganski
Comparing with zero is simple - the implementation of basegfx::fTools::moreOrEqual calls rtl_math_approxEqual eventually, which special-zases zero. Change-Id: I47c6059b56426c93e0c244036edeb5632037e093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164492 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-07tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::NotifyNoel Grandin
shaves 2% off the load time Change-Id: I579825bd6101b57a44b0f3118ede17ec2393d9d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164477 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-06tdf#158773 reduce cost of TextProperties::NotifyNoel Grandin
Shaves 30% off the load time here, by re-arranging the logic so we do th expensive dynamic_cast less often Change-Id: If7a1605994e620dbdb61010506c624cc738359a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164466 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-06tdf#158773 reduce dynamic_cast'ing in CustomShapeProperties::NotifyNoel Grandin
shaves 2% off the load time Change-Id: Ia7e4747711948ccfeb274cf32028d03486cc14a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-06tdf#158773 reduce cost of ContentInfo::GetTextNoel Grandin
The specific path that is showing up on the perf profile is SdrTextObj::HasText -> EditTextObjectImpl::GetText -> ContentInfo::GetText Reduce the cost by 10% there by adding a method to check if we have text, and avoid the cost of constructing an OUString from an svl::SharedString. Also make use of the new method in places. Change-Id: Ibc2e0f61c4a2a6c33eea7f2cce09d692d82fd2b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164449 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-04tdf#132599 cui offapi sw xmloff: implement hyphenate-keepLászló Németh
Both parts of a hyphenated word shall lie within a single page with ODF paragraph setting fo:hyphenation-keep="page". The implementation follows the default page layout of MSO 2016 and newer by shifting the bottom hyphenated line to the next page (and to the next column, see last note). Note: this is a MSO DOCX interoperability feature, used also in DTP software, XSL and CSS. * Add checkbox/combobox to Text Flow in paragraph dialog * Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationKeep) * Add ODF import/export * Add ODF unit tests New constants of com::sun::star::text::ParagraphHyphenationKeepType, containing ODF AUTO and PAGE (borrowed from XSL), and for the planned extension ParaHyphenationKeepType of ParagraphProperties: – COLUMN (standard XSL value, defined in https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#hyphenation-keep) – SPREAD and ALWAYS (CSS 4 values of hyphenate-limit-last, equivalent of hyphenation-keep, defined in https://www.w3.org/TR/css-text-4/#hyphenate-line-limits). Note: the implementation truncates only a single hyphenated line, like MSO does: the pages can end in hyphenated lines (i.e. in the case of consecutive hyphenated lines), but less often, than before. Clean-up hyphenation dialog by collecting "Don't hyphenate" options at the end of the hyphenation settings, and negating them (similar to MSO and DTP), adding also the new option "Hyphenate across column and page": [x] Hyphenate words in CAPS [x] Hyphenate last word [x] Hyphenate across column and page Note: ODF fo:hyphenation-keep has got only "auto" and "page" attributes, while XSL defines also "column". Because of the interoperability with MSO and DTP, fo:hyphenation-keep="page" is interpreted as XSL "column", avoiding hyphenation at the end of column, not only at the end of page. Change-Id: I5c6b7adc0671a5a790568e7bf1d33256e607f85f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164158 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2024-03-04GLib-GObject-CRITICAL **: gsignal.c:2778: instance X has no handler with id YCaolán McNamara
Change-Id: I4fbbd4af0ed1605874e2ef2694ecda0a9e107a07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164332 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-04svx: prefix members of XGradientEntryMiklos Vajna
See tdf#94879 for motivation. Change-Id: Ib00e0ea61ad421eb1d02d973ab8dc8c79b006a64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164326 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-03-04cool#8327 use tools::JsonWriter for theme colorsNoel Grandin
Change-Id: Iebca3781910f9e28100258da8266d51f673f31d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164232 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-03-03Resolves: tdf#159696 Small capitals with 'Individual words' underliningCaolán McNamara
Change-Id: I79af3f74ef384f734273b00bddbcfed8952a3ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164303 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-03Resolves: tdf#159879 Crash when closing "3D View" dialogCaolán McNamara
Change-Id: I9c116007afe9cea97b597933ad8483dce25c3707 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164295 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-03Fix typo in codeAndrea Gelmini
Change-Id: I3cb218403469ff17dfd2f955ecd0aaa14e7bccbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164296 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-03Fix typoAndrea Gelmini
Change-Id: Ic279c6f88b99caa252872170b3c8bbd2047497ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164297 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-03-01LOK: send inner text boundry information of shapes/textboxPranam Lashkari
Sends inner rectangle boundry info as part of LOK_CALLBACK_GRAPHIC_SELECTION message Change-Id: Idc51e807bec01711c8a4326e3193127f0b2cd765 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164124 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-01tdf#94535 Improvements in Text along Path dialogOlivier Hallot
Added labels to indicate the purpose of the toolbars. The dialog needs Close and Help buttons and will be considered later. Change-Id: I1926c05ebc386877007163bdea0809efe0442103 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162056 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2024-02-29IASS: Update edited Text in other ViewsArmin Le Grand (allotropia)
This was not working for multiple Windows for a document, and also not supported for SlideShow until now. If you edit a Text on a Slide (Object, PresObj, ...) that text is not yet set at the Model until the TextEdit ends. In that situation those changes are now propagated to other views visualizing that object. This is done with slight slowdown to not do it all the time while typing, (currently 350ms, grepped from other places in the office). It will be shown in a running open SlideShow (and evtl. trigger an effect at the Object as Preview). This will allow to get a good preview for how it looks in the SlideShow. This is also done for further EditViews opened for that Document. This was not done before. It is fine-tuned to do this only for the Views besides the EditView with the running TextEdit to not cause slowdowns in that active view - the TextEdit is already running on the Overlay to have no problems with speed, this needs to be preserved. I had to fix a multi-view error in the a11y stack that implied that only one view exists and thus has to have an Outliner - that is wrong for multiple views, only one will have one. Change-Id: I781d32a8fcb8732ee8fcfbae72c02d1f99b6cd06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164160 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-29svx: fix default locale language stringHenry Castro
1) Open a spreadsheet 2) Format a cell with a currency. Example USD $ English (USA) 3) Open the sidebar if it's not opened already 4) Click in the currency dropdown 5) Observe: there is $ (Default) Expected result: USD $ English (USA) Default Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Idf7f4174557e59cb6f5ffd65c25572322a5794ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164123 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-28tdf#159874: Inspection of 3D object in Dev Tools crashes LO (take 2)Julien Nabet
To not trigger tdf#159911 (FILEOPEN: 3D object is displayed as black/white) Let's initialize Svx3DTextureKindItem to 2 which corresponds to COLOR in TextureKind2.idl (see https://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/drawing/TextureKind2.idl?r=5687eba4) but now to avoid the crash, we must replace all uses of TextureKind by TextureKind2 Anyway, TextureKind has been deprecated since 2000 (see https://cgit.freedesktop.org/libreoffice/core/commit/?id=4f9e6d84feb36ab3072dafbab0ba4ae46d264f9b "#80594# added a new TextureKind2 enum because of missing value in TextureKind") + use css::drawing::TextureKind2_LUMINANCE + css::drawing::TextureKind2_COLOR instead of wrong numbers Change-Id: I969bd9ba1c6752111a6e6f5cd2c6c608568e43e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163998 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-02-28Avoid calling back into an SdrMarkView that is being destroyedStephan Bergmann
The recently added CppunitTest_sc_tiledrendering CPPUNIT_TEST_NAME=testEditShapeText::TestBody had started to cause > svx/source/svdraw/sdrpagewindow.cxx:471:56: runtime error: member call on address 0x51d0000c4480 which does not point to an object of type 'SdrMarkView' > 0x51d0000c4480: note: object is of type 'SdrPaintView' > 00 00 00 00 30 1f 13 bc ca 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SdrPaintView' > #0 in SdrPageWindow::InvalidatePageWindow(basegfx::B2DRange const&) at svx/source/svdraw/sdrpagewindow.cxx:471:56 > #1 in sdr::contact::ObjectContactOfPageView::InvalidatePartOfView(basegfx::B2DRange const&) const at svx/source/sdr/contact/objectcontactofpageview.cxx:357:29 > #2 in sdr::contact::ViewObjectContact::triggerLazyInvalidate() at svx/source/sdr/contact/viewobjectcontact.cxx:267:28 > #3 in sdr::contact::ObjectContactOfPageView::Invoke() at svx/source/sdr/contact/objectcontactofpageview.cxx:105:29 > #4 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() at svx/source/sdr/contact/objectcontactofpageview.cxx:74:13 > #5 in sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() at svx/source/sdr/contact/objectcontactofpageview.cxx:72:9 > #6 in SdrPageWindow::ResetObjectContact() at svx/source/svdraw/sdrpagewindow.cxx:520:9 > #7 in SdrPageWindow::~SdrPageWindow() at svx/source/svdraw/sdrpagewindow.cxx:130:5 > #8 in std::default_delete<SdrPageWindow>::operator()(SdrPageWindow*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2 > #9 in std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>::~unique_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:398:4 > #10 in void std::destroy_at<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:88:15 > #11 in void std::_Destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:149:7 > #12 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:163:6 > #13 in void std::_Destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_construct.h:195:7 > #14 in void std::_Destroy<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>(std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>*, std::allocator<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/alloc_traits.h:941:7 > #15 in std::__cxx1998::vector<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>, std::allocator<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>>::~vector() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/stl_vector.h:732:2 > #16 in std::__debug::vector<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>, std::allocator<std::unique_ptr<SdrPageWindow, std::default_delete<SdrPageWindow>>>>::~vector() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/debug/vector:245:25 > #17 in SdrPageView::~SdrPageView() at svx/source/svdraw/svdpagv.cxx:122:1 > #18 in std::default_delete<SdrPageView>::operator()(SdrPageView*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2 > #19 in std::__uniq_ptr_impl<SdrPageView, std::default_delete<SdrPageView>>::reset(SdrPageView*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:205:4 > #20 in std::unique_ptr<SdrPageView, std::default_delete<SdrPageView>>::reset(SdrPageView*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:503:7 > #21 in SdrPaintView::ClearPageView() at svx/source/svdraw/svdpntv.cxx:356:20 > #22 in SdrPaintView::~SdrPaintView() at svx/source/svdraw/svdpntv.cxx:189:5 > #23 in SdrSnapView::~SdrSnapView() at svx/source/svdraw/svdsnpv.cxx:199:1 > #24 in SdrMarkView::~SdrMarkView() at svx/source/svdraw/svdmrkv.cxx:197:1 > #25 in SdrEditView::~SdrEditView() at svx/source/svdraw/svdedtv.cxx:126:1 > #26 in SdrPolyEditView::~SdrPolyEditView() at svx/source/svdraw/svdpoev.cxx:58:1 > #27 in SdrGlueEditView::~SdrGlueEditView() at svx/source/svdraw/svdglev.cxx:40:1 > #28 in SdrObjEditView::~SdrObjEditView() at svx/source/svdraw/svdedxv.cxx:101:1 > #29 in SdrExchangeView::~SdrExchangeView() at include/svx/svdxcgv.hxx:27:25 > #30 in SdrDragView::~SdrDragView() at svx/source/svdraw/svddrgv.cxx:69:1 > #31 in SdrCreateView::~SdrCreateView() at svx/source/svdraw/svdcrtv.cxx:199:1 > #32 in SdrView::~SdrView() at svx/source/svdraw/svdview.cxx:154:1 > #33 in E3dView::~E3dView() at svx/source/engine3d/view3d.cxx:1457:1 > #34 in FmFormView::~FmFormView() at svx/source/form/fmview.cxx:124:1 > #35 in FmFormView::~FmFormView() at svx/source/form/fmview.cxx:119:1 > #36 in std::default_delete<FmFormView>::operator()(FmFormView*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:93:2 > #37 in std::unique_ptr<FmFormView, std::default_delete<FmFormView>>::~unique_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/14.0.0/../../../../include/c++/14.0.0/bits/unique_ptr.h:398:4 > #38 in ScGridWindow::~ScGridWindow() at sc/source/ui/view/gridwin.cxx:450:1 > #39 in ScGridWindow::~ScGridWindow() at sc/source/ui/view/gridwin.cxx:448:1 > #40 in ScGridWindow::~ScGridWindow() at sc/source/ui/view/gridwin.cxx:448:1 > #41 in VclReferenceBase::release() const at include/vcl/vclreferencebase.hxx:43:13 > #42 in rtl::Reference<vcl::Window>::~Reference() at include/rtl/ref.hxx:131:22 > #43 in VclPtr<vcl::Window>::~VclPtr() at include/vcl/vclptr.hxx:112:5 > #44 in ImplSVWinData::~ImplSVWinData() at vcl/source/app/svdata.cxx:531:34 > #45 in DestroySVWinData(ImplSVWinData*) at vcl/source/app/svdata.cxx:388:5 > #46 in SfxViewFrame::~SfxViewFrame() at sfx2/source/view/viewfrm.cxx:2012:5 > #47 in SfxViewFrame::Close() at sfx2/source/view/viewfrm.cxx:1190:5 > #48 in SfxFrame::DoClose_Impl() at sfx2/source/view/frame.cxx:138:37 > #49 in SfxBaseController::dispose() at sfx2/source/view/sfxbasecontroller.cxx:928:27 > #50 in (anonymous namespace)::XFrameImpl::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at framework/source/services/frame.cxx:1495:33 > #51 in (anonymous namespace)::XFrameImpl::close(unsigned char) at framework/source/services/frame.cxx:1706:12 > #52 in SfxFrame::DoClose() at sfx2/source/view/frame.cxx:104:29 > #53 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) at sfx2/source/view/viewfrm.cxx:1778:28 > #54 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:40:24 > #55 in (anonymous namespace)::SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) at sfx2/source/doc/objxtor.cxx:147:12 > #56 in SfxBaseModel::close(unsigned char) at sfx2/source/doc/sfxbasemodel.cxx:1516:40 > #57 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:750:13 > #58 in ScTiledRenderingTest::tearDown() at sc/qa/unit/tiledrendering/tiledrendering.cxx:140:22 The fix appears to be to just not call back into the in-destruction FmFormView - ... - SdrMarkView - ... - SdrPaintView - ... deep-inheritance object, by not initiating any further triggerLazyInvalidate from within ~ObjectContactOfPageView. Change-Id: If5e49e4ebdbbf18d38e89c6b28ff3577224080a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164024 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-27Another attempt to ensure strict weak ordering when sortingMike Kaganski
The failure that Stephan noticed turns out to show a problem in the data - the use of the special LANGUAGE_USER_SYSTEM_CONFIG language type value. It should not appear in the sorted part of the list; if needed, it should be added explicitly, like the "default" entry is handled in SvxLanguageBox::SetLanguageList. So simplify the shortcut in GenericFirst::operator() again, and drop the special entries before sorting. Change-Id: If08e0ddbc5b597795e129fa4a2315c54205dab90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163964 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-26tdf#159865 Revert "tdf#136905 NBB: let ValueSetWithTextControl set optimal"Justin Luth
...height This reverts my 24.2 commit 1876feb8a8805b2f80537e2828c152ccbdf67fe2 (as well as my initial attempt to fix it in 24.8). Change-Id: I70c3668393a13992f9ce489e86b07860218445b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163954 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2024-02-26tdf#108697 Allow modifying default bullet selectionSamuel Mehrbrodt
Allow to change bullets in configuration. Change-Id: Iab26118dd597417997d6f0a7355f516a4da97ee4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163735 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-02-26svx: prefix members of XFillHatchItemMiklos Vajna
See tdf#94879 for motivation. Change-Id: I4e2251aa5488c76a270e01f48ed4ccc12fc56332 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163930 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-02-26Fix indentationSamuel Mehrbrodt
Change-Id: If70ef4b92e6998be5d18b8b557fab27c17bb11bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163747 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-02-26Set button label directly in ui fileSamuel Mehrbrodt
Change-Id: If9e22982f4f7c276d19167ff365e1b4e290e3de7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163748 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-02-24tdf#159865 tdf#136905 NBB: font looked too small in page size choicesJustin Luth
This fixes my 24.2 regression from commit 1876feb8a8805b2f80537e2828c152ccbdf67fe2 I considered reverting it, but decided to tweak the font size instead. If I reverted, the size of the choices was displayed in 16pt font. I wanted to keep the sizing as "scientific" as possible, but fixing the rounding issues didn't really make the font stand out as much as desired. In this case, my system font of 11 became 10 for the page size dialog, due to rounding, which is still a significant 10%. Although that still looks too small, it seems fairly close to the other button on the notebook bar, at least to my eyes. But it is definitely smaller/less clear than the "more option" button. Perhaps it has to do with the visible size of a font compared to the full size (with leading)? Fonts are often sized as 11/13 or 12/14 for example. Adding 20% to the font size makes it look about right. In my case, it ends up chosing a font height of 13. Change-Id: Ic0a7296aa74be542e2a38ce52cf5fd23e5d8c7f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163886 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2024-02-23Fix warning C4312 when building with MSVC without -Wv:18Mike Kaganski
Discovered by https://gerrit.libreoffice.org/c/core/+/163717 Like these: C:/lo/core/sw/source/ui/dbui/addresslistdialog.cxx(426): warning C4312: 'reinterpret_cast': conversion from 'int' to 'void *' of greater size Change-Id: Idbfbe8add89c8e219bdabcf28b741e2e31a5e345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163781 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-23Fix warning C4838 when building with MSVC without -Wv:18Mike Kaganski
Discovered by https://gerrit.libreoffice.org/c/core/+/163717 Like these: C:/lo/core/svx/source/form/fmshimp.cxx(138): warning C4838: conversion from 'TypedWhichId<SfxBoolItem>' to 'const sal_Int16' requires a narrowing conversion Change-Id: If5ab7dc19ae936ca39f151a9fc775c83589981f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163780 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-22IASS: Re-define Text suppression for TextEditArmin Le Grand (allotropia)
The current version suppressed text for Objects in edit mode for the paint in the view since that text is painted/visualized by the EditEngine/Overlay while it is being edited, so that would be displayed twice - and in different states. That is correct, but e.g. also suppressed display for e.g. an opened second Window for the Document or in a running SlideShow. The mechanism uses embedding the Text in case it gets edited to a simple Primitive that then can be suppressed by the view rendering it. It decomposed to empty, thus to visualize it a renderer had to actively identify and process it. I now turnedd this around - it is a normal GroupPrimitive2D and decomposes to the text content, so will be visualized by all renderers that do not actively suppress it. To actively suppress it I added a get/setTextEditActive marker to ViewInformation2D that will be used by the ObjectContactOfPageView to signal exactly that and to suppress in the pixel based VCLRenderer in that case. This is important e.g. for 2nd view window, but also for PDF export with active TextEdit (yes, happens) and SlideShow. There was also support missing for an up-to-now empty/new object (no text yet) so that text from the active TextEdit was not provided, corrected that. Change-Id: I0d8befdb023028d78ce341091331e9a83a0173bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163773 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-22fix ubsan use-after-freeNoel Grandin
caused by commit 8cd4cd31e9cffb593ccfba765fa28c2494a2d6f7 Author: AkshayWarrier <aksmen121@gmail.com> Date: Mon Jan 22 20:31:16 2024 +0530 tdf#157882 svx: Remove cap/corner styles and move arrowhead control to new row The ToolbarUnoDispatcher needs to destruct before the associated Toolbar. Shows up as vcl/source/app/salvtables.cxx:1278:1:runtime error: member call on address 0x51700010dc00 which does not point to an object of type 'SalInstanceToolbar'0x51700010dc00: note: object has invalid vptr 00 00 00 00 8c 03 03 00 00 00 00 00 80 43 4e 00 90 51 00 00 00 00 00 00 00 00 00 00 30 7e 9a 00 ^~~~~~~~~~~~~~~~~~~~~~~ invalid vptr SalInstanceToolbar::LinkStubMenuToggleListener(void*, VclWindowEvent&) vcl/source/app/salvtables.cxx:1278:1 void>::Call(VclWindowEvent&) const include/tools/link.hxx:111:45 void*) vcl/source/window/event.cxx:262:23 vcl/source/window/window.cxx:158:5 vcl/source/window/dockwin.cxx:407:13 vcl/source/outdev/vclreferencebase.cxx:38:5 include/vcl/vclptr.hxx:207:19 vcl/source/window/builder.cxx:811:23 vcl/source/window/builder.cxx:803:5 Change-Id: Id890fe431ab724db4bdf7ad6622b933044bd6ade Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163706 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-20tdf#157882 svx: Remove cap/corner styles and move arrowhead control to new rowAkshayWarrier
Change-Id: Ifa38ec7ba9969627ff26abe22c58d06ec373ecb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162403 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2024-02-20tdf#155723: Wrong Tooltips for some of the Basic Shapes (cuboid)Julien Nabet
Change-Id: Icf50428eb0a88b876929f2272a2cbe63208c6ceb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163607 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-02-20tdf#155723: Wrong Tooltips for some of the Basic Shapes (pentagon)Julien Nabet
Change-Id: Ie6fd95177d4b62f00011cb382f97090963b2cf3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163606 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-02-20Make Clone Formatting in Impress similar to PPOliver Specht
In Powerpoint paragraph attributes are only applied from and to fully/multiple selected paragraphs. Change-Id: I7c1f3afb6c0d6fd9b3f8acf34cb5f5b3dcaf22d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163583 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-02-19ITEM: Speedup SlotIDToWhichID translationsArmin Le Grand (allotropia)
With ItemInfoPackages we now can have a buffered, static global translation table from SlotIDs to WhichIDs since the ItemInfoStatic used already contains all the needed information. Register that in registerItemInfoPackage at the Pool and use it for lookup. That speeds up the lookup from O(n) to O(1). Since that lookup is used in UI and UNO API implementations this has positive effect on load/safe, but also all interactive stuff in the whole office. NOTE: I tried to use a merged version of that translation table in the parent pool, but this shows double SlotIDs, what is no wonder since that's what those are used for: To get different WhichIDs for a SlotID in Item handling. This *might* prevent getting rid of the chanined Pools at all - sadly. The returned WhichID directly depends on which Pool the function(s) GetWhichIDFromSlotID and GetTrueWhichIDFromSlotID are called. NOTE: Very strange is that the parameter 'bDeep' in that functions is *not* passed down to the call to the secondary Pool - probably an error, but risky to fix, that may change already the behaviour :-( Change-Id: Iea77ffad0f6a5401ab74fea0bbfc2589c66680ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163597 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-19svx: prefix members of XFillGradientItemMiklos Vajna
See tdf#94879 for motivation. Change-Id: I3d951d553d524cedc876330a70e6fe94edba0173 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163579 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-02-19hide more symbolsNoel Grandin
using the bin/find-can-be-private-symbols.py script to find classes with large numbers of exported symbols that can hidden. before exported = 58104 imported = 30810 unused_exports = 35433 after exported = 55094 imported = 31073 unused_exports = 32423 Change-Id: Idd0a70ee3740afd5ca1a86771e0e2ff8090d102d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-18ITEM: Rename for more control over SlotID usagesArmin Le Grand (allotropia)
Change-Id: I51585f1c15984a066262023184f668662853d20f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163556 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-16svx a11y: Drop AccessibleTextHelper_Impl::GotPropertyEventMichael Weghorn
Use `AccessibleTextHelper_Impl::FireEvent` directly instead, which is in my opinion more readable, in particular since 2 of the 3 uses were sending an `AccessibleEventId::CHILD` event, which is not really about any property. Change-Id: I446d2d7a841397b215bf099528920bcc6ee9f227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163428 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-02-14tdf#159704 svx: preserve text when getting grpahic from sdrobjectJaume Pujantell
When getting a Graphic object from an SdrGrafObj with text the text was lost. Change-Id: I3a8316511e502b832b65dc72faebaf8c00923c38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163293 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit d0241915eba35c9dc0cc42f322df798a270db00f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163342 Tested-by: Jenkins
2024-02-12use more UNLESS_MERGELIBSNoel Grandin
Change-Id: I351a9127fb26369d8f598b6d6519d7e490fa476b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-12tdf#159666 Crash when table and line object are selected at the same timeNoel Grandin
before commit e3077168072452fb8f1c0a8afb2992877cb96d1c Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Jun 17 09:49:37 2021 +0200 loplugin:finalclasses the cast in const SdrEdgeObj* pEdge = static_cast<SdrEdgeObj*>(m_pObj); would incorrectly cast a SdrTableObj, but it happened to do nothing problematic. After the above commit, the vtable layout changed and it started crashing. Work around it by use dynamic_cast and ignoring objects that are not SdrEdgeObj. Change-Id: Ibe03d4935b8eeb182e037b1648d841e26fa23ed4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163242 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-12Resolves tdf#158531 - Connector lines for Keep Ratio settingHeiko Tietze
Icons taken from https://thenounproject.com/icon/lock-89649/ and https://thenounproject.com/icon/unlock-89647/ (licensed PD) Change-Id: I7efd25e83726ced7dee4f876cf4bb4c8f54408df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160460 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-02-12make BufferedDecompositionPrimitive2D store a Primitive2DReference..Noel Grandin
.. instead of a Primitive2DContainer. The container very frequently contains only a single item, since the decomposition method often sticks only a single top-level node in there, so it turns out to be a net loss overall, memory consumption-wise. Also, if we return a single Primitive2DReference from a BufferedDecomposition, that maximises the sharing of data between the BufferedDecomposition objects at the bottom of the decomposed tree, and objects higher up. Change-Id: Iaf272e60e2997299cc35a1bd209c51b6b79e9a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162976 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-12ITEM: ItemPool Rework (I)Armin Le Grand (allotropia)
Driving forward the Item reworks I now take the ItemPool in focus: It now does not hold any items anymore and should be renamed to something like ItemInfoProvider/ItemHelper, since it's main purpose is to provide the Defaults for the Item functionality. There is that SfxItemInfo, only a struct and bundling SlotID and ItemFlags. There are also the DefaultItems, just handled as ptrs in an array. It is/was always error-prone to keep these in sync. Remember that it's also necessary for the order to not only being sorted but being increments of one with no gaps allowed in the WhichIDs to which the Items are bound. I now bundled that to a new class ItemInfo that joins WhichID, SlotID, ItemFlags and the default Item. This is a pure virtual base class, it comes in three derivations: (1) ItemInfoStatic: This is supposed to be global static and hosts the Item in a std::unique_ptr to ensure cleanup. It is designed to be constructed once during runtime and being shared globally. It allows the ItemPtr to be nullptr to mark as non-static (if initial static is not possible for some reason) but still offers the needed data. Most cases (95%+) are of that case. The contained Item is owned by that instance. The flag isStaticDefault() is set at the Item. (2) ItemInfoDynamic: This is supposed to be used for cases where the Item cannot be static: Mainly for SfxSetItem (that needs a Pool itself in the contained SfxItemSet, so lifetime is bound to that Pool), but other cases showed up in the transition. These instances live while the Pool lives and get destructed when the Pool goes down. Also uses std::unique_ptr for the Item instance for as much automated cleanup as possible, the contained Item is owned by that instance, the instance by the Pool. The flag isDynamicDefault() is set at the Item. (3) ItemInfoUser: This is used for UserDefaults that can be set for every ItemInfo entry to 'overshadow' the default from the 'outside'. It uses a regular Item and the central access methods implCreateItemEntry/ implCleanupItemEntry to manage the Item instance, thus works like a SfxPoolItemHolder. The Item instance can be globally shared and re-used even when the Pool goes down. Instances belong to the Pool and are cleaned up when the Pool goes down. This Item does not need any further flag to be set. The ItemInfos are organized using a class called ItemInfoPackage: This bundles groups of ItemInfoStatic to functional instances. There are derivations/ implementations of this e.g. for Writer ItemPool bundling all the needed defaults for Writer, similar for draw/impress, Calc and other usages. These ItemInfoPackage can be 'registered' at an ItemPool using it's method registerItemInfoPackage. This does all the needed stuff to setup that group of ItemInfos at the Pool (It even sets internal vars First/LastWhich, that info can just be derived from the buildup ItemInfo Ptrs). The ItemInfoPackage has methods 'size()' and 'getItemInfo(index) to allow looping over it and deliver the infos the Pool needs. The (forced, pure virtual) overloads of getItemInfo in the specific implementations check for the ItemPtr being nullptr and create a exclusive incarnation of ItemInfoDynamic for the Pool if needed, returning that. The Pool owns the ItemInfoDynamic incarnations and uses the ItemInfoStatic directly. On shutdown it cleans up the ItemInfoDynamic as needed. The ItemInfoUser is used by the Pool when a UserDefault is set/used: for SetUserDefaultItem, GetUserDefaultItem, ResetUserDefaultItem. It is not held in a 2nd list, but directly in the list of ItemInfo'ptrs: To keep track of this an unordered_map is used that helds the original ItemInfo associated with the WhichID. That way no two lookups (as before) are needed to get the current Pool's default for any WhichID. The derivations of ItemInfoPackage are encapsulated and just allow access to an ItemInfoPackage& with a single method as return value. All use a static local instance of a std::array<ItemInfoStatic, FIXED_SIZE> which constructs all ItemInfoStatic and the static Item instances - if already possible. Sometimes it is necessary to overload the constructor to set some static instances for Items later than the lib init. These are also just marked with nullptr as Item instance. Some need to overload getItemInfo to complete instances of ItemInfoStatic, if needed, or create and deliver instances of ItemInfoDynamic. The registerItemInfoPackage also offers a optional lambda callback: there were two cases where local data from the Pool was needed to incarnate the item - just add that to the call to registerItemInfoPackage if needed, see examples in the adapted code. For the re-use of Items this means that now in SfxItemSet/SfxPoolItemHolder *true* static Items can and will be used without RefCount directly and globally. This is also the case for dynamic Items, with the exception of differing Pools for SfxSetItems which cannot be done. Future: That design is already prepared to allow solving that Pool-chaining problem: currently there are master/sub-pools and all accesses have to traverse that structure before even doing anything. For the future the idea is more to 'compose' a Pool by registering ItemInfoPackages, e.g. for Writer pool you may start with SfxItemPool, register the writer-specific ItemInfoPackage, then the one for DrawingLayer (if needed) and the one for EditEngine. It should also be possible to get to smaller granularities of that packages. Ideas for new ones will emerge. We might also think about composing Pools which can e.g. run Writer and Chart, so allowing to use Chart *without* OLE stuff in Writer - just ideas... More changes: - Adapted all stuff, cleaned up old stuff/ definitions - Removed FreezeIdRanges, that can be done once per Pool on-demand (and cannot be forgotten to be called) - Merged XOutdevItemPool with SdrItemPool and offered a ItemInfoPackage which joins both needed sets of Items - All the cleanup hassle with Pools and defaults cleaned up - Adapted all access methods of the pool to use that new stuff. Pool chaining currently stays, but I use a central method 'getTargetPool' instead of recursive calling to get the correct Pool for the action Change-Id: I2b8d3d4c3cc80b1d0d0b3c0f4bd90d7656b4bab7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163157 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-02-12svx: prefix members of SdrHelpLineListMiklos Vajna
See tdf#94879 for motivation. Change-Id: I172aad9fe63589a6a6bbbce77173a6fe24291ae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163235 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-02-10tdf#156993 use correct count for ViewContactOfSdrPageRegina Henschel
The count is used as upper limit in a for-loop in ViewObjectContact::getPrimitive2DSequenceSubHierarchy(). That calls ViewContactOfSdrPage::GetViewContact(). With the wrong count the case 10 was not reached and thus the helplines were not drawn. Change-Id: If606bbb718b1f78a874862217d1e03b02287e848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163192 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>