Kaydet (Commit) 7e1bb64f authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:mergeclasses OOXMLPropertyImpl into OOXMLProperty

Change-Id: I1447cfc76c529332450c90a21b6525d3103fe852
üst 9f0f30fa
......@@ -394,7 +394,6 @@ merge writerfilter::Table with writerfilter::LoggedTable
merge writerfilter::dmapper::TableManager with writerfilter::dmapper::DomainMapperTableManager
merge writerfilter::ooxml::OOXMLDocument with writerfilter::ooxml::OOXMLDocumentImpl
merge writerfilter::ooxml::OOXMLFastContextHandlerLinear with writerfilter::ooxml::OOXMLFastContextHandlerMath
merge writerfilter::ooxml::OOXMLProperty with writerfilter::ooxml::OOXMLPropertyImpl
merge writerfilter::ooxml::OOXMLStream with writerfilter::ooxml::OOXMLStreamImpl
merge writerfilter::rtftok::RTFDocument with writerfilter::rtftok::RTFDocumentImpl
merge ww8::WW8Struct with ww8::WW8Sttb
......
......@@ -24,7 +24,7 @@ class OOXMLPropertySetPrinter(object):
return children.__iter__()
class OOXMLPropertyPrinter(object):
'''Prints writerfilter::ooxml::OOXMLPropertyImpl'''
'''Prints writerfilter::ooxml::OOXMLProperty'''
def __init__(self, typename, value):
self.typename = typename
......@@ -73,7 +73,7 @@ def build_pretty_printers():
global printer
printer = printing.Printer("libreoffice/writerfilter")
printer.add('writerfilter::ooxml::OOXMLPropertyImpl', OOXMLPropertyPrinter)
printer.add('writerfilter::ooxml::OOXMLProperty', OOXMLPropertyPrinter)
printer.add('writerfilter::ooxml::OOXMLPropertySet', OOXMLPropertySetPrinter)
printer.add('writerfilter::ooxml::OOXMLPropertySetValue', OOXMLPropertySetValuePrinter)
printer.add('writerfilter::ooxml::OOXMLStringValue', OOXMLStringValuePrinter)
......
......@@ -353,8 +353,8 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet
OOXMLValue::Pointer_t pPayloadValue(new OOXMLBinaryValue(pPicture));
OOXMLProperty::Pointer_t pPayloadProperty
(new OOXMLPropertyImpl(NS_ooxml::LN_payload, pPayloadValue,
OOXMLPropertyImpl::ATTRIBUTE));
(new OOXMLProperty(NS_ooxml::LN_payload, pPayloadValue,
OOXMLProperty::ATTRIBUTE));
OOXMLPropertySet::Pointer_t pBlipSet(new OOXMLPropertySet);
......@@ -363,8 +363,8 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet
OOXMLValue::Pointer_t pBlipValue(new OOXMLPropertySetValue(pBlipSet));
OOXMLProperty::Pointer_t pBlipProperty
(new OOXMLPropertyImpl(NS_ooxml::LN_blip, pBlipValue,
OOXMLPropertyImpl::ATTRIBUTE));
(new OOXMLProperty(NS_ooxml::LN_blip, pBlipValue,
OOXMLProperty::ATTRIBUTE));
OOXMLPropertySet * pProps = new OOXMLPropertySet;
......
......@@ -30,31 +30,27 @@ namespace ooxml
using namespace ::std;
using namespace com::sun::star;
OOXMLProperty::~OOXMLProperty()
{
}
OOXMLPropertyImpl::OOXMLPropertyImpl(Id id, OOXMLValue::Pointer_t pValue,
OOXMLPropertyImpl::Type_t eType)
OOXMLProperty::OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue,
OOXMLProperty::Type_t eType)
: mId(id), mpValue(pValue), meType(eType)
{
}
OOXMLPropertyImpl::OOXMLPropertyImpl(const OOXMLPropertyImpl & rSprm)
: OOXMLProperty(), mId(rSprm.mId), mpValue(rSprm.mpValue), meType(rSprm.meType)
OOXMLProperty::OOXMLProperty(const OOXMLProperty & rSprm)
: mId(rSprm.mId), mpValue(rSprm.mpValue), meType(rSprm.meType)
{
}
OOXMLPropertyImpl::~OOXMLPropertyImpl()
OOXMLProperty::~OOXMLProperty()
{
}
sal_uInt32 OOXMLPropertyImpl::getId() const
sal_uInt32 OOXMLProperty::getId() const
{
return mId;
}
Value::Pointer_t OOXMLPropertyImpl::getValue()
Value::Pointer_t OOXMLProperty::getValue()
{
Value::Pointer_t pResult;
......@@ -66,7 +62,7 @@ Value::Pointer_t OOXMLPropertyImpl::getValue()
return pResult;
}
writerfilter::Reference<Properties>::Pointer_t OOXMLPropertyImpl::getProps()
writerfilter::Reference<Properties>::Pointer_t OOXMLProperty::getProps()
{
writerfilter::Reference<Properties>::Pointer_t pResult;
......@@ -77,7 +73,7 @@ writerfilter::Reference<Properties>::Pointer_t OOXMLPropertyImpl::getProps()
}
#ifdef DEBUG_WRITERFILTER
string OOXMLPropertyImpl::getName() const
string OOXMLProperty::getName() const
{
string sResult;
......@@ -99,7 +95,7 @@ string OOXMLPropertyImpl::getName() const
#endif
#ifdef DEBUG_WRITERFILTER
string OOXMLPropertyImpl::toString() const
string OOXMLProperty::toString() const
{
string sResult = "(";
......@@ -115,7 +111,7 @@ string OOXMLPropertyImpl::toString() const
}
#endif
void OOXMLPropertyImpl::resolve(writerfilter::Properties & rProperties)
void OOXMLProperty::resolve(writerfilter::Properties & rProperties)
{
writerfilter::Properties * pProperties = nullptr;
pProperties = &rProperties;
......
......@@ -28,23 +28,6 @@ namespace writerfilter {
namespace ooxml
{
class OOXMLProperty : public Sprm
{
public:
typedef std::shared_ptr<OOXMLProperty> Pointer_t;
virtual ~OOXMLProperty();
virtual sal_uInt32 getId() const override = 0;
virtual Value::Pointer_t getValue() override = 0;
virtual writerfilter::Reference<Properties>::Pointer_t getProps() override = 0;
#ifdef DEBUG_WRITERFILTER
virtual std::string getName() const override = 0;
virtual std::string toString() const override = 0;
#endif
virtual void resolve(Properties & rProperties) = 0;
};
class OOXMLValue : public Value
{
public:
......@@ -64,9 +47,10 @@ public:
virtual OOXMLValue * clone() const;
};
class OOXMLPropertyImpl : public OOXMLProperty
class OOXMLProperty : public Sprm
{
public:
typedef std::shared_ptr<OOXMLProperty> Pointer_t;
enum Type_t { SPRM, ATTRIBUTE };
private:
Id mId;
......@@ -74,20 +58,18 @@ private:
Type_t meType;
public:
typedef std::shared_ptr<OOXMLProperty> Pointer_t;
OOXMLPropertyImpl(Id id, OOXMLValue::Pointer_t pValue, Type_t eType);
OOXMLPropertyImpl(const OOXMLPropertyImpl & rSprm);
virtual ~OOXMLPropertyImpl();
OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue, Type_t eType);
OOXMLProperty(const OOXMLProperty & rSprm);
virtual ~OOXMLProperty();
virtual sal_uInt32 getId() const override;
virtual Value::Pointer_t getValue() override;
virtual writerfilter::Reference<Properties>::Pointer_t getProps() override;
sal_uInt32 getId() const;
Value::Pointer_t getValue();
writerfilter::Reference<Properties>::Pointer_t getProps();
#ifdef DEBUG_WRITERFILTER
virtual std::string getName() const override;
virtual std::string toString() const override;
std::string getName() const;
std::string toString() const;
#endif
virtual void resolve(Properties & rProperties) override;
void resolve(Properties & rProperties);
};
class OOXMLBinaryValue : public OOXMLValue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment