diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-27 11:16:17 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-30 10:04:03 +0200 |
commit | 25120e73f93fcd02b5157b3379c39f9cec0fa2eb (patch) | |
tree | a78855d10e9af1fc738877de2346c002d683bcf6 | |
parent | fbad13e4c0d66e5a0e65cbd2f1c5ae88bc02f2ba (diff) |
loplugin:mergeclasses, OOXMLTableImpl into OOXMLTable
Change-Id: I28f6d317ca02cf23341358f9520de273af603bd7
-rw-r--r-- | compilerplugins/clang/mergeclasses.results | 1 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 4 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.hxx | 4 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySet.hxx | 14 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx | 17 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx | 17 |
6 files changed, 23 insertions, 34 deletions
diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results index eaf3caf258dd..b47dcd78ca27 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 f808bc55ee0e..d790311b6b69 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 2436bccca065..57e46e6226d7 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 f65ac4875b03..39c68e2f1150 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 b95883485544..8b879ec7f34c 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 0efc3d96ccf0..498ee9209e07 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; |