chart2/qa/extras/chart2geometry.cxx         |   33 ++
 chart2/qa/extras/chart2import.cxx           |   34 ++
 include/oox/export/drawingml.hxx            |    8 
 oox/CppunitTest_oox_drawingml.mk            |    1 
 oox/CppunitTest_oox_shape.mk                |    1 
 oox/qa/unit/drawingml.cxx                   |   13 -
 oox/qa/unit/shape.cxx                       |  137 ++++++++--
 oox/source/drawingml/fillproperties.cxx     |  353 ----------------------------
 oox/source/export/chartexport.cxx           |   45 +--
 oox/source/export/drawingml.cxx             |  205 +++-------------
 oox/source/vml/vmlformatting.cxx            |    3 
 sc/qa/unit/subsequent_filters_test3.cxx     |   28 +-
 sd/qa/unit/data/xml/n819614_0.xml           |  102 ++++----
 sd/qa/unit/export-tests-ooxml1.cxx          |   38 ++-
 sd/qa/unit/export-tests-ooxml2.cxx          |   15 -
 sd/qa/unit/export-tests-ooxml3.cxx          |   30 +-
 sd/qa/unit/import-tests.cxx                 |   15 +
 sd/qa/unit/misc-tests.cxx                   |   14 -
 sd/qa/unit/uiimpress.cxx                    |    9 
 sw/CppunitTest_sw_odfexport.mk              |    1 
 sw/ooxmlexport_setup.mk                     |    3 
 sw/qa/extras/odfexport/odfexport.cxx        |   30 +-
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx   |   38 ++-
 sw/qa/extras/rtfexport/rtfexport.cxx        |   42 ++-
 sw/rtfexport_setup.mk                       |    1 
 sw/source/filter/ww8/rtfattributeoutput.cxx |   50 ++-
 26 files changed, 526 insertions(+), 723 deletions(-)

New commits:
commit bb198176684c3d9377e26c04a29ec66deb811949
Author:     Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de>
AuthorDate: Fri Apr 21 15:18:09 2023 +0200
Commit:     Armin Le Grand <armin.le.gr...@me.com>
CommitDate: Wed May 3 17:38:46 2023 +0200

    MCGR: Make MCGR default for oox im/export, cleanup
    
    Following an error in CppunitTest_chart2_export3 I updated
    the transparency definition at WriteGradientFill and
    corrected usages.
    
    Had to correct/adapt some Chart UnitTests. Some of these
    changes are temporary since this will/has to change when
    ODF MCGR im/export is integrated. I checked that all of
    these cases actually work, comparing im LO and MSO.
    
    Adapted some Chart2ImportTest to directly compare/check
    now for the fully imported tranparence gradient with
    available higher precision.
    
    Adapted OoxDrawingmlTest testGradientMultiStepTransparency
    to use new MCGR capabilities.
    
    Adapted testTextframeGradient and tested the turn-around
    with rtf gradients. These are a little bit limited and
    needed some extra care.
    
    Adapted testTextframeGradient.
    Adapted SdOOXMLExportTest1, testTdf94238
    Adapted SdOOXMLExportTest1, testTdf128345GradientAxial
    Adapted SdOOXMLExportTest2, testTdf105739
    Adapted SdOOXMLExportTest3, testTdf127372
    Adapted SdOOXMLExportTest3, testTdf127379
    Adapted SdMiscTest, testFillGradient
    Adapted testTextframeGradient
    Adapted ScFiltersTest3, testTdf129789
    Adapted SdUiImpressTest, testPageFillGradient
    
    Adapted SdOOXMLExportTest1, testTdf128345GradientLinear by
    using better double-to-integer rounding (basegfx::fround) in
    DrawingML::WriteGradientStop. After double calculations
    this makes the tansition to integer correct and stable. Also
    took back change at testTdf128345ChartArea_CG_TS_export
    which showed the same flaw before.
    
    2nd look @testTdf128345Legend_CS_TG_axial_export made me
    add that stuff again and adapt the axial ColorStop adding
    in the export to not export the middle enty twice. Extended
    test a little bit, too.
    Only do not add value if it starts at 0.0 aka StartColor,
    else adding it is corect.
    
    Adapted some tests CPPUNIT_ASSERT to CPPUNIT_ASSERT_EQUAL
    after being pointed to it from gerrit_linux_clang_dbgutil
    build.
    
    Change-Id: I4a993053da8960035671b655e67908f36e59b5fe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150763
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <armin.le.gr...@me.com>

diff --git a/chart2/qa/extras/chart2geometry.cxx 
b/chart2/qa/extras/chart2geometry.cxx
index 9a69b81e593a..d52633c80814 100644
--- a/chart2/qa/extras/chart2geometry.cxx
+++ b/chart2/qa/extras/chart2geometry.cxx
@@ -170,6 +170,12 @@ void 
Chart2GeometryTest::testTdf128345ChartArea_CG_TS_export()
     // Without the patch the transparency was lost in saved pptx file.
     loadFromURL(u"odp/tdf128345_ChartArea_CG_TS.odp");
 
+    // MCGR: Similar to testTdf128345Legend_CS_TG_axial_export:
+    // Checked that it works with the existing import file,
+    // but will change with ODF MCGR im/export again.
+    // Adapting for now, but need to re-check values after
+    // ODF im/export for MCGR is integrated
+
     // Make sure the chart area has a transparency in gradient stops in saved 
pptx file.
     save("Impress MS PowerPoint 2007 XML");
     xmlDocUniquePtr pXmlDoc = parseExport("ppt/charts/chart1.xml");
@@ -188,6 +194,12 @@ void 
Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
     // Make sure chart area has transparency when pptx document is opened and 
resaved as odp.
     // As of Aug 2020, the import generates a transparency gradient. When 
import is changed to
     // generate solid transparency, the test needs to be adapted.
+
+    // MCGR: Similar to testTdf128345Legend_CS_TG_axial_export:
+    // Checked that it works with the existing import file,
+    // but will change with ODF MCGR im/export again. We will need to
+    // update the *.odp input file. Disable unclear values for now and
+    // adapt when ODF im/export for MCGR is integrated
     loadFromURL(u"pptx/tdf128345_ChartArea_CG_TS.pptx");
 
     // Find transparency gradient name
@@ -216,7 +228,7 @@ void 
Chart2GeometryTest::testTdf128345ChartArea_CG_TS_import()
     assertXPath(pXmlDoc2, sStart + " and @draw:start='30%']");
     assertXPath(pXmlDoc2, sStart + " and @draw:end='30%']");
     assertXPath(pXmlDoc2, sStart + " and @draw:angle='30deg']");
-    assertXPath(pXmlDoc2, sStart + " and @draw:border='20%']");
+    assertXPath(pXmlDoc2, sStart + " and @draw:border='0%']"); // MCGR: no 
border anymore 20% -> 0%
 }
 
 void Chart2GeometryTest::testTdf128345ChartWall_CS_TG_export()
@@ -283,13 +295,21 @@ void 
Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_export()
     CPPUNIT_ASSERT(pXmlDoc);
 
     OString sPathStart("//c:chartSpace/c:chart/c:legend/c:spPr/a:gradFill");
-    assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 3); // axial
-    // no element for 0% transparent
+
+    // MCGR: three entries due to axial being mirrored+expanded to linear
+    assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 3);
+
+    // MCGR: start entry, no transparence, pos zero
     assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", 0);
-    // 100% transparent = opacity 0. It comes from "axial", therefore it is in 
the middle.
+    assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]", "pos", "0");
+
+    // MCGR: middle entry, 100% transparence, pos 0.5
     assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]/a:srgbClr/a:alpha", 
"val", "0");
     assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[2]", "pos", "50000");
+
+    // MCGR: end entry, no transparence, pos 1.0
     assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[3]/a:srgbClr/a:alpha", 0);
+    assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[3]", "pos", "100000");
 }
 
 void Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
@@ -320,8 +340,9 @@ void 
Chart2GeometryTest::testTdf128345Legend_CS_TG_axial_import()
     const OString sAttribute("@draw:name='" + OU2O(sOUOpacityName) + "'");
     const OString 
sStart("//office:document-styles/office:styles/draw:opacity[" + sAttribute);
     assertXPath(pXmlDoc2, sStart + "]", 1);
-    assertXPath(pXmlDoc2, sStart + " and @draw:style='axial']");
-    assertXPath(pXmlDoc2, sStart + " and @draw:start='0%']");
+    // MCGR: Needs odf im/export for MCGR, then adapt.
+    assertXPath(pXmlDoc2, sStart + " and @draw:style='linear']"); // MCGR: 
axial -> linear
+    assertXPath(pXmlDoc2, sStart + " and @draw:start='100%']"); // MCGR: 0% -> 
100%
     assertXPath(pXmlDoc2, sStart + " and @draw:end='100%']");
 }
 
diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 786ad81dccc2..776c6e706bd9 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -32,8 +32,9 @@
 #include <iterator>
 
 #include <com/sun/star/util/Color.hpp>
-#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/awt/Gradient2.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <basegfx/utils/gradienttools.hxx>
 
 class Chart2ImportTest : public ChartTest
 {
@@ -618,12 +619,23 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc889755)
     //tdf#139940 - the title's gradient was lost and was filled with solid 
blue, instead of a "blue underline".
     uno::Reference<drawing::XDrawPagesSupplier> xDoc(mxComponent, 
uno::UNO_QUERY_THROW);
     uno::Reference<drawing::XDrawPage> 
xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW);
+
     // Shape "Title 3"
+    // MCGR: Use the whole completely imported transparency gradient to check 
for correctness
     uno::Reference<beans::XPropertySet> xShapeProps(xPage->getByIndex(4), 
uno::UNO_QUERY_THROW);
-    awt::Gradient aTransparence;
+    awt::Gradient2 aTransparence;
     xShapeProps->getPropertyValue("FillTransparenceGradient") >>= 
aTransparence;
-    CPPUNIT_ASSERT(aTransparence.StartColor != aTransparence.EndColor);
-    CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(ColorTransparency, 
aTransparence.StartColor));
+
+    basegfx::ColorStops aColorStops;
+    basegfx::utils::fillColorStopsFromGradient2(aColorStops, aTransparence);
+
+    CPPUNIT_ASSERT_EQUAL(size_t(3), aColorStops.size());
+    CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.0));
+    CPPUNIT_ASSERT_EQUAL(aColorStops[0].getStopColor(), basegfx::BColor(0.25, 
0.25, 0.25));
+    CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
0.070000000000000007));
+    CPPUNIT_ASSERT_EQUAL(aColorStops[1].getStopColor(), basegfx::BColor(0.25, 
0.25, 0.25));
+    CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[2].getStopOffset(), 
0.080000000000000002));
+    CPPUNIT_ASSERT_EQUAL(aColorStops[2].getStopColor(), basegfx::BColor(1.0, 
1.0, 1.0));
 }
 
 CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testBnc882383)
@@ -652,14 +664,22 @@ CPPUNIT_TEST_FIXTURE(Chart2ImportTest, 
testTransparencyGradientValue)
     xPropertySet->getPropertyValue("FillTransparenceGradientName") >>= 
sTranspGradientName;
     CPPUNIT_ASSERT(!sTranspGradientName.isEmpty());
 
-    awt::Gradient aTransparenceGradient;
+    awt::Gradient2 aTransparenceGradient;
     uno::Reference< lang::XMultiServiceFactory > xFact(xChartDoc, 
uno::UNO_QUERY);
     CPPUNIT_ASSERT(xFact.is());
     uno::Reference< container::XNameAccess > 
xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"),
 uno::UNO_QUERY);
     uno::Any rTransparenceValue = 
xTransparenceGradient->getByName(sTranspGradientName);
     CPPUNIT_ASSERT(rTransparenceValue >>= aTransparenceGradient);
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(3355443), aTransparenceGradient.EndColor);
-    CPPUNIT_ASSERT_EQUAL(sal_Int32(5000268), aTransparenceGradient.StartColor);
+
+    basegfx::ColorStops aColorStops;
+    basegfx::utils::fillColorStopsFromGradient2(aColorStops, 
aTransparenceGradient);
+
+    // MCGR: Use the whole completely imported transparency gradient to check 
for correctness
+    CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+    CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.0));
+    CPPUNIT_ASSERT_EQUAL(aColorStops[0].getStopColor(), basegfx::BColor(0.3, 
0.3, 0.3));
+    CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
1.0));
+    CPPUNIT_ASSERT_EQUAL(aColorStops[1].getStopColor(), basegfx::BColor(0.2, 
0.2, 0.2));
 }
 
 CPPUNIT_TEST_FIXTURE(Chart2ImportTest, testSimpleStrictXLSX)
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index 6cba4b06b6e0..451b3f0eaae0 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -355,8 +355,7 @@ public:
     void WriteColor( const OUString& sColorSchemeName, const 
css::uno::Sequence< css::beans::PropertyValue >& aTransformations, sal_Int32 
nAlpha = MAX_PERCENT );
     void WriteColor( const ::Color nColor, const css::uno::Sequence< 
css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
     void WriteColorTransformations( const css::uno::Sequence< 
css::beans::PropertyValue >& aTransformations, sal_Int32 nAlpha = MAX_PERCENT );
-    void WriteGradientStop(sal_uInt16 nStop, ::Color nColor, sal_Int32 nAlpha 
= MAX_PERCENT);
-    void WriteGradientStop2(double fOffset, const basegfx::BColor& rColor, 
const basegfx::BColor& rAlpha);
+    void WriteGradientStop(double fOffset, const basegfx::BColor& rColor, 
const basegfx::BColor& rAlpha);
     void WriteLineArrow( const css::uno::Reference< css::beans::XPropertySet 
>& rXPropSet, bool bLineStart );
     void WriteConnectorConnections( sal_Int32 nStartGlueId, sal_Int32 
nEndGlueId, sal_Int32 nStartID, sal_Int32 nEndID );
 
@@ -377,10 +376,7 @@ public:
     */
     void WriteGradientFill(
         const css::awt::Gradient2* pColorGradient, sal_Int32 nFixColor,
-        const css::awt::Gradient2* pTransparenceGradient, sal_Int32 
nFixTransparence);
-    void WriteGradientFill2(
-        const css::awt::Gradient2* pColorGradient, sal_Int32 nFixColor,
-        const css::awt::Gradient2* pTransparenceGradient, sal_Int32 
nFixTransparence);
+        const css::awt::Gradient2* pTransparenceGradient, double 
fFixTransparence = 0.0);
 
     void WriteGrabBagGradientFill( const css::uno::Sequence< 
css::beans::PropertyValue >& aGradientStops, const css::awt::Gradient2& 
rGradient);
 
diff --git a/oox/CppunitTest_oox_drawingml.mk b/oox/CppunitTest_oox_drawingml.mk
index 3a9e0d0a28f7..d670e05cd7b5 100644
--- a/oox/CppunitTest_oox_drawingml.mk
+++ b/oox/CppunitTest_oox_drawingml.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_drawingml, \
     tl \
     unotest \
     utl \
+    basegfx \
 ))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,oox_drawingml))
diff --git a/oox/CppunitTest_oox_shape.mk b/oox/CppunitTest_oox_shape.mk
index 073a21133708..a969d808a28b 100644
--- a/oox/CppunitTest_oox_shape.mk
+++ b/oox/CppunitTest_oox_shape.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_shape, \
     test \
     unotest \
     utl \
+    basegfx \
 ))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,oox_shape))
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index 09ab7121d8c8..8d5627a16cdc 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -9,7 +9,7 @@
 
 #include <test/unoapi_test.hxx>
 
-#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/awt/Gradient2.hpp>
 #include <com/sun/star/awt/Rectangle.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XNamed.hpp>
@@ -35,6 +35,7 @@
 #include <docmodel/theme/Theme.hxx>
 
 #include <comphelper/sequenceashashmap.hxx>
+#include <basegfx/utils/gradienttools.hxx>
 
 using namespace ::com::sun::star;
 
@@ -181,7 +182,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testGradientMultiStepTransparency)
     uno::Reference<container::XNamed> xShape(xDrawPage->getByIndex(1), 
uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(OUString("Rectangle 4"), xShape->getName());
     uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
-    awt::Gradient aTransparence;
+    awt::Gradient2 aTransparence;
     xShapeProps->getPropertyValue("FillTransparenceGradient") >>= 
aTransparence;
 
     // Without the accompanying fix in place, this test would have failed with:
@@ -189,7 +190,13 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, 
testGradientMultiStepTransparency)
     // - Actual  : 3487029 (0x353535)
     // i.e. the end transparency was not 100%, but was 21%, leading to an 
unexpected visible line on
     // the right of this shape.
-    CPPUNIT_ASSERT_EQUAL(COL_WHITE, Color(ColorTransparency, 
aTransparence.EndColor));
+    // MCGR: Use the completely imported transparency gradient to check for 
correctness
+    basegfx::ColorStops aColorStops;
+    basegfx::utils::fillColorStopsFromGradient2(aColorStops, aTransparence);
+
+    CPPUNIT_ASSERT_EQUAL(size_t(5), aColorStops.size());
+    CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[4].getStopOffset(), 
1.0));
+    CPPUNIT_ASSERT_EQUAL(aColorStops[4].getStopColor(), basegfx::BColor(0.0, 
0.0, 0.0));
 }
 
 CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment)
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index 523003ee351a..e8d4f188b8d3 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -14,7 +14,7 @@
 #include <string_view>
 
 #include <com/sun/star/awt/FontWeight.hpp>
-#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/awt/Gradient2.hpp>
 #include <com/sun/star/awt/Size.hpp>
 #include <com/sun/star/awt/XBitmap.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -37,6 +37,7 @@
 #include <svx/svdoashp.hxx>
 #include <tools/color.hxx>
 #include <docmodel/uno/UnoThemeColor.hxx>
+#include <basegfx/utils/gradienttools.hxx>
 
 using namespace ::com::sun::star;
 
@@ -467,11 +468,22 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3)
         uno::Reference<beans::XPropertySet> 
xShapeProps(xDrawPage->getByIndex(0), uno::UNO_QUERY);
         CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT),
                              xShapeProps->getPropertyValue(u"FillStyle"));
-        awt::Gradient aGradient;
+        awt::Gradient2 aGradient;
         xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient;
+
+        // MCGR: Use the completely imported transparency gradient to check 
for correctness
+        basegfx::ColorStops aColorStops;
+        basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient);
+
+        CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.0));
+        CPPUNIT_ASSERT_EQUAL(aColorStops[0].getStopColor(), 
basegfx::BColor(0.0, 0.0, 1.0));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(
+            aColorStops[1].getStopColor(),
+            basegfx::BColor(0.96862745098039216, 0.58823529411764708, 
0.27450980392156865));
+
         CPPUNIT_ASSERT_EQUAL(sal_Int16(690), aGradient.Angle);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(255), aGradient.StartColor);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(16225862), aGradient.EndColor);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aGradient.XOffset);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aGradient.YOffset);
         CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_LINEAR, aGradient.Style);
@@ -482,11 +494,22 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3)
         uno::Reference<beans::XPropertySet> 
xShapeProps(xDrawPage->getByIndex(1), uno::UNO_QUERY);
         CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT),
                              xShapeProps->getPropertyValue(u"FillStyle"));
-        awt::Gradient aGradient;
+        awt::Gradient2 aGradient;
         xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient;
+
+        // MCGR: Use the completely imported transparency gradient to check 
for correctness
+        basegfx::ColorStops aColorStops;
+        basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient);
+
+        CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.40000000000000002));
+        CPPUNIT_ASSERT_EQUAL(
+            aColorStops[0].getStopColor(),
+            basegfx::BColor(0.96862745098039216, 0.58823529411764708, 
0.27450980392156865));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(aColorStops[1].getStopColor(), 
basegfx::BColor(0.0, 0.0, 1.0));
+
         CPPUNIT_ASSERT_EQUAL(sal_Int16(900), aGradient.Angle);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(255), aGradient.EndColor);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(16225862), aGradient.StartColor);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(50), aGradient.XOffset);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(50), aGradient.YOffset);
         CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_RADIAL, aGradient.Style);
@@ -497,11 +520,22 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3)
         uno::Reference<beans::XPropertySet> 
xShapeProps(xDrawPage->getByIndex(2), uno::UNO_QUERY);
         CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT),
                              xShapeProps->getPropertyValue(u"FillStyle"));
-        awt::Gradient aGradient;
+        awt::Gradient2 aGradient;
         xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient;
+
+        // MCGR: Use the completely imported transparency gradient to check 
for correctness
+        basegfx::ColorStops aColorStops;
+        basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient);
+
+        CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.0));
+        CPPUNIT_ASSERT_EQUAL(
+            aColorStops[0].getStopColor(),
+            basegfx::BColor(0.96862745098039216, 0.58823529411764708, 
0.27450980392156865));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(aColorStops[1].getStopColor(), 
basegfx::BColor(0.0, 0.0, 1.0));
+
         CPPUNIT_ASSERT_EQUAL(sal_Int16(900), aGradient.Angle);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(255), aGradient.EndColor);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(16225862), aGradient.StartColor);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aGradient.XOffset);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aGradient.YOffset);
         CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_RECT, aGradient.Style);
@@ -604,12 +638,23 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, 
testImportWordArtGradient)
         uno::Reference<beans::XPropertySet> 
xShapeProps(xDrawPage->getByIndex(0), uno::UNO_QUERY);
         CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT),
                              xShapeProps->getPropertyValue(u"FillStyle"));
-        awt::Gradient aGradient;
+        awt::Gradient2 aGradient;
         xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient;
+
+        // MCGR: Use the completely imported transparency gradient to check 
for correctness
+        basegfx::ColorStops aColorStops;
+        basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient);
+
+        CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.0));
+        CPPUNIT_ASSERT_EQUAL(aColorStops[0].getStopColor(),
+                             basegfx::BColor(1.0, 0.75294117647058822, 0.0));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(aColorStops[1].getStopColor(),
+                             basegfx::BColor(0.75294117647058822, 0.0, 0.0));
+
         CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_LINEAR, aGradient.Style);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(690), aGradient.Angle);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(16760832), aGradient.StartColor);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(12582912), aGradient.EndColor);
 
         CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::LineStyle_SOLID),
                              xShapeProps->getPropertyValue(u"LineStyle"));
@@ -627,19 +672,41 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, 
testImportWordArtGradient)
         uno::Reference<beans::XPropertySet> 
xShapeProps(xDrawPage->getByIndex(1), uno::UNO_QUERY);
         CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT),
                              xShapeProps->getPropertyValue(u"FillStyle"));
-        awt::Gradient aGradient;
+        awt::Gradient2 aGradient;
         xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient;
+
+        // MCGR: Use the completely imported transparency gradient to check 
for correctness
+        basegfx::ColorStops aColorStops;
+        basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient);
+
+        CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.0));
+        CPPUNIT_ASSERT_EQUAL(aColorStops[0].getStopColor(),
+                             basegfx::BColor(0.0, 0.51372549019607838, 
0.8784313725490196));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(aColorStops[1].getStopColor(),
+                             basegfx::BColor(0.90196078431372551, 
0.90196078431372551, 0.0));
+
         CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_RADIAL, aGradient.Style);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(15132160), aGradient.EndColor);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(33760), aGradient.StartColor);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(50), aGradient.XOffset);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(50), aGradient.YOffset);
 
         xShapeProps->getPropertyValue(u"FillTransparenceGradient") >>= 
aGradient;
-        CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_RADIAL, aGradient.Style);
+        // MCGR: Use the completely imported transparency gradient to check 
for correctness
+        basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient);
+
         // Transparency is encoded in gray color.
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(5000268), aGradient.EndColor);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(6710886), aGradient.StartColor);
+        CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.0));
+        CPPUNIT_ASSERT_EQUAL(
+            aColorStops[0].getStopColor(),
+            basegfx::BColor(0.40000000000000002, 0.40000000000000002, 
0.40000000000000002));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(
+            aColorStops[1].getStopColor(),
+            basegfx::BColor(0.29999999999999999, 0.29999999999999999, 
0.29999999999999999));
+
+        CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_RADIAL, aGradient.Style);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(50), aGradient.XOffset);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(50), aGradient.YOffset);
 
@@ -663,19 +730,39 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, 
testImportWordArtGradient)
         uno::Reference<beans::XPropertySet> 
xShapeProps(xDrawPage->getByIndex(2), uno::UNO_QUERY);
         CPPUNIT_ASSERT_EQUAL(uno::Any(drawing::FillStyle_GRADIENT),
                              xShapeProps->getPropertyValue(u"FillStyle"));
-        awt::Gradient aGradient;
+        awt::Gradient2 aGradient;
         xShapeProps->getPropertyValue(u"FillGradient") >>= aGradient;
+
+        // MCGR: Use the completely imported transparency gradient to check 
for correctness
+        basegfx::ColorStops aColorStops;
+        basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient);
+
+        CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.0));
+        CPPUNIT_ASSERT_EQUAL(
+            aColorStops[0].getStopColor(),
+            basegfx::BColor(0.26666666666666666, 0.44705882352941179, 
0.7686274509803922));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(
+            aColorStops[1].getStopColor(),
+            basegfx::BColor(0.26666666666666666, 0.44705882352941179, 
0.7686274509803922));
+
         CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_RECT, aGradient.Style);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(4485828), aGradient.EndColor);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(4485828), aGradient.StartColor);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aGradient.XOffset);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aGradient.YOffset);
 
         xShapeProps->getPropertyValue(u"FillTransparenceGradient") >>= 
aGradient;
-        CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_RECT, aGradient.Style);
+        // MCGR: Use the completely imported transparency gradient to check 
for correctness
+        basegfx::utils::fillColorStopsFromGradient2(aColorStops, aGradient);
+
         // Transparency is encoded in gray color.
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(16777215), aGradient.EndColor);
-        CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aGradient.StartColor);
+        CPPUNIT_ASSERT_EQUAL(size_t(2), aColorStops.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[0].getStopOffset(), 
0.0));
+        CPPUNIT_ASSERT_EQUAL(aColorStops[0].getStopColor(), 
basegfx::BColor(0.0, 0.0, 0.0));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(aColorStops[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(aColorStops[1].getStopColor(), 
basegfx::BColor(1.0, 1.0, 1.0));
+
+        CPPUNIT_ASSERT_EQUAL(awt::GradientStyle_RECT, aGradient.Style);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(100), aGradient.XOffset);
         CPPUNIT_ASSERT_EQUAL(sal_Int16(0), aGradient.YOffset);
 
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 026a341e2c4d..2896ae14fe18 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -318,30 +318,6 @@ awt::Size lclGetOriginalSize( const GraphicHelper& 
rGraphicHelper, const Referen
     return aSizeHmm;
 }
 
-/**
- * Looks for a last gradient transition and possibly sets a gradient border
- * based on that.
- */
-void extractGradientBorderFromStops(const GradientFillProperties& 
rGradientProps,
-                                    const GraphicHelper& rGraphicHelper, 
::Color nPhClr,
-                                    awt::Gradient& rGradient)
-{
-    if (rGradientProps.maGradientStops.size() <= 1)
-        return;
-
-    auto it = rGradientProps.maGradientStops.rbegin();
-    double fLastPos = it->first;
-    Color aLastColor = it->second;
-    ++it;
-    double fLastButOnePos = it->first;
-    Color aLastButOneColor = it->second;
-    if (!aLastColor.equals(aLastButOneColor, rGraphicHelper, nPhClr))
-        return;
-
-    // Last transition has the same color, we can map that to a border.
-    rGradient.Border = rtl::math::round((fLastPos - fLastButOnePos) * 100);
-}
-
 } // namespace
 
 void GradientFillProperties::assignUsed( const GradientFillProperties& 
rSourceProps )
@@ -480,9 +456,7 @@ void FillProperties::pushToPropMap(ShapePropertyMap& 
rPropMap, const GraphicHelp
 
         case XML_gradFill:
             // do not create gradient struct if property is not supported...
-            static bool bMCGR(nullptr != std::getenv("MCGR_TEST"));
-
-            if( bMCGR && rPropMap.supportsProperty( 
ShapeProperty::FillGradient ) )
+            if( rPropMap.supportsProperty( ShapeProperty::FillGradient ) )
             {
                 // use awt::Gradient2, prepare ColorStops
                 awt::Gradient2 aGradient;
@@ -607,331 +581,6 @@ void FillProperties::pushToPropMap(ShapePropertyMap& 
rPropMap, const GraphicHelp
                     rPropMap.setProperty(ShapeProperty::GradientTransparency, 
aGradient);
                 }
             }
-
-            if( !bMCGR && rPropMap.supportsProperty( 
ShapeProperty::FillGradient ) )
-            {
-                sal_Int32 nEndTrans     = 0;
-                sal_Int32 nStartTrans   = 0;
-                awt::Gradient2 aGradient;
-                assert(aGradient.ColorStops.get() && "cid#1524676 
aGradient.ColorStops._pSequence won't be null here");
-                aGradient.Angle = 900;
-                aGradient.StartIntensity = 100;
-                aGradient.EndIntensity = 100;
-
-                // Old code, values in aGradient overwritten in many cases by 
newer code below
-                if( maGradientProps.maGradientStops.size() > 1 )
-                {
-                    aGradient.StartColor = 
sal_Int32(maGradientProps.maGradientStops.begin()->second.getColor( 
rGraphicHelper, nPhClr ));
-                    aGradient.EndColor = 
sal_Int32(maGradientProps.maGradientStops.rbegin()->second.getColor( 
rGraphicHelper, nPhClr ));
-                    if( 
maGradientProps.maGradientStops.rbegin()->second.hasTransparency() )
-                        nEndTrans = 
maGradientProps.maGradientStops.rbegin()->second.getTransparency()*255/100;
-                    if( 
maGradientProps.maGradientStops.begin()->second.hasTransparency() )
-                        nStartTrans = 
maGradientProps.maGradientStops.begin()->second.getTransparency()*255/100;
-                }
-
-                // "rotate with shape" set to false -> do not rotate
-                if ( !maGradientProps.moRotateWithShape.value_or( true ) )
-                    nShapeRotation = 0;
-
-                if( maGradientProps.moGradientPath.has_value() )
-                {
-                    IntegerRectangle2D aFillToRect = 
maGradientProps.moFillToRect.value_or( IntegerRectangle2D( 0, 0, MAX_PERCENT, 
MAX_PERCENT ) );
-                    sal_Int32 nCenterX = (MAX_PERCENT + aFillToRect.X1 - 
aFillToRect.X2) / 2;
-                    aGradient.XOffset = getLimitedValue<sal_Int16, sal_Int32>(
-                        nCenterX / PER_PERCENT, 0, 100);
-                    sal_Int32 nCenterY = (MAX_PERCENT + aFillToRect.Y1 - 
aFillToRect.Y2) / 2;
-                    aGradient.YOffset = getLimitedValue<sal_Int16, sal_Int32>(
-                        nCenterY / PER_PERCENT, 0, 100);
-
-                    if( maGradientProps.moGradientPath.value() == XML_circle )
-                    {
-                        // Style should be radial at least when the horizontal 
center is at 50%.
-                        // Otherwise import as a linear gradient, because it 
is the most similar to the MSO radial style.
-                        aGradient.Style = awt::GradientStyle_LINEAR;
-                        if( aGradient.XOffset == 100 && aGradient.YOffset == 
100 )
-                            aGradient.Angle = 450;
-                        else if( aGradient.XOffset == 0 && aGradient.YOffset 
== 100 )
-                            aGradient.Angle = 3150;
-                        else if( aGradient.XOffset == 100 && aGradient.YOffset 
== 0 )
-                            aGradient.Angle = 1350;
-                        else if( aGradient.XOffset == 0 && aGradient.YOffset 
== 0 )
-                            aGradient.Angle = 2250;
-                        else
-                            aGradient.Style = awt::GradientStyle_RADIAL;
-                    }
-                    else
-                    {
-                        aGradient.Style = awt::GradientStyle_RECT;
-                    }
-
-                    ::std::swap( aGradient.StartColor, aGradient.EndColor );
-                    ::std::swap( nStartTrans, nEndTrans );
-
-                    extractGradientBorderFromStops(maGradientProps, 
rGraphicHelper, nPhClr,
-                                                   aGradient);
-                }
-                else if (!maGradientProps.maGradientStops.empty())
-                {
-                    // A copy of the gradient stops for local modification
-                    GradientFillProperties::GradientStopMap 
aGradientStops(maGradientProps.maGradientStops);
-
-                    // Add a fake gradient stop at 0% and 100% if necessary, 
so that the gradient always starts
-                    // at 0% and ends at 100%, to make following logic clearer 
(?).
-                    auto a0 = aGradientStops.find( 0.0 );
-                    if( a0 == aGradientStops.end() )
-                    {
-                        // temp variable required
-                        Color aFirstColor(aGradientStops.begin()->second);
-                        aGradientStops.emplace( 0.0, aFirstColor );
-                    }
-
-                    auto a1 = aGradientStops.find( 1.0 );
-                    if( a1 == aGradientStops.end() )
-                    {
-                        // ditto
-                        Color aLastColor(aGradientStops.rbegin()->second);
-                        aGradientStops.emplace( 1.0, aLastColor );
-                    }
-
-                    // Check if the gradient is symmetric, which we will 
emulate with an "axial" gradient.
-                    bool bSymmetric(true);
-                    {
-                        
GradientFillProperties::GradientStopMap::const_iterator aItA( 
aGradientStops.begin() );
-                        
GradientFillProperties::GradientStopMap::const_iterator 
aItZ(std::prev(aGradientStops.end()));
-                        assert(aItZ != aGradientStops.end());
-                        while( bSymmetric && aItA->first < aItZ->first )
-                        {
-                            if (!aItA->second.equals(aItZ->second, 
rGraphicHelper, nPhClr))
-                                bSymmetric = false;
-                            else
-                            {
-                                ++aItA;
-                                aItZ = std::prev(aItZ);
-                            }
-                        }
-                        // Don't be fooled if the middlemost stop isn't at 0.5.
-                        if( bSymmetric && aItA == aItZ && aItA->first != 0.5 )
-                            bSymmetric = false;
-
-                        // If symmetric, do the rest of the logic for just a 
half.
-                        if( bSymmetric )
-                        {
-                            // aItZ already points to the colour for the 
middle, but insert a fake stop at the
-                            // exact middle if necessary.
-                            if( aItA->first != aItZ->first )
-                            {
-                                Color aMiddleColor = aItZ->second;
-                                auto a05 = aGradientStops.find( 0.5 );
-
-                                if( a05 != aGradientStops.end() )
-                                    a05->second = aMiddleColor;
-                                else
-                                    aGradientStops.emplace( 0.5, aMiddleColor 
);
-                            }
-                            // Drop the rest of the stops
-                            while( aGradientStops.rbegin()->first > 0.5 )
-                                aGradientStops.erase( 
aGradientStops.rbegin()->first );
-                        }
-                    }
-
-                    SAL_INFO("oox.drawingml.gradient", "symmetric: " << 
(bSymmetric ? "YES" : "NO") <<
-                             ", number of stops: " << aGradientStops.size());
-                    size_t nIndex = 0;
-                    for (auto const& gradientStop : aGradientStops)
-                        SAL_INFO("oox.drawingml.gradient", "  " << nIndex++ << 
": " <<
-                                 gradientStop.first << ": " <<
-                                 std::hex << 
sal_Int32(gradientStop.second.getColor( rGraphicHelper, nPhClr )) << std::dec <<
-                                 "@" << (100 - 
gradientStop.second.getTransparency()) << "%");
-
-                    // Now estimate the simple LO style gradient (only two 
stops, at n% and 100%, where n ==
-                    // the "border") that best emulates the gradient between 
begin() and prior(end()).
-
-                    // First look for the largest segment in the gradient.
-                    GradientFillProperties::GradientStopMap::iterator 
aIt(aGradientStops.begin());
-                    double nWidestWidth = -1;
-                    GradientFillProperties::GradientStopMap::iterator 
aWidestSegmentStart(aIt);
-                    ++aIt;
-                    while( aIt != aGradientStops.end() )
-                    {
-                        if (aIt->first - std::prev(aIt)->first > nWidestWidth)
-                        {
-                            nWidestWidth = aIt->first - std::prev(aIt)->first;
-                            aWidestSegmentStart = std::prev(aIt);
-                        }
-                        ++aIt;
-                    }
-                    assert( nWidestWidth >= 0 );
-
-                    double nBorder = 0;
-                    bool bSwap(false);
-
-                    // Do we have just two segments, and either one is of 
uniform colour, or three or more
-                    // segments, and the widest one is the first or last one, 
and is it of uniform colour? If
-                    // so, deduce the border from it, and drop that segment.
-                    if( aGradientStops.size() == 3 &&
-                        
aGradientStops.begin()->second.getColor(rGraphicHelper, nPhClr) == 
std::next(aGradientStops.begin())->second.getColor(rGraphicHelper, nPhClr) &&
-                        aGradientStops.begin()->second.getTransparency() == 
std::next(aGradientStops.begin())->second.getTransparency())
-                    {
-                        // Two segments, first is uniformly coloured
-                        SAL_INFO("oox.drawingml.gradient", "two segments, 
first is uniformly coloured");
-                        nBorder = std::next(aGradientStops.begin())->first - 
aGradientStops.begin()->first;
-                        aGradientStops.erase(aGradientStops.begin());
-                        aWidestSegmentStart = aGradientStops.begin();
-                    }
-                    else if( !bSymmetric &&
-                             aGradientStops.size() == 3 &&
-                             
std::next(aGradientStops.begin())->second.getColor(rGraphicHelper, nPhClr) == 
std::prev(aGradientStops.end())->second.getColor(rGraphicHelper, nPhClr) &&
-                             
std::next(aGradientStops.begin())->second.getTransparency() == 
std::prev(aGradientStops.end())->second.getTransparency())
-                    {
-                        // Two segments, second is uniformly coloured
-                        SAL_INFO("oox.drawingml.gradient", "two segments, 
second is uniformly coloured");
-                        auto aNext = std::next(aGradientStops.begin());
-                        auto aPrev = std::prev(aGradientStops.end());
-                        assert(aPrev != aGradientStops.end());
-                        nBorder = aPrev->first - aNext->first;
-                        aGradientStops.erase(aNext);
-                        aWidestSegmentStart = aGradientStops.begin();
-                        bSwap = true;
-                        nShapeRotation = 180*60000 - nShapeRotation;
-                    }
-                    else if( !bSymmetric &&
-                             aGradientStops.size() >= 4 &&
-                             aWidestSegmentStart->second.getColor( 
rGraphicHelper, nPhClr ) == 
std::next(aWidestSegmentStart)->second.getColor(rGraphicHelper, nPhClr) &&
-                             aWidestSegmentStart->second.getTransparency() == 
std::next(aWidestSegmentStart)->second.getTransparency() &&
-                             ( aWidestSegmentStart == aGradientStops.begin() ||
-                               std::next(aWidestSegmentStart) == 
std::prev(aGradientStops.end())))
-                    {
-                        // Not symmetric, three or more segments, the widest 
is first or last and is uniformly coloured
-                        SAL_INFO("oox.drawingml.gradient", "first or last 
segment is widest and is uniformly coloured");
-                        nBorder = std::next(aWidestSegmentStart)->first - 
aWidestSegmentStart->first;
-
-                        // If it's the last segment that is uniformly 
coloured, rotate the gradient 180
-                        // degrees and swap start and end colours
-                        if (std::next(aWidestSegmentStart) == 
std::prev(aGradientStops.end()))
-                        {
-                            bSwap = true;
-                            nShapeRotation = 180*60000 - nShapeRotation;
-                        }
-
-                        aGradientStops.erase( aWidestSegmentStart++ );
-
-                        // Look for which is widest now
-                        aIt = std::next(aGradientStops.begin());
-                        nWidestWidth = -1;
-                        while( aIt != aGradientStops.end() )
-                        {
-                            if (aIt->first - std::prev(aIt)->first > 
nWidestWidth)
-                            {
-                                nWidestWidth = aIt->first - 
std::prev(aIt)->first;
-                                aWidestSegmentStart = std::prev(aIt);
-                            }
-                            ++aIt;
-                        }
-                    }
-                    SAL_INFO("oox.drawingml.gradient", "widest segment start: 
" << aWidestSegmentStart->first << ", border: " << nBorder);
-                    assert( (!bSymmetric && !bSwap) || !(bSymmetric && bSwap) 
);
-
-                    // Now we have a potential border and a largest segment. 
Use those.
-
-                    aGradient.Style = bSymmetric ? awt::GradientStyle_AXIAL : 
awt::GradientStyle_LINEAR;
-                    sal_Int32 nShadeAngle = 
maGradientProps.moShadeAngle.value_or( 0 );
-                    // Adjust for flips
-                    if ( bFlipH )
-                        nShadeAngle = 180*60000 - nShadeAngle;
-                    if ( bFlipV )
-                        nShadeAngle = -nShadeAngle;
-                    sal_Int32 nDmlAngle = nShadeAngle + nShapeRotation;
-                    // convert DrawingML angle (in 1/60000 degrees) to API 
angle (in 1/10 degrees)
-                    aGradient.Angle = static_cast< sal_Int16 >( (8100 - 
(nDmlAngle / (PER_DEGREE / 10))) % 3600 );
-                    Color aStartColor, aEndColor;
-
-                    // Make a note where the widest segment stops, because we 
will try to grow it next.
-                    auto aWidestSegmentEnd = std::next(aWidestSegmentStart);
-
-                    // Try to grow the widest segment backwards: if a previous 
segment has the same
-                    // color, just different transparency, include it.
-                    while (aWidestSegmentStart != aGradientStops.begin())
-                    {
-                        auto it = std::prev(aWidestSegmentStart);
-                        if (it->second.getColor(rGraphicHelper, nPhClr)
-                            != 
aWidestSegmentStart->second.getColor(rGraphicHelper, nPhClr))
-                        {
-                            break;
-                        }
-
-                        aWidestSegmentStart = it;
-                    }
-
-                    // Try to grow the widest segment forward: if a next 
segment has the same
-                    // color, just different transparency, include it.
-                    while (aWidestSegmentEnd != 
std::prev(aGradientStops.end()))
-                    {
-                        auto it = std::next(aWidestSegmentEnd);
-                        if (it->second.getColor(rGraphicHelper, nPhClr)
-                            != 
aWidestSegmentEnd->second.getColor(rGraphicHelper, nPhClr))
-                        {
-                            break;
-                        }
-
-                        aWidestSegmentEnd = it;
-                    }
-
-                    assert(aWidestSegmentEnd != aGradientStops.end());
-
-                    if( bSymmetric )
-                    {
-                        aStartColor = aWidestSegmentEnd->second;
-                        aEndColor = aWidestSegmentStart->second;
-                        nBorder *= 2;
-                    }
-                    else if( bSwap )
-                    {
-                        aStartColor = aWidestSegmentEnd->second;
-                        aEndColor = aWidestSegmentStart->second;
-                    }
-                    else
-                    {
-                        aStartColor = aWidestSegmentStart->second;
-                        aEndColor = aWidestSegmentEnd->second;
-                    }
-
-                    SAL_INFO("oox.drawingml.gradient", "start color: " << 
std::hex << sal_Int32(aStartColor.getColor( rGraphicHelper, nPhClr )) << 
std::dec <<
-                             "@" << (100-aStartColor.getTransparency()) << "%"
-                             ", end color: " << std::hex << 
sal_Int32(aEndColor.getColor( rGraphicHelper, nPhClr )) << std::dec <<
-                             "@" << (100-aEndColor.getTransparency()) << "%");
-
-                    aGradient.StartColor = sal_Int32(aStartColor.getColor( 
rGraphicHelper, nPhClr ));
-                    aGradient.EndColor = sal_Int32(aEndColor.getColor( 
rGraphicHelper, nPhClr ));
-
-                    nStartTrans = aStartColor.hasTransparency() ? 
aStartColor.getTransparency()*255/100 : 0;
-                    nEndTrans = aEndColor.hasTransparency() ? 
aEndColor.getTransparency()*255/100 : 0;
-
-                    aGradient.Border = rtl::math::round(100*nBorder);
-                }
-
-                // for temporary backward compatibility, complete data by 
creating ColorStops for awt::Gradient2
-                basegfx::utils::fillColorStopSequenceFromColorStops(
-                    aGradient.ColorStops,
-                    basegfx::ColorStops {
-                        basegfx::ColorStop(0.0, ::Color(ColorTransparency, 
aGradient.StartColor).getBColor()),
-                        basegfx::ColorStop(1.0, ::Color(ColorTransparency, 
aGradient.EndColor).getBColor()) });
-
-                // push gradient or named gradient to property map
-                if( rPropMap.setProperty( ShapeProperty::FillGradient, 
aGradient ) )
-                    eFillStyle = FillStyle_GRADIENT;
-
-                // push gradient transparency to property map
-                if( nStartTrans != 0 || nEndTrans != 0 )
-                {
-                    awt::Gradient aGrad(aGradient);
-                    uno::Any aVal;
-                    aGrad.EndColor = static_cast<sal_Int32>( nEndTrans | 
nEndTrans << 8 | nEndTrans << 16 );
-                    aGrad.StartColor = static_cast<sal_Int32>( nStartTrans | 
nStartTrans << 8 | nStartTrans << 16 );
-                    aVal <<= aGrad;
-                    rPropMap.setProperty( ShapeProperty::GradientTransparency, 
aGrad );
-                }
-
-            }
         break;
 
         case XML_blipFill:
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 94f956428d19..da8ef4924615 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -481,27 +481,6 @@ static sal_Int32 lcl_generateRandomValue()
     return comphelper::rng::uniform_int_distribution(0, 100000000-1);
 }
 
-static sal_Int32 lcl_getAlphaFromTransparenceGradient(const awt::Gradient2& 
rGradient, bool bStart)
-{
-    // Our alpha is a gray color value.
-    sal_uInt8 nRed(0);
-
-    if (rGradient.ColorStops.getLength() > 0)
-    {
-        if (bStart)
-            nRed = 
static_cast<sal_uInt8>(rGradient.ColorStops[0].StopColor.Red * 255.0);
-        else
-            nRed = 
static_cast<sal_uInt8>(rGradient.ColorStops[rGradient.ColorStops.getLength() - 
1].StopColor.Red * 255.0);
-    }
-    else
-    {
-        nRed = ::Color(ColorTransparency, bStart ? rGradient.StartColor : 
rGradient.EndColor).GetRed();
-    }
-
-    // drawingML alpha is a percentage on a 0..100000 scale.
-    return (255 - nRed) * oox::drawingml::MAX_PERCENT / 255;
-}
-
 bool DataLabelsRange::empty() const
 {
     return maLabels.empty();
@@ -1945,7 +1924,20 @@ void ChartExport::exportSolidFill(const Reference< 
XPropertySet >& xPropSet)
 
         if (!bNeedGradientFill && 0 != aTransparenceGradient.StartColor)
         {
-            nAlpha = 
lcl_getAlphaFromTransparenceGradient(aTransparenceGradient, true);
+            // Our alpha is a gray color value.
+            sal_uInt8 nRed(0);
+
+            if (aTransparenceGradient.ColorStops.getLength() > 0)
+            {
+                nRed = 
static_cast<sal_uInt8>(aTransparenceGradient.ColorStops[0].StopColor.Red * 
255.0);
+            }
+            else
+            {
+                nRed = ::Color(ColorTransparency, 
aTransparenceGradient.StartColor).GetRed();
+            }
+
+            // drawingML alpha is a percentage on a 0..100000 scale.
+            nAlpha = (255 - nRed) * oox::drawingml::MAX_PERCENT / 255;
         }
     }
     // write XML
@@ -1954,7 +1946,7 @@ void ChartExport::exportSolidFill(const Reference< 
XPropertySet >& xPropSet)
         // no longer create copy/PseudoColorGradient, use new API of
         // WriteGradientFill to express fix fill color
         mpFS->startElementNS(XML_a, XML_gradFill, XML_rotWithShape, "0");
-        WriteGradientFill(nullptr, nFillColor, &aTransparenceGradient, 0);
+        WriteGradientFill(nullptr, nFillColor, &aTransparenceGradient);
         mpFS->endElementNS(XML_a, XML_gradFill);
     }
     else
@@ -2034,7 +2026,7 @@ void ChartExport::exportGradientFill( const Reference< 
XPropertySet >& xPropSet
                 uno::Reference< container::XNameAccess > 
xTransparenceGradient(xFact->createInstance("com.sun.star.drawing.TransparencyGradientTable"),
 uno::UNO_QUERY);
                 uno::Any rTransparenceValue = 
xTransparenceGradient->getByName(sFillTransparenceGradientName);
                 basegfx::utils::fillGradient2FromAny(aTransparenceGradient, 
rTransparenceValue);
-                WriteGradientFill(&aGradient, 0, &aTransparenceGradient, 0);
+                WriteGradientFill(&aGradient, 0, &aTransparenceGradient);
             }
             else if (GetProperty(xPropSet, "FillTransparence") )
             {
@@ -2042,11 +2034,12 @@ void ChartExport::exportGradientFill( const Reference< 
XPropertySet >& xPropSet
                 // WriteGradientFill to express fix transparency
                 sal_Int32 nTransparency = 0;
                 mAny >>= nTransparency;
-                WriteGradientFill(&aGradient, 0, nullptr, nTransparency);
+                // nTransparency is [0..100]%
+                WriteGradientFill(&aGradient, 0, nullptr, nTransparency * 
0.01);
             }
             else
             {
-                WriteGradientFill(&aGradient, 0, &aTransparenceGradient, 0);
+                WriteGradientFill(&aGradient, 0, &aTransparenceGradient);
             }
 
             mpFS->endElementNS(XML_a, XML_gradFill);
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 77c4c1b02186..ad07308ada62 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -152,28 +152,6 @@ using ::sax_fastparser::FastSerializerHelper;
 
 namespace
 {
-/// Extracts start or end alpha information from a transparency gradient.
-sal_Int32 GetAlphaFromTransparenceGradient(const awt::Gradient2& rGradient, 
bool bStart)
-{
-    // Our alpha is a gray color value.
-    sal_uInt8 nRed(0);
-
-    if (rGradient.ColorStops.getLength() > 0)
-    {
-        if (bStart)
-            nRed = 
static_cast<sal_uInt8>(rGradient.ColorStops[0].StopColor.Red * 255.0);
-        else
-            nRed = 
static_cast<sal_uInt8>(rGradient.ColorStops[rGradient.ColorStops.getLength() - 
1].StopColor.Red * 255.0);
-    }
-    else
-    {
-        nRed = ::Color(ColorTransparency, bStart ? rGradient.StartColor : 
rGradient.EndColor).GetRed();
-    }
-
-    // drawingML alpha is a percentage on a 0..100000 scale.
-    return (255 - nRed) * oox::drawingml::MAX_PERCENT / 255;
-}
-
 const char* g_aPredefinedClrNames[] = {
     "dk1",
     "lt1",
@@ -509,7 +487,20 @@ void DrawingML::WriteSolidFill( const Reference< 
XPropertySet >& rXPropSet )
 
         if (!bNeedGradientFill && 0 != aTransparenceGradient.StartColor)
         {
-            nAlpha = GetAlphaFromTransparenceGradient(aTransparenceGradient, 
true);
+            // Our alpha is a gray color value.
+            sal_uInt8 nRed(0);
+
+            if (aTransparenceGradient.ColorStops.getLength() > 0)
+            {
+                nRed = 
static_cast<sal_uInt8>(aTransparenceGradient.ColorStops[0].StopColor.Red * 
255.0);
+            }
+            else
+            {
+                nRed = ::Color(ColorTransparency, 
aTransparenceGradient.StartColor).GetRed();
+            }
+
+            // drawingML alpha is a percentage on a 0..100000 scale.
+            nAlpha = (255 - nRed) * oox::drawingml::MAX_PERCENT / 255;
         }
     }
 
@@ -519,7 +510,7 @@ void DrawingML::WriteSolidFill( const Reference< 
XPropertySet >& rXPropSet )
         // no longer create copy/PseudoColorGradient, use new API of
         // WriteGradientFill to express fix fill color
         mpFS->startElementNS(XML_a, XML_gradFill, XML_rotWithShape, "0");
-        WriteGradientFill(nullptr, nFillColor, &aTransparenceGradient, 0);
+        WriteGradientFill(nullptr, nFillColor, &aTransparenceGradient);
         mpFS->endElementNS( XML_a, XML_gradFill );
     }
     else if ( nFillColor != nOriginalColor )
@@ -600,19 +591,12 @@ bool DrawingML::WriteSchemeColor(OUString const& 
rPropertyName, const uno::Refer
     return true;
 }
 
-void DrawingML::WriteGradientStop2(double fOffset, const basegfx::BColor& 
rColor, const basegfx::BColor& rAlpha)
+void DrawingML::WriteGradientStop(double fOffset, const basegfx::BColor& 
rColor, const basegfx::BColor& rAlpha)
 {
-    mpFS->startElementNS(XML_a, XML_gs, XML_pos, 
OString::number(static_cast<sal_uInt32>(fOffset * 100000)));
+    mpFS->startElementNS(XML_a, XML_gs, XML_pos, 
OString::number(basegfx::fround(fOffset * 100000)));
     WriteColor(
         ::Color(rColor),
-        static_cast<sal_Int32>((1.0 - rAlpha.luminance()) * 
oox::drawingml::MAX_PERCENT));
-    mpFS->endElementNS( XML_a, XML_gs );
-}
-
-void DrawingML::WriteGradientStop(sal_uInt16 nStop, ::Color nColor, sal_Int32 
nAlpha)
-{
-    mpFS->startElementNS(XML_a, XML_gs, XML_pos, OString::number(nStop * 
1000));
-    WriteColor(nColor, nAlpha);
+        basegfx::fround((1.0 - rAlpha.luminance()) * 
oox::drawingml::MAX_PERCENT));
     mpFS->endElementNS( XML_a, XML_gs );
 }
 
@@ -706,7 +690,7 @@ void DrawingML::WriteGradientFill( const Reference< 
XPropertySet >& rXPropSet )
 
         awt::Gradient2 aTransparenceGradient;
         awt::Gradient2* pTransparenceGradient(nullptr);
-        sal_Int32 nTransparency(0);
+        double fTransparency(0.0);
         OUString sFillTransparenceGradientName;
 
         if (GetProperty(rXPropSet, "FillTransparenceGradientName")
@@ -722,10 +706,13 @@ void DrawingML::WriteGradientFill( const Reference< 
XPropertySet >& rXPropSet )
         {
             // no longer create PseudoTransparencyGradient, use new API of
             // WriteGradientFill to express fix transparency
+            sal_Int32 nTransparency(0);
             mAny >>= nTransparency;
+            // nTransparency is [0..100]%
+            fTransparency = nTransparency * 0.01;
         }
 
-        WriteGradientFill(&aGradient, 0, pTransparenceGradient, nTransparency);
+        WriteGradientFill(&aGradient, 0, pTransparenceGradient, fTransparency);
 
         mpFS->endElementNS(XML_a, XML_gradFill);
     }
@@ -790,14 +777,14 @@ void DrawingML::WriteGrabBagGradientFill( const Sequence< 
PropertyValue >& aGrad
     }
 }
 
-void DrawingML::WriteGradientFill2(
+void DrawingML::WriteGradientFill(
     const awt::Gradient2* pColorGradient, sal_Int32 nFixColor,
-    const awt::Gradient2* pTransparenceGradient, sal_Int32 nFixTransparence)
+    const awt::Gradient2* pTransparenceGradient, double fFixTransparence)
 {
     basegfx::ColorStops aColorStops;
     basegfx::ColorStops aAlphaStops;
     basegfx::BColor aSingleColor(::Color(ColorTransparency, 
nFixColor).getBColor());
-    basegfx::BColor aSingleAlpha(::Color(ColorTransparency, 
nFixTransparence).getBColor().luminance());
+    basegfx::BColor aSingleAlpha(fFixTransparence);
     awt::Gradient2 aGradient;
 
     if (nullptr != pColorGradient)
@@ -865,10 +852,21 @@ void DrawingML::WriteGradientFill2(
                 aRevCurrAlpha++;
             }
 
-            // add non-mirrored gradients, translated and scaled to [0.5 .. 
1.0]
             basegfx::ColorStops::const_iterator 
aCurrColor(aColorStops.begin());
             basegfx::ColorStops::const_iterator 
aCurrAlpha(aAlphaStops.begin());
 
+            if (basegfx::fTools::equalZero(aCurrColor->getStopOffset()))
+            {
+                // Caution: do not add 1st entry again, that would be double 
since it was
+                // already added as last element of the inverse run above. But 
only if
+                // the gradient has a start entry for 0.0 aka StartColor, else 
it is correct.
+                // Since aColorStops and aAlphaStops are already syched (see
+                // synchronizeColorStops above), testing one of them is 
sufficient here.
+                aCurrColor++;
+                aCurrAlpha++;
+            }
+
+            // add non-mirrored gradients, translated and scaled to [0.5 .. 
1.0]
             while (aCurrColor != aColorStops.end() && aCurrAlpha != 
aAlphaStops.end())
             {
                 aNewColorStops.emplace_back((aCurrColor->getStopOffset() * 
0.5) + 0.5, aCurrColor->getStopColor());
@@ -907,7 +905,7 @@ void DrawingML::WriteGradientFill2(
 
     while (aCurrColor != aColorStops.end() && aCurrAlpha != aAlphaStops.end())
     {
-        WriteGradientStop2(
+        WriteGradientStop(
             aCurrColor->getStopOffset(),
             aCurrColor->getStopColor(),
             aCurrAlpha->getStopColor());
@@ -935,131 +933,6 @@ void DrawingML::WriteGradientFill2(
     }
 }
 
-void DrawingML::WriteGradientFill(
-    const awt::Gradient2* pColorGradient, sal_Int32 nFixColor,
-    const awt::Gradient2* pTransparenceGradient, sal_Int32 nFixTransparence)
-{
-    static bool bMCGR(nullptr != std::getenv("MCGR_TEST"));
-
-    if (bMCGR)
-    {
-        WriteGradientFill2(pColorGradient, nFixColor, pTransparenceGradient, 
nFixTransparence);
-        return;
-    }
-
-    // evtl need a temporary pseudo-color gradient
-    awt::Gradient2 aColorGradient;
-
-    if (nullptr == pColorGradient && nullptr == pTransparenceGradient)
-    {
-        // this is an error: *one* gradient has to be given
-        return;
-    }
-
-    if (nullptr == pColorGradient)
-    {
-        // create complete temporary copy to keep orig export working
-        aColorGradient = *pTransparenceGradient;
-
-        // change parameters specific for PseudoColorGradient
-        aColorGradient.StartIntensity = 100;
-        aColorGradient.EndIntensity = 100;
-        aColorGradient.StartColor = nFixColor;
-        aColorGradient.EndColor = nFixColor;
-
-        basegfx::utils::fillColorStopSequenceFromColorStops(
-            aColorGradient.ColorStops,
-            basegfx::ColorStops {
-                basegfx::ColorStop(0.0, ::Color(ColorTransparency, 
nFixColor).getBColor()) });
-
-        pColorGradient = &aColorGradient;
-    }
-
-    sal_Int32 nStartAlpha(MAX_PERCENT);
-    sal_Int32 nEndAlpha(MAX_PERCENT);
-
-    if (nullptr == pTransparenceGradient)
-    {
-        nStartAlpha = nEndAlpha = (MAX_PERCENT - (PER_PERCENT * 
nFixTransparence));
-    }
-    else
-    {
-        nStartAlpha = GetAlphaFromTransparenceGradient(*pTransparenceGradient, 
true);
-        nEndAlpha = GetAlphaFromTransparenceGradient(*pTransparenceGradient, 
false);
-    }
-
-    switch( pColorGradient->Style )
-    {
-        default:
-        case awt::GradientStyle_LINEAR:
-        {
-            mpFS->startElementNS(XML_a, XML_gsLst);
-            WriteGradientStop(pColorGradient->Border, 
ColorWithIntensity(pColorGradient->StartColor, pColorGradient->StartIntensity),
-                              nStartAlpha);
-            WriteGradientStop(100, 
ColorWithIntensity(pColorGradient->EndColor, pColorGradient->EndIntensity),
-                              nEndAlpha);
-            mpFS->endElementNS( XML_a, XML_gsLst );
-            mpFS->singleElementNS(
-                XML_a, XML_lin, XML_ang,
-                OString::number(((3600 - pColorGradient->Angle + 900) * 6000) 
% 21600000));
-            break;
-        }
-
-        case awt::GradientStyle_AXIAL:
-        {
-            mpFS->startElementNS(XML_a, XML_gsLst);
-            WriteGradientStop(0, ColorWithIntensity(pColorGradient->EndColor, 
pColorGradient->EndIntensity),
-                              nEndAlpha);
-            if (pColorGradient->Border > 0 && pColorGradient->Border < 100)
-            {
-                WriteGradientStop(pColorGradient->Border/2,
-                                  ColorWithIntensity(pColorGradient->EndColor, 
pColorGradient->EndIntensity),
-                                  nEndAlpha);
-            }
-            WriteGradientStop(50, 
ColorWithIntensity(pColorGradient->StartColor, pColorGradient->StartIntensity),
-                              nStartAlpha);
-            if (pColorGradient->Border > 0 && pColorGradient->Border < 100)
-            {
-                WriteGradientStop(100 - pColorGradient->Border/2,
-                                  ColorWithIntensity(pColorGradient->EndColor, 
pColorGradient->EndIntensity),
-                                  nEndAlpha);
-            }
-            WriteGradientStop(100, 
ColorWithIntensity(pColorGradient->EndColor, pColorGradient->EndIntensity),
-                              nEndAlpha);
-            mpFS->endElementNS(XML_a, XML_gsLst);
-            mpFS->singleElementNS(
-                XML_a, XML_lin, XML_ang,
-                OString::number(((3600 - pColorGradient->Angle + 900) * 6000) 
% 21600000));
-            break;
-        }
-
-        case awt::GradientStyle_RADIAL:
-        case awt::GradientStyle_ELLIPTICAL:
-        case awt::GradientStyle_RECT:
-        case awt::GradientStyle_SQUARE:
-        {
-            mpFS->startElementNS(XML_a, XML_gsLst);
-            WriteGradientStop(0, ColorWithIntensity(pColorGradient->EndColor, 
pColorGradient->EndIntensity),
-                              nEndAlpha);
-            if (pColorGradient->Border > 0 && pColorGradient->Border < 100)
-            {
-                // Map border to an additional gradient stop, which has the
-                // same color as the final stop.
-                WriteGradientStop(100 - pColorGradient->Border,
-                                  
ColorWithIntensity(pColorGradient->StartColor, pColorGradient->StartIntensity),
-                                  nStartAlpha);
-            }
-            WriteGradientStop(100,
-                              ColorWithIntensity(pColorGradient->StartColor, 
pColorGradient->StartIntensity),
-                              nStartAlpha);
-            mpFS->endElementNS(XML_a, XML_gsLst);
-
-            WriteGradientPath(*pColorGradient, mpFS, pColorGradient->Style == 
awt::GradientStyle_RADIAL || pColorGradient->Style == 
awt::GradientStyle_ELLIPTICAL);
-            break;
-        }
-    }
-}
-
 void DrawingML::WriteLineArrow( const Reference< XPropertySet >& rXPropSet, 
bool bLineStart )
 {
     ESCHER_LineEnd eLineEnd;
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 2e96c61bb366..029d5429d921 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -787,9 +787,10 @@ void FillModel::pushToPropMap( ShapePropertyMap& rPropMap, 
const GraphicHelper&
                         const Color& rOuterColor = bOuterToInner ? aColor1 : 
aColor2;
                         const Color& rInnerColor = bOuterToInner ? aColor2 : 
aColor1;
 
+                        // add in order of offset
                         lcl_setGradientStop( 
aFillProps.maGradientProps.maGradientStops, 0.0, rOuterColor);
+                        lcl_setGradientStop( 
aFillProps.maGradientProps.maGradientStops, 0.5, rInnerColor);
                         lcl_setGradientStop( 
aFillProps.maGradientProps.maGradientStops, 1.0, rOuterColor);
-                        lcl_setGradientStop( 
aFillProps.maGradientProps.maGradientStops, 0.5, rInnerColor );
                     }
                     else    // focus of -100%, 0%, and 100% is linear gradient
                     {
diff --git a/sc/qa/unit/subsequent_filters_test3.cxx 
b/sc/qa/unit/subsequent_filters_test3.cxx
index 400a2fbcdd2c..779e07fe4589 100644
--- a/sc/qa/unit/subsequent_filters_test3.cxx
+++ b/sc/qa/unit/subsequent_filters_test3.cxx
@@ -1628,12 +1628,16 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf129789)
 
         CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, 
rStyleItemH2.GetValue());
         const XFillGradientItem& rGradientItem = 
pCaptionH2->GetMergedItem(XATTR_FILLGRADIENT);
+        const basegfx::ColorStops& 
rColorStops(rGradientItem.GetGradientValue().GetColorStops());
+
+        CPPUNIT_ASSERT_EQUAL(size_t(2), rColorStops.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(rColorStops[0].getStopOffset(), 
0.0));
         CPPUNIT_ASSERT_EQUAL(
-            Color(0xdde8cb),
-            
Color(rGradientItem.GetGradientValue().GetColorStops().front().getStopColor()));
-        CPPUNIT_ASSERT_EQUAL(
-            Color(0xffd7d7),
-            
Color(rGradientItem.GetGradientValue().GetColorStops().back().getStopColor()));
+            rColorStops[0].getStopColor(),
+            basegfx::BColor(0.8666666666666667, 0.90980392156862744, 
0.79607843137254897));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(rColorStops[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(rColorStops[1].getStopColor(),
+                             basegfx::BColor(1.0, 0.84313725490196079, 
0.84313725490196079));
 
         SdrCaptionObj* const pCaptionH9 = checkCaption(*pDoc, ScAddress(7, 8, 
0), false);
 
@@ -1641,12 +1645,16 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest3, testTdf129789)
 
         CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT, 
rStyleItemH9.GetValue());
         const XFillGradientItem& rGradientItem2 = 
pCaptionH2->GetMergedItem(XATTR_FILLGRADIENT);
+        const basegfx::ColorStops& 
rColorStops2(rGradientItem2.GetGradientValue().GetColorStops());
+
+        CPPUNIT_ASSERT_EQUAL(size_t(2), rColorStops2.size());
+        CPPUNIT_ASSERT(basegfx::fTools::equal(rColorStops2[0].getStopOffset(), 
0.0));
         CPPUNIT_ASSERT_EQUAL(
-            Color(0xdde8cb),
-            
Color(rGradientItem2.GetGradientValue().GetColorStops().front().getStopColor()));
-        CPPUNIT_ASSERT_EQUAL(
-            Color(0xffd7d7),
-            
Color(rGradientItem2.GetGradientValue().GetColorStops().back().getStopColor()));
+            rColorStops2[0].getStopColor(),
+            basegfx::BColor(0.8666666666666667, 0.90980392156862744, 
0.79607843137254897));
+        CPPUNIT_ASSERT(basegfx::fTools::equal(rColorStops2[1].getStopOffset(), 
1.0));
+        CPPUNIT_ASSERT_EQUAL(rColorStops2[1].getStopColor(),
+                             basegfx::BColor(1.0, 0.84313725490196079, 
0.84313725490196079));
     }
 
     {
diff --git a/sd/qa/unit/data/xml/n819614_0.xml 
b/sd/qa/unit/data/xml/n819614_0.xml
index 8048bbf3de04..3635f2d26d3e 100644
--- a/sd/qa/unit/data/xml/n819614_0.xml
+++ b/sd/qa/unit/data/xml/n819614_0.xml
@@ -3133,7 +3133,7 @@
    </XShape>
    <XShape positionX="11049" positionY="2544" sizeX="2531" sizeY="1078" 
type="com.sun.star.drawing.CustomShape" text="Test1&#10;" 
fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="false" 
textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" 
textHorizontalAdjust="BLOCK" textVerticalAdjust="CENTER" textLeftDistance="12" 
textRightDistance="12" textUpperDistance="12" textLowerDistance="12" 
textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" 
textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" 
textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3195,7 +3195,7 @@
    </XShape>
    <XShape positionX="182" positionY="4529" sizeX="2743" sizeY="1244" 
type="com.sun.star.drawing.CustomShape" text="A " fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3257,7 +3257,7 @@
    </XShape>
    <XShape positionX="792" positionY="5919" sizeX="2743" sizeY="1131" 
type="com.sun.star.drawing.CustomShape" text="A1" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3381,7 +3381,7 @@
    </XShape>
    <XShape positionX="792" positionY="7189" sizeX="2728" sizeY="1268" 
type="com.sun.star.drawing.CustomShape" text="A3" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3443,7 +3443,7 @@
    </XShape>
    <XShape positionX="792" positionY="8671" sizeX="2653" sizeY="1156" 
type="com.sun.star.drawing.CustomShape" text="A4" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3505,7 +3505,7 @@
    </XShape>
    <XShape positionX="791" positionY="9939" sizeX="2743" sizeY="1131" 
type="com.sun.star.drawing.CustomShape" text="A5" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3567,7 +3567,7 @@
    </XShape>
    <XShape positionX="741" positionY="11210" sizeX="2850" sizeY="1151" 
type="com.sun.star.drawing.CustomShape" text="A6" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3629,7 +3629,7 @@
    </XShape>
    <XShape positionX="792" positionY="12483" sizeX="2743" sizeY="1131" 
type="com.sun.star.drawing.CustomShape" text="A7" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3691,7 +3691,7 @@
    </XShape>
    <XShape positionX="1430" positionY="13753" sizeX="2683" sizeY="1036" 
type="com.sun.star.drawing.CustomShape" text="A7i" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3753,7 +3753,7 @@
    </XShape>
    <XShape positionX="1369" positionY="14901" sizeX="2694" sizeY="1062" 
type="com.sun.star.drawing.CustomShape" text="A7ii" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3815,7 +3815,7 @@
    </XShape>
    <XShape positionX="730" positionY="16071" sizeX="2743" sizeY="1131" 
type="com.sun.star.drawing.CustomShape" text="A8" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3877,7 +3877,7 @@
    </XShape>
    <XShape positionX="4319" positionY="4529" sizeX="2743" sizeY="1244" 
type="com.sun.star.drawing.CustomShape" text="B" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -3939,7 +3939,7 @@
    </XShape>
    <XShape positionX="5005" positionY="5921" sizeX="2743" sizeY="1131" 
type="com.sun.star.drawing.CustomShape" text="B1" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -4001,7 +4001,7 @@
    </XShape>
    <XShape positionX="4885" positionY="17689" sizeX="2922" sizeY="1148" 
type="com.sun.star.drawing.CustomShape" text="B2" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -4063,7 +4063,7 @@
    </XShape>
    <XShape positionX="4946" positionY="7277" sizeX="2743" sizeY="1131" 
type="com.sun.star.drawing.CustomShape" text="B3" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -4125,7 +4125,7 @@
    </XShape>
    <XShape positionX="4946" positionY="8585" sizeX="2743" sizeY="1131" 
type="com.sun.star.drawing.CustomShape" text="B4" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -4187,7 +4187,7 @@
    </XShape>
    <XShape positionX="4946" positionY="9893" sizeX="2743" sizeY="1131" 
type="com.sun.star.drawing.CustomShape" text="B5" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -4249,7 +4249,7 @@
    </XShape>
    <XShape positionX="4946" positionY="11200" sizeX="2743" sizeY="1131" 
type="com.sun.star.drawing.CustomShape" text="B6" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>
-    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="35" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
+    <FillGradient style="LINEAR" startColor="ffffff" endColor="ffffff" 
angle="1800" border="0" xOffset="0" yOffset="0" startIntensity="100" 
endIntensity="100" stepCount="0"/>
     <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/>
     <FillBitmap width="32" height="32"/>
     <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" 
distance="20"/>
@@ -4311,7 +4311,7 @@
    </XShape>
    <XShape positionX="5382" positionY="12508" sizeX="2663" sizeY="1210" 
type="com.sun.star.drawing.CustomShape" text="B6i" fontHeight="18.000000" 
fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" 
textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" 
textVerticalAdjust="CENTER" textLeftDistance="12" textRightDistance="12" 
textUpperDistance="12" textLowerDistance="12" textMaximumFrameHeight="0" 
textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" 
textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" 
textAnimationDirection="LEFT" textAnimationKind="NONE" 
textAnimationStartInside="false" textAnimationStopInside="false" 
textWritingMode="LR_TB" fillStyle="GRADIENT" fillColor="729fcf" 
fillTransparence="0" fillTransparenceGradientName="">
     <FillTransparenceGradient style="LINEAR" startColor="000000" 
endColor="000000" angle="0" border="0" xOffset="50" yOffset="50" 
startIntensity="100" endIntensity="100" stepCount="0"/>

... etc. - the rest is truncated

Reply via email to