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 xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwTextAttr"));
93 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"start"), BAD_CAST(OString::number(
m_nStart).getStr()));
95 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"end"), BAD_CAST(OString::number(*
End()).getStr()));
96 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(
Which()).getStr()));
97 const char* pWhich =
nullptr;
98 std::optional<OString> oValue;
105 pWhich =
"annotation";
108 pWhich =
"fly content";
112 pWhich =
"character format";
114 oValue = OString(
"name: " +
OUStringToOString(pCharFormat->GetName(), RTL_TEXTENCODING_UTF8));
119 pWhich =
"inet format";
121 oValue = OString(
"url: " + rFormat.
GetValue().toUtf8());
128 oValue = OString(
"rubytext: " + rFormat.
GetText().toUtf8());
145 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"which"), BAD_CAST(pWhich));
147 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"), BAD_CAST(oValue->getStr()));
158 SAL_WARN(
"sw.core",
"Unhandled TXTATR");
162 xmlTextWriterEndElement(pWriter);
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_META(48)
virtual const sal_Int32 * GetEnd() const
end position
virtual void SetEnd(sal_Int32) override
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(57)
SfxPoolItem *const m_pAttr
virtual const sal_Int32 * GetEnd() const override
end position
void Remove(const SfxPoolItem &)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(59)
SwTextAttr(SwTextAttr const &)=delete
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
constexpr TypedWhichId< SwFormatRuby > RES_TXTATR_CJK_RUBY(53)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
const SwFormatField & GetFormatField() const
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
struct _xmlTextWriter * xmlTextWriterPtr
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
virtual ~SwTextAttr() COVERITY_NOEXCEPT_FALSE
virtual void SetEnd(sal_Int32)
void EndPosChanged() const
SwTextAttrEnd(SfxPoolItem &rAttr, sal_Int32 nStart, sal_Int32 nEnd)
static void Destroy(SwTextAttr *pToDestroy, SfxItemPool &rPool)
destroy instance
const sal_Int32 * End() const
bool operator==(const SwTextAttr &) const
void dumpAsXml(xmlTextWriterPtr pWriter) const
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
const SfxPoolItem & GetAttr() const
#define SAL_WARN(area, stream)
const SwFormatAutoFormat & GetAutoFormat() const
const SwFormatCharFormat & GetCharFormat() const
const SwFormatRuby & GetRuby() const
const SwFormatINetFormat & GetINetFormat() const