If the paragraph marker is formatted as Uppercase,
then Uppercase is applied to that line's numbering as well.
However, if the marker is formatted as SmallCaps,
it MUST NOT be applied for MSO formats.
Apparently MSO only supports Uppercase and SmallCaps,
not Lowercase or Titlease.
I don't like these adhoc exceptions, so I didn't
attempt to apply them to ODF formats.
Let's keep it simple for ODF - any char format that applies
to the entire paragraph should apply to numbering as well
(except for the existing underline/overline exceptions).
- if you don't like that char attributes apply at all, blame MSO.
- if you don't like that DOCX is missing your goofy formatting,
blame MSO for being inconsistent.
ooxmlexport12's tdf143384_tableInFoot_negativeMargins.docx
is almost interesting because it applies superscript
and small caps. However, the list is already uppercase,
so it can't be used for the test.
make CppunitTest_sw_ooxmlexport21 \
CPPUNIT_TEST_NAME=testTdf43767_caseMapNumbering
Change-Id: I273baebc996adfd001e1c591dbb9aef9272a42f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169476
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
“In Dutch (in Belgium as in the Netherlands), when you type "'s"
or "'t" in sentences like: "Ik ben 's morgens opgestaan", the
apostrophe is changed into an opening quote by the autocorrect
feature, which is incorrect and requires a manual correction.”
The bug reported with the suggested AutoCorrect extension
by Pierre François. The difference here is always to use the
de facto standard typographic apostrophe in the replacement.
Change-Id: I2ede612f72145abcca2bc1477ffae3cabc9e5641
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169645
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Starting with commit 81994cb2b8,
pixels now contain an alpha value instead of a transparency
value.
Change-Id: I07dd39859057bbbbd153a21ee38625049039b106
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169654
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Follow-up to commit Ic8a8ab3f6dfb7367ecd2c619ce888bf77abef460
"tdf#132557: PPTX import: Workaround for slide footer shape presets"
note:
This is a workaround because there is no custom shape support for
placeholder shapes in LibreOffice.
Change-Id: Iefb9d97e0eb10a04c39b515b11e549aeb7be8f25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169626
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
Tested-by: Jenkins
Don't change Greek sigma with final sigma, if the sigma is
followed by an apostrophe, which means removed word part (vowel)
here.
Follow-up to commit 5ecc0cad3f
"tdf#116387 Autocorrect greek character σ (sigma) to ς (final sigma)".
Change-Id: I6b7045502c04993cbad92f21f96ca5799abd1fd5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169637
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
This commit removes the gb_DotnetLibrary__ensure_absolute gbuild
function that was breaking out-of-source directory builds.
Code using that function was changed to accept already absolute paths
as arguments.
Change-Id: I6d9d3dac33e296cf0e69910f16564d822047857e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169353
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
dependency for XLOOKUP and XMATCH because of better compatibility.
The idea is to specify, that the global setting 'search-criteria-must-apply-to-whole-cell'
is ignored and XMATCH and XLOOKUP always behaves as if 'search-criteria-must-apply-to-whole-cell'=true.
That would affect exact search in Match_mode value 0. Users would need to use wildcard or regex
to get a match to part of the content. But removing dependency to the global setting increases
interoperability with MS Excel.
Also the ODF TC will follow that in the final specification of these functions:
https://issues.oasis-open.org/browse/OFFICE-4154
Follow-up commit: 17d578ba91
(Related: tdf#127293 Add new Match_mode option for XLOOKUP and XMATCH functions.)
Change-Id: I1317865631d2925eaff72e9c1425d93386c3d016
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169582
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Tested-by: Jenkins
testAnnotationUpdate is not specific, so rename the test name to
testAnnotationPositionUpdate.
Change-Id: I1608025143455ad789cf2cce84b80e8b8b6b2e34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169641
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
Check if the hyperlink have missing name and add a fix button
to fix the warning.
Change-Id: I3a69490aa81cf0ed9d0edb04eaa3401e4b47eb7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169508
Tested-by: Jenkins
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Fix word breaking rules also for editing. Previously
the word was selected with the following narrow no-break
space, e.g. at French words before exclamation and question
marks (where narrow no-break space allows to get correct
typography, if the OpenType/Graphite font doesn't have
this feature).
Add this and the previous fixes for Hungarian, which
handled by extra word-breaking rule files.
Follow-up to commit 6e002da161
"tdf#161737 i18npool: fix fake spelling alarms with NNBSP".
Change-Id: I7230bd356e5f0360172b652e615a61d96131d336
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169624
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Fix word break by excluding narrow no-break space at the
end of the words for spell checking.
This was a problem e.g. for French, where (automatically? or
manually) inserted narrow no-break space is used to get correct
typography before exclamation and question marks, also after and
before guillemets, if the OpenType/Graphite font doesn't have this
feature).
Regression from commit 44699b3de3
"tdf#49885 BreakIterator rule upgrades".
Note: this fixes also the problem, when digits separated
by NNBSP thousand separator weren't handled by spell checking,
alarming fake spelling mistakes, when "Check words with numbers"
was enabled in Tools->Options->Languages and Locales->Writing Aids.
(TODO: at the case of thousand separators, remove NBSP by the
linguistic module or by the spell checking dictionaries to allow
to check numbers with thousand separators and with correct suffix.)
Change-Id: I36e10add7e0ba840f207a375ccc8668dbfef9572
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169618
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
This removes the mpContext member variable from ImpGraph, which
also make {Get,Set}ReaderContext on Graphic obsolete and is also
removed. GraphicFilter and other code is adjusted and simplified.
Change-Id: Icd1927d7b1bd4624b523d0f49a4343911ec6cd0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165214
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Partial fix of this problem.
The tiled image is a single pixel big, so we can do a solid color fill.
Ideally vcl needs to pass the operation down to skia/cairo and let those
layers do the tiling.
Change-Id: Ifcb1d1a71f0b23b772bbacf1b1e2b15ea315f578
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169619
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Similar to the straight (typewriter or ASCII) apostrophe, straight
double quotation mark (") matches its typographic variants now,
like other word processors do.
Note: regex search doesn't use this matching, similar to the apostrophe
search.
Follow-up to commit d40f2d02df
"tdf#117643 Writer: fix apostrophe search regression".
Change-Id: If6a3ee00750828583cd0cfc4aa7f7b656ea9bd1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169605
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
Open the DOCX bugdoc from
<https://bugs.documentfoundation.org/show_bug.cgi?id=161652#c6>,
select-all, copy, open a second document, paste as RTF, paste as RTF
again, the number of char styles in the document change from 27 to 55,
then to 73. That is surprising, paragraph styles work by first creating
them then a 2nd paste just refers to them.
It seems what happens is that paragraph styles are handled in
StyleSheetTable::ApplyStyleSheetsImpl(), and we have an explicit "When
pasting, don't update existing styles" code there; on the other hand
ListDef::GetStyleName() solves the style name collision by appending
enough "a" characters at the end of the style name till there is no
collision.
Fix the inconsistency by adapting the list style behavior to match what
paragraph styles do: if we don't open an RTF file but paste into an
existing document, then try to use the existing style on collision.
Fixing this on the RTF producing side would be less effective, also one
could argue that in case a numbering uses e.g. 3 levels, then it still
makes sense to emit the definition for all levels to help the editor
once numbering levels are increased in the pasted content.
Change-Id: Ia211cb4300c3c41dae8c815ddfaf30cc2f0de8b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169609
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Add an UNO command which closes the documents and also prompts the user to save while
closing unsaved documents.
This command also open the start center after all the documents are successfully closed.
Change-Id: I9c502cfa2e550c6f60fa8867fb42e36aded65999
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166041
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Building with --without-system-libxml fails with
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPScanProxy'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPClose'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPReturnCode'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPRead'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPCleanup'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPMethod'
/usr/bin/ld: /home/xisco/libreoffice/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so: undefined reference to `xmlNanoHTTPInit'
collect2: error: ld returned 1 exit status
so use --without-www in external/redland/ExternalProject_raptor.mk
since it seems no to be used by raptor.
Libxml2 disabled http support by default in
3018842c07
Downloaded from https://download.gnome.org/sources/libxml2/2.13/libxml2-2.13.1.tar.xz
Kudos to Michael Weghorn for helping me with this patch
Change-Id: I2e41021e8aea3551eb9eec29cf12f6cd9f6ff89e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169327
Reviewed-by: Taichi Haradaguchi <20001722@ymail.ne.jp>
Tested-by: Jenkins
when we have a lot of shapes, the number of listeners attached to
SdrModel becomes a serious bottleneck because of the number of
broadcast/notify function calls.
But SvxTextEditSourceImpl can just as well listen to the SdrObject,
which achieves the same end, and reduces the bottleneck on the SdrModel.
We do have to adjust some of the broadcast sites to broadcast the
event to the SdrObject listeners as well as the SdrModel listeners.
Possibly as another change we can remove the broadcasting to the
SdrModel listeners.
This shaves 10% off the load time of a large DOCX with lots of shapes.
Noting that we do no need to listen to SdrHintKind::ModelCleared because
we will get called via SvxTextEditSourceImpl::ObjectInDestruction when
the model is destroyed.
Change-Id: I3f7f6aa2a2146e4c4f59c974aa3fed92becf5eca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169565
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
After
commit daed96f081
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Jun 19 13:08:34 2024 +0200
tdf#159835 sfx2: Keep sidebar menu up to date
, starting LO Writer with the gtk4 VCL plugin resulted
in a crash (backtrace below) due to the current menu
implementation for the gtk4 VCL plugin being
incomplete/broken.
For now, until the underlying issue has been fixed,
at least avoid crashing by skipping the menu update
when using gtk4.
This effectively reverts back to the old behavior
for gtk4, where before the above commit,
`mxMenuButton->get_active()` in `TabBar::OnToolboxClicked`
would always return false when clicking the menu button
in the sidebar, so the code path triggering the crash
wouldn't be hit, thus not triggering the
pre-existing underlying issue.
Backtrace of the crash:
Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
0x00007fffe9d25afe in g_atomic_ref_count_inc () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#0 0x00007fffe9d25afe in g_atomic_ref_count_inc () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1 0x00007fffe9cfb3b6 in g_hash_table_ref () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fffe90ff92e in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#3 0x00007fffe90feaf4 in () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#4 0x00007fffe90fef2c in g_menu_model_get_item_attribute () at /lib/x86_64-linux-gnu/libgio-2.0.so.0
#5 0x00007fffe44fd500 in (anonymous namespace)::MenuHelper::get_item_id(int) const (this=0x55555c78dbf0, pos=0) at vcl/unx/gtk4/../gtk3/gtkinst.cxx:5748
#6 0x00007fffe44fc976 in (anonymous namespace)::GtkInstanceMenu::get_id(int) const (this=0x55555c78dbf0, pos=0) at vcl/unx/gtk4/../gtk3/gtkinst.cxx:11711
#7 0x00007fffe44fcd40 in virtual thunk to (anonymous namespace)::GtkInstanceMenu::get_id(int) const () at vcl/unx/gtk4/../gtk3/gtkinst.cxx:11745
#8 0x00007ffff3fae52b in sfx2::sidebar::TabBar::UpdateMenus() (this=0x55555c7ce530) at .../libreoffice/sfx2/source/sidebar/TabBar.cxx:342
#9 0x00007ffff3faf86a in sfx2::sidebar::TabBar::TabBar(vcl::Window*, com::sun:⭐:uno::Reference<com::sun:⭐:frame::XFrame> const&, std::function<void (rtl::OUString const&)>, std::function<void (weld::Menu&, weld::Menu&)>, sfx2::sidebar::SidebarController&) (this=0x55555c7ce530, pParentWindow=0x55555c62cea0, rxFrame=..., aDeckActivationFunctor=..., aPopupMenuSignalConnectFunction=..., rParentSidebarController=...) at .../libreoffice/sfx2/source/sidebar/TabBar.cxx:76
#10 0x00007ffff3f1c84d in VclPtr<sfx2::sidebar::TabBar>::Create<VclPtr<sfx2::sidebar::SidebarDockingWindow>&, com::sun:⭐:uno::Reference<com::sun:⭐:frame::XFrame>&, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3, sfx2::sidebar::SidebarController::$_3(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_4, sfx2::sidebar::SidebarController&>(VclPtr<sfx2::sidebar::SidebarDockingWindow>&, com::sun:⭐:uno::Reference<com::sun:⭐:frame::XFrame>&, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&&, sfx2::sidebar::SidebarController::$_3(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_4&&, sfx2::sidebar::SidebarController&) (arg=..., arg=..., arg=..., arg=..., arg=...) at include/vcl/vclptr.hxx:129
#11 0x00007ffff3f1cc86 in sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*) (this=0x55555c6f1fc0, pParentWindow=0x55555c62cea0, pViewFrame=0x55555abb87a0) at .../libreoffice/sfx2/source/sidebar/SidebarController.cxx:119
#12 0x00007ffff3f1d59f in sfx2::sidebar::SidebarController::create(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*) (pParentWindow=0x55555c62cea0, pViewFrame=0x55555abb87a0) at .../libreoffice/sfx2/source/sidebar/SidebarController.cxx:147
#13 0x00007ffff3f1a997 in sfx2::sidebar::SidebarDockingWindow::GetOrCreateSidebarController() (this=0x55555c62cea0) at .../libreoffice/sfx2/source/sidebar/SidebarDockingWindow.cxx:64
#14 0x00007ffff3f1ac24 in sfx2::sidebar::SidebarDockingWindow::SidebarDockingWindow(SfxBindings*, sfx2::sidebar::SidebarChildWindow&, vcl::Window*, long) (this=0x55555c62cea0, pSfxBindings=0x55555abdafe0, rChildWindow=..., pParentWindow=0x55555abdb6a0, nBits=137975825761) at .../libreoffice/sfx2/source/sidebar/SidebarDockingWindow.cxx:55
#15 0x00007ffff3f19e79 in VclPtr<sfx2::sidebar::SidebarDockingWindow>::Create<SfxBindings*&, sfx2::sidebar::SidebarChildWindow&, vcl::Window*&, long>(SfxBindings*&, sfx2::sidebar::SidebarChildWindow&, vcl::Window*&, long&&) (arg=@0x7fffffff45f8: 0x55555abdafe0, arg=..., arg=@0x7fffffff4600: 0x55555abdb6a0, arg=@0x7fffffff45e8: 137975825761) at include/vcl/vclptr.hxx:129
#16 0x00007ffff3f1960e in sfx2::sidebar::SidebarChildWindow::SidebarChildWindow(vcl::Window*, unsigned short, SfxBindings*, SfxChildWinInfo*) (this=0x55555c7d3130, pParentWindow=0x55555abdb6a0, nId=10336, pBindings=0x55555abdafe0, pInfo=0x7fffffff4878) at .../libreoffice/sfx2/source/sidebar/SidebarChildWindow.cxx:36
#17 0x00007ffff3f19d0c in std::make_unique<sfx2::sidebar::SidebarChildWindow, vcl::Window*&, unsigned short&, SfxBindings*&, SfxChildWinInfo*&>(vcl::Window*&, unsigned short&, SfxBindings*&, SfxChildWinInfo*&) (__args=@0x7fffffff46c0: 0x55555abdb6a0, __args=@0x7fffffff46be: 10336, __args=@0x7fffffff46b0: 0x55555abdafe0, __args=@0x7fffffff46a8: 0x7fffffff4878) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:1070
#18 0x00007ffff3f19344 in sfx2::sidebar::SidebarChildWindow::CreateImpl(vcl::Window*, unsigned short, SfxBindings*, SfxChildWinInfo*) (pParent=0x55555abdb6a0, nId=10336, pBindings=0x55555abdafe0, pInfo=0x7fffffff4878) at .../libreoffice/sfx2/source/sidebar/SidebarChildWindow.cxx:30
#19 0x00007ffff38b2b4b in SfxChildWindow::CreateChildWindow(unsigned short, vcl::Window*, SfxBindings*, SfxChildWinInfo&) (nId=10336, pParent=0x55555abdb6a0, pBindings=0x55555abdafe0, rInfo=...) at .../libreoffice/sfx2/source/appl/childwin.cxx:241
#20 0x00007ffff39592dd in SfxWorkWindow::CreateChildWin_Impl(SfxChildWin_Impl*, bool) (this=0x555556828e50, pCW=0x55555c4e3a00, bSetFocus=false) at .../libreoffice/sfx2/source/appl/workwin.cxx:1351
#21 0x00007ffff3958fdc in SfxWorkWindow::UpdateChildWindows_Impl() (this=0x555556828e50) at .../libreoffice/sfx2/source/appl/workwin.cxx:1300
#22 0x00007ffff39584da in SfxWorkWindow::UpdateObjectBars_Impl2() (this=0x555556828e50) at .../libreoffice/sfx2/source/appl/workwin.cxx:1248
#23 0x00007ffff3957a0b in SfxWorkWindow::UpdateObjectBars_Impl() (this=0x555556828e50) at .../libreoffice/sfx2/source/appl/workwin.cxx:1096
#24 0x00007ffff39cbeb5 in SfxDispatcher::Update_Impl(bool) (this=0x55555abd9fc0, bForce=false) at .../libreoffice/sfx2/source/control/dispatch.cxx:1122
#25 0x00007ffff4059a69 in SfxBaseController::ConnectSfxFrame_Impl(SfxBaseController::ConnectSfxFrame) (this=0x55555ac3f8b0, i_eConnect=SfxBaseController::E_CONNECT) at .../libreoffice/sfx2/source/view/sfxbasecontroller.cxx:1206
#26 0x00007ffff4058aac in SfxBaseController::attachFrame(com::sun:⭐:uno::Reference<com::sun:⭐:frame::XFrame> const&) (this=0x55555ac3f8b0, xFrame=...) at .../libreoffice/sfx2/source/view/sfxbasecontroller.cxx:530
Change-Id: I9c04b4faff4da084bfa8f932d9f95a233bc1f528
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169534
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
which is doing things in an unnecessarily complex way.
The simpler way makes a complex DOCX file load 20% faster
Change-Id: I507e2bfd5e315f50e4fa790711286785e0f11445
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169529
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
you can find more about the sad story behind this color
in the internet
Change-Id: I0aa201bdc62aebe96f0ae764a359f1f6286027d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169544
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
The problem is that the document has an unwanted page break on the
paragraph with the footnote.
The reason is that lcl_GetFootnoteLower() tries to evade flys, but
doesn't take into account that background flys (Wrap Through) should be
ignored.
(somehow regression from commit c303981cfd)
Change-Id: I02578f14644e232fac127142fe12801101f87f86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169530
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Open the bugdoc, it has a line with a non-zero horizontal offset from
the anchor paragraph, it shows up as a horizontal line, while it should
be vertical.
Checking how the ODT import and the DOCX import works for lines, one
obvious difference is that the ODT import at
SdXMLLineShapeContext::startFastElement() only considers the size /
scaling for the individual points, everything else goes to the transform
matrix of the containing shape, set in
SdXMLShapeContext::SetTransformation(). The drawingML import is way more
complex, but it effectively tries to not set any transformation on the
shape and just transorms the points of the line instead.
Fix the problem by changing Shape::createAndInsert() to also not put any
scaling to the transform matrix, to not transform the points of the line
and finally to apply the transform matrix to lines as well.
Do this only for toplevel Writer lines, that's enough to fix the bugdoc
and group shapes / Calc shapes need more investigation, so leave those
unchanged for now. Tests which were failing while working on this
change:
- CppunitTest_sc_shapetest's testTdf144242_Line_noSwapWH: do this for
Writer shapes only, for now
- CppunitTest_sw_ooxmlimport's lineRotation: this is already broken
partially, now looks perfect
- CppunitTest_sw_ooxmlimport's testTdf85232 / group shape: this points
out that lines in group shapes are some additional complexity, so
leave that case unchanged, for now
- CppunitTest_sw_ooxmlexport3's testArrowPosition: manual testing shows
this is still OK
- CppunitTest_sw_writerfilter_dmapper's testTdf141540GroupLinePosSize:
manual testing shows this is still OK
Change-Id: I246430148e3b3c927e010f360fa317e8429c82d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169533
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
setting the header/footer property values is extremely expensive, so
check before setting them.
Shaves 30% off the load time of a large DOCX
Change-Id: I7ac61434b8b4f59e199620dfcc11680164efe203
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169532
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
we can store the registered items in a map indexed by which-id, and
avoid most of the search cost
Change-Id: Ib3fbed436bc034e603819cfef8223dcc77eb7f06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169528
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Handle the case where `XAccessible::getAccessibleContext`
returns an empty reference, as e.g.
`VCLXWindow::getAccessibleContext` does when already
disposed.
Fixes an assert/crash seen with the gtk4 VCL plugin
when experimenting with missing menu item handling
in Writer's "Tools" -> "Bibliography Database",
expanding the search filter menu, then closing the dialog
and LO altogether.
Backtrace:
Thread 1 received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(rr) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1 0x00007fe8f96a6b6f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x00007fe8f96584e2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007fe8f96414ed in __GI_abort () at ./stdlib/abort.c:79
#4 0x00007fe8f9641415 in __assert_fail_base
(fmt=0x7fe8f97b7ba8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fe8e5f1ba3a "_pInterface != NULL", file=file@entry=0x7fe8e5f46536 ".../libreoffice/include/com/sun/star/uno/Reference.h", line=line@entry=387, function=function@entry=0x7fe8e5f41e71 "interface_type *com::sun:⭐:uno::Reference<com::sun:⭐:accessibility::XAccessibleContext>::operator->() const [interface_type = com::sun:⭐:accessibility::XAccessibleContext]") at ./assert/assert.c:92
#5 0x00007fe8f9651002 in __assert_fail
(assertion=0x7fe8e5f1ba3a "_pInterface != NULL", file=0x7fe8e5f46536 ".../libreoffice/include/com/sun/star/uno/Reference.h", line=387, function=0x7fe8e5f41e71 "interface_type *com::sun:⭐:uno::Reference<com::sun:⭐:accessibility::XAccessibleContext>::operator->() const [interface_type = com::sun:⭐:accessibility::XAccessibleContext]") at ./assert/assert.c:101
#6 0x00007fe8e6034e42 in com::sun:⭐:uno::Reference<com::sun:⭐:accessibility::XAccessibleContext>::operator->() const (this=0x7ffe3fddc640) at include/com/sun/star/uno/Reference.h:387
#7 0x00007fe8e6038c14 in map_accessible_role(com::sun:⭐:uno::Reference<com::sun:⭐:accessibility::XAccessible> const&) (rAccessible=uno::Reference to (VCLXWindow *) 0x5603d155bba8)
at .../libreoffice/vcl/unx/gtk4/a11y.cxx:56
#8 0x00007fe8e6038a16 in lo_accessible_get_property(_GObject*, unsigned int, _GValue*, _GParamSpec*) (object=0x5603e5e9fde0, property_id=2, value=0x7ffe3fddca00, pspec=0x5603bfdc1820)
at .../libreoffice/vcl/unx/gtk4/a11y.cxx:559
#9 0x00007fe8f47be345 in g_object_get_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007fe8f47be8b7 in g_object_get () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007fe8e54d81f8 in gtk_accessible_get_accessible_role (self=self@entry=0x5603e5e9fde0) at ../gtk/gtkaccessible.c:296
#12 0x00007fe8e54d9447 in gtk_accessible_should_present (self=self@entry=0x5603e5e9fde0) at ../gtk/gtkaccessible.c:1304
#13 0x00007fe8e575dab8 in get_index_in (parent=parent@entry=0x5603e4203030, child=child@entry=0x5603e5ea13a0) at ../gtk/a11y/gtkatspicontext.c:398
#14 0x00007fe8e5760213 in gtk_at_spi_context_child_change (ctx=0x5603e41f8670, change=GTK_ACCESSIBLE_CHILD_CHANGE_REMOVED, child=0x5603e5ea13a0) at ../gtk/a11y/gtkatspicontext.c:1260
#15 0x00007fe8e575ed8f in gtk_at_spi_context_state_change
(ctx=0x5603e5ea15a0, changed_states=GTK_ACCESSIBLE_STATE_CHANGE_HIDDEN, changed_properties=0, changed_relations=<optimized out>, states=0x5603e5ea1770, properties=0x5603e5ea16b0, relations=0x5603e5ea1710)
at ../gtk/a11y/gtkatspicontext.c:979
#16 0x00007fe8e54e2bdf in gtk_at_context_update (self=0x5603e5ea15a0) at ../gtk/gtkatcontext.c:831
#17 0x00007fe8e54d839a in gtk_accessible_update_state (self=self@entry=0x5603e5ea13a0, first_state=first_state@entry=GTK_ACCESSIBLE_STATE_HIDDEN) at ../gtk/gtkaccessible.c:364
#18 0x00007fe8e5684d4b in gtk_widget_unmap (widget=0x5603e5ea13a0) at ../gtk/gtkwidget.c:2895
#19 gtk_widget_unmap (widget=0x5603e5ea13a0) at ../gtk/gtkwidget.c:2879
#20 0x00007fe8e5684e25 in gtk_widget_real_hide (widget=0x5603e5ea13a0) at ../gtk/gtkwidget.c:2811
#21 0x00007fe8f47b4939 in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007fe8f47ca33f in () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007fe8f47cff06 in g_signal_emit_valist () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007fe8f47cffc3 in g_signal_emit () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007fe8e56872cd in gtk_widget_hide (widget=0x5603e5ea13a0) at ../gtk/gtkwidget.c:2787
#26 0x00007fe8e61de10e in GtkSalObjectWidgetClip::Show(bool) (this=0x5603dafec8f0, bVisible=false) at vcl/unx/gtk4/../gtk3/gtkobject.cxx:534
#27 0x00007fe8efc96b3d in vcl::Window::ImplSysObjClip(vcl::Region const*) (this=0x5603e5ebb940, pOldRegion=0x0) at .../libreoffice/vcl/source/window/clipping.cxx:352
#28 0x00007fe8efc96fa0 in vcl::Window::ImplSetClipFlagChildren(bool) (this=0x5603e5ebb940, bSysObjOnlySmaller=false) at .../libreoffice/vcl/source/window/clipping.cxx:424
#29 0x00007fe8efc97227 in vcl::Window::ImplSetClipFlag(bool) (this=0x5603e5ebb940, bSysObjOnlySmaller=false) at .../libreoffice/vcl/source/window/clipping.cxx:466
#30 0x00007fe8eff2307b in vcl::Window::Show(bool, ShowFlags) (this=0x5603e5ebb940, bVisible=false, nFlags=ShowFlags::NONE) at .../libreoffice/vcl/source/window/window.cxx:2238
#31 0x00007fe8efc6a189 in vcl::Window::Hide() (this=0x5603e5ebb940) at include/vcl/window.hxx:881
#32 0x00007fe8efeac189 in SystemChildWindow::dispose() (this=0x5603e5ebb940) at .../libreoffice/vcl/source/window/syschild.cxx:121
#33 0x00007fe8f01cd7ca in VclReferenceBase::disposeOnce() (this=0x5603e5ebb950) at .../libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
#34 0x00007fe8e61ad349 in VclPtr<SystemChildWindow>::disposeAndClear() (this=0x5603e5ea49f0) at include/vcl/vclptr.hxx:207
#35 0x00007fe8e60a30ca in (anonymous namespace)::GtkInstanceBuilder::~GtkInstanceBuilder() (this=0x5603e5ea4900) at vcl/unx/gtk4/../gtk3/gtkinst.cxx:24349
#36 0x00007fe8e60a3169 in (anonymous namespace)::GtkInstanceBuilder::~GtkInstanceBuilder() (this=0x5603e5ea4900) at vcl/unx/gtk4/../gtk3/gtkinst.cxx:24342
#37 0x00007fe8efe748cf in std::default_delete<weld::Builder>::operator()(weld::Builder*) const (this=0x5603e41d6730, __ptr=0x5603e5ea4900) at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:99
#38 0x00007fe8efe747fc in std::__uniq_ptr_impl<weld::Builder, std::default_delete<weld::Builder> >::reset(weld::Builder*) (this=0x5603e41d6730, __p=0x0)
at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:211
#39 0x00007fe8efff1ffd in std::unique_ptr<weld::Builder, std::default_delete<weld::Builder> >::reset(weld::Builder*) (this=0x5603e41d6730, __p=0x0)
at /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unique_ptr.h:509
#40 0x00007fe8efff16b3 in InterimItemWindow::dispose() (this=0x5603e41d6660) at .../libreoffice/vcl/source/control/InterimItemWindow.cxx:49
#41 0x00007fe8a6f57e51 in EditControl::dispose() (this=0x5603e41d6660) at .../libreoffice/extensions/source/bibliography/toolbar.cxx:209
#42 0x00007fe8f01cd7ca in VclReferenceBase::disposeOnce() (this=0x5603e41d67b8) at .../libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
#43 0x00007fe8a6f5d5f6 in VclPtr<EditControl>::disposeAndClear() (this=0x5603e5e8e9f0) at include/vcl/vclptr.hxx:207
#44 0x00007fe8a6f5a13c in BibToolBar::dispose() (this=0x5603e5e8e580) at .../libreoffice/extensions/source/bibliography/toolbar.cxx:272
#45 0x00007fe8f01cd7ca in VclReferenceBase::disposeOnce() (this=0x5603e5e8ea68) at .../libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
#46 0x00007fe8a6edbf09 in VclPtr<BibToolBar>::disposeAndClear() (this=0x5603e06c1578) at include/vcl/vclptr.hxx:207
#47 0x00007fe8a6edab2e in bib::BibBeamer::dispose() (this=0x5603e06c1340) at .../libreoffice/extensions/source/bibliography/bibbeam.cxx:205
#48 0x00007fe8f01cd7ca in VclReferenceBase::disposeOnce() (this=0x5603e06c1588) at .../libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
#49 0x00007fe8a6ef2b49 in VclPtr<vcl::Window>::disposeAndClear() (this=0x7ffe3fdddcb0) at include/vcl/vclptr.hxx:207
#50 0x00007fe8a6ef173a in BibWindowContainer::dispose() (this=0x5603e70e5ed0) at .../libreoffice/extensions/source/bibliography/bibcont.cxx:81
#51 0x00007fe8f01cd7ca in VclReferenceBase::disposeOnce() (this=0x5603e70e5ef8) at .../libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
#52 0x00007fe8a6ef2b49 in VclPtr<vcl::Window>::disposeAndClear() (this=0x7ffe3fdddd90) at include/vcl/vclptr.hxx:207
#53 0x00007fe8a6ef2043 in BibBookContainer::dispose() (this=0x5603de460610) at .../libreoffice/extensions/source/bibliography/bibcont.cxx:126
#54 0x00007fe8f01cd7ca in VclReferenceBase::disposeOnce() (this=0x5603de460878) at .../libreoffice/vcl/source/outdev/vclreferencebase.cxx:38
#55 0x00007fe8f1d624a9 in VclPtr<vcl::Window>::disposeAndClear() (this=0x7ffe3fddded8) at include/vcl/vclptr.hxx:207
#56 0x00007fe8f1d52fe4 in VCLXWindow::dispose() (this=0x5603d155bb40) at .../libreoffice/toolkit/source/awt/vclxwindow.cxx:926
#57 0x00007fe8f6c28644 in (anonymous namespace)::XFrameImpl::setComponent(com::sun:⭐:uno::Reference<com::sun:⭐:awt::XWindow> const&, com::sun:⭐:uno::Reference<com::sun:⭐:frame::XController> const&)
(this=0x5603e4174370, xComponentWindow=empty uno::Reference, xController=empty uno::Reference) at .../libreoffice/framework/source/services/frame.cxx:1525
#58 0x00007fe8f6c2abc8 in (anonymous namespace)::XFrameImpl::close(unsigned char) (this=0x5603e4174370, bDeliverOwnership=0 '\000') at .../libreoffice/framework/source/services/frame.cxx:1707
#59 0x00007fe8f6a3a23a in framework::pattern::frame::closeIt(com::sun:⭐:uno::Reference<com::sun:⭐:uno::XInterface> const&) (xResource=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x5603e41743e0)
at framework/source/inc/pattern/frame.hxx:57
#60 0x00007fe8f6a38445 in framework::CloseDispatcher::implts_closeFrame() (this=0x5603e93410a0) at .../libreoffice/framework/source/dispatch/closedispatcher.cxx:500
#61 0x00007fe8f6a37ab1 in framework::CloseDispatcher::impl_asyncCallback(LinkParamNone*) (this=0x5603e93410a0) at .../libreoffice/framework/source/dispatch/closedispatcher.cxx:379
#62 0x00007fe8f6a35fed in framework::CloseDispatcher::LinkStubimpl_asyncCallback(void*, LinkParamNone*) (instance=0x5603e93410a0, data=0x0) at .../libreoffice/framework/source/dispatch/closedispatcher.cxx:246
#63 0x00007fe8efc40828 in Link<LinkParamNone*, void>::Call(LinkParamNone*) const (this=0x5603eb162878, data=0x0) at include/tools/link.hxx:111
#64 0x00007fe8f06cff25 in vcl::EventPoster::DoEvent_Impl(void*) (this=0x5603eb162870) at .../libreoffice/vcl/source/helper/evntpost.cxx:52
#65 0x00007fe8f06cfedd in vcl::EventPoster::LinkStubDoEvent_Impl(void*, void*) (instance=0x5603eb162870, data=0x0) at .../libreoffice/vcl/source/helper/evntpost.cxx:48
#66 0x00007fe8eff4ca78 in Link<void*, void>::Call(void*) const (this=0x5603dfaf31a8, data=0x0) at include/tools/link.hxx:111
#67 0x00007fe8eff48759 in ImplHandleUserEvent(ImplSVEvent*) (pSVEvent=0x5603dfaf31a0) at .../libreoffice/vcl/source/window/winproc.cxx:2287
#68 0x00007fe8eff45110 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) (_pWindow=0x5603c9d5cf10, nEvent=SalEvent::UserEvent, pEvent=0x5603dfaf31a0)
at .../libreoffice/vcl/source/window/winproc.cxx:2851
#69 0x00007fe8f0bd5ba0 in SalFrame::CallCallback(SalEvent, void const*) const (this=0x5603cb949f00, nEvent=SalEvent::UserEvent, pEvent=0x5603dfaf31a0) at vcl/inc/salframe.hxx:312
#70 0x00007fe8f0c0072f in SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) (this=0x5603bec36aa0, aEvent=...) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:66
#71 0x00007fe8f06e433d in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=0x7ffe3fddefd0) at .../libreoffice/vcl/source/app/salusereventlist.cxx:119
#72 0x00007fe8f06e41e4 in SalUserEventList::DispatchUserEvents(bool) (this=0x5603bec36aa0, bHandleAllCurrentEvents=false) at .../libreoffice/vcl/source/app/salusereventlist.cxx:120
#73 0x00007fe8f0c00685 in SalGenericDisplay::DispatchInternalEvent(bool) (this=0x5603bec36aa0, bHandleAllCurrentEvent=false) at .../libreoffice/vcl/unx/generic/app/gendisp.cxx:51
#74 0x00007fe8e607b706 in call_userEventFn(void*) (data=0x5603beaa55d0) at vcl/unx/gtk4/../gtk3/gtkdata.cxx:824
#75 0x00007fe8ead1ce3f in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#76 0x00007fe8ead1eec7 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#77 0x00007fe8ead1f4e0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#78 0x00007fe8e607a2bf in GtkSalData::Yield(bool, bool) (this=0x5603beaa55d0, bWait=true, bHandleAllCurrentEvents=false) at vcl/unx/gtk4/../gtk3/gtkdata.cxx:405
#79 0x00007fe8e6080123 in GtkInstance::DoYield(bool, bool) (this=0x5603beaa5480, bWait=true, bHandleAllCurrentEvents=false) at vcl/unx/gtk4/../gtk3/gtkinst.cxx:429
#80 0x00007fe8f07c4d5c in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:384
#81 0x00007fe8f07c466b in Application::Yield() () at .../libreoffice/vcl/source/app/svapp.cxx:472
#82 0x00007fe8f07c4402 in Application::Execute() () at .../libreoffice/vcl/source/app/svapp.cxx:359
#83 0x00007fe8f9926be0 in desktop::Desktop::Main() (this=0x7ffe3fde1018) at .../libreoffice/desktop/source/app/app.cxx:1652
#84 0x00007fe8f07e796e in ImplSVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:229
#85 0x00007fe8f07e9999 in SVMain() () at .../libreoffice/vcl/source/app/svmain.cxx:261
#86 0x00007fe8f99a9b2c in soffice_main() () at .../libreoffice/desktop/source/app/sofficemain.cxx:99
#87 0x00005603bca36a5d in sal_main () at .../libreoffice/desktop/source/app/main.c:51
#88 0x00005603bca36a37 in main (argc=2, argv=0x7ffe3fde1228) at .../libreoffice/desktop/source/app/main.c:49
Change-Id: Ia3f19d700de66c72f2896595a0e387bd3c42d7ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169451
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins