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 ...@@ -394,7 +394,6 @@ merge writerfilter::Table with writerfilter::LoggedTable
merge writerfilter::dmapper::TableManager with writerfilter::dmapper::DomainMapperTableManager merge writerfilter::dmapper::TableManager with writerfilter::dmapper::DomainMapperTableManager
merge writerfilter::ooxml::OOXMLDocument with writerfilter::ooxml::OOXMLDocumentImpl merge writerfilter::ooxml::OOXMLDocument with writerfilter::ooxml::OOXMLDocumentImpl
merge writerfilter::ooxml::OOXMLFastContextHandlerLinear with writerfilter::ooxml::OOXMLFastContextHandlerMath 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::ooxml::OOXMLStream with writerfilter::ooxml::OOXMLStreamImpl
merge writerfilter::rtftok::RTFDocument with writerfilter::rtftok::RTFDocumentImpl merge writerfilter::rtftok::RTFDocument with writerfilter::rtftok::RTFDocumentImpl
merge ww8::WW8Struct with ww8::WW8Sttb merge ww8::WW8Struct with ww8::WW8Sttb
......
...@@ -24,7 +24,7 @@ class OOXMLPropertySetPrinter(object): ...@@ -24,7 +24,7 @@ class OOXMLPropertySetPrinter(object):
return children.__iter__() return children.__iter__()
class OOXMLPropertyPrinter(object): class OOXMLPropertyPrinter(object):
'''Prints writerfilter::ooxml::OOXMLPropertyImpl''' '''Prints writerfilter::ooxml::OOXMLProperty'''
def __init__(self, typename, value): def __init__(self, typename, value):
self.typename = typename self.typename = typename
...@@ -73,7 +73,7 @@ def build_pretty_printers(): ...@@ -73,7 +73,7 @@ def build_pretty_printers():
global printer global printer
printer = printing.Printer("libreoffice/writerfilter") 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::OOXMLPropertySet', OOXMLPropertySetPrinter)
printer.add('writerfilter::ooxml::OOXMLPropertySetValue', OOXMLPropertySetValuePrinter) printer.add('writerfilter::ooxml::OOXMLPropertySetValue', OOXMLPropertySetValuePrinter)
printer.add('writerfilter::ooxml::OOXMLStringValue', OOXMLStringValuePrinter) printer.add('writerfilter::ooxml::OOXMLStringValue', OOXMLStringValuePrinter)
......
...@@ -353,8 +353,8 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet ...@@ -353,8 +353,8 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet
OOXMLValue::Pointer_t pPayloadValue(new OOXMLBinaryValue(pPicture)); OOXMLValue::Pointer_t pPayloadValue(new OOXMLBinaryValue(pPicture));
OOXMLProperty::Pointer_t pPayloadProperty OOXMLProperty::Pointer_t pPayloadProperty
(new OOXMLPropertyImpl(NS_ooxml::LN_payload, pPayloadValue, (new OOXMLProperty(NS_ooxml::LN_payload, pPayloadValue,
OOXMLPropertyImpl::ATTRIBUTE)); OOXMLProperty::ATTRIBUTE));
OOXMLPropertySet::Pointer_t pBlipSet(new OOXMLPropertySet); OOXMLPropertySet::Pointer_t pBlipSet(new OOXMLPropertySet);
...@@ -363,8 +363,8 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet ...@@ -363,8 +363,8 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet
OOXMLValue::Pointer_t pBlipValue(new OOXMLPropertySetValue(pBlipSet)); OOXMLValue::Pointer_t pBlipValue(new OOXMLPropertySetValue(pBlipSet));
OOXMLProperty::Pointer_t pBlipProperty OOXMLProperty::Pointer_t pBlipProperty
(new OOXMLPropertyImpl(NS_ooxml::LN_blip, pBlipValue, (new OOXMLProperty(NS_ooxml::LN_blip, pBlipValue,
OOXMLPropertyImpl::ATTRIBUTE)); OOXMLProperty::ATTRIBUTE));
OOXMLPropertySet * pProps = new OOXMLPropertySet; OOXMLPropertySet * pProps = new OOXMLPropertySet;
......
...@@ -335,13 +335,13 @@ void OOXMLFastContextHandler::sendTableDepth() const ...@@ -335,13 +335,13 @@ void OOXMLFastContextHandler::sendTableDepth() const
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(NS_ooxml::LN_tblDepth, pVal, OOXMLPropertyImpl::SPRM)); (new OOXMLProperty(NS_ooxml::LN_tblDepth, pVal, OOXMLProperty::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(NS_ooxml::LN_inTbl, pVal, OOXMLPropertyImpl::SPRM)); (new OOXMLProperty(NS_ooxml::LN_inTbl, pVal, OOXMLProperty::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
...@@ -420,7 +420,7 @@ void OOXMLFastContextHandler::startSdt() ...@@ -420,7 +420,7 @@ void OOXMLFastContextHandler::startSdt()
{ {
OOXMLPropertySet * pProps = new OOXMLPropertySet; OOXMLPropertySet * pProps = new OOXMLPropertySet;
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1);
OOXMLProperty::Pointer_t pProp(new OOXMLPropertyImpl(NS_ooxml::LN_CT_SdtBlock_sdtContent, pVal, OOXMLPropertyImpl::ATTRIBUTE)); OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_CT_SdtBlock_sdtContent, pVal, OOXMLProperty::ATTRIBUTE));
pProps->add(pProp); pProps->add(pProp);
mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps)); mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps));
} }
...@@ -429,7 +429,7 @@ void OOXMLFastContextHandler::endSdt() ...@@ -429,7 +429,7 @@ void OOXMLFastContextHandler::endSdt()
{ {
OOXMLPropertySet * pProps = new OOXMLPropertySet; OOXMLPropertySet * pProps = new OOXMLPropertySet;
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1);
OOXMLProperty::Pointer_t pProp(new OOXMLPropertyImpl(NS_ooxml::LN_CT_SdtBlock_sdtEndContent, pVal, OOXMLPropertyImpl::ATTRIBUTE)); OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_CT_SdtBlock_sdtEndContent, pVal, OOXMLProperty::ATTRIBUTE));
pProps->add(pProp); pProps->add(pProp);
mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps)); mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps));
} }
...@@ -656,8 +656,7 @@ void OOXMLFastContextHandler::propagateCharacterPropertiesAsSet(const Id & rId) ...@@ -656,8 +656,7 @@ void OOXMLFastContextHandler::propagateCharacterPropertiesAsSet(const Id & rId)
OOXMLValue::Pointer_t pValue(new OOXMLPropertySetValue(getPropertySet())); OOXMLValue::Pointer_t pValue(new OOXMLPropertySetValue(getPropertySet()));
OOXMLPropertySet::Pointer_t pPropertySet(new OOXMLPropertySet); OOXMLPropertySet::Pointer_t pPropertySet(new OOXMLPropertySet);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp(new OOXMLProperty(rId, pValue, OOXMLProperty::SPRM));
(new OOXMLPropertyImpl(rId, pValue, OOXMLPropertyImpl::SPRM));
pPropertySet->add(pProp); pPropertySet->add(pProp);
mpParserState->setCharacterProperties(pPropertySet); mpParserState->setCharacterProperties(pPropertySet);
...@@ -706,8 +705,7 @@ void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId) ...@@ -706,8 +705,7 @@ void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId)
OOXMLValue::Pointer_t pValue(new OOXMLPropertySetValue(getPropertySet())); OOXMLValue::Pointer_t pValue(new OOXMLPropertySetValue(getPropertySet()));
OOXMLPropertySet::Pointer_t pPropertySet(new OOXMLPropertySet); OOXMLPropertySet::Pointer_t pPropertySet(new OOXMLPropertySet);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp(new OOXMLProperty(rId, pValue, OOXMLProperty::SPRM));
(new OOXMLPropertyImpl(rId, pValue, OOXMLPropertyImpl::SPRM));
pPropertySet->add(pProp); pPropertySet->add(pProp);
mpStream->props(pPropertySet); mpStream->props(pPropertySet);
...@@ -834,9 +832,7 @@ void OOXMLFastContextHandler::sendPropertyToParent() ...@@ -834,9 +832,7 @@ void OOXMLFastContextHandler::sendPropertyToParent()
if (pProps.get() != nullptr) if (pProps.get() != nullptr)
{ {
OOXMLProperty::Pointer_t OOXMLProperty::Pointer_t pProp(new OOXMLProperty(mId, getValue(), OOXMLProperty::SPRM));
pProp(new OOXMLPropertyImpl(mId, getValue(),
OOXMLPropertyImpl::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
} }
...@@ -857,8 +853,7 @@ void OOXMLFastContextHandler::sendPropertiesToParent() ...@@ -857,8 +853,7 @@ void OOXMLFastContextHandler::sendPropertiesToParent()
OOXMLValue::Pointer_t pValue OOXMLValue::Pointer_t pValue
(new OOXMLPropertySetValue(getPropertySet())); (new OOXMLPropertySetValue(getPropertySet()));
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp(new OOXMLProperty(getId(), pValue, OOXMLProperty::SPRM));
(new OOXMLPropertyImpl(getId(), pValue, OOXMLPropertyImpl::SPRM));
pParentProps->add(pProp); pParentProps->add(pProp);
...@@ -889,8 +884,7 @@ void OOXMLFastContextHandlerStream::newProperty(const Id & rId, ...@@ -889,8 +884,7 @@ void OOXMLFastContextHandlerStream::newProperty(const Id & rId,
{ {
if (rId != 0x0) if (rId != 0x0)
{ {
OOXMLPropertyImpl::Pointer_t pProperty OOXMLProperty::Pointer_t pProperty(new OOXMLProperty(rId, pVal, OOXMLProperty::ATTRIBUTE));
(new OOXMLPropertyImpl(rId, pVal, OOXMLPropertyImpl::ATTRIBUTE));
mpPropertySetAttrs->add(pProperty); mpPropertySetAttrs->add(pProperty);
} }
...@@ -964,8 +958,7 @@ void OOXMLFastContextHandlerProperties::newProperty ...@@ -964,8 +958,7 @@ void OOXMLFastContextHandlerProperties::newProperty
{ {
if (rId != 0x0) if (rId != 0x0)
{ {
OOXMLPropertyImpl::Pointer_t pProperty OOXMLProperty::Pointer_t pProperty(new OOXMLProperty(rId, pVal, OOXMLProperty::ATTRIBUTE));
(new OOXMLPropertyImpl(rId, pVal, OOXMLPropertyImpl::ATTRIBUTE));
mpPropertySet->add(pProperty); mpPropertySet->add(pProperty);
} }
...@@ -1303,20 +1296,17 @@ void OOXMLFastContextHandlerTextTableCell::endCell() ...@@ -1303,20 +1296,17 @@ void OOXMLFastContextHandlerTextTableCell::endCell()
OOXMLPropertySet * pProps = new OOXMLPropertySet; OOXMLPropertySet * pProps = new OOXMLPropertySet;
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_tblDepth, pVal, OOXMLProperty::SPRM));
(new OOXMLPropertyImpl(NS_ooxml::LN_tblDepth, pVal, OOXMLPropertyImpl::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_inTbl, pVal, OOXMLProperty::SPRM));
(new OOXMLPropertyImpl(NS_ooxml::LN_inTbl, pVal, OOXMLPropertyImpl::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
{ {
OOXMLValue::Pointer_t pVal = OOXMLBooleanValue::Create(mnTableDepth > 0); OOXMLValue::Pointer_t pVal = OOXMLBooleanValue::Create(mnTableDepth > 0);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_tblCell, pVal, OOXMLProperty::SPRM));
(new OOXMLPropertyImpl(NS_ooxml::LN_tblCell, pVal, OOXMLPropertyImpl::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
...@@ -1351,20 +1341,17 @@ void OOXMLFastContextHandlerTextTableRow::endRow() ...@@ -1351,20 +1341,17 @@ void OOXMLFastContextHandlerTextTableRow::endRow()
OOXMLPropertySet * pProps = new OOXMLPropertySet; OOXMLPropertySet * pProps = new OOXMLPropertySet;
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_tblDepth, pVal, OOXMLProperty::SPRM));
(new OOXMLPropertyImpl(NS_ooxml::LN_tblDepth, pVal, OOXMLPropertyImpl::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_inTbl, pVal, OOXMLProperty::SPRM));
(new OOXMLPropertyImpl(NS_ooxml::LN_inTbl, pVal, OOXMLPropertyImpl::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp(new OOXMLProperty(NS_ooxml::LN_tblRow, pVal, OOXMLProperty::SPRM));
(new OOXMLPropertyImpl(NS_ooxml::LN_tblRow, pVal, OOXMLPropertyImpl::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
...@@ -1398,19 +1385,19 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_ ...@@ -1398,19 +1385,19 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(NS_ooxml::LN_tblDepth, pVal, OOXMLPropertyImpl::SPRM)); (new OOXMLProperty(NS_ooxml::LN_tblDepth, pVal, OOXMLProperty::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(1);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(NS_ooxml::LN_inTbl, pVal, OOXMLPropertyImpl::SPRM)); (new OOXMLProperty(NS_ooxml::LN_inTbl, pVal, OOXMLProperty::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
{ {
OOXMLValue::Pointer_t pVal = OOXMLBooleanValue::Create(mnTableDepth > 0); OOXMLValue::Pointer_t pVal = OOXMLBooleanValue::Create(mnTableDepth > 0);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(NS_ooxml::LN_tblCell, pVal, OOXMLPropertyImpl::SPRM)); (new OOXMLProperty(NS_ooxml::LN_tblCell, pVal, OOXMLProperty::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
...@@ -1426,7 +1413,7 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_ ...@@ -1426,7 +1413,7 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_
pBorderProps->add( fakeNoBorder( borders[ j ] )); pBorderProps->add( fakeNoBorder( borders[ j ] ));
OOXMLValue::Pointer_t pValue( new OOXMLPropertySetValue( pBorderProps )); OOXMLValue::Pointer_t pValue( new OOXMLPropertySetValue( pBorderProps ));
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(NS_ooxml::LN_CT_TcPrBase_tcBorders, pValue, OOXMLPropertyImpl::SPRM)); (new OOXMLProperty(NS_ooxml::LN_CT_TcPrBase_tcBorders, pValue, OOXMLProperty::SPRM));
pCellProps->add(pProp); pCellProps->add(pProp);
mpParserState->setCellProperties(pCellProps); mpParserState->setCellProperties(pCellProps);
} }
...@@ -1442,11 +1429,11 @@ OOXMLProperty::Pointer_t OOXMLFastContextHandlerTextTableRow::fakeNoBorder( Id i ...@@ -1442,11 +1429,11 @@ OOXMLProperty::Pointer_t OOXMLFastContextHandlerTextTableRow::fakeNoBorder( Id i
OOXMLPropertySet::Pointer_t pProps( new OOXMLPropertySet ); OOXMLPropertySet::Pointer_t pProps( new OOXMLPropertySet );
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(0); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(0);
OOXMLProperty::Pointer_t pPropVal OOXMLProperty::Pointer_t pPropVal
(new OOXMLPropertyImpl(NS_ooxml::LN_CT_Border_val, pVal, OOXMLPropertyImpl::ATTRIBUTE)); (new OOXMLProperty(NS_ooxml::LN_CT_Border_val, pVal, OOXMLProperty::ATTRIBUTE));
pProps->add(pPropVal); pProps->add(pPropVal);
OOXMLValue::Pointer_t pValue( new OOXMLPropertySetValue( pProps )); OOXMLValue::Pointer_t pValue( new OOXMLPropertySetValue( pProps ));
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(id, pValue, OOXMLPropertyImpl::SPRM)); (new OOXMLProperty(id, pValue, OOXMLProperty::SPRM));
return pProp; return pProp;
} }
...@@ -1477,7 +1464,7 @@ void OOXMLFastContextHandlerTextTable::lcl_startFastElement ...@@ -1477,7 +1464,7 @@ void OOXMLFastContextHandlerTextTable::lcl_startFastElement
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(NS_ooxml::LN_tblStart, pVal, OOXMLPropertyImpl::SPRM)); (new OOXMLProperty(NS_ooxml::LN_tblStart, pVal, OOXMLProperty::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
mpParserState->setCharacterProperties(pProps); mpParserState->setCharacterProperties(pProps);
...@@ -1495,7 +1482,7 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement ...@@ -1495,7 +1482,7 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement
{ {
OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth); OOXMLValue::Pointer_t pVal = OOXMLIntegerValue::Create(mnTableDepth);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(NS_ooxml::LN_tblEnd, pVal, OOXMLPropertyImpl::SPRM)); (new OOXMLProperty(NS_ooxml::LN_tblEnd, pVal, OOXMLProperty::SPRM));
pProps->add(pProp); pProps->add(pProp);
} }
mpParserState->setCharacterProperties(pProps); mpParserState->setCharacterProperties(pProps);
...@@ -2036,7 +2023,7 @@ void OOXMLFastContextHandlerMath::process() ...@@ -2036,7 +2023,7 @@ void OOXMLFastContextHandlerMath::process()
{ {
OOXMLPropertySet * pProps = new OOXMLPropertySet; OOXMLPropertySet * pProps = new OOXMLPropertySet;
OOXMLValue::Pointer_t pVal( new OOXMLStarMathValue( ref )); OOXMLValue::Pointer_t pVal( new OOXMLStarMathValue( ref ));
OOXMLProperty::Pointer_t pProp( new OOXMLPropertyImpl( NS_ooxml::LN_starmath, pVal, OOXMLPropertyImpl::ATTRIBUTE )); OOXMLProperty::Pointer_t pProp( new OOXMLProperty( NS_ooxml::LN_starmath, pVal, OOXMLProperty::ATTRIBUTE ));
pProps->add( pProp ); pProps->add( pProp );
mpStream->props( writerfilter::Reference< Properties >::Pointer_t( pProps )); mpStream->props( writerfilter::Reference< Properties >::Pointer_t( pProps ));
} }
......
...@@ -30,31 +30,27 @@ namespace ooxml ...@@ -30,31 +30,27 @@ namespace ooxml
using namespace ::std; using namespace ::std;
using namespace com::sun::star; using namespace com::sun::star;
OOXMLProperty::~OOXMLProperty() OOXMLProperty::OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue,
{ OOXMLProperty::Type_t eType)
}
OOXMLPropertyImpl::OOXMLPropertyImpl(Id id, OOXMLValue::Pointer_t pValue,
OOXMLPropertyImpl::Type_t eType)
: mId(id), mpValue(pValue), meType(eType) : mId(id), mpValue(pValue), meType(eType)
{ {
} }
OOXMLPropertyImpl::OOXMLPropertyImpl(const OOXMLPropertyImpl & rSprm) OOXMLProperty::OOXMLProperty(const OOXMLProperty & rSprm)
: OOXMLProperty(), mId(rSprm.mId), mpValue(rSprm.mpValue), meType(rSprm.meType) : 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; return mId;
} }
Value::Pointer_t OOXMLPropertyImpl::getValue() Value::Pointer_t OOXMLProperty::getValue()
{ {
Value::Pointer_t pResult; Value::Pointer_t pResult;
...@@ -66,7 +62,7 @@ Value::Pointer_t OOXMLPropertyImpl::getValue() ...@@ -66,7 +62,7 @@ Value::Pointer_t OOXMLPropertyImpl::getValue()
return pResult; return pResult;
} }
writerfilter::Reference<Properties>::Pointer_t OOXMLPropertyImpl::getProps() writerfilter::Reference<Properties>::Pointer_t OOXMLProperty::getProps()
{ {
writerfilter::Reference<Properties>::Pointer_t pResult; writerfilter::Reference<Properties>::Pointer_t pResult;
...@@ -77,7 +73,7 @@ writerfilter::Reference<Properties>::Pointer_t OOXMLPropertyImpl::getProps() ...@@ -77,7 +73,7 @@ writerfilter::Reference<Properties>::Pointer_t OOXMLPropertyImpl::getProps()
} }
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
string OOXMLPropertyImpl::getName() const string OOXMLProperty::getName() const
{ {
string sResult; string sResult;
...@@ -99,7 +95,7 @@ string OOXMLPropertyImpl::getName() const ...@@ -99,7 +95,7 @@ string OOXMLPropertyImpl::getName() const
#endif #endif
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
string OOXMLPropertyImpl::toString() const string OOXMLProperty::toString() const
{ {
string sResult = "("; string sResult = "(";
...@@ -115,7 +111,7 @@ string OOXMLPropertyImpl::toString() const ...@@ -115,7 +111,7 @@ string OOXMLPropertyImpl::toString() const
} }
#endif #endif
void OOXMLPropertyImpl::resolve(writerfilter::Properties & rProperties) void OOXMLProperty::resolve(writerfilter::Properties & rProperties)
{ {
writerfilter::Properties * pProperties = nullptr; writerfilter::Properties * pProperties = nullptr;
pProperties = &rProperties; pProperties = &rProperties;
......
...@@ -28,23 +28,6 @@ namespace writerfilter { ...@@ -28,23 +28,6 @@ namespace writerfilter {
namespace ooxml 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 class OOXMLValue : public Value
{ {
public: public:
...@@ -64,9 +47,10 @@ public: ...@@ -64,9 +47,10 @@ public:
virtual OOXMLValue * clone() const; virtual OOXMLValue * clone() const;
}; };
class OOXMLPropertyImpl : public OOXMLProperty class OOXMLProperty : public Sprm
{ {
public: public:
typedef std::shared_ptr<OOXMLProperty> Pointer_t;
enum Type_t { SPRM, ATTRIBUTE }; enum Type_t { SPRM, ATTRIBUTE };
private: private:
Id mId; Id mId;
...@@ -74,20 +58,18 @@ private: ...@@ -74,20 +58,18 @@ private:
Type_t meType; Type_t meType;
public: public:
typedef std::shared_ptr<OOXMLProperty> Pointer_t; OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue, Type_t eType);
OOXMLProperty(const OOXMLProperty & rSprm);
OOXMLPropertyImpl(Id id, OOXMLValue::Pointer_t pValue, Type_t eType); virtual ~OOXMLProperty();
OOXMLPropertyImpl(const OOXMLPropertyImpl & rSprm);
virtual ~OOXMLPropertyImpl();
virtual sal_uInt32 getId() const override; sal_uInt32 getId() const;
virtual Value::Pointer_t getValue() override; Value::Pointer_t getValue();
virtual writerfilter::Reference<Properties>::Pointer_t getProps() override; writerfilter::Reference<Properties>::Pointer_t getProps();
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
virtual std::string getName() const override; std::string getName() const;
virtual std::string toString() const override; std::string toString() const;
#endif #endif
virtual void resolve(Properties & rProperties) override; void resolve(Properties & rProperties);
}; };
class OOXMLBinaryValue : public OOXMLValue 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