include/tools/XmlWriter.hxx    |    7 +++++--
 tools/source/xml/XmlWriter.cxx |   13 -------------
 2 files changed, 5 insertions(+), 15 deletions(-)

New commits:
commit 96f62b48b4425f0bc2b6d8497782694078d968fc
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Apr 15 08:19:25 2024 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed Apr 17 06:40:40 2024 +0200

    Simplify a bit
    
    Change-Id: Iadfa442f762aa3caf3a8de7f3633be4e73bfd91a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166091
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/include/tools/XmlWriter.hxx b/include/tools/XmlWriter.hxx
index 03cc151b2624..9c8f82a86f42 100644
--- a/include/tools/XmlWriter.hxx
+++ b/include/tools/XmlWriter.hxx
@@ -48,12 +48,15 @@ public:
     void endDocument();
 
     void startElement(const char* sName);
-    void startElement(const OString& sName);
+    void startElement(const OString& sName) { startElement(sName.getStr()); }
     void startElement(const OString& sPrefix, const OString& sName, const 
OString& sNamespaceUri);
     void endElement();
 
     void attribute(const char* sTagName, const OString& aValue);
-    void attribute(const OString& sTagName, const OString& aValue);
+    void attribute(const OString& sTagName, const OString& aValue)
+    {
+        attribute(sTagName.getStr(), aValue);
+    }
     void attribute(const char* sTagName, std::u16string_view aValue);
     void attribute(const char* sTagName, sal_Int64 aNumber);
     template <typename T>
diff --git a/tools/source/xml/XmlWriter.cxx b/tools/source/xml/XmlWriter.cxx
index f49c312bd133..8bbd7951a3b8 100644
--- a/tools/source/xml/XmlWriter.cxx
+++ b/tools/source/xml/XmlWriter.cxx
@@ -99,12 +99,6 @@ void XmlWriter::startElement(const char* pName)
     (void)xmlTextWriterStartElement(mpImpl->mpWriter, xmlName);
 }
 
-void XmlWriter::startElement(const OString& rName)
-{
-    xmlChar* xmlName = BAD_CAST(rName.getStr());
-    (void)xmlTextWriterStartElement(mpImpl->mpWriter, xmlName);
-}
-
 void XmlWriter::endElement() { 
(void)xmlTextWriterEndElement(mpImpl->mpWriter); }
 
 void XmlWriter::attributeBase64(const char* pName, std::vector<sal_uInt8> 
const& rValueInBytes)
@@ -128,13 +122,6 @@ void XmlWriter::attribute(const char* name, const OString& 
value)
     (void)xmlTextWriterWriteAttribute(mpImpl->mpWriter, xmlName, xmlValue);
 }
 
-void XmlWriter::attribute(const OString& name, const OString& value)
-{
-    xmlChar* xmlName = BAD_CAST(name.getStr());
-    xmlChar* xmlValue = BAD_CAST(value.getStr());
-    (void)xmlTextWriterWriteAttribute(mpImpl->mpWriter, xmlName, xmlValue);
-}
-
 void XmlWriter::attribute(const char* name, std::u16string_view value)
 {
     attribute(name, OUStringToOString(value, RTL_TEXTENCODING_UTF8));

Reply via email to