basic/source/runtime/methods.cxx                           |   13 ++++++-----
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |    7 ++++++
 oox/source/drawingml/fillproperties.cxx                    |    6 ++---
 package/source/zippackage/ZipPackageStream.cxx             |    2 -
 starmath/source/accessibility.cxx                          |    2 -
 sw/qa/extras/ooxmlexport/data/tdf107033.docx               |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx                  |   10 +++++++-
 sw/source/core/unocore/unotbl.cxx                          |    4 ++-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx          |    6 +++++
 writerfilter/source/dmapper/DomainMapper_Impl.hxx          |    4 ++-
 writerfilter/source/dmapper/PropertyMap.cxx                |   15 ++++++++++---
 11 files changed, 52 insertions(+), 17 deletions(-)

New commits:
commit 1e9abd9acdb55275019977a3a1a603b14607d358
Author: Julien Nabet <serval2...@yahoo.fr>
Date:   Sat May 6 15:01:48 2017 +0200

    tdf#107644: Crash on inserting formula
    
    See https://bugs.documentfoundation.org/attachment.cgi?id=133085
    Accessibility related
    
    Change-Id: I87063e50a59b06f4f5a974764de9aa34e111b4fb
    Reviewed-on: https://gerrit.libreoffice.org/37315
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    (cherry picked from commit 3d4938d2d8dc18c7b741efe90686f55f524fcfe2)
    Reviewed-on: https://gerrit.libreoffice.org/37337
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit 2e20df6eb9fe206b89d5eecbf88eea54d0719268)

diff --git a/starmath/source/accessibility.cxx 
b/starmath/source/accessibility.cxx
index fece32e4c63c..19cc51784a62 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -417,7 +417,7 @@ void SAL_CALL 
SmGraphicAccessible::removeAccessibleEventListener(
         const Reference< XAccessibleEventListener >& xListener )
     throw (RuntimeException, std::exception)
 {
-    if (xListener.is())
+    if (xListener.is() && nClientId)
     {
         SolarMutexGuard aGuard;
         sal_Int32 nListenerCount = 
comphelper::AccessibleEventNotifier::removeEventListener( nClientId, xListener 
);
commit 9b9e1cd83cb0d81f16b6e43d6a6f1362d8c82006
Author: Xisco Fauli <aniste...@gmail.com>
Date:   Wed Apr 19 11:38:59 2017 +0200

    tdf#105942 Don't hang when file is protected and compressed
    
    Change-Id: I762e6e6d457ea3f5a1f1fd706268b832a71ee550
    Reviewed-on: https://gerrit.libreoffice.org/36672
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org>
    (cherry picked from commit f8fdc6417b4d023b7c75485754a0ab1b164a69d6)
    Reviewed-on: https://gerrit.libreoffice.org/37071
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>
    (cherry picked from commit 31e22b4bd961ed946bf8f0f4ccb330c699292ddb)

diff --git a/package/source/zippackage/ZipPackageStream.cxx 
b/package/source/zippackage/ZipPackageStream.cxx
index 2222f7b1f166..c66fbcf4642e 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -792,7 +792,7 @@ bool ZipPackageStream::saveChild(
         uno::Reference< io::XSeekable > xSeek(xStream, uno::UNO_QUERY);
         // It's not worth to deflate jpegs to save ~1% in a slow process
         // Unfortunately, does not work for streams protected by password
-        if (xSeek.is() && msMediaType.endsWith("/jpeg") && !m_bToBeEncrypted)
+        if (xSeek.is() && msMediaType.endsWith("/jpeg") && !m_bToBeEncrypted 
&& !m_bToBeCompressed)
         {
             ImplSetStoredData(*pTempEntry, xStream);
             xSeek->seek(0);
commit 0cef8382afdc9477a0b85b24d722bc273c902f4b
Author: Thomas Beck <thomas.b...@cib.de>
Date:   Fri Apr 7 15:04:25 2017 +0200

    tdf#106520 xlsx: black square where image should be
    
    Reversed order of Transforms. Duotone will now be applied after a
    ColorChange due to the ColorChange Transform not being able to
    distinguish the colors properly anymore after Duotone had been applied.
    
    This seems to better match what MSO is doing there.
    
    Change-Id: I6ca66cc411c3e2a3d009325f0f1641c560949a54
    Reviewed-on: https://gerrit.libreoffice.org/36263
    Reviewed-by: Katarina Behrens <katarina.behr...@cib.de>
    Tested-by: Katarina Behrens <katarina.behr...@cib.de>
    (cherry picked from commit 184362002955d750c6597a444ae5240cf15932ac)
    Reviewed-on: https://gerrit.libreoffice.org/37236
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Bartosz Kosiorek <gan...@poczta.onet.pl>
    (cherry picked from commit da8e35e190b96a2cbd26f848bcd2acd139618ebb)

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index ed8dbfcc5741..ed01746b4c64 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -77,7 +77,7 @@ Reference< XGraphic > lclCheckAndApplyDuotoneTransform( const 
BlipFillProperties
     return xGraphic;
 }
 
-Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const 
BlipFillProperties &aBlipProps, Reference< XGraphic > & xGraphic,
+Reference< XGraphic > lclCheckAndApplyChangeColorTransform( const 
BlipFillProperties &aBlipProps, Reference< XGraphic >  const & xGraphic,
                                                             const 
GraphicHelper& rGraphicHelper, const sal_Int32 nPhClr )
 {
     if( aBlipProps.maColorChangeFrom.isUsed() && 
aBlipProps.maColorChangeTo.isUsed() )
@@ -709,8 +709,8 @@ void GraphicProperties::pushToPropMap( PropertyMap& 
rPropMap, const GraphicHelpe
     if( maBlipProps.mxGraphic.is() )
     {
         // created transformed graphic
-        Reference< XGraphic > xGraphic = lclCheckAndApplyDuotoneTransform( 
maBlipProps, maBlipProps.mxGraphic, rGraphicHelper, API_RGB_TRANSPARENT );
-        xGraphic = lclCheckAndApplyChangeColorTransform( maBlipProps, 
xGraphic, rGraphicHelper, API_RGB_TRANSPARENT );
+        Reference< XGraphic > xGraphic = 
lclCheckAndApplyChangeColorTransform(maBlipProps, maBlipProps.mxGraphic, 
rGraphicHelper, API_RGB_TRANSPARENT);
+        xGraphic = lclCheckAndApplyDuotoneTransform(maBlipProps, xGraphic, 
rGraphicHelper, API_RGB_TRANSPARENT);
 
         if (eColorMode == ColorMode_STANDARD && nBrightness == 70 && nContrast 
== -70)
             // map MSO 'washout' to our Watermark colormode
commit c921161c2e05a247701f5f49f341f640566e25ca
Author: LeMoyne Castle <lemoyne.cas...@gmail.com>
Date:   Tue Apr 25 22:44:16 2017 -0600

    tdf#107350 - prevent crash in unotbl.cxx
    
    check pointer and throw exception instead of SIGABRT
    when reading data from text tables that have
    varying row &/or col lengths from
     - merged cells after first row,
     - split cells in first row, etc.
    
    add backstop safety check -> exception because
     - complexity check fails (wrong/not called)
     - OOo uno api doc calls for exception when
           text table is 'too complex'
    v2:  better error message for crash point and
           its parallel (getData[Array])
    
    Change-Id: Ifb844c3e29042dab6b6cdb2448f7728e6ccb631d
    Reviewed-on: https://gerrit.libreoffice.org/37002
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Björn Michaelsen <bjoern.michael...@libreoffice.org>
    (cherry picked from commit eea79562f1a5785a8a22cde732a091725e46bbad)
    Reviewed-on: https://gerrit.libreoffice.org/37264
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    (cherry picked from commit 066cd52857ad9c2494c584bc36b38fc34836d10f)

diff --git a/sw/source/core/unocore/unotbl.cxx 
b/sw/source/core/unocore/unotbl.cxx
index 0eab02785d22..4087921e9666 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -3697,7 +3697,7 @@ uno::Sequence<uno::Sequence<uno::Any>> SAL_CALL 
SwXCellRange::getDataArray()
         {
             auto pCell(static_cast<SwXCell*>(pCurrentCell->get()));
             if(!pCell)
-                throw uno::RuntimeException();
+                throw uno::RuntimeException("Table too complex", 
static_cast<cppu::OWeakObject*>(this));
             rCellAny = pCell->GetAny();
             ++pCurrentCell;
         }
@@ -3764,6 +3764,8 @@ SwXCellRange::getData() throw (uno::RuntimeException, 
std::exception)
         rRow = uno::Sequence<double>(nColCount);
         for(auto& rValue : rRow)
         {
+            if (!(*pCurrentCell).is())
+                throw uno::RuntimeException("Table too complex", 
static_cast<cppu::OWeakObject*>(this));
             rValue = (*pCurrentCell)->getValue();
             ++pCurrentCell;
         }
commit bfcf625b883c14d5466ee535a6bcef2813a53d42
Author: Caolán McNamara <caol...@redhat.com>
Date:   Thu May 4 12:18:33 2017 +0100

    Related: rhbz#1447830 ExportHiddenSlides isn't persistent in dialog
    
    every time the dialog is run its back to its default setting again
    unlike the other options
    
    Change-Id: Ieb6c94a4ec8670957f9e295acee7114d5c4c6d5a
    (cherry picked from commit 651169f85640c9d15381c424dfe0ed5cd93e58ee)
    Reviewed-on: https://gerrit.libreoffice.org/37232
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    (cherry picked from commit 508b7ef82eff5147522f270650c4a4bb97d4d116)

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index b2fde9ddc4e8..7973ab004252 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5188,6 +5188,13 @@
             </info>
             <value>true</value>
           </prop>
+          <prop oor:name="ExportHiddenSlides" oor:type="xs:boolean" 
oor:nillable="false">
+            <info>
+              <desc>Specifies if hidden slides are exported to PDF. (Hidden 
slides
+              are available in Impress documents only).</desc>
+            </info>
+            <value>false</value>
+          </prop>
           <prop oor:name="ExportFormFields" oor:type="xs:boolean" 
oor:nillable="false">
             <info>
               <desc>Specifies whether form fields are exported as widgets or
commit 47e33633582d276fa2eb421582de348b9ebe19c0
Author: Eike Rathke <er...@redhat.com>
Date:   Wed May 3 16:21:43 2017 +0200

    CDateFromIso: accept YYMMDD for compatibility, tdf#106956 follow-up
    
    It's not ISO but it was accepted before, so continue..
    
    Change-Id: Idd20f8ef9275a0dec71bca79047a8739b580f0eb
    Reviewed-on: https://gerrit.libreoffice.org/37207
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    (cherry picked from commit 134dd332ceaeab43c022cdf3585ca5432cdaa77a)

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index e3ba6bb64fde..5b230e147c73 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2063,19 +2063,20 @@ RTLFUNC(CDateFromIso)
         {
             OUString aStr = rPar.Get(1)->GetOUString();
             const sal_Int32 nLen = aStr.getLength();
-            if (nLen != 8 && nLen != 10)
+            if (nLen != 6 && nLen != 8 && nLen != 10)
                 break;
 
             OUString aYearStr, aMonthStr, aDayStr;
-            if (nLen == 8)
+            if (nLen == 6 || nLen == 8)
             {
-                // YYYYMMDD
+                // (YY)YYMMDD
                 if (!comphelper::string::isdigitAsciiString(aStr))
                     break;
 
-                aYearStr  = aStr.copy( 0, 4 );
-                aMonthStr = aStr.copy( 4, 2 );
-                aDayStr   = aStr.copy( 6, 2 );
+                const sal_Int32 nMonthPos = (nLen == 6 ? 2 : 4);
+                aYearStr  = aStr.copy( 0, nMonthPos );
+                aMonthStr = aStr.copy( nMonthPos, 2 );
+                aDayStr   = aStr.copy( nMonthPos + 2, 2 );
             }
             else
             {
commit 6eb8d90a8f1d54e3160c60c6db9964b4484378ab
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Wed May 3 08:39:31 2017 +0200

    tdf#107033 DOCX import: fix unexpected missing footnote separator
    
    Regression from commit 330b860205c7ba69dd6603f65324d0f89ad9cd5f
    (fdo#68787 DOCX import: handle when w:separator is missing for
    footnotes, 2013-09-04), the problem was footnote settings were modified
    also in case there were no footnotes at all in the document.
    
    Make the bug scenario and the original one working at the same time by
    touching footnote settings only in case there is at least one footnote
    in the current section.
    
    (cherry picked from commit e79ef12b7a904f17d4147fa409d055c12b70f952)
    
    Change-Id: I163d11769cbd97957662607fbedfba404181e002
    Reviewed-on: https://gerrit.libreoffice.org/37228
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    (cherry picked from commit cc6a55d687581db1a174b2a7d01f8a62887b5e24)

diff --git a/sw/qa/extras/ooxmlexport/data/tdf107033.docx 
b/sw/qa/extras/ooxmlexport/data/tdf107033.docx
new file mode 100644
index 000000000000..f4e08a3d36e5
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf107033.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 9e00e77da235..093aecd16901 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -246,10 +246,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103931, "tdf103931.docx")
 DECLARE_OOXMLEXPORT_TEST(testTdf107104, "tdf107104.docx")
 {
     CPPUNIT_ASSERT(getShape(1)->getSize().Width > 0);
-    // This failed: the second arrow was invisible because it had zero height.
+    // This failed: the second arrow was invisible because it had zero width.
     CPPUNIT_ASSERT(getShape(2)->getSize().Width > 0);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf107033, "tdf107033.docx")
+{
+    uno::Reference<beans::XPropertySet> 
xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
+    // This was 0: footnote separator was disabled even in case the document
+    // had no footnotes.
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(25), 
getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8e261740a400..5ae6f3f2b14f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -236,6 +236,7 @@ DomainMapper_Impl::DomainMapper_Impl(
         m_nTableDepth(0),
         m_nTableCellDepth(0),
         m_nLastTableCellParagraphDepth(0),
+        m_bHasFtn(false),
         m_bHasFtnSep(false),
         m_bIgnoreNextPara(false),
         m_bIgnoreNextTab(false),
@@ -5342,6 +5343,9 @@ void DomainMapper_Impl::substream(Id rName,
         propSize[i] = m_aPropertyStacks[i].size();
     }
 #endif
+    // Save "has footnote" state, which is specific to a section in the body
+    // text, so state from substreams is not relevant.
+    bool bHasFtn = m_bHasFtn;
 
     //finalize any waiting frames before starting alternate streams
     CheckUnregisteredFrameConversion();
@@ -5411,12 +5415,14 @@ void DomainMapper_Impl::substream(Id rName,
 
     getTableManager().endLevel();
     popTableManager();
+    m_bHasFtn = bHasFtn;
 
     switch(rName)
     {
     case NS_ooxml::LN_footnote:
     case NS_ooxml::LN_endnote:
         m_pTableHandler->setHadFootOrEndnote(true);
+        m_bHasFtn = true;
         break;
     }
 
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index b86938df337f..7bd388025305 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -835,7 +835,9 @@ public:
     /// Table cell depth of the last finished paragraph.
     sal_Int32 m_nLastTableCellParagraphDepth;
 
-    /// If the document has a footnote separator.
+    /// If the current section has footnotes.
+    bool m_bHasFtn;
+    /// If the current section has a footnote separator.
     bool m_bHasFtnSep;
 
     /// If the next newline should be ignored, used by the special footnote 
separator paragraph.
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index cea2dc473a8d..0e7f0678aed3 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1037,9 +1037,18 @@ void SectionPropertyMap::HandleMarginsHeaderFooter(bool 
bFirstPage, DomainMapper
 
     if (rDM_Impl.m_oBackgroundColor)
         Insert(PROP_BACK_COLOR, uno::makeAny(*rDM_Impl.m_oBackgroundColor));
-    if (!rDM_Impl.m_bHasFtnSep)
-        // Set footnote line width to zero, document has no footnote separator.
-        Insert(PROP_FOOTNOTE_LINE_RELATIVE_WIDTH, uno::makeAny(sal_Int32(0)));
+    if (rDM_Impl.m_bHasFtn)
+    {
+        // Check for missing footnote separator only in case there is at least
+        // one footnote.
+        if (!rDM_Impl.m_bHasFtnSep)
+        {
+            // Set footnote line width to zero, document has no footnote 
separator.
+            Insert(PROP_FOOTNOTE_LINE_RELATIVE_WIDTH, 
uno::makeAny(sal_Int32(0)));
+            rDM_Impl.m_bHasFtn = false;
+        }
+        rDM_Impl.m_bHasFtnSep = false;
+    }
 
     /*** if headers/footers are available then the top/bottom margins of the
       header/footer are copied to the top/bottom margin of the page
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to