tdf#66228 PPTX export: fix lost U-shaped connectors

which were replaced with straight connector lines.

The "Line Connector" has no equivalent in OOXML. So far it has
been saved as a "Straight connector". In most cases, the better
solution is to change it to "Standard connector", keeping
the original layout with U-shaped connectors.

Change-Id: I9d6b6174d0556ba2478c6a9837c500b3cc794c82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134284
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index ed12978..284daea 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1662,12 +1662,12 @@ ShapeExport& ShapeExport::WriteConnectorShape( const Reference< XShape >& xShape
        case ConnectorType_CURVE:
            sGeometry = "curvedConnector";
            break;
        case ConnectorType_LINES:
        case ConnectorType_STANDARD:
            sGeometry = "bentConnector";
            break;
        default:
        case ConnectorType_LINE:
        case ConnectorType_LINES:
            sGeometry = "straightConnector1";
            break;
    }
@@ -1692,7 +1692,7 @@ ShapeExport& ShapeExport::WriteConnectorShape( const Reference< XShape >& xShape
    }
    EscherConnectorListEntry aConnectorEntry( xShape, aStartPoint, rXShapeA, aEndPoint, rXShapeB );

    if (eConnectorType == ConnectorType_CURVE || eConnectorType == ConnectorType_STANDARD)
    if (eConnectorType != ConnectorType_LINE)
    {
        tools::PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon(xShape);
        if (aPolyPolygon.Count() > 0)
diff --git a/sd/qa/unit/data/odp/tdf66228.odp b/sd/qa/unit/data/odp/tdf66228.odp
new file mode 100644
index 0000000..a34c6fc
--- /dev/null
+++ b/sd/qa/unit/data/odp/tdf66228.odp
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index a1dac4f..70c64d7 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -48,6 +48,7 @@ using namespace css;
class SdOOXMLExportTest1 : public SdModelTestBaseXML
{
public:
    void testTdf66228();
    void testTdf147919();
    void testTdf130165();
    void testTdf124781();
@@ -118,6 +119,7 @@ public:

    CPPUNIT_TEST_SUITE(SdOOXMLExportTest1);

    CPPUNIT_TEST(testTdf66228);
    CPPUNIT_TEST(testTdf147919);
    CPPUNIT_TEST(testTdf130165);
    CPPUNIT_TEST(testTdf124781);
@@ -215,6 +217,19 @@ void checkFontAttributes( const SdrTextObj* pObj, ItemValue nVal, sal_uInt32 nId

}

void SdOOXMLExportTest1::testTdf66228()
{
    sd::DrawDocShellRef xDocShRef
        = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf66228.odp"), ODP);
    utl::TempFile tempFile;
    xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
    xDocShRef->DoClose();

    xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
    assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:spPr/a:prstGeom", "prst",
        "bentConnector3");
}

void SdOOXMLExportTest1::testTdf147919()
{
    sd::DrawDocShellRef xDocShRef