[Libreoffice-commits] core.git: compilerplugins/clang writerfilter/source

Noel Grandin noel at peralex.com
Mon Nov 30 00:05:52 PST 2015


 compilerplugins/clang/mergeclasses.results            |    1 -
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |    4 ++--
 writerfilter/source/ooxml/OOXMLFastContextHandler.hxx |    4 ++--
 writerfilter/source/ooxml/OOXMLPropertySet.hxx        |   14 ++++++++++++--
 writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx    |   17 +++++++----------
 writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx    |   17 -----------------
 6 files changed, 23 insertions(+), 34 deletions(-)

New commits:
commit 25120e73f93fcd02b5157b3379c39f9cec0fa2eb
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Nov 27 11:16:17 2015 +0200

    loplugin:mergeclasses, OOXMLTableImpl into OOXMLTable
    
    Change-Id: I28f6d317ca02cf23341358f9520de273af603bd7

diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index eaf3caf..b47dcd7 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -397,7 +397,6 @@ merge writerfilter::ooxml::OOXMLFastContextHandlerLinear with writerfilter::ooxm
 merge writerfilter::ooxml::OOXMLProperty with writerfilter::ooxml::OOXMLPropertyImpl
 merge writerfilter::ooxml::OOXMLPropertySet with writerfilter::ooxml::OOXMLPropertySetImpl
 merge writerfilter::ooxml::OOXMLStream with writerfilter::ooxml::OOXMLStreamImpl
-merge writerfilter::ooxml::OOXMLTable with writerfilter::ooxml::OOXMLTableImpl
 merge writerfilter::rtftok::RTFDocument with writerfilter::rtftok::RTFDocumentImpl
 merge ww8::WW8Struct with ww8::WW8Sttb
 merge xforms::OXSDDataType with xforms::OValueLimitedType_Base
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index f808bc5..d790311 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -1089,7 +1089,7 @@ void OOXMLFastContextHandlerPropertyTable::lcl_endFastElement
     throw (uno::RuntimeException, xml::sax::SAXException, std::exception)
 {
     OOXMLPropertySet::Pointer_t pPropSet(mpPropertySet->clone());
-    OOXMLTableImpl::ValuePointer_t pTmpVal
+    OOXMLTable::ValuePointer_t pTmpVal
         (new OOXMLPropertySetValue(pPropSet));
 
     mTable.add(pTmpVal);
@@ -1218,7 +1218,7 @@ void OOXMLFastContextHandlerTable::addCurrentChild()
 
         if (pValue.get() != nullptr)
         {
-            OOXMLTableImpl::ValuePointer_t pTmpVal(pValue->clone());
+            OOXMLTable::ValuePointer_t pTmpVal(pValue->clone());
             mTable.add(pTmpVal);
         }
     }
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
index 2436bcc..57e46e6 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx
@@ -305,7 +305,7 @@ public:
     virtual ~OOXMLFastContextHandlerPropertyTable();
 
 protected:
-    OOXMLTableImpl mTable;
+    OOXMLTable mTable;
 
     virtual void lcl_endFastElement(Token_t Element)
         throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) override;
@@ -346,7 +346,7 @@ public:
         throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) override;
 
 protected:
-    OOXMLTableImpl mTable;
+    OOXMLTable mTable;
 
     css::uno::Reference<css::xml::sax::XFastContextHandler> mCurrentChild;
 
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
index f65ac48..39c68e2 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX
 
 #include <dmapper/resourcemodel.hxx>
+#include <vector>
 
 namespace writerfilter {
 namespace ooxml
@@ -59,14 +60,23 @@ public:
 #endif
 };
 
+class OOXMLValue;
+
 class OOXMLTable : public writerfilter::Reference<Table>
 {
 public:
+    typedef std::shared_ptr<OOXMLValue> ValuePointer_t;
+    OOXMLTable();
     virtual ~OOXMLTable();
 
-    virtual void resolve(Table & rTable) override = 0;
-    virtual OOXMLTable * clone() const = 0;
+    void resolve(Table & rTable);
+    void add(ValuePointer_t pPropertySet);
+    OOXMLTable * clone() const;
+private:
+    typedef std::vector<ValuePointer_t> PropertySets_t;
+    PropertySets_t mPropertySets;
 };
+
 }}
 
 #endif // INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
index b958834..8b879ec 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx
@@ -38,10 +38,6 @@ OOXMLPropertySet::~OOXMLPropertySet()
 {
 }
 
-OOXMLTable::~OOXMLTable()
-{
-}
-
 OOXMLPropertyImpl::OOXMLPropertyImpl(Id id, OOXMLValue::Pointer_t pValue,
                                      OOXMLPropertyImpl::Type_t eType)
 : mId(id), mpValue(pValue), meType(eType)
@@ -722,15 +718,16 @@ OOXMLValue * OOXMLStarMathValue::clone() const
   class OOXMLTableImpl
  */
 
-OOXMLTableImpl::OOXMLTableImpl()
+OOXMLTable::OOXMLTable()
 {
 }
 
-OOXMLTableImpl::~OOXMLTableImpl()
+OOXMLTable::~OOXMLTable()
 {
 }
 
-void OOXMLTableImpl::resolve(Table & rTable)
+
+void OOXMLTable::resolve(Table & rTable)
 {
     Table * pTable = &rTable;
 
@@ -752,15 +749,15 @@ void OOXMLTableImpl::resolve(Table & rTable)
     }
 }
 
-void OOXMLTableImpl::add(ValuePointer_t pPropertySet)
+void OOXMLTable::add(ValuePointer_t pPropertySet)
 {
     if (pPropertySet.get() != nullptr)
         mPropertySets.push_back(pPropertySet);
 }
 
-OOXMLTable * OOXMLTableImpl::clone() const
+OOXMLTable * OOXMLTable::clone() const
 {
-    return new OOXMLTableImpl(*this);
+    return new OOXMLTable(*this);
 }
 
 /*
diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
index 0efc3d9..498ee92 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx
@@ -271,23 +271,6 @@ public:
     virtual OOXMLValue * clone() const override;
 };
 
-class OOXMLTableImpl : public OOXMLTable
-{
-public:
-    typedef std::shared_ptr<OOXMLValue> ValuePointer_t;
-private:
-    typedef std::vector<ValuePointer_t> PropertySets_t;
-    PropertySets_t mPropertySets;
-
-public:
-    OOXMLTableImpl();
-    virtual ~OOXMLTableImpl();
-
-    virtual void resolve(Table & rTable) override;
-    void add(ValuePointer_t pPropertySet);
-    virtual OOXMLTable * clone() const override;
-};
-
 class OOXMLPropertySetEntryToString : public Properties
 {
     Id mnId;


More information about the Libreoffice-commits mailing list