106 Commits
Author SHA1 Message Date
Andrea Gelmini 07f953efe1 Fix typos
Change-Id: I548322572d506e7adaab54f49ff53b248bb4fd01

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209803
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 14:58:15 +02:00
Xisco Fauli 2ea359044c drawinglayer: GeoTexSvxBitmapEx*-> GeoTexSvxBitmap*
After
commit 805ef97f52
Author: Noel Grandin <noelgrandin@gmail.com>
Date:   Tue Aug 12 22:19:45 2025 +0200

    BitmapEx->Bitmap in GeoTexSvx

Change-Id: Ic393ff4de51be0eb8c5859605135695f8f92f472
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197587
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-01-20 08:51:25 +01:00
Tomaž Vajngerl 959decdcda basegfx: BColorStops shouldn't derive from std::vector
Change-Id: I9f246c0d9a5ddc7f8cf428bf7fc8c8957e8584b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158710
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
2025-12-08 13:40:28 +01:00
Gabor Kelemen cf1403343d tdf#146619 Run IWYU on drawinglayer/
Change-Id: I0cdefb89bedfbe4d733edb89c9ed2e7a9b37c947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190907
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Jenkins
2025-09-17 19:23:05 +02:00
Noel Grandin d00361bbb9 loplugin:unusedmethods
Change-Id: I89922f71f6bc7120410a8710e51240dd548f0fd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190578
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-09-04 17:59:37 +02:00
Noel Grandin 805ef97f52 BitmapEx->Bitmap in GeoTexSvx
now that Bitmap supports transparency

Change-Id: Icb6dad0921079144e3c6b76014f129e205a0f27c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189455
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-08-13 14:30:28 +02:00
Caolán McNamara b926ef35af null deref of empty AlphaMask
(gdb) print mpReadTransparence.moAccess._M_payload._M_payload._M_value.mpBuffer
 $18 = (BitmapBuffer *) 0x0

 #0  BitmapReadAccess::GetScanline (this=<optimized out>, nY=<optimized out>) at /opt/rh/devtoolset-12/root/usr/include/c++/12/optional:484
 #1  BitmapReadAccess::GetPixel (nX=<optimized out>, nY=<optimized out>, this=<optimized out>) at include/vcl/BitmapReadAccess.hxx:83
 #2  drawinglayer::texture::GeoTexSvxBitmapEx::impGetAlpha (this=this@entry=0x3a073610, rX=rX@entry=60, rY=rY@entry=420)
     at drawinglayer/source/texture/texture3d.cxx:111
 #3  0x00007f4cc4baba0e in drawinglayer::texture::GeoTexSvxBitmapEx::impGetAlpha (rY=420, rX=<optimized out>, this=0x3a073610)
     at drawinglayer/source/texture/texture3d.cxx:152
 #4  drawinglayer::texture::GeoTexSvxBitmapEx::modifyBColor (this=0x3a073610, rUV=..., rBColor=..., rfOpacity=@0x7f4cabbba638: 1)
     at drawinglayer/source/texture/texture3d.cxx:152
 #5  0x00007f4cc4ba9a31 in ZBufferRasterConverter3D::decideColorAndOpacity (this=this@entry=0x39db6260, rColor=...)
     at drawinglayer/source/processor3d/zbufferprocessor3d.cxx:119
 #6  0x00007f4cc4ba4d9c in ZBufferRasterConverter3D::processLineSpan (this=0x39db6260, rA=..., rB=..., nLine=<optimized out>, nSpanCount=<optimized out>)
     at drawinglayer/source/processor3d/zbufferprocessor3d.cxx:305
 #7  0x00007f4cc438d5f6 in basegfx::RasterConverter3D::rasterconvertB3DArea(int, int) ()
     at basegfx/source/raster/rasterconvert3d.cxx:129
 #8  0x00007f4cc4ba0ac7 in drawinglayer::processor3d::DefaultProcessor3D::impRenderPolyPolygonMaterialPrimitive3D(drawinglayer::primitive3d::PolyPolygonMaterialPrimitive3D const&) const ()
     at drawinglayer/source/processor3d/defaultprocessor3d.cxx:448
 #9  0x00007f4cc4b9fcc9 in drawinglayer::processor3d::BaseProcessor3D::process (this=this@entry=0x39da04c0, rSource=...) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/stl_deque.h:263
 #10 0x00007f4cc4ba1ca0 in drawinglayer::processor3d::DefaultProcessor3D::impRenderBitmapTexturePrimitive3D(drawinglayer::primitive3d::BitmapTexturePrimitive3D const&) ()
     at drawinglayer/source/processor3d/defaultprocessor3d.cxx:263
 #11 0x00007f4cc4b9fcc9 in drawinglayer::processor3d::BaseProcessor3D::process (this=this@entry=0x39da04c0, rSource=...) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/stl_deque.h:263
 #12 0x00007f4cc4ba2846 in drawinglayer::processor3d::DefaultProcessor3D::processBasePrimitive3D(drawinglayer::primitive3d::BasePrimitive3D const&) ()
     at include/drawinglayer/processor3d/baseprocessor3d.hxx:63
 #13 0x00007f4cc4b9fcc9 in drawinglayer::processor3d::BaseProcessor3D::process (this=0x39da04c0, rSource=...) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/stl_deque.h:263
 #14 0x00007f4cc4b3a225 in drawinglayer::primitive2d::ScenePrimitive2D::Executor::doWork (this=0x39e13950) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:461
 #15 0x00007f4cc4868fe7 in comphelper::ThreadTask::exec() () at comphelper/source/misc/threadpool.cxx:319
 #16 0x00007f4cc4869c61 in comphelper::ThreadPool::ThreadWorker::execute (this=0x39e13aa0) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:461
 #17 0x00007f4cc144f33f in salhelper::Thread::run() () at salhelper/source/thread.cxx:39
 #18 0x00007f4cc144fe94 in osl::threadFunc (param=0x39e13ab0) at include/osl/thread.hxx:189
 #19 0x00007f4cc14e0563 in osl_thread_start_Impl (pData=0x39120800) at sal/osl/unx/thread.cxx:237
 #20 0x00007f4ccae5f6db in start_thread (arg=0x7f4cabbcb700) at pthread_create.c:463
 #21 0x00007f4ccab8874f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Change-Id: Ic30b38dc1c53c9df551a282c6a057d042265419e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186222
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-06-06 16:23:37 +02:00
Caolán McNamara 8f008bf4b9 cid#1554812 COPY_INSTEAD_OF_MOVE
and

cid#1555227 COPY_INSTEAD_OF_MOVE
cid#1555329 COPY_INSTEAD_OF_MOVE
cid#1555384 COPY_INSTEAD_OF_MOVE
cid#1555387 COPY_INSTEAD_OF_MOVE
cid#1555399 COPY_INSTEAD_OF_MOVE
cid#1555400 COPY_INSTEAD_OF_MOVE
cid#1555406 COPY_INSTEAD_OF_MOVE

Change-Id: I85dc45e2686c6b3e8b97a23872cb26416edc27c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171178
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-29 14:50:38 +02:00
RMZeroFour 68c04836ab tdf#160084 Simplify comparing with zero when using fTools
As part of the efforts in #160084 to simplify parts of the codebase
by replacing basegfx::fTools::more/less calls with direct comparisions
against zero, this commit performs the changes in a few files in the
drawinglayer/ module.

PS-2: Fix wrong identifier, courtesy of an accidental backspace press...

Change-Id: I52a183dda5ae11989f8ffc8b26ff16ac77d6ebb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165600
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-04-18 15:19:33 +02:00
Patrick Luby 86c3105fdb tdf#159515 rename impGetTransparence() to impGetAlpha()
Commit 81994cb2b8 makes
impGetTransparence() return alpha instead of transparence. So,
rename the function and skip reverting the result to obtain the
alpha value.

Change-Id: Ied3bf8ae4a0de2ae36074dba9f78ccc93480b15a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164322
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
Tested-by: Patrick Luby <guibomacdev@gmail.com>
2024-03-04 13:27:46 +01:00
Noel Grandin a214ac6774 simplify and modernise ScopedBitmapAccess
(*) Make all of it use a "Scoped" paradigm
(*) pass by value, no need to allocate on heap
(*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods.
(*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places.

Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-07 09:32:14 +01:00
Noel Grandin fdd06037e0 improved B2DHomMatrix
since we know that this is a matrix only used for 2D transforms,
we know that the last row of the matrix is always { 0, 0, 1 }.

Therefore, we don't need to store that information, and
we can simplify some of the computations.

Also remove operations like operator+ which are not legal for
such a matrix.

Change-Id: I482de9a45ebbedf79e3b6033575aab590e61c2d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151909
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-18 21:18:06 +02:00
Armin Le Grand (allotropia) 438f0752de MCGR: consolidations/cleanups for changes so far
Change-Id: I85cf40e4803b0485bb40349d8e81adc8123666c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151706
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-05-15 15:19:53 +02:00
Armin Le Grand (allotropia) 81e77bcc7c MCGR: Correct interpolate TextureMap due to possible zero value
Change-Id: I5b2fe354077bea659f522e5b5c839be1f4cae1c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151568
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-05-09 15:03:11 +02:00
Stephan Bergmann 93915c0be3 Avoid more division by zero
Similar to <https://gerrit.libreoffice.org/c/core/+/151495> "Avoid division by
zero", CppunitTest_sw_ooxmlexport7 CPPUNIT_TEST_NAME=testFdo78957::TestBody
started to fail with

> drawinglayer/source/texture/texture.cxx:470:71: runtime error: division by zero
>  #0 in drawinglayer::texture::GeoTexSvxGradientRadial::appendTransformationsAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) at drawinglayer/source/texture/texture.cxx:470:71
>  #1 in drawinglayer::primitive2d::FillGradientPrimitive2D::generateMatricesAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) const at drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:99:31
>  #2 in drawinglayer::processor2d::VclPixelProcessor2D::processFillGradientPrimitive2D(drawinglayer::primitive2d::FillGradientPrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:1017:24
>  #3 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:363:13
>  #4 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #5 in drawinglayer::processor2d::VclProcessor2D::RenderMaskPrimitive2DPixel(drawinglayer::primitive2d::MaskPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:866:9
>  #6 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:257:13
>  #7 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #8 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #9 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>  #10 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #11 in drawinglayer::processor2d::VclPixelProcessor2D::processPolyPolygonGradientPrimitive2D(drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:490:9
>  #12 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:232:13
>  #13 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #14 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #15 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>  #16 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #17 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #18 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #19 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #20 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>  #21 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #22 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #23 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #24 in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>  #25 in drawinglayer::primitive2d::GroupPrimitive2D::getChildren(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&) const at include/drawinglayer/primitive2d/groupprimitive2d.hxx:76:90
>  #26 in drawinglayer::primitive2d::GroupPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const at drawinglayer/source/primitive2d/groupprimitive2d.cxx:53:13
>  #27 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>  #28 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:378:13
>  #29 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #30 in drawinglayer::processor2d::VclProcessor2D::RenderTransformPrimitive2D(drawinglayer::primitive2d::TransformPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:1004:5
>  #31 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:284:13
>  #32 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #33 in drawinglayer::processor2d::VclProcessor2D::RenderTransformPrimitive2D(drawinglayer::primitive2d::TransformPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:1004:5
>  #34 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:284:13
>  #35 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #36 in drawinglayer::processor2d::VclProcessor2D::RenderTransformPrimitive2D(drawinglayer::primitive2d::TransformPrimitive2D const&) at drawinglayer/source/processor2d/vclprocessor2d.cxx:1004:5
>  #37 in drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) at drawinglayer/source/processor2d/vclpixelprocessor2d.cxx:284:13
>  #38 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) at drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>  #39 in drawinglayer::convertToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&&, drawinglayer::geometry::ViewInformation2D const&, unsigned int, unsigned int, unsigned int) at drawinglayer/source/tools/converters.cxx:217:24
>  #40 in drawinglayer::convertPrimitive2DContainerToBitmapEx(drawinglayer::primitive2d::Primitive2DContainer&&, basegfx::B2DRange const&, unsigned int, o3tl::Length, std::optional<Size> const&) at drawinglayer/source/tools/converters.cxx:332:28
>  #41 in SvxShape::GetBitmap(bool) const at svx/source/unodraw/unoshape.cxx:717:21
>  #42 in SvxShape::getPropertyValueImpl(rtl::OUString const&, SfxItemPropertyMapEntry const*, com::sun::star::uno::Any&) at svx/source/unodraw/unoshape.cxx:2597:18
>  #43 in SvxCustomShape::getPropertyValueImpl(rtl::OUString const&, SfxItemPropertyMapEntry const*, com::sun::star::uno::Any&) at svx/source/unodraw/unoshap2.cxx:1780:26
>  #44 in SvxShape::_getPropertyValue(rtl::OUString const&) at svx/source/unodraw/unoshape.cxx:1638:14
>  #45 in SvxShape::getPropertyValue(rtl::OUString const&) at svx/source/unodraw/unoshape.cxx:1622:16
>  #46 in non-virtual thunk to SvxShape::getPropertyValue(rtl::OUString const&) at svx/source/unodraw/unoshape.cxx
>  #47 in SwXShape::_getPropAtAggrObj(rtl::OUString const&) at sw/source/core/unocore/unodraw.cxx:1823:23
>  #48 in SwXShape::getPropertyValue(rtl::OUString const&) at sw/source/core/unocore/unodraw.cxx:1753:20
>  #49 in non-virtual thunk to SwXShape::getPropertyValue(rtl::OUString const&) at sw/source/core/unocore/unodraw.cxx
>  #50 in writerfilter::TagLogger::unoPropertySet(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> const&) at writerfilter/source/dmapper/TagLogger.cxx:123:47
>  #51 in writerfilter::dmapper::DomainMapper_Impl::PushShapeContext(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) at writerfilter/source/dmapper/DomainMapper_Impl.cxx:4204:38
>  #52 in writerfilter::dmapper::DomainMapper::lcl_startShape(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) at writerfilter/source/dmapper/DomainMapper.cxx:3680:18
>  #53 in writerfilter::LoggedStream::startShape(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&) at writerfilter/source/dmapper/LoggedResources.cxx:139:5
>  #54 in writerfilter::ooxml::OOXMLFastContextHandlerShape::sendShape(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1810:19
>  #55 in writerfilter::ooxml::OOXMLFastContextHandlerShape::lcl_endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1829:9
>  #56 in writerfilter::ooxml::OOXMLFastContextHandler::endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:223:9
>  #57 in (anonymous namespace)::Entity::endElement() at sax/source/fastparser/fastparser.cxx:515:27
>  #58 in sax_fastparser::FastSaxParserImpl::callbackEndElement() at sax/source/fastparser/fastparser.cxx:1330:17
>  #59 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) at sax/source/fastparser/fastparser.cxx:339:18
>  #60 in xmlParseEndTag2 at workdir/UnpackedTarball/libxml2/parser.c:9742:2
>  #61 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11642:14
>  #62 in xmlParseChunk at workdir/UnpackedTarball/libxml2/parser.c:12351:13
>  #63 in sax_fastparser::FastSaxParserImpl::parse() at sax/source/fastparser/fastparser.cxx:1111:25
>  #64 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:891:9
>  #65 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1469:13
>  #66 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:515:18
>  #67 in writerfilter::dmapper::DomainMapper_Impl::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&) at writerfilter/source/dmapper/DomainMapper_Impl.cxx:9143:14
>  #68 in writerfilter::dmapper::DomainMapper::lcl_substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>>) at writerfilter/source/dmapper/DomainMapper.cxx:4390:14
>  #69 in writerfilter::LoggedStream::substream(unsigned int, tools::SvRef<writerfilter::Reference<writerfilter::Stream>>) at writerfilter/source/dmapper/LoggedResources.cxx:272:5
>  #70 in writerfilter::ooxml::OOXMLDocumentImpl::resolveFastSubStreamWithId(writerfilter::Stream&, tools::SvRef<writerfilter::Reference<writerfilter::Stream>> const&, unsigned int) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:126:13
>  #71 in writerfilter::ooxml::OOXMLDocumentImpl::resolveHeader(writerfilter::Stream&, int, rtl::OUString const&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:385:10
>  #72 in writerfilter::ooxml::OOXMLFastContextHandler::resolveHeader(int, rtl::OUString const&) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:888:35
>  #73 in writerfilter::ooxml::OOXMLHeaderHandler::finalize() at writerfilter/source/ooxml/Handler.cxx:214:20
>  #74 in writerfilter::ooxml::OOXMLFastContextHandlerProperties::handleHdrFtr() at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1113:28
>  #75 in writerfilter::ooxml::OOXMLFactory_wml::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at workdir/CustomTarget/writerfilter/source/ooxml/OOXMLFactory_wml.cxx:7482:26
>  #76 in writerfilter::ooxml::OOXMLFactory::endAction(writerfilter::ooxml::OOXMLFastContextHandler*) at writerfilter/source/ooxml/OOXMLFactory.cxx:157:19
>  #77 in writerfilter::ooxml::OOXMLFastContextHandler::endAction() at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:316:5
>  #78 in writerfilter::ooxml::OOXMLFastContextHandlerProperties::lcl_endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:1034:9
>  #79 in writerfilter::ooxml::OOXMLFastContextHandler::endFastElement(int) at writerfilter/source/ooxml/OOXMLFastContextHandler.cxx:223:9
>  #80 in (anonymous namespace)::Entity::endElement() at sax/source/fastparser/fastparser.cxx:515:27
>  #81 in sax_fastparser::FastSaxParserImpl::callbackEndElement() at sax/source/fastparser/fastparser.cxx:1330:17
>  #82 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) at sax/source/fastparser/fastparser.cxx:339:18
>  #83 in xmlParseTryOrFinish at workdir/UnpackedTarball/libxml2/parser.c:11493:8
>  #84 in xmlParseChunk at workdir/UnpackedTarball/libxml2/parser.c:12351:13
>  #85 in sax_fastparser::FastSaxParserImpl::parse() at sax/source/fastparser/fastparser.cxx:1086:21
>  #86 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:891:9
>  #87 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) at sax/source/fastparser/fastparser.cxx:1469:13
>  #88 in writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) at writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:515:18
>  #89 in (anonymous namespace)::WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at writerfilter/source/filter/WriterFilter.cxx:208:24
>  #90 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) at sfx2/source/doc/objstor.cxx:2272:34
>  #91 in SfxObjectShell::DoLoad(SfxMedium*) at sfx2/source/doc/objstor.cxx:739:23
>  #92 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1940:36
>  #93 in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at sfx2/source/view/frmload.cxx:720:28
>  #94 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1176:37
>  #95 in framework::LoadEnv::start() at framework/source/loadenv/loadenv.cxx:412:20
>  #96 in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) at framework/source/loadenv/loadenv.cxx:308:5
>  #97 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:168:14
>  #98 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx:593:16
>  #99 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/desktop.cxx
>  #100 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at unotest/source/cpp/macros_test.cxx:71:62
>  #101 in UnoApiTest::load(rtl::OUString const&, char const*) at test/source/unoapi_test.cxx:115:11
>  #102 in SwModelTestBase::loadURL(rtl::OUString const&, char const*, char const*) at sw/qa/unit/swmodeltestbase.cxx:470:20
>  #103 in SwModelTestBase::load(char const*, char const*) at sw/qa/inc/swmodeltestbase.hxx:353:16
>  #104 in SwModelTestBase::loadAndSave(char const*) at sw/qa/unit/swmodeltestbase.cxx:523:5
>  #105 in testFdo78957::TestBody() at sw/qa/extras/ooxmlexport/ooxmlexport7.cxx:783:5

Change-Id: Ifbc7da0b6c971df61e9908cc02b10a9f50769fcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151496
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-08 15:17:06 +02:00
Stephan Bergmann d7aaec3d11 Avoid division by zero
bb19817668 "MCGR: Make MCGR default for oox
im/export, cleanup" started to cause CppunitTest_chart2_geometry
CPPUNIT_TEST_NAME=Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import to
fail with the below UBSan failure (even though the relevant code appears to be
even older than that commit).

At least for now, lets silence that by explicitly using +INF in case the divisor
is zero (and the dividend is known non-negative).

> /drawinglayer/source/texture/texture.cxx:246:71: runtime error: division by zero
>     #0 0x7f2e61d80f7f in drawinglayer::texture::GeoTexSvxGradientLinear::appendTransformationsAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) /drawinglayer/source/texture/texture.cxx:246:71
>     #1 0x7f2e616e187d in drawinglayer::primitive2d::FillGradientPrimitive2D::generateMatricesAndColors(std::function<void (basegfx::B2DHomMatrix const&, basegfx::BColor const&)>) const /drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:75:31
>     #2 0x7f2e616e4f4f in drawinglayer::primitive2d::FillGradientPrimitive2D::createFill(drawinglayer::primitive2d::Primitive2DContainer&, bool) const /drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:172:17
>     #3 0x7f2e616e66ca in drawinglayer::primitive2d::FillGradientPrimitive2D::create2DDecomposition(drawinglayer::primitive2d::Primitive2DContainer&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx:269:17
>     #4 0x7f2e76cecd04 in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:36:9
>     #5 0x7f2e619b9278 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>     #6 0x7f2e61a38a25 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:917:13
>     #7 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #8 0x7f2e61a5cc3e in drawinglayer::processor2d::VclMetafileProcessor2D::processMaskPrimitive2D(drawinglayer::primitive2d::MaskPrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2139:13
>     #9 0x7f2e61a3734a in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:833:13
>     #10 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #11 0x7f2e619b952c in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>     #12 0x7f2e76ced03a in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>     #13 0x7f2e619b9278 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>     #14 0x7f2e61a595e3 in drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonGradientPrimitive2D(drawinglayer::primitive2d::PolyPolygonGradientPrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2014:9
>     #15 0x7f2e61a36fc0 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:821:13
>     #16 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #17 0x7f2e61a2e0da in drawinglayer::processor2d::VclMetafileProcessor2D::impDumpToMetaFile(drawinglayer::primitive2d::Primitive2DContainer const&, GDIMetaFile&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:244:5
>     #18 0x7f2e61a60f4a in drawinglayer::processor2d::VclMetafileProcessor2D::processTransparencePrimitive2D(drawinglayer::primitive2d::TransparencePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:2292:52
>     #19 0x7f2e61a378cb in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:851:13
>     #20 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #21 0x7f2e619b952c in drawinglayer::processor2d::BaseProcessor2D::visit(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:56:13
>     #22 0x7f2e76ced03a in drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(drawinglayer::primitive2d::Primitive2DDecompositionVisitor&, drawinglayer::geometry::ViewInformation2D const&) const /drawinglayer/source/primitive2d/BufferedDecompositionPrimitive2D.cxx:41:14
>     #23 0x7f2e619b9278 in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:46:24
>     #24 0x7f2e61a38a25 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:917:13
>     #25 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #26 0x7f2e61a68781 in drawinglayer::processor2d::VclMetafileProcessor2D::processObjectInfoPrimitive2D(drawinglayer::primitive2d::ObjectInfoPrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:965:5
>     #27 0x7f2e61a38916 in drawinglayer::processor2d::VclMetafileProcessor2D::processBasePrimitive2D(drawinglayer::primitive2d::BasePrimitive2D const&) /drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx:910:13
>     #28 0x7f2e619b9a5f in drawinglayer::processor2d::BaseProcessor2D::process(drawinglayer::primitive2d::Primitive2DContainer const&) /drawinglayer/source/processor2d/baseprocessor2d.cxx:68:21
>     #29 0x7f2df2676731 in sdr::contact::ObjectContactOfPageView::DoProcessDisplay(sdr::contact::DisplayInfo&) /svx/source/sdr/contact/objectcontactofpageview.cxx:277:31
>     #30 0x7f2df26741be in sdr::contact::ObjectContactOfPageView::ProcessDisplay(sdr::contact::DisplayInfo&) /svx/source/sdr/contact/objectcontactofpageview.cxx:117:21
>     #31 0x7f2df291809d in SdrPageWindow::RedrawAll(sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/sdrpagewindow.cxx:357:28
>     #32 0x7f2df363584c in SdrPageView::CompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/svdpagv.cxx:239:18
>     #33 0x7f2df36a80b0 in SdrPaintView::DoCompleteRedraw(SdrPaintWindow&, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/svdpntv.cxx:609:21
>     #34 0x7f2df36a7b61 in SdrPaintView::CompleteRedraw(OutputDevice*, vcl::Region const&, sdr::contact::ViewObjectContactRedirector*) /svx/source/svdraw/svdpntv.cxx:522:5
>     #35 0x7f2df3ec0413 in (anonymous namespace)::GraphicExporter::GetGraphic((anonymous namespace)::ExportSettings const&, Graphic&, bool) /svx/source/unodraw/UnoGraphicExporter.cxx:740:24
>     #36 0x7f2df3ec857b in (anonymous namespace)::GraphicExporter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /svx/source/unodraw/UnoGraphicExporter.cxx:1037:19
>     #37 0x7f2db53f082a in chart::ChartView::getMetaFile(com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> const&, bool) /chart2/source/view/main/ChartView.cxx:263:20
>     #38 0x7f2db53f1d43 in chart::ChartView::getTransferData(com::sun::star::datatransfer::DataFlavor const&) /chart2/source/view/main/ChartView.cxx:285:11
>     #39 0x7f2db53f28ae in non-virtual thunk to chart::ChartView::getTransferData(com::sun::star::datatransfer::DataFlavor const&) /chart2/source/view/main/ChartView.cxx
>     #40 0x7f2db586547f in chart::ChartModel::getPreferredVisualRepresentation(long) /chart2/source/model/main/ChartModel.cxx:1054:44
>     #41 0x7f2db586779e in non-virtual thunk to chart::ChartModel::getPreferredVisualRepresentation(long) /chart2/source/model/main/ChartModel.cxx
>     #42 0x7f2db8401589 in OCommonEmbeddedObject::getPreferredVisualRepresentation(long) /embeddedobj/source/commonembedding/visobj.cxx:186:48
>     #43 0x7f2e95742555 in comphelper::EmbeddedObjectContainer::GetGraphicReplacementStream(long, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&, rtl::OUString*) /comphelper/source/container/embeddedobjectcontainer.cxx:1428:54
>     #44 0x7f2e9573f6b4 in comphelper::EmbeddedObjectContainer::StoreAsChildren(bool, bool, bool, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&) /comphelper/source/container/embeddedobjectcontainer.cxx:1198:31
>     #45 0x7f2e044c7a1f in SfxObjectShell::SaveAsChildren(SfxMedium&) /sfx2/source/doc/objstor.cxx:3316:38
>     #46 0x7f2e044c6d0c in SfxObjectShell::SaveAs(SfxMedium&) /sfx2/source/doc/objstor.cxx:160:12
>     #47 0x7f2e0c509471 in sd::DrawDocShell::SaveAs(SfxMedium&) /sd/source/ui/docshell/docshel4.cxx:602:33
>     #48 0x7f2e0453a4ec in SfxObjectShell::SaveAsOwnFormat(SfxMedium&) /sfx2/source/doc/objstor.cxx:3256:16
>     #49 0x7f2e0c513d7d in sd::DrawDocShell::SaveAsOwnFormat(SfxMedium&) /sd/source/ui/docshell/docshel4.cxx:924:28
>     #50 0x7f2e044f8b0c in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) /sfx2/source/doc/objstor.cxx:1457:23
>     #51 0x7f2e04534ef5 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/objstor.cxx:2993:39
>     #52 0x7f2e0452c40c in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/objstor.cxx:2783:9
>     #53 0x7f2e04486556 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t> >, SfxItemSet&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/objserv.cxx:319:19
>     #54 0x7f2e046d7afe in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) /sfx2/source/doc/sfxbasemodel.cxx:3151:42
>     #55 0x7f2e046de8db in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1785:13
>     #56 0x7f2dff75b078 in UnoApiTest::save(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:174:16
>     #57 0x7f2e63063d61 in Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import() /chart2/qa/extras/chart2geometry.cxx:322:5

(<>https://ci.libreoffice.org//job/lo_ubsan/2766/)

Change-Id: I72650fba2ee7ba339ec78d24dd690487c31e2600
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151495
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-05-08 15:16:56 +02:00
Armin Le Grand (allotropia) 4b5203ebf4 MCGR: Improve performance for texture-mapped MCGR processing
Change-Id: I20b32e7c272112c6c3d9f7ee0ef59c6d4d006d94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150020
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-04-04 18:55:49 +02:00
Armin Le Grand (allotropia) 462ebbd10b MCGR: Speedup Gradient Paint for VCLPixelProcessor
To do this, I re-organized FillGradientPrimitive2D and
how it creates it's decompose. This provides the needed
tooling to also do a more direct rendering in primitive
processors if needed.

The decompose no longer collects the matrices & colors
as a 1st step in a helper data struecture (so I removed
B2DHomMatrixAndBColor). It now uses a lambda function
callback that hands over the matrix & color for each
created step, so you can process it directly, in this
case to create the needed primitives.

NOTE: The decompositions are both tested. There was
createNonOverlappingFill, but also createOverlappingFill
that I am not sure is still used - and if in re-creating
an old, strange XOR-using gradient paint mechanism in
old metafiles (encapsulated with gradient info anyways),
but I converted that and made sure it works.
To do so I forced it to be used in paint. This is not
really usable in paint since we need to paint using AA
(else we would get staircase effects, esp. in new 'hard'
color changes in multi-color gradients) and - as should
be known - same edges painted in AA do *not* add up to
full opacity, but leave behind awful 'jaggies' (e.g.
opacity 0.5 and 0.5 create 0.75 and *not* 1.0). Still
important to have the working geometry creation for this
case.

This already makes the decompose faster, but the main
purpose is to use it as tooling for painting in own
primitive renderers.

Thus processFillGradientPrimitive2D now uses that
instead of using the decomposition by default.
This avoids one level of primitive creation, use
that new FillGradientPrimitive2D tooling to directly
create needed geoemtry & color for getting better
performance (to partially compensate for potentially
more expensive multi color gradients). It then paints
directly using OutputDevice calls.

NOTE: This can also be used in SDPRs as a 1st step
to just directly and rapidly render filled single-
color polygons, but of course there an implementation
using the back-transformations (which are also
adapted for MCGRs aleady and work) will be superior.

Change-Id: I5079f76d6d8fe86007a098614c276447f2bfebce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149456
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-23 17:14:04 +00:00
Andrea Gelmini 6fc0de7ce2 Fix typos
Change-Id: Iaf63fce5295f00e5d6fff020498a01a25fc0ee93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149262
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-22 07:01:51 +00:00
Armin Le Grand (allotropia) 808c5bf663 MCGR: Model data changes for ColorSteps (II)
The biggest change here is to allow multiple ColorStops
with the same Offset. That allows to define gradients
with 'hard' color changes at any place using two
ColorStops with the same Offset and different Colors.
This required quite some adaptions, but works well.

Also removed in this context checking for all Colors
being the same to not mix up things. Also works well.

Also changed the need for having Start/EndColors AKA
ColorStops for 0.0 and 1.0 in place, instead 'imply'
the 1st ColorStop to also define the StartColor and
the last one the EndColor. This allows e.g. Gradient
definitions with two GradientStops at the same
Offset e.g. 0.5 with different colors to already
define a full Gradient.

Also added a tooling method to reverse ColorSteps,
which changes the order and mirrors the Offsets
(what even keeps an existing sort valid).
This is useful e.g. for GradientAxial which is the
only one where for decomposition the Gradient had
to be interpreted 'reverse' since it's defined
from center to edge, but for creating correct filled
polygons to represent this the inverse order had to
be used, creating polygons from edge to center.
This led to 'wild' code for this one of six cases
and prevented unifications with the other cases
(also made your brain flip).
Thus I adapted this now to use the reversed
ColorSteps consequently, and the same principle
loops than the other implementations to make things
easier for the future and to use common tooling.

Change-Id: If2943348d17d5b9cd165f4d78f22638a1dff5237
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149208
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-21 15:53:06 +00:00
Armin Le Grand (allotropia) 01d0019c85 MCGR: Model data changes for ColorSteps
Added tooling replaceStart/EndColor to allow simple
transition for code that does not immediately adapt
to multi color gradients. Also added
createColorStepsFromStartEndColor for the same
purpose.

Adapted XGradient to no longer have Start/EndColor
at all, but only use ColorSteps.

Adapted all usages of XGradient to no longer use
Get/Set/Start/EndColor, but access the ColorSteps
instead.

Replaced quite some XGradient constructors that
used XGradient() as Start/EndColor since this is
already the default.

Adapted ColorBlending to black AKA Start/EndIntens
in XGradient to work now on all ColorSteps in the
required linearly-scaled manner.

UNO API changes:

Added com::sun::star::awt::ColorStep as basic data
element that holds a pair of Offset and Color.

Added com::sun::star::awt::ColorStepSequence to
handle an array of sorted entries.

Added com::sun::star::awt::Gradient2 derived from
com::sun::star::awt::Gradient, extended by the
needed com::sun::star::awt::ColorStepSequence.

Added MID_GRADIENT_COLORSTEPSEQUENCE to UNO API
to provide access to ColorSteps directly.

Adapted XFillGradientItem::QueryValue/PutValue to
make use of new UNO API data structures. To do so,
added tooling methods for data transition:
    - fillColorStepSequenceFromColorSteps
    - fillGradient2FromXGradient
    - fillColorStepsFromAny
    - fillXGradientFromAny
and adapted
    - case '0' (all data)
    - MID_FILLGRADIENT
    - MID_GRADIENT_COLORSTEPSEQUENCE
    - MID_GRADIENT_START/ENDCOLOR
to make use of these.

Tested usage of these in the office.

Renamed from GradientStep to GradientStop after
discussions with members on the list to make this
closer related to other norms/definitions.

Also renamed classes and class members to better
reflect to GradientStop, so grepping/finding will
be easier (e.g. 'Color' just exists pretty often,
but 'StopColor' is more precise).

Changed the used UNO API class for reprsenting the
Color to better reflect to ranges [0.0 .. 1.0] and
usage of RGB.

Change-Id: I1eeb3e97e81d6785967615d1ff256551fc3b882d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148849
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-19 17:38:38 +00:00
Armin Le Grand (allotropia) ecae66c41d MCGR: ColorSteps handling moved to tooling
Due to the fact that handling of a vector GradientSteps
will get used more often with ongoing changes I moved
some handling to tooling, see sortAndCorrectColorSteps.
That method sorts and corrects a vector of ColorSteps
so that only valid entreis remain in a sorted order,
for details please refer to the docu at function
definition. I took the occasion to rearrange that to
work on the single provided vector which is better for
speed & ressources.

Also changed the ColorStep constructor to not
automatically correct constructed entries: While that
is formally correct, it moves an invalid entry to 0.0
or 1.0, thus creating additional wrong Start/EndColor
entries. Those may then 'overlay' the correct entry
when corrections are applied to the vector of entries
which leads to getting the wanted Start/EndColor to be
factically deleted, what is an error.

Also rearranged FillGradientAttribute to now work
initially with ColorSteps, no longer requires the
Start/EndColor, also adapted all usages. This securely
allows start/end and in-between single-color sections
in gradients.

Also needed to re-formulate GradientRect &
GradientElliptical ::appendTransformationsAndColors
method for correct 2D mapping(s) - always incrementing
from the start to end conflicts with the adaption of
the start value for the inner loop mainly because
increment is at start of inner loop (pre-increment).

Corrected errors from clang plugin, but also some
wrong initialiations for basegfx::ColorSteps.

Change-Id: I292592ed9abcfa591f68a680479f4fcdda46cbeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148196
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-04 16:32:16 +00:00
Andrea Gelmini f474418bc1 Fix typo
Change-Id: I46f400646bc7d2b7456d294290dc2e159ba14874
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147966
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-01 05:50:39 +00:00
Armin Le Grand (allotropia) 16e728a8a8 MCGR: Adapted other Gradient* to make use of MCGR
Added to make
  GeoTexSvxGradientElliptical
  GeoTexSvxGradientSquare
  GeoTexSvxGradientRect
work using the MCGR. It is still 100%
backward-compatible, so as long as there is no
source using this it will stay invisible - by
purpose.

Tests look good with all three, see the static
variable nUseGradientSteps.

NOTE: GeoTexSvxGradientElliptical still looks not
optimal due to texture back-mapping method
getEllipticalGradientAlpha, see notes in
commit "MCGR: Adapted GradientRadial to make use
of MCGR" ac824594c5

Change-Id: I56b82b867af88fe532f840dde15e0f5c299ed6a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147662
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-02-27 17:43:13 +00:00
Andrea Gelmini 86eb8f6946 Fix typo
Change-Id: I17a06f2cce87f6f6edb3517750e9869de9cdd5b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147668
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-02-25 10:36:59 +00:00
Armin Le Grand (allotropia) ae51dfb237 MCGR: Adapted GradientRadial to make use of MCGR
Added to make GradientRadial work using the MCGR.
It is still 100% backward-compatible, so as long
as there is no source using this it will stay
invisible - by purpose.

Tests look good with this one, see the static
variable nUseGradientSteps.

Change-Id: Ie7134fe2995b23ceb180c7daf3f5b2310c8a8a78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147617
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-02-24 16:22:36 +00:00
Armin Le Grand (allotropia) 94cdbfb931 MCGR: Adapted GradientAxial to make use of MCGR
Added to make GradientAxial work using the MCGR
as 2nd of six types. This one was complicated
since it uses the gradient(s) 'reversed' when you
look at it, from outside to inside. Had to do
quite some tickeling to get it all work, but
looks good now.

For modifyBColor I Could re-use the started
tooling as planned.

To get the reverse usage working I ended up in
1st adapting the previous usage to make more use
of std::iterator and reverse_iterator to be able
to use the reversed state of the ColorSteps more
'controlled' as if trying to adapt the numerical
indices to the vector (that ended in chaos).

It is still 100% backward-compatible, so as long
as there is no source using this it will stay
invisible - by purpose.

Tests look good with this one, see the static
variable nUseGradientSteps.

Change-Id: I0117ec9a24b5e55869b3e2741c67fb87b549db97
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147510
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-02-23 13:06:06 +00:00
Armin Le Grand (allotropia) c4f252035c MCGR: Adapted GradientLinear to make use of MCGR
Added to make GradientLinear work using the MCGR
as 1st of six types. Had to do quite some tickeling
to get it all work, but looks good.

Five more to go, already started to put some things
to tooling to make re-usable for the other types.

Besides adapting this the main change is that the
adaption of defined step-count (versus automatic)
has to be done in modifyBColor now instead of the
back-mapping methods (e.g. getLinearGradientAlpha).

It is still 100% backward-compatible, so as long
as there is no source using this it will stay
invisible - by purpose.

I started to do quite some tests (and fixes/
adaptions in consequence), see the static variable
nUseGradientSteps. If you want to play with this,
you might set it to '1' instead of '0' and use a
linear gradient on an object.

Change-Id: I9d61934defb0674456247f2879f0a89b6a5e50f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147413
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-02-22 09:13:20 +00:00
Noel Grandin ac8963b688 osl::Mutex->std::mutex in BasePrimitive3D
Change-Id: I49e196885845f352c6c4cda6e3890b749d4eb0fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147263
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-19 18:33:52 +00:00
Armin Le Grand (allotropia) ea1d3d11ca MCGR: Add GradientSteps to GeoTexSvxGradient
Move GradientSteps data to GeoTexSvxGradient and adapt
interfaces. Also move tooling to more isolated place
in gradienttools in basegfx.

Keep everything still compatible, the work will be now
to adapt all six different derivations of
GeoTexSvxGradient to make use of the evtl. given
GradientSteps.

Change-Id: Iaa212763c603d46de0a94b1b203b979bb7ce359d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147050
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-02-15 14:46:11 +00:00
Noel Grandin cfb2a587bc rename BitmapEx::GetAlpha to GetAlphaMask
to ease the reading of code related to an upcoming patch to convert
transparency to alpha, since there is already a GetAlpha in Color.

Change-Id: I1af0f8f6dd94acfe4673c8556c7aff6c20da3f7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145209
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-11 08:57:13 +00:00
Noel Grandin dabaf28796 tdf#136370 Very large Shape with pattern/hatch makes scrolling slow
reduce some time spent in the 3-d rendering

Change-Id: I5d622799bc101b5b988d382a039b5a3b03818d1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139256
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-02 13:22:13 +02:00
Mike Kaganski 37429f2690 Use M_PI* instead of F_PI*
Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-19 09:59:43 +01:00
Noel Grandin 21dbf18064 clang-tidy:readability-redundant-member-init
Change-Id: I95918275653714577e2d6728dd3947c7fbb66d8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121360
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-31 14:30:43 +02:00
Noel Grandin ddd2639a48 drop mask from BitmapEx
So that we have fewer cases to deal with when we transition to
32-bit bitmaps.

(*) rename maMask to maAlphaMask, since now it is only being used
for alpha duties.
(*) drop mbAlpha and mbTransparent to simplify state management,
the only thing we need to check for alpha is if maAlphaMask is
non-empty.

Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-26 12:51:58 +02:00
Noel c7483d48df drop operator bool and operator! from Bitmap and BitmapEx
IRC chat:
<quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap
  has the same problem as Graphic and the reason why you dropped that
  commit 7334034ae9
  "drop Graphic::operator bool"
<noelgrandin> quikee[m], hmmm, good point
<noelgrandin> maybe I should just drop both operator bool and
  operator! in favor of IsEmpty
<quikee[m]> noelgrandin: I don't remember what the problem is I just
  remembered we dropped it Graphic :) sure, dropping everything for
  IsEmpty is probably the best

Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-28 10:26:06 +02:00
Noel 83b011b61e create operator bool for Bitmap
so we can use a more natural syntax than "!!"

Change-Id: I8152a0d3ce37115fc83d332a26725ca1d28d959a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113147
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-26 11:58:03 +01:00
Noel Grandin 63dd594d53 drop TransparentType::Color usage
which is dead code, since we convert to TransparentType::Bitmask
in the constructor of BitmapEx

Change-Id: I047b7d25317c4be4d17a8b0db9a90ec101875c9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111683
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-03 08:26:47 +01:00
Chris Sherlock 17aea7c41c vcl: move access functions into appropriate bitmap access files
Split class functions into BitmapInfoAccess.cxx, BitmapReadAccess.cxx
and BitmapWriteAccess.cxx

Split header files into BitmapInfoAccess.hxx and BitmapReadAccess.hxx

Change-Id: I7dcbe1d26c5b64d297658a6b809c93d7ad7f053d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108039
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-12-24 09:40:16 +01:00
Noel Grandin 2ee60f02c4 loplugin:flatten in drawinglayer
Change-Id: Ieb5f682ec627c8d8ddfc286ec0e4422104b4d847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92494
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-19 12:23:46 +02:00
Mark Hung 6ab3770544 drawinglayer: refactor GeoTexSvxTiled::iterateTiles
to provide a more generic callback interface and expose
it as public to allow other usage.

Change-Id: I6bc62a05fee750586f7281d8c24f2133884e77ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92134
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14 09:28:41 +02:00
Noel Grandin ad38105f45 move headers inside modules
Change-Id: Iad5c414861eb807e6246b8a988b94d66ef5f687d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90776
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-21 10:30:07 +01:00
Tomaž Vajngerl 60b041f1a0 drawinglayer: move getRandomColorRange to be private to GeoTexSvx
Change-Id: I9b306277a67b793ffd065d40446909ac59da0641
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90190
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-09 17:17:38 +01:00
Noel Grandin aee42a7bf1 clang-tidy modernize-concat-nested-namespace in drawinglayer
Change-Id: If2644743ab0d9b78d42d1d2fe6fa22c83472d2c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87065
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-20 13:47:45 +01:00
Luboš Luňák d9879200ca handle properly true 32bit bitmaps in some places
I.e. those created with vcl::BackendCapabilities::mbSupportsBitmap32 set.
But there are quite possibly many more places that do not expect
that the Bitmap itself would contain alpha.

Change-Id: I83db37b3d346f42565f96b9bbf81c71b97b6bf8b
2019-11-27 09:55:18 +01:00
Jan-Marek Glogowski c34bb163c3 Make BitmapColor inherit from / merge into Color
BitmapColor itself is kept to distingish the Color usage as part
of a color palette, which continues to store the offset in the
blue value. The original special mbIndex handling is long gone
since commit 1fefdd6f3b ("Alpha channel in BitmapColor - change
bIndex to alpha"), so there is no data difference.

This also results in the following changes:

* now has a basic_ostream<charT, traits>& operator<<
  (that was my actual starting point... for an other bug fix)
* there is a minimal difference for GetLiminance
  BGR(29,151,76) => BGR(28,151,77)
* no more return values for Merge and Invert
  (previously returning *this)
* replaces all GetBlueOrIndex with GetIndex

This leaves one "problematic" part: the GetColorError handling.
At first glance it should probably be virtual. The Color variant
is less strict then the BitmapColor one - for whatever reason.
BitmapColor is always used to search for the best match in a
Palette. Currently I'm simply leaving both variants. Would be
nice to have an explict for functions here.

Change-Id: I251ba3024a1d60f2a9d9fde9cd0a60f08e8322a7
Reviewed-on: https://gerrit.libreoffice.org/72181
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-13 15:43:17 +02:00
Stephan Bergmann 27cd397b1a Drop o3tl/clamp.hxx, use C++17 std::clamp instead
Change-Id: I5043c787dcc3b78bc7fdff130564801194e39f46
Reviewed-on: https://gerrit.libreoffice.org/66177
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11 20:25:08 +01:00
Noel Grandin 07e87211c2 loplugin:simplifyconstruct in dbaccess..drawinglayer
Change-Id: I83624d8bc787aaaaf6071171c882a6e5bde70a0d
Reviewed-on: https://gerrit.libreoffice.org/60075
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-06 14:37:11 +02:00
Stephan Bergmann f4351535f3 Consolidate: basegfx::clamp -> o3tl::clamp
Change-Id: Iffd8b0a19d4479b6c70dc834c6f64499e87e01b1
Reviewed-on: https://gerrit.libreoffice.org/59265
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-17 20:13:21 +02:00
Gabor Kelemen 3fb5f7181d Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade to be able to remove those unneeded includes.

This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from dbaccess to extensions

Change-Id: I4d15aa35e11664ef78c836ffc2937c7e0bb6ea59
Reviewed-on: https://gerrit.libreoffice.org/58165
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-01 09:49:07 +02:00