summaryrefslogtreecommitdiff
path: root/sw/inc/textboxhelper.hxx
AgeCommit message (Collapse)Author
2024-05-28sw: use SAL_RET_MAYBENULL in getOtherTextBoxFormat()Xisco Fauli
Change-Id: I854f0d2f38fc9c6b3f8afc4b05d42fbc26e76bc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168138 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-05-13Revert "reduce symbol visibility in sw"Thorsten Behrens
This reverts commit 1a6711276f0c8abeb0028a47cc345a7453374a38. After some discussion and experiments, it turned out this rather fundamentally breaks clang's PCH build. Conclusion was: this change is not significant enough to warrant making life harder for developers. Excerpt of errors (affected were vbaswobj, msword & swui libs): - ld.lld: error: undefined symbol: SwFormat::~SwFormat() >>> referenced by fmtcol.hxx:37 (sw/inc/fmtcol.hxx:37) >>> core/workdir/CxxObject/sw/inc/pch/precompiled_vbaswobj.o:(SwFormatColl::~SwFormatColl()) - ld.lld: error: undefined symbol: SwFrameFormat::SetPositionLayoutDir(short) >>> referenced by precompiled_msword.cxx >>> core/workdir/CxxObject/sw/inc/pch/precompiled_msword.o:(vtable for sw::SpzFrameFormat) - ld.lld: error: undefined symbol: SwFrameFormat::SetLayoutDir(SwFrameFormat::tLayoutDir) >>> referenced by precompiled_swui.cxx >>> core/workdir/CxxObject/sw/inc/pch/precompiled_swui.o:(vtable for sw::SpzFrameFormat) Change-Id: I1dcf115cc191b1ebf1f8d5023c0c5015f891287a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167549 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-03-13reduce symbol visibility in swNoel Grandin
Change-Id: Ib3edefc365d3c605c3024e160572fa4030100ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-01replace SwFrameFormats with sw::FrameFormats<SwFrameFormat*>Bjoern Michaelsen
- SwFrameFormats is now completely replaced by stronger typed sw::FrameFormats<>, thus remove it Change-Id: I7e655a83ba8cf01d1e68dccd1804c167e8daca9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150455 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-04-28Revert "Revert "introduce sw::SpzFrameFormat ...""Bjoern Michaelsen
apparently, in SwHistoryChangeFlyAnchor::SetInDoc, m_rFormat might actually reference a DrawFormat, not a FlyFormat, and that is likely fundamentally broken. But for now, lets just make m_rFormat a sw::SpzFrameFormat -- this already removes some pointless up and downcasting. This reverts commit 52acefd6024ec79f8333ba40eef83816eda3046f. Change-Id: I040d98548bf9ac1c25b93214224eb0812f8cb653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151150 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2023-04-27Revert "introduce sw::SpzFrameFormat ..."Stephan Bergmann
This reverts commit 09cdcb5f37bb4e42da7b28db6e757b9f2affed14. It broke at least CppunitTest_sw_uiwriter3 (<https://ci.libreoffice.org//job/lo_ubsan/2756/>), > /sw/source/core/undo/rolbck.cxx:938:46: runtime error: downcast of address 0x61300041fd00 which does not point to an object of type 'SwFlyFrameFormat' > 0x61300041fd00: note: object is of type 'SwDrawFrameFormat' > 00 00 00 00 70 83 cf 09 25 7f 00 00 00 83 47 00 30 61 00 00 40 e5 43 00 30 61 00 00 80 66 5d 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SwDrawFrameFormat' > #0 0x7f24fca9c5b9 in SwHistoryChangeFlyAnchor::SetInDoc(SwDoc*, bool) /sw/source/core/undo/rolbck.cxx:938:46 > #1 0x7f24fca880f3 in SwHistory::Rollback(SwDoc*, unsigned short) /sw/source/core/undo/rolbck.cxx:1208:15 > #2 0x7f24fcb47832 in SwUndoDelete::UndoImpl(sw::UndoRedoContext&) /sw/source/core/undo/undel.cxx:1031:33 > #3 0x7f24fcb703c2 in SwUndo::UndoWithContext(SfxUndoContext&) /sw/source/core/undo/undobj.cxx:225:5 > #4 0x7f2543b8b57c in SfxUndoManager::ImplUndo(SfxUndoContext*) /svl/source/undo/undo.cxx:712:22 > #5 0x7f2543b8c4f8 in SfxUndoManager::UndoWithContext(SfxUndoContext&) /svl/source/undo/undo.cxx:664:12 > #6 0x7f24fca6a074 in sw::UndoManager::impl_DoUndoRedo(sw::UndoManager::UndoOrRedoType, unsigned long) /sw/source/core/undo/docundo.cxx:696:32 > #7 0x7f24fca6b38f in sw::UndoManager::UndoWithOffset(unsigned long) /sw/source/core/undo/docundo.cxx:731:16 > #8 0x7f24fa830b18 in SwEditShell::Undo(unsigned short, unsigned short) /sw/source/core/edit/edundo.cxx:141:57 > #9 0x7f250088f448 in SwWrtShell::Do(SwWrtShell::DoType, unsigned short, unsigned short) /sw/source/uibase/wrtsh/wrtundo.cxx:45:26 > #10 0x7f24ff7f16e2 in SwBaseShell::ExecUndo(SfxRequest&) /sw/source/uibase/shells/basesh.cxx:651:27 > #11 0x7f24ff7eea14 in SfxStubSwBaseShellExecUndo(SfxShell*, SfxRequest&) /workdir/SdiTarget/sw/sdi/swslots.hxx:2203:1 > #12 0x7f2523fbc059 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:254:9 > #13 0x7f2523fd1ced in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9 > #14 0x7f2523f61333 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) /sfx2/source/control/bindings.cxx:1060:22 > #15 0x7f252437496b in SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:688:53 > #16 0x7f2524377211 in SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> const&) /sfx2/source/control/unoctitm.cxx:266:16 > #17 0x7f24cad28dd6 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatch> const&, com::sun::star::util::URL const&, bool, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:163:30 > #18 0x7f24cad27cb2 in framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx:120:16 > #19 0x7f24cad29684 in non-virtual thunk to framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/dispatchhelper.cxx > #20 0x7f24e91d386d in unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference<com::sun::star::lang::XComponent> const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:94:33 > #21 0x7f25319b2012 in testTdf132321::TestBody() /sw/qa/extras/uiwriter/uiwriter3.cxx:982:5 Change-Id: Ibeb181bc38cd6f88df76403cca8a15b45090633f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151027 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-24introduce sw::SpzFrameFormat ...Bjoern Michaelsen
- ... as a base class of frame formats allowed into the spz frame format container - with a private ctor and friends SwDrawFrameFormat and SwFlyFrameFormat so only these two classes derive from it - with that, switch over the SpzFrameFormats to only ever allow these types into the container - in followups, likely quite a bit of stronger typing can be introduced. - ultimately, it would be nice to have each SwDrawFrameFormats and SwFlyFrameFormats in their own strongly typed container in the end. Change-Id: Ic30efc1220aded701533c9ca5003d2aaf8bbdaec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150452 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
2022-07-11tdf#148687 tdf#149173 tdf#149546 sw: fix crash with textboxesAttila Bakos (NISZ)
Regression from 2110597ac730fa07dbbdd603fda82b182ed27c9e "tdf#147485 sw: fix group shape crash using std::shared_ptr". Details: 1) Using reference instead of copy assignment in SwTextBoxHelper. 2) Cleanup: Unused parts of SwTextBoxHelper were removed. 3) Fixing destruction of textboxes, in case when first the shape is removed, with clearing all textboxes from the doc and the shape before the pointer is released. All of this only have to be done if the call is not coming from the swdoc dtor, unless there will be double freeing. 4) Missing style conversion was fixed in writerfilter. 5) Don't import sections in textboxes, unless the hack of dummy paragraph before tables in sections will be applied and the paragraph with anchored objects inside will be removed with the objects; 6) ConvertTextRangeToTextFrame also fixed, so embed frames in frames are imported from now. (Also textboxes in frames, this can be useful when there is a floating table having group textbox with nested complex content inside, or floating table in floating table, etc...) Note: Follow up commit will enable group textbox import in frames and tables. 7) Import of group textboxes with complex content in header/footer was impossible, from now this is also supported both from DOCX and ODT (test included). 8) Guard class for blocking unwanted recursive textbox sync has been introduced, and maybe some speedup with group textbox import has been achieved. 9) The anchor sync method got a new function which avoids unnecessary sync when the anchor is the same. 10) Sync of As_char textboxes during layout calculation caused crash so that has a workaround from now, for DOCX import anchor change and Undo. That syncs starts before the layout calculation so sync not needed later. 11) A memory leak was found in Undo, which has been fixed. Note: layout test "testTdf147485Forcepoint" has to be limited to Windows and Mac builds, because font substitution causes crash on the Unix based systems. Change-Id: I69d5d79cc120e3a70ba9285be32ec36a434b2a04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136192 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-29tdf#149550 sw: fix crash by implementing nested textbox copyAttila Bakos (NISZ)
Grouped shapes with a nested textbox were copied without the textbox with frequent crashing. Regression from commit 2951cbdf3a6e2b62461665546b47e1d253fcb834 "tdf#143574 OOXML export/import of textboxes in group shapes". Change-Id: Ie2cc24f10706d8999026dc92ebad21f2c5673003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135815 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-04-01tdf#147485 sw: fix group shape crash using std::shared_ptrAttila Bakos (NISZ)
for SwFrameFormat::m_pOtherTextBoxeFormats. Before there was broken manual handling of this member, resulting random crashes. Details: Writer textboxes are textframe + shape pairs. Accordingly the shape has a draw format, the frame has a fly format. In case of group shapes the paired structure doesn't work, because there is one shape format and many fly formats. To handle this there is a class (SwTextBoxNode) which has a small frame format table inside. This cache gives the possibility to handle each frame shape pairs inside the group depending on what SdrObject owns that textbox. However there is another place where these formats stored, namely the SpzFrameFormatTable in SwDoc. The only problem is that, when a flyframe removed, it has to be deleted from both tables, but if the DelLayoutFormat() is called, that will call the ~FrameFormat(), and if the format already deleted from the SwTextBoxNode, there will be double deleting for the same address, which caused the crash. To avoid this the following is present: When fly deletion occurs, first the format is deleted from the doc, then via the ~SwFrameFomat() will be deleted from the TextBoxNode. If the deleted format is a drawing, the whole node will be destructed via the shared_ptr. Hopefully that will be fine, without any leak. Change-Id: I007724695bc035998cb35efeefecd308aae36e85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132308 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2022-03-24loplugin:constantparamNoel Grandin
Change-Id: Ib863ea852792635e521050019a3a190b3eeb681e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-11loplugin:constparamsNoel Grandin
Change-Id: I5f184f93dbdb414514855c85c9dc1624e7ec8636 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-10Recheck sw headers with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I99558e6b6952b3f2c1ee32dd07354ff659ad9cd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131183 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-01tdf#147126 sw: fix missing as_char anchoring of group textboxesAttila Bakos (NISZ)
which resulted lost (invisible) text content before implementing its support now. Cleanup to SwTextBoxHelper by removing its unneeded functions. testFDO78590 was commented out temporarily because it has a pure VML groupshape inside and it's converted to WPG during the test run resulting crash on reopening, because lack of its support in DocumentContentOperationsManager, trying to convert the content to a text frame inside a text frame. Regression from commit 2951cbdf3a6e2b62461665546b47e1d253fcb834 "tdf#143574 OOXML export/import of textboxes in group shapes". Change-Id: Ic6ce3549d390ae763044f54e991f390677704396 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129627 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
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-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-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-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-09-30loplugin:constparams improve handling of pointer paramsNoel Grandin
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-16tdf#143574 tdf#144271 sw: textboxes in group shapes - part 2Attila Bakos (NISZ)
Sync textboxes with group shapes, adding textboxes to group shapes, copying textboxes with group shapes, grouping/ungrouping group shapes with textboxes, removing textboxes from group shapes. This patch fixes a memory leak (tdf#144271) introduced by commit 504d78acb866495fd954fcd6db22ea68f174a5ab "tdf#143574 sw: textboxes in group shapes - part 1". Note: AS_CHAR anchoring is far not the best for group shapes and import/export is still missing. Change-Id: I7dc3b8d36c4a04f792ae4742fe4a45af9227a17e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121449 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-09-01tdf#143574 sw: textboxes in group shapes - part 1Attila Bakos (NISZ)
Introduce SwTextBoxNode class to support grouped textboxes, fixing the crash when entering a group shape, trying to add a textbox to one of the shapes. Test of crash fix: right click on a group shape. Select the menu item "Enter group". Select one of the shapes, and right click on it, and choose "Add Text Box". Note: textboxes in Writer are linked in SwFrameFormat class. Each textbox consists of a text frame and a shape. This object pair makes it possible to have complex content inside any kind of shape (pictures, tables etc. Group shapes have only one SwFrameFormat, but can have many shapes so that means they can only have one textbox. From now, each shape could have a textbox in a group. Please note this is only a preparation for that. Filter implementation and handlers are under development. Change-Id: Iae35c118f0e67697b289c30d0fad4f5e16501c02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120452 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-08-18loplugin:constparamsNoel Grandin
Change-Id: Ic7410f836e584df45101e78e345c8b3c8d355e09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-06sw: avoid not needed copy in SwTextBoxHelper::getProperty()Miklos Vajna
Change-Id: If4b4cecf083367082542e12d57ddf16fef3c6dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118454 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-05-25tdf#138141 sw: fix textbox z-orderAttila Bakos (NISZ)
Textboxes are implemented as loosely connected shape-text frame pairs. Missing synchronization of their z-orders resulted e.g invisible or only partially visible textbox content using Arrange options with textboxes (see in local menu or on Drawing Object Properties toolbar). Note: because it's not possible to send frames to the background, Arrange->To Background hasn't supported, so likely it's worth to remove that option later from local menu of textboxes. Change-Id: I1aa50903ba55dd5b9e72ef203c4e30218bee68fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115227 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-05-18loplugin:unusedmethodsNoel Grandin
Change-Id: I8191f4a9eb25b12242354813303fb7d30489d2c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115752 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-06loplugin:unusedmethodsNoel Grandin
plugin code needed some updating because it was interacting badly with PCH code in pluginhandler::ignoreLocation Change-Id: I228f94a4e285747bd1d5b8536010f8617118cafa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-19Missing includeMike Kaganski
Change-Id: I2af1e4d3bdef9e9689762adae13da23feb554a36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114265 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-04-19tdf#141550 tdf#141557 tdf#140975 sw: fix textbox crashAttila Bakos (NISZ)
and regressions by refactoring SwTextBoxHelper. tdf#141550 was a DOCX import regression from commit ff321dd36554d25f0817903becf4598065e0a194 (tdf#140828 sw textbox: fix AS_CHAR regression), resulting bad horizontal position of the frame of the textbox. tdf#141557 was a regression resulting crash by changing text box anchoring "To Paragraph". tdf#140975 was an implementation error, resulting broken textbox by changing box anchoring to "As Character". In the SwTextBoxHelper class there were many repeating code parts for textbox positioning. Now these parts have been replaced with the calls of several new functions: 1) getShapeFormat() returns with the SwFrameFormat of the UNO XShape; 2) setWrapThrough() only sets the surround of the textframe (used in the code frequently); 3) changeAnchor() sets the anchor of the textframe according to the anchor of the shape; 4) doTextFramePositioning() sets the position of the textbox according to the shape (used in the code frequently); 5) isAnchorTypeDifferent() shows difference of the anchor types of the shape and the textframe. Also it handles the situation of anchoring "As Character"; 6) isTextBoxHasValidTextFrame() checks if the shape is a part of a textbox or not. Every function returns with true on success, otherwise gives information to the log. All of them can be called with ShapeFormat or UNO XShape. The goal of this to make the possibility to advance this class for further functions – rotation, grouped textboxes etc. – without code copying. Change-Id: I4441cab87931f161d0ace4983646d6d2a68a7321 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113463 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-01-26tdf#137803 sw: fix AutoSize and Wrap of textboxesAttila Bakos (NISZ)
When autosize (AutoGrowHeight) turned on the textbox fell apart. After changing the text of the textbox the positions still were different for the shape and the textframe. Now this fix solves, if the text changes, the positions (with the size what worked only before) synchronized so the textboxes are kept together. Also Wrap text inside the shape now works like the editeng text did, except in the case of empty text boxes. Note: this fixes only editing (without positioning the textboxes by the mouse before or after the setting), but not import/export, yet. The ooxmlimport test has been restored to its original state, because the fix for the tdf#135198 is fixed by this commit. To start the unit test just give the following command: $ (cd sw && make UITest_writer_tests7 UITEST_TEST_NAME="tdf137803.tdf137803.test_tdf137803" SAL_USE_VCLPLUGIN=gen) Change-Id: Ie13a7a1e81e4099cd8540edd7e008118e58134bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107515 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-12-16tdf#137819 sw: fix textboxes anchoring "As Char"Attila Bakos (NISZ)
Changing anchoring type of a textbox to "As Char", shape position follows the new text frame position. Also SwTextBoxHelper::mapAnchorType() was introduced to map between text frames and shapes, with a small cleanup. Change-Id: Iea0abe6f12a293fb4270970fde53ea903b347fb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107221 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-12-10tdf#41466 DOCX import: fix VML v:shape/v:textboxRegényi Balázs
VML v:shape/v:textbox element was imported only as a text frame, losing (otherwise recognized) preset shape geometry, i.e. replacing a callout bubble (wedgeRectCallout) and other special shapes with a plain rectangle. Thanks to Attila Bakos for the initial help. Change-Id: I03a608822ed54a20ed07406a08c3539e72958f5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105299 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-20tdf#137185 sw: move shape text on adding textboxAttila Bakos (NISZ)
The original text of the shape is moved to the new (text frame of the) text box instead of overlapping the text content added later. Change-Id: I2ad8865cdbe3c424c70985737ecda3ac9315cabc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104942 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-14tdf#137025 sw: apply textbox padding set in TextAttila Bakos (NISZ)
dialog window using Spacing to Borders in Format->Text Box and Shape->Text attributes... on the selected text box. There are two types of text boxes in sw, the older editeng one, what worked fine, and the newer one, the shape + text frame one, where modifying Spacing to Borders had no effect. This has been fixed by copying the modified shape attributes to the associated text frame. Change-Id: I8da0b414fd4771fa86851d9a6affbd9502894ebf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103674 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-04SwDrawModel ctor always dereferences its SwDoc* argCaolán McNamara
DateFormFieldDialog ctor too SwTextBoxHelper::getCount too Change-Id: I0d6e41b671af8c7d47ca3cd1f3e62a162ae06aca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103875 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-19tdf#135412 tdf#135888 sw: fix copying of linked text-boxesMichael Stahl
The resetLink()/restoreLinks() were added in commit 00a007be5ad88bac9905b373bc5e02d02acab11a because testMissingPath missing-path.docx was crashing. But then 0bcc5b3daebeb2a7d2b5ba132af4745cc6c78cd0 refactored how linking works and introduced the isTextBox function, which is called in the middle of DocumentContentOperationsManager::CopyFlyInFlyImpl() after resetLink(), and this now always returns false, the same for another call inside CopyLayoutFormat() (when called from CopyFlyInFlyImpl()), which causes text-boxes to be copied to 2 separate flys (tdf#135888). The problem in tdf#135412 is that somehow when called from SwFEShell::Paste() the content-index from the clipboard document ends up in the SwDrawFrameFormat that is created in the target document, and this causes crash in Undo because the node index is out of bounds. 10 SwUndoInsLayFormat::UndoImpl (this=0x7c2a760, rContext=...) at sw/source/core/undo/undobj1.cxx:310 (rr) p rContent.GetContentIdx()->GetNode().GetDoc()->IsClipBoard() (rr) $29 = true It turns out that missing-path.docx doesn't crash any more without resetLink(), and removing it fixes the 2 bugs. Change-Id: I0c6c91a42e00b9f3b79b774c814e7323f2bb3e05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101004 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-07-19compact namespace: swNoel Grandin
Change-Id: Ib1303380e6b55b3b3f8a3d513956f9e77ae5961e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99006 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-24loplugin:constparams in swNoel Grandin
Change-Id: I4a0f51eae28c82eca3c44b9d06c0410f9645f62f Reviewed-on: https://gerrit.libreoffice.org/66833 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-18sw: fix some IWYU warningsMiklos Vajna
Change-Id: Idff219e1c8f18adaa0f445a5469650c7793cae3a Reviewed-on: https://gerrit.libreoffice.org/53066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-22sw: clang-format textboxhelperMiklos Vajna
This was more or less consistent before, but the recent automatic rewrites broke consistency, just give up on manual formatting here. Change-Id: Ieb387e3d7230d227e33ba0b420cfa572309c5330 Reviewed-on: https://gerrit.libreoffice.org/50119 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-22tdf#42949 Fix some Include What You Use warningsMiklos Vajna
Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33 Reviewed-on: https://gerrit.libreoffice.org/46946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-19Get rid of a dynamic_castTor Lillqvist
Add a virtual member function instead. This improves performance a bit. The time to load a specific pathological customer document dropped from 1min 53s to 1min 47s on my machine. Not hugely, but clearly. Change-Id: I1e59d601e9d0e14b6a756c6e0ad29ce2a1fce66d Reviewed-on: https://gerrit.libreoffice.org/46791 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-10-23loplugin:includeform: swStephan Bergmann
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
2017-08-07Indentation fixesMiklos Vajna
These files had a consistent style before, let's keep them that way. Change-Id: If64773d8c29dee23638e4fb9b7e5b69b34d47e49
2017-08-03loplugin:constparams in sw part2Noel Grandin
Change-Id: I51ae0e8caaf46f141d3d15ace47612df1e476de7 Reviewed-on: https://gerrit.libreoffice.org/40735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-26RTF filter: use 'using' instead of 'typedef'Miklos Vajna
Change-Id: Ie7182fa30155a8090421cf9a669525be99f0e0a7 Reviewed-on: https://gerrit.libreoffice.org/38042 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, swStephan Bergmann
Change-Id: I2da2ce4cd247e7b9f973150917b4ee7bd7a0e0c4