summaryrefslogtreecommitdiff
path: root/sw/inc
AgeCommit message (Collapse)Author
2021-12-22tdf#135061 sw_redlinehide: create frames following hidden tableMichael Stahl
When pasting, the entire document body is covered by a delete redline. The insert position is in the last node, following a table; table nodes do hot have any connection to frames if they are hidden by redlines, so MakeFrames() won't create frames for the inserted nodes. Refactor SwNodes::FindPrvNxtFrameNode() so that it can detect that table nodes are hidden in the current layout and continue to search in this case. For multiple layouts, MakeFrames() may need to use different nodes per layout, as the "nearest" one in one layout may be hidden in another. Change-Id: I3bb2c861c861438ac2695ab49dd91dc2bde87db4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127272 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-22sw: simplify SwNodes::FindPrvNxtFrameNode(), pEnd is always passedMichael Stahl
Change-Id: I6bd606e8c70704cb716b1eb474934dedb54d81da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127270 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-22tdf#144862 explore alternatives to writer's on-screen glyph positioningCaolán McNamara
writer does glyph position adjusting to try and split the difference of the "printing" positions and "screen" positions. it seems to have been there from the initial import commit 84a3db80b4fd66c6854b3135b5f69b61fd828e62 Date: Mon Sep 18 23:08:29 2000 +0000 initial import we seem to sync with the printing positions after each whitespace so each initial glyph after whitespace is a stable position and is the 'printing' position while each following glyph is in a position which is somewhere between the 'printing' position and 'screen' position. Which leads to noticeably unstable positions of text during editing at various zoom levels and without a clear rationale for the heuristic. GlyphPositioningMode::Classic, the original mode which remains the default. GlyphPositioningMode::PreferLayout, takes the vcl provided print positions and just uses those unmodified for screen layout like editeng does. GlyphPositioningMode::ClassicInspired, which is similar to GlyphPositioningMode::Classic in using 'printing' positions for the start of runs, but using 'screen' positions for run content. GlyphPositioningMode::PreferReadability, replace the 'printing' positions with the screen-optimized positions for all content. use tools, options, writer, view, glyph positioning to change Change-Id: I6677af973268bc586d825c7fbf0b483aaf651ca0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127089 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-21tdf#146244 sw: fix Undo of accepting table row insertionLászló Németh
Fix Undo of accepting table row insertion to get back the "false" value of HasTextChangesOnly property and the associated light blue table row background. This fixes also the missing update of the table row background at accepting the table row insertion. Follow-up to commit 8c028b7e41e3d350d0e67005b16faf0159cc5c12 "tdf#146244 sw: update HasTextChangesOnly in modified rows". Change-Id: I8e2436b6b7b67f06037481955ff22cdbc2b22dc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127228 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-12-21Typo: "seleted" instead of "selected"Julien Nabet
Except "getSeletedPositionStart" and "getSeletedPositionEnd" defined in offapi/com/sun/star/accessibility/XAccessibleTextSelection.idl since e5618f1707626a8c096ea2ca8da3cbe2c5f3db16 author Steve Yin <steve_y@apache.org> 2013-11-16 23:58:19 +0100 committer Michael Meeks <michael.meeks@collabora.com> 2013-11-19 10:02:25 +0000 commit e5618f1707626a8c096ea2ca8da3cbe2c5f3db16 (patch) tree de014d37b3de5a7ab505a86a6e6ce46ade4bdc1f parent 1263b20f56d896706c982ad1b91d2936abf5d617 (diff) Integrate branch of IAccessible2 Change-Id: I814923003bb247c4ef66f296ac4033bae9073988 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127227 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-12-20tdf#104823: support for sdt plain text fieldsVasily Melenchuk
This is a squashed commit containing set of changes: * Create a input field from sdt text block. * Advanced support for reading field data from data bindings which can point to custom xml or properties xml. For this XOOXMLDocumentPropertiesImporter idl interface was extrended with extra getterrs to get properties as xml dom elements. * Support for exporting of this feature back to docx. For this some extra parameters for sdt block are kept in newly introduced grabbag for input fields. If field does not contain grabbag it being exported as before (FILLIN or whatsoever), otherwise sdt block is counstructed based on data from grabbag. * Basic support for updating custom xml values back into custom xmls with usage of xslt transformations. To achieve this extra parameters were introduced to XXSLTTransformer: now it is able to support in-memory transformation stylesheets. Some unittests were corrected: since sdt plain text edit area is a field located inside paragraph in outout corresponding sdt is also located inside paragraph (instead of Word's approach with paragraph inside sdt). Seems this is not critical. Change-Id: I1a73ef300db3619804f7adf18579bea708764c14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127015 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-12-16Fix typosAndrea Gelmini
Change-Id: I66feced8bed05c7859e36a6d2f746a7faf30c7a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126915 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-12-15tdf#139843 sw_redlinehide: fix crash while updating reference fieldsMichael Stahl
Use layout in MakeRefNumStr() when checking if node is numbered, because a hidden node has a null SwNodeNum. (regression from ae246b44da1708417aaaefe4f9186cfbbb9a9137) Change-Id: Iea797c03018929601ea797f00e3cf2d7749e55ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126857 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-14tdf#143574 sw: textboxes in group shapes -- part 4Attila Bakos (NISZ)
A new UNO property has been added and implemented for the filters. This provides the possibility of assigning textboxes in the filter at import time via UNO. Follow-up to commit e5650de86072b9db586a4532b5239acda77598c4 "tdf#143574 sw: textboxes in group shapes - part 3 take 2". Change-Id: I58c445cb7f6d865c1d82dbe68f985e4c11ff832e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126162 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-12-14tdf#143574 sw: textboxes in group shapes - part 3 take 2Attila Bakos (NISZ)
In this part, missing parameters have been fixed, and queryInterface method can handle textbox groups now. A new function, synchronizeGroupTextBoxProperty has been introduced to do the sync for all group members. Nested group textbox shape handling also has been introduced. Note: Copy still has issues. Change-Id: I3d2090fe6a4066edfd2cb417b30bca9dd9acb011 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126052 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-12-11update sw pchesCaolán McNamara
Change-Id: I61fe51e95c629adcf90a9ea3d1783380039fdd5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126661 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-10rename SwAnnotationWin::mnEventId to SwAnnotationWin::mnDeleteEventIdCaolán McNamara
because its solely used to track if an event was posted to delete the annotation Change-Id: I7c6458475e967b8f313f1a770946c0db65561434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126624 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-12-09tdf#146144 sw: add tooltip to table rows with change trackingLászló Németh
Showing "Row Deleted" and "Row Inserted" with Author and Date (of the associated SwRangeRedline: latest tracked deletion in deleted rows, and first tracked insertion in inserted rows). Follow-up to commit c6af542a31e167e5a01908d049e399ce06a5e4e4 "tdf#146120 sw: show tracked table changes with different color" and Change-Id: I913e234de1a60311306fbebdfb1ae16dcea7cd8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126575 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-12-08use more OUStringLiteral in variousNoel Grandin
and remove some unused defines Change-Id: Ie560fccb674568ba88175d2e68ca83b92cfcf312 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126544 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-08loplugin:stringliteraldefine in swNoel Grandin
Change-Id: I583f2a23b7912e48889b49a0dce0f4681ef45566 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126543 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-08tdf#146120 sw: show tracked table changes with different colorLászló Németh
In Change Tracking, show deleted table rows in cyan and inserted rows in pink. In this case, don't show original table row or cell background. Follow-up to commit f481c2c8e74bded11fac754e493560391229dbcd "tdf#144057 sw track changes: hide deleted table rows". Change-Id: Ib9cc411b62b92bc8a83dda7589f3e798f7e96f41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126482 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-12-07loplugin:unusedmethodsNoel Grandin
Change-Id: Ic1ba90447575278d854af85312271c41766b776b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126422 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-06Add image preffered DPI document setting, use it in Writer, ImpressTomaž Vajngerl
This adds a "image preferred DPI" document setting, which is used as a suggestion of the DPI that an image should have in the document. This is currently used when the image is inserted into the document (Writer, Impress/Draw) to resize it to the preferred DPI value. Change-Id: I3ee9d409257e3c6aa2ead05144ecbba7b3b916f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126334 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-12-03tdf#145062 sw: deal with failing insertion of field in SwWrtShellMichael Stahl
Change-Id: Ic0c479e97b7a5f6fcc7f7eb454eb77a5c47de9db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126191 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-02sw: update previews of OLE objects on "update all"Miklos Vajna
Charts were already updated, it was not consistent that other embedded objects are not updated. This is especially useful if an ODT file is manipulated by a 3rd-party, then loaded into Writer just to update the previews of OLE objects. Change-Id: If61aa037739c593abade933dcdd5474ad566b3e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126253 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-12-01use more OInterfaceContainerHelper3 in swNoel Grandin
Change-Id: Icb194de0521bf60f3db623c35e695afc3a3edbcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-01sw doc model xml dump: show the format of section nodesMiklos Vajna
The SwSectionNode has an SwSection, which is registered in an SwSectionFormat, which finally tells us if it's a protected one. Change-Id: Ie46c516f900f1c479c11cbbaf061973400614a2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126151 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-11-29tdf#54465 tdf#139336 sw: add compat. flag for footnote in columnAttila Szűcs
Add compatibility option FOOTNOTE_IN_COLUMN_TO_PAGEEND to keep layout of old ODT files, where multicolumn sections have footnotes in columns, growing sections to the full page. Note: Multicolumn page styles or not evenly distributed multicolumn sections, or footnotes not collected at the end of the sections still use footnotes in columns, so they don't need this compatibility option. Follow-up to commit 4c31b4ef2083087a822c3ae648fd09acc67d2f88 "tdf#139336 sw: fix extra pages of multicolumn sections with footnotes". Co-authored-by: Tibor Nagy (NISZ) Change-Id: I7d6a1f804b555dc5372767014b8fb5e3fa57ba9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125442 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-28Revert "tdf#129183 sw: textboxes in group shapes - part 3"Stephan Bergmann
This reverts commit eabcfb3f18a6944d9ad89cecd3eb3ca7a2259cf3. Conflicts: sw/source/core/doc/textboxhelper.cxx It caused UITest_writer_tests4 to fail in an ASan build with > ==2987325==ERROR: AddressSanitizer: heap-use-after-free on address 0x6130000e5048 at pc 0x7f20cb3112ac bp 0x7f1e62de92d0 sp 0x7f1e62de92c8 > WRITE of size 8 at 0x6130000e5048 thread T47 > #0 in SwFrameFormat::SetOtherTextBoxFormat(SwTextBoxNode*) at sw/inc/frmfmt.hxx:106:77 > #1 in SwTextBoxNode::~SwTextBoxNode() at sw/source/core/doc/textboxhelper.cxx:1680:30 > #2 in SwFrameFormat::~SwFrameFormat() at sw/source/core/layout/atrfrm.cxx:2564:9 > #3 in SwDrawFrameFormat::~SwDrawFrameFormat() at sw/source/core/layout/atrfrm.cxx:3455:1 > #4 in SwDrawFrameFormat::~SwDrawFrameFormat() at sw/source/core/layout/atrfrm.cxx:3453:1 > #5 in SwFrameFormats::DeleteAndDestroyAll(bool) at sw/source/core/doc/docfmt.cxx:2115:9 > #6 in SwDoc::~SwDoc() at sw/source/core/doc/docnew.cxx:565:28 > #7 in SwDoc::release() at sw/source/core/doc/doc.cxx:118:9 > #8 in rtl::Reference<SwDoc>::clear() at include/rtl/ref.hxx:196:19 > #9 in SwDocShell::RemoveLink() at sw/source/uibase/app/docshini.cxx:444:16 > #10 in SwDocShell::~SwDocShell() at sw/source/uibase/app/docshini.cxx:372:5 > #11 in SwDocShell::~SwDocShell() at sw/source/uibase/app/docshini.cxx:362:1 > #12 in SwDocShell::~SwDocShell() at sw/source/uibase/app/docshini.cxx:362:1 > #13 in SvRefBase::ReleaseRef() at include/tools/ref.hxx:163:29 > #14 in tools::SvRef<SfxObjectShell>::~SvRef() at include/tools/ref.hxx:56:36 > #15 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() at sfx2/source/doc/sfxbasemodel.cxx:245:5 > #16 in void std::destroy_at<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/stl_construct.h:88:15 > #17 in void std::allocator_traits<std::allocator<IMPL_SfxBaseModel_DataContainer> >::destroy<IMPL_SfxBaseModel_DataContainer>(std::allocator<IMPL_SfxBaseModel_DataContainer>&, IMPL_SfxBaseModel_DataContainer*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/alloc_traits.h:537:4 > #18 in std::_Sp_counted_ptr_inplace<IMPL_SfxBaseModel_DataContainer, std::allocator<IMPL_SfxBaseModel_DataContainer>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:528:2 > #19 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:168:6 > #20 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:705:11 > #21 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:1154:31 > #22 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::reset() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:1272:9 > #23 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:757:13 > #24 in SwXTextDocument::dispose() at sw/source/uibase/uno/unotxdoc.cxx:549:19 > #25 in SfxBaseModel::close(unsigned char) at sfx2/source/doc/sfxbasemodel.cxx:1482:5 > #26 in SwXTextDocument::close(unsigned char) at sw/source/uibase/uno/unotxdoc.cxx:562:19 > #27 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:718:13 > #28 in SwXTextDocument::dispose() at sw/source/uibase/uno/unotxdoc.cxx:549:19 > #29 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5 > #30 in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233:13 > #31 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #32 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny> >*) const at binaryurp/source/incomingrequest.cxx:235:13 > #33 in binaryurp::IncomingRequest::execute() const at binaryurp/source/incomingrequest.cxx:78:26 > #34 in request at binaryurp/source/reader.cxx:85:9 > #35 in cppu_threadpool::JobQueue::enter(void const*, bool) at cppu/source/threadpool/jobqueue.cxx:100:17 > #36 in cppu_threadpool::ORequestThread::run() at cppu/source/threadpool/thread.cxx:164:31 > #37 in threadFunc at include/osl/thread.hxx:189:15 > #38 in osl_thread_start_Impl(void*) at sal/osl/unx/thread.cxx:264:9 > #39 in start_thread at <null> > #40 in __GI___clone3 at <null> > > 0x6130000e5048 is located 328 bytes inside of 376-byte region [0x6130000e4f00,0x6130000e5078) > freed by thread T47 here: > #0 in operator delete(void*, unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:164:3 > #1 in SwFlyFrameFormat::~SwFlyFrameFormat() at sw/source/core/layout/atrfrm.cxx:2912:1 > #2 in SwFrameFormats::DeleteAndDestroyAll(bool) at sw/source/core/doc/docfmt.cxx:2115:9 > #3 in SwDoc::~SwDoc() at sw/source/core/doc/docnew.cxx:565:28 > #4 in SwDoc::release() at sw/source/core/doc/doc.cxx:118:9 > #5 in rtl::Reference<SwDoc>::clear() at include/rtl/ref.hxx:196:19 > #6 in SwDocShell::RemoveLink() at sw/source/uibase/app/docshini.cxx:444:16 > #7 in SwDocShell::~SwDocShell() at sw/source/uibase/app/docshini.cxx:372:5 > #8 in SwDocShell::~SwDocShell() at sw/source/uibase/app/docshini.cxx:362:1 > #9 in SwDocShell::~SwDocShell() at sw/source/uibase/app/docshini.cxx:362:1 > #10 in SvRefBase::ReleaseRef() at include/tools/ref.hxx:163:29 > #11 in tools::SvRef<SfxObjectShell>::~SvRef() at include/tools/ref.hxx:56:36 > #12 in IMPL_SfxBaseModel_DataContainer::~IMPL_SfxBaseModel_DataContainer() at sfx2/source/doc/sfxbasemodel.cxx:245:5 > #13 in void std::destroy_at<IMPL_SfxBaseModel_DataContainer>(IMPL_SfxBaseModel_DataContainer*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/stl_construct.h:88:15 > #14 in void std::allocator_traits<std::allocator<IMPL_SfxBaseModel_DataContainer> >::destroy<IMPL_SfxBaseModel_DataContainer>(std::allocator<IMPL_SfxBaseModel_DataContainer>&, IMPL_SfxBaseModel_DataContainer*) at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/alloc_traits.h:537:4 > #15 in std::_Sp_counted_ptr_inplace<IMPL_SfxBaseModel_DataContainer, std::allocator<IMPL_SfxBaseModel_DataContainer>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:528:2 > #16 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:168:6 > #17 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:705:11 > #18 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:1154:31 > #19 in std::__shared_ptr<IMPL_SfxBaseModel_DataContainer, (__gnu_cxx::_Lock_policy)2>::reset() at ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../include/c++/12.0.0/bits/shared_ptr_base.h:1272:9 > > previously allocated by thread T10 here: > #0 in operator new(unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:95:3 > #1 in SwDoc::MakeFlyFrameFormat(rtl::OUString const&, SwFrameFormat*) at sw/source/core/doc/docfmt.cxx:756:33 > #2 in SwDoc::MakeFlySection_(SwPosition const&, SwContentNode const&, RndStdIds, SfxItemSet const*, SwFrameFormat*) at sw/source/core/doc/doclay.cxx:171:33 > #3 in SwDoc::MakeFlySection(RndStdIds, SwPosition const*, SfxItemSet const*, SwFrameFormat*, bool) at sw/source/core/doc/doclay.cxx:337:19 > #4 in SwXFrame::attachToRange(com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&, SwPaM const*) at sw/source/core/unocore/unoframe.cxx:2821:29 > #5 in SwXFrame::attach(com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sw/source/core/unocore/unoframe.cxx:3115:9 > #6 in SwXTextFrame::attach(com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sw/source/core/unocore/unoframe.cxx:3346:15 > #7 in SwXText::insertTextContent(com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&, com::sun::star::uno::Reference<com::sun::star::text::XTextContent> const&, unsigned char) at sw/source/core/unocore/unotext.cxx:615:15 > #8 in SwXText::insertTextContentWithProperties(com::sun::star::uno::Reference<com::sun::star::text::XTextContent> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sw/source/core/unocore/unotext.cxx:1472:5 > #9 in non-virtual thunk to SwXText::insertTextContentWithProperties(com::sun::star::uno::Reference<com::sun::star::text::XTextContent> const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sw/source/core/unocore/unotext.cxx > #10 in SwTextBoxHelper::create(SwFrameFormat*, SdrObject*, bool) at sw/source/core/doc/textboxhelper.cxx:100:29 > #11 in SwXShape::setPropertyValue(rtl::OUString const&, com::sun::star::uno::Any const&) at sw/source/core/unocore/unodraw.cxx:1165:25 > #12 in SdXMLShapeContext::SetStyle(bool) at xmloff/source/draw/ximpshap.cxx:701:27 > #13 in SdXMLCustomShapeContext::startFastElement(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) at xmloff/source/draw/ximpshap.cxx:3545:5 > #14 in SvXMLImport::startFastElement(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) at xmloff/source/core/xmlimp.cxx:805:15 > #15 in (anonymous namespace)::Entity::startElement((anonymous namespace)::Event const*) at sax/source/fastparser/fastparser.cxx:468:27 > #16 in sax_fastparser::FastSaxParserImpl::callbackStartElement(unsigned char const*, unsigned char const*, unsigned char const*, int, unsigned char const**, int, unsigned char const**) at sax/source/fastparser/fastparser.cxx:1304:21 > #17 in (anonymous namespace)::call_callbackStartElement(void*, unsigned char const*, unsigned char const*, unsigned char const*, int, unsigned char const**, int, int, unsigned char const**) at sax/source/fastparser/fastparser.cxx:331:18 > #18 in xmlParseStartTag2 at workdir/UnpackedTarball/libxml2/parser.c:9658:6 > #19 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11453:14 Change-Id: I752190e05fc3c282b75021724527f623f56ee6a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125977 Tested-by: Jenkins Tested-by: René Engelhard <rene@debian.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-27Library_msword needs sw::LegacyModifyHint RTTI now in UBSan buildStephan Bergmann
...since 7d3aadce8d184f72e4785827ad706d27c31a2edb "ofz#41398 drop a para scheduled for deletion if something else deletes it", causing e.g. CppunitTest_chart2_export to fail with > [_RUN_____] Chart2ExportTest::testStockChart [...] > warn:sal.osl:1981149:1981149:sal/osl/unx/module.cxx:155: dlopen(/home/sbergman/lo/core/instdir/program/libmswordlo.so, 257): /home/sbergman/lo/core/instdir/program/libmswordlo.so: undefined symbol: _ZTIN2sw16LegacyModifyHintE > warn:sfx.doc:1981149:1981149:sfx2/source/doc/sfxbasemodel.cxx:3147: Storing has failed, no error is set! > unknown:0:Chart2ExportTest::testStockChart > > An uncaught exception of type com.sun.star.io.IOException > - SfxBaseModel::impl_store <file:///home/sbergman/lo/tmp/Chart2ExportTest__testStockChart_4rivgy.tmp> failed: 0xc10(Error Area:Io Class:Write Code:16) /home/sbergman/lo/core/sfx2/source/doc/sfxbasemodel.cxx:3194 /home/sbergman/lo/core/sfx2/source/doc/sfxbasemodel.cxx:1775 Change-Id: I47ce1c10b7757b27e4279f35d59e34d5312c8b07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125945 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-25sw: allow viewing OLE objects in protected sectionsMiklos Vajna
The problem was that we don't allow even opening embedded objects in protected sections, which means the content of multi-page embedded objects can't even be viewed in protected sections, which probably goes too far. Fix this relaxing the condition in SwEditWin::MouseButtonDown() to allow launching the OLE object on double-click, and then make sure that the native data is not updated in SfxInPlaceClient_Impl::saveObject() and the replacement image is not updated in svt::EmbedEventListener_Impl::stateChanged(). This is complicated by only the Writer layout knowing if a given OLE object is anchored in a protected frame, so pass down a callback to sfx2/ and svtools/ to check if the OLE object is protected. Not copying the protected bit has the benefit of behaving correctly if the section turns into non-protected: copying would not work properly, as SfxInPlaceClient is created on demand, so not re-created when the protectedness of the section is changed. Change-Id: Ib3a8f2092d27dc1ebd3ef355c95a4a473988b163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125815 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-24tdf#129183 sw: textboxes in group shapes - part 3Attila Bakos (NISZ)
Grouping/ungrouping nested groups works now. Manual test: 1. Insert Shape. 2. Right-click on selected shape, Add Text Box (and some text). 3. Insert a new shape. 4. Select and group the two shapes. 3. Insert a third shape. 4. Select and group the shape and the previously grouped shapes. The text box remains in the nested shape group. Details: 1) tdf#144271 memory leak of SwTextBoxHelper, by replacing the textbox structure vector with std::unordered map, and rethinking of the ownership of the objects. If a SwFrameFormat dies, and that is a FLYFRMFMT, it will be deleted from the textbox node and the FrameFormat table in the doc too, and the drawing will be stay as it was before. If the dying format is a drawing, all the textboxes, and the node will be deleted. 2) Introducing the new UNO property TextBoxContent, which is needed for writerfilter/xmloff later to set a new textbox for the shape via UNO. 3) Missing parameters are present now for syncing the textbox parameters. 4) Introducing a new function namely the handleGroupTextBox() to do the tasks simply with all textboxes in a group shape. This can handle nested groups as well (group in a group). Known issues: now copy of nested group objects is implemented but not enabled, because it causes an assert. Change-Id: I931886eda01c7a3db93098de10f5e5f48f2f217b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124657 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-23tdf#145719 sw: track moved text in import and ChangesInMarginLászló Németh
Recognize moved text by accessing to the hidden redline content pContentSect during ODT import (in the case of Delete redlines) and ChangesInMargin mode (Delete or Insert redlines depending on Deletion in Margin or Insertion in Margin modes). Fix Undo and redline stack handling by moving IsMoved bit to SwRedlineData from SwRangeRedline. Note: .fodt format is applicable for the unit test document, because it's not affected by the problem. Change-Id: Ifd4f993520bec4b845d978a844c465509ea87b50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125552 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-22sw: prefix members of SwDBManager, SwWebGlosDocShell, SwWordCountWrapper ...Miklos Vajna
... and SwZoomControl See tdf#94879 for motivation. Change-Id: I74f31e45a8c215d406371a23b64d548fbb851d28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125641 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-18tdf#145721 sw: add 'moved text' icons to Manage ChangesLászló Németh
For Moved (deletion) and Moved (insertion) text changes, add new Action icons to Manage Changes dialog window (Edit->Track Changes->Manage...), re-using existing Cut and Paste icons. Follow-up to commit 970f8ec7c8eb6007181ce55d885eef771dd49cc6 "tdf#145721 sw track changes: sign text moving in redline tooltips". Change-Id: Ic202538ec31963e5e27170c7e5ea819a7f2bde9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125445 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-17tdf#145721 sw track changes: sign text moving in redline tooltipsLászló Németh
Write "Moved (deletion)" and "Moved (insertion)" instead of "Deleted" and "Inserted" in tooltip of tracked text movings. Follow-up to commit f51fa7534421a195a58b4a737a2e836d8c25ba81 "tdf#145718 sw, DOCX import: complete tracked text moving" Change-Id: I5db3025ddb7b4758e3699c10971a765784555a20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125405 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-17tdf#145718 sw, DOCX import: complete tracked text movingLászló Németh
Add IsMoved bit to SwRangeRedline, and keep it in both parts of a split Delete/Insert redline. Set this bit during DOCX import, fixing incomplete import of moveFrom/moveTo elements. Details: - Search text moving only at redline Insert() and AppendRedline() instead in the layout code (which was much slower, because triggered by also mouse hovering): - detect text moving in Hide Changes mode, too; - Insertion inside or directly after tracked text moving keeps "moved text" layout of the original moved text parts (before and after the insertion). - at detection of text moving, invalidate (update) layout of the redline pair, too. - fix DOCX import: extend makeRedline() with property RedlineMoved to keep all moveFrom/moveTo stored in DOCX instead of losing them (joining them with normal redlines) in the case of missing Delete/Insert pair (see unit test document); Follow-up to commit ec577f566fa3e6d2666069180f8ec8474054aea9 "tdf#145233 sw track changes: show moved text in green color", commit bcdebc832b272662d28035007a4796e42d1305ae "tdf#104797 DOCX change tracking: handle moveFrom and moveTo" and commit d32d9a2b3c5e3963f4a18f6c7bbf50fab2e9b2be "tdf#123460 DOCX track changes: moveFrom completely". Change-Id: Iaca80e5e326a172bc7ba5fec64b63668b9378e2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125317 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-17replace an ugly coverity warning suppressionCaolán McNamara
Change-Id: I320d84901368f0586a113fd2afe1cb6a5eb19b11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125320 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-16Drop redundant 'using rtl::OUString'Mike Kaganski
obsoleted by 6080259862ee9886d1dabcb7c06132268a398cc6 Change-Id: I246dc6050fe7adf60ab3c836db3cfa781578d483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125142 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-15replace an ugly coverity warning suppressionCaolán McNamara
Change-Id: I73921e43e7e955793493e2accab4e3799cfd121c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125221 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-15sw: prefix members of SwInsertIdxMarkWrapper, ...Miklos Vajna
... SwLinguServiceEventListener, SwTemplateControl and SwTypeNumber See tdf#94879 for motivation. Change-Id: Ia76bd27b6ae361dbeb03d2cdab5b95bd0033460b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125217 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-14remove an ugly coverity warning suppressionCaolán McNamara
Change-Id: I243638e242f68d61b639d4afbcb5d65575cc46e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125172 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-13make SwNodeOffset operator+ and operator- inlineNoel Grandin
forgot to do this spotted by llunak Change-Id: I5e8c723850f77346789ea0b1fb364f5e0d44ae42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-12make it explicit whether to ignore the result of getLOKPayload()Luboš Luňák
Returning an empty string to signify 'ignore' was a poor design, as some messages types actually may have valid empty messages. Change-Id: Ia82d3d97d150bc5ef412a1bd4b1091d9b2d84385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124979 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-10sw: allow undo of typing in 2 views independent from each otherMiklos Vajna
Undoing out of order is dangerous by default, so limit this to a very specific case as a start, that allows growing in follow-up commits. For now, allow out of order undo if: 1) redo stack is empty 2) we're in LOK mode (different views represent different users) 3) we undo a single action (count is 1) 4) the top undo action doesn't belong to the current view 5) the top and the previous undo actions are independent Which only requires that SwUndoInsert::UndoImpl() is independent for two different paragraphs, which seems to be the case. Independent undo actions opt in for this, currently the only such allowed undo action is SwUndoInsert ("typing"), which adds characters to a single text node. Even those are only considered independent if they operate on different text nodes. On the positive side, this allows out of order undo in the frequent case where two users collaborate on a long document and they just type some new content into the document at different paragraphs. Change-Id: Ibb4551e8f7046b4947491b8bf751eaa0cbb2d060 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124949 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-09tdf#145089 DOCX export: fix track changes of table row insertionLászló Németh
Newly inserted table rows lost their change tracking during DOCX import, i.e. rejection didn't remove the rows. Note: start to clean-up DOCX export and SwTableLine::IsDeleted(), preparing the fix for tdf#145091. Follow-up to commit dbc82c02eb24ec1c97c6ee32069771d8deb394f9 "tdf#143358 sw: track insertion of empty table rows". Change-Id: Ib90b745632ec4aeb30651fbff209ecef69657f4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124922 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-08sw: try grouping undo actions of IME-edited textMiklos Vajna
This is a problem since commit e7760d428bc82ccfcae14f1907b78f9f1013b88c (Fix tdf#87500 - Freeze with English/Japanese mixture undo., 2015-09-08), that started not grouping IME-edited text completely. This means that in case you go via SwEditWin::Command() instead of SwEditWin::KeyInput() to type a 4 characters word, then it'll create 4 undo actions. Fix the problem by tracking who was the last caller of sw::DocumentContentOperationsManager::InsertString(), so we can only disable grouping switching between IME and non-IME, and we can have grouping for a series of IME input. Change-Id: I31bd02db4fe653ab63e41a77c75b8bebfc749ff1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124766 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-05use more DECL_DLLPRIVATE_LINKNoel Grandin
to avoid unnecessarily exporting symbols Change-Id: I6855894d0166c300ced169e36861f38811baa48d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-04Resolves: tdf#143643 ensure relayout on undo of insert commentCaolán McNamara
Change-Id: I732e23b8ff7c17abf4b5b9b7c7964fca6069543c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124685 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-01Related: tdf#145363 provide an explicit parent for page formatCaolán McNamara
when launched from another dialog let it take that as the parent Change-Id: I07bfe03717cbe140301060e6e85bdbdef953bf5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124560 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-01tdf#145363 provide an explicit parent for numbering-style dialogCaolán McNamara
when launched from another dialog let it take that as the parent Change-Id: I64247b0b670c3e44176b6323c074cfd0711feefb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124558 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-29use virtual function call for dynamic dispatchBjoern Michaelsen
... as it is around since the dawn of C++ and should be stable -- certainly more stable and less errorprone that manual typetagging. Change-Id: I5dfe2ce40c2334dc8fe60705d358779fa4bf1586 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124131 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2021-10-29consolidate DDE updates in FieldTypeBjoern Michaelsen
Change-Id: I70243dad4cd62ab1f601d010e0bcf441831ec556 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124130 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-10-25use pull model also for LOK text selectionLuboš Luňák
Make LOK_CALLBACK_TEXT_SELECTION, LOK_CALLBACK_TEXT_SELECTION_START, LOK_CALLBACK_TEXT_SELECTION_END and LOK_CALLBACK_TEXT_VIEW_SELECTION also use pull model, i.e. LO core will only set a flag and when CallbackFlushHandler needs the actual data it'll use getLOKPayload(). This again avoids a large number of messages passed to CallbackFlushHandler only for them to be sooner or later discarded. Change-Id: Ia7528039be996a6e9e8491b4eba3f4133582fa56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124146 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-25tdf#138531: Also update DDE tables, not only fieldsBjoern Michaelsen
Change-Id: I0cbf8ce355b460b2f7ea73c8fae653641c980979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124129 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>