22#include <osl/diagnose.h>
23#include <libxml/xmlwriter.h>
32 mnWrapInfluenceOnPosition( _nWrapInfluenceOnPosition )
42 assert(SfxPoolItem::operator==(rAttr));
57 nMemberId &= ~CONVERT_TWIPS;
69 OSL_FAIL(
"<SwFormatWrapInfluenceOnObjPos::QueryValue()> - unknown MemberId" );
77 nMemberId &= ~CONVERT_TWIPS;
82 sal_Int16 nNewWrapInfluence = 0;
83 rVal >>= nNewWrapInfluence;
85 if ( nNewWrapInfluence == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
86 nNewWrapInfluence == text::WrapInfluenceOnPosition::ONCE_CONCURRENT ||
87 nNewWrapInfluence == text::WrapInfluenceOnPosition::ITERATIVE )
94 OSL_FAIL(
"<SwFormatWrapInfluenceOnObjPos::PutValue(..)> - invalid attribute value" );
99 bool bAllowOverlap =
true;
100 if (rVal >>= bAllowOverlap)
107 SAL_WARN(
"sw.core",
"SwFormatWrapInfluenceOnObjPos::PutValue: invalid AllowOverlap type");
112 OSL_FAIL(
"<SwFormatWrapInfluenceOnObjPos::PutValue(..)> - unknown MemberId" );
120 if ( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
121 _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_CONCURRENT ||
122 _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ITERATIVE )
128 OSL_FAIL(
"<SwFormatWrapInfluenceOnObjPos::SetWrapInfluenceOnObjPos(..)> - invalid attribute value" );
135 const bool _bIterativeAsOnceConcurrent )
const
139 if ( _bIterativeAsOnceConcurrent &&
140 nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ITERATIVE )
142 nWrapInfluenceOnPosition = text::WrapInfluenceOnPosition::ONCE_CONCURRENT;
145 return nWrapInfluenceOnPosition;
167 (void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwFormatWrapInfluenceOnObjPos"));
168 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"whichId"), BAD_CAST(OString::number(
Which()).getStr()));
169 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"nWrapInfluenceOnPosition"), BAD_CAST(OString::number(
mnWrapInfluenceOnPosition).getStr()));
170 (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"mbAllowOverlap"), BAD_CAST(OString::boolean(
mbAllowOverlap).getStr()));
171 (void)xmlTextWriterEndElement(pWriter);
struct _xmlTextWriter * xmlTextWriterPtr
constexpr TypedWhichId< SwFormatWrapInfluenceOnObjPos > RES_WRAP_INFLUENCE_ON_OBJPOS(132)
#define SAL_WARN(area, stream)
#define MID_WRAP_INFLUENCE
#define MID_ALLOW_OVERLAP