[Libreoffice-commits] core.git: 2 commits - sw/source writerperfect/Library_wpftwriter.mk writerperfect/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Aug 11 08:42:07 UTC 2017


 sw/source/filter/ww8/docxsdrexport.hxx       |    4 -
 sw/source/filter/ww8/rtfattributeoutput.cxx  |   16 ++--
 sw/source/filter/ww8/rtfattributeoutput.hxx  |    4 -
 sw/source/filter/ww8/rtfexport.cxx           |    4 -
 writerperfect/Library_wpftwriter.mk          |    3 
 writerperfect/source/writer/exp/txtparai.cxx |   50 ++++++++++++++
 writerperfect/source/writer/exp/txtparai.hxx |   38 ++++++++++
 writerperfect/source/writer/exp/xmlictxt.cxx |   66 ++++++++++++++++++
 writerperfect/source/writer/exp/xmlictxt.hxx |   56 ++++++++++++++++
 writerperfect/source/writer/exp/xmlimp.cxx   |   94 ++++++++++++++++++++++-----
 writerperfect/source/writer/exp/xmlimp.hxx   |   14 +++-
 writerperfect/source/writer/exp/xmltext.cxx  |   36 ++++++++++
 writerperfect/source/writer/exp/xmltext.hxx  |   34 +++++++++
 13 files changed, 387 insertions(+), 32 deletions(-)

New commits:
commit 9456afaa5aa12926b1aa6b74ece1654d47e1c650
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Aug 11 09:11:22 2017 +0200

    EPUB export: rework to use context classes
    
    Before writerperfect::exp::XMLImport grows into a God object. Also, if
    I'm at it, recurse into text:h to include heading text.
    
    Change-Id: Iede56d00dbede40186b6484d0be92a2ac2e4768e
    Reviewed-on: https://gerrit.libreoffice.org/41005
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/writerperfect/Library_wpftwriter.mk b/writerperfect/Library_wpftwriter.mk
index 953f00c3e0d9..cf567b0af9f8 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -75,7 +75,10 @@ $(eval $(call gb_Library_add_exception_objects,wpftwriter,\
 	writerperfect/source/writer/PagesImportFilter \
 	writerperfect/source/writer/StarOfficeWriterImportFilter \
 	writerperfect/source/writer/WordPerfectImportFilter \
+	writerperfect/source/writer/exp/txtparai \
+	writerperfect/source/writer/exp/xmlictxt \
 	writerperfect/source/writer/exp/xmlimp \
+	writerperfect/source/writer/exp/xmltext \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/writerperfect/source/writer/exp/txtparai.cxx b/writerperfect/source/writer/exp/txtparai.cxx
new file mode 100644
index 000000000000..9507ceb759b9
--- /dev/null
+++ b/writerperfect/source/writer/exp/txtparai.cxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "txtparai.hxx"
+
+#include "xmlimp.hxx"
+
+using namespace com::sun::star;
+
+namespace writerperfect
+{
+namespace exp
+{
+
+XMLParaContext::XMLParaContext(XMLImport &rImport)
+    : XMLImportContext(rImport)
+{
+}
+
+XMLImportContext *XMLParaContext::CreateChildContext(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+{
+    return nullptr;
+}
+
+void XMLParaContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+{
+    mrImport.GetGenerator().openParagraph(librevenge::RVNGPropertyList());
+}
+
+void XMLParaContext::endElement(const OUString &/*rName*/)
+{
+    mrImport.GetGenerator().closeParagraph();
+}
+
+void XMLParaContext::characters(const OUString &rChars)
+{
+    OString sCharU8 = OUStringToOString(rChars, RTL_TEXTENCODING_UTF8);
+    mrImport.GetGenerator().insertText(librevenge::RVNGString(sCharU8.getStr()));
+}
+
+} // namespace exp
+} // namespace writerperfect
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/exp/txtparai.hxx b/writerperfect/source/writer/exp/txtparai.hxx
new file mode 100644
index 000000000000..6c9f23b6cf37
--- /dev/null
+++ b/writerperfect/source/writer/exp/txtparai.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_TXTPARAI_HXX
+#define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_TXTPARAI_HXX
+
+#include "xmlictxt.hxx"
+
+namespace writerperfect
+{
+namespace exp
+{
+
+/// Handler for <text:p>/<text:h>.
+class XMLParaContext : public XMLImportContext
+{
+public:
+    XMLParaContext(XMLImport &rImport);
+
+    XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/) override;
+
+    void SAL_CALL startElement(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs) override;
+    void SAL_CALL endElement(const OUString &rName) override;
+    void SAL_CALL characters(const OUString &rChars) override;
+};
+
+} // namespace exp
+} // namespace writerperfect
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/exp/xmlictxt.cxx b/writerperfect/source/writer/exp/xmlictxt.cxx
new file mode 100644
index 000000000000..5f5a731493c8
--- /dev/null
+++ b/writerperfect/source/writer/exp/xmlictxt.cxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "xmlictxt.hxx"
+
+#include "xmlimp.hxx"
+
+using namespace com::sun::star;
+
+namespace writerperfect
+{
+namespace exp
+{
+
+XMLImportContext::XMLImportContext(XMLImport &rImport)
+    : mrImport(rImport)
+{
+}
+
+XMLImportContext *XMLImportContext::CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs)
+{
+    return mrImport.CreateContext(rName, xAttribs);
+}
+
+void XMLImportContext::startDocument()
+{
+}
+
+void XMLImportContext::endDocument()
+{
+}
+
+void XMLImportContext::startElement(const OUString &/*rName*/, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+{
+}
+
+void XMLImportContext::endElement(const OUString &/*rName*/)
+{
+}
+
+void XMLImportContext::characters(const OUString &/*rChars*/)
+{
+}
+
+void XMLImportContext::ignorableWhitespace(const OUString &/*rWhitespaces*/)
+{
+}
+
+void XMLImportContext::processingInstruction(const OUString &/*rTarget*/, const OUString &/*rData*/)
+{
+}
+
+void XMLImportContext::setDocumentLocator(const css::uno::Reference<css::xml::sax::XLocator> &/*xLocator*/)
+{
+}
+
+} // namespace exp
+} // namespace writerperfect
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/exp/xmlictxt.hxx b/writerperfect/source/writer/exp/xmlictxt.hxx
new file mode 100644
index 000000000000..0076852f25d3
--- /dev/null
+++ b/writerperfect/source/writer/exp/xmlictxt.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLICTXT_HXX
+#define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLICTXT_HXX
+
+#include <cppuhelper/implbase.hxx>
+
+#include <librevenge/librevenge.h>
+
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+
+namespace writerperfect
+{
+namespace exp
+{
+
+class XMLImport;
+
+/// Base class for a handler of a single XML element during ODF -> librevenge conversion.
+class XMLImportContext : public cppu::WeakImplHelper
+    <
+    css::xml::sax::XDocumentHandler
+    >
+{
+public:
+    XMLImportContext(XMLImport &rImport);
+
+    virtual XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs);
+
+    // XDocumentHandler
+    void SAL_CALL startDocument() override;
+    void SAL_CALL endDocument() override;
+    void SAL_CALL startElement(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs) override;
+    void SAL_CALL endElement(const OUString &rName) override;
+    void SAL_CALL characters(const OUString &rChars) override;
+    void SAL_CALL ignorableWhitespace(const OUString &rWhitespaces) override;
+    void SAL_CALL processingInstruction(const OUString &rTarget, const OUString &rData) override;
+    void SAL_CALL setDocumentLocator(const css::uno::Reference<css::xml::sax::XLocator> &xLocator) override;
+
+protected:
+    XMLImport &mrImport;
+};
+
+} // namespace exp
+} // namespace writerperfect
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/exp/xmlimp.cxx b/writerperfect/source/writer/exp/xmlimp.cxx
index 21c4809ffc57..b975bbcceebc 100644
--- a/writerperfect/source/writer/exp/xmlimp.cxx
+++ b/writerperfect/source/writer/exp/xmlimp.cxx
@@ -9,6 +9,9 @@
 
 #include "xmlimp.hxx"
 
+#include "xmlictxt.hxx"
+#include "xmltext.hxx"
+
 using namespace com::sun::star;
 
 namespace writerperfect
@@ -16,11 +19,65 @@ namespace writerperfect
 namespace exp
 {
 
+/// Handler for <office:body>.
+class XMLBodyContext : public XMLImportContext
+{
+public:
+    XMLBodyContext(XMLImport &rImport);
+
+    XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/) override;
+};
+
+XMLBodyContext::XMLBodyContext(XMLImport &rImport)
+    : XMLImportContext(rImport)
+{
+}
+
+XMLImportContext *XMLBodyContext::CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+{
+    if (rName == "office:text")
+        return new XMLBodyContentContext(mrImport);
+    return nullptr;
+}
+
+/// Handler for <office:document>.
+class XMLOfficeDocContext : public XMLImportContext
+{
+public:
+    XMLOfficeDocContext(XMLImport &rImport);
+
+    XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/) override;
+};
+
+XMLOfficeDocContext::XMLOfficeDocContext(XMLImport &rImport)
+    : XMLImportContext(rImport)
+{
+}
+
+XMLImportContext *XMLOfficeDocContext::CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+{
+    if (rName == "office:body")
+        return new XMLBodyContext(mrImport);
+    return nullptr;
+}
+
 XMLImport::XMLImport(librevenge::RVNGTextInterface &rGenerator)
     : mrGenerator(rGenerator)
 {
 }
 
+XMLImportContext *XMLImport::CreateContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+{
+    if (rName == "office:document")
+        return new XMLOfficeDocContext(*this);
+    return nullptr;
+}
+
+librevenge::RVNGTextInterface &XMLImport::GetGenerator() const
+{
+    return mrGenerator;
+}
+
 void XMLImport::startDocument()
 {
     mrGenerator.startDocument(librevenge::RVNGPropertyList());
@@ -31,31 +88,38 @@ void XMLImport::endDocument()
     mrGenerator.endDocument();
 }
 
-void XMLImport::startElement(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+void XMLImport::startElement(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs)
 {
-    if (rName == "text:p")
+    rtl::Reference<XMLImportContext> xContext;
+    if (!maContexts.empty())
     {
-        mrGenerator.openParagraph(librevenge::RVNGPropertyList());
-        mbParagraphOpened = true;
+        if (maContexts.top().is())
+            xContext = maContexts.top()->CreateChildContext(rName, xAttribs);
     }
+    else
+        xContext = CreateContext(rName, xAttribs);
+
+    if (xContext.is())
+        xContext->startElement(rName, xAttribs);
+
+    maContexts.push(xContext);
 }
 
 void XMLImport::endElement(const OUString &rName)
 {
-    if (rName == "text:p")
-    {
-        mrGenerator.closeParagraph();
-        mbParagraphOpened = false;
-    }
+    if (maContexts.empty())
+        return;
+
+    if (maContexts.top().is())
+        maContexts.top()->endElement(rName);
+
+    maContexts.pop();
 }
 
 void XMLImport::characters(const OUString &rChars)
 {
-    if (mbParagraphOpened)
-    {
-        OString sCharU8 = OUStringToOString(rChars, RTL_TEXTENCODING_UTF8);
-        mrGenerator.insertText(librevenge::RVNGString(sCharU8.getStr()));
-    }
+    if (maContexts.top().is())
+        maContexts.top()->characters(rChars);
 }
 
 void XMLImport::ignorableWhitespace(const OUString &/*rWhitespaces*/)
@@ -64,12 +128,10 @@ void XMLImport::ignorableWhitespace(const OUString &/*rWhitespaces*/)
 
 void XMLImport::processingInstruction(const OUString &/*rTarget*/, const OUString &/*rData*/)
 {
-    SAL_WARN("writerperfect", "XMLImport::processingInstruction: implement me");
 }
 
 void XMLImport::setDocumentLocator(const css::uno::Reference<css::xml::sax::XLocator> &/*xLocator*/)
 {
-    SAL_WARN("writerperfect", "XMLImport::setDocumentLocator: implement me");
 }
 
 } // namespace exp
diff --git a/writerperfect/source/writer/exp/xmlimp.hxx b/writerperfect/source/writer/exp/xmlimp.hxx
index 2b1c743fcf03..6e6cc8c82491 100644
--- a/writerperfect/source/writer/exp/xmlimp.hxx
+++ b/writerperfect/source/writer/exp/xmlimp.hxx
@@ -10,17 +10,23 @@
 #ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLIMP_HXX
 #define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLIMP_HXX
 
-#include <cppuhelper/implbase.hxx>
+#include <memory>
+#include <stack>
 
 #include <librevenge/librevenge.h>
 
 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
 
+#include <cppuhelper/implbase.hxx>
+#include <rtl/ref.hxx>
+
 namespace writerperfect
 {
 namespace exp
 {
 
+class XMLImportContext;
+
 /// ODT export feeds this class to make librevenge calls.
 class XMLImport : public cppu::WeakImplHelper
     <
@@ -28,11 +34,15 @@ class XMLImport : public cppu::WeakImplHelper
     >
 {
     librevenge::RVNGTextInterface &mrGenerator;
-    bool mbParagraphOpened = false;
+    std::stack< rtl::Reference<XMLImportContext> > maContexts;
 
 public:
     XMLImport(librevenge::RVNGTextInterface &rGenerator);
 
+    XMLImportContext *CreateContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs);
+
+    librevenge::RVNGTextInterface &GetGenerator() const;
+
     // XDocumentHandler
     void SAL_CALL startDocument() override;
     void SAL_CALL endDocument() override;
diff --git a/writerperfect/source/writer/exp/xmltext.cxx b/writerperfect/source/writer/exp/xmltext.cxx
new file mode 100644
index 000000000000..5560e7523a54
--- /dev/null
+++ b/writerperfect/source/writer/exp/xmltext.cxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "xmltext.hxx"
+
+#include "txtparai.hxx"
+
+using namespace com::sun::star;
+
+namespace writerperfect
+{
+namespace exp
+{
+
+XMLBodyContentContext::XMLBodyContentContext(XMLImport &rImport)
+    : XMLImportContext(rImport)
+{
+}
+
+XMLImportContext *XMLBodyContentContext::CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/)
+{
+    if (rName == "text:p" || rName == "text:h")
+        return new XMLParaContext(mrImport);
+    return nullptr;
+}
+
+} // namespace exp
+} // namespace writerperfect
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/writer/exp/xmltext.hxx b/writerperfect/source/writer/exp/xmltext.hxx
new file mode 100644
index 000000000000..aa82aeb00122
--- /dev/null
+++ b/writerperfect/source/writer/exp/xmltext.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLTEXT_HXX
+#define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EXP_XMLTEXT_HXX
+
+#include "xmlictxt.hxx"
+
+namespace writerperfect
+{
+namespace exp
+{
+
+/// Handler for <office:text>.
+class XMLBodyContentContext : public XMLImportContext
+{
+public:
+    XMLBodyContentContext(XMLImport &rImport);
+
+    XMLImportContext *CreateChildContext(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &/*xAttribs*/) override;
+};
+
+} // namespace exp
+} // namespace writerperfect
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 7d30d029f4f95eed91c814469d700445ed6b019b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Aug 11 09:13:41 2017 +0200

    sw: fix inconsistent param naming in interface/implementation
    
    SvxPostureItem& rWeight is confusing at best.
    
    Change-Id: I70a7e94151f49bf3539af77160cd4a68b8753464
    Reviewed-on: https://gerrit.libreoffice.org/41006
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx
index a745dc68bbd6..9183091f71f8 100644
--- a/sw/source/filter/ww8/docxsdrexport.hxx
+++ b/sw/source/filter/ww8/docxsdrexport.hxx
@@ -90,7 +90,7 @@ public:
     /// Writes a drawing as VML data.
     void writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat,const Point& rNdTopLeft);
     /// Writes a drawing as DML.
-    void writeDMLDrawing(const SdrObject* pSdrObj, const SwFrameFormat* pFrameFormat, int nAnchorId);
+    void writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFormat* pFrameFormat, int nAnchorId);
     /// Writes shape in both DML and VML format.
     void writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat,const Point& rNdTopLeft, int nAnchorId);
     /// Write <a:effectLst>, the effect list.
@@ -109,7 +109,7 @@ public:
     /// Writes text from Textbox for <w:framePr>
     void writeOnlyTextOfFrame(ww8::Frame* pParentFrame);
     /// Writes the drawingML <a:ln> markup of a box item.
-    void writeBoxItemLine(const SvxBoxItem& rBoxItem);
+    void writeBoxItemLine(const SvxBoxItem& rBox);
 };
 
 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXSDREXPORT_HXX
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 23885ec5e83e..6a421a182e3f 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2210,10 +2210,10 @@ void RtfAttributeOutput::CharCrossedOut(const SvxCrossedOutItem& rCrossedOut)
     }
 }
 
-void RtfAttributeOutput::CharEscapement(const SvxEscapementItem& rEsc)
+void RtfAttributeOutput::CharEscapement(const SvxEscapementItem& rEscapement)
 {
-    short nEsc = rEsc.GetEsc();
-    if (rEsc.GetProportionalHeight() == DFLT_ESC_PROP)
+    short nEsc = rEscapement.GetEsc();
+    if (rEscapement.GetProportionalHeight() == DFLT_ESC_PROP)
     {
         if (DFLT_ESC_SUB == nEsc || DFLT_ESC_AUTO_SUB == nEsc)
             m_aStyles.append(OOO_STRING_SVTOOLS_RTF_SUB);
@@ -2226,9 +2226,9 @@ void RtfAttributeOutput::CharEscapement(const SvxEscapementItem& rEsc)
 
     SwTwips nH = static_cast<const SvxFontHeightItem&>(m_rExport.GetItem(RES_CHRATR_FONTSIZE)).GetHeight();
 
-    if (0 < rEsc.GetEsc())
+    if (0 < rEscapement.GetEsc())
         pUpDn = OOO_STRING_SVTOOLS_RTF_UP;
-    else if (0 > rEsc.GetEsc())
+    else if (0 > rEscapement.GetEsc())
     {
         pUpDn = OOO_STRING_SVTOOLS_RTF_DN;
         nH = -nH;
@@ -2236,15 +2236,15 @@ void RtfAttributeOutput::CharEscapement(const SvxEscapementItem& rEsc)
     else
         return;
 
-    short nProp = rEsc.GetProportionalHeight() * 100;
+    short nProp = rEscapement.GetProportionalHeight() * 100;
     if (DFLT_ESC_AUTO_SUPER == nEsc)
     {
-        nEsc = 100 - rEsc.GetProportionalHeight();
+        nEsc = 100 - rEscapement.GetProportionalHeight();
         ++nProp;
     }
     else if (DFLT_ESC_AUTO_SUB == nEsc)
     {
-        nEsc = - 100 + rEsc.GetProportionalHeight();
+        nEsc = - 100 + rEscapement.GetProportionalHeight();
         ++nProp;
     }
 
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index 46d586c219ba..20f278a615a2 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -221,7 +221,7 @@ public:
 
 protected:
     /// Output frames - the implementation.
-    void OutputFlyFrame_Impl(const ww8::Frame& rFormat, const Point& rNdTopLeft) override;
+    void OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Point& rNdTopLeft) override;
 
     /// Sfx item Sfx item RES_CHRATR_CASEMAP
     void CharCaseMap(const SvxCaseMapItem& rCaseMap) override;
@@ -296,7 +296,7 @@ protected:
     void CharLanguageCTL(const SvxLanguageItem& rLanguageItem) override;
 
     /// Sfx item RES_CHRATR_CTL_POSTURE
-    void CharPostureCTL(const SvxPostureItem& rWeight) override;
+    void CharPostureCTL(const SvxPostureItem& rPosture) override;
 
     /// Sfx item RES_CHRATR_CTL_WEIGHT
     void CharWeightCTL(const SvxWeightItem& rWeight) override;
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index e83f11e584c4..5c810787f224 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -1372,11 +1372,11 @@ public:
     ErrCode WriteStream() override;
 };
 
-SwRTFWriter::SwRTFWriter(const OUString& rFltName, const OUString& rBaseURL)
+SwRTFWriter::SwRTFWriter(const OUString& rFilterName, const OUString& rBaseURL)
 {
     SetBaseURL(rBaseURL);
     // export outline nodes, only (send outline to clipboard/presentation)
-    m_bOutOutlineOnly = rFltName.startsWith("O");
+    m_bOutOutlineOnly = rFilterName.startsWith("O");
 }
 
 ErrCode SwRTFWriter::WriteStream()


More information about the Libreoffice-commits mailing list