[Libreoffice-commits] core.git: Branch 'distro/vector/vector-5.4' - 4 commits - sw/qa sw/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 3 15:08:33 UTC 2020


 sw/qa/extras/htmlexport/data/no-ole2-pres-data.odt |binary
 sw/qa/extras/htmlexport/htmlexport.cxx             |   74 +++++++++++-
 sw/source/filter/html/htmlreqifreader.cxx          |  125 +++++++++++++--------
 3 files changed, 147 insertions(+), 52 deletions(-)

New commits:
commit af09c54be6fd03fd362715bc69d025a4561e228f
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Sep 2 17:44:19 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Sep 3 17:07:51 2020 +0200

    sw reqif-xhtml export, embedded objects: take OLE1 pres data from rtf if needed
    
    Next to the native data of an embedded object, the presentation data /
    replacement is included at several layers:
    
    - the OLE2 container may have it
    - the OLE1 container may have it
    - the RTF container may have it
    - the PNG file next to the RTF container may have it
    
    Given that various consumers pick one of the above, we try to provide
    presentation data in all layers.
    
    We already had code to generate the OLE1 presentation data from the OLE2
    container, but we gave up for OLE1 in case the OLE2 container didn't
    have it. This means that in case the RTF container is wrapped in a
    proper RTF file, Word refuses the edit the embedded object.
    
    Fix the problem by taking the presentation data from RTF for OLE1
    purposes, in case it's missing from the OLE2 container.
    
    (cherry picked from commit 0d027abbc5609b096d2a954e77aa7354a55928ab)
    
    Conflicts:
            sw/source/filter/html/htmlreqifreader.cxx
    
    Change-Id: I158db1c87044a3895d0c64a6e5a5384686627d96

diff --git a/sw/qa/extras/htmlexport/data/no-ole2-pres-data.odt b/sw/qa/extras/htmlexport/data/no-ole2-pres-data.odt
new file mode 100644
index 000000000000..cd65a1755746
Binary files /dev/null and b/sw/qa/extras/htmlexport/data/no-ole2-pres-data.odt differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 8119e509b8b0..158399287ce0 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -66,6 +66,16 @@ public:
         rStream.Seek(0);
     }
 
+    /// Wraps an RTF fragment into a complete RTF file, so an RTF parser can handle it.
+    static void wrapRtfFragment(const OUString& rURL, SvMemoryStream& rStream)
+    {
+        SvFileStream aRtfStream(rURL, StreamMode::READ);
+        rStream.WriteOString("{\\rtf1");
+        rStream.WriteStream(aRtfStream);
+        rStream.WriteOString("}");
+        rStream.Seek(0);
+    }
+
 private:
     bool mustCalcLayoutOf(const char* filename) override
     {
@@ -1019,12 +1029,8 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PDF)
     OUString aRtfUrl = aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE);
 
     // Parse the ole1 data out of that.
-    SvFileStream aRtfStream(aRtfUrl, StreamMode::READ);
     SvMemoryStream aRtf;
-    aRtf.WriteOString("{\\rtf1");
-    aRtf.WriteStream(aRtfStream);
-    aRtf.WriteOString("}");
-    aRtf.Seek(0);
+    HtmlExportTest::wrapRtfFragment(aRtfUrl, aRtf);
     tools::SvRef<TestReqIfRtfReader> xReader(new TestReqIfRtfReader(aRtf));
     CPPUNIT_ASSERT(xReader->CallParser() != SvParserState::Error);
     SvMemoryStream aOle1;
@@ -1159,6 +1165,64 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testUnderlineNone)
     assertXPathNoAttribute(pXmlDoc, "//reqif-xhtml:div/reqif-xhtml:p", "style");
 }
 
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testReqifOle1PresDataNoOle2)
+{
+    // Save to reqif-xhtml.
+    OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "no-ole2-pres-data.odt";
+    mxComponent = loadFromDesktop(aURL, "com.sun.star.text.TextDocument", {});
+    uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+    uno::Sequence<beans::PropertyValue> aStoreProperties = {
+        comphelper::makePropertyValue("FilterName", OUString("HTML (StarWriter)")),
+        comphelper::makePropertyValue("FilterOptions", OUString("xhtmlns=reqif-xhtml")),
+    };
+    xStorable->storeToURL(maTempFile.GetURL(), aStoreProperties);
+
+    // Get the .ole path.
+    SvMemoryStream aStream;
+    HtmlExportTest::wrapFragment(maTempFile, aStream);
+    xmlDocPtr pDoc = parseXmlStream(&aStream);
+    CPPUNIT_ASSERT(pDoc);
+    OUString aOlePath = getXPath(
+        pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:p/reqif-xhtml:object", "data");
+    OUString aOleSuffix(".ole");
+    CPPUNIT_ASSERT(aOlePath.endsWith(aOleSuffix));
+    INetURLObject aUrl(maTempFile.GetURL());
+    aUrl.setBase(aOlePath.copy(0, aOlePath.getLength() - aOleSuffix.getLength()));
+    aUrl.setExtension("ole");
+    OUString aRtfUrl = aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE);
+
+    // Parse the ole1 data out of the RTF fragment.
+    SvMemoryStream aRtf;
+    HtmlExportTest::wrapRtfFragment(aRtfUrl, aRtf);
+    tools::SvRef<TestReqIfRtfReader> xReader(new TestReqIfRtfReader(aRtf));
+    CPPUNIT_ASSERT(xReader->CallParser() != SvParserState::Error);
+    SvMemoryStream aOle1;
+    CPPUNIT_ASSERT(xReader->WriteObjectData(aOle1));
+    CPPUNIT_ASSERT(aOle1.Tell());
+
+    // Check the content of the ole1 data.
+    // Skip ObjectHeader, see [MS-OLEDS] 2.2.4.
+    aOle1.Seek(0);
+    sal_uInt32 nData;
+    aOle1.ReadUInt32(nData); // OLEVersion
+    aOle1.ReadUInt32(nData); // FormatID
+    aOle1.ReadUInt32(nData); // ClassName
+    aOle1.SeekRel(nData);
+    aOle1.ReadUInt32(nData); // TopicName
+    aOle1.SeekRel(nData);
+    aOle1.ReadUInt32(nData); // ItemName
+    aOle1.SeekRel(nData);
+    aOle1.ReadUInt32(nData); // NativeDataSize
+    aOle1.SeekRel(nData);
+
+    aOle1.ReadUInt32(nData); // OLEVersion for presentation data
+
+    // Without the accompanying fix in place, this test would have failed as there was no
+    // presentation data after the native data in the OLE1 container. The result was not editable in
+    // Word.
+    CPPUNIT_ASSERT(aOle1.good());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlreqifreader.cxx b/sw/source/filter/html/htmlreqifreader.cxx
index 30e6bc223e17..69a538cb4d88 100644
--- a/sw/source/filter/html/htmlreqifreader.cxx
+++ b/sw/source/filter/html/htmlreqifreader.cxx
@@ -233,10 +233,15 @@ OString InsertOLE1HeaderFromOle10NativeStream(tools::SvRef<SotStorage>& xStorage
     return aClassName;
 }
 
-/// Inserts an OLE1 header before an OLE2 storage.
+/**
+ * Writes an OLE1 header and data from rOle2 to rOle1.
+ *
+ * In case rOle2 has presentation data, then its size is written to nWidth/nHeight.  Otherwise
+ * nWidth/nHeight/pPresentationData/nPresentationData is used for the presentation data.
+ */
 OString InsertOLE1Header(SvStream& rOle2, SvStream& rOle1, sal_uInt32& nWidth, sal_uInt32& nHeight,
-                         SwOLENode& rOLENode, const sal_uInt8* /*pPresentationData*/,
-                         sal_uInt64 /*nPresentationData*/)
+                         SwOLENode& rOLENode, const sal_uInt8* pPresentationData,
+                         sal_uInt64 nPresentationData)
 {
     rOle2.Seek(0);
     tools::SvRef<SotStorage> xStorage(new SotStorage(rOle2));
@@ -283,33 +288,41 @@ OString InsertOLE1Header(SvStream& rOle2, SvStream& rOle1, sal_uInt32& nWidth, s
 
     // Write Presentation.
     SvMemoryStream aPresentationData;
+    // OLEVersion.
+    rOle1.WriteUInt32(0x00000501);
+    // FormatID: constant means the ClassName field is present.
+    rOle1.WriteUInt32(0x00000005);
+    // ClassName: null terminated pascal string.
+    OString aPresentationClassName("METAFILEPICT");
+    rOle1.WriteUInt32(aPresentationClassName.getLength() + 1);
+    rOle1.WriteOString(aPresentationClassName);
+    rOle1.WriteChar(0);
+    const sal_uInt8* pBytes = nullptr;
+    sal_uInt64 nBytes = 0;
     if (ParseOLE2Presentation(rOle2, nWidth, nHeight, aPresentationData))
     {
         // Take presentation data for OLE1 from OLE2.
-        // OLEVersion.
-        rOle1.WriteUInt32(0x00000501);
-        // FormatID: constant means the ClassName field is present.
-        rOle1.WriteUInt32(0x00000005);
-        // ClassName: null terminated pascal string.
-        OString aPresentationClassName("METAFILEPICT");
-        rOle1.WriteUInt32(aPresentationClassName.getLength() + 1);
-        rOle1.WriteOString(aPresentationClassName);
-        rOle1.WriteChar(0);
-        // Width.
-        rOle1.WriteUInt32(nWidth);
-        // Height.
-        rOle1.WriteUInt32(nHeight * -1);
-        // PresentationDataSize
-        sal_uInt32 nPresentationData = aPresentationData.Tell();
-        rOle1.WriteUInt32(8 + nPresentationData);
-        // Reserved1-4.
-        rOle1.WriteUInt16(0x0008);
-        rOle1.WriteUInt16(0x31b1);
-        rOle1.WriteUInt16(0x1dd9);
-        rOle1.WriteUInt16(0x0000);
-        aPresentationData.Seek(0);
-        rOle1.WriteStream(aPresentationData);
+        pBytes = static_cast<const sal_uInt8*>(aPresentationData.GetData());
+        nBytes = aPresentationData.Tell();
+    }
+    else
+    {
+        // Take presentation data for OLE1 from RTF.
+        pBytes = pPresentationData;
+        nBytes = nPresentationData;
     }
+    // Width.
+    rOle1.WriteUInt32(nWidth);
+    // Height.
+    rOle1.WriteUInt32(nHeight * -1);
+    // PresentationDataSize
+    rOle1.WriteUInt32(8 + nPresentationData);
+    // Reserved1-4.
+    rOle1.WriteUInt16(0x0008);
+    rOle1.WriteUInt16(0x31b1);
+    rOle1.WriteUInt16(0x1dd9);
+    rOle1.WriteUInt16(0x0000);
+    rOle1.WriteBytes(pBytes, nBytes);
 
     return aClassName;
 }
commit e0ca5569833664fa32aa6519032fbcaa0b16b14d
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Sep 1 13:36:48 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Sep 2 17:43:03 2020 +0200

    sw reqif-xhtml export, embedded objects: prepare pres data earlier
    
    If an embedded object has some native data, we provide presentation data
    (replacement graphic) for it in the OLE1 container. We usually take this
    from the OLE2 container, but it's OK to omit the presentation data
    there.
    
    So refactor to have the presentation data available from the OLE node
    (already used for RTF purposes) earlier, that'll allow taking the OLE1
    presentation data from RTF if it's missing from OLE2.
    
    (cherry picked from commit 4d33262b1b652b57f222c9f1cce7d976725399d4)
    
    Conflicts:
            sw/source/filter/html/htmlreqifreader.cxx
    
    Change-Id: Ib6b1b5e843308b0f7af04499de5a1ef5461f7b00

diff --git a/sw/source/filter/html/htmlreqifreader.cxx b/sw/source/filter/html/htmlreqifreader.cxx
index c2c0df2e54cb..30e6bc223e17 100644
--- a/sw/source/filter/html/htmlreqifreader.cxx
+++ b/sw/source/filter/html/htmlreqifreader.cxx
@@ -235,7 +235,8 @@ OString InsertOLE1HeaderFromOle10NativeStream(tools::SvRef<SotStorage>& xStorage
 
 /// Inserts an OLE1 header before an OLE2 storage.
 OString InsertOLE1Header(SvStream& rOle2, SvStream& rOle1, sal_uInt32& nWidth, sal_uInt32& nHeight,
-                         SwOLENode& rOLENode)
+                         SwOLENode& rOLENode, const sal_uInt8* /*pPresentationData*/,
+                         sal_uInt64 /*nPresentationData*/)
 {
     rOle2.Seek(0);
     tools::SvRef<SotStorage> xStorage(new SotStorage(rOle2));
@@ -284,6 +285,7 @@ OString InsertOLE1Header(SvStream& rOle2, SvStream& rOle1, sal_uInt32& nWidth, s
     SvMemoryStream aPresentationData;
     if (ParseOLE2Presentation(rOle2, nWidth, nHeight, aPresentationData))
     {
+        // Take presentation data for OLE1 from OLE2.
         // OLEVersion.
         rOle1.WriteUInt32(0x00000501);
         // FormatID: constant means the ClassName field is present.
@@ -312,8 +314,9 @@ OString InsertOLE1Header(SvStream& rOle2, SvStream& rOle1, sal_uInt32& nWidth, s
     return aClassName;
 }
 
-/// Writes rGraphic with size from rOLENode to rRtf as an RTF hexdump.
-void WrapOleGraphicInRtf(SvStream& rRtf, const SwOLENode& rOLENode, const Graphic& rGraphic)
+/// Writes presentation data with the specified size to rRtf as an RTF hexdump.
+void WrapOleGraphicInRtf(SvStream& rRtf, sal_uInt32 nWidth, sal_uInt32 nHeight,
+                         const sal_uInt8* pPresentationData, sal_uInt64 nPresentationData)
 {
     // Start result.
     rRtf.WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_RESULT);
@@ -322,25 +325,18 @@ void WrapOleGraphicInRtf(SvStream& rRtf, const SwOLENode& rOLENode, const Graphi
     rRtf.WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_PICT);
 
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_WMETAFILE "8");
-    Size aSize(rOLENode.GetTwipSize());
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PICW);
-    rRtf.WriteOString(OString::number(aSize.getWidth()));
+    rRtf.WriteOString(OString::number(nWidth));
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PICH);
-    rRtf.WriteOString(OString::number(aSize.getHeight()));
+    rRtf.WriteOString(OString::number(nHeight));
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PICWGOAL);
-    rRtf.WriteOString(OString::number(aSize.getWidth()));
+    rRtf.WriteOString(OString::number(nWidth));
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PICHGOAL);
-    rRtf.WriteOString(OString::number(aSize.getHeight()));
-    SvMemoryStream aGraphicStream;
-    if (GraphicConverter::Export(aGraphicStream, rGraphic, ConvertDataFormat::WMF) == ERRCODE_NONE)
+    rRtf.WriteOString(OString::number(nHeight));
+    if (pPresentationData)
     {
-        const sal_uInt8* pGraphicAry = static_cast<const sal_uInt8*>(aGraphicStream.GetData());
-        sal_uInt64 nCurrent = aGraphicStream.Tell();
-        sal_uInt64 nSize = aGraphicStream.Seek(STREAM_SEEK_TO_END);
-        aGraphicStream.Seek(nCurrent);
-        msfilter::rtfutil::StripMetafileHeader(pGraphicAry, nSize);
         rRtf.WriteCharPtr(SAL_NEWLINE_STRING);
-        msfilter::rtfutil::WriteHex(pGraphicAry, nSize, &rRtf);
+        msfilter::rtfutil::WriteHex(pPresentationData, nPresentationData, &rRtf);
     }
 
     // End pict.
@@ -401,9 +397,29 @@ bool WrapOleInRtf(SvStream& rOle2, SvStream& rRtf, SwOLENode& rOLENode)
 
     // Write OLE1 header, then the RTF wrapper.
     SvMemoryStream aOLE1;
-    sal_uInt32 nWidth = 0;
-    sal_uInt32 nHeight = 0;
-    OString aClassName = InsertOLE1Header(rOle2, aOLE1, nWidth, nHeight, rOLENode);
+
+    // Prepare presentation data early, so it's available to both OLE1 and RTF.
+    Size aSize(rOLENode.GetTwipSize());
+    sal_uInt32 nWidth = aSize.getWidth();
+    sal_uInt32 nHeight = aSize.getHeight();
+    const Graphic* pGraphic = rOLENode.GetGraphic();
+    const sal_uInt8* pPresentationData = nullptr;
+    sal_uInt64 nPresentationData = 0;
+    SvMemoryStream aGraphicStream;
+    if (pGraphic)
+    {
+        if (GraphicConverter::Export(aGraphicStream, *pGraphic, ConvertDataFormat::WMF)
+            == ERRCODE_NONE)
+        {
+            pPresentationData = static_cast<const sal_uInt8*>(aGraphicStream.GetData());
+            sal_uInt64 nCurrent = aGraphicStream.Tell();
+            nPresentationData = aGraphicStream.Seek(STREAM_SEEK_TO_END);
+            aGraphicStream.Seek(nCurrent);
+            msfilter::rtfutil::StripMetafileHeader(pPresentationData, nPresentationData);
+        }
+    }
+    OString aClassName = InsertOLE1Header(rOle2, aOLE1, nWidth, nHeight, rOLENode,
+                                          pPresentationData, nPresentationData);
 
     // Start object.
     rRtf.WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_OBJECT);
@@ -429,8 +445,10 @@ bool WrapOleInRtf(SvStream& rOle2, SvStream& rRtf, SwOLENode& rOLENode)
     // End objdata.
     rRtf.WriteCharPtr("}");
 
-    if (const Graphic* pGraphic = rOLENode.GetGraphic())
-        WrapOleGraphicInRtf(rRtf, rOLENode, *pGraphic);
+    if (pPresentationData)
+    {
+        WrapOleGraphicInRtf(rRtf, nWidth, nHeight, pPresentationData, nPresentationData);
+    }
 
     // End object.
     rRtf.WriteCharPtr("}");
commit 64989e44b28efef7ff90362f8a13a76c73a53bc4
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Oct 10 11:54:27 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Sep 2 16:39:28 2020 +0200

    convert WriteCharPtr..getStr to WriteOString
    
    and improve the WriteOString method, we can avoid the strlen here, we
    already have the length
    
    One change in behaviour to be noted - if the string contains
    trailing zero bytes, which ARE INCLUDED IN THE STRING LENGTH,
    i.e. I'm not talking about the normal terminating zero, then this
    patch changes behaviour because we will now write those zeros to
    the stream.
    
    [ Just the sw/source/filter/html/htmlreqifreader.cxx part. ]
    
    (cherry picked from commit 241bee7e4be6a205fae0d3f5508e084462c7ca55)
    
    Change-Id: I4668b9b9eb877f820b1dc70d6cd10ba2623bc0a2

diff --git a/sw/source/filter/html/htmlreqifreader.cxx b/sw/source/filter/html/htmlreqifreader.cxx
index 91197d5a5efc..c2c0df2e54cb 100644
--- a/sw/source/filter/html/htmlreqifreader.cxx
+++ b/sw/source/filter/html/htmlreqifreader.cxx
@@ -324,13 +324,13 @@ void WrapOleGraphicInRtf(SvStream& rRtf, const SwOLENode& rOLENode, const Graphi
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_WMETAFILE "8");
     Size aSize(rOLENode.GetTwipSize());
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PICW);
-    rRtf.WriteCharPtr(OString::number(aSize.getWidth()).getStr());
+    rRtf.WriteOString(OString::number(aSize.getWidth()));
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PICH);
-    rRtf.WriteCharPtr(OString::number(aSize.getHeight()).getStr());
+    rRtf.WriteOString(OString::number(aSize.getHeight()));
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PICWGOAL);
-    rRtf.WriteCharPtr(OString::number(aSize.getWidth()).getStr());
+    rRtf.WriteOString(OString::number(aSize.getWidth()));
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PICHGOAL);
-    rRtf.WriteCharPtr(OString::number(aSize.getHeight()).getStr());
+    rRtf.WriteOString(OString::number(aSize.getHeight()));
     SvMemoryStream aGraphicStream;
     if (GraphicConverter::Export(aGraphicStream, rGraphic, ConvertDataFormat::WMF) == ERRCODE_NONE)
     {
@@ -417,9 +417,9 @@ bool WrapOleInRtf(SvStream& rOle2, SvStream& rRtf, SwOLENode& rOLENode)
 
     // Object size.
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_OBJW);
-    rRtf.WriteCharPtr(OString::number(nWidth).getStr());
+    rRtf.WriteOString(OString::number(nWidth));
     rRtf.WriteCharPtr(OOO_STRING_SVTOOLS_RTF_OBJH);
-    rRtf.WriteCharPtr(OString::number(nHeight).getStr());
+    rRtf.WriteOString(OString::number(nHeight));
 
     // Start objdata.
     rRtf.WriteCharPtr(
commit 878de7be446bca37c1067e552998830e75a615bd
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jan 24 09:29:36 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Sep 2 16:24:48 2020 +0200

    loplugin:constparams in sw
    
    [ Just the sw/source/filter/html/htmlreqifreader.cxx part. ]
    
    (cherry picked from commit 7075ce2fee860daa6affde92b256838aaa3d7d87)
    
    Change-Id: I4a0f51eae28c82eca3c44b9d06c0410f9645f62f

diff --git a/sw/source/filter/html/htmlreqifreader.cxx b/sw/source/filter/html/htmlreqifreader.cxx
index 5600ec189094..91197d5a5efc 100644
--- a/sw/source/filter/html/htmlreqifreader.cxx
+++ b/sw/source/filter/html/htmlreqifreader.cxx
@@ -313,7 +313,7 @@ OString InsertOLE1Header(SvStream& rOle2, SvStream& rOle1, sal_uInt32& nWidth, s
 }
 
 /// Writes rGraphic with size from rOLENode to rRtf as an RTF hexdump.
-void WrapOleGraphicInRtf(SvStream& rRtf, SwOLENode& rOLENode, const Graphic& rGraphic)
+void WrapOleGraphicInRtf(SvStream& rRtf, const SwOLENode& rOLENode, const Graphic& rGraphic)
 {
     // Start result.
     rRtf.WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_RESULT);


More information about the Libreoffice-commits mailing list