24#include <com/sun/star/drawing/XShape.hpp>
66 pResult =
mpValue->getProperties();
76 if (sResult.length() == 0)
79 if (sResult.length() == 0)
81 static char sBuffer[256];
83 snprintf(sBuffer,
sizeof(sBuffer),
"%" SAL_PRIxUINT32,
mId);
94 std::string sResult =
"(";
114 rProperties.
sprm(*
this);
176: mpBinaryObj(
std::move(pBinaryObj))
207 return pValue ==
"true"
249 return mbValue ?
"true" :
"false";
263: mStr(
std::move(sStr))
297: mxInputStream(
std::move(xInputStream))
313 return "InputStream";
340 for (
size_t nIt = 0; nIt <
mProperties.size(); ++nIt)
345 pProp->resolve(rHandler);
359OOXMLPropertySet::OOXMLProperties_t::const_iterator
365OOXMLPropertySet::OOXMLProperties_t::const_iterator
373 if (pProperty && pProperty->getId() != 0x0)
403 std::string sResult =
"[";
405 snprintf(sBuffer,
sizeof(sBuffer),
"%p",
this);
409 OOXMLProperties_t::iterator aItBegin =
begin();
410 OOXMLProperties_t::iterator aItEnd =
end();
412 for (OOXMLProperties_t::iterator aIt = aItBegin; aIt != aItEnd; ++aIt)
418 sResult += (*aIt)->toString();
434 : mpPropertySet(
std::move(pPropertySet))
453 snprintf(sBuffer,
sizeof(sBuffer),
"t:%p, m:%p",
this,
mpPropertySet.
get());
455 return "OOXMLPropertySetValue(" + std::string(sBuffer) +
")";
485 case 3:
return Three;
489 case 7:
return Seven;
490 case 8:
return Eight;
528 snprintf(buffer,
sizeof(buffer),
"%" SAL_PRIdINT32,
mnValue);
566 snprintf(buffer,
sizeof(buffer),
"0x%" SAL_PRIxUINT32,
mnValue);
578 if (pValue ==
"auto")
584 const sal_Int32 nLen = pValue.size();
585 if ( !
mnValue && nLen > 1 && pValue[0] ==
'#' )
591 const OUString sHashColor(pValue.data(), nLen, RTL_TEXTENCODING_ASCII_US);
604 int nLen = pValue.size();
606 pValue[nLen-2] ==
'p' &&
607 pValue[nLen-1] ==
't')
609 mnValue =
static_cast<int>(val * npPt);
612 pValue[nLen - 2] ==
'c' &&
613 pValue[nLen - 1] ==
'm')
615 mnValue =
static_cast<int>(val * npPt * 72 / 2.54);
618 pValue[nLen - 2] ==
'm' &&
619 pValue[nLen - 1] ==
'm')
621 mnValue =
static_cast<int>(val * npPt * 72 / 25.4);
624 pValue[nLen - 2] ==
'i' &&
625 pValue[nLen - 1] ==
'n')
627 mnValue =
static_cast<int>(val * npPt * 72);
630 pValue[nLen - 2] ==
'p' &&
631 ( pValue[nLen - 1] ==
'c' || pValue[nLen - 1] ==
'i' ))
633 mnValue =
static_cast<int>(val * npPt * 12);
637 mnValue =
static_cast<int>(val);
653 return std::string(OString::number(
mnValue));
663 int nLen = pValue.size();
665 pValue[nLen - 1] ==
'%')
667 mnValue =
static_cast<int>(val * 50);
683 return std::string(OString::number(
mnValue));
693: mrShape(
std::move(xShape))
724: m_component(
std::move(c))
764 Table * pTable = &rTable;
771 (rPropSet->getProperties());
static bool convertColor(sal_Int32 &rColor, std::u16string_view rValue)
virtual void attribute(Id name, Value &val)=0
Receives an attribute.
virtual void sprm(Sprm &sprm)=0
Receives a SPRM.
tools::SvRef< Reference< T > > Pointer_t
Pointer to reference.
An SPRM: Section, Paragraph and Run Modifier.
virtual void entry(int pos, writerfilter::Reference< Properties >::Pointer_t ref)=0
Receives an entry of the table.
virtual int getInt() const =0
Returns integer representation of the value.
virtual OUString getString() const =0
Returns string representation of the value.
tools::SvRef< Value > Pointer_t
Pointer to a value.
OOXMLBinaryValue(OOXMLBinaryObjectReference::Pointer_t pBinaryObj)
virtual writerfilter::Reference< BinaryObj >::Pointer_t getBinary() override
Returns binary object of this value.
virtual std::string toString() const override
Returns string representation of this value.
virtual OOXMLValue * clone() const override
virtual ~OOXMLBinaryValue() override
OOXMLBinaryObjectReference::Pointer_t mpBinaryObj
virtual css::uno::Any getAny() const override
Returns representation of the value as uno::Any.
OOXMLBooleanValue(bool bValue)
virtual int getInt() const override
Returns integer representation of the value.
virtual std::string toString() const override
Returns string representation of this value.
static OOXMLValue::Pointer_t const & Create(bool bValue)
virtual ~OOXMLBooleanValue() override
virtual OOXMLValue * clone() const override
OOXMLHexColorValue(std::string_view pValue)
virtual int getInt() const override
Returns integer representation of the value.
virtual OOXMLValue * clone() const override
OOXMLHexValue(sal_uInt32 nValue)
virtual ~OOXMLHexValue() override
virtual std::string toString() const override
Returns string representation of this value.
static OOXMLValue::Pointer_t Create(sal_Int32 nValue)
virtual std::string toString() const override
Returns string representation of this value.
OOXMLIntegerValue(sal_Int32 nValue)
virtual css::uno::Any getAny() const override
Returns representation of the value as uno::Any.
virtual ~OOXMLIntegerValue() override
virtual int getInt() const override
Returns integer representation of the value.
virtual OOXMLValue * clone() const override
virtual int getInt() const override
Returns integer representation of the value.
OOXMLMeasurementOrPercentValue(std::string_view pValue)
virtual std::string toString() const override
Returns string representation of this value.
virtual void attribute(Id nId, Value &rValue) override
Receives an attribute.
virtual ~OOXMLPropertySetEntryToBool() override
OOXMLPropertySetEntryToBool(Id nId)
virtual void sprm(Sprm &rSprm) override
Receives a SPRM.
OOXMLPropertySetEntryToInteger(Id nId)
virtual void sprm(Sprm &rSprm) override
Receives a SPRM.
virtual void attribute(Id nId, Value &rValue) override
Receives an attribute.
virtual ~OOXMLPropertySetEntryToInteger() override
virtual void sprm(Sprm &rSprm) override
Receives a SPRM.
OOXMLPropertySetEntryToString(Id nId)
virtual void attribute(Id nId, Value &rValue) override
Receives an attribute.
virtual ~OOXMLPropertySetEntryToString() override
virtual ~OOXMLPropertySetValue() override
OOXMLPropertySetValue(OOXMLPropertySet::Pointer_t pPropertySet)
virtual OOXMLValue * clone() const override
OOXMLPropertySet::Pointer_t mpPropertySet
virtual writerfilter::Reference< Properties >::Pointer_t getProperties() override
Returns properties of this value.
virtual std::string toString() const override
Returns string representation of this value.
void resolve(Properties &rHandler) override
Resolves the reference.
OOXMLProperties_t::iterator begin()
OOXMLProperties_t::iterator end()
OOXMLPropertySet * clone() const
void add(const OOXMLProperty::Pointer_t &pProperty)
virtual ~OOXMLPropertySet() override
OOXMLPropertySet()
class OOXMLPropertySet
OOXMLProperties_t mProperties
sal_uInt32 getId() const override
Returns id of the SPRM.
std::string getName() const override
Returns name of sprm.
std::string toString() const override
Returns string representation of sprm.
OOXMLValue::Pointer_t mpValue
void resolve(Properties &rProperties)
writerfilter::Reference< Properties >::Pointer_t getProps() override
Returns reference to properties contained in the SPRM.
Value::Pointer_t getValue() override
Returns value of the SPRM.
virtual ~OOXMLProperty() override
OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue, Type_t eType)
css::uno::Reference< css::drawing::XShape > mrShape
virtual css::uno::Any getAny() const override
Returns representation of the value as uno::Any.
virtual std::string toString() const override
Returns string representation of this value.
virtual OOXMLValue * clone() const override
virtual ~OOXMLShapeValue() override
OOXMLShapeValue(css::uno::Reference< css::drawing::XShape > xShape)
virtual css::uno::Any getAny() const override
Returns representation of the value as uno::Any.
virtual ~OOXMLStarMathValue() override
virtual OOXMLValue * clone() const override
css::uno::Reference< css::embed::XEmbeddedObject > m_component
virtual std::string toString() const override
Returns string representation of this value.
OOXMLStarMathValue(css::uno::Reference< css::embed::XEmbeddedObject > component)
virtual css::uno::Any getAny() const override
Returns representation of the value as uno::Any.
virtual OOXMLValue * clone() const override
virtual OUString getString() const override
Returns string representation of the value.
OOXMLStringValue(OUString sStr)
virtual std::string toString() const override
Returns string representation of this value.
virtual ~OOXMLStringValue() override
void add(const ValuePointer_t &pPropertySet)
OOXMLTable * clone() const
PropertySets_t mPropertySets
void resolve(Table &rTable) override
Resolves the reference.
virtual ~OOXMLTable() override
virtual ~OOXMLUniversalMeasureValue() override
OOXMLUniversalMeasureValue(std::string_view pValue, sal_uInt32 npPt)
virtual int getInt() const override
Returns integer representation of the value.
virtual std::string toString() const override
Returns string representation of this value.
virtual std::string toString() const override
Returns string representation of this value.
virtual writerfilter::Reference< BinaryObj >::Pointer_t getBinary() override
Returns binary object of this value.
virtual OOXMLValue * clone() const
virtual writerfilter::Reference< Properties >::Pointer_t getProperties() override
Returns properties of this value.
virtual css::uno::Any getAny() const override
Returns representation of the value as uno::Any.
virtual OUString getString() const override
Returns string representation of the value.
virtual ~OOXMLValue() override
virtual int getInt() const override
Returns integer representation of the value.
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
double toDouble(std::u16string_view str)
sal_uInt32 toUInt32(std::u16string_view str, sal_Int16 radix=10)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
std::string fastTokenToId(sal_uInt32 nToken)
static bool GetBooleanValue(std::string_view pValue)
OOXMLNthPtMeasureValue< 20 > OOXMLTwipsMeasureValue
Handles OOXML's ST_TwipsMeasure value.
std::string QNameToString(Id)