Both are derived from SfxSetItem which means they contain
a SfxItemSet themselves. That leads to problems since at
their construction time a SfxItemPool has to be known and
it *should* not be different to the one of the ItemSet
that Item gets added later - that leads to the 2nd class
of problems.
In the long therm we should get rid of all SfxSetItems.
This change simplifies already some stuff, including that
the standard Items for DrawObjects reduces by two (and
more due to containing a whole ItemSet) and e.g. the
problem that these Items had to be converted to hard
attributes in the done fixes for copy/pasting Slides.
Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: I8b1c6cabdaa43ed6062811b5508ab3dece47a755
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6795
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e67458a9b769fe7a3a7ee0739ed6d5c46dbc0692)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211734
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Now after
Change-Id: I3593630b4758d0547264c0ed63fec7ac111ccfd7
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Oct 6 17:30:24 2026 +0200
svtools: Drop ValueSetItemType::ImageAndText and related logic
, the `rRendercontext` param for ValueSet::ImplFormatItem
is unused, so drop it, and also the then unused
corresponding ValueSet::Format param.
Change-Id: Ibc8afabf147974da1ed67ef903abc13c054c4c12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211911
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
No single caller passes any explicit value for that
param, so the default of `false` is always used.
Drop the param and simplify the implementation a bit.
This will also allow for further cleanup in an upcoming
commit.
Change-Id: I0d2f691eecfac013bc8ad3e506484d958d18ce0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211909
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The last caller of that method was ported from ValueSet
to weld::IconView in previous commit
Change-Id: I28d86251b70149574535dc7b583660dbe42e9a0d
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Oct 6 15:01:52 2026 +0200
svx: Port ExtrusionLightingWindow from ValueSet to weld::IconView
Change-Id: I232f3767268a4fde206515f2a6d92e35c664ccd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211904
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
After
Change-Id: I0150e699602a625874e5a09b8df38110f52c0c03
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Oct 6 12:15:49 2026 +0200
svtools: Drop now unused WB_NAMEFIELD logic from ValueSet
, that member is only written to, but never read, so drop
it completely.
Change-Id: I974183e725e3c530162152debd29bbf207b21b6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211899
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The last case where that style flag was set was ported
away from ValueSet to use weld::IconView instead in earlier
commit
Change-Id: I1c23a305322105608d0152bcd0b0fa195be14eff
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Oct 6 11:48:21 2026 +0200
cui: Port Callout tab page from ValueSet to weld::IconView
Therefore, drop the logic in ValueSet handling that
flag, to simplify the code.
This also means that the `pItem` param for ValueSet::ImplDrawSelect
is now unused, so drop that one, too.
Change-Id: I0150e699602a625874e5a09b8df38110f52c0c03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211898
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Drop ValueSet forward declarations from headers
not actually using the class.
Forward-declare the class in cui/source/inc/numpages.hxx
which actually uses it, but didn't forward-declare it
or include the header yet, but previously got the forward-declaration
from an included header.
Change-Id: I8876ad47eb362f581aa41ee4a61a85c4093a1dd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211881
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
The last caller of ValueSet::SetItemData and
ValueSet::GetItemData was ported away from
using ValueSet in
Change-Id: I423e80bba9e81a98e80652f6486970d40286362e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Oct 2 12:36:17 2026 +0200
svx: Switch to weld::TreeView in LineWidthPopup
. Drop the now unused methods and the corresponding
ValueSetItem::mpData member that could previously be used
to store custom data in an item.
Similar logic still exists in weld::IconView
and weld::TreeView, which should generally be preferred
over using the custom ValueSet widget.
Change-Id: I7d58ff933cb78a1157d3628096a17f68ddf2034d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211737
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Instead of using a custom ValueSet subclass to
draw images and text next to them for selection
in the line width popup, use a weld::TreeView with
two columns: one for the image, and one for the text.
This is similar to what
commit b185d34642
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Nov 28 14:12:04 2025 +0100
tdf#168120 sc: Switch to weld::TreeView in CellLineStyleControl
did elswhere.
Adjust indices used to account for the fact that
weld::TreeView indices are 0-based while the ValueSet ones
are 1-based.
The special "Last custom value" entry so far was
using two separate images, depending on whether
or not it was enabled/sensitive or not: If it is
disabled, a greyed out variant of the image was used.
With the switch to weld::TreeView, leave that up
to the TreeView by simply enabling/disabling the
corresponding row using weld::TreeView::set_sensitive
for the corresponding row.
Drop the now unused LineWidthValueSet.
This switch to weld::TreeView reduces custom widget
logic and custom drawing and makes this more consistent
with other widgets used elsewhere (e.g. like for the
one mentioned in the commit above, the usual font
is used now as well, and it also aligns the behavior
more with that one.)
The popup for configuring the line thickness that uses
this code can be triggered like this:
* start Writer
* insert a chart using "Insert" -> "Chart..."
* select the chart wall in the chart
* open the "Properties" sidebar deck
* in the "Line" section of that sidebar deck, click on the
"Thickness" button/combobox
Change-Id: I423e80bba9e81a98e80652f6486970d40286362e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211735
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Until now the 'local' StyleSheet got set, but that may
not be the same as the original. It was/gets identified just
by searching by name and type, not comparing content.
What to do? We could...
(a) the Style-Friendly way:
- check if StyleSheet is identical
- if not, create a new in-between StyleSheet hosting missing Items
- if yes, use, done.
(b) the pragmatic/practical way:
- Just hard-attribute the Items that are detected as different
similar to what BurnInStyleSheetAttributes does/did, but only
for a view differing Items
(b) is the most simple for now, but will lead to more hard
attributes. The other possibilities will be better in the
long term. For now, I will use (b).
Note that there are more cases in that VERY complex and grown
stuff emerging from SdDrawDocument::PasteBookmarkAsPage. More
things will need to be fixed, see this as a 1st step.
Needed to adapt postProcessAfterCloneToDifferentModel due to
UT testTdf96206 failing, see comment there for details.
That 1st implementation showed weaknesses with those Items
critical and only on MasterPages, so decided to give up on
that and implement ContentCompare to SdPage::Equals. That
was easier than thought: No parameter needed, only used by
InsertBookmarkAsPage_FindDuplicateLayouts::operator(). Thus,
SdPage::Equals needs no change, just SdrObject::Equals.
Due to still problems with Items corrected in Objects on
MasterPages I will for now exclude this.
Could now isolate remaining problems, these are defaults
and/or PresObj things on MasterPages. Important is that I can
completely correct all Items for all Objects in
postProcessAfterCloneToDifferentModel. I can react to these
false-positives in the ContentCompare in SdrObject::Equals.
Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: I10e17c8d6a893dbe92ab716182f07bafce1f3284
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6595
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
(cherry picked from commit 92ffaeac04c5c8586006b026f29ce12fba3674f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211729
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
...as seen once during JunitTest_forms_complex,
> ==2007790==ERROR: AddressSanitizer: heap-use-after-free on address 0x7ccbfe8b3a38 at pc 0x7f5c5361ed51 bp 0x7b5bd4ac7420 sp 0x7b5bd4ac7418
> READ of size 2 at 0x7ccbfe8b3a38 thread T8
> #0 in SfxItemPool::IsInRange(unsigned short) const at engine/include/svl/itempool.hxx:331:66
> #1 in SfxItemPool::getTargetPool(unsigned short) const at engine/svl/source/items/itempool.cxx:452:9
> #2 in SfxItemPool::CheckItemInfoFlag(unsigned short, unsigned short) const at engine/svl/source/items/itempool.cxx:461:26
> #3 in SfxItemPool::NeedsSurrogateSupport(unsigned short) const at engine/include/svl/itempool.hxx:343:18
> #4 in SfxItemSet::checkRemovePoolRegistration(SfxPoolItem const*) at engine/svl/source/items/itemset.cxx:384:20
> #5 in SfxItemSet::ClearSingleItem_PrepareRemove(SfxPoolItem const*) at engine/svl/source/items/itemset.cxx:364:5
> #6 in SfxItemSet::ClearAllItemsImpl() at engine/svl/source/items/itemset.cxx:443:9
> #7 in SfxItemSet::~SfxItemSet() at engine/svl/source/items/itemset.cxx:318:5
> #8 in std::_Optional_payload_base<SfxItemSet>::_M_destroy() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:305:23
> #9 in std::_Optional_payload_base<SfxItemSet>::_M_reset() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:341:4
> #10 in std::_Optional_payload<SfxItemSet, false, false, false>::~_Optional_payload() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:464:57
> #11 in std::_Optional_base<SfxItemSet, false, false>::~_Optional_base() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:488:12
> #12 in std::optional<SfxItemSet>::~optional() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/optional:781:11
> #13 in sdr::properties::DefaultProperties::~DefaultProperties() at engine/svx/source/sdr/properties/defaultproperties.cxx:92:50
> #14 in sdr::properties::AttributeProperties::~AttributeProperties() at engine/svx/source/sdr/properties/attributeproperties.cxx:221:9
> #15 in sdr::properties::TextProperties::~TextProperties() at engine/svx/source/sdr/properties/textproperties.cxx:79:9
> #16 in sdr::properties::RectangleProperties::~RectangleProperties() at engine/svx/source/sdr/properties/rectangleproperties.cxx:38:9
> #17 in sdr::properties::RectangleProperties::~RectangleProperties() at engine/svx/source/sdr/properties/rectangleproperties.cxx:37:9
> #18 in std::default_delete<sdr::properties::BaseProperties>::operator()(sdr::properties::BaseProperties*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:92:2
> #19 in std::__uniq_ptr_impl<sdr::properties::BaseProperties, std::default_delete<sdr::properties::BaseProperties>>::reset(sdr::properties::BaseProperties*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:204:4
> #20 in std::unique_ptr<sdr::properties::BaseProperties, std::default_delete<sdr::properties::BaseProperties>>::reset(sdr::properties::BaseProperties*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:530:7
> #21 in SdrObject::~SdrObject() at engine/svx/source/svdraw/svdobj.cxx:589:18
> #22 in SdrAttrObj::~SdrAttrObj() at engine/svx/source/svdraw/svdoattr.cxx:42:28
> #23 in SdrTextObj::~SdrTextObj() at engine/svx/source/svdraw/svdotext.cxx:156:1
> #24 in SdrRectObj::~SdrRectObj() at engine/svx/source/svdraw/svdorect.cxx:69:25
> #25 in SdrUnoObj::~SdrUnoObj() at engine/svx/source/svdraw/svdouno.cxx:223:1
> #26 in FmFormObj::~FmFormObj() at engine/svx/source/form/fmobj.cxx:120:1
> #27 in FmFormObj::~FmFormObj() at engine/svx/source/form/fmobj.cxx:113:1
> #28 in SdrObject::release() at engine/svx/source/svdraw/svdobj.cxx:612:9
> #29 in rtl::Reference<SdrObject>::clear() at engine/include/rtl/ref.hxx:181:19
> #30 in SvxShape::~SvxShape() at engine/svx/source/unodraw/unoshape.cxx:199:21
> #31 in SvxShapeText::~SvxShapeText() at engine/svx/source/unodraw/unoshape.cxx:3828:1
> #32 in SvxShapeControl::~SvxShapeControl() at engine/svx/source/unodraw/unoshap2.cxx:393:1
> #33 in SvxShapeControl::~SvxShapeControl() at engine/svx/source/unodraw/unoshap2.cxx:392:1
> #34 in cppu::OWeakObject::release() at engine/cppuhelper/source/weak.cxx:231:9
> #35 in cppu::OWeakAggObject::release() at engine/cppuhelper/source/weak.cxx:293:22
> #36 in cppu::WeakAggImplHelper12<com::sun::star::drawing::XShape, com::sun::star::lang::XComponent, com::sun::star::beans::XPropertySet, com::sun::star::beans::XMultiPropertySet, com::sun::star::beans::XPropertyState, com::sun::star::lang::XUnoTunnel, com::sun::star::container::XNamed, com::sun::star::drawing::XGluePointsSupplier, com::sun::star::container::XChild, com::sun::star::lang::XServiceInfo, com::sun::star::document::XActionLockable, com::sun::star::beans::XMultiPropertyStates>::release() at engine/include/cppuhelper/implbase12.hxx:161:31
> #37 in SvxShapeText::release() at engine/include/svx/unoshape.hxx:357:17
> #38 in SvxShapeControl::release() at engine/include/svx/unoshape.hxx:508:21
> #39 in freeUnoInterfaceProxy at engine/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:42:19
> #40 in (anonymous namespace)::s_stub_defenv_revokeInterface(__va_list_tag (*) [1]) at engine/cppu/source/uno/lbenv.cxx:369:17
> #41 in s_environment_invoke_v(_uno_Environment*, _uno_Environment*, void (*)(__va_list_tag (*) [1]), __va_list_tag (*) [1]) at engine/cppu/source/uno/EnvStack.cxx:292:9
> #42 in uno_Environment_invoke_v at engine/cppu/source/uno/EnvStack.cxx:310:5
> #43 in uno_Environment_invoke at engine/cppu/source/uno/EnvStack.cxx:318:5
> #44 in (anonymous namespace)::defenv_revokeInterface(_uno_ExtEnvironment*, void*) at engine/cppu/source/uno/lbenv.cxx:423:5
> #45 in releaseProxy at engine/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx:78:9
> #46 in com::sun::star::uno::UnoInterfaceReference::~UnoInterfaceReference() at engine/include/uno/dispatcher.hxx:93:9
> #47 in binaryurp::Bridge::releaseStub(rtl::OUString const&, com::sun::star::uno::TypeDescription const&) at engine/binaryurp/source/bridge.cxx:509:1
> #48 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at engine/binaryurp/source/incomingrequest.cxx:138:18
> #49 in binaryurp::IncomingRequest::execute() const at engine/binaryurp/source/incomingrequest.cxx:79:26
> #50 in request at engine/binaryurp/source/reader.cxx:86:9
> #51 in cppu_threadpool::JobQueue::enter(void const*, bool) at engine/cppu/source/threadpool/jobqueue.cxx:100:17
> #52 in cppu_threadpool::ORequestThread::run() at engine/cppu/source/threadpool/thread.cxx:165:31
> #53 in threadFunc at engine/include/osl/thread.hxx:175:15
> #54 in osl_thread_start_Impl(void*) at engine/sal/osl/unx/thread.cxx:240:9
>
> 0x7ccbfe8b3a38 is located 184 bytes inside of 648-byte region [0x7ccbfe8b3980,0x7ccbfe8b3c08)
> freed by thread T23 here:
> #0 in operator delete(void*, unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:187:3
> #1 in SdrItemPool::~SdrItemPool() at engine/svx/source/svdraw/svdattr.cxx:514:1
> #2 in salhelper::SimpleReferenceObject::release() at engine/include/salhelper/simplereferenceobject.hxx:61:13
> #3 in rtl::Reference<SfxItemPool>::~Reference() at engine/include/rtl/ref.hxx:116:22
> #4 in SdrModel::~SdrModel() at engine/svx/source/svdraw/svdmodel.cxx:275:1
> #5 in FmFormModel::~FmFormModel() at engine/svx/source/form/fmmodel.cxx:69:1
> #6 in SdDrawDocument::~SdDrawDocument() at engine/sd/source/core/drawdoc.cxx:418:1
> #7 in sd::DrawDocShell::~DrawDocShell() at engine/sd/source/ui/docshell/docshell.cxx:192:9
> #8 in sd::GraphicDocShell::~GraphicDocShell() at engine/sd/source/ui/docshell/grdocsh.cxx:57:38
> #9 in sd::GraphicDocShell::~GraphicDocShell() at engine/sd/source/ui/docshell/grdocsh.cxx:57:37
> #10 in cppu::OWeakObject::release() at engine/cppuhelper/source/weak.cxx:231:9
> #11 in rtl::Reference<SfxObjectShell>::~Reference() at engine/include/rtl/ref.hxx:116:22
> #12 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() at engine/sfx2/source/doc/sfxbasemodel.cxx:268:5
> #13 in void std::destroy_at<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_construct.h:88:15
> #14 in void std::_Destroy<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_construct.h:164:7
> #15 in void std::allocator_traits<std::allocator<void>>::destroy<IMPL_SfxBaseModel_DataContainer>(std::allocator<void>&, IMPL_SfxBaseModel_DataContainer*) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/alloc_traits.h:863:4
> #16 in std::_Sp_counted_ptr_inplace<IMPL_SfxBaseModel_DataContainer, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:650:2
> #17 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:423:8
> #18 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1100:11
> #19 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1574:31
> #20 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::reset() at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/shared_ptr_base.h:1692:9
> #21 in SfxBaseModel::dispose() at engine/sfx2/source/doc/sfxbasemodel.cxx:802:13
> #22 in SdXImpressDocument::dispose() at engine/sd/source/ui/unoidl/unomodel.cxx:5515:19
> #23 in SfxBaseModel::close(bool) at engine/sfx2/source/doc/sfxbasemodel.cxx:1544:5
> #24 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at engine/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:87:5
> #25 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at engine/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:230:13
> #26 in unoInterfaceProxyDispatch at engine/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:410:13
> #27 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at engine/binaryurp/source/incomingrequest.cxx:236:13
> #28 in binaryurp::IncomingRequest::execute() const at engine/binaryurp/source/incomingrequest.cxx:79:26
> #29 in request at engine/binaryurp/source/reader.cxx:86:9
> #30 in cppu_threadpool::JobQueue::enter(void const*, bool) at engine/cppu/source/threadpool/jobqueue.cxx:100:17
> #31 in cppu_threadpool::ORequestThread::run() at engine/cppu/source/threadpool/thread.cxx:165:31
> #32 in threadFunc at engine/include/osl/thread.hxx:175:15
> #33 in osl_thread_start_Impl(void*) at engine/sal/osl/unx/thread.cxx:240:9
Change-Id: Ib38eb730f9178976d4432f77857b4f09ebfbdbcf
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6296
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 7a151cb95d66be93ef2a2687d1ff55ca37daa410)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211728
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
I messed up in
commit e174028ce0335d702ecdad5eac823845a16e2f6d
Author: Noel Grandin <noelgrandin@collabora.com>
Date: Mon Sep 21 18:13:44 2026 +0200
Rename paragraph related types in EditTextObject.
This is not the primary paragraph data structure for
EditEngine.
Add some commentary to reduce the chance of anyone
else making this mistake.
Rename typedef
EditEngineParagraphs -> EditTextObjectParagraphs
Rename class
EditEngineParagraph -> EditTextObjectParagraph
Change-Id: I810571cb61b944dd9d056145fe4cef14ba3e43bb
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13273
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit e8dde7d988a1768b68380ab95ba8fabb5feefc2e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211653
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
With Tagged PDF on, a paragraph in a language other than the document's
gets /Lang on its structure element. What is anchored in the paragraph
is tagged inside that same element and inherits the attribute, so a
frame's text and its description would be declared the paragraph's
language.
0d2d9e656d87647f904f1a463ed9b879c2bfb10c (tdf#163272 sw: give a
paragraph its own /Lang, 2026-09-21) avoided that by putting no /Lang on
such a paragraph, on a check of one node of a text frame that can cover
several. Its text still carried the language, on a Span, while what was
anchored in it specified none and inherited the document's. In a German
document that declared a shape's English text German. See
https://gerrit.collaboraoffice.com/c/online/+/13117/comment/89a7866d_907a2957/
The paragraph specifies its own language now, and a frame anchored in it
no longer inherits it. A Figure, a Formula and a frame's Division
specify the document's where the paragraph's differs, which is what the
frame's own paragraphs are measured against. A drawing shape's text is
tagged by drawinglayer, which takes the locale of the drawn portions and
specifies it where they agree; such a shape is nested in its anchor
paragraph in Writer and in no such paragraph elsewhere, so there is
nothing to compare against.
A drawing shape's own element specifies the document's language too. svx
anchors it under the anchor paragraph, drawinglayer opens it there, and
it carries the shape's title and description. Without the attribute, a
described shape in a paragraph that specifies one would have its
description declared the paragraph's language, and its text likewise
where the portions disagree.
testParagraphLanguage compared a structure type against a language and
quoted no text, so nothing identified the words affected. It lists every
element holding text or a description now, against the language it
specifies, an entry reading "P de-DE: Ein deutscher Absatz mit einem
Bild."; one specifying none is listed without a language, so correct
inheritance is asserted too. PDFiumPageObject gained getMarkedContentID
to join a page object's text to its element.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I1eecf0b56f09fc6d144894910a9037d89884dd3b
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13239
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 898a2e1b3a6fc07d7b43315b2f4781b32f1a20d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211609
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Turning Tagged PDF on added 2.4 MB to the reporter's document, 2.0 MB of that
its structure tree: 12562 elements, each its own top-level object,
uncompressed, and each costing a further 20 bytes in the cross-reference
table.
The elements go into /Type/ObjStm streams of 200 now, with the parent and ID
trees. The cross-reference has to become a /Type/XRef stream with them,
because a table cannot address an object inside another object. PDF 1.5
introduced both, so a PDF/A-1b file keeps the plain form. So does an encrypted
file, since a string in an object stream shall not be separately encrypted,
and this writer encrypts strings as it builds the object. So does a hybrid
file, because sdext reads the embedded original document out of a trailer.
The reporter's document exported 3157118 bytes tagged before the change and
1086230 after, against 769448 untagged either way. An 8300-row Writer table
exported 4017140 bytes tagged before and 500967 after, against 73183 untagged.
testTdf159066 and testTdf173162 grep the exported bytes for something the
structure tree carries, /Alt< and the /Namespaces array. They inflate the
object streams first now. testListLabelPDFExport counted its List element in
the token stream, and asks GetObjects() for it.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I1e27dc3a8f43aa8b6c75ae930615c8d4b4645627
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13209
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ad4bb8ae080aba98080dfaabd688dfdb48cf7ade)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211556
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
An equation's size lives in the w:sz of its math runs. The import ignored it,
so every equation came in at the 12pt default of the formula editor, and a file
holding equations at three sizes showed all three the same. An equation whose
runs name no size takes the size of the text around it, which the styles and
the document defaults hold.
The export wrote no size at all. It now puts the size on every math run, and in
the control properties of each object, which is where the fraction bar, the
radical sign and the brackets take theirs from. The size travels in the w
namespace, so it goes out for a DOCX only, the way the color of a formula
already does.
Every formula now carries a size of its own on the way out, including one
written in ODF. Such a formula used to leave the size open and took whatever
the text around it had in the reading application. It now keeps the size it is
drawn at here, so both applications show it the same.
Setting the base size means giving each of the fonts that same size. The font
size dialog, the BaseFontHeight property of the model and this import each did
that on their own, so they now share SmFormat::SetBaseSizeAndFonts. The
property used to put the sizes in a copy that a later merge step reads only for
a font the same call has named, so a lone BaseFontHeight left the fonts alone.
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: I18b6c5814a57d8ccb8be5b7bdd357ce76cea024d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13297
Reviewed-by: Balázs Varga <balazs.varga@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 582e3fdb6496d9f511dfefc1f716b4ead6cc3797)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211600
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
The number of colors displayed in the ColorIconView
in ColorWindow depends on the selected palette.
When the popup is shown for the first time, its
size is calculated based on the size of the
widgets it contains, and the size of the weld::IconView
used for ColorIconView is in turn based on the number
of colors in the initial palette.
If the initial palette has few (or no) colors,
switching to a palette with many colors results
in the need for the weld::IconView to use more
space than previously to show the additional items,
but since the popup doesn't resize, it remains at
its initial size and the selection of colors is
inconvenient or even impossible.
Avoid the problem by ensuring the ColorIconView
has a minimum height of at least 200 pixels.
Before the switch to ColorIconView in
commit a4d5983b4e
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Jun 5 11:48:54 2026 +0200
tdf#130857 Port ColorWindow from SvxColorValueSet to ColorIconView
, the SvxColorValueSet widget in use previously
was always set to a fixed size altogether.
Change-Id: I7b24dd823083891126cf7b4d0ebe1914c1e0cc87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211565
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
There's only a single instance of the class
that can be retrieved using ImageTree::get.
Make the ctor private to clarify that.
Change-Id: I75bd6e60e8079f5ddcef49200280fa61bbf1c4ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211552
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
GetElements() hands out the tokens the file itself carries, so a caller
hunting structure elements finds none of those a /Type/ObjStm holds - every
one of them, in a file from a producer that compresses its objects. They are
there already: Tokenize unpacks each object stream it passes and registers
what it finds, so only an accessor was missing.
The 64 places that scanned the token stream for an object ask GetObjects()
instead.
testTdf57423 and testStyleNamedStructureTypes compared the order as well. The
map is keyed by object number, which for a structure tree is document order,
where the token stream carried the emission order that writes a child before
its parent - the type sequence reads "Document Table TR TD" now instead of
ending "TR Table". Both hold the same 22 elements; testTdf57423 stopped
indexing its figures and compares one string per kind.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I3e46e600e0aed3802f5ee2f8c6dc25a50002763d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13207
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 50bf4f7acb344520ce2055bddfaf844c23239a8e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211450
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Changed implementation in EnhancedCustomShapeGeometry from pointer to
std::span, leading to removal of const_cast.
Change-Id: Ic2d768202991eba674275aa4ffe78478f8f6dd27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210515
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Let FontNameBox::LoadMRUEntries simply return the
entries loaded from the file instead of applying
them to the combobox right away.
Let the only caller FontNameBox::Fill do the insertion,
which also unifies the two different code paths of
either reinserting the existing entries or setting
the ones loaded from the file a bit more.
While at it, also rename the local `rEntries`
variable to `aEntries`, to make clear this is
not actually a reference (as the `r` prefix
previously suggested).
Change-Id: I89c14f2bcd34c4b6b4decf33e98bef54e7b31cf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211536
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Regression after commit b41a780d139ec6ca5a5514db972ccf0e50058dfc (tdf#166401:
support custom placeholder prompt text, 2026-08-17), where a placeholder that
authored no prompt stopped writing text and got a bare <a:p/> instead.
On a slide an empty presentation object reports no text through UNO anyway, so
the paragraph the export wrote for such a placeholder never had a run. It
carried the properties, and those are the formatting. In PowerPoint 2016 the
original title showed white at 22pt, indented 56.5pt; the round-tripped one
showed bold black at 17pt, indented 18pt.
Write the paragraph the way a shape with no text already does: the paragraph
properties, the run properties in endParaRPr, and no run. The prompt still
stays out of the file. That branch of DrawingML::WriteText is now a method of
its own, called from both places.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I034a4e14f388c90872069d32b303c6c143c1814c
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10768
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit e2859f5b23f53281d80cbad4c56db1764aaf1406)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211538
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
* Missing glyphs such as U+1234 are not detected as missing
* Missing variants such as 'Italic Light' are not detected
* Language on the font is not taken into account
Change-Id: I6329a2607f7e13b8ba09050b1037d4e33b4c7eb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211324
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Lots of classes implement XInvocation in order to add extra methods and
properties that are determined at runtime. One problem with this is that
when such an object is introspected with the css.script.Invocation
service then that service uses the XInvocation interface directly to
query what methods and properties are supported instead of creating an
XIntrospectionAccess via the css.beans.Introspection service. It looks
like probably all of the current implementations of XInvocation only use
it to advertise the dynamic methods and don’t advertise any concrete
methods provided by any interfaces that the object implements. This
means for example that when the object is accessed by pyuno, only the
dynamic methods and properties can be used.
This patch adds a helper class that can be used to help implement
XInvocation in such a way that if a requested method isn’t found as a
dynamic method, it can pass the method call on to the helper which will
use the normal Introspection service to query the available methods and
properties.
Change-Id: Ia4363594ee274c36249a0d1c94f16a829ace4647
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210130
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
This commit finalizes the refactoring of the LogicToLogic() coordinate
mapping pipeline by completely encapsulating both scaling and origin
translation within the ImplMapRes struct.
By recognizing the mathematical symmetry of the affine transformation,
origin shifts are now explicitly decoupled from the scaling logic. This
allows the complete transformation pipeline to be handled internally,
making the call sites in map.cxx significantly cleaner and less prone
to offset-related bugs.
Key changes:
- Removed the intermediate ScaleLogicX() and ScaleLogicY() methods.
- Introduced explicit LocalToAbsolute() and AbsoluteToLocal() helper
methods to handle origin offset addition and subtraction.
- Added TransformPointX() and TransformPointY(), which cleanly implement
the full pipeline: LocalToAbsolute() -> ScaleDistance() -> AbsoluteToLocal().
- Updated OutputDevice::LogicToLogic() overloads for Point and Rectangle
to use the new TransformPoint methods, successfully removing all
manual destination offset subtractions from map.cxx.
Change-Id: Ibb42f62d6904ae282dabf697b35455aec7c17677
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203680
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
This commit refactors the procedural scaling logic in map.cxx into
clean, object-oriented methods on the ImplMapRes struct. This greatly
improves readability and structurally prevents mathematical bugs by
separating the concepts of coordinate scaling and distance scaling.
Previously, map.cxx relied heavily on the standalone static function
lcl_scaleLogicValue(), requiring manual extraction and passing of
internal scales and offsets at every call site.
Key changes:
- Moved lcl_scaleLogicValue() into ImplMapRes.cxx as an internal helper.
- Added ScaleLogicX() and ScaleLogicY() to ImplMapRes to handle absolute
coordinates (Points and Rectangles), which safely apply the local
origin offset before scaling.
- Added ScaleDistanceX() and ScaleDistanceY() to ImplMapRes to handle
pure vectors (Sizes), ensuring origin offsets are bypassed.
- Refactored OutputDevice::LogicToLogic() overloads to utilize these
new encapsulated methods.
Change-Id: Ib46f6f2bac09b23baa37f29b8a71fdf6a0ffe164
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203679
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
This commit introduces a parameterized constructor for ImplMapRes to
streamline map resolution initialization across VCL mapping functions.
Previously, instantiating a local ImplMapRes required an error-prone,
two-step process: default construction followed by a call to the
CalcMapResolution mutator.
The new constructor elegantly bridges this by delegating the complex
scaling math to CalcMapResolution() while explicitly handling the absolute
origin offsets (mnMapOfs) required for a fresh resolution state.
Key changes:
- Added ImplMapRes(MapMode, nDPIX, nDPIY) constructor.
- Refactored CoordinateMapper and OutputDevice mapping functions
(LogicToPixel, PixelToLogic) to use the new single-line RAII-style
initialization, eliminating repetitive two-step setup code.
Change-Id: I68072cd66d01fd1663b58330890fe90a7bb8f94c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203677
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Because we already have a ContentInfo type in ucb/
and ContentInfo is a largely content-free name, which
makes this code much harder to understand than it should be.
Rename class
ContentInfo -> EditEngineParagraph
Rename typedef
ContentInfosType -> EditEngineParagraphs
Rename some methods in EditTextObject
CreateAndInsertContent -> CreateAndInsertParagraph
GetContents -> GetParagraphs
Rename some fields in EditTextObject
maContents -> maParagraphs
Change-Id: Iddfb8768c73f9c4eec3b4cc5dc389d44d8e4b90d
Signed-off-by: Noel Grandin <noelgrandin@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13210
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit e174028ce0335d702ecdad5eac823845a16e2f6d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211384
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Add the constants needed for the translation
Update mediawiki.ott:
- add title in meta.xml for translation
- remove German language tags to make the template language independant
- simplify Settings.xml
- update Thumbnail.png
- replace fonts with Noto's family fonts
Build mediawiki.ott from XML files like other templates. See
/extras/CustomTarget_templates.mk
Change-Id: I575843003796cb04099f1061f816ba52c658d41d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211247
Tested-by: Jenkins
Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Add new paragraph justification option "Split compound words" for
custom compound-based "smart" hyphenation. Add compound-based "smart"
hyphenation support for Danish, Dutch, Esperanto, Estonian, German,
Norwegian, Swedish (and potentially, Icelandic, Finnish and
Latvian) languages by fixing Hunspell morphological analysis and the
associated lingucomponent code. (Previously compound-based "smart"
hyphenation was enabled only for Hungarian.)
With the new option it's possible to keep MSO/MS-DOCX interoperability,
also introducing a better hyphenation algorithm for several languages.
Details:
* Add check box to Alignment in paragraph formatting dialog window;
* Store properties in paragraph model:
css::style::ParagraphProperties::ParaIsCompoundBased
* Implement it by checking the new option in the previously
added commit f9f694f5d9f39c5801bc5fec45867252c293bbcb;
* Add ODF import/export (loext:compound-based);
* Add ODF unit tests by the new tdf173389_smart_hyphenation_nl.odt
and tdf173389_smart_hyphenation_hu.odt. Now use the previous
tdf119908_smart_hyphenation_hu for disabled compound-based "smart"
hyphenation, also the new tdf119908_smart_hyphenation_nl.odt.
Note: the Dutch test document results better compound-based
hyphenation in two positions.
* Add Hunspell patch to fix Danish, Dutch, Esperanto, Estonian,
German, Norwegian, Swedish (and future Icelandic, Latvian,
Finnish) morphological analysis for compound word constituents;
* hyphenimp.cxx hyphenate(): fix tokenization for consecutive
pa: elements, like resulted in the fixed Hunspell dictionaries.
Follow-up to commit f9f694f5d9
"tdf#173389 sw: add compound-based “smart” hyphenation for readability".
Change-Id: I4414bd588646ecf6dc86b77642833ac9c7820a98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211341
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>