Commit graph

482871 commits

Author SHA1 Message Date
Noel Grandin
00e38f7744 XUnoTunnel->dynamic_cast in SwXLineBreak
Change-Id: Ic9d3683d33436658ff2360ca259c1e26d522122c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145882
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 16:34:28 +00:00
Caolán McNamara
13b2bd1006 rhbz#2162658 backtrace showing endlessly recursive ScInputWindow::Resize
Change-Id: I2d10fd1ebfb1c25cf213ebb68e7d34e39fadde13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145894
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 16:18:24 +00:00
Caolán McNamara
e280cf69d5 don't crash with --disable-pdfium
Change-Id: I946e62d70b937d27b2f1258acc643fdaa5bee23d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145890
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 16:17:56 +00:00
Stephan Bergmann
3816e7b857 Base SwXBodyText on WeakImplHepler
...rather than on the deprecated WeakAggImplHelper2.

It was found that that class was implementing queryInterface in a way that is
incompatible with the XAggregation protocol inherited via WeakAggImplHelper2.
It looks like no code actually made use of the XAggregation offered by this
class, so the easiest fix for this queryInterface implementation appears to
switch from WeakAggImplHelper2 to WeakImplHelper (thereby dropping XAggregation,
and thus rendering the existing queryInterface implementation OK).

Change-Id: Ia66e1d8f89740752d8ed69f0e17b75fa2c470f41
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145893
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-20 14:39:30 +00:00
Stephan Bergmann
30af50006f Base SwXShapeBaseClass on WeakImplHelper
...rather than on the deprecated WeakAggImplHelper6.

The two classes SwXShape and SwXGroupShape, both deriving from
SwXShapeBaseClass, had been found to implement their respective queryInterface
in a way that is incompatible with the XAggregation protocol inherited via
WeakAggImplHelper6.  It looks like no code actually made use of the XAggregation
offered by this class hierarchy, so the easiest fix for those queryInterface
implementations appears to switch from WeakAggImplHelper6 to WeakImplHelper
(thereby dropping XAggregation, and thus rendering the existing queryInterface
implementations OK).

Change-Id: I47dd177db7f3ddbd53482c3b4c194b6e7f15f69c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145892
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-20 14:36:57 +00:00
Stephan Bergmann
8be6e5dcba Base GraphicDescriptor on OWeakObject
...rather than on the legacy OWeakAggObject.

It was found that e.g. Graphic, deriving from GraphicDescriptor, was
implementing queryInterface in a way that is incompatible with XAggregation
protocol inherited via OWeakAggObject.  It looks like no code actually made use
of the XAggregation offered by this class hierarchy, so the easiest fix for that
queryInterface implementation appears to switch from OWeakAggObject to
OWeakObject.

Change-Id: I54514db32b731b9fa83831a1071da6f665fdf25e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145891
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-20 14:34:40 +00:00
Miklos Vajna
44c75d56cd sw HTML import: initial CSS support on tables
This is the import side of commit
6ce374140f (sw XHTML export: use CSS
instead of <center> for tables, 2023-01-19), otherwise the import would
not handle the new markup of the export.

Change-Id: I7d18b06e10adff877dbbf1745861c65a07f807cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145863
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-01-20 13:40:22 +00:00
Noel Grandin
349844128c XUnoTunnel->dynamic_cast in SwXDocumentIndex
Change-Id: Ie1196623d345e20eaaaadf8bb8b4a4db72bf77e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145881
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 13:30:18 +00:00
Noel Grandin
730ce18b6a XUnoTunnel->dynamic_cast in SwXDocumentIndexMark
Change-Id: I8453d08e0fc77019481b08fd508aa97790a06d8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145880
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 13:30:10 +00:00
Noel Grandin
32c8b03f61 improve loplugin:refcounting
to catch places where we are converting a weak reference to a strong
reference, and then using a pointer to store the result

Change-Id: I69b132907b574e5c6974fadf18bd9658107d3a0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145877
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 12:58:40 +00:00
Miklos Vajna
a5a1ea2f7d sw: add a new .uno:DeleteSections UNO command
This is similiar to commit 1d6593dd79 (sw:
add a new .uno:DeleteFields UNO command, 2023-01-16), but that deleted
refmarks (used for e.g. Zotero citations), while this deletes sections
(used for e.g. Zotero bibliography).

Implement the section "unlinking" (delete the section, but not its data)
by deleting the section format: that will remove the matching section
node as well, but not the content nodes.

Change-Id: Ib00a8f592ddbb77c5e8e08ff94bb0eebfcf7cea8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145870
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-01-20 12:41:19 +00:00
Caolán McNamara
675a3e3d54 std::abort() during CppunitTest_sw_layoutwriter
seen in fedora distro build. Probably since:

commit 4170b94c44
Date:   Tue Nov 8 18:27:05 2022 +0100

    SwModelTestBase: inherit from UnoApiXmlTest

See original discussion in https://gerrit.libreoffice.org/c/core/+/142465

use an alternative approach to solve this

[_RUN_____] testTdf143239::TestBody
Fatal exception: Signal 6
Stack:
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libuno_sal.so.3(+0x48bd8)[0xffff95428bd8]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libuno_sal.so.3(+0x4fd8c)[0xffff9542fd8c]
linux-vdso.so.1(__kernel_rt_sigreturn+0x0)[0xffff955247fc]
/lib64/libc.so.6(+0x8d568)[0xffff94f2d568]
/lib64/libc.so.6(gsignal+0x20)[0xffff94ee3e80]
/lib64/libc.so.6(abort+0xf4)[0xffff94ed0284]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN3psp16PrintFontManager10SubstituteERN3vcl4font17FontSelectPatternERN3rtl8OUStringE+0xbc4)[0xffff91980de4]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(+0x891ea8)[0xffff91981ea8]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK3vcl4font22PhysicalFontCollection20GetGlyphFallbackFontERNS0_17FontSelectPatternEP19LogicalFontInstanceRN3rtl8OUStringEi+0xd0)[0xffff9186a7c0]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice10ImplLayoutERKN3rtl8OUStringEiiRK5Pointl13KernArraySpanN4o3tl4spanIKhEE14SalLayoutFlagsPKN3vcl4text15TextLayoutCacheEPK15SalLayoutGlyphs+0x112c)[0xffff915be0c0]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice12GetTextArrayERKN3rtl8OUStringEP9KernArrayiibPKN3vcl4text15TextLayoutCacheEPK15SalLayoutGlyphs+0x2c4)[0xffff915bf2b8]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN18ImplFontMetricData20ImplInitTextLineSizeEPK12OutputDevice+0x74)[0xffff91873da4]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice11ImplNewFontEv+0x1c8)[0xffff915b7318]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(+0x4c5f70)[0xffff915b5f70]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice14GetFontCharMapERN5tools5SvRefI11FontCharMapEE+0x34)[0xffff915b9004]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZNK12OutputDevice9HasGlyphsERKN3vcl4FontESt17basic_string_viewIDsSt11char_traitsIDsEEii+0x90)[0xffff915b9300]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libsvtlo.so(+0xff560)[0xffff8cadf560]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libsvtlo.so(_ZN11FontNameBox12CachePreviewEmP5Point+0x288)[0xffff8cae0168]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libsvtlo.so(+0x100448)[0xffff8cae0448]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN9Scheduler22CallbackTaskSchedulingEv+0x30c)[0xffff917b050c]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN14SvpSalInstance12CheckTimeoutEb+0x140)[0xffff919790a0]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN14SvpSalInstance9ImplYieldEbb+0x98)[0xffff91979818]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN14SvpSalInstance7DoYieldEbb+0xe0)[0xffff91979b70]
/builddir/build/BUILD/libreoffice-7.5.0.2/instdir/program/libvcllo.so(_ZN9Scheduler19ProcessEventsToIdleEv+0x40)[0xffff917bac84]
/builddir/build/BUILD/libreoffice-7.5.0.2/workdir/LinkTarget/CppunitTest/libtest_sw_layoutwriter.so(+0x5520c)[0xffff8d87520c]
/lib64/libcppunit-1.15.so.1(+0x1e4dc)[0xffff9549e4dc]
/builddir/build/BUILD/libreoffice-7.5.0.2/workdir/LinkTarget/Library/unoexceptionprotector.so(+0x107ec)[0xffff94e107ec]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit16DefaultProtector7protectERKNS_7FunctorERKNS_16ProtectorContextE+0x3c)[0xffff9549e1cc]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit14ProtectorChain7protectERKNS_7FunctorERKNS_16ProtectorContextE+0x320)[0xffff954969f4]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit10TestResult7protectERKNS_7FunctorEPNS_4TestERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x80)[0xffff954a06d0]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit8TestCase3runEPNS_10TestResultE+0x11c)[0xffff954a993c]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit13TestComposite15doRunChildTestsEPNS_10TestResultE+0xe0)[0xffff9549e980]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit13TestComposite3runEPNS_10TestResultE+0x58)[0xffff9549e6a8]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit13TestComposite15doRunChildTestsEPNS_10TestResultE+0xe0)[0xffff9549e980]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit13TestComposite3runEPNS_10TestResultE+0x58)[0xffff9549e6a8]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit10TestResult7runTestEPNS_4TestE+0x38)[0xffff9549f5a8]
/lib64/libcppunit-1.15.so.1(_ZN7CppUnit10TestRunner3runERNS_10TestResultERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x70)[0xffff954a6b70]
/builddir/build/BUILD/libreoffice-7.5.0.2/workdir/LinkTarget/Executable/cppunittester(+0x1443c)[0xaaaac255443c]
/builddir/build/BUILD/libreoffice-7.5.0.2/workdir/LinkTarget/Executable/cppunittester(+0x15390)[0xaaaac2555390]
/builddir/build/BUILD/libreoffice-7.5.0.2/workdir/LinkTarget/Executable/cppunittester(+0x10a38)[0xaaaac2550a38]
/lib64/libc.so.6(+0x30588)[0xffff94ed0588]
/lib64/libc.so.6(__libc_start_main+0x9c)[0xffff94ed0660]
/builddir/build/BUILD/libreoffice-7.5.0.2/workdir/LinkTarget/Executable/cppunittester(+0x10ab0)[0xaaaac2550ab0]
which: no gdb in (/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/lib/jvm/java-17-openjdk-17.0.6.0.9-0.2.ea.fc38.aarch64/bin)
You need gdb in your path to show backtraces
Error: a unit test failed, please do one of:
make CppunitTest_sw_layoutwriter CPPUNITTRACE="gdb --args"
    # for interactive debugging on Linux
make CppunitTest_sw_layoutwriter VALGRIND=memcheck
    # for memory checking
make CppunitTest_sw_layoutwriter DEBUGCPPUNIT=TRUE
    # for exception catching
You can limit the execution to just one particular test by:

Change-Id: Ife968c5d1d49081b1d28d50a557bc90d59980fc0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145874
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 12:33:13 +00:00
Caolán McNamara
20b64cf151 ofz#54685 Timeout
Change-Id: I2f71f61c371055521c884a00dde48a811d204df1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145875
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 12:32:14 +00:00
Caolán McNamara
6e19fdb771 Resolves: tdf#153116 null-ptr-deref in get-surrounding-text
#0  SwFrame::IsTextFrame() const (this=0x0) at sw/source/core/inc/frame.hxx:1236
 #1  0x00007fffa8dcb865 in sw::FrameContainsNode(SwContentFrame const&, o3tl::strong_int<int, Tag_SwNodeOffset>) (rFrame=..., nNodeIndex=...) at sw/source/core/text/txtfrm.cxx:292
 #2  0x00007fffa82c9fd4 in SwCursorShell::GetSelText() const (this=0x5509470) at sw/source/core/crsr/crsrsh.cxx:2565
 #3  0x00007fffa89017f0 in SwEditShell::GetSelectedText(rtl::OUString&, ParaBreakType) (this=0x5509470, rBuf="", nHndlParaBrk=ParaBreakType::ToOnlyCR)
     at sw/source/core/edit/edglss.cxx:264
 #4  0x00007fffa97e19a7 in SwEditWin::GetSurroundingText() const (this=0x4f1a9f0) at sw/source/uibase/docvw/edtwin.cxx:6628
 #5  0x00007fffee27cf02 in ImplHandleSurroundingTextRequest(vcl::Window*, rtl::OUString&, Selection&) (pWindow=0x1fe43f0, rText="", rSelRange=...) at vcl/source/window/winproc.cxx:2544
 #6  0x00007fffee27adf7 in ImplHandleSalSurroundingTextRequest(vcl::Window*, SalSurroundingTextRequestEvent*) (pWindow=0x1fe43f0, pEvt=0x7fffffffb970)
     at vcl/source/window/winproc.cxx:2555
 #7  0x00007fffee276ed6 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x1fe43f0, nEvent=SalEvent::SurroundingTextRequest, pEvent=0x7fffffffb970)
     at vcl/source/window/winproc.cxx:2884
 #8  0x00007fffe6ee3080 in SalFrame::CallCallback(SalEvent, void const*) const (this=0x1898310, nEvent=SalEvent::SurroundingTextRequest, pEvent=0x7fffffffb970) at vcl/inc/salframe.hxx:306

Change-Id: I7330865b5dda7766a6da08f57a7dd8dd1a09d198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145872
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 12:31:46 +00:00
Caolán McNamara
6d8b48d63c ofz#54895 Out-of-memory
Change-Id: I2faf68d8ed56e7d2b44bc7cae953716ea6dd7172
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145878
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 12:31:25 +00:00
ektagoel12
841ab19fb3 tdf#147906 Use std::hypot for Pythagorean addition
Change-Id: I4b16fc7daff2f85ae60666e512636634f7d6eb19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145822
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Hossein <hossein@libreoffice.org>
2023-01-20 12:04:30 +00:00
Caolán McNamara
bb3ddcf7ae change test to use Calibri instead of Cambria
because of the Caladea problem

There are sadly now two Caladea fonts with different metrics, see:
 https://bugzilla.redhat.com/show_bug.cgi?id=2162532
 https://github.com/huertatipografica/Caladea/issues/4

Change-Id: I7080d16ec8aae2bbe60717aea85b980a33340e9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145830
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 10:47:41 +00:00
Mike Kaganski
dc2ad435cd tdf#153094: it seems that DOC requires WW8_RESERVED_SLOTS = 15
Regression from commit a2a08463e0,
where I mistakenly assumed that the value is just to accommodate
enough entries. I don't know where it's documented, but this
fixes the bug.

Change-Id: Ifecf5d294222e3a40cb23f7c147694dbdf35e405
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145869
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-20 10:45:24 +00:00
Stephan Bergmann
16f59f4b2b Fix SbaXGridControl queryAggregation
The base UnoControl uses WeakAggImplHelper9, so (for better or worse) derives
from XAggregation, but SbaXGridControl failed to properly implement the
XAggregation protocol.

Change-Id: I26c825b9b64b4e886e69f95bc3d4d5d42120bd8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145865
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-20 10:16:32 +00:00
Stephan Bergmann
53a809ac9c Fix TableColumn/-Row queryAggregation
The base FastPropertySet uses WeakAggImplHelper3, so (for better or worse)
derives from XAggregation, but SbaXGridControl failed to properly implement the
XAggregation protocol.

Change-Id: I31378f13256b1fa20775890b206f455d782ea864
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145868
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-20 10:14:13 +00:00
Stephan Bergmann
f2cff6567b Base Im-/ExportDocumentHandler on WeakImplHelper
...rather than on the deprecated WeakAggImplHelper3.

It was found that those two classes were implementing queryInterface in a way
that is incompatible with the XAggregation protocol inherited via
WeakAggImplHelper3.  It looks like no code actually made use of the XAggregation
offered by these classes, so the easiest fix for those queryInterface
implementations appears to switch from WeakAggImplHelper3 to WeakImplHelper
(thereby dropping XAggregation, and thus rendering the existing queryInterface
implementations OK).

Change-Id: I8f841ca959838d9a87943091b76f3ce1cf8c9303
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145866
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-20 10:08:45 +00:00
Stephan Bergmann
f05061f912 Base CellRange on WeakImplHelper
...rather than on the deprecated WeakAggImplHelper1.

It was found that that class was implementing queryInterface in a way that is
incompatible with the XAggregation protocol inherited via WeakAggImplHelper1.
It looks like no code actually made use of the XAggregation offered by this
class, so the easiest fix for this queryInterface implementation appears to
switch from WeakAggImplHelper1 to WeakImplHelper (thereby dropping XAggregation,
and thus rendering the existing queryInterface implementation OK).

Change-Id: I2352f5a57f2e23e6c7d512ef4d850844149269c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145867
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-20 09:58:27 +00:00
Gülşah Köse
48e8490784 Hide fill Attribute widget if fill style is none
When Fill style is none we can not use fill attribute element. So It is
better to hide.

Change-Id: I88d5e49448040b3afa18fbf66377d254716e7415
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145817
Tested-by: Jenkins
Tested-by: Pedro Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Silva <pedro.silva@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-20 09:51:23 +00:00
Noel Grandin
b70eee2d39 tdf#150819 crash after a few paste and undo
regression from
    commit 3a02b5f8aa
    Author: Noel Grandin <noelgrandin@gmail.com>
    Date:   Tue Aug 16 18:44:31 2022 +0200
    convert more nNode to SwPosition::GetNode

Change-Id: I636590ec5eb28f0db3640464a49f0ab5582ff853
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145864
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 09:32:23 +00:00
Caolán McNamara
231ad90b59 tdf#149412 gtk3: show all selected rows in dnd icon
otherwise it looks like only one row is getting moved

Change-Id: Ie0b63a9c3cea377c3753785d9c6f7958cbc7ac1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145818
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 08:53:53 +00:00
Caolán McNamara
bf052b03d2 add a warning about Caladea versions/variants with different metrics
Change-Id: Id8c2679b2b9984f1fa7a133c40e8536cded12c64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145829
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-20 08:53:34 +00:00
Noel Grandin
500a3b85a6 XUnoTunnel->dynamic_cast in SwXFlatParagraph
Change-Id: I6bbe75ae26d5411d2d032311e8877632b1e4d850
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145862
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 08:46:13 +00:00
Noel Grandin
468a50db51 XUnoTunnel->dynamic_cast in SwXTextField
Change-Id: I31dcd7a498e2742c49d98e5626f10aa7dcafa8f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145861
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 08:46:05 +00:00
Noel Grandin
54d12f7b1f XUnoTunnel->dynamic_cast in SwXFieldMaster
Change-Id: I85f4ffab71b8321cc592e3b70fec63111bbd78ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145860
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 08:45:58 +00:00
Noel Grandin
080b78ea0c XUnoTunnel->dynamic_cast in SwXContentControl
Change-Id: I4513cc38b31062327a773afd91dd3b4ee98c1bcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145859
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 08:45:50 +00:00
Noel Grandin
048dd914c2 XUnoTunnel->dynamic_cast in SwXBookmark
Change-Id: Iaf544314d0c47209b254c3bb40d35c03e6556f5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145858
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 08:20:29 +00:00
Noel Grandin
635448a996 XUnoTunnel->dynamic_cast in SwXTextRange
Change-Id: I87e635f371278132be9da4e6a60ba90180d25522
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145857
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 08:20:20 +00:00
Attila Szűcs
f9d6dd788e tdf#148000 impress: Handle linebreaks on fontwork.
Split text lines in a paragraph, right before polygons are created
for rendering, so eol will brake line in fontwork just like eop.

Change-Id: Ie9e6764f9f91c2e19afd43dc9a212bd18c41c99d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145425
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-20 07:56:29 +00:00
Miklos Vajna
14da39fcff tdf#153047 sw: fix PDF export of content controls in placeholder mode
Importing an inline content control from DOCX used to be just plain text
in Writer, so the PDF export of that was also just plain text.

Now that content controls are actually supported, we used to not emit
them as plain text in the PDF export, since
82d90529dc (sw content controls, rich
text: add initial PDF export, 2022-09-12). Part of this was to write the
string value of the content control as the /V (value) key of the form,
when it's not in placeholder mode. This made sure that once the form is
filled in, no overlap between the plain text and the filled in text
happens.

Try to support both use-cases at the same time by also mapping the value
of the content control to /V, even if it's in placeholder mode. This
keeps avoiding the unwanted overlap, but this way the placeholder text
is no longer lost on PDF export.

An alternative would have been to map the placeholder text to
description when the alias/title is empty, but that would show up only
as a mouse tooltip, so won't change the behavior when the PDF is
printed.

Change-Id: I9408b5abe36af28cd00845a74a3dfff13973b83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145828
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-01-20 07:50:29 +00:00
Noel Grandin
4c06cfcd13 [API CHANGE] no need to load PresentationFactoryProvider via UNO and/or config
there is no benefit to having this constructed in such a convoluted
manner

Change-Id: Ib02b4bfe689326784bd8233003d10960700811d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145778
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-20 06:26:48 +00:00
Justin Luth
d2cd7097ab NFC writerfilter: avoid unnecessary code processing
Early return on useless parameter,
and conditional processing on missing ID.

Change-Id: Iecf2d7522bd0c1e958f826214368966399be311c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145831
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-20 03:06:17 +00:00
Jim Raykowski
1c638b7ac4 tdf#149073 SwNavigator: provide an indication for linked images
Sets an image for image content entries that are of linked type

Function 'InsertContent' added to replace duplicated code that
inserts content.

Change-Id: I25dec3f5765fa3dffe505743cd9c5fe044349ab0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145530
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2023-01-20 01:10:19 +00:00
Justin Luth
85ae3d1513 tdf#141649 doc import: do not duplicate conditional text
This patch is a mixed blessing.
It will be a regression if an IF FIELD was bogus,
and the user only wanted to see the modified, unrefreshed text.

That is because in MS Word, most fields do not update automatically,
but require the user to press F9 to refresh the contents.
The contents are also editable, so the result might not match
either the true or false result-string.

However, in LO the IF FIELD is always refreshed, and thus will
never display any bogus hand-modifications.

The import of these IF fields started in DOC in LO 6.1,
but it was never correct and immediately duplicated content.
Additionally, DOC format didn't export at all, so anything
to do with IF FIELDS was lost - meaning that after a round-trip
the result was the same as what MS Word last saw with the field gone.

So in the eyes of the user, the fixing of import and export
might be causing a regression of changed text.
So be it.

I can only assume that in most cases the use of an IF FIELD
is intentional and that it would be desirsable to have it working.

Change-Id: If90f6f4cddcefebf379352aac6519595c1bf2b23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145821
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2023-01-19 23:57:28 +00:00
Andreas Heinisch
a29ec09f7c tdf#135938 - Search for "insert reference" tree entry
Instead of assuming that the "insert reference" entry is always the second item of the menu tree, search for the correct child in the tree list. This commit addresses the failing build from https://gerrit.libreoffice.org/c/core/+/140985.

Change-Id: I6f0d7021ab6f632784cab85656823c69f90baf60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145816
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2023-01-19 22:57:59 +00:00
Chenxiong Qi
9753aa4a77 tdf#143123 Port some Spreadsheet Java examples to Python
Some examples inside odk/examples/java/Spreadsheet are ported to
Python:

ChartTypeChange.java    -> ChartTypeChange.py
EuroAdaption.java       -> EuroAdaption.py
SCalc.java              -> SCalc.py

Code format is checked with 'pycodestyle':

    pycodestyle --ignore=E501,E722 odk/examples/python/Spreadsheet/*.py

Signed-off-by: Chenxiong Qi <qcxhome@gmail.com>
Change-Id: If0631b5970faab6499cfea3eef559e003fad24d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143810
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-01-19 21:39:01 +00:00
Noel Grandin
8d68c4e24e XUnoTunnel->dynamic_cast in SwXTextRanges
Change-Id: I12565dcdd1437c461762688ed3bf0e1adad828ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145827
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19 20:31:25 +00:00
Caolán McNamara
6ef1b38885 Resolves: tdf#153091 support text/plain without encoding from nedit
Change-Id: I56dfc6dfec21b8c57b6f402c53b0229a2a2e7778
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145824
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-19 19:39:53 +00:00
Michael Stahl
959f64dbb8 sw: crashtesting forum-mso-en-12641.docx, fix assert in FindFieldSep
The fieldmark may overlap a section; at the start was considered here,
but at the end was not and so the assertion wrongly fired.

Change-Id: I118bc36c2d9c4ca7028a583278d0f193537c4cb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145826
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-01-19 19:06:26 +00:00
Stephan Bergmann
c83ec45d7d Base AccessibleGridControlBase on WeakComponentImplHelper
...rather than on the deprecated WeakAggComponentImplHelper4.

It was found that e.g. GridControlAccessibleElement, deriving from
AccessibleGridControlBase, was implementing queryInterface in a way that is
incompatible with the XAggregation protocol inherited via
WeakAggComponentImplHelper4.  It looks like no code actually made use of the
XAggregation offered by this class hierarchy, so the easiest fix for that
queryInterface implementation appears to switch from
WeakAggComponentImplHelper4 to WeakComponentImplHelper (thereby dropping
XAggregation, and thus rendering the existing queryInterface implementation OK).

Change-Id: Ia7f033d0a93e78a48573cb489dc5542603c35b8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145793
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-19 18:40:14 +00:00
Noel Grandin
7d2bee35c4 XUnoTunnel->dynamic_cast in SwXTextTable
Change-Id: I18c229f31738707e4a379c9379425141ba4dc690
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145787
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19 17:56:25 +00:00
Noel Grandin
0c25ccbd0e XUnoTunnel->dynamic_cast in SwXCellRange
Change-Id: Ib2ffd8a58eb696dfa845a08f6d05fd9898ff7db8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145785
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19 17:56:13 +00:00
Noel Grandin
bc87e206f4 XUnoTunnel->dynamic_cast in SwXTextSearch
Change-Id: Id9d80bac06377018eaf768bdbd68e98b1de0666b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145782
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19 17:56:04 +00:00
Noel Grandin
9ebf0023e6 XUnoTunnel->dynamic_cast in SwXNumberingRules
Change-Id: If22cf501522115ebd87dee8580831750ea8bbbd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145781
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19 17:55:53 +00:00
Noel Grandin
70eb1c9838 XUnoTunnel->dynamic_cast in SwXParagraph
Change-Id: Ib39e51900826b13824906c33775a8aa375955fcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145780
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19 17:55:44 +00:00
Noel Grandin
bbe9d53fab storing WeakReference in std::set is a bad idea
because if we allocate two things in the same location, we can subtlely
lose the second one.

Change-Id: I4dda5c738802da8544d280c020e059da63b5d71c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145779
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19 17:55:31 +00:00