chart2/qa/extras/chart2export.cxx                             |   40 +++++++
 chart2/qa/extras/data/docx/testBarChartDataPointPropDOCX.docx |binary
 chart2/qa/extras/data/xlsx/testBarChartDataPointPropXLSX.xlsx |binary
 oox/source/export/chartexport.cxx                             |   51 ++++++++++
 sfx2/source/doc/objserv.cxx                                   |    2 
 sw/qa/extras/layout/data/tdf118058.fodt                       |   37 +++++++
 sw/qa/extras/layout/layout.cxx                                |    9 +
 sw/source/core/layout/sectfrm.cxx                             |   16 ++-
 8 files changed, 153 insertions(+), 2 deletions(-)

New commits:
commit 0a3a5434ab3d2f9d28dba759d3da2a22498ee13e
Author:     Miklos Vajna <vmik...@collabora.co.uk>
AuthorDate: Mon Aug 13 21:03:08 2018 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Wed Aug 29 10:53:37 2018 +0200

    tdf#118058 sw, sections in tables: no split for multiple columns
    
    The original use-case was "group a few paragraphs together" for the
    split sections inside tables, i.e. it's safe to not split when the
    section has multiple columns.
    
    And the multiple columns case would mean that we don't find where to put
    the follow section inside a table, resulting in a layout loop.
    
    Reviewed-on: https://gerrit.libreoffice.org/58951
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>
    (cherry picked from commit d2d996db4806e84ae0bf6aef1c285b498f2d2867)
    
    Conflicts:
            sw/qa/extras/layout/layout.cxx
    
    Reviewed-on: https://gerrit.libreoffice.org/59686
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    (cherry picked from commit 57d732c628b39834a97165404ae02a32577259f5)
    
    Change-Id: Ifab220e582439d2e757b5645f3167b55a051a379

diff --git a/sw/qa/extras/layout/data/tdf118058.fodt 
b/sw/qa/extras/layout/data/tdf118058.fodt
new file mode 100644
index 000000000000..dbdf26bf519f
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf118058.fodt
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+  <office:styles>
+    <style:default-style style:family="paragraph">
+      <style:paragraph-properties fo:orphans="2" fo:widows="2" 
fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" 
style:punctuation-wrap="hanging"/>
+    </style:default-style>
+  </office:styles>
+  <office:automatic-styles>
+    <style:style style:name="Checklist" style:family="table">
+      <style:table-properties style:width="12.338cm" table:align="margins"/>
+    </style:style>
+    <style:style style:name="Checklist.A" style:family="table-column">
+      <style:table-column-properties style:column-width="12.338cm" 
style:rel-column-width="65535*"/>
+    </style:style>
+    <style:style style:name="Checklist.1" style:family="table-row">
+      <style:table-row-properties fo:background-color="#ffff00">
+        <style:background-image/>
+      </style:table-row-properties>
+    </style:style>
+    <style:style style:name="Checklist.A1" style:family="table-cell">
+      <style:table-cell-properties fo:padding-left="0.25cm" 
fo:padding-right="0.101cm" fo:padding-top="0.101cm" fo:padding-bottom="0.101cm" 
fo:border="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="Sect1" style:family="section">
+      <style:section-properties text:dont-balance-text-columns="false" 
style:editable="false">
+        <style:columns fo:column-count="2" fo:column-gap="0.497cm">
+          <style:column style:rel-width="32767*" fo:start-indent="0cm" 
fo:end-indent="0.249cm"/>
+          <style:column style:rel-width="32768*" fo:start-indent="0.249cm" 
fo:end-indent="0cm"/>
+        </style:columns>
+      </style:section-properties>
+    </style:style>
+  </office:automatic-styles>
+  <office:body>
+    <office:text text:use-soft-page-breaks="true">
+      <text:p text:style-name="P5"><draw:frame draw:style-name="fr1" 
draw:name="Rámec2" text:anchor-type="paragraph" svg:x="-0.039cm" 
svg:y="1.914cm" svg:width="12.338cm" svg:height="15.399cm" 
draw:z-index="0"><draw:text-box><table:table table:name="Checklist" 
table:style-name="Checklist"><table:table-column 
table:style-name="Checklist.A"/><table:table-row 
table:style-name="Checklist.1"><table:table-cell 
table:style-name="Checklist.A1" office:value-type="string"><text:p 
text:style-name="Table_20_header"/></table:table-cell></table:table-row><table:table-row
 table:style-name="Checklist.1"><table:table-cell 
table:style-name="Checklist.A1" office:value-type="string"><text:p 
text:style-name="P3"/></table:table-cell></table:table-row><table:table-row 
table:style-name="Checklist.1"><table:table-cell 
table:style-name="Checklist.A1" office:value-type="string"><text:p 
text:style-name="Table_20_header"/></table:table-cell></table:table-row><table:table-row><table:table-cell
 table:style-name=
 "Checklist.A1" office:value-type="string"><text:section 
text:style-name="Sect1" text:name="Oblasť1"><text:p text:style-name="P4">Para 
1.</text:p><text:p text:style-name="P2">No. However, you will not be able to 
see the colours produced on a black-and-white 
set.</text:p></text:section></table:table-cell></table:table-row></table:table><text:p
 text:style-name="P1"/></draw:text-box></draw:frame></text:p>
+    </office:text>
+  </office:body>
+</office:document>
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 6344a29fd1d4..936909538bfc 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -20,12 +20,14 @@ public:
     void testTdf116925();
     void testTdf117028();
     void testTdf117923();
+    void testTdf118058();
 
     CPPUNIT_TEST_SUITE(SwLayoutWriter);
     CPPUNIT_TEST(testTdf116830);
     CPPUNIT_TEST(testTdf116925);
     CPPUNIT_TEST(testTdf117028);
     CPPUNIT_TEST(testTdf117923);
+    CPPUNIT_TEST(testTdf118058);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -123,6 +125,13 @@ void SwLayoutWriter::testTdf117923()
     assertXPath(pXmlDoc, "/root/page/body/tab/row/cell/txt[3]/Special", 
"nHeight", "220");
 }
 
+void SwLayoutWriter::testTdf118058()
+{
+    SwDoc* pDoc = createDoc("tdf118058.fodt");
+    // This resulted in a layout loop.
+    pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/layout/sectfrm.cxx 
b/sw/source/core/layout/sectfrm.cxx
index 1030d9ecb0e2..3790c92a199d 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -617,7 +617,21 @@ namespace
             return true;
 
         // The frame is in a table, see if the table is in a section.
-        return !pFrame->FindTabFrame()->IsInSct();
+        bool bRet = !pFrame->FindTabFrame()->IsInSct();
+
+        if (bRet)
+        {
+            // Don't try to split if the frame itself is a section frame with
+            // multiple columns.
+            if (pFrame->IsSctFrame())
+            {
+                const SwFrame* pLower = pFrame->GetLower();
+                if (pLower && pLower->IsColumnFrame())
+                    bRet = false;
+            }
+        }
+
+        return bRet;
     }
 }
 
commit fa465c8506e99d9bc396b33dd8d3d30d6d791de1
Author:     Balazs Varga <balazs.varga...@gmail.com>
AuthorDate: Thu Aug 9 00:06:47 2018 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Wed Aug 29 10:51:52 2018 +0200

    tdf#96469 Export Data Point properties in Charts on DOCX/XLSX
    
    If the color or other property of a datapoint in the chart
    deviates from the dataseries property, this patch will write it
    into a separate dPt tag and fixing the lost properies during
    OOXML export.
    
    Reviewed-on: https://gerrit.libreoffice.org/58806
    Reviewed-by: Bartosz Kosiorek <gan...@poczta.onet.pl>
    Tested-by: Jenkins
    (cherry picked from commit 15035b98dc694bde4c4073fa75bdd2ce9d7e6670)
    
    Change-Id: I3d975675ac3691fcafe76de16e46851561eb2807
    Reviewed-on: https://gerrit.libreoffice.org/58807
    Tested-by: Jenkins
    Reviewed-by: Balazs Varga <balazs.varga...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    (cherry picked from commit 6fa9aaaa5dca4d6b79698b55a2f2c956c99c3482)

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index c4df5c417741..f8c783d46574 100755
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -85,6 +85,7 @@ public:
     void testChartTitlePropertiesColorFillDOCX();
     void testChartTitlePropertiesGradientFillDOCX();
     void testChartTitlePropertiesBitmapFillDOCX();
+    void testBarChartDataPointPropDOCX();
     void testFdo83058dlblPos();
     void testAutoTitleDelXLSX();
     void testDispBlanksAsXLSX();
@@ -102,6 +103,7 @@ public:
     void testChartTitlePropertiesColorFillXLSX();
     void testChartTitlePropertiesGradientFillXLSX();
     void testChartTitlePropertiesBitmapFillXLSX();
+    void testBarChartDataPointPropXLSX();
     void testAxisCharacterPropertiesXLSX();
     void testTitleCharacterPropertiesXLSX();
     void testPlotVisOnlyXLSX();
@@ -164,6 +166,7 @@ public:
     CPPUNIT_TEST(testChartTitlePropertiesColorFillDOCX);
     CPPUNIT_TEST(testChartTitlePropertiesGradientFillDOCX);
     CPPUNIT_TEST(testChartTitlePropertiesBitmapFillDOCX);
+    CPPUNIT_TEST(testBarChartDataPointPropDOCX);
     CPPUNIT_TEST(testFdo83058dlblPos);
     CPPUNIT_TEST(testAutoTitleDelXLSX);
     CPPUNIT_TEST(testDispBlanksAsXLSX);
@@ -181,6 +184,7 @@ public:
     CPPUNIT_TEST(testChartTitlePropertiesColorFillXLSX);
     CPPUNIT_TEST(testChartTitlePropertiesGradientFillXLSX);
     CPPUNIT_TEST(testChartTitlePropertiesBitmapFillXLSX);
+    CPPUNIT_TEST(testBarChartDataPointPropXLSX);
     CPPUNIT_TEST(testAxisCharacterPropertiesXLSX);
     CPPUNIT_TEST(testTitleCharacterPropertiesXLSX);
     CPPUNIT_TEST(testPlotVisOnlyXLSX);
@@ -1103,6 +1107,24 @@ void 
Chart2ExportTest::testChartTitlePropertiesBitmapFillDOCX()
     assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 
1);
 }
 
+void Chart2ExportTest::testBarChartDataPointPropDOCX()
+{
+    load("/chart2/qa/extras/data/docx/", "testBarChartDataPointPropDOCX.docx");
+    xmlDocPtr pXmlDoc = parseExport("word/charts/chart", "Office Open XML 
Text");
+    CPPUNIT_ASSERT(pXmlDoc);
+
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors", "val", "0");
+
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx", "val", "1");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr",
 "val", "f6f8fc");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr",
 "val", "c7d5ed");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr",
 "val", "70ad47");
+
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx", "val", "2");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:solidFill/a:srgbClr",
 "val", "ff0000");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr",
 "val", "000000");
+}
+
 void Chart2ExportTest::testBarChartRotation()
 {
     load ("/chart2/qa/extras/data/docx/", "barChartRotation.docx");
@@ -1568,6 +1590,24 @@ void 
Chart2ExportTest::testChartTitlePropertiesBitmapFillXLSX()
     assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:title/c:spPr/a:ln/a:noFill", 
1);
 }
 
+void Chart2ExportTest::testBarChartDataPointPropXLSX()
+{
+    load("/chart2/qa/extras/data/xlsx/", "testBarChartDataPointPropXLSX.xlsx");
+    xmlDocPtr pXmlDoc = parseExport("xl/charts/chart", "Calc Office Open XML");
+    CPPUNIT_ASSERT(pXmlDoc);
+
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:varyColors", "val", "0");
+
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:idx", "val", "1");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:solidFill/a:srgbClr",
 "val", "ff0000");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[1]/c:spPr/a:ln/a:solidFill/a:srgbClr",
 "val", "000000");
+
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:idx", "val", "2");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr",
 "val", "f6f8fc");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:gradFill/a:gsLst/a:gs[2]/a:srgbClr",
 "val", "c7d5ed");
+    assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dPt[2]/c:spPr/a:ln/a:solidFill/a:srgbClr",
 "val", "70ad47");
+}
+
 void Chart2ExportTest::testAxisCharacterPropertiesXLSX()
 {
     load("/chart2/qa/extras/data/xlsx/", "axis_character_properties.xlsx");
diff --git a/chart2/qa/extras/data/docx/testBarChartDataPointPropDOCX.docx 
b/chart2/qa/extras/data/docx/testBarChartDataPointPropDOCX.docx
new file mode 100644
index 000000000000..66df9153d3c9
Binary files /dev/null and 
b/chart2/qa/extras/data/docx/testBarChartDataPointPropDOCX.docx differ
diff --git a/chart2/qa/extras/data/xlsx/testBarChartDataPointPropXLSX.xlsx 
b/chart2/qa/extras/data/xlsx/testBarChartDataPointPropXLSX.xlsx
new file mode 100644
index 000000000000..e73d16bd2dac
Binary files /dev/null and 
b/chart2/qa/extras/data/xlsx/testBarChartDataPointPropXLSX.xlsx differ
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 9ecae1cc74f4..e7dbcf90d4c2 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3249,6 +3249,57 @@ void ChartExport::exportDataPoints(
             }
         }
     }
+
+    // Export Data Point Property in Charts even if the VaryColors is false
+    if( !bVaryColorsByPoint )
+    {
+        ::std::set< sal_Int32 > aAttrPointSet;
+        ::std::copy( pPoints, pPoints + aDataPointSeq.getLength(),
+                    ::std::inserter( aAttrPointSet, aAttrPointSet.begin()));
+        const ::std::set< sal_Int32 >::const_iterator aEndIt( 
aAttrPointSet.end());
+        for( nElement = 0; nElement < nSeriesLength; ++nElement )
+        {
+            uno::Reference< beans::XPropertySet > xPropSet;
+            if( aAttrPointSet.find( nElement ) != aEndIt )
+            {
+                try
+                {
+                    xPropSet = 
SchXMLSeriesHelper::createOldAPIDataPointPropertySet(
+                            xSeries, nElement, getModel() );
+                }
+                catch( const uno::Exception & )
+                {
+                    SAL_WARN( "oox", "Exception caught during Export of data 
point" );
+                }
+            }
+
+            if( xPropSet.is() )
+            {
+                FSHelperPtr pFS = GetFS();
+                pFS->startElement( FSNS( XML_c, XML_dPt ),
+                    FSEND );
+                pFS->singleElement( FSNS( XML_c, XML_idx ),
+                    XML_val, I32S(nElement),
+                    FSEND );
+
+                switch( eChartType )
+                {
+                    case chart::TYPEID_BUBBLE:
+                    case chart::TYPEID_HORBAR:
+                    case chart::TYPEID_BAR:
+                    {
+                        pFS->singleElement(FSNS(XML_c, XML_invertIfNegative),
+                                    XML_val, "0",
+                                    FSEND);
+                    }
+                    break;
+                }
+                exportShapeProps( xPropSet );
+
+                pFS->endElement( FSNS( XML_c, XML_dPt ) );
+            }
+        }
+    }
 }
 
 void ChartExport::exportAxesId(bool bPrimaryAxes)
commit 63269e263142e4d04ba14484c42b801e0d2a7c44
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Aug 23 15:57:47 2018 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Wed Aug 29 10:51:51 2018 +0200

    tdf#117426 don't crash is infobar is disposed in preview view
    
    Change-Id: Iff2dece2ea5f65c5d0896af888e05703ae709c65
    Reviewed-on: https://gerrit.libreoffice.org/59520
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    (cherry picked from commit 2169b1f16356dbebc662b6f60fd176ca2d6c4e52)

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index c7c1de11e2ec..10517e6d2866 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1064,7 +1064,7 @@ void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
                         if ( !sMessage.isEmpty() )
                         {
                             auto pInfoBar = pFrame->AppendInfoBar("signature", 
sMessage, aInfoBarType);
-                            if (pInfoBar == nullptr)
+                            if (pInfoBar == nullptr || pInfoBar->IsDisposed())
                                 return;
                             VclPtrInstance<PushButton> 
xBtn(&(pFrame->GetWindow()));
                             xBtn->SetText(SfxResId(STR_SIGNATURE_SHOW));
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to