[Libreoffice-commits] core.git: 5 commits - bin/get-bugzilla-attachments-by-mimetype include/xmloff sw/qa xmlsecurity/source

Michael Stahl mstahl at redhat.com
Fri Nov 27 00:49:32 PST 2015


 bin/get-bugzilla-attachments-by-mimetype |    1 +
 include/xmloff/xmlimp.hxx                |    2 +-
 sw/qa/extras/uiwriter/uiwriter.cxx       |   25 +++++++++++++++++++++++++
 xmlsecurity/source/xmlsec/saxhelper.cxx  |   10 +++-------
 4 files changed, 30 insertions(+), 8 deletions(-)

New commits:
commit a933990a3f24f7c3ed40500f782f6fcb25462824
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Nov 27 09:33:42 2015 +0100

    xmlsecurity: fix DrMemory warning
    
    Presumably that was the intent?
    
    Change-Id: Ibfca90041d6913827d2f329bab448afe4d725b46

diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx
index 0339067..b1b7793 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -135,7 +135,7 @@ SAXHelper::SAXHelper( )
     {
         xmlSAXVersion(m_pParserCtxt->sax, 1);
 
-        if( m_pParserCtxt->inputTab[0] != nullptr )
+        if (m_pParserCtxt->inputTab != nullptr)
         {
             m_pParserCtxt->inputTab[0] = nullptr ;
         }
commit 2fed793e19e355ead5a1d6703835c86fb5ac02c0
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Nov 26 23:17:25 2015 +0100

    xmlsecurity: remove some dead code that is guaranteed to crash
    
    Fortunately currently XMLSEC_NO_XSLT is defined anyway, but better
    remove it.
    
    Change-Id: I1dd2aa57356274dacc99cc7def2d308884263289

diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx
index 589e890..0339067 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -125,12 +125,10 @@ SAXHelper::SAXHelper( )
 
     if( m_pParserCtxt == nullptr )
     {
-#ifndef XMLSEC_NO_XSLT
-        xsltCleanupGlobals() ;
-#endif
 //      see issue i74334, we cannot call xmlCleanupParser when libxml is still used
 //      in other parts of the office.
 //      xmlCleanupParser() ;
+//      and neither can we call xsltCleanupGlobals()
         throw cssu::RuntimeException() ;
     }
     else
@@ -146,12 +144,10 @@ SAXHelper::SAXHelper( )
         {
             xmlFreeParserCtxt( m_pParserCtxt ) ;
 
-#ifndef XMLSEC_NO_XSLT
-            xsltCleanupGlobals() ;
-#endif
 //      see issue i74334, we cannot call xmlCleanupParser when libxml is still used
 //      in other parts of the office.
 //      xmlCleanupParser() ;
+//      and neither can we call xsltCleanupGlobals()
             m_pParserCtxt = nullptr ;
             throw cssu::RuntimeException() ;
         }
commit 4bd0739b5b2110b428180c270f5f5f8722ff0b0b
Author: Varun Dhall <varun.dhall at studentpartner.com>
Date:   Mon Nov 23 02:03:40 2015 +0530

    Added Test for tdf#94804 cross ref bookmarks created with wrong prefix
    
    Change-Id: I9cc5a703ce613c3e0331da9b49fe660e31f64586
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index c69f330..efacac2 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -37,6 +37,8 @@
 #include <unocrsr.hxx>
 #include <unocrsrhelper.hxx>
 #include <unotbl.hxx>
+#include <IMark.hxx>
+#include <IDocumentMarkAccess.hxx>
 #include <pagedesc.hxx>
 #include <postithelper.hxx>
 #include <PostItMgr.hxx>
@@ -166,6 +168,7 @@ public:
     void testTextTableCellNames();
     void testShapeAnchorUndo();
     void testDde();
+    void testTdf94804();
     void testTdf89954();
     void testTdf89720();
     void testTdf88986();
@@ -246,6 +249,7 @@ public:
     CPPUNIT_TEST(testTextTableCellNames);
     CPPUNIT_TEST(testShapeAnchorUndo);
     CPPUNIT_TEST(testDde);
+    CPPUNIT_TEST(testTdf94804);
     CPPUNIT_TEST(testTdf89954);
     CPPUNIT_TEST(testTdf89720);
     CPPUNIT_TEST(testTdf88986);
@@ -2723,6 +2727,27 @@ void SwUiWriterTest::testDde()
     CPPUNIT_ASSERT(xField->getString().endsWith("asdf"));
 }
 
+void SwUiWriterTest::testTdf94804()
+{
+    //create new writer document
+    SwDoc* pDoc = createDoc();
+    //get cursor for making bookmark at a particular location
+    SwPaM* pCrsr = pDoc->GetEditShell()->GetCursor();
+    IDocumentMarkAccess* pIDMAccess(pDoc->getIDocumentMarkAccess());
+    //make first bookmark, CROSSREF_HEADING, with *empty* name
+    sw::mark::IMark* pMark1(pIDMAccess->makeMark(*pCrsr, rtl::OUString(""), IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK));
+    //get the new(autogenerated) bookmark name
+    rtl::OUString bookmark1name = pMark1->GetName();
+    //match the bookmark name, it should be like "__RefHeading__**"
+    CPPUNIT_ASSERT(bookmark1name.match("__RefHeading__"));
+    //make second bookmark, CROSSREF_NUMITEM, with *empty* name
+    sw::mark::IMark* pMark2(pIDMAccess->makeMark(*pCrsr, rtl::OUString(""), IDocumentMarkAccess::MarkType::CROSSREF_NUMITEM_BOOKMARK));
+    //get the new(autogenerated) bookmark name
+    rtl::OUString bookmark2name = pMark2->GetName();
+    //match the bookmark name, it should be like "__RefNumPara__**"
+    CPPUNIT_ASSERT(bookmark2name.match("__RefNumPara__"));
+}
+
 void SwUiWriterTest::testUnicodeNotationToggle()
 {
     SwDoc* pDoc = createDoc("unicodeAltX.odt");
commit 4033537b3aa3aefe1cfc9ceba71e780f7c23eb08
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Nov 26 17:35:16 2015 +0100

    typo
    
    Change-Id: Iebd5637328e905502d02a97b5294c67892688ecb

diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 6371075..6c5ae70 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -335,7 +335,7 @@ public:
         mxNumberFormatsSupplier = _xNumberFormatSupplier;
     }
 
-    // Convert a local packe URL into either a graphic manager or a
+    // Convert a local package URL into either a graphic manager or a
     // internal package URL. The later one happens only if bLoadURL is true
     OUString ResolveGraphicObjectURL( const OUString& rURL, bool bLoadOnDemand );
     css::uno::Reference< css::io::XOutputStream >
commit 951494c8cbac6fc5aa491c3780d2659fedd013d3
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Nov 26 17:08:57 2015 +0100

    get-bugzilla-attachments-by-mimetype: add gnumeric
    
    Change-Id: Ib47308a9575a15aaa5b2d650cb4f1b78b1a5ad27

diff --git a/bin/get-bugzilla-attachments-by-mimetype b/bin/get-bugzilla-attachments-by-mimetype
index 001ae81..8307e4c 100755
--- a/bin/get-bugzilla-attachments-by-mimetype
+++ b/bin/get-bugzilla-attachments-by-mimetype
@@ -460,6 +460,7 @@ mimetypes = {
     'application/x-fictionbook+xml': 'fb2',
     'application/x-abiword': 'abw',
     'application/x-pagemaker': 'pmd',
+    'application/x-gnumeric': 'gnumeric',
 # relatively uncommon image mimetypes
     'image/x-freehand': 'fh',
     'image/cgm': 'cgm',


More information about the Libreoffice-commits mailing list