Kaydet (Commit) 9f0f30fa authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:mergeclasses, merge OOXMLPropertyImpl into OOXMLProperty

Change-Id: I73eb7e664c0a53f135c06c3d8ea450bd9493c780
üst 958b9a7f
...@@ -395,7 +395,6 @@ merge writerfilter::dmapper::TableManager with writerfilter::dmapper::DomainMapp ...@@ -395,7 +395,6 @@ merge writerfilter::dmapper::TableManager with writerfilter::dmapper::DomainMapp
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::OOXMLProperty with writerfilter::ooxml::OOXMLPropertyImpl
merge writerfilter::ooxml::OOXMLPropertySet with writerfilter::ooxml::OOXMLPropertySetImpl
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
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
from libreoffice.util import printing from libreoffice.util import printing
class OOXMLPropertySetPrinter(object): class OOXMLPropertySetPrinter(object):
'''Prints writerfilter::ooxml::OOXMLPropertySetImpl''' '''Prints writerfilter::ooxml::OOXMLPropertySet'''
def __init__(self, typename, value): def __init__(self, typename, value):
self.typename = typename self.typename = typename
...@@ -74,7 +74,7 @@ def build_pretty_printers(): ...@@ -74,7 +74,7 @@ def build_pretty_printers():
printer = printing.Printer("libreoffice/writerfilter") printer = printing.Printer("libreoffice/writerfilter")
printer.add('writerfilter::ooxml::OOXMLPropertyImpl', OOXMLPropertyPrinter) printer.add('writerfilter::ooxml::OOXMLPropertyImpl', OOXMLPropertyPrinter)
printer.add('writerfilter::ooxml::OOXMLPropertySetImpl', 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)
printer.add('writerfilter::ooxml::OOXMLIntegerValue', OOXMLIntegerValuePrinter) printer.add('writerfilter::ooxml::OOXMLIntegerValue', OOXMLIntegerValuePrinter)
......
...@@ -123,7 +123,7 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\ ...@@ -123,7 +123,7 @@ $(eval $(call gb_Library_add_exception_objects,writerfilter,\
writerfilter/source/ooxml/OOXMLFastContextHandler \ writerfilter/source/ooxml/OOXMLFastContextHandler \
writerfilter/source/ooxml/OOXMLFastDocumentHandler \ writerfilter/source/ooxml/OOXMLFastDocumentHandler \
writerfilter/source/ooxml/OOXMLParserState \ writerfilter/source/ooxml/OOXMLParserState \
writerfilter/source/ooxml/OOXMLPropertySetImpl \ writerfilter/source/ooxml/OOXMLPropertySet \
writerfilter/source/ooxml/OOXMLStreamImpl \ writerfilter/source/ooxml/OOXMLStreamImpl \
writerfilter/source/ooxml/qnametostrcore \ writerfilter/source/ooxml/qnametostrcore \
)) ))
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "OOXMLDocumentImpl.hxx" #include "OOXMLDocumentImpl.hxx"
#include "OOXMLBinaryObjectReference.hxx" #include "OOXMLBinaryObjectReference.hxx"
#include "OOXMLFastDocumentHandler.hxx" #include "OOXMLFastDocumentHandler.hxx"
#include "OOXMLPropertySetImpl.hxx" #include "OOXMLPropertySet.hxx"
#include <tools/resmgr.hxx> #include <tools/resmgr.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
...@@ -356,7 +356,7 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet ...@@ -356,7 +356,7 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet
(new OOXMLPropertyImpl(NS_ooxml::LN_payload, pPayloadValue, (new OOXMLPropertyImpl(NS_ooxml::LN_payload, pPayloadValue,
OOXMLPropertyImpl::ATTRIBUTE)); OOXMLPropertyImpl::ATTRIBUTE));
OOXMLPropertySet::Pointer_t pBlipSet(new OOXMLPropertySetImpl()); OOXMLPropertySet::Pointer_t pBlipSet(new OOXMLPropertySet);
pBlipSet->add(pPayloadProperty); pBlipSet->add(pPayloadProperty);
...@@ -366,7 +366,7 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet ...@@ -366,7 +366,7 @@ OOXMLPropertySet * OOXMLDocumentImpl::getPicturePropSet
(new OOXMLPropertyImpl(NS_ooxml::LN_blip, pBlipValue, (new OOXMLPropertyImpl(NS_ooxml::LN_blip, pBlipValue,
OOXMLPropertyImpl::ATTRIBUTE)); OOXMLPropertyImpl::ATTRIBUTE));
OOXMLPropertySet * pProps = new OOXMLPropertySetImpl(); OOXMLPropertySet * pProps = new OOXMLPropertySet;
pProps->add(pBlipProperty); pProps->add(pBlipProperty);
......
...@@ -331,7 +331,7 @@ void OOXMLFastContextHandler::sendTableDepth() const ...@@ -331,7 +331,7 @@ void OOXMLFastContextHandler::sendTableDepth() const
{ {
if (mnTableDepth > 0) if (mnTableDepth > 0)
{ {
OOXMLPropertySet * pProps = new OOXMLPropertySetImpl(); 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
...@@ -418,7 +418,7 @@ void OOXMLFastContextHandler::endParagraphGroup() ...@@ -418,7 +418,7 @@ void OOXMLFastContextHandler::endParagraphGroup()
void OOXMLFastContextHandler::startSdt() void OOXMLFastContextHandler::startSdt()
{ {
OOXMLPropertySet * pProps = new OOXMLPropertySetImpl(); 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 OOXMLPropertyImpl(NS_ooxml::LN_CT_SdtBlock_sdtContent, pVal, OOXMLPropertyImpl::ATTRIBUTE));
pProps->add(pProp); pProps->add(pProp);
...@@ -427,7 +427,7 @@ void OOXMLFastContextHandler::startSdt() ...@@ -427,7 +427,7 @@ void OOXMLFastContextHandler::startSdt()
void OOXMLFastContextHandler::endSdt() void OOXMLFastContextHandler::endSdt()
{ {
OOXMLPropertySet * pProps = new OOXMLPropertySetImpl(); 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 OOXMLPropertyImpl(NS_ooxml::LN_CT_SdtBlock_sdtEndContent, pVal, OOXMLPropertyImpl::ATTRIBUTE));
pProps->add(pProp); pProps->add(pProp);
...@@ -654,7 +654,7 @@ void OOXMLFastContextHandler::propagateCharacterProperties() ...@@ -654,7 +654,7 @@ void OOXMLFastContextHandler::propagateCharacterProperties()
void OOXMLFastContextHandler::propagateCharacterPropertiesAsSet(const Id & rId) 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 OOXMLPropertySetImpl()); OOXMLPropertySet::Pointer_t pPropertySet(new OOXMLPropertySet);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(rId, pValue, OOXMLPropertyImpl::SPRM)); (new OOXMLPropertyImpl(rId, pValue, OOXMLPropertyImpl::SPRM));
...@@ -698,13 +698,13 @@ void OOXMLFastContextHandler::sendTableProperties() ...@@ -698,13 +698,13 @@ void OOXMLFastContextHandler::sendTableProperties()
void OOXMLFastContextHandler::clearTableProps() void OOXMLFastContextHandler::clearTableProps()
{ {
mpParserState->setTableProperties(OOXMLPropertySet::Pointer_t mpParserState->setTableProperties(OOXMLPropertySet::Pointer_t
(new OOXMLPropertySetImpl())); (new OOXMLPropertySet));
} }
void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId) 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 OOXMLPropertySetImpl()); OOXMLPropertySet::Pointer_t pPropertySet(new OOXMLPropertySet);
OOXMLProperty::Pointer_t pProp OOXMLProperty::Pointer_t pProp
(new OOXMLPropertyImpl(rId, pValue, OOXMLPropertyImpl::SPRM)); (new OOXMLPropertyImpl(rId, pValue, OOXMLPropertyImpl::SPRM));
...@@ -715,7 +715,7 @@ void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId) ...@@ -715,7 +715,7 @@ void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId)
void OOXMLFastContextHandler::clearProps() void OOXMLFastContextHandler::clearProps()
{ {
setPropertySet(OOXMLPropertySet::Pointer_t(new OOXMLPropertySetImpl())); setPropertySet(OOXMLPropertySet::Pointer_t(new OOXMLPropertySet));
} }
void OOXMLFastContextHandler::setDefaultBooleanValue() void OOXMLFastContextHandler::setDefaultBooleanValue()
...@@ -876,7 +876,7 @@ void OOXMLFastContextHandler::sendPropertiesToParent() ...@@ -876,7 +876,7 @@ void OOXMLFastContextHandler::sendPropertiesToParent()
OOXMLFastContextHandlerStream::OOXMLFastContextHandlerStream OOXMLFastContextHandlerStream::OOXMLFastContextHandlerStream
(OOXMLFastContextHandler * pContext) (OOXMLFastContextHandler * pContext)
: OOXMLFastContextHandler(pContext), : OOXMLFastContextHandler(pContext),
mpPropertySetAttrs(new OOXMLPropertySetImpl()) mpPropertySetAttrs(new OOXMLPropertySet)
{ {
} }
...@@ -924,7 +924,7 @@ void OOXMLFastContextHandlerStream::handleHyperlink() ...@@ -924,7 +924,7 @@ void OOXMLFastContextHandlerStream::handleHyperlink()
*/ */
OOXMLFastContextHandlerProperties::OOXMLFastContextHandlerProperties OOXMLFastContextHandlerProperties::OOXMLFastContextHandlerProperties
(OOXMLFastContextHandler * pContext) (OOXMLFastContextHandler * pContext)
: OOXMLFastContextHandler(pContext), mpPropertySet(new OOXMLPropertySetImpl()), : OOXMLFastContextHandler(pContext), mpPropertySet(new OOXMLPropertySet),
mbResolve(false) mbResolve(false)
{ {
if (pContext->getResource() == STREAM) if (pContext->getResource() == STREAM)
...@@ -1300,7 +1300,7 @@ void OOXMLFastContextHandlerTextTableCell::endCell() ...@@ -1300,7 +1300,7 @@ void OOXMLFastContextHandlerTextTableCell::endCell()
{ {
if (isForwardEvents()) if (isForwardEvents())
{ {
OOXMLPropertySet * pProps = new OOXMLPropertySetImpl(); 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
...@@ -1348,7 +1348,7 @@ void OOXMLFastContextHandlerTextTableRow::endRow() ...@@ -1348,7 +1348,7 @@ void OOXMLFastContextHandlerTextTableRow::endRow()
if (isForwardEvents()) if (isForwardEvents())
{ {
OOXMLPropertySet * pProps = new OOXMLPropertySetImpl(); 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
...@@ -1394,7 +1394,7 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_ ...@@ -1394,7 +1394,7 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_
if (isForwardEvents()) if (isForwardEvents())
{ {
// This whole part is OOXMLFastContextHandlerTextTableCell::endCell() . // This whole part is OOXMLFastContextHandlerTextTableCell::endCell() .
OOXMLPropertySet * pProps = new OOXMLPropertySetImpl(); 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
...@@ -1417,9 +1417,9 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_ ...@@ -1417,9 +1417,9 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_
mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps)); mpStream->props(writerfilter::Reference<Properties>::Pointer_t(pProps));
// fake <w:tcBorders> with no border // fake <w:tcBorders> with no border
OOXMLPropertySet::Pointer_t pCellProps( new OOXMLPropertySetImpl()); OOXMLPropertySet::Pointer_t pCellProps( new OOXMLPropertySet );
{ {
OOXMLPropertySet::Pointer_t pBorderProps( new OOXMLPropertySetImpl()); OOXMLPropertySet::Pointer_t pBorderProps( new OOXMLPropertySet );
static Id borders[] = { NS_ooxml::LN_CT_TcBorders_top, NS_ooxml::LN_CT_TcBorders_bottom, static Id borders[] = { NS_ooxml::LN_CT_TcBorders_top, NS_ooxml::LN_CT_TcBorders_bottom,
NS_ooxml::LN_CT_TcBorders_start, NS_ooxml::LN_CT_TcBorders_end }; NS_ooxml::LN_CT_TcBorders_start, NS_ooxml::LN_CT_TcBorders_end };
for( size_t j = 0; j < SAL_N_ELEMENTS( borders ); ++j ) for( size_t j = 0; j < SAL_N_ELEMENTS( borders ); ++j )
...@@ -1439,7 +1439,7 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_ ...@@ -1439,7 +1439,7 @@ void OOXMLFastContextHandlerTextTableRow::handleGridBefore( OOXMLValue::Pointer_
OOXMLProperty::Pointer_t OOXMLFastContextHandlerTextTableRow::fakeNoBorder( Id id ) OOXMLProperty::Pointer_t OOXMLFastContextHandlerTextTableRow::fakeNoBorder( Id id )
{ {
OOXMLPropertySet::Pointer_t pProps( new OOXMLPropertySetImpl()); 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 OOXMLPropertyImpl(NS_ooxml::LN_CT_Border_val, pVal, OOXMLPropertyImpl::ATTRIBUTE));
...@@ -1473,7 +1473,7 @@ void OOXMLFastContextHandlerTextTable::lcl_startFastElement ...@@ -1473,7 +1473,7 @@ void OOXMLFastContextHandlerTextTable::lcl_startFastElement
mpParserState->startTable(); mpParserState->startTable();
mnTableDepth++; mnTableDepth++;
std::shared_ptr<OOXMLPropertySet> pProps( new OOXMLPropertySetImpl ); std::shared_ptr<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
...@@ -1491,7 +1491,7 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement ...@@ -1491,7 +1491,7 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement
{ {
endAction(Element); endAction(Element);
std::shared_ptr<OOXMLPropertySet> pProps( new OOXMLPropertySetImpl ); std::shared_ptr<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
...@@ -2034,7 +2034,7 @@ void OOXMLFastContextHandlerMath::process() ...@@ -2034,7 +2034,7 @@ void OOXMLFastContextHandlerMath::process()
import.readFormulaOoxml(buffer); import.readFormulaOoxml(buffer);
if (isForwardEvents()) if (isForwardEvents())
{ {
OOXMLPropertySet * pProps = new OOXMLPropertySetImpl(); 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 OOXMLPropertyImpl( NS_ooxml::LN_starmath, pVal, OOXMLPropertyImpl::ATTRIBUTE ));
pProps->add( pProp ); pProps->add( pProp );
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "cppuhelper/implbase.hxx" #include "cppuhelper/implbase.hxx"
#include "com/sun/star/xml/sax/XFastContextHandler.hpp" #include "com/sun/star/xml/sax/XFastContextHandler.hpp"
#include "OOXMLParserState.hxx" #include "OOXMLParserState.hxx"
#include "OOXMLPropertySetImpl.hxx" #include "OOXMLPropertySet.hxx"
#include "OOXMLDocumentImpl.hxx" #include "OOXMLDocumentImpl.hxx"
#include <oox/token/tokens.hxx> #include <oox/token/tokens.hxx>
#include <svtools/embedhlp.hxx> #include <svtools/embedhlp.hxx>
......
...@@ -118,7 +118,7 @@ void OOXMLParserState::resolveCharacterProperties(Stream & rStream) ...@@ -118,7 +118,7 @@ void OOXMLParserState::resolveCharacterProperties(Stream & rStream)
if (mpCharacterProps.get() != nullptr) if (mpCharacterProps.get() != nullptr)
{ {
rStream.props(mpCharacterProps); rStream.props(mpCharacterProps);
mpCharacterProps.reset(new OOXMLPropertySetImpl()); mpCharacterProps.reset(new OOXMLPropertySet);
} }
} }
...@@ -165,7 +165,7 @@ void OOXMLParserState::resolveCellProperties(Stream & rStream) ...@@ -165,7 +165,7 @@ void OOXMLParserState::resolveCellProperties(Stream & rStream)
if (rCellProps.get() != nullptr) if (rCellProps.get() != nullptr)
{ {
rStream.props(rCellProps); rStream.props(rCellProps);
rCellProps.reset(new OOXMLPropertySetImpl()); rCellProps.reset(new OOXMLPropertySet);
} }
} }
} }
...@@ -179,7 +179,7 @@ void OOXMLParserState::resolveRowProperties(Stream & rStream) ...@@ -179,7 +179,7 @@ void OOXMLParserState::resolveRowProperties(Stream & rStream)
if (rRowProps.get() != nullptr) if (rRowProps.get() != nullptr)
{ {
rStream.props(rRowProps); rStream.props(rRowProps);
rRowProps.reset(new OOXMLPropertySetImpl()); rRowProps.reset(new OOXMLPropertySet);
} }
} }
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <stack> #include <stack>
#include "OOXMLDocumentImpl.hxx" #include "OOXMLDocumentImpl.hxx"
#include "OOXMLPropertySetImpl.hxx" #include "OOXMLPropertySet.hxx"
namespace writerfilter { namespace writerfilter {
namespace ooxml namespace ooxml
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "OOXMLPropertySetImpl.hxx" #include "OOXMLPropertySet.hxx"
#include <stdio.h> #include <stdio.h>
#include <iostream> #include <iostream>
#include <ooxml/QNameToString.hxx> #include <ooxml/QNameToString.hxx>
...@@ -34,10 +34,6 @@ OOXMLProperty::~OOXMLProperty() ...@@ -34,10 +34,6 @@ OOXMLProperty::~OOXMLProperty()
{ {
} }
OOXMLPropertySet::~OOXMLPropertySet()
{
}
OOXMLPropertyImpl::OOXMLPropertyImpl(Id id, OOXMLValue::Pointer_t pValue, OOXMLPropertyImpl::OOXMLPropertyImpl(Id id, OOXMLValue::Pointer_t pValue,
OOXMLPropertyImpl::Type_t eType) OOXMLPropertyImpl::Type_t eType)
: mId(id), mpValue(pValue), meType(eType) : mId(id), mpValue(pValue), meType(eType)
...@@ -347,8 +343,8 @@ OOXMLValue * OOXMLInputStreamValue::clone() const ...@@ -347,8 +343,8 @@ OOXMLValue * OOXMLInputStreamValue::clone() const
struct OOXMLPropertySetImplCompare struct OOXMLPropertySetImplCompare
*/ */
bool OOXMLPropertySetImplCompare::operator()(const OOXMLProperty::Pointer_t& x, bool OOXMLPropertySetCompare::operator()(const OOXMLProperty::Pointer_t& x,
const OOXMLProperty::Pointer_t& y) const const OOXMLProperty::Pointer_t& y) const
{ {
bool bResult = false; bool bResult = false;
...@@ -361,20 +357,19 @@ bool OOXMLPropertySetImplCompare::operator()(const OOXMLProperty::Pointer_t& x, ...@@ -361,20 +357,19 @@ bool OOXMLPropertySetImplCompare::operator()(const OOXMLProperty::Pointer_t& x,
} }
/** /**
class OOXMLPropertySetImpl class OOXMLPropertySet
*/ */
OOXMLPropertySetImpl::OOXMLPropertySetImpl() OOXMLPropertySet::OOXMLPropertySet()
{ {
static OString aName("OOXMLPropertySetImpl"); maType = "OOXMLPropertySet";
maType = aName;
} }
OOXMLPropertySetImpl::~OOXMLPropertySetImpl() OOXMLPropertySet::~OOXMLPropertySet()
{ {
} }
void OOXMLPropertySetImpl::resolve(Properties & rHandler) void OOXMLPropertySet::resolve(Properties & rHandler)
{ {
// The pProp->resolve(rHandler) call below can cause elements to // The pProp->resolve(rHandler) call below can cause elements to
// be appended to mProperties. I don't think it can cause elements // be appended to mProperties. I don't think it can cause elements
...@@ -389,29 +384,29 @@ void OOXMLPropertySetImpl::resolve(Properties & rHandler) ...@@ -389,29 +384,29 @@ void OOXMLPropertySetImpl::resolve(Properties & rHandler)
} }
} }
OOXMLPropertySetImpl::OOXMLProperties_t::iterator OOXMLPropertySetImpl::begin() OOXMLPropertySet::OOXMLProperties_t::iterator OOXMLPropertySet::begin()
{ {
return mProperties.begin(); return mProperties.begin();
} }
OOXMLPropertySetImpl::OOXMLProperties_t::iterator OOXMLPropertySetImpl::end() OOXMLPropertySet::OOXMLProperties_t::iterator OOXMLPropertySet::end()
{ {
return mProperties.end(); return mProperties.end();
} }
OOXMLPropertySetImpl::OOXMLProperties_t::const_iterator OOXMLPropertySet::OOXMLProperties_t::const_iterator
OOXMLPropertySetImpl::begin() const OOXMLPropertySet::begin() const
{ {
return mProperties.begin(); return mProperties.begin();
} }
OOXMLPropertySetImpl::OOXMLProperties_t::const_iterator OOXMLPropertySet::OOXMLProperties_t::const_iterator
OOXMLPropertySetImpl::end() const OOXMLPropertySet::end() const
{ {
return mProperties.end(); return mProperties.end();
} }
void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty) void OOXMLPropertySet::add(OOXMLProperty::Pointer_t pProperty)
{ {
if (pProperty.get() != nullptr && pProperty->getId() != 0x0) if (pProperty.get() != nullptr && pProperty->getId() != 0x0)
{ {
...@@ -419,12 +414,11 @@ void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty) ...@@ -419,12 +414,11 @@ void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty)
} }
} }
void OOXMLPropertySetImpl::add(OOXMLPropertySet::Pointer_t pPropertySet) void OOXMLPropertySet::add(OOXMLPropertySet::Pointer_t pPropertySet)
{ {
if (pPropertySet.get() != nullptr) if (pPropertySet.get() != nullptr)
{ {
OOXMLPropertySetImpl * pSet = OOXMLPropertySet * pSet = pPropertySet.get();
dynamic_cast<OOXMLPropertySetImpl *>(pPropertySet.get());
if (pSet != nullptr) if (pSet != nullptr)
{ {
...@@ -436,13 +430,13 @@ void OOXMLPropertySetImpl::add(OOXMLPropertySet::Pointer_t pPropertySet) ...@@ -436,13 +430,13 @@ void OOXMLPropertySetImpl::add(OOXMLPropertySet::Pointer_t pPropertySet)
} }
} }
OOXMLPropertySet * OOXMLPropertySetImpl::clone() const OOXMLPropertySet * OOXMLPropertySet::clone() const
{ {
return new OOXMLPropertySetImpl(*this); return new OOXMLPropertySet(*this);
} }
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
string OOXMLPropertySetImpl::toString() string OOXMLPropertySet::toString()
{ {
string sResult = "["; string sResult = "[";
char sBuffer[256]; char sBuffer[256];
......
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
#ifndef INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX #ifndef INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX
#define INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX #define INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX
#include <dmapper/resourcemodel.hxx>
#include <vector> #include <vector>
#include "OOXMLBinaryObjectReference.hxx"
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <dmapper/resourcemodel.hxx>
namespace writerfilter { namespace writerfilter {
namespace ooxml namespace ooxml
...@@ -43,20 +45,147 @@ public: ...@@ -43,20 +45,147 @@ public:
virtual void resolve(Properties & rProperties) = 0; virtual void resolve(Properties & rProperties) = 0;
}; };
class OOXMLValue : public Value
{
public:
typedef std::shared_ptr<OOXMLValue> Pointer_t;
OOXMLValue();
virtual ~OOXMLValue();
virtual int getInt() const override;
;
virtual OUString getString() const override;
virtual css::uno::Any getAny() const override;
virtual writerfilter::Reference<Properties>::Pointer_t getProperties() override;
virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary() override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const;
};
class OOXMLPropertyImpl : public OOXMLProperty
{
public:
enum Type_t { SPRM, ATTRIBUTE };
private:
Id mId;
mutable OOXMLValue::Pointer_t mpValue;
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();
virtual sal_uInt32 getId() const override;
virtual Value::Pointer_t getValue() override;
virtual writerfilter::Reference<Properties>::Pointer_t getProps() override;
#ifdef DEBUG_WRITERFILTER
virtual std::string getName() const override;
virtual std::string toString() const override;
#endif
virtual void resolve(Properties & rProperties) override;
};
class OOXMLBinaryValue : public OOXMLValue
{
protected:
mutable OOXMLBinaryObjectReference::Pointer_t mpBinaryObj;
public:
explicit OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t pBinaryObj);
virtual ~OOXMLBinaryValue();
virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary() override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLBooleanValue : public OOXMLValue
{
protected:
bool mbValue;
explicit OOXMLBooleanValue(bool bValue);
public:
static OOXMLValue::Pointer_t Create (bool bValue);
static OOXMLValue::Pointer_t Create (const char *pValue);
virtual ~OOXMLBooleanValue();
virtual int getInt() const override;
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLStringValue : public OOXMLValue
{
protected:
OUString mStr;
public:
explicit OOXMLStringValue(const OUString & rStr);
virtual ~OOXMLStringValue();
virtual css::uno::Any getAny() const override;
virtual OUString getString() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLInputStreamValue : public OOXMLValue
{
protected:
css::uno::Reference<css::io::XInputStream> mxInputStream;
public:
explicit OOXMLInputStreamValue(css::uno::Reference<css::io::XInputStream> xInputStream);
virtual ~OOXMLInputStreamValue();
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
struct OOXMLPropertySetCompare
{
bool operator()(const OOXMLProperty::Pointer_t& x,
const OOXMLProperty::Pointer_t& y) const;
};
class OOXMLPropertySet : public writerfilter::Reference<Properties> class OOXMLPropertySet : public writerfilter::Reference<Properties>
{ {
public: public:
typedef std::vector<OOXMLProperty::Pointer_t> OOXMLProperties_t;
typedef std::shared_ptr<OOXMLPropertySet> Pointer_t; typedef std::shared_ptr<OOXMLPropertySet> Pointer_t;
private:
OOXMLProperties_t mProperties;
OString maType;
public:
OOXMLPropertySet();
virtual ~OOXMLPropertySet(); virtual ~OOXMLPropertySet();
virtual void resolve(Properties & rHandler) override = 0; void resolve(Properties & rHandler);
virtual void add(OOXMLProperty::Pointer_t pProperty) = 0; void add(OOXMLProperty::Pointer_t pProperty);
virtual void add(OOXMLPropertySet::Pointer_t pPropertySet) = 0; void add(OOXMLPropertySet::Pointer_t pPropertySet);
virtual OOXMLPropertySet * clone() const = 0; OOXMLPropertySet * clone() const;
OOXMLProperties_t::iterator begin();
OOXMLProperties_t::iterator end();
OOXMLProperties_t::const_iterator begin() const;
OOXMLProperties_t::const_iterator end() const;
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
virtual std::string toString() = 0; std::string toString();
#endif #endif
}; };
...@@ -77,6 +206,143 @@ private: ...@@ -77,6 +206,143 @@ private:
PropertySets_t mPropertySets; PropertySets_t mPropertySets;
}; };
class OOXMLPropertySetValue : public OOXMLValue
{
OOXMLPropertySet::Pointer_t mpPropertySet;
public:
explicit OOXMLPropertySetValue(OOXMLPropertySet::Pointer_t pPropertySet);
virtual ~OOXMLPropertySetValue();
virtual writerfilter::Reference<Properties>::Pointer_t getProperties() override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLIntegerValue : public OOXMLValue
{
protected:
sal_Int32 mnValue;
explicit OOXMLIntegerValue(sal_Int32 nValue);
public:
static OOXMLValue::Pointer_t Create (sal_Int32 nValue);
virtual ~OOXMLIntegerValue();
virtual int getInt() const override;
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLHexValue : public OOXMLValue
{
protected:
sal_uInt32 mnValue;
public:
explicit OOXMLHexValue(sal_uInt32 nValue);
explicit OOXMLHexValue(const char * pValue);
virtual ~OOXMLHexValue();
virtual int getInt() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
/// Handles OOXML's ST_UniversalMeasure value.
class OOXMLUniversalMeasureValue : public OOXMLValue
{
protected:
sal_uInt32 mnValue;
public:
explicit OOXMLUniversalMeasureValue(const char * pValue);
virtual ~OOXMLUniversalMeasureValue();
virtual int getInt() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue* clone() const override;
};
class OOXMLShapeValue : public OOXMLValue
{
protected:
css::uno::Reference<css::drawing::XShape> mrShape;
public:
explicit OOXMLShapeValue(css::uno::Reference<css::drawing::XShape> rShape);
virtual ~OOXMLShapeValue();
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLStarMathValue : public OOXMLValue
{
protected:
css::uno::Reference< css::embed::XEmbeddedObject > component;
public:
explicit OOXMLStarMathValue( css::uno::Reference< css::embed::XEmbeddedObject > component );
virtual ~OOXMLStarMathValue();
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLPropertySetEntryToString : public Properties
{
Id mnId;
OUString mStr;
public:
explicit OOXMLPropertySetEntryToString(Id nId);
virtual ~OOXMLPropertySetEntryToString();
virtual void sprm(Sprm & rSprm) override;
virtual void attribute(Id nId, Value & rValue) override;
const OUString & getString() const { return mStr;}
};
class OOXMLPropertySetEntryToInteger : public Properties
{
Id mnId;
int mnValue;
public:
explicit OOXMLPropertySetEntryToInteger(Id nId);
virtual ~OOXMLPropertySetEntryToInteger();
virtual void sprm(Sprm & rSprm) override;
virtual void attribute(Id nId, Value & rValue) override;
int getValue() const { return mnValue;}
};
class OOXMLPropertySetEntryToBool : public Properties
{
Id mnId;
bool mValue;
public:
explicit OOXMLPropertySetEntryToBool(Id nId);
virtual ~OOXMLPropertySetEntryToBool();
virtual void sprm(Sprm & rSprm) override;
virtual void attribute(Id nId, Value & rValue) override;
bool getValue() const { return mValue; }
};
}} }}
#endif // INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX #endif // INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSET_HXX
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSETIMPL_HXX
#define INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSETIMPL_HXX
#include <vector>
#include "OOXMLPropertySet.hxx"
#include "OOXMLBinaryObjectReference.hxx"
#include <com/sun/star/embed/XEmbeddedObject.hpp>
namespace com {
namespace sun {
namespace star {
namespace drawing {
class XShape;
}}}}
namespace writerfilter {
namespace ooxml
{
class OOXMLValue : public Value
{
public:
typedef std::shared_ptr<OOXMLValue> Pointer_t;
OOXMLValue();
virtual ~OOXMLValue();
virtual int getInt() const override;
;
virtual OUString getString() const override;
virtual css::uno::Any getAny() const override;
virtual writerfilter::Reference<Properties>::Pointer_t getProperties() override;
virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary() override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const;
};
class OOXMLPropertyImpl : public OOXMLProperty
{
public:
enum Type_t { SPRM, ATTRIBUTE };
private:
Id mId;
mutable OOXMLValue::Pointer_t mpValue;
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();
virtual sal_uInt32 getId() const override;
virtual Value::Pointer_t getValue() override;
virtual writerfilter::Reference<Properties>::Pointer_t getProps() override;
#ifdef DEBUG_WRITERFILTER
virtual std::string getName() const override;
virtual std::string toString() const override;
#endif
virtual void resolve(Properties & rProperties) override;
};
class OOXMLBinaryValue : public OOXMLValue
{
protected:
mutable OOXMLBinaryObjectReference::Pointer_t mpBinaryObj;
public:
explicit OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t pBinaryObj);
virtual ~OOXMLBinaryValue();
virtual writerfilter::Reference<BinaryObj>::Pointer_t getBinary() override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLBooleanValue : public OOXMLValue
{
protected:
bool mbValue;
explicit OOXMLBooleanValue(bool bValue);
public:
static OOXMLValue::Pointer_t Create (bool bValue);
static OOXMLValue::Pointer_t Create (const char *pValue);
virtual ~OOXMLBooleanValue();
virtual int getInt() const override;
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLStringValue : public OOXMLValue
{
protected:
OUString mStr;
public:
explicit OOXMLStringValue(const OUString & rStr);
virtual ~OOXMLStringValue();
virtual css::uno::Any getAny() const override;
virtual OUString getString() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLInputStreamValue : public OOXMLValue
{
protected:
css::uno::Reference<css::io::XInputStream> mxInputStream;
public:
explicit OOXMLInputStreamValue(css::uno::Reference<css::io::XInputStream> xInputStream);
virtual ~OOXMLInputStreamValue();
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
struct OOXMLPropertySetImplCompare
{
bool operator()(const OOXMLProperty::Pointer_t& x,
const OOXMLProperty::Pointer_t& y) const;
};
class OOXMLPropertySetImpl : public OOXMLPropertySet
{
public:
typedef std::vector<OOXMLProperty::Pointer_t> OOXMLProperties_t;
private:
OOXMLProperties_t mProperties;
OString maType;
public:
OOXMLPropertySetImpl();
virtual ~OOXMLPropertySetImpl();
virtual void resolve(Properties & rHandler) override;
virtual void add(OOXMLProperty::Pointer_t pProperty) override;
virtual void add(OOXMLPropertySet::Pointer_t pPropertySet) override;
virtual OOXMLPropertySet * clone() const override;
OOXMLProperties_t::iterator begin();
OOXMLProperties_t::iterator end();
OOXMLProperties_t::const_iterator begin() const;
OOXMLProperties_t::const_iterator end() const;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() override;
#endif
};
class OOXMLPropertySetValue : public OOXMLValue
{
OOXMLPropertySet::Pointer_t mpPropertySet;
public:
explicit OOXMLPropertySetValue(OOXMLPropertySet::Pointer_t pPropertySet);
virtual ~OOXMLPropertySetValue();
virtual writerfilter::Reference<Properties>::Pointer_t getProperties() override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLIntegerValue : public OOXMLValue
{
protected:
sal_Int32 mnValue;
explicit OOXMLIntegerValue(sal_Int32 nValue);
public:
static OOXMLValue::Pointer_t Create (sal_Int32 nValue);
virtual ~OOXMLIntegerValue();
virtual int getInt() const override;
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLHexValue : public OOXMLValue
{
protected:
sal_uInt32 mnValue;
public:
explicit OOXMLHexValue(sal_uInt32 nValue);
explicit OOXMLHexValue(const char * pValue);
virtual ~OOXMLHexValue();
virtual int getInt() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
/// Handles OOXML's ST_UniversalMeasure value.
class OOXMLUniversalMeasureValue : public OOXMLValue
{
protected:
sal_uInt32 mnValue;
public:
explicit OOXMLUniversalMeasureValue(const char * pValue);
virtual ~OOXMLUniversalMeasureValue();
virtual int getInt() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue* clone() const override;
};
class OOXMLShapeValue : public OOXMLValue
{
protected:
css::uno::Reference<css::drawing::XShape> mrShape;
public:
explicit OOXMLShapeValue(css::uno::Reference<css::drawing::XShape> rShape);
virtual ~OOXMLShapeValue();
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLStarMathValue : public OOXMLValue
{
protected:
css::uno::Reference< css::embed::XEmbeddedObject > component;
public:
explicit OOXMLStarMathValue( css::uno::Reference< css::embed::XEmbeddedObject > component );
virtual ~OOXMLStarMathValue();
virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override;
#endif
virtual OOXMLValue * clone() const override;
};
class OOXMLPropertySetEntryToString : public Properties
{
Id mnId;
OUString mStr;
public:
explicit OOXMLPropertySetEntryToString(Id nId);
virtual ~OOXMLPropertySetEntryToString();
virtual void sprm(Sprm & rSprm) override;
virtual void attribute(Id nId, Value & rValue) override;
const OUString & getString() const { return mStr;}
};
class OOXMLPropertySetEntryToInteger : public Properties
{
Id mnId;
int mnValue;
public:
explicit OOXMLPropertySetEntryToInteger(Id nId);
virtual ~OOXMLPropertySetEntryToInteger();
virtual void sprm(Sprm & rSprm) override;
virtual void attribute(Id nId, Value & rValue) override;
int getValue() const { return mnValue;}
};
class OOXMLPropertySetEntryToBool : public Properties
{
Id mnId;
bool mValue;
public:
explicit OOXMLPropertySetEntryToBool(Id nId);
virtual ~OOXMLPropertySetEntryToBool();
virtual void sprm(Sprm & rSprm) override;
virtual void attribute(Id nId, Value & rValue) override;
bool getValue() const { return mValue; }
};
} // namespace ooxml
} // namespace writerfilter
#endif // INCLUDED_WRITERFILTER_SOURCE_OOXML_OOXMLPROPERTYSETIMPL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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