include/svtools/rtfkeywd.hxx                |    1 +
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx    |   10 ----------
 sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx |   10 ++++++++++
 sw/source/core/doc/docbm.cxx                |    3 +++
 sw/source/filter/ww8/rtfexport.cxx          |   15 +++------------
 5 files changed, 17 insertions(+), 22 deletions(-)

New commits:
commit c0765d1b5e317ec542be8285649c2c2a70892eff
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu May 22 19:51:41 2014 +0200

    coverity#735895 Unchecked dynamic_cast
    
    Change-Id: I6c2cc90668a2158a0b5bf638ce520c8af7731f4e

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 72764a6..6519285 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -417,6 +417,9 @@ namespace sw { namespace mark
             " - Mark was not created.");
         MarkBase* pMarkBase = dynamic_cast<MarkBase*>(pMark.get());
 
+        if (!pMark)
+            return 0;
+
         if(pMark->GetMarkPos() != pMark->GetMarkStart())
             pMarkBase->Swap();
 
commit 8e2b894c30f90c577857a16bab13e45f867bf36e
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu May 22 19:32:19 2014 +0200

    fdo#76101 move testcase to CppunitTest_sw_ooxmlsdrexport
    
    The motivation is that this test takes time to execute (and we're
    testing a limit here, so it's not easy to speed it up), though moving it
    out of CppunitTest_sw_ooxmlexport is still possible (which is the
    current critical path during a toplevel 'make').
    
    Change-Id: Ibe6580f8aea1439f4feb281996f2f4bbd46ff4ce

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 562541d..e348ccd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3091,16 +3091,6 @@ DECLARE_OOXMLEXPORT_TEST(testFDO76248, "FDO76248.docx")
     assertXPath(pXmlDoc, "//a:graphicData[not(*)]", 0);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFdo76101, "fdo76101.docx")
-{
-    xmlDocPtr pXmlDoc = parseExport("word/styles.xml");
-
-    if (!pXmlDoc)
-       return;
-    xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, "/w:styles/w:style");
-    CPPUNIT_ASSERT(4091 >= xmlXPathNodeSetGetLength(pXmlNodes));
-}
-
 DECLARE_OOXMLEXPORT_TEST(testFDO76163 , "fdo76163.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 2dde9d1..9c49216 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1414,6 +1414,16 @@ DECLARE_OOXMLEXPORT_TEST(testPresetShape, 
"preset-shape.docx")
     CPPUNIT_ASSERT_EQUAL(sal_Int32(21600), aSubViewSize[0].Height);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testFdo76101, "fdo76101.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/styles.xml");
+
+    if (!pXmlDoc)
+       return;
+    xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, "/w:styles/w:style");
+    CPPUNIT_ASSERT(4091 >= xmlXPathNodeSetGetLength(pXmlNodes));
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit 8acb6155c310ac19827f97227c8e45753fcef7e6
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu May 22 19:30:25 2014 +0200

    clean up RtfExport::WriteInfo()
    
    The \vern output was never parsed, and Word uses the generator field, so
    let us do the same. And with the standard generator string, if we ever
    need to parse it, we already have a parser for it in the ODF filter.
    
    Change-Id: I57f25a6414b2b753a23cf82b691e364d84e4bb44

diff --git a/include/svtools/rtfkeywd.hxx b/include/svtools/rtfkeywd.hxx
index a6a1157..8518f69 100644
--- a/include/svtools/rtfkeywd.hxx
+++ b/include/svtools/rtfkeywd.hxx
@@ -1204,6 +1204,7 @@
 #define LO_STRING_SVTOOLS_RTF_LISTPICTURE "\\listpicture"
 #define LO_STRING_SVTOOLS_RTF_LEVELPICTURE "\\levelpicture"
 #define LO_STRING_SVTOOLS_RTF_BRDRSH "\\brdrsh"
+#define LO_STRING_SVTOOLS_RTF_GENERATOR "\\generator"
 
 #endif // INCLUDED_SVTOOLS_RTFKEYWD_HXX
 
diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 8b8b21b..83c753e 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -57,6 +57,7 @@
 #include <svtools/rtfkeywd.hxx>
 #include <filter/msfilter/rtfutil.hxx>
 #include <unotools/configmgr.hxx>
+#include <unotools/docinfohelper.hxx>
 #include <vcl/svapp.hxx>
 
 #if OSL_DEBUG_LEVEL > 1
@@ -425,6 +426,8 @@ void RtfExport::WriteMainText()
 
 void RtfExport::WriteInfo()
 {
+    OString aGenerator = 
OUStringToOString(utl::DocInfoHelper::GetGeneratorString(), 
RTL_TEXTENCODING_UTF8);
+    Strm().WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_IGNORE 
LO_STRING_SVTOOLS_RTF_GENERATOR " 
").WriteCharPtr(aGenerator.getStr()).WriteChar('}');
     Strm().WriteChar('{').WriteCharPtr(OOO_STRING_SVTOOLS_RTF_INFO);
 
     SwDocShell* pDocShell(pDoc->GetDocShell());
@@ -453,18 +456,6 @@ void RtfExport::WriteInfo()
         OutDateTime(OOO_STRING_SVTOOLS_RTF_PRINTIM, xDocProps->getPrintDate());
     }
 
-    
Strm().WriteChar('{').WriteCharPtr(OOO_STRING_SVTOOLS_RTF_COMMENT).WriteCharPtr("
 ");
-    
Strm().WriteCharPtr(OUStringToOString(utl::ConfigManager::getProductName(), 
eCurrentEncoding).getStr()).WriteCharPtr("}{").WriteCharPtr(OOO_STRING_SVTOOLS_RTF_VERN);
-
-// The convention that we follow is that the version number
-// should be a non-negative 32-bit int
-#if LIBO_VERSION_MAJOR > 127
-#error Major version number must be less than 128
-#elif LIBO_VERSION_MINOR > 255 || LIBO_VERSION_MICRO > 255 || 
LIBO_VERSION_PATCH > 255
-#error Minor, micro and patchlevel version numbers must be less than 256
-#endif
-
-    Strm().WriteNumber((sal_Int32) 
LIBO_VERSION_ENCODED_IN_32BITS).WriteChar('}');
     Strm().WriteChar('}');
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to