21#include <libxml/xmlwriter.h>
29 , m_bDontExpand( false )
30 , m_bLockExpandFlag( false )
31 , m_bDontMoveAttr( false )
32 , m_bCharFormatAttr( false )
33 , m_bOverlapAllowedAttr( false )
34 , m_bPriorityAttr( false )
35 , m_bDontExpandStart( false )
37 , m_bHasDummyChar( false )
38 , m_bFormatIgnoreStart(false)
39 , m_bFormatIgnoreEnd(false)
40 , m_bHasContent( false )
60 if (!pToDestroy)
return;
72 sal_Int32 nStart, sal_Int32 nEnd ) :
91 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwTextAttr"));
92 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
93 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"symbol"),
"%s",
94 BAD_CAST(
typeid(*this).name()));
96 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"start"), BAD_CAST(OString::number(
m_nStart).getStr()));
97 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"dont-expand"),
100 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"end"), BAD_CAST(OString::number(*
End()).getStr()));
101 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(
Which()).getStr()));
102 (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"m_pAttr"),
"%p",
m_pAttr);
103 const char* pWhich =
nullptr;
104 std::optional<OString> oValue;
111 pWhich =
"annotation";
114 pWhich =
"fly content";
118 pWhich =
"inet format";
120 oValue = OString(
"url: " + rFormat.
GetValue().toUtf8());
127 oValue = OString(
"rubytext: " + rFormat.
GetText().toUtf8());
144 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"which"), BAD_CAST(pWhich));
146 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(oValue->getStr()));
177 SAL_WARN(
"sw.core",
"Unhandled TXTATR");
181 (void)xmlTextWriterEndElement(pWriter);
void Remove(const SfxPoolItem &)
void dumpAsXml(xmlTextWriterPtr pWriter) const override
SwTextAttrEnd(SfxPoolItem &rAttr, sal_Int32 nStart, sal_Int32 nEnd)
virtual void SetEnd(sal_Int32) override
virtual const sal_Int32 * GetEnd() const override
end position
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
static void Destroy(SwTextAttr *pToDestroy, SfxItemPool &rPool)
destroy instance
const SfxPoolItem & GetAttr() const
virtual const sal_Int32 * GetEnd() const
end position
const SwFormatRefMark & GetRefMark() const
SfxPoolItem *const m_pAttr
const sal_Int32 * End() const
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
const SwFormatFlyCnt & GetFlyCnt() const
const SwFormatLineBreak & GetLineBreak() const
const SwFormatFootnote & GetFootnote() const
const SwFormatINetFormat & GetINetFormat() const
const SwFormatCharFormat & GetCharFormat() const
virtual void SetEnd(sal_Int32)
const SwFormatRuby & GetRuby() const
bool operator==(const SwTextAttr &) const
SwTextAttr(SwTextAttr const &)=delete
virtual ~SwTextAttr() COVERITY_NOEXCEPT_FALSE
const SwFormatAutoFormat & GetAutoFormat() const
const SwFormatContentControl & GetContentControl() const
const SwFormatField & GetFormatField() const
void EndPosChanged() const
struct _xmlTextWriter * xmlTextWriterPtr
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
constexpr TypedWhichId< SwFormatContentControl > RES_TXTATR_CONTENTCONTROL(56)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SwFormatLineBreak > RES_TXTATR_LINEBREAK(61)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_META(48)
constexpr TypedWhichId< SwFormatRuby > RES_TXTATR_CJK_RUBY(53)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
#define SAL_WARN(area, stream)