Commit graph

500723 commits

Author SHA1 Message Date
Xisco Fauli
59f8370e62 README: mention PVS-Studio
Change-Id: I7116d28d1f94b1c8fe4f730b268411973de9a547
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175093
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 14:31:08 +02:00
MelvinYG
4298833106 tdf#143148: Use pragma once instead of include guards
Change-Id: Id648d25e47034e209b291bf73ac4878226b4e755
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175105
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-10-18 14:19:53 +02:00
Jean-Pierre Ledure
e74b731c80 scriptforge.pyi - Fix typo
Change-Id: I993e30d3d228c639a69007a846b46f420f9297b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175097
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2024-10-18 13:38:18 +02:00
Javiya Vivekkumar Dineshbhai
feb80bccc3 lok: enable transition repeat after x property
Change-Id: I61bd2ebaebfb19350aa3b3634f5877c0bfa05880
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171773
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-10-18 13:19:47 +02:00
Attila Szűcs
f51bf81cfb SW: Transform DocStruct: Added Log warnings
Implemented warning loggings in case of transform charts or
content controls.

Change-Id: I77398ca5bf04f05743c99d63380a402c394739ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173689
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit d679849aca883c1a42d3bcee61b3bee5e3bbc6dc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175122
Tested-by: Jenkins
2024-10-18 12:49:49 +02:00
Attila Szűcs
599365d293 SW: extract transform charts (using dialog code)
Implemented chart data extraction, and transformation
added insert/delete/modify row/column, and the ability to set
resize data table
setcolumndesc / setrowdesc .. for 1 descriptor,
or with multiple descriptor to set
set 1 cell value, or set the whole table cells values.
it will resize the table, but you can still use partial arrays
like
            "data": [ [ 1,2,3,4 ],
                      [ 2,3,4,5 ],
                      [ 3 ],
                      [ 4,5,6,7 ],
                      [ 2,2,1 ],
                      [ 5,6,7,8 ] ],
that means the 3. row 2,3,4th cell will not be overwritten.

for insert column, it call codes from DataBrowserModel.
(used by dialog code)

added tests, fixed a contentcontrol date problem

2. commit (made by Caolan) squashed into 1. commit:
WIP hack this to link

move stuff from chartcontroller to chartcore and adjust visibility
until it links at least

Change-Id: I5529f4da33f046eef7e947d755e29486fa966274
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172849
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175121
Tested-by: Jenkins
2024-10-18 12:49:41 +02:00
Xisco Fauli
9cb748847f tdf#163486: PVS: recurring check
V571 	Recurring check. The 'pData' condition was already verified in line 795.

Change-Id: I0aebea88938a2e23bb1eb7c9f4e836b013f5664e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175124
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 12:27:10 +02:00
Caolán McNamara
ce8e39bc9a change misleading var prefix
Change-Id: I0e59d51cbbb7b9d7481d028fb0c682e108b0e7d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175118
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-18 11:21:01 +02:00
Mike Kaganski
f2808f9165 Avoid deadlock
As seen in the following call stacks:

Main thread

  sal3!osl_acquireMutex+0x49 [libre-office-git-repo\sal\osl\w32\mutex.cxx @ 65]
  emboleobj!osl::Mutex::acquire+0x9 [libre-office-git-repo\include\osl\mutex.hxx @ 63]
  emboleobj!osl::ClearableGuard<osl::Mutex>::{ctor}+0xd [libre-office-git-repo\include\osl\mutex.hxx @ 182]
  emboleobj!osl::ResettableGuard<osl::Mutex>::{ctor}+0xd [libre-office-git-repo\include\osl\mutex.hxx @ 236]
  emboleobj!OleEmbeddedObject::getStatus+0x72 [libre-office-git-repo\embeddedobj\source\msole\oleembed.cxx @ 1133]
  sfxlo!SfxViewShell::CheckIPClient_Impl+0x42 [libre-office-git-repo\sfx2\source\view\viewsh.cxx @ 3563]
  sfxlo!SfxInPlaceClient_Impl::TimerHdl+0x40 [libre-office-git-repo\sfx2\source\view\ipclient.cxx @ 628]
  sfxlo!SfxInPlaceClient_Impl::LinkStubTimerHdl+0x53 [libre-office-git-repo\sfx2\source\view\ipclient.cxx @ 624]
  vcllo!Scheduler::CallbackTaskScheduling+0x130e [libre-office-git-repo\vcl\source\app\scheduler.cxx @ 511]
  vclplug_winlo!WinSalTimer::ImplHandleElapsedTimer+0x2e [libre-office-git-repo\vcl\win\app\saltimer.cxx @ 167]
  vclplug_winlo!ImplSalYield+0x14f [libre-office-git-repo\vcl\win\app\salinst.cxx @ 525]
  vclplug_winlo!WinSalInstance::DoYield+0xad [libre-office-git-repo\vcl\win\app\salinst.cxx @ 581]
  vcllo!ImplYield+0x367 [libre-office-git-repo\vcl\source\app\svapp.cxx @ 393]
  vcllo!Application::Execute+0xfa [libre-office-git-repo\vcl\source\app\svapp.cxx @ 369]
  sofficeapp!desktop::Desktop::Main+0x173f [libre-office-git-repo\desktop\source\app\app.cxx @ 1605]
  vcllo!ImplSVMain+0xda [libre-office-git-repo\vcl\source\app\svmain.cxx @ 229]
  sofficeapp!soffice_main+0xf3 [libre-office-git-repo\desktop\source\app\sofficemain.cxx @ 94]

Request thread

  sal3!osl_acquireMutex+0x49 [libre-office-git-repo\sal\osl\w32\mutex.cxx @ 65]
  vclplug_winlo!osl::Mutex::acquire+0xa [libre-office-git-repo\include\osl\mutex.hxx @ 63]
  vclplug_winlo!SalYieldMutex::doAcquire+0x91 [libre-office-git-repo\vcl\win\app\salinst.cxx @ 148]
  emboleobj!SolarMutexReleaser::{dtor}+0xc [libre-office-git-repo\include\vcl\svapp.hxx @ 1425]
  emboleobj!OleComponent::StoreOwnTmpIfNecessary+0x1d3 [libre-office-git-repo\embeddedobj\source\msole\olecomponent.cxx @ 1365]
  emboleobj!OleEmbeddedObject::StoreObjectToStream+0x2f [libre-office-git-repo\embeddedobj\source\msole\olepersist.cxx @ 1032]
  emboleobj!OleEmbeddedObject::StoreToLocation_Impl+0x3cc [libre-office-git-repo\embeddedobj\source\msole\olepersist.cxx @ 1169]
  emboleobj!OleEmbeddedObject::storeAsEntry+0x152 [libre-office-git-repo\embeddedobj\source\msole\olepersist.cxx @ 1523]
  comphelper!comphelper::EmbeddedObjectContainer::StoreEmbeddedObject+0x490 [libre-office-git-repo\comphelper\source\container\embeddedobjectcontainer.cxx @ 501]
  comphelper!comphelper::EmbeddedObjectContainer::InsertEmbeddedObject+0x6f [libre-office-git-repo\comphelper\source\container\embeddedobjectcontainer.cxx @ 518]
  comphelper!comphelper::EmbeddedObjectContainer::RemoveEmbeddedObject+0x388 [libre-office-git-repo\comphelper\source\container\embeddedobjectcontainer.cxx @ 945]
  comphelper!comphelper::EmbeddedObjectContainer::RemoveEmbeddedObject+0x46 [libre-office-git-repo\comphelper\source\container\embeddedobjectcontainer.cxx @ 831]
  swlo!SwOLENode::SavePersistentData+0x20b [libre-office-git-repo\sw\source\core\ole\ndole.cxx @ 403]
  swlo!SwNodes::ChgNode+0x411 [libre-office-git-repo\sw\source\core\docnode\nodes.cxx @ 214]
  swlo!SwNodes::MoveNodes+0x18e6 [libre-office-git-repo\sw\source\core\docnode\nodes.cxx @ 868]
  swlo!SwUndoSaveContent::MoveToUndoNds+0x1c1 [libre-office-git-repo\sw\source\core\undo\undobj.cxx @ 784]
  swlo!SwUndoSaveSection::SaveSection+0x559 [libre-office-git-repo\sw\source\core\undo\undobj.cxx @ 1325]
  swlo!SwUndoSaveSection::SaveSection+0x55 [libre-office-git-repo\sw\source\core\undo\undobj.cxx @ 1278]
  swlo!SwUndoFlyBase::DelFly+0x127 [libre-office-git-repo\sw\source\core\undo\undobj1.cxx @ 232]
  swlo!SwUndoDelLayFormat::SwUndoDelLayFormat+0x64 [libre-office-git-repo\sw\source\core\undo\undobj1.cxx @ 429]
  swlo!std::make_unique+0x22 [C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\memory @ 3382]
  swlo!sw::DocumentLayoutManager::DelLayoutFormat+0x283 [libre-office-git-repo\sw\source\core\doc\DocumentLayoutManager.cxx @ 242]
  swlo!SwTextNode::DestroyAttr+0x82 [libre-office-git-repo\sw\source\core\txtnode\thints.cxx @ 1204]
  swlo!SwTextNode::EraseText+0x18f [libre-office-git-repo\sw\source\core\txtnode\ndtxt.cxx @ 2813]
  swlo!SwTextNode::DeleteAttributes+0x115 [libre-office-git-repo\sw\source\core\txtnode\thints.cxx @ 1863]
  swlo!SwXFrame::dispose+0xdb [libre-office-git-repo\sw\source\core\unocore\unoframe.cxx @ 2692]
  mscx_uno!`anonymous namespace'::cpp_call+0x710 [libre-office-git-repo\bridges\source\cpp_uno\msvc_win32_x86-64\uno2cpp.cxx @ 214]
  mscx_uno!unoInterfaceProxyDispatch+0x2fa [libre-office-git-repo\bridges\source\cpp_uno\msvc_win32_x86-64\uno2cpp.cxx @ 430]
  binaryurplo!binaryurp::IncomingRequest::execute_throw+0x635 [libre-office-git-repo\binaryurp\source\incomingrequest.cxx @ 239]
  binaryurplo!binaryurp::IncomingRequest::execute+0xbf [libre-office-git-repo\binaryurp\source\incomingrequest.cxx @ 79]
  binaryurplo!request+0x1c [libre-office-git-repo\binaryurp\source\reader.cxx @ 84]
  cppu3!cppu_threadpool::JobQueue::enter+0x21e [libre-office-git-repo\cppu\source\threadpool\jobqueue.cxx @ 101]
  cppu3!cppu_threadpool::ORequestThread::run+0xa0 [libre-office-git-repo\cppu\source\threadpool\thread.cxx @ 169]

where the call to OleComponent::StoreOwnTmpIfNecessary from
OleEmbeddedObject::StoreObjectToStream was made with m_aMutex
held; and that mutex was attempted to be locked from the main
thread, holding solar mutex.

Change-Id: I1914188728cdaa9cdf22d216ec71f733d7780692
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175117
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-10-18 11:14:16 +02:00
Bogdan Buzea
d8e10f7d94 tdf#163486: PVS: Identical branches
Change-Id: I27de9f10b54478fa265efcb2fa35b8c7e16666f2
V1037: Two or more case-branches perform the same actions. Check lines: 821 and 827, 1962 and 1967, 2006 and 2011.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175052
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-18 10:27:06 +02:00
Sakura286
7bd9aaccb9 tdf#158237 comphelper: Use C++20 contains() instead of find() and end()
Change-Id: I3fc233ffc4c57b02e605306cb9bf3903a88401a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175116
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-18 10:02:51 +02:00
Bogdan Buzea
f6033dca9d tdf#163486: PVS: Identical branches
Change-Id: Id493bc317eb9cf358c79454b7778895b78b7c8aa
V1037: Two or more case-branches perform the same actions. Check lines: 320, 323
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175048
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 09:28:03 +02:00
Bogdan Buzea
5aa3f30a8e tdf#163486: PVS: Identical branches
Change-Id: I4afca4f9d7eb8968dc7a2465222f7c2060f10bd4
V1037: Two or more case-branches perform the same actions. Check lines: 178, 194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175055
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 09:26:43 +02:00
Bogdan Buzea
a7571ddd14 tdf#163486: PVS: Identical branches
Change-Id: I392760b8605588576049e5afda2da64faea3fd00
V1037: Two or more case-branches perform the same actions. Check lines: 486, 489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175049
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-18 09:23:04 +02:00
Xisco Fauli
c0a9c3f97d tdf#163486: PVS: redundant nullptr check
V668 	There is no sense in testing the 'mpMarkedRanges' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
V668 	There is no sense in testing the 'mpMarkedRanges' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.

Change-Id: Iba55f15534cdc9af5b86b288b5c42702ad83dc26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175107
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-18 09:22:04 +02:00
Xisco Fauli
7d9357eb5d tdf#163486: PVS: check pDrawView
V595 	The 'pDrawView' pointer was utilized before it was verified against nullptr. Check lines: 128, 133.

Change-Id: Ic07658428e4eb74d42d800df23b198800a9bab09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175115
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 08:54:46 +02:00
Xisco Fauli
9c4a485194 tdf#163486: PVS: redundant nullptr check
V668 	There is no sense in testing the 'indxc' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
V668 	There is no sense in testing the 'indxr' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.
V668 	There is no sense in testing the 'ipiv' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.

Change-Id: Ifecd9ef5b831e5b312bb428e4d4f72c03cc29b7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175106
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-18 08:50:31 +02:00
Xisco Fauli
104cae64df tdf#163486: PVS: recurring check
V571: Recurring check. The 'xObj' condition was already verified in line 809.
Change-Id: I4b782c9601893ad91598382ea2f999cbd46df75b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175104
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-18 08:49:35 +02:00
Xisco Fauli
d203201261 tdf#163486: PVS: recurring check
V571: Recurring check. The 'if (rEntry.lateInit)' condition was already verified in line 400.
Change-Id: I0a126691213440520bab4b5bd2f2363dfdd57e52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175103
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 08:49:15 +02:00
Xisco Fauli
5a384cc233 tdf#163486: PVS: recurring check
V571: Recurring check. The 'if (m_pListener)' condition was already verified in line 104.

After 4d07ee9a54
"loplugin:virtualdead"

Change-Id: I12e90376211f3625cdda482909a96d43fe55cc3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175096
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 08:48:59 +02:00
Xisco Fauli
a21b9064e8 tdf#163486: PVS: check GetView()
V595 	The 'GetView()' pointer was utilized before it was verified against nullptr. Check lines: 518, 531.

Change-Id: I9c6ebccabece0923702e6a8fb4ee6beb9b6dc198
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175114
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-18 08:46:38 +02:00
Xisco Fauli
954f061b93 tdf#163486: PVS: redundant nullptr check
V668 	There is no sense in testing the 'pInfo' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.

Change-Id: Ie6a701c8fd8d6a0386e83012d59389edaccea93e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175109
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 08:45:23 +02:00
Xisco Fauli
47781b6733 tdf#163486: PVS: redundant nullptr check
V668 	There is no sense in testing the 'pCommentAction' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.

Change-Id: I3fa6619f80edefd852693190ebf463f694c8b55c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175108
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-18 08:45:06 +02:00
Xisco Fauli
eeca3ea101 tdf#163486: PVS: check mpViewSh
V595 	The 'mpViewSh' pointer was utilized before it was verified against nullptr. Check lines: 704, 713.

Change-Id: I5c1902d9aa9a33e62cf2aa559bab9c0b3f45f688
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175112
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 08:43:36 +02:00
Xisco Fauli
440286f8f7 tdf#163486: PVS: condition is always true
V654 	The condition '!bFound' of loop is always true.

Change-Id: Ib37444255641f902a6833e222dfe1ee001376ea3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175110
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 08:43:05 +02:00
Xisco Fauli
0f600f307b tdf#163486: PVS: remove break
Since 07f8216e57
"Create string from token array directly from ScTokenArray. Still WIP."

V622 	Consider inspecting the 'switch' statement. It's possible that the first 'case' operator is missing.

Change-Id: I5916fb8db4db3a0c238660a35ad1b5d985387292
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175111
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-18 08:42:24 +02:00
Gabor Kelemen
511d5a487d find-unneeded-includes: add option to detect IWYU failures
In some cases IWYU may fail to run and give back -1 status
- A file does not have any headers included, such as
sw/source/ui/vba/vbawordbasic.hxx
- A header includes itself such as
sw/source/ui/vba/vbaformfielddropdownlistentries.hxx
- Checking headers is not called with correct -I switches
such as with sw/source/writerfilter/dmapper/*hxx misses
-I/home/gabor/core/sw/source/writerfilter/inc

Such cases were not handled/reported separately so far, so add a
debug-like option to detect similar errors.

Solving such issues is still down the road.

Change-Id: I47ac876eb4eb4a0c16bd838ce3c3e4d604a07a7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175099
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-10-18 08:30:41 +02:00
Heiko Tietze
608353f563 Relates tdf#162979 - Fix typo
Fixes patch 74e3f47723

Change-Id: I3cd596f15c1d0ebc600b9b5f1bffa87b5225d0d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175091
Tested-by: Jenkins
Reviewed-by: Vernon, Stuart Foote <vsfoote@libreoffice.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-10-18 02:53:23 +02:00
Dr. David Alan Gilbert
b4faa1775d tdf#148526 sdext,pdfimport: clipToStrokePath: Set line join
Set the line join type from our GC.

Change-Id: I8f64ae032930e46028cd49efefb05af06d4866d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172926
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-18 00:50:20 +02:00
Dr. David Alan Gilbert
84cc3180c8 tdf#148526 sdext,pdfimport: rendering::PathJoinType to B2DLineJoin
Pdfimport is one of the few none render pieces of code to use
css::rendering::PathJoinType, switch to using basegfx::B2DLineJoin
instead.
Use that type consistently instead of throwing in sal_Int8's with it.

Change-Id: Ie1384a06558925c796ce6c83b458b4c150bcecc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172925
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-18 00:50:06 +02:00
Dr. David Alan Gilbert
53d5b3119f tdf#148526 sdext,pdfimport: Expand path to contour
Poppler's 'ClipToStroke' call wants to clip to a paths rendered
shape, i.e. with line thickness and possibly other attributes.

Use get2DDecomposition to do that.

Change-Id: I3ca54621dcb859520504e5c7d6cd41106f5c34d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172924
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Tested-by: Jenkins
2024-10-18 00:49:42 +02:00
Xisco Fauli
f488136a72 tdf#163486: PVS: Expression is always false
V547: Expression 'aMDHelper.ISSET_Storage' is always false.
Change-Id: Ibdeb820b606301f729bf09a3641ab44d726e356c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175095
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-17 22:23:26 +02:00
Xisco Fauli
43cec3f814 tdf#163486: PVS: nullptr dereference
V595: The 'pMethod' pointer was utilized before it was verified against nullptr. Check lines: 392, 394.

Change-Id: I7c3cdcf9aacb76ca261733924dc238e836036433
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175080
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-17 22:23:01 +02:00
Caolán McNamara
3bcf854a2f cid#1557611 Data race condition
Change-Id: Id8a60317bcf068132900d4aff8d64dd9ad6dd8c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175064
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-17 22:16:52 +02:00
Caolán McNamara
819cae19db tdf#159007 Revert "optimization to skip SdrObject::GetViewContent()"
This reverts commit 313be60790.

Change-Id: I2dc7489ecc302473edd763fd0e4d6784fadc9bb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175094
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-17 22:16:40 +02:00
Xisco Fauli
9250f27dad tdf#163486: PVS: Identical branches
V1037: Two or more case-branches perform the same actions. Check lines: 996, 999
Change-Id: Idfec4df06a578c63e52ef053b73dfa2d55b5cbf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175089
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-17 21:01:20 +02:00
Xisco Fauli
5ddac2a6e2 tdf#163486: PVS: identical conditional expressions
V581: The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 422, 426.

Change-Id: Ib2bcd4b170b827c325628e0e7eabe6a19ca399ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175086
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-17 21:01:03 +02:00
Xisco Fauli
ad09bf7477 tdf#163486: PVS: identical conditional expressions
V581: The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 507, 520.

Change-Id: Ia376cad05bd4327662cd3b7adcbe43e25270da2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175084
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-10-17 21:00:51 +02:00
Xisco Fauli
3a2e5c6d93 tdf#163486: PVS: identical conditional expressions
V581: The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 406, 410.
V581: The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 410, 418.

Change-Id: I971f243870a96f7195d2819f2a0a44bb63840fac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175083
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-17 21:00:30 +02:00
Xisco Fauli
6958a8259c tdf#163486: PVS: identical conditional expressions
V581: The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 153, 157.

Change-Id: I55b32aa4dfd479c3b64044a6749c3981f3b032a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175082
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-10-17 21:00:01 +02:00
Dr. David Alan Gilbert
a61eff73a1 tdf#148526 sdext,pdfimport: Parse clipToStrokePath
Parse the soon to be created clipToStrokePath command and route
it through the tree code.

Change-Id: I8fa17457ffd062e91983b6ed80bd64259aa7114e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172923
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-17 20:49:00 +02:00
Caolán McNamara
7b218d6b4f cid#1555697 Data race condition
Change-Id: Ib022e1fbccf456e89f16a26efb50e6c8d98372ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175065
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-17 20:25:29 +02:00
Caolán McNamara
c2dda4579d cid#1555171 Data race condition
Change-Id: Ibb49dbd5ce386c4e31c1dfbacb23477d1a08a5ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175069
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-17 20:25:15 +02:00
Justin Luth
4b675143b4 tdf#34804 sd: enable keyboard shortcut for CharColor and CharBackColor
A followup patch that adds keyboard shortcut support to Draw/Impress
for .uno:Color and .uno:CharBackColor to use recentColor.

Change-Id: I1eea3b8330ca3c10e20b13e0fa83c15418eee6a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174828
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2024-10-17 20:07:50 +02:00
Justin Luth
cdd00486a7 tdf#34804 sc: enable keyboard shortcut for CharColor and CharBackColor
A followup patch that adds keyboard shortcut support to Calc
for .uno:Color and .uno:CharBackColor to use recentColor.

Note that for Writer, it was .uno:FontColor (SID_ATTR_CHAR_COLOR2)
but the rest of the applications are .uno:Color (SID_ATTR_CHAR_COLOR)

I purposely did not add CharBackColor support to native Calc.
Notice that the "fill" icon on the toolbar is CELL-background, so the
color used would NOT NECESSARILY match what is seen in the toolbar,
and the sidebar also does not include a CharBackColor button.
[See patchset 1 for stuff needed for implementation.]

formatsh is for entire cells - .uno:Color opens dialog when no args: OK

editsc is for cursor-in-cell and for cursor-in-formula-bar.

drtxtobj is for comments, shapes, and textboxes (draw stuff).

Change-Id: I104b39eab1d475fc5c88837addf4bdbbd313d1be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174827
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2024-10-17 19:28:06 +02:00
Justin Luth
1c7740f33b tdf#34804 swdr: enable keyboard shortcut for CharColor and CharBackColor
A followup patch that adds keyboard shortcut support
for the draw objects (textbox, shapes, comments) in Writer.

Change-Id: I69dea0feb75c77fec615a3e478d4bb90db4ca84f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174805
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2024-10-17 19:25:50 +02:00
Julien Nabet
5206f500e7 Fix Gtk-warning in condformatmanager.ui
(soffice:502622): Gtk-WARNING **: 13:08:51.061: Could not read property GtkBox:position with value  of type gint: Could not parse integer ''

Change-Id: I43b1a0fd8d67ef60e9c252b914b4fe2d00d97c89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175079
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-10-17 18:23:39 +02:00
Caolán McNamara
84ed46d7ee don't need to use dlsym for cairo_surface_set_device_scale...
for bundled cairo case

Change-Id: I8ca48433b3be144d8347defe3831b92cc87d7cbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175081
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-17 17:49:07 +02:00
Stephan Bergmann
7be32268e0 Fix experimental Emscripten --enable-qt6 build resource issues
...where window decoration icons and menu text glyphs were missing

Change-Id: Iadff019a99fbe96442fc010df0d019ba5e2b98e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175088
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-10-17 17:39:03 +02:00
Justin Luth
bc21a85029 tdf#34804 sw: enable keyboard shortcut for CharColor and CharBackColor
The result of this patch is that a keyboard shortcut can now
set the font fore-/back-ground color using the
color shown in the toolbar/sidebar.

This is now possible thanks to Maxim's work in 7.6.2
    tdf#154270 Sync toolbar button recent colors
and Andreas Heinisch's 24.8 commit 8c822b764b
    tdf#72991 - Remember last used color depending in cui

This patch does 3 things:
1. SetRecentColor when the app initializes
2. Uses SID_ATTR_CHAR_COLOR's recentColor for .uno:FontColor
   if no pItem was provided (i.e. a keyboard shortcut called it)
3. Uses SID_ATTR_CHAR_BACK_COLOR's recentColor for .uno:CharBackColor
   if no pItem was provided
   (Note that without a selection,
   CharBackColor isn't so useful for a keyboard shortcut,
   since it turns the drag-and-drop template on.)

Setting the recent color right away is critical for user acceptance.
Otherwise, it would only function after they first modified the color
in the toolbar/sidebar.

make CppunitTest_sw_uiwriter9 CPPUNIT_TEST_NAME=testTdf34804

Unfortunately, I can't reliably know if this request
came from an awt::KeyEvent or not, because in that case
we could just avoid CharBackColor's template altogether.
[While there is rReq.GetModifiers() as a good hint,
it is not a guarantee (in case assigned to a function key,
or CTRL held while clicking the toolbar, etc.)]

Change-Id: I7377f087dcdf7011205af005cd0d172100bade2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174804
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2024-10-17 17:33:49 +02:00