Negative space sizes (i.e. shrunk lines at image wrapping) stored
over LONG_MAX/2, and these values had no resolution in SwBidiPortion,
causing crash/assert in conversion of DOCX document containing e.g.
Arabic text wrapping around images.
Note: apply the resolution in SwDoubleLinePortion, too.
Regression since commit 1fb6de0270
"tdf#163149 sw smart justify: fix line shrinking at image wrapping".
Change-Id: I6e45592c4eed247871d35e1f02fd5a038baddf85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175419
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
V560 A part of conditional expression is always true: pNumFormat.
V560 A part of conditional expression is always true: pNumFormat != nullptr.
Change-Id: I6c780fa67bd65da06cfdde37d34eda93bb4ab13c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175445
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1037 Two or more case-branches perform the same actions. Check lines: 341, 345, 348
V1037 Two or more case-branches perform the same actions. Check lines: 481, 487
V1037 Two or more case-branches perform the same actions. Check lines: 689, 700
Change-Id: Ib9f4b8047f7706667f79de0170a672818ffd9030
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175346
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V760 Two identical blocks of text were found. The second block begins from line 325.
Change-Id: I5854337d4d1c0d946b096804b536433c48f0696f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175381
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
because the param is never null
Change-Id: I58660a9e4e6c25def2a70099bffce322b477b702
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175415
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Do this explicitly, so it can't happen that .uno:Signature with params
gets dispatched, then .uno:Signature without params still has the old
XCertificate.
Change-Id: I35c4d5e0e4545fb1aabb9050aa6b11cd10c3ca85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175414
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Return the XAccessibleContext reference right away, instead
of assigning it to a local variable and returning at the end
of the method.
Change-Id: Iec47f4158dd40c25482366c33ed4a4642709f641
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175405
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Just return `xAcc` right away instead of first assigning it to
a local variable.
Change-Id: If11c88266b4ec72b2d5d927e3f28a14bf0cdc304
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175404
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Since
commit 97075a384a
Author: Michael Brauer <mib@openoffice.org>
Date: Wed Oct 24 13:16:17 2001 +0000
#91961#: Support of language
V1037 Two or more case-branches perform the same actions. Check lines: 1462, 1465
Change-Id: Ie27fb47ec7e22b9dbe9a2338c661c261bea8926b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175383
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1024 The 'aStream' stream is checked for EOF before reading from it, but is not checked after reading. Potential use of invalid data.
Change-Id: I4f7b10bc896d13a31a97ed0dbacd413de990eb89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175363
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
V1037 Two or more case-branches perform the same actions. Check lines: 1241, 1244. Also, 1247 and 1251.
Change-Id: Ibf474d045ae52bc0d7f655143e72117c29736dfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175206
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1037 Two or more case-branches perform the same actions. Check lines: 1048, 1053
Change-Id: I24f2b4698ff8c0d57aa81b57b42a847caa6c1aeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175360
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1037 Two or more case-branches perform the same actions. Check lines: 628, 638
Change-Id: I0979a4c245c2b550ab85072f3925082845f0915a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175352
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1037 Two or more case-branches perform the same actions. Check lines: 692, 695
Change-Id: I7a7b321b10437897b285c31403aee908da8cd929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175343
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1037 Two or more case-branches perform the same actions. Check lines: 717, 733
Change-Id: I57fc125abb8c9a4c9dea197945f45b95b90e41b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175320
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
V1037 Two or more case-branches perform the same actions. Check lines: 627, 632, 636
Change-Id: If0f4f4da0d51389c12607770af58f4e34f3caafc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175353
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1037 Two or more case-branches perform the same actions. Check lines: 674, 677
V1037 Two or more case-branches perform the same actions. Check lines: 690, 693
Change-Id: I7d9ac7ed40c6eaec4d8c6b5df0ed4299beae2f7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175345
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1037 Two or more case-branches perform the same actions. Check lines: 50, 53
Change-Id: I909c0b5b219d5868a1a0197314f499e0253b3293
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175388
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1037 Two or more case-branches perform the same actions. Check lines: 465, 472
V1037 Two or more case-branches perform the same actions. Check lines: 497, 505
Change-Id: I826e2236100727f19bb60662dc7145e8e4814421
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175389
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
V1037 Two or more case-branches perform the same actions. Check lines: 1413, 1553
Change-Id: I6b28e9d7055bdf120759dff38d869d1cb1e70cc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175271
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
The current setup is that doc_initializeForRendering() gets the signing
key/cert earlier, even if no signing will be performed for this
document.
This has the downside that we needlessly share sensitive info.
Add an alternative way so to only share the sign key/cert when the
.uno:Signature command gets dispatched. This works similarly well for
the signing, but this way the private info is only shared when we
actually use it.
The .uno:Signature UNO command brings up the interactive dialog on
success, so it's not easy to cover this from CppunitTest_sfx2_doc.
Anyhow, the format for these two parameters is PEM, i.e. base64 dump of
the data, with the usual markers to show which one is the key and the
cert.
Change-Id: Ib424a1a490a3eb4aab35bc70a50791fc0d400920
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175373
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
just retrieve the data when we need it, avoids marking
this object dirty unnecessarily
Change-Id: Ic3455e782365e8f2d3b89d8e5052da9d7bdaba2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175371
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
On commit "sc: fix freeze row/column panes"
44362e5886 the type of FreezePanesColumn and FreezePanesRow was changed from Int32 to Point. Since then, calls
trying to set the frozen panes with this commands sending an index fail,
setting the index to 1.
This change allows again a way to set them passing only an index of type
Int32.
Change-Id: I9de12af5ec7dbb4e49b057c7c19c063424265581
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174825
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 3eec1925788387c7c5996052388f3fcac518dfe7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174956
Tested-by: Jenkins
Only known SdPages need this
Change-Id: Id504cd1ec318fa8cce43d11f03c628e7457f7634
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175369
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
so we can fix a shutdown use-after-free in sot.
Change-Id: I32f83bd94627d72d7bee7ea2ebd6ab77a7f78435
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175335
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
avoids a bunch of broadcasting.
a similar mega-master-page scenario as reported in tdf#158773
9.1 - 7.0s
Some re-ordering of SVG output occurs, which means
tweaking some unit tests.
Change-Id: I447a4639a96c12c627a074f7e0f1ede8b3cbaf72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175299
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
When using the dark theme on Windows 11, the background
color for toolbar buttons is light blue as with the light
theme, which results in insufficient contrast.
According to the comments in tdf#152534, this is
is a in the Windows dark theme which can also be seen in
other apps or has been worked around there, like in
Notepad++ [1].
Work around the issue by not letting the theme draw the
background (using Win API function `DrawThemeBackground`)
when on Windows 11 and using dark theme, but manually draw
the background and a frame instead for now.
For the background color, use a color that's a bit
lighter than the background color for non-highlighted
items.
[1] 5d086f93a8
Change-Id: Ie35937fde2e8c7078c4979a2ef60c28fc4679574
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175334
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Instead of using a custom (non-recursive) std::mutex in the
extension manager dialog, hold the (recursive) SolarMutex instead.
As the backtrace in attachment 197155 in tdf#161625 (s.a. below)
shows, a recursive mutex is needed:
dp_gui::ExtMgrDialog::TimeOutHdl (frame 17) locks the mutex, then
dp_gui::ExtMgrDialog::startProgress (frame 6) wants to lock it
again, causing a deadlock.
(Switching ExtMgrDialog::m_aMutex to be a std::recursive_mutex
could be an alternative, but follow the common pattern of holding
the SolarMutex while doing UI stuff instead.)
Somewhat similar commit:
commit 406a7e9d45
Date: Wed Jul 10 12:46:50 2024 +0200
fix locking in UpdateRequiredDialog
Backtrace of deadlock:
#0 0x00007f883f6adc70 in ?? () from /usr/lib/libc.so.6
#1 0x00007f883f6b4b01 in pthread_mutex_lock () from /usr/lib/libc.so.6
#2 0x00007f87f3ea068e in __gthread_mutex_lock (__mutex=0x5782aab26e48) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/x86_64-pc-linux-gnu/bits/gthr-default.h:762
#3 std::mutex::lock (this=0x5782aab26e48) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/std_mutex.h:113
#4 std::unique_lock<std::mutex>::lock (this=<optimized out>) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_lock.h:147
#5 std::unique_lock<std::mutex>::unique_lock (__m=..., this=<optimized out>) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_lock.h:73
#6 dp_gui::ExtMgrDialog::startProgress (this=0x5782aab26de0, _bLockInterface=0x80) at /home/user/libreofficetwo/desktop/source/deployment/gui/dp_gui_dialog2.cxx:779
#7 0x00007f883b4080a1 in Link<void*, void>::Call (this=0x7f86b0000c08, data=0x80) at include/tools/link.hxx:111
#8 ImplHandleUserEvent (pSVEvent=pSVEvent@entry=0x7f86b0000c00) at /home/user/libreofficetwo/vcl/source/window/winproc.cxx:2285
#9 0x00007f883b40616a in ImplWindowFrameProc (_pWindow=0x5782a76df9f0, nEvent=SalEvent::UserEvent, pEvent=0x7f86b0000c00) at /home/user/libreofficetwo/vcl/source/window/winproc.cxx:2849
#10 0x00007f883b6c711e in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const (this=<optimized out>) at /home/user/libreofficetwo/vcl/source/app/salusereventlist.cxx:119
#11 SalUserEventList::DispatchUserEvents (this=0x5782a62edb08, bHandleAllCurrentEvents=false) at /home/user/libreofficetwo/vcl/source/app/salusereventlist.cxx:120
#12 0x00007f8833fb7827 in QtInstance::ImplYield (this=this@entry=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:447
#13 0x00007f8833fb9e11 in QtInstance::DoYield (this=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:469
#14 0x00007f883b70fc72 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:385
#15 Application::Yield () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:473
#16 0x00007f883b486415 in ProgressBar::SetValue (this=<optimized out>, nNewPercent=<optimized out>) at /home/user/libreofficetwo/vcl/source/control/prgsbar.cxx:199
#17 0x00007f87f3ea14ca in dp_gui::ExtMgrDialog::TimeOutHdl (this=0x5782aab26de0) at /home/user/libreofficetwo/desktop/source/deployment/gui/dp_gui_dialog2.cxx:976
#18 0x00007f883b6ff8c7 in Scheduler::CallbackTaskScheduling () at /home/user/libreofficetwo/vcl/source/app/scheduler.cxx:509
#19 0x00007f8833fd4013 in SalTimer::CallCallback (this=0x5782a77b83d0) at vcl/inc/saltimer.hxx:53
#20 QtTimer::timeoutActivated (this=0x5782a77b83c0) at vcl/qt6/../qt5/QtTimer.cxx:51
#21 0x00007f88341a3397 in ?? () from /usr/lib/libQt6Core.so.6
#22 0x00007f88341ab5e5 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/libQt6Core.so.6
#23 0x00007f883418d859 in QObject::event(QEvent*) () from /usr/lib/libQt6Core.so.6
#24 0x00007f8832efc8cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt6Widgets.so.6
#25 0x00007f8834145aa8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt6Core.so.6
#26 0x00007f88342c7658 in QTimerInfoList::activateTimers() () from /usr/lib/libQt6Core.so.6
#27 0x00007f88343a9f99 in ?? () from /usr/lib/libQt6Core.so.6
#28 0x00007f8837877299 in ?? () from /usr/lib/libglib-2.0.so.0
#29 0x00007f88378d9ec7 in ?? () from /usr/lib/libglib-2.0.so.0
#30 0x00007f8837876795 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0x00007f88343a82bd in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt6Core.so.6
#32 0x00007f8833fb789d in QtInstance::ImplYield (this=this@entry=0x5782a62edad0, bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>) at vcl/qt6/../qt5/QtInstance.cxx:458
#33 0x00007f8833fb9e11 in QtInstance::DoYield (this=0x5782a62edad0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:469
#34 0x00007f883b70fc72 in ImplYield (i_bWait=true, i_bAllEvents=false) at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:385
#35 Application::Yield () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:473
#36 0x00007f883b70fb90 in Application::Execute () at /home/user/libreofficetwo/vcl/source/app/svapp.cxx:360
#37 0x00007f883f8e1770 in desktop::Desktop::Main (this=0x7ffc2a5b0d28) at /home/user/libreofficetwo/desktop/source/app/app.cxx:1691
#38 0x00007f883b717e1e in ImplSVMain () at /home/user/libreofficetwo/vcl/source/app/svmain.cxx:228
#39 0x00007f883f90ef8a in soffice_main () at /home/user/libreofficetwo/desktop/source/app/sofficemain.cxx:121
#40 0x000057829d6f683b in sal_main () at /home/user/libreofficetwo/desktop/source/app/main.c:51
#41 main (argc=<optimized out>, argv=<optimized out>) at /home/user/libreofficetwo/desktop/source/app/main.c:49
Change-Id: I96d746eb1493aaf5b56d50664c9d1817699f21bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175298
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Add .ui file of Writer's "Tools" -> "Word Count" dialog
to the list of files supported by QtInstanceBuilder.
This means that native Qt widgets are used for that dialog now
by the qt5/qt6 VCL plugins, unless environment variable
SAL_VCL_QT_NO_WELDED_WIDGETS=1 is set.
Change-Id: Id25d0de657dfa9acbc0d71cc3a851b2eb17c6059
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175367
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Implement handling for the "left-attach" and
"top-attach" packing properties of "GtkGrid"
children, which describe the column and row
of these children within the grid.
Introduce a new static helper method
QtBuilder::applyGridPackingProperties that
implements the handling for QWidget children
for now.
(Support for QLayout items within a grid
will have to be added later in order to
supported cases where e.g. a "GtkBox" is
located inside of a "GtkGrid" in a .ui file.)
In order to move the item to the proper position
within the grid, first locate it to determine
it's current row and column index, remove the item
from the layout, and re-insert it at the new
position.
While this might not be the most efficient
way of doing this, it is fairly easy to
implement, without having to change the
overall approach that QtBuilder, VclBuilder and the
WidgetBuilder base currently process .ui
files.
This is sufficient for Writer's "Word Count"
dialog, for which support will be declared
in an upcoming commit.
Change-Id: Ia296373c408e6cd84ffcc29b9d9a03d3c2441816
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175366
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Create a QGridLayout [1] when encountering a "GtkGrid"
object in a .ui file.
This will be needed e.g. by Writer's "Tools" -> "Word Count"
dialog.
With this commit in place, adding "modules/swriter/ui/wordcount.ui"
to the list of supported .ui files in
QtInstanceBuilder::IsUIFileSupported would already result in each of
the labels in the dialog showing up, but each one as a single row rather
than they being properly arranged in rows and columns.
(That will be handled in an upcoming commit.)
[1] https://doc.qt.io/qt-6/qgridlayout.html
Change-Id: Ib9a9de4aa2820ac7e6771acf884072768508fe59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175365
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
1. Make it take string view: helps to avoid extra string allocation
e.g. in desktop::jsonToPropertyValuesVector, and will help more,
when C++26 stringstream ctor taking string view is available.
2. Factor out a function taking boost::property_tree::ptree, making
implementation simpler for [][]com.sun.star.beans.PropertyValue and
[]com.sun.star.beans.PropertyValue, without writing a child node to
a JSON string, and parsing it again.
Change-Id: I16ac2641633ea67a7c9c054c9df09a790500e6fb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175361
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
We can searching without needing a std::map by sorting
the style list. Which also allows to do prefix
searching. Which we can use to dramatically reduce
the number of styles we need to loop through in
SdXMLStylesContext::ImpSetGraphicStyles.
a similar mega-master-page scenario as reported in tdf#158773
13.5 - 9.1s
Needed to adjust some unit tests because
the order of iteration through styles is
now different, which affects some file output.
Change-Id: Ia7240fe520b70839d2519eba1fb70819a3c3bf81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175281
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Since
commit 47889e229c
Author: Thomas Lange <tl@openoffice.org>
Date: Mon Sep 28 10:46:54 2009 +0000
158766 avoid duplicating symbols in the catalog
V501 There are identical sub-expressions to the left and to the right of the '==' operator: aSymSetName == aSymSetName
Change-Id: If204238eb0fca958e075ebb2ff4f3ad13a55630f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175332
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>