summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-09tdf#153229 add an extended tip for this new widgetCaolán McNamara
and fix mnemonic target Change-Id: Iad68048a6f0f824b774306033fdbbfe65b152804 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146675 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-09cid#1401328 suppress Uncaught exceptionCaolán McNamara
Change-Id: I20d7e1777b94d9e1d81e8e5b1640b8e912a981d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146676 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-09sw: call FormatEmpty() in SwTextFrame::Format() for split fly mastersMiklos Vajna
The problem was that the text in the anchor frame of a split fly frame was duplicated on the old page and the new page as well. The reason for this seems to be that the master has no content and the follow has all the content (this is wanted), but then there is no code to explicitly clear the master. In other cases the master always gets some new content where portion building for that new content starts by throwing away the old portions. Once SwTextFrame::Format() and SwTextFrame::FormatEmpty() explicitly checks for these master anchors, the unwanted text in the master anchor disappears. An extra tweak is needed in SwTextFrame::PaintEmpty() to even hide the paragraph marker: this frame is empty but has a follow frame, so we should not show a paragraph marker there. Finally introduce a SwTextFrame::HasNonLastSplitFlyDrawObj() to be able to check for this "empty master anchor for split fly" case at a single place. With this <https://bugs.documentfoundation.org/attachment.cgi?id=185144> from <https://bugs.documentfoundation.org/show_bug.cgi?id=61594> gets laid out reasonably: the position is not perfect but we detect that only 1 para of the text frame fits page 1, we create a 2nd page and we correctly move exactly the text frame's 2nd para to page 2. Change-Id: I871bba2de5b829e667d5cfb1cbe0ba4cc2274edd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146680 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-09sw floattable: fix cid#1520804Miklos Vajna
GetFrameRstHeight() already assumes the m_pFrame is non-nullptr, so no need to check for this. The logic in the block will be necessary elsewhere as well, I'll extract that to a function in a follow-up change, so let's just do a minimal fix here. Change-Id: I6cb2a44e629c273f473278d61607705a2b9a7a4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146679 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-09sw: fix undo comment of FN_UPDATE_TEXT_FORMFIELDMiklos Vajna
It's an update, not an insert. One has to dispatch .uno:TextFormField, then move inside the formfield with the cursor finally dispatch .uno:UpdateTextFormField to see this in action. Change-Id: Id9e3c7b9d08582cbf83f64ff04c97dff5cbb88f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146671 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-09tdf#153476 Disable MS telemetry in VsDevCmd.batHossein
MS telemetry inside VsDevCmd.bat causes problems for the autogen.sh script which uses it to find the Visual Studio C/C++ standard library via the environment variables that show the UCRT path and version. VsDevCmd.bat is the "Developer Command Prompt for Visual Studio". The telemtry is disabled by: set VSCMD_SKIP_SENDTELEMETRY=1 This change resolves the problems described in tdf#153476. Change-Id: I8b77a2ca0c3577b3ba490723ab7901f463562578 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146677 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-09re-apply "optimize ConfigurationProperty::get()"Noel Grandin
This reverts commit 05b2bfc289df8712097cc1e640bf7d3bc6b86a84, but adds clearing of some more members, which were holding onto references to bits of config data after the config service was disposed. Change-Id: I9969ee2472445e4e1dbe8ea15e081401845ad29c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146605 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-09tdf#143148 Use pragma once instead of include guards in hwpfilterDevansh Jain
Change-Id: I010b6c76c1f859340f544409bbaab946cf2a6aa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146554 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-02-08tdf#153423 tdf#150197: use getToken in proper orderJustin Luth
This fixes a LO 7.5 regression from my commit 727c5ed30f68abc28bb04531b25a1df30810760f getToken steps along the string and consumes it, so these needed to remain in the same order as they had been originally. Dumb thing to overlook. Change-Id: I483980eafb7deb0c224063ad41616bb21ddb2191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146672 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-08Adapt to macOS Resources vs. share namingStephan Bergmann
On macOS, "Tools - Macros - Organize Macros - Basic... - Macro From:" erroneously listed all the per-application modules ("Access2Base", "Depot", "Euro", ...) under "My Macros" instead of "Application Macros". Change-Id: Ic997ab30d9205d8402136ea381745c08ce555623 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146673 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-08tdf#153229 use bestMatchFromAppearancesWithNames to take user pref into accountCaolán McNamara
so user's override of system is taken into account for the icon theme. Change-Id: I02a9bf67eb6a3406f0e60bea58387e2e7457c995 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146669 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-08Related: tdf#152486 infobar is white text on light button in light modeCaolán McNamara
background isn't "bright" or "dark" enough to be considered one or the other. This is only used for the infobars, so black text is good enough for the current bg colors in use. Change-Id: I4c2c4fadac72cc35aebeadec417186c6358c0a77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146667 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-08Revert "tdf#148360 doc import: add NO_NUMBERING_SHOW_FOLLOWBY(true)"Justin Luth
This reverts commit 2405a36f3bcd43f80371ccaed47f7523ff0d8757 which was backported to 7.4.1. This solves the regression report for DOC in tdf#153042. The problem is that the tab-without-numbering is displaying in cases where it shouldn't (i.e. when the tabstop position matches the first line indent). Although the patch itself is fine (DOC should do the same thing as DOCX) the feature is incomplete, even for DOCX/RTF. So just remove DOC from this mix - especially since there seem to be a LOT more instances of DOC files that need the incomplete aspect. Once it is proven to work OK for DOCX, we can add DOC back in. Change-Id: I3c550fc2ca29cf1490ec0a5e3979a6acbd102385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146670 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-08osl::Mutex->std::mutex in ScExternalRefCacheNoel Grandin
Change-Id: I3736683d0a7d20694ac2375016c722b4233fdcae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-08tdf#153229 add a switch to override honoring system dark modeCaolán McNamara
Change-Id: Iafb6182e05dc65d20d0809476ee58908f7426d39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146597 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-08SetAlternatingRowColors is gone nowCaolán McNamara
Change-Id: I59a17b45c34902d3b692c5a6bd70f4286bcae609 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146666 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-08Fix bogus uses of OUString::createFromAsciiStephan Bergmann
We got a report on IRC of builds failing with > svidl: /home/dolezvo1/Downloads/libreoffice/sal/rtl/ustring.cxx:278: void rtl_uString_newFromAscii(rtl_uString**, const char*): Assertion `static_cast<unsigned char>(*pCharStr) < 0x80' failed. when the "l" in "Downloads" was some non-ASCII character (whose exact identity was apparently obscured by the used pastebin service, though). Change-Id: Ib460793b0f8aa5e8f8822fa224d67e5a622a234d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146664 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-08remove SvTreeListEntry background colorCaolán McNamara
and don't overwrite the rendercontext background, which has the side effect that switching dark/light mode or other theme changes gives immediate change in visible treeviews. So tools, options, view, switching Light/Dark, Apply doesn't show a treeview with the old modes background Change-Id: I9c403beba53f1f1a28464ad8c1c70018be1cf43f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146656 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-08SetAlternatingRowColors is unusedCaolán McNamara
Change-Id: I0f214bccb28c9894b5c23600ca19b16dd3257cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146655 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-08openssl: upgrade to release 3.0.8Michael Stahl
Fixes CVE-2023-0401 CVE-2023-0286 CVE-2023-0217 CVE-2023-0216 CVE-2023-0215 CVE-2022-4450 CVE-2022-4304 CVE-2022-4203 CVE-2022-3996 Remove the patch that fixed CVE-2022-3996. Change-Id: I8587d780ea7dc07637278643dc1c49b577e3ae56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146657 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-08tdf#147488 BASIC: Create empty module when an empty library is selectedRafael Lima
If the Standard library is empty (has no modules), when the Basic IDE is opened it shows only a black screen with nothing. This patch makes it so that when the Standard library has no modules, a generic module is created and shown. Change-Id: I26dbe41b4244492a21649ab08c5fc2df24ca12a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145309 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2023-02-08htmlexport: close li mark not only in xhtmlSzymon Kłos
As commented in sw/source/filter/html/htmlatr.cxx:766 "// OutHTML_NumberBulletListEnd() will end a list item" We have to do it also in HTML not only XHTML so node will be closed and we get correct structure. This is followup for: commit 2466b9fcf20ee61f6fc621298011c0efaa55e7c6 Author: Miklos Vajna <vmiklos@collabora.com> Date: Mon Feb 21 16:38:51 2022 +0100 sw HTML export, XHTML mode: fix lost </li> when last list item is not numbered Change-Id: I99baa59b437572b157df8057445cf6c741f936b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143508 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146651 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-02-08editeng: remove SvxLRSpaceItem::nTxtLeftMichael Stahl
Several parts of SvxLRSpaceItem appear to maintain an invariant of the 3 members nTxtLeft/nLeftMargin/nFirstLineOffset: nLeftMargin is either equal to nTxtLeft if nFirstLineOffset is positive, otherwise equal to nTxtLeft + nFirstLineOffset. But not every part maintains it: there are functions SetLeftValue() and SetLeft() which simply write into nLeftMargin regardless, and a constructor that takes 3 separate numbers without any checks. The constructor calls violate the invariant in 2 ways: nTxtLeft is simply set to 0 (many cases), and one case in OutlineView::OutlineView() that sets nTxtLeft to 2000 but the other 2 at 0. Another odd thing is that the UNO services that expose SvxLRSpaceItem either expose a property for MID_L_MARGIN or for MID_TXT_LMARGIN but never both. It looks like there are 2 distinct usages of SvxLRSpaceItem: for anything that's applied to paragraphs, all 3 members are used; for anything else, nTxtLeft is unused. Try to simplify this by removing the nTxtLeft member, instead GetTextLeft() simply calculates it. Also assert in SetLeftValue()/SetLeft() that nFirstLineOffset is 0. Change-Id: Ida900c6ff04ef78e92e8914beda1cc731a695b06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146643 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-08editeng: SvxLRSpaceItem uninline some functionsMichael Stahl
Change-Id: I719ec54ef0e4540c8dbacb783b335ccb69b08e9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146642 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-08tdf#147740 fix disappearing icons in groupbarSzymon Kłos
Change-Id: Ia67b90d05bccbd4d2c2553109ea7372574ee21d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146584 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-02-08Avoid SolarMutexReleaserStephan Bergmann
UITest_writer_macro_tests occasionally failed with > ==3730889==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d00057d080 at pc 0x7f75353d933c bp 0x7ffcedf8de90 sp 0x7ffcedf8de88 > READ of size 8 at 0x60d00057d080 thread T0 > #0 in basctl::ModulWindow::GetState(SfxItemSet&) at basctl/source/basicide/baside2.cxx:1088:22 > #1 in basctl::Shell::GetState(SfxItemSet&) at basctl/source/basicide/basides1.cxx:1160:18 > #2 in SfxStubbasctl_ShellGetState(SfxShell*, SfxItemSet&) at workdir/SdiTarget/basctl/sdi/basslots.hxx:164:1 > #3 in SfxDispatcher::FillState_(SfxSlotServer const&, SfxItemSet&, SfxSlot const*) at sfx2/source/control/dispatch.cxx:1658:9 > #4 in SfxBindings::Update_Impl(SfxStateCache&) at sfx2/source/control/bindings.cxx:260:22 > #5 in SfxBindings::NextJob_Impl(Timer const*) at sfx2/source/control/bindings.cxx:1275:17 > #6 in SfxBindings::NextJob(Timer*) at sfx2/source/control/bindings.cxx:1220:5 > #7 in SfxBindings::LinkStubNextJob(void*, Timer*) at sfx2/source/control/bindings.cxx:1218:1 > #8 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45 > #9 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21 > #10 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:481:20 > #11 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13 > #12 in SvpSalInstance::CheckTimeout(bool) at vcl/headless/svpinst.cxx:161:53 > #13 in SvpSalInstance::ImplYield(bool, bool) at vcl/headless/svpinst.cxx:399:17 > #14 in SvpSalInstance::DoYield(bool, bool) at vcl/headless/svpinst.cxx:471:21 > #15 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:475:48 > #16 in Application::Yield() at vcl/source/app/svapp.cxx:559:5 > #17 in Application::Execute() at vcl/source/app/svapp.cxx:453:13 > #18 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1604:13 > #19 in ImplSVMain() at vcl/source/app/svmain.cxx:203:35 > #20 in SVMain() at vcl/source/app/svmain.cxx:235:12 > #21 in soffice_main at desktop/source/app/sofficemain.cxx:94:12 > #22 in sal_main at desktop/source/app/main.c:51:15 > #23 in main at desktop/source/app/main.c:49:1 > > 0x60d00057d080 is located 0 bytes inside of 144-byte region [0x60d00057d080,0x60d00057d110) > freed by thread T20 here: > #0 in operator delete(void*, unsigned long) at /home/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:164:3 > #1 in basctl::ModulWindow::~ModulWindow() at basctl/source/basicide/baside2.cxx:235:1 > #2 in VclReferenceBase::release() const at include/vcl/vclreferencebase.hxx:43:13 > #3 in rtl::Reference<basctl::BaseWindow>::~Reference() at include/rtl/ref.hxx:129:22 > #4 in VclPtr<basctl::BaseWindow>::disposeAndClear() at include/vcl/vclptr.hxx:209:5 > #5 in basctl::Shell::~Shell() at basctl/source/basicide/basidesh.cxx:246:23 > #6 in basctl::Shell::~Shell() at basctl/source/basicide/basidesh.cxx:228:1 > #7 in SfxViewFrame::ReleaseObjectShell_Impl() at sfx2/source/view/viewfrm.cxx:1114:9 > #8 in SfxViewFrame::~SfxViewFrame() at sfx2/source/view/viewfrm.cxx:1905:5 > #9 in SfxViewFrame::Close() at sfx2/source/view/viewfrm.cxx:1166:5 > #10 in SfxFrame::DoClose_Impl() at sfx2/source/view/frame.cxx:138:37 > #11 in SfxBaseController::dispose() at sfx2/source/view/sfxbasecontroller.cxx:931:28 > #12 in (anonymous namespace)::XFrameImpl::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at framework/source/services/frame.cxx:1493:33 > #13 in (anonymous namespace)::XFrameImpl::close(unsigned char) at framework/source/services/frame.cxx:1704:12 > #14 in SfxFrame::DoClose() at sfx2/source/view/frame.cxx:104:29 > #15 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) at sfx2/source/view/viewfrm.cxx:1703:28 > #16 in SfxBroadcaster::Broadcast(SfxHint const&) at svl/source/notify/SfxBroadcaster.cxx:40:24 > #17 in (anonymous namespace)::SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject const&) at sfx2/source/doc/objxtor.cxx:145:12 > #18 in SfxBaseModel::close(unsigned char) at sfx2/source/doc/sfxbasemodel.cxx:1487:76 > #19 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:725:13 > #20 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 > #21 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 > #22 in unoInterfaceProxyDispatch at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413:13 > #23 in binaryurp::IncomingRequest::execute_throw(binaryurp::BinaryAny*, std::__debug::vector<binaryurp::BinaryAny, std::allocator<binaryurp::BinaryAny>>*) const at binaryurp/source/incomingrequest.cxx:236:13 > #24 in binaryurp::IncomingRequest::execute() const at binaryurp/source/incomingrequest.cxx:79:26 > #25 in request at binaryurp/source/reader.cxx:86:9 > #26 in cppu_threadpool::JobQueue::enter(void const*, bool) at cppu/source/threadpool/jobqueue.cxx:100:17 > #27 in cppu_threadpool::ORequestThread::run() at cppu/source/threadpool/thread.cxx:165:31 > #28 in threadFunc at include/osl/thread.hxx:189:15 > #29 in osl_thread_start_Impl(void*) at sal/osl/unx/thread.cxx:265:9 where the ModulWindow apparently happens to get deleted by the UNO worker thread in the window of time when ModuleWindow::IsPasteAllowed temporarily dropped the SolarMutex on the main thread. Temporarily dropping the SolarMutex around the xClipboard->getContents() call had been there ever since the code got introduced in c29c7a86c8cb18d0e0602cddb3f24373e2424098 "#92173# Reimplement Basic password protection UI in Basic IDE", and at least theoretically it is of course the right thing to do to not call that UNO API with the SolarMutex locked. But it is of course also not a good idea to use SolarMutexReleaser, and that xClipboard->getContents() call doesn't look like it leads to deadlock. Change-Id: I3660065508d37801125f675440071d61e41906d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146650 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-08tdf#153434 crash on "new" macro with no cursorCaolán McNamara
probably good in trunk since: commit 6e2bd11251afbe64f9889ede36b28b00f47aaff5 Date: Sun Aug 7 12:49:11 2022 +0100 tdf#150291 Revert "Fix crash when no valid EntryDescriptor found" but still visible in 7-4 Change-Id: I63898ed3e33f73f8a93528872449539c5df6574f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146645 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-08Related: tdf#153438 this toplevel needs to be a GtkBoxCaolán McNamara
Change-Id: I04a503f77dcbfb03cfcfce26f0a94d3cb7f54b68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146646 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-08sw layout xml dump: show offset of text framesMiklos Vajna
This can be non-zero for follows in case a text frame is split into a master and follows. Also handle offset/follow of text frames when showing frame text, so only the relevant substring is shown in split frames. Change-Id: Ic3cb6daacf3a1771652afc9b64312585a8258a25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146648 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-08Simplify a bitMike Kaganski
Change-Id: I77482a2e1d382663ca31991130526feb7ce85504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146647 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-02-08CppunitTest_sw_htmlexport: avoid preTest() magic in ...Miklos Vajna
... testExportOfImagesWithSkipImagesEnabled. Set the filter option explicitly, rather than inferring it from the test name. Change-Id: I931711f394b41916a640bd3be974337d61491928 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146640 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-02-08svx: don't access m_aOutRect directly - go through methodsTomaž Vajngerl
Change-Id: If37d6fd7108d1289f838bd3f81ae9b500c8ddb5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146601 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-02-08basegfx: restructure B1DRange and B2DRange tests and add use casesTomaž Vajngerl
Change-Id: I423171e886e56a0fa107c58edee7bf8a2259a6fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146600 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-02-07tdf#153436: Improve handling of Arabic system spell dictionary on macOSKhaled Hosny
The system has only a generic “ar” spell dictionary, but LibreOffice wants country code as well. Since it is the same dictionary for all Arabic locales, we now add entries to all Arabic country codes we know about. Change-Id: Iaf5a8f495b3d1023d7fe40654afa0cce3fe9fbdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146641 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2023-02-07ofz#55771 TimeoutCaolán McNamara
Change-Id: If10047bc9da297c70c6f0457680e84e788b7c438 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146644 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-07cid#1520798 Use after freeCaolán McNamara
since: commit 441d0b0fb2eef890a465c061a3d68a07c4a51832 Date: Fri Jan 27 19:03:35 2023 -0500 tdf#151548 sw content controls: actually gotoFormatContentControl Change-Id: I0460023c2f89a3a151c01a8f844513df39a35855 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146638 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-02-07cid#1520802 Dereference null return valueCaolán McNamara
Change-Id: Iba193386d1ee82c8f47ece2445cfb2ecaeeed998 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146636 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-07cid#1520799 Unchecked dynamic_castCaolán McNamara
and cid#1520801 Unchecked dynamic_cast Change-Id: I03a0fdde1da3a9f10699b35455fa2f79ff00a494 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146635 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-07cid#1520803 silence Unchecked return value from libraryCaolán McNamara
Change-Id: I47bfb2b64526d47c2a064e3bb3d93474420825af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146613 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-07tdf#153376: Fix reading USE_TYPO_METRICS flagKhaled Hosny
Font data is big endian while SvStream defaults to little endian. Regression from: commit fb417ee082afdd2e80a1f48aa420bb8d5cb97686 Author: Khaled Hosny <khaled@aliftype.com> Date: Fri Sep 30 12:35:10 2022 +0200 vcl: Apply variations to font metrics Change-Id: I474ec2a76057baca93f350e23c3779985abdf9da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146611 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2023-02-07tdf#153083 writerfilter,sw: DOCX locale-dependent TOC \t style names, 3Michael Stahl
The import crashed on fdo85740-1.docx with an unhandled exception. This is because it mapped the TOC style "Table of Figures" from "table of figures", but the ApplyStyleSheetsImpl() actually uses the converted name "Drawing" instead, so "Table of Figures" didn't exist. (regression from commit ca71482237d31703454062b8b2f544a8bacd2831) It turns out that once that is fixed, the DOCX export needs to convert "Drawing" back to "Table of Figures" in the TOC field. Change-Id: I4858c79dd74154b229b7568610c0b8ba7b3e2b6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146610 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-07sw floattable: fix cid#1520800Miklos Vajna
Only SwFrame::GetLeaf() calls this, but it only does so when we're in an at-para anchored fly frame, so we can require that this succeeds. Change-Id: I6c99bc2ea1ab4f338a536272ccce13fd22b30246 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146612 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-07tdf#153083 writerfilter,sw: consolidate StyleName->StyleId in msfilterMichael Stahl
Turns out there was already a function MSWordStyles::CreateStyleId() doing the same thing as FilterChars(), presumably better. Change-Id: Idd0129c753841b86bd026e1300aa57a56721c89e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146609 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-07Resolves tdf#153127 - Separate book from other modes in print previewHeiko Tietze
Change-Id: I1573034b9df0f199f2b71e640051cad19fa6d220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146587 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-02-07Resolves tdf#148441 - Hide viewlayout in statusbar in preview modeHeiko Tietze
Change-Id: I255ad3b952d7b424e9ff0475798bbe0cfc57ef9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146004 Tested-by: Jenkins Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
2023-02-07sw: fix anchoring in SwFrame::GetNextFlyLeaf()Miklos Vajna
The core of this change is in SwFrame::GetNextFlyLeaf(), which used to assume that there is a next frame after the fly's anchor, but it's perfectly valid to not have such a frame. Instead if a fly is split, then also split its anchor, so effectively only the last follow of such anchor hosts content, all the others are empty and only serve as an anchor of a non-last member of a split fly frame chain. Once this anchoring is changed, adjustments are needed at other places, so a sample split fly frame (2 paragraphs, 1st para on first page, 2nd para on second page) is still layout out correctly: - SwAnchoredObject::FindAnchorCharFrame(): return the right follow text frame for follow flys. This is needed because flys have to be anchored to masters, and then this function can find the frame that's used for positioning. - SwFlyFrame::Format(): get the rectangle of the correct body frame, otherwise we would get the bottom of the 1st body frame instead of the 2nd body frame for the follow fly, leading to a negative height of the follow fly frame. - SwToContentAnchoredObjectPosition::CalcPosition(): position against the right follow text frame, similar to SwAnchoredObject::FindAnchorCharFrame(). - SwTextFrame::AdjustFollow_(): don't join a master with its follow if there is a split fly frame anchored in the master. The assumption is that first the fly has to be moved away, then we can do such a join. - Introduce a SwTextFrame::GetSplitFlyDrawObjs() to avoid copy&paste in SwTextFrame::AdjustFollow_() & SwTextFormatter::FormatLine(). With this, a sample split fly frame is split to two pages with correct anchors if SW_FORCE_FLY_SPLIT=1 is set. The anchor frame has duplicated text on the 1st and 2nd page still, though. Towards an initial working layout for multi-page fly frames. Change-Id: Ie99b13c2e318ec63f69c8a47bbc604771509e24a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146607 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-07Resolves: tdf#139934 always apply cellXfs xf explicits (tdf#123139 related)Eike Rathke
Change-Id: Id1e12ee8677a25a645bfd53b4968a17c9a1eabe5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146599 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2023-02-07sc: use try/finally to reset the changes in OptionsTreeDialogXisco Fauli
Otherwise it might affect other tests if it hits an assert Change-Id: I49c2b854d19a83ac32f78be32a77ad6e771b73ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146593 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-07sw: use try/finally to reset the changes in OptionsTreeDialogXisco Fauli
Otherwise it might affect other tests if it hits an assert Change-Id: Ic8e35f6f9f029ea6ae4620946edb69ca7a6618bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146591 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-02-07lok: don't pretty print html for onlineSzymon Kłos
followup for "lok: don't limit line length in HTMLWriter" Pretty printing makes html more readable for human but introduces lots of new line marks which are later interpreted in the client as a valid new lines in the document content. This was causing multiplying the line breaks when inserting hyperlinks where we read current selection's content and then we pass it back to the core as link's content (with added new lines). This change needs cypress change to not contain "\n" at the beginning of some content read from the document. This also afects copying from the online document to clipboard. Change-Id: I2b17d62398d947fcf1d3fb1ed6005c3063d114f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136893 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141479 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>