[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 6 commits - cui/source oox/source sc/inc sc/source sd/qa swext/mediawiki sw/uiconfig vcl/source

Julien Nabet serval2412 at yahoo.fr
Wed Jun 21 10:36:58 UTC 2017


 cui/source/dialogs/screenshotannotationdlg.cxx |   10 +++++-----
 oox/source/ppt/presentationfragmenthandler.cxx |    4 ++--
 sc/inc/externalrefmgr.hxx                      |    2 +-
 sc/source/ui/docshell/externalrefmgr.cxx       |   13 +++++++------
 sd/qa/unit/data/pptx/tdf89064.pptx             |binary
 sd/qa/unit/import-tests.cxx                    |   13 +++++++++++++
 sw/uiconfig/swriter/ui/mmaddressblockpage.ui   |    1 -
 swext/mediawiki/src/filter/odt2mediawiki.xsl   |    4 ++--
 vcl/source/gdi/pdfwriter_impl.cxx              |   11 ++++++-----
 9 files changed, 36 insertions(+), 22 deletions(-)

New commits:
commit 1e32cd7ed7e7aab6f8ec4e2f14e59dc47c633dd7
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Jun 11 21:57:14 2017 +0200

    tdf#80671: mediawiki, no superscript tags allowed in footnotes
    
    Change-Id: I54c2cc0fc6b2a9c631fc83f59c2204dd5e374d2c
    Reviewed-on: https://gerrit.libreoffice.org/38666
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    (cherry picked from commit 6a24160894e91c007d4a2f8ef193eed670909ea5)
    Reviewed-on: https://gerrit.libreoffice.org/38669
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit 1684ef2146dce6c132e3472b38b932d99f22b41c)

diff --git a/swext/mediawiki/src/filter/odt2mediawiki.xsl b/swext/mediawiki/src/filter/odt2mediawiki.xsl
index 4aada97afd75..25fa68fddca2 100644
--- a/swext/mediawiki/src/filter/odt2mediawiki.xsl
+++ b/swext/mediawiki/src/filter/odt2mediawiki.xsl
@@ -1431,7 +1431,7 @@
 				<value-of select="'}'"/>
 				 -->
 
-				<if test="$superscript and not($superscript-left)">
+				<if test="$superscript and not($superscript-left) and not(boolean(ancestor::text:note))">
 					<text><sup></text>
 				</if>
 				<if test="$subscript and not($subscript-left)">
@@ -1469,7 +1469,7 @@
 				<if test="$subscript and not($subscript-right)">
 					<text></sub></text>
 				</if>
-				<if test="$superscript and not($superscript-right)">
+				<if test="$superscript and not($superscript-right) and not(boolean(ancestor::text:note))">
 					<text></sup></text>
 				</if>
 
commit 384246b9c3ba2ef588ac11d3d801046168dfd407
Author: Vasily Melenchuk <Vasily.Melenchuk at cib.de>
Date:   Thu May 25 13:44:52 2017 +0300

    tdf#99680 modified clipping for PDF export
    
    If clipping is requested, but no clipping region is defined,
    clipping is ignored.
    
    This squashes the following 3 commits:
    
    Reviewed-on: https://gerrit.libreoffice.org/38021
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    
    Reviewed-on: https://gerrit.libreoffice.org/38403
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    
    Reviewed-on: https://gerrit.libreoffice.org/38694
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-on: https://gerrit.libreoffice.org/38825
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit f6726209329fefe9decca8fda8e136b8472a95a2)
    
    Conflicts:
            vcl/qa/cppunit/pdfexport/pdfexport.cxx
            no pdf unit tests on -5-3, so dropping those pieces
    
    Change-Id: I793c1de1f4f6b0203727c0ff6aa8adecc43ad413
    d4565858b0135b3177044558db87a68ef828955b
    102722140e216cb9ad29107aae3bdaa70472d471
    Reviewed-on: https://gerrit.libreoffice.org/38852
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    
    (cherry picked from commit 581806182ac7da81115c9675b4e828688178aa04)

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index c7eaa00c90b6..ae5aa6eaaf6c 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -12983,12 +12983,13 @@ void PDFWriterImpl::updateGraphicsState(Mode const mode)
                 getReferenceDevice()->SetMapMode( rNewState.m_aMapMode );
                 m_aCurrentPDFState.m_aMapMode = rNewState.m_aMapMode;
 
-                aLine.append( "q " );
-                if( rNewState.m_aClipRegion.count() )
+                aLine.append("q ");
+                if ( rNewState.m_aClipRegion.count() )
+                {
                     m_aPages.back().appendPolyPolygon( rNewState.m_aClipRegion, aLine );
-                else
-                    aLine.append( "0 0 m h " ); // NULL clip, i.e. nothing visible
-                aLine.append( "W* n\n" );
+                    aLine.append( "W* n\n" );
+                }
+
                 rNewState.m_aMapMode = aNewMapMode;
                 getReferenceDevice()->SetMapMode( rNewState.m_aMapMode );
                 m_aCurrentPDFState.m_aMapMode = rNewState.m_aMapMode;
commit aa4672625b45832bf2af251d391e9226dd3830a0
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Jun 14 23:30:57 2017 +0200

    Resolves: tdf#104875 defer filter detection to first load/update of external
    
     This is a combination of 2 commits.
    
    This could never have been meant
    
    Since commit 67b374980f340faa2695001984aaf98886a32fad
    executing ScDocumentLoader::GetFilterName() twice if there was no stored
    filter, and still executing it if there was one, even if the comment says we
    shouldn't.
    
    (cherry picked from commit 1bc793f8ab8f9b4ce435bd3585f9579df4a11819)
    
    Resolves: tdf#104875 defer filter detection to first load/update of external
    
    Attempting to access all linked external documents right on load time was
    specifically nasty for non-local URIs (unmounted smb, http, ...)
    
    (cherry picked from commit 416752b9e4bc4605c479d3eff7797be9f0ef2a38)
    
    f4a7414dfe36875b505c73b8c963b650eeffe204
    
    Change-Id: Iaf4b88e63b3987fb661df0e9b095f06b29076894
    Reviewed-on: https://gerrit.libreoffice.org/38820
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 4175045ebe4c895ff4617fbcdaacbbb058751597)

diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 434685c085b3..4863757f9eb7 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -782,7 +782,7 @@ private:
      */
     ScDocument& cacheNewDocShell( sal_uInt16 nFileId, SrcShell& rSrcShell );
 
-    void maybeLinkExternalFile(sal_uInt16 nFileId);
+    void maybeLinkExternalFile( sal_uInt16 nFileId, bool bDeferFilterDetection = false );
 
     /**
      * Try to create a "real" file name from the relative path.  The original
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 285cbddbd169..a897d263ae14 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2491,7 +2491,6 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
         rFilter = pFileData->maFilterName;      // don't overwrite stored filter with guessed filter
     else
         ScDocumentLoader::GetFilterName(aFile, rFilter, aOptions, true, false);
-    ScDocumentLoader::GetFilterName(aFile, rFilter, aOptions, true, false);
     std::shared_ptr<const SfxFilter> pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName(rFilter);
 
     if (pFileData->maRelativeName.isEmpty())
@@ -2606,7 +2605,7 @@ bool ScExternalRefManager::isFileLoadable(const OUString& rFile) const
         return true;    // for http and others, Exists doesn't work, but the URL can still be opened
 }
 
-void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId)
+void ScExternalRefManager::maybeLinkExternalFile( sal_uInt16 nFileId, bool bDeferFilterDetection )
 {
     if (maLinkedDocs.count(nFileId))
         // file already linked, or the link has been broken.
@@ -2626,7 +2625,9 @@ void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId)
     }
     // If a filter was already set (for example, loading the cached table),
     // don't call GetFilterName which has to access the source file.
-    if (aFilter.isEmpty())
+    // If filter detection is deferred, the next successfull loadSrcDocument()
+    // will update SrcFileData filter name.
+    if (aFilter.isEmpty() && !bDeferFilterDetection)
         ScDocumentLoader::GetFilterName(*pFileName, aFilter, aOptions, true, false);
     sfx2::LinkManager* pLinkMgr = mpDoc->GetLinkManager();
     if (!pLinkMgr)
@@ -2636,8 +2637,8 @@ void ScExternalRefManager::maybeLinkExternalFile(sal_uInt16 nFileId)
     }
     ScExternalRefLink* pLink = new ScExternalRefLink(mpDoc, nFileId, aFilter);
     OSL_ENSURE(pFileName, "ScExternalRefManager::maybeLinkExternalFile: file name pointer is NULL");
-    OUString aTmp = aFilter;
-    pLinkMgr->InsertFileLink(*pLink, OBJECT_CLIENT_FILE, *pFileName, &aTmp);
+    pLinkMgr->InsertFileLink(*pLink, OBJECT_CLIENT_FILE, *pFileName,
+            (aFilter.isEmpty() && bDeferFilterDetection ? nullptr : &aFilter));
 
     pLink->SetDoReferesh(false);
     pLink->Update();
@@ -2655,7 +2656,7 @@ void ScExternalRefManager::addFilesToLinkManager()
             "sc.ui", "ScExternalRefManager::addFilesToLinkManager: files overflow");
     const sal_uInt16 nSize = static_cast<sal_uInt16>( std::min<size_t>( maSrcFiles.size(), SAL_MAX_UINT16));
     for (sal_uInt16 nFileId = 0; nFileId < nSize; ++nFileId)
-        maybeLinkExternalFile( nFileId);
+        maybeLinkExternalFile( nFileId, true);
 }
 
 void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(const OUString& rOwnDocName)
commit 76b5d08d6450135f496ef04fd3fdd8638cd0f594
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date:   Fri Jun 16 16:21:44 2017 -0300

    Fix screenshot missing quotes in code snippet
    
    The code snippet suggested has no quotes in atttributes values.
    
    Change-Id: I604fb34827da3bebf3f6759b491d719a96854754
    Reviewed-on: https://gerrit.libreoffice.org/38895
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit 4be3f2b3a9294c22de68b586d84328ec08906b84)

diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx
index 398458df5887..8913b871be41 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -54,7 +54,7 @@ namespace
 
     OUString lcl_AltDescr()
     {
-        OUString aTempl = OUString("<alt xml-lang=en-US id=%1>"
+        OUString aTempl = OUString("<alt xml-lang=\"en-US\" id=\"%1\">"
                                    " " //FIXME real dialog title or something
                                   "</alt>");
         aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("alt_id") );
@@ -64,8 +64,8 @@ namespace
 
     OUString lcl_Image( const OUString& rScreenshotId, const Size& rSize )
     {
-        OUString aTempl = OUString("<image id=%1 src=media/screenshots/%2.png"
-                                    " width=%3cm  height=%4cm>"
+        OUString aTempl = OUString("<image id=\"%1\" src=\"media/screenshots/%2.png\""
+                                    " width=\"%3cm\"  height=\"%4cm\">"
                                     "%5"
                                    "</image>");
         aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("img_id") );
@@ -79,7 +79,7 @@ namespace
 
     OUString lcl_ParagraphWithImage( const OUString& rScreenshotId, const Size& rSize )
     {
-        OUString aTempl = OUString( "<paragraph id=%1 role=\"paragraph\" xml-lang=en-US>%2"
+        OUString aTempl = OUString( "<paragraph id=\"%1\" role=\"paragraph\" xml-lang=\"en-US\">%2"
                                     "</paragraph>"  SAL_NEWLINE_STRING );
         aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("par_id") );
         aTempl = aTempl.replaceFirst( "%2", lcl_Image(rScreenshotId, rSize) );
@@ -90,7 +90,7 @@ namespace
     OUString lcl_Bookmark( const OUString& rWidgetId )
     {
         OUString aTempl = "<!-- Bookmark for widget %1 -->" SAL_NEWLINE_STRING
-                          "<bookmark xml-lang=en-US branch=hid/%2 id=%3 localize=\"false\"/>" SAL_NEWLINE_STRING;
+                          "<bookmark xml-lang=\"en-US\" branch=\"hid/%2\" id=\"%3\" localize=\"false\"/>" SAL_NEWLINE_STRING;
         aTempl = aTempl.replaceFirst( "%1", rWidgetId );
         aTempl = aTempl.replaceFirst( "%2", rWidgetId );
         aTempl = aTempl.replaceFirst( "%3", lcl_genRandom("bm_id") );
commit d7c89c6209753d862b7708a2cf328f8fec3550fd
Author: Gabor Kelemen <kelemeng at ubuntu.com>
Date:   Thu Jun 8 18:50:37 2017 +0200

    tdf#108418 Fix vertical alignment of checkbox text
    
    Change-Id: I8daa6c2c5941a894259a5af74a16f7ef32f8a867
    Reviewed-on: https://gerrit.libreoffice.org/38577
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit 9d0ed8352ac9f27552f62d536c506f5cbc2a4afe)
    Reviewed-on: https://gerrit.libreoffice.org/38956
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit 50bab52194f570d48b92eb2f240dc4de7b3e1d3c)
    Reviewed-on: https://gerrit.libreoffice.org/38963
    (cherry picked from commit e3e8b30211528c451397c421f5815156522a70e3)

diff --git a/sw/uiconfig/swriter/ui/mmaddressblockpage.ui b/sw/uiconfig/swriter/ui/mmaddressblockpage.ui
index 1e42b0f696b9..76d8980b363e 100644
--- a/sw/uiconfig/swriter/ui/mmaddressblockpage.ui
+++ b/sw/uiconfig/swriter/ui/mmaddressblockpage.ui
@@ -272,7 +272,6 @@
                         <property name="receives_default">False</property>
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
-                        <property name="yalign">0</property>
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
commit 93c71c74739243373dd73b9685d9539ee5f1556b
Author: Paul Trojahn <paul.trojahn at gmail.com>
Date:   Tue Jun 6 23:05:10 2017 +0200

    tdf#89064 Fix import of pages with comments and notes
    
    importSlide removes the shapes on the page. It was used to import
    the comments and authors, which resulted in an empty notes page.
    
    Reviewed-on: https://gerrit.libreoffice.org/38648
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit c2da33ead8b093b12ebb9a0ea9c06d156c41a3e6)
    
    Change-Id: I7d68085b482e5497d46e92328c413c87440714a0

diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index b67eb8b56817..6f5f690088c9 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -301,7 +301,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
                                               pCommentAuthorsPersistPtr,
                                               Slide ) );
 
-                importSlide( xCommentAuthorsFragmentHandler, pCommentAuthorsPersistPtr );
+                getFilter().importFragment( xCommentAuthorsFragmentHandler );
                 maAuthorList.setValues( pCommentAuthorsPersistPtr->getCommentAuthors() );
             }
             if( !aCommentFragmentPath.isEmpty() )
@@ -323,7 +323,7 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
                         pCommentsPersistPtr,
                         Slide ) );
                 pCommentsPersistPtr->getCommentsList().cmLst.clear();
-                importSlide( xCommentsFragmentHandler, pCommentsPersistPtr );
+                getFilter().importFragment( xCommentsFragmentHandler );
 
                 if (!pCommentsPersistPtr->getCommentsList().cmLst.empty())
                 {
diff --git a/sd/qa/unit/data/pptx/tdf89064.pptx b/sd/qa/unit/data/pptx/tdf89064.pptx
new file mode 100644
index 000000000000..312496f79ad0
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf89064.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 27d15c0ec22b..d00387710361 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -44,6 +44,7 @@
 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
 #include <com/sun/star/document/XEventsSupplier.hpp>
 #include <com/sun/star/presentation/ClickAction.hpp>
+#include <com/sun/star/presentation/XPresentationPage.hpp>
 #include <com/sun/star/drawing/GraphicExportFilter.hpp>
 #include <com/sun/star/drawing/XDrawPage.hpp>
 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
@@ -143,6 +144,7 @@ public:
     void testTdf104201();
     void testTdf104445();
     void testTdf100926();
+    void testTdf89064();
 
     bool checkPattern(sd::DrawDocShellRef& rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected);
     void testPatternImport();
@@ -207,6 +209,7 @@ public:
     CPPUNIT_TEST(testTdf104445);
     CPPUNIT_TEST(testPatternImport);
     CPPUNIT_TEST(testTdf100926);
+    CPPUNIT_TEST(testTdf89064);
 
     CPPUNIT_TEST_SUITE_END();
 };
@@ -2137,6 +2140,16 @@ void SdImportTest::testTdf100926()
     xDocShRef->DoClose();
 }
 
+void SdImportTest::testTdf89064()
+{
+    sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf89064.pptx"), PPTX);
+    uno::Reference< presentation::XPresentationPage > xPage (getPage(0, xDocShRef), uno::UNO_QUERY_THROW);
+    uno::Reference< drawing::XDrawPage > xNotesPage (xPage->getNotesPage(), uno::UNO_QUERY_THROW);
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xNotesPage->getCount());
+
+    xDocShRef->DoClose();
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list