Rebased ref, commits from common ancestor:
commit f480371b3264c411f77b0731156f81670f92e7d0
Author:     Andras Timar <andras.ti...@collabora.com>
AuthorDate: Mon Jul 21 14:48:15 2025 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Jul 21 14:48:15 2025 +0200

    add OGLTrans target conditionally
    
    without this patch the build breaks when --enable-mpl-subset and
    --enable-mergelibs=more are passed to autogen.sh.
    
    *** used LinkTarget Library/libOGLTranslo.dylib not defined.  Stop.
    
    Change-Id: I610055da46fd1002e9b8d70a7db8964a0f9ad0db

diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk 
b/solenv/gbuild/extensions/pre_MergedLibsList.mk
index 3c780ec65199..2592112bd3d9 100644
--- a/solenv/gbuild/extensions/pre_MergedLibsList.mk
+++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk
@@ -165,7 +165,7 @@ gb_MERGE_LIBRARY_LIST += \
        msforms \
        $(call gb_Helper_optional,DBCONNECTIVITY,mysql_jdbc) \
        $(call gb_Helper_optional,MARIADBC,$(call 
gb_Helper_optional,DBCONNECTIVITY,mysqlc)) \
-       OGLTrans \
+       $(if $(ENABLE_OPENGL_TRANSITIONS),OGLTrans) \
        odbc \
        pdffilter \
        $(if $(BUILD_POSTGRESQL_SDBC),postgresql-sdbc) \
commit 8db5b9bf79bb4cf26e2ed8dc37107f2e6ca44f40
Author:     Jan Holesovsky <ke...@collabora.com>
AuthorDate: Mon Jul 21 08:57:23 2025 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Jul 21 14:46:42 2025 +0200

    Fix macOS build after libxml2 upgrade to 2.14.3
    
    Change-Id: I94c8fbfb150a214c7517c849336b0025813a181b

diff --git a/external/libxml2/ExternalPackage_libxml2.mk 
b/external/libxml2/ExternalPackage_libxml2.mk
index 072cfece9a74..0caabe1263af 100644
--- a/external/libxml2/ExternalPackage_libxml2.mk
+++ b/external/libxml2/ExternalPackage_libxml2.mk
@@ -13,7 +13,7 @@ $(eval $(call 
gb_ExternalPackage_use_external_project,libxml2,libxml2))
 
 ifneq ($(DISABLE_DYNLOADING),TRUE)
 ifeq ($(OS),MACOSX)
-$(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.2.dylib,.libs/libxml2.2.dylib))
+$(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.16.dylib,.libs/libxml2.16.dylib))
 else ifeq ($(OS),WNT)
 ifeq ($(COM),GCC)
 $(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,.libs/libxml2.dll))
commit 415b1b46d32e772ca5b090efbb415ef453a9740c
Author:     Armin Le Grand (Collabora) <armin.le.gr...@me.com>
AuthorDate: Thu Jun 19 17:23:10 2025 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Jul 21 14:24:59 2025 +0200

    tdf#166709 better to use TransparencePrimitive2D for metafile
    
    See comments in code & task.
    
    Change-Id: I6c34a86ab713130b427fd5efad83b7028a32bc19
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186721
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <armin.le.gr...@me.com>

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 8a35c34b4e0d..127f6819492b 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1045,9 +1045,31 @@ void 
VclMetafileProcessor2D::processFillGraphicPrimitive2D(
                                         rAttribute.getOffsetY()))) },
                         rFillGraphicPrimitive2D.getTransparency()));
 
-                // process UnifiedTransparencePrimitive2D primitive directly
-                processUnifiedTransparencePrimitive2D(
-                    static_cast<const 
primitive2d::UnifiedTransparencePrimitive2D&>(*aPrimitive));
+                // tdf#166709 see comments 21-23, we have two possibilities 
here:
+                // (a) use UnifiedTransparencePrimitive2D: test PDF is 47.5kb
+                // (b) use TransparencePrimitive2D: test PDF is 30.8 kb
+                // differences are described in the task. Due to (b) being 
smaller
+                // and is better re-loadable I opt for that. To be able to 
change
+                // this easily I let both versions stand here
+                static bool bTransparencePrimitive2DUse(true);
+
+                if (bTransparencePrimitive2DUse)
+                {
+                    // process recursively. Since this first gets the 
decomposition
+                    // (else a primitive processor would loop recursively) 
this will
+                    // use TransparencePrimitive2D, created by
+                    // UnifiedTransparencePrimitive2D::get2DDecomposition. 
This could
+                    // also be done here, but that decompose already has 
needed stuff
+                    // and we keep it in one place
+                    process(*aPrimitive);
+                }
+                else
+                {
+                    // process UnifiedTransparencePrimitive2D primitive 
directly
+                    processUnifiedTransparencePrimitive2D(
+                        static_cast<const 
primitive2d::UnifiedTransparencePrimitive2D&>(
+                            *aPrimitive));
+                }
 
                 // we are done, return
                 return;
commit 07abbb467915a3c654f8ab930c49b994af19ed80
Author:     Armin Le Grand (Collabora) <armin.le.gr...@me.com>
AuthorDate: Tue Jun 17 17:59:02 2025 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Jul 21 14:24:45 2025 +0200

    tdf#166709 special handling of transparency for metafile/PDF
    
    For handling transparency for tiled bitmaps correctly in
    metafiles the newly added linear transparency is too much
    and leading to many single transprent bitmnaps. This is
    not wrong but too much data and bloating the metafile/PDF.
    For details and extensive explanations see text in commit.
    
    Change-Id: I255db614e0c9eb8cd5130abbdaef4eda1c398684
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186630
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <armin.le.gr...@me.com>
    (cherry picked from commit 846b18650c54e60a0e30b99c8980e39ee56c589f)

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index de51c5ba6d61..8a35c34b4e0d 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -64,6 +64,7 @@
 #include <drawinglayer/primitive2d/epsprimitive2d.hxx>
 #include <drawinglayer/primitive2d/structuretagprimitive2d.hxx>
 #include <drawinglayer/primitive2d/objectinfoprimitive2d.hxx> // for 
Title/Description metadata
+#include <drawinglayer/primitive2d/fillgraphicprimitive2d.hxx>
 #include <drawinglayer/converters.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <tools/vcompat.hxx>
@@ -899,6 +900,12 @@ void VclMetafileProcessor2D::processBasePrimitive2D(const 
primitive2d::BasePrimi
                 static_cast<const 
primitive2d::ObjectInfoPrimitive2D&>(rCandidate));
             break;
         }
+        case PRIMITIVE2D_ID_FILLGRAPHICPRIMITIVE2D:
+        {
+            processFillGraphicPrimitive2D(
+                static_cast<const 
primitive2d::FillGraphicPrimitive2D&>(rCandidate));
+            break;
+        }
         case PRIMITIVE2D_ID_TEXTHIERARCHYEMPHASISMARKPRIMITIVE2D:
         {
             // EmphasisMarks are traditionally not added to Metafiles, see
@@ -960,6 +967,98 @@ void VclMetafileProcessor2D::processObjectInfoPrimitive2D(
     }
 }
 
+void VclMetafileProcessor2D::processFillGraphicPrimitive2D(
+    primitive2d::FillGraphicPrimitive2D const& rFillGraphicPrimitive2D)
+{
+    // tdf#166709 check if we have to make an exception handling this
+    // FillGraphicPrimitive2D. If it
+    // - has transparency
+    // - is tiled
+    // - is a Bitmap
+    // - is not animated
+    // - is no embedded SVG
+    // we have to, see below
+    if (!basegfx::fTools::equalZero(rFillGraphicPrimitive2D.getTransparency(), 
0.0))
+    {
+        // we have transparency
+        const attribute::FillGraphicAttribute& 
rAttribute(rFillGraphicPrimitive2D.getFillGraphic());
+
+        if (rAttribute.getTiling())
+        {
+            // we have tiling
+            const Graphic& rGraphic(rAttribute.getGraphic());
+
+            if (GraphicType::Bitmap == rGraphic.GetType() && 
!rGraphic.IsAnimated()
+                && !rGraphic.getVectorGraphicData())
+            {
+                // tdf#166709 it is a Bitmap, not animated & not
+                // embedded SVG.
+
+                // conditions are met. Unfortunately for metafile
+                // and for PDF export we *need* all tiles which are
+                // potentially created by the decomposition of the
+                // FillGraphicPrimitive2D to be embedded to a single
+                // UnifiedTransparencePrimitive2D that holds that
+                // transparency - as it was before adding more
+                // possibilities for direct unified transparency.
+
+                // Despite the decomposition being correct and creating
+                // now BitmapAlphaPrimitive2D with every one holding the
+                // correct alpha, the 'old' way with encapsulating to
+                // a UnifiedTransparencePrimitive2D is needed here
+                // to create a single bitmap representation that then
+                // gets used. When not doing this a potentially high
+                // number of BitmapAlphaPrimitive2D will be exported,
+                // which is not an error but needs too much ressources,
+                // prevents loading of the created PDF for some viewers
+                // and bloats the PDF file.
+
+                // NOTE: I thought if only doing this for the PDF export
+                // case would make sense, but all exports still based
+                // on metafile potentially have this problem, so better
+                // do it in general at metafile creation already.
+
+                // NOTE: This shows how urgent it would be to create a
+                // PDF export using a PrimitiveRenderer instead of
+                // Metafile - that could do the right thing and use
+                // a representation in the PDF that is capable of
+                // tiling. No chance to do that with the existing
+                // metafile stuff we have.
+
+                // NOTE: The creation of the possible MetafileAction
+                // for this is done here locally in method
+                // processUnifiedTransparencePrimitive2D. Use that
+                // directly if necessary.
+
+                // So: create a FillGraphicPrimitive2D without transparency
+                // embedded to a UnifiedTransparencePrimitive2D representing
+                // the transparency and process it directly
+                rtl::Reference<primitive2d::BasePrimitive2D> aPrimitive(
+                    new primitive2d::UnifiedTransparencePrimitive2D(
+                        primitive2d::Primitive2DContainer{
+                            
rtl::Reference<primitive2d::FillGraphicPrimitive2D>(
+                                new primitive2d::FillGraphicPrimitive2D(
+                                    
rFillGraphicPrimitive2D.getTransformation(),
+                                    attribute::FillGraphicAttribute(
+                                        rGraphic, rAttribute.getGraphicRange(),
+                                        rAttribute.getTiling(), 
rAttribute.getOffsetX(),
+                                        rAttribute.getOffsetY()))) },
+                        rFillGraphicPrimitive2D.getTransparency()));
+
+                // process UnifiedTransparencePrimitive2D primitive directly
+                processUnifiedTransparencePrimitive2D(
+                    static_cast<const 
primitive2d::UnifiedTransparencePrimitive2D&>(*aPrimitive));
+
+                // we are done, return
+                return;
+            }
+        }
+    }
+
+    // all other cases: process recursively with original primitive
+    process(rFillGraphicPrimitive2D);
+}
+
 void VclMetafileProcessor2D::processGraphicPrimitive2D(
     const primitive2d::GraphicPrimitive2D& rGraphicPrimitive)
 {
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
index e85df18f9e20..46d1cb2f1edf 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.hxx
@@ -65,6 +65,7 @@ class MaskPrimitive2D;
 class UnifiedTransparencePrimitive2D;
 class TransparencePrimitive2D;
 class ObjectInfoPrimitive2D;
+class FillGraphicPrimitive2D;
 class StructureTagPrimitive2D;
 }
 
@@ -146,6 +147,8 @@ private:
         const primitive2d::TransparencePrimitive2D& rTransparenceCandidate);
     void
     processObjectInfoPrimitive2D(const primitive2d::ObjectInfoPrimitive2D& 
rObjectInfoPrimitive2D);
+    void processFillGraphicPrimitive2D(
+        primitive2d::FillGraphicPrimitive2D const& rFillGraphicPrimitive2D);
     void processStructureTagPrimitive2D(
         const primitive2d::StructureTagPrimitive2D& rStructureTagCandidate);
 
commit 9f16b69431bd020deeacb4cac9efa01f89851978
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jul 13 21:13:03 2025 +0100
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jul 21 12:56:58 2025 +0200

    const up SwRectFnCollections
    
    Change-Id: Ie1470cdc86e64694ee43a7f6f5f57bcf7069ca7e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187831
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit 13df519a04d8b92d6bccbf1528311e82b9756dde)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188075
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 955ebf799221..a47b421ce507 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -1399,7 +1399,7 @@ struct SwRectFnCollection
     SwRectSetTwice  fnSetTopAndHeight;
 };
 
-typedef SwRectFnCollection* SwRectFn;
+typedef const SwRectFnCollection* SwRectFn;
 
 // This class allows to use proper methods regardless of orientation (LTR/RTL, 
horizontal or vertical)
 extern SwRectFn fnRectHori, fnRectVert, fnRectVertL2R, fnRectVertL2RB2T;
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 737c453fb411..9c9a905dd5e3 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -59,7 +59,7 @@ static tools::Long SwIncrement( tools::Long nA, tools::Long 
nAdd )
 static tools::Long SwDecrement( tools::Long nA, tools::Long nSub )
     { return nA - nSub; }
 
-static SwRectFnCollection aHorizontal = {
+const SwRectFnCollection aHorizontal = {
     /*.fnGetTop =*/&SwRect::Top_,
     /*.fnGetBottom =*/&SwRect::Bottom_,
     /*.fnGetLeft =*/&SwRect::Left_,
@@ -114,7 +114,7 @@ static SwRectFnCollection aHorizontal = {
     /*.fnSetTopAndHeight =*/&SwRect::SetTopAndHeight
 };
 
-static SwRectFnCollection aVertical = {
+const SwRectFnCollection aVertical = {
     /*.fnGetTop =*/&SwRect::Right_,
     /*.fnGetBottom =*/&SwRect::Left_,
     /*.fnGetLeft =*/&SwRect::Top_,
@@ -169,7 +169,7 @@ static SwRectFnCollection aVertical = {
     /*.fnSetTopAndHeight =*/&SwRect::SetRightAndWidth
 };
 
-static SwRectFnCollection aVerticalLeftToRight = {
+const SwRectFnCollection aVerticalLeftToRight = {
     /*.fnGetTop =*/&SwRect::Left_,
     /*.fnGetBottom =*/&SwRect::Right_,
     /*.fnGetLeft =*/&SwRect::Top_,
@@ -229,7 +229,7 @@ static SwRectFnCollection aVerticalLeftToRight = {
  * This means logical top is physical left, bottom is right, left is bottom,
  * finally right is top. Values map from logical to physical.
  */
-static SwRectFnCollection aVerticalLeftToRightBottomToTop = {
+const SwRectFnCollection aVerticalLeftToRightBottomToTop = {
     /*.fnGetTop =*/&SwRect::Left_,
     /*.fnGetBottom =*/&SwRect::Right_,
     /*.fnGetLeft =*/&SwRect::Bottom_,

Reply via email to