summaryrefslogtreecommitdiff
path: root/sw
AgeCommit message (Collapse)Author
2022-08-31use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I4e50aa5c71f86ed0d06e4c42b84d11158579207f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139061 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-31Removed duplicated includeAndrea Gelmini
Change-Id: I03783e8d6aa78887d70c07f99dfbf135cb3976e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139069 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-31tdf#30731: Improve caret travelling in WriterKhaled Hosny
Previously, when measuring caret position, Writer would measure the width of the substring before the caret (i.e. layout it independent of the text after the caret and measure its width). This is incorrect, though. It assumes cutting the string laying it out would result in the same width as when laid out as part of a bigger string, which is invalid assumption when e.g. cutting inside a ligature or between letters that have different shapes when next to each other, etc. This appears to work when the width of the substring laid out alone is close enough to its width when laid out with the full text. But in cases where is widths are largely different, like the extreme case in the bug report, the caret will be jumping around as it is positioned based on the unligated glyphs not the ligated, rendered glyphs. This change introduces a special mode of measuring text width for caret positioning, that will layout the whole string that return the width of the requested substring. Fields and small caps text are trickier to handle, so old behaviour is retained for them. Now one will probably notice but if they do, it can be dealt with then. This also tries to be conservative and keep other pleases using the existing behaviour which might be desirable (e.g. when measuring text width for line breaking, we want the unligated width), but there might be other places that should use the new behaviour. To handle caret inside ligatures, the grapheme clusters in the ligature are counted and the width of the whole ligature is distributed on them evenly. A further improvement would be using HarfBuzz API to get ligature caret positions for fonts that provide them, which helps when the ligature components have different widths. Change-Id: I02062e2e2e1b1a35c8f84307c0a8f5d743059ab5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138889 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-08-31tdf#150676 sw a11y: Remove item from selection list on disposeMichael Weghorn
As reported in tdf#150676, selecting a table (or also just simple text paragraphs) in Writer, then deleting the selection would result in the following warning when using the gtk3 VCL plugin: warn:legacy.osl:100403:100403:sw/source/core/access/acccontext.cxx:442: fire event for disposed frame? This is because the code responsible for sending a11y events for selection updates gets called after the a11y objects of the previous selection have been disposed already and wants to send an event that the object has been unselected: > 1 SwAccessibleContext::FireAccessibleEvent acccontext.cxx 444 0x7f4ffc5be7a2 > 2 SwAccessibleContext::FireStateChangedEvent acccontext.cxx 475 0x7f4ffc5be8c2 > 3 SwAccessibleContext::SetSelectedState acccontext.cxx 1508 0x7f4ffc5c3752 > 4 SwAccessibleMap::InvalidateShapeInParaSelection accmap.cxx 1428 0x7f4ffc5ea0fd > 5 SwAccessibleMap::InvalidateCursorPosition accmap.cxx 2671 0x7f4ffc5f119d > 6 SwViewShellImp::InvalidateAccessibleCursorPosition viewimp.cxx 415 0x7f4ffd515c32 > 7 SwCursorShell::UpdateCursor crsrsh.cxx 2029 0x7f4ffc745e06 > 8 SwCursorShell::EndAction crsrsh.cxx 278 0x7f4ffc73d4a7 > 9 SwActContext::~SwActContext edws.cxx 169 0x7f4ffccd45d4 > 10 SwWrtShell::DelRight delete.cxx 322 0x7f4ffdc5a454 > 11 SwBaseShell::ExecDelete basesh.cxx 229 0x7f4ffd9e304d > 12 SfxStubSwBaseShellExecDelete swslots.hxx 2173 0x7f4ffd9e2784 > 13 SfxDispatcher::Call_Impl dispatch.cxx 254 0x7f5039ab6f72 > 14 SfxDispatcher::Execute_ dispatch.cxx 753 0x7f5039aba37c > 15 SfxBindings::Execute_Impl bindings.cxx 1060 0x7f5039aa62b7 > 16 SfxDispatchController_Impl::dispatch unoctitm.cxx 701 0x7f5039b7a55e > 17 SfxOfficeDispatch::dispatch unoctitm.cxx 263 0x7f5039b7840d > 18 svt::(anonymous namespace)::AsyncAccelExec::impl_ts_asyncCallback acceleratorexecute.cxx 481 0x7f5036a40cfc > 19 svt::(anonymous namespace)::AsyncAccelExec::LinkStubimpl_ts_asyncCallback acceleratorexecute.cxx 473 0x7f5036a40c1d > 20 Link<LinkParamNone *, void>::Call link.hxx 111 0x7f50336ac77f > ... To prevent that, remove the entry from the map of selected frames as well right when the object gets disposed. If necessary, sending the corresponding event that the item has been unselected should probably be done here, but it currently seems to be of little value to me when the object gets deleted anyway, so this commit doesn't add sending an additional event here. While at it, convert the `OSL_ENSURE` to a `SAL_WARN`. Warning in case `FireAccessibleEvent` gets called on an already disposed object generally seems reasonable to me. Change-Id: I879ba4e6399ffdc61e38093c5a9bd2ae620888e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139039 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-31CppunitTest_sw_odfexport: remove not needed mustTestImportOf()Miklos Vajna
See commit a226cec52e536c46e03f57a5f1f7931abbeb0cdd (CppunitTest_sw_rtfimport: convert one testcase to use CPPUNIT_TEST_FIXTURE(), 2019-11-05) for motivation. Change-Id: I0444c9814e5854262e2dd1aef72b87174f762e62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139066 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-08-31Fix typoAndrea Gelmini
Change-Id: Id405de7e2abfa6c4e77930d70b204f77e9cac1b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139070 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-30sw a11y: Don't confuse row and columnMichael Weghorn
The previous use of `isAccessibleColumnSelected` instead of `isAccessibleRowSelected` e.g. caused the row not to be selected when selecting the a11y object for a Writer table in Accerciser's treeview of the a11y hierarchy and typing this in Accerciser's IPython console with the qt6 VCL plugin in use: In [25]: acc.queryTable().addColumnSelection(0) Out[25]: True In [26]: acc.queryTable().addRowSelection(0) Out[26]: True Change-Id: I0c239c0d36a073cd63a35ca7d0802cf5591d9738 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139064 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-30crash inserting odt as embedded ole objectCaolán McNamara
Change-Id: I6bf8e2913fc677efe9904507ef8e4edddb9ef3ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139058 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-30use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I8858193e94fe34f1fe13d1aaaf7c7b1ed364af61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139045 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I4ce9a5be9f3ad6d31eac8917ddb53b2228220066 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139046 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I0defa466d8088aaad1c23b2fc780dcaa37691ad4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139006 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30sw reqif/xhtml export: fix invalid pixel formats of graphics exported as OLEMiklos Vajna
When exporting a Writer document to reqif-xhtml in ExportImagesAsOLE mode with something like: soffice.bin --convert-to 'xhtml:HTML (StarWriter):{"XhtmlNs":{"type":"string","value":"reqif-xhtml"},"ExportImagesAsOLE":{"type":"boolean","value":"true"}}' test.odt images are exported as ms paint ole objects instead of plain images. This happens in WrapGraphicInRtf(), using GraphicConverter::Export() where we just specify we want a BMP output. This usually works, but not when the bitmap format is something exotic where we try to keep that format in BMP, but ms paint can't handle it. When this happens, we get an RPC_E_SERVERFAULT error from OleRun() in OleComponent::RunObject(), which doesn't say much, except that ms paint failed to read the byte array we handed out. Fix the problem by ensuring that if a graphic is exported as OLE data, then it always has the 24bit pixel format. Interestingly a 8bit BMP can be opened in ms paint manually, but not when embedding it as OLE object. Change-Id: I2285bf67c4528cde208ae9fba42ece56822f5403 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139044 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-30reduce cost of SwCache::CheckNoel Grandin
which makes up 10% of the CPU cost of running writer unit tests. We can achieve the same correctness testing without an O(n^2) algorithm Change-Id: I2ba0574fa63a457b3c7bd670498a0c64a35280b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139040 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30OSL_ENSURE->assert in SwCacheObjNoel Grandin
if these overflow, we will get more serious problems further down the line. Rather assert here. Change-Id: I70f27edb7c61a0c622a9f8fcb2e1eb075966ac59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139035 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30add some comments to SwCache and de-indent a littleNoel Grandin
Change-Id: Ie4390aa0b55f46bc0937c6858ca6fd08393e02a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139034 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I8dfb5e72563d2036b89ebdf49a7b1c29629ada14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139008 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30SAL_WARN->SAL_INFO in SwContentNode::ChkCondCollNoel Grandin
we call this on all nodes, so it's not really a bug Change-Id: I7bb258e68abf6fb0ced5a46924b715febb79c587 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139036 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I675136be4de95a53bb0b2c08117ae67da405351e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139017 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30Split CppunitTest_sw_uiwriter3 into a uiwriter3 and a uiwriter8Miklos Vajna
My build with 16G ram now regularly fails with: g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.opensuse.org/> for instructions. make[1]: *** [solenv/gbuild/LinkTarget.mk:337: workdir/CxxObject/sw/qa/extras/uiwriter/uiwriter3.o] Error 4 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:289: build] Error 2 Change-Id: Ia758f2e905a13369a9eef7eece4104bb9ea76303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139025 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-30use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: Idba478c29e3651200a9548c325835ed45f09b50a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: Ib3a3867d8eafd66de3c426eacf50d3f7c97fc4da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-30cid#1512492 Logically dead codeCaolán McNamara
Change-Id: Ibb003782d8ea47a2318959f4d8b6aa11e0e874c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139013 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-30tdf#114769: sw html export: better handling for relative URLsVasily Melenchuk
Usage of INetURLObject makes sense only in case of full URLs, but once relative one is provided it will contain invalid data. Change-Id: Icc5e191e2337a3dd9a76c660b1c7709551099a1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138875 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-08-30sw: document SwFormatFootnoteEndAtTextEndMiklos Vajna
Subclasses only have to override Clone(), everything else is shared. Change-Id: I3ef6242cbddb02c23de466d1959ee6c930723011 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139014 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I5ec22fd36b74ce08cbb60d055c5feea9ec489f9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139009 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29Resolves: tdf#150629 the window was destroyed from the fadetimer callbackCaolán McNamara
which is how it could be possible that SwPageBreakWin::dispose() could be both called, stopping the timer, but the timer callback could access the disposed SwPageBreakWin Change-Id: If29ffb45fbde607d35c12064b05e4b5d25c2f009 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139011 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I58b7824f7eaa3a6d82ec290d7354ed65ca8acdbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139007 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I4edc1917fd02f6b5c498cbb8e4f74fb536cdf60d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139005 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I4d754368561b69339dde3395a637a0fb19d75512 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139004 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I2936782ede9871189d48aeca7d25d47d13ae1fdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139003 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: Ib3f8f40edd3d9a93460bf7dcd081af0b0bd4a6b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29use more SwPosition::GetContentIndexNoel Grandin
and convert an unnecessary loop into a simple calculation Change-Id: I79fb07770fdac787a95c65e5ff0d86d905f03cb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138999 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I910cdd6a14d0171082935e0de94ec1779a9626c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138997 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I9a0e393e755c8cb6a1b9857ecf0abbabf61a2840 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138996 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29span requires a complete element typeStephan Bergmann
...see C++20 [span.overview]/3 "ElementType is required to be a complete object type that is not an abstract class type." At least a --with-latest-c++ build against recent LLVM 16 trunk libc++ failed for me now with > In file included from sd/source/ui/app/sdmod.cxx:24: > In file included from include/vcl/virdev.hxx:24: > In file included from include/vcl/outdev.hxx:24: > In file included from include/o3tl/span.hxx:19: > ~/llvm/inst/bin/../include/c++/v1/span:540:38: error: arithmetic on a pointer to an incomplete type 'const SfxItemPropertyMapEntry' > return iterator(this, data() + size()); > ~~~~~~ ^ > ~/llvm/inst/bin/../include/c++/v1/__ranges/access.h:144:36: note: in instantiation of member function 'std::span<const SfxItemPropertyMapEntry, 18446744073709551615>::end' requested here > return _LIBCPP_AUTO_CAST(__t.end()); > ^ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:44:5: note: in instantiation of function template specialization 'std::ranges::__end::__fn::operator()<const std::span<const SfxItemPropertyMapEntry, 18446744073709551615> &>' requested here > ranges::end(__t); > ^ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:44:5: note: in instantiation of requirement here > ranges::end(__t); > ^~~~~~~~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:42:19: note: while substituting template arguments into constraint expression here > concept range = requires(_Tp& __t) { > ^~~~~~~~~~~~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:48:25: note: while checking the satisfaction of concept 'range<const std::span<const SfxItemPropertyMapEntry, 18446744073709551615> &>' requested here > concept input_range = range<_Tp> && input_iterator<iterator_t<_Tp>>; > ^~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:48:25: note: (skipping 16 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) > ~/llvm/inst/bin/../include/c++/v1/__tree:761:23: note: in instantiation of template class 'std::__value_type<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>>' requested here > __node_value_type __value_; > ^ > ~/llvm/inst/bin/../include/c++/v1/__tree:1798:49: note: in instantiation of template class 'std::__tree_node<std::__value_type<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>>, void *>' requested here > destroy(static_cast<__node_pointer>(__nd->__left_)); > ^ > ~/llvm/inst/bin/../include/c++/v1/__tree:1789:3: note: in instantiation of member function 'std::__tree<std::__value_type<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>>, std::__map_value_compare<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, std::__value_type<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>>, SdExtPropertySetInfoCacheCompare, true>, std::allocator<std::__value_type<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>>>>::destroy' requested here > destroy(__root()); > ^ > ~/llvm/inst/bin/../include/c++/v1/map:1033:5: note: in instantiation of member function 'std::__tree<std::__value_type<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>>, std::__map_value_compare<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, std::__value_type<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>>, SdExtPropertySetInfoCacheCompare, true>, std::allocator<std::__value_type<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>>>>::~__tree' requested here > map() > ^ > sd/source/ui/app/sdmod.cxx:57:11: note: in instantiation of member function 'std::map<std::span<const SfxItemPropertyMapEntry, 18446744073709551615>, com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo>, SdExtPropertySetInfoCacheCompare>::map' requested here > SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 ) > ^ > sd/inc/sdmod.hxx:45:8: note: forward declaration of 'SfxItemPropertyMapEntry' > struct SfxItemPropertyMapEntry; > ^ and > In file included from sw/source/core/unocore/unochart.cxx:34: > In file included from sw/inc/unochart.hxx:52: > In file included from sw/inc/unocrsr.hxx:22: > In file included from sw/inc/swcrsr.hxx:23: > In file included from sw/inc/tblsel.hxx:22: > In file included from sw/inc/swtable.hxx:24: > In file included from sw/inc/swtypes.hxx:30: > In file included from include/vcl/outdev.hxx:24: > In file included from include/o3tl/span.hxx:19: > ~/llvm/inst/bin/../include/c++/v1/span:540:38: error: arithmetic on a pointer to an incomplete type 'const SfxItemPropertyMapEntry' > return iterator(this, data() + size()); > ~~~~~~ ^ > ~/llvm/inst/bin/../include/c++/v1/__ranges/access.h:144:36: note: in instantiation of member function 'std::span<const SfxItemPropertyMapEntry, 18446744073709551615>::end' requested here > return _LIBCPP_AUTO_CAST(__t.end()); > ^ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:44:5: note: in instantiation of function template specialization 'std::ranges::__end::__fn::operator()<const std::span<const SfxItemPropertyMapEntry, 18446744073709551615> &>' requested here > ranges::end(__t); > ^ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:44:5: note: in instantiation of requirement here > ranges::end(__t); > ^~~~~~~~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:42:19: note: while substituting template arguments into constraint expression here > concept range = requires(_Tp& __t) { > ^~~~~~~~~~~~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:48:25: note: while checking the satisfaction of concept 'range<const std::span<const SfxItemPropertyMapEntry, 18446744073709551615> &>' requested here > concept input_range = range<_Tp> && input_iterator<iterator_t<_Tp>>; > ^~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/__ranges/concepts.h:48:25: note: (skipping 11 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) > ~/llvm/inst/bin/../include/c++/v1/span:441:15: note: while checking the satisfaction of concept '__span_compatible_range<const std::span<const SfxItemPropertyMapEntry, 18446744073709551615> &, const SfxItemPropertyMapEntry>' requested here > template <__span_compatible_range<element_type> _Range> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/span:441:15: note: while substituting template arguments into constraint expression here > template <__span_compatible_range<element_type> _Range> > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~/llvm/inst/bin/../include/c++/v1/span:391:28: note: while checking constraint satisfaction for template 'span<const std::span<const SfxItemPropertyMapEntry, 18446744073709551615> &>' required here > class _LIBCPP_TEMPLATE_VIS span<_Tp, dynamic_extent> { > ^~~~ > ~/llvm/inst/bin/../include/c++/v1/span:391:28: note: in instantiation of function template specialization 'std::span<const SfxItemPropertyMapEntry, 18446744073709551615>::span<const std::span<const SfxItemPropertyMapEntry, 18446744073709551615> &>' requested here > sw/inc/unomap.hxx:317:7: note: while declaring the implicit copy constructor for 'SwUnoPropertyMapProvider' > class SwUnoPropertyMapProvider > ^ > sw/inc/unomap.hxx:26:8: note: forward declaration of 'SfxItemPropertyMapEntry' > struct SfxItemPropertyMapEntry; > ^ Change-Id: I53d7d427890b360d87fa29e184c7836eff672ece Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138995 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-08-29ref-count SdrObjectNoel Grandin
Which means we can get rid of the majestic hack of ScCaptionPtr Previously, SdrObject was manually managed, and the ownership passed around in very complicated fashion. Notes: (*) SvxShape has a strong reference to SdrObject, where previously it had a weak reference. It is now strong since otherwise the SdrObject will go away very eagerly. (*) SdrObject still has a weak reference to SvxShape (*) In the existing places that an SdrObject is being deleted, we now just clear the reference (*) instead of SwVirtFlyDrawObj removing itself from the page that contains inside it's destructor, make the call site do the removing from the page. (*) Needed to take the SolarMutex in UndoManagerHelper_Impl::impl_clear because this can be called from UNO (e.g. sfx2_complex JUnit test) and the SdrObjects need the SolarMutex when destructing. (*) handle a tricky situation with SwDrawVirtObj in the SwDrawModel destructor because the existing code wants mpDrawObj in SwAnchoredObject to be sometimes owning, sometimes not, which results in a cycle with the new code. Change-Id: I4d79df1660e386388e5d51030653755bca02a163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: Ib1a31abd1e4fc8483a8ef799accb8a245bb6352b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138965 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-29sw: prefix members of SwAuthorMarkPane, SwCaptionDialog, ...Miklos Vajna
... SwConvertTableDlg and SwLabDlg See tdf#94879 for motivation. Change-Id: I9a8be0c3f5763ea0fb9119960eb799b6ff7a0a4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138956 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-08-29use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: Ifad11a8bfdaf6156017a96a9df24ecebc2ddc3ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-28cid#1500473 silence Resource leakCaolán McNamara
Change-Id: Ibf6b453b77d3fc83d40b04e0003f7f009df23e10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138942 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-28cid#1500510 silence Use after freeCaolán McNamara
and cid#1500471 Use after free cid#1500604 Use after free cid#1500617 Use after free Change-Id: Idd86c8c81dd6f0afb6f055fadee778559cb6dba6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138945 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-28use more SwPosition::AssignNoel Grandin
part of hiding the internals of SwPosition Change-Id: I3734c0e2f323720afa32e7ac2dd46f53bdea4e48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138939 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-28Fix typoAndrea Gelmini
Change-Id: I99e5a87c8ee1667bbcc96051ecb25f1bf310055f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138934 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-28flatten some code in SwCursorShellNoel Grandin
Change-Id: Iae9d6cbfd771721a93b2d6fa4aa0e0631035cb78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-27crashtesting ooo117844-1.docxNoel Grandin
regression from commit 59785c0237f2bc5eaf9e9742bdf30136f3b3d2ba Author: Noel Grandin <noelgrandin@gmail.com> Date: Mon Aug 15 15:24:32 2022 +0200 pass SwNode and sal_Int32 to delBookmarks Change-Id: I2d552cf1bc70850e09b354e11644d59013061377 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-27Fix typoAndrea Gelmini
Change-Id: I70e12e47fd2f72ce68f388861bdbf03cbad3c87f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138918 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-27VBA Add test documents for XTableHannah Meeks
Change-Id: Ia12c055addda545574c33a55ba758b3f1d5b0b73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137852 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-27cid#1500569 silence Explicit null dereferencedCaolán McNamara
Change-Id: I55b765f12f0e77f1f4ef4cbce9d6f2c9b661d370 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138927 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-27cid#1500545 silence Explicit null dereferencedCaolán McNamara
Change-Id: Ie8cb87ab80a148a79510591fcd089c0bc230612e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138926 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-27cid#1500516 Explicit null dereferencedCaolán McNamara
Change-Id: I3fda15451e55d4ee1b296cddb1f6933d81faae3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138924 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>