include/svx/sdr/contact/viewcontact.hxx | 4 -- include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx | 2 - solenv/bin/job-limiter.cpp | 4 +- svx/inc/sdr/contact/viewcontactofsdrpage.hxx | 7 ---- svx/source/sdr/contact/viewcontactofsdrpage.cxx | 29 +----------------- svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx | 9 +---- vcl/source/graphic/UnoGraphic.cxx | 5 ++- xmloff/source/draw/layerimp.cxx | 4 +- 8 files changed, 13 insertions(+), 51 deletions(-)
New commits: commit 6631d1064d0bc0a4b8b32cfb58287e8d520baeef Author: Noel Grandin <[email protected]> AuthorDate: Tue Oct 22 10:20:23 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Wed Oct 23 18:33:26 2024 +0200 tdf#163516 Draw fails to restore Layer data Title and Description regression from commit c7b7153213619859d5f049b7c60eafa4c81f5225 Author: Noel Grandin <[email protected]> Date: Fri Nov 20 14:24:51 2020 +0200 fastparser in SdXMLLayerContext Change-Id: I0db381fbd383efd23bb254703bea103ca0d270d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175378 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins (cherry picked from commit 75d6fd09138283b4af949d8071ecfee5e2545180) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175399 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index eeffae04e997..fae92380a257 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.cxx @@ -98,11 +98,11 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLLayerContext::cre sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& ) { - if( nElement == XML_ELEMENT(SVG, XML_TITLE) ) + if( nElement == XML_ELEMENT(SVG, XML_TITLE) || nElement == XML_ELEMENT(SVG_COMPAT, XML_TITLE) ) { return new XMLStringBufferImportContext( GetImport(), sTitleBuffer); } - else if( nElement == XML_ELEMENT(SVG, XML_DESC) ) + else if( nElement == XML_ELEMENT(SVG, XML_DESC) || nElement == XML_ELEMENT(SVG_COMPAT, XML_DESC) ) { return new XMLStringBufferImportContext( GetImport(), sDescriptionBuffer); } commit b245943faffef57ed72e25f87afad61dda8e228b Author: Christian Lohmaier <[email protected]> AuthorDate: Tue Jun 4 14:32:08 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Wed Oct 23 18:33:26 2024 +0200 windows packaging: reduce parallelism further to three Some jenkins daily builders still run into issues from time to time, and even at a reduced parallelism of three it doesn't affect overall buildtime when building with just two or three languages and also not when building with all languages. There might be a number of languages where this has a penalty, but probably not a significant one. Change-Id: I778b5fe21fe8f9bb1fcca1da3c4c0eeeda6c29d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168403 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <[email protected]> (cherry picked from commit da4259bd7fef35185418cad7a695268add6341a2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175344 diff --git a/solenv/bin/job-limiter.cpp b/solenv/bin/job-limiter.cpp index 9111ead35127..ee1bd8e6edab 100644 --- a/solenv/bin/job-limiter.cpp +++ b/solenv/bin/job-limiter.cpp @@ -79,12 +79,12 @@ int wmain(int argc, wchar_t* argv[]) // system. So when it creates a new one to use, and then releases one it would hit the max // limit otherwise. This only happens when nothing else is waiting for a slot anymore, // i.e. when there are already fewer jobs than imposed by the limiter. - // A limit of four (main installer and 3 controlled by this limiter) was chosen because that + // A limit of three (main installer + 2 controlled by this limiter) was chosen because that // won't affect overall build time (creating the main installer with multiple languages // takes much longer than all the helppackages and the single sdk package combined, even // when those are limited to three jobs), and seems to be low enough to avoid the random // cscript/WiLangId.vbs failures. - semaphore_handle = CreateSemaphoreW(NULL, 3, 4, semaphorename); + semaphore_handle = CreateSemaphoreW(NULL, 2, 3, semaphorename); // keep this process alive for other jobs to grab the semaphore, otherwise it is gone too // quickly and everything creates their own semaphore that immediately has enough slots, // completely bypassing the point of having a limiter... commit 053a87df94d4ba21084bb8f39e1f6180343c03c8 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Oct 17 16:12:45 2024 +0100 Commit: Andras Timar <[email protected]> CommitDate: Wed Oct 23 18:33:26 2024 +0200 tdf#159007 Revert "optimization to skip SdrObject::GetViewContent()" This reverts commit 313be607903a381830600c0a60b2e299fcaec685. Change-Id: I2dc7489ecc302473edd763fd0e4d6784fadc9bb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175045 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/include/svx/sdr/contact/viewcontact.hxx b/include/svx/sdr/contact/viewcontact.hxx index 7b6d0f3ab2c1..1491d0a1401d 100644 --- a/include/svx/sdr/contact/viewcontact.hxx +++ b/include/svx/sdr/contact/viewcontact.hxx @@ -148,9 +148,7 @@ public: // It is always possible to delete the VOCs, these are re-created on demand void flushViewObjectContacts(bool bWithHierarchy = true); - // helper around getPrimitive2DSequenceHierarchy to enable a given implementation - // to optimize getting a Primitive2DSequenceHierarchy for a child of index a - virtual void getPrimitive2DSequenceHierarchyOfIndex( + void getPrimitive2DSequenceHierarchyOfIndex( sal_uInt32 a, DisplayInfo& rDisplayInfo, ObjectContact& rObjectContact, drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor); }; diff --git a/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx b/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx index 0ea6f307a22c..5989559c758e 100644 --- a/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx +++ b/include/svx/sdr/contact/viewobjectcontactofsdrobj.hxx @@ -56,8 +56,6 @@ public: This method cares for this, by retrieving the very original OutputDevice. */ const OutputDevice* getPageViewOutputDevice() const; - - static bool isObjectVisibleOnAnyLayer(const SdrObject& rObject, const SdrLayerIDSet& rLayers); }; } diff --git a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx index 0f7143aebcda..98d6f577e86e 100644 --- a/svx/inc/sdr/contact/viewcontactofsdrpage.hxx +++ b/svx/inc/sdr/contact/viewcontactofsdrpage.hxx @@ -113,19 +113,12 @@ class ViewContactOfPageHierarchy final : public ViewContactOfPageSubObject virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) override; virtual void createViewIndependentPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) const override; - SdrObject& GetSdrObject(sal_uInt32 nIndex) const; - public: explicit ViewContactOfPageHierarchy(ViewContactOfSdrPage& rParentViewContactOfSdrPage); virtual ~ViewContactOfPageHierarchy() override; virtual sal_uInt32 GetObjectCount() const override; virtual ViewContact& GetViewContact(sal_uInt32 nIndex) const override; - - // optimize version of parent impl to quicker skip hidden SdrObjects - virtual void getPrimitive2DSequenceHierarchyOfIndex( - sal_uInt32 a, DisplayInfo& rDisplayInfo, ObjectContact& rObjectContact, - drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) override; }; class ViewContactOfGrid final : public ViewContactOfPageSubObject diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx index dfef01d30410..c94bb817367d 100644 --- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx @@ -18,7 +18,6 @@ */ #include <sdr/contact/viewcontactofsdrpage.hxx> -#include <svx/sdr/contact/displayinfo.hxx> #include <svx/sdr/contact/viewobjectcontact.hxx> #include <svx/svdpage.hxx> #include <sdr/contact/viewobjectcontactofsdrpage.hxx> @@ -28,7 +27,6 @@ #include <tools/debug.hxx> #include <vcl/svapp.hxx> #include <svx/sdr/contact/objectcontact.hxx> -#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx> #include <drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx> #include <drawinglayer/primitive2d/PolygonHairlinePrimitive2D.hxx> #include <drawinglayer/primitive2d/PolyPolygonColorPrimitive2D.hxx> @@ -402,34 +400,11 @@ sal_uInt32 ViewContactOfPageHierarchy::GetObjectCount() const return getPage().GetObjCount(); } -SdrObject& ViewContactOfPageHierarchy::GetSdrObject(sal_uInt32 nIndex) const +ViewContact& ViewContactOfPageHierarchy::GetViewContact(sal_uInt32 nIndex) const { SdrObject* pObj = getPage().GetObj(nIndex); assert(pObj && "ViewContactOfPageHierarchy::GetViewContact: Corrupt SdrObjList (!)"); - return *pObj; -} - -ViewContact& ViewContactOfPageHierarchy::GetViewContact(sal_uInt32 nIndex) const -{ - return GetSdrObject(nIndex).GetViewContact(); -} - -void ViewContactOfPageHierarchy::getPrimitive2DSequenceHierarchyOfIndex( - sal_uInt32 nIndex, DisplayInfo& rDisplayInfo, ObjectContact& rObjectContact, - drawinglayer::primitive2d::Primitive2DDecompositionVisitor& rVisitor) -{ - SdrObject& rSdrObject(GetSdrObject(nIndex)); - - // optimization over parent impl to skip SdrObject::GetViewContent(), etc if the SdrObject isn't - // shown on the target layer. ViewObjectContactOfSdrobject::getPrimitive2DSequenceHierarchy does - // the same check, but after a set of allocations which is expensive in the case of SdrCaptions - // in a calc internal layer where there can be thousands of such objects. - if (!ViewObjectContactOfSdrObj::isObjectVisibleOnAnyLayer(rSdrObject, rDisplayInfo.GetProcessLayers())) - return; - - ViewContact& rViewContact = rSdrObject.GetViewContact(); - const ViewObjectContact& rCandidate(rViewContact.GetViewObjectContact(rObjectContact)); - rCandidate.getPrimitive2DSequenceHierarchy(rDisplayInfo, rVisitor); + return pObj->GetViewContact(); } ViewObjectContact& ViewContactOfGrid::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx index fc132946883a..4338a6f98fac 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx @@ -50,14 +50,9 @@ ViewObjectContactOfSdrObj::~ViewObjectContactOfSdrObj() { } -bool ViewObjectContactOfSdrObj::isObjectVisibleOnAnyLayer(const SdrObject& rSdrObject, const SdrLayerIDSet& rLayers) +bool ViewObjectContactOfSdrObj::isPrimitiveVisibleOnAnyLayer(const SdrLayerIDSet& aLayers) const { - return rLayers.IsSet(rSdrObject.GetLayer()); -} - -bool ViewObjectContactOfSdrObj::isPrimitiveVisibleOnAnyLayer(const SdrLayerIDSet& rLayers) const -{ - return ViewObjectContactOfSdrObj::isObjectVisibleOnAnyLayer(getSdrObject(), rLayers); + return aLayers.IsSet(getSdrObject().GetLayer()); } bool ViewObjectContactOfSdrObj::isPrimitiveVisible(const DisplayInfo& rDisplayInfo) const commit d2b1344dd396e008d610daf909278d438699f26a Author: Noel Grandin <[email protected]> AuthorDate: Wed Oct 16 10:25:28 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Wed Oct 23 18:33:26 2024 +0200 tdf#163381 XBitmap.getMaskDIB() is inverted regression from the transparency->alpha work Change-Id: I2aaf8262191ca6136f87c59629e95bd9a7e7e419 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174991 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins (cherry picked from commit bb6db3aa4c86b92e8321d6734bcb34ba28dfeb27) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174958 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index 9036f54452ba..3ea6f107fde1 100644 --- a/vcl/source/graphic/UnoGraphic.cxx +++ b/vcl/source/graphic/UnoGraphic.cxx @@ -165,7 +165,10 @@ uno::Sequence<sal_Int8> SAL_CALL Graphic::getMaskDIB() { SvMemoryStream aMemoryStream; - WriteDIB(maGraphic.GetBitmapEx().GetAlphaMask().GetBitmap(), aMemoryStream, false, true); + AlphaMask aMask = maGraphic.GetBitmapEx().GetAlphaMask(); + // for backwards compatibility for extensions, we need to convert from alpha to transparency + aMask.Invert(); + WriteDIB(aMask.GetBitmap(), aMemoryStream, false, true); return css::uno::Sequence<sal_Int8>( static_cast<sal_Int8 const *>(aMemoryStream.GetData()), aMemoryStream.Tell() ); } else
