22 #include <osl/diagnose.h>
23 #include <rtl/ustring.hxx>
53 OUStringBuffer
aStr(
"[ ");
55 for (
typename T::const_iterator
i(rArr.begin());
i != rArr.end(); ++
i)
57 if (
i != rArr.begin())
63 aStr.append(
"(null)");
68 return aStr.makeStringAndClear();
75 sprintf(sBuffer,
"%p", pVoid);
77 OUString aTmpStr(sBuffer, strlen(sBuffer), RTL_TEXTENCODING_ASCII_US);
82 const char *
dbg_out(std::u16string_view aStr)
94 static std::map<sal_uInt16,OUString> aItemWhichMap
220 return aItemWhichMap;
230 aStr += OUString::number(rItem.
Which());
251 OUStringBuffer
aStr =
"[ ";
258 if (reinterpret_cast<sal_uIntPtr>(pItem) != SAL_MAX_SIZE)
261 aStr.append(
"invalid");
268 return aStr.makeStringAndClear();
280 OUString::number(rAttr.
GetStart()) +
282 OUString::number(*rAttr.
End()) +
297 OUStringBuffer
aStr(
"[ SwpHints\n");
299 for (
size_t i = 0;
i < rHints.
Count(); ++
i)
308 return aStr.makeStringAndClear();
370 OUString::number(rRect.
Left()) +
372 OUString::number(rRect.
Top()) +
374 OUString::number(rRect.
Right()) +
376 OUString::number(rRect.
Bottom()) +
390 sprintf(sBuffer,
"%p", &rFrameFormat);
392 OUString aResult =
"[ " +
393 OUString(sBuffer, strlen(sBuffer), RTL_TEXTENCODING_ASCII_US) +
397 if (rFrameFormat.
IsAuto())
412 OUStringBuffer aResult(
"[");
421 i != pFrameFormats->
end(); ++
i)
429 aResult.append(
", ");
440 return aResult.makeStringAndClear();
454 aTmpStr +=
" CHARS_UPPER_LETTER";
458 aTmpStr +=
" CHARS_LOWER_LETTER";
462 aTmpStr +=
" ROMAN_UPPER";
466 aTmpStr +=
" ROMAN_LOWER";
470 aTmpStr +=
" ARABIC";
485 sprintf(aBuffer,
"%p", &rNode);
487 OUString aTmpStr =
"<node "
489 OUString::number(sal_Int32(rNode.
GetIndex())) +
495 OUString::number(sal_Int32( rNode.
GetNodeType() ) ) +
498 OUString(aBuffer, strlen(aBuffer), RTL_TEXTENCODING_ASCII_US) +
507 aTmpStr +=
"<txt>" + (pTextNode->
GetText().getLength() > 10 ? pTextNode->
GetText().copy(0, 10) : pTextNode->
GetText()) +
"</txt>";
512 aTmpStr +=
"<outlinelevel>" + OUString::number(pTextNode->
GetAttrOutlineLevel()-1) +
"</outlinelevel>";
516 if (pNumRule !=
nullptr)
518 aTmpStr +=
"<number>";
519 if ( pTextNode->
GetNum() )
523 aTmpStr +=
"</number><rule>" +
531 aTmpStr +=
"(" + pItem->
GetValue() +
")*";
535 aTmpStr +=
"</rule>";
538 pNumFormat = pNumRule->GetNumFormat( static_cast< sal_uInt16 >(pTextNode->
GetActualListLevel()) );
542 aTmpStr +=
"<numformat>" +
548 aTmpStr +=
"<counted/>";
554 aTmpStr +=
"<coll>" + pColl->
GetName() +
"(";
563 aTmpStr += OUString::number(-1);
568 const OUString& sNumruleName = rItem.
GetValue();
570 if (!sNumruleName.isEmpty())
572 aTmpStr +=
", " + sNumruleName;
582 aTmpStr +=
"<ccoll>" + pCColl->
GetName() +
"</ccoll>";
594 aTmpStr +=
"<start end=\"";
597 if (pStartNode !=
nullptr)
605 aTmpStr +=
"</node>";
617 if (
nullptr != pNode)
625 if (
nullptr != pNode)
633 if (
nullptr != pNode)
641 return "[ " + OUString::number(static_cast<int>(rUndo.
GetId()))
652 OUStringBuffer
aStr(
"[\n");
654 for (
size_t i = 0;
i < rNodes.
size();
i++)
662 return aStr.makeStringAndClear();
678 OUStringBuffer aResult(
"[ ");
680 aResult.append(rRule.
GetName());
681 aResult.append(
" [");
686 aResult.append(
", ");
695 return aResult.makeStringAndClear();
705 return rFormat.
GetName() +
"(" +
716 return lcl_dbg_out_SvPtrArr<SwFrameFormats>(rFrameFormats);
726 OUStringBuffer aResult(
"[");
728 for (
size_t n = 0;
n < rTable.
size();
n++)
731 aResult.append(
", ");
733 aResult.append(rTable[
n]->
GetName());
736 sprintf(sBuffer,
"(%p)", rTable[
n]);
737 aResult.appendAscii(sBuffer);
742 return aResult.makeStringAndClear();
767 return "CHAPTER_INFO";
777 OSL_FAIL(
"should not be reached");
794 OUStringBuffer
aStr(
"[");
796 SwFormTokens::const_iterator aIt;
798 for (aIt = rTokens.begin(); aIt != rTokens.end(); ++aIt)
800 if (aIt != rTokens.begin())
810 return aStr.makeStringAndClear();
SvxNumType GetNumberingType() const
const SwEndNode * EndOfSectionNode() const
std::vector< SwFormToken > SwFormTokens
Vector of tokens.
Starts a section of nodes in the document model.
constexpr TypedWhichId< SvxProtectItem > RES_PROTECT(100)
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
constexpr TypedWhichId< SvxBlinkItem > RES_CHRATR_BLINK(18)
constexpr TypedWhichId< SwFormatEndAtTextEnd > RES_END_AT_TXTEND(118)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SwFormatSurround > RES_SURROUND(101)
constexpr TypedWhichId< SwFormatFillOrder > RES_FILL_ORDER(RES_FRMATR_BEGIN)
void Right(const tools::Long nRight)
constexpr TypedWhichId< SwHeaderAndFooterEatSpacingItem > RES_HEADER_FOOTER_EAT_SPACING(121)
int GetAssignedOutlineStyleLevel() const
Represents the style of a paragraph.
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
Marks a position in the document model.
constexpr TypedWhichId< SvxTabStopItem > RES_PARATR_TABSTOP(68)
constexpr TypedWhichId< SvxParaGridItem > RES_PARATR_SNAPTOGRID(77)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
const SwNodeNum * GetNum(SwRootFrame const *pLayout=nullptr) const
constexpr TypedWhichId< SvxPrintItem > RES_PRINT(98)
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_METAFIELD(49)
static OUString lcl_dbg_out_SvPtrArr(const T &rArr)
constexpr TypedWhichId< SwTableBoxNumFormat > RES_BOXATR_FORMAT(RES_BOXATR_BEGIN)
const OUString & GetText() const
constexpr TypedWhichId< SwFormatHeader > RES_HEADER(96)
constexpr TypedWhichId< SwFormatEditInReadonly > RES_EDIT_IN_READONLY(112)
constexpr TypedWhichId< SwFormatCol > RES_COL(109)
SwFormatColl * GetCondFormatColl() const
constexpr TypedWhichId< SwFormatMeta > RES_TXTATR_META(48)
constexpr TypedWhichId< SvxFormatKeepItem > RES_KEEP(110)
void Left(const tools::Long nLeft)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
static OString aDbgOutResult
constexpr TypedWhichId< SwTransparencyGrf > RES_GRFATR_TRANSPARENCY(143)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
const SwPosition * GetMark() const
constexpr TypedWhichId< SvxPaperBinItem > RES_PAPER_BIN(90)
SVX_NUM_CHARS_UPPER_LETTER
constexpr TypedWhichId< SwRegisterItem > RES_PARATR_REGISTER(71)
constexpr TypedWhichId< SwChannelRGrf > RES_GRFATR_CHANNELR(138)
constexpr sal_uInt8 MAXLEVEL
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr TypedWhichId< SvxAutoKernItem > RES_CHRATR_AUTOKERN(17)
const OUString & GetName() const
constexpr TypedWhichId< SvxHangingPunctuationItem > RES_PARATR_HANGINGPUNCTUATION(74)
constexpr TypedWhichId< SvxOpaqueItem > RES_OPAQUE(99)
constexpr TypedWhichId< SwContrastGrf > RES_GRFATR_CONTRAST(137)
constexpr TypedWhichId< SvxBoxItem > RES_CHRATR_BOX(40)
Of course Writer needs its own rectangles.
constexpr TypedWhichId< SwTableBoxValue > RES_BOXATR_VALUE(152)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
int GetActualListLevel() const
Returns the actual list level of this text node, when it is a list item.
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
const SwFrameFormats * GetSpzFrameFormats() const
constexpr TypedWhichId< SvxTwoLinesItem > RES_CHRATR_TWO_LINES(34)
constexpr TypedWhichId< SwLuminanceGrf > RES_GRFATR_LUMINANCE(136)
int GetAttrOutlineLevel() const
Returns outline level of this text node.
constexpr TypedWhichId< SwFormatLayoutSplit > RES_LAYOUT_SPLIT(113)
constexpr TypedWhichId< SvxCaseMapItem > RES_CHRATR_CASEMAP(RES_CHRATR_BEGIN)
OSQLColumns::const_iterator find(const OSQLColumns::const_iterator &first, const OSQLColumns::const_iterator &last, std::u16string_view _rVal, const ::comphelper::UStringMixEqual &_rCase)
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(102)
const SfxPoolItem * NextItem()
bool IsAssignedToListLevelOfOutlineStyle() const
SwNodeType GetNodeType() const
constexpr TypedWhichId< SwFormatHoriOrient > RES_HORI_ORIENT(103)
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
constexpr TypedWhichId< SvxShadowItem > RES_CHRATR_SHADOW(41)
static OUString lcl_AnchoredFrames(const SwNode &rNode)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an optional end.
constexpr TypedWhichId< SwFormatDrop > RES_PARATR_DROP(70)
sal_Int32 GetStart() const
constexpr TypedWhichId< SwFormatRuby > RES_TXTATR_CJK_RUBY(53)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SvxCharReliefItem > RES_CHRATR_RELIEF(36)
SwNodeOffset GetIndex() const
virtual OUString GetName() const override
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SvxHyphenZoneItem > RES_PARATR_HYPHENZONE(69)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr TypedWhichId< SvxParaVertAlignItem > RES_PARATR_VERTALIGN(76)
constexpr TypedWhichId< SwChannelBGrf > RES_GRFATR_CHANNELB(140)
constexpr TypedWhichId< SwFormatRowSplit > RES_ROW_SPLIT(122)
constexpr TypedWhichId< SfxBoolItem > RES_TXTATR_DUMMY1(62)
constexpr TypedWhichId< SwRotationGrf > RES_GRFATR_ROTATION(135)
PaM is Point and Mark: a selection of the document model.
const SwAttrSet * GetpSwAttrSet() const
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
SVX_NUM_CHARS_LOWER_LETTER
SwTextAttr * Get(size_t nPos) const
const SwPosition * GetPoint() const
constexpr TypedWhichId< SvxMacroItem > RES_FRMMACRO(108)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SwFormatURL > RES_URL(111)
constexpr TypedWhichId< SwCropGrf > RES_GRFATR_CROPGRF(134)
SwNodeOffset GetIndex() const
const OUString & GetValue() const
bool HasMark() const
A PaM marks a selection if Point and Mark are distinct positions.
constexpr TypedWhichId< SvxShadowedItem > RES_CHRATR_SHADOWED(13)
constexpr TypedWhichId< SwFormatLineBreak > RES_TXTATR_LINEBREAK(61)
const char * dbg_out(const void *pVoid)
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
constexpr TypedWhichId< SvxLineSpacingItem > RES_PARATR_LINESPACING(RES_PARATR_BEGIN)
constexpr TypedWhichId< SvxOverlineItem > RES_CHRATR_OVERLINE(38)
constexpr TypedWhichId< SvxEmphasisMarkItem > RES_CHRATR_EMPHASIS_MARK(33)
virtual OUString GetComment() const override
Returns textual comment for this undo object.
constexpr TypedWhichId< SwFormatContent > RES_CNTNT(95)
constexpr TypedWhichId< SvxCharScaleWidthItem > RES_CHRATR_SCALEW(35)
constexpr TypedWhichId< SvxCharHiddenItem > RES_CHRATR_HIDDEN(37)
static std::map< sal_uInt16, OUString > & GetItemWhichMap()
static OUString lcl_dbg_out(const SfxPoolItem &rItem)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
constexpr TypedWhichId< SvxScriptSpaceItem > RES_PARATR_SCRIPTSPACE(73)
const SwNumFormat & Get(sal_uInt16 i) const
constexpr TypedWhichId< SwMirrorGrf > RES_GRFATR_MIRRORGRF(RES_GRFATR_BEGIN)
void Bottom(const tools::Long nBottom)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_BACKGROUND(21)
SwTextNode is a paragraph in the document model.
constexpr TypedWhichId< SwFormatChain > RES_CHAIN(114)
std::unique_ptr< char[]> aBuffer
constexpr TypedWhichId< SwFormatContentControl > RES_TXTATR_CONTENTCONTROL(56)
constexpr TypedWhichId< SwTextGridItem > RES_TEXTGRID(115)
constexpr TypedWhichId< SvxOrphansItem > RES_PARATR_ORPHANS(66)
An SwTextAttr container, stores all directly formatted text portions for a text node.
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SvxFormatSplitItem > RES_PARATR_SPLIT(65)
constexpr TypedWhichId< SwChannelGGrf > RES_GRFATR_CHANNELG(139)
constexpr TypedWhichId< SvxWordLineModeItem > RES_CHRATR_WORDLINEMODE(16)
constexpr TypedWhichId< SwInvertGrf > RES_GRFATR_INVERT(142)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr TypedWhichId< SvxForbiddenRuleItem > RES_PARATR_FORBIDDEN_RULES(75)
constexpr TypedWhichId< SwFormatNoBalancedColumns > RES_COLUMNBALANCE(119)
sal_Int32 GetIndex() const
bool IsCountedInList() const
constexpr TypedWhichId< SwDrawModeGrf > RES_GRFATR_DRAWMODE(144)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(151)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
void Top(const tools::Long nTop)
static OUString lcl_dbg_out_NumType(sal_Int16 nType)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_CHARSETCOLOR(2)
const sal_Int32 * End() const
constexpr TypedWhichId< SwTOXMark > RES_TXTATR_TOXMARK(47)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_INPUTFIELD(55)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(106)
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
const SfxPoolItem & GetAttr() const
constexpr TypedWhichId< SwFormatFooter > RES_FOOTER(97)
static OUString lcl_TokenType2Str(FormTokenType nType)
constexpr TypedWhichId< SwFormatLineNumber > RES_LINENUMBER(116)
SwFormatColl * GetFormatColl() const
constexpr TypedWhichId< SvxCharRotateItem > RES_CHRATR_ROTATE(32)
constexpr TypedWhichId< SvxNoHyphenItem > RES_CHRATR_NOHYPHEN(19)
constexpr TypedWhichId< SwFormatRefMark > RES_TXTATR_REFMARK(RES_TXTATR_WITHEND_BEGIN)
int GetAttrOutlineLevel() const
const SwIndexReg * GetIdxReg() const
constexpr TypedWhichId< SwParaConnectBorderItem > RES_PARATR_CONNECT_BORDER(78)
tools::Long GetSerial() const
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SvxBrushItem > RES_CHRATR_HIGHLIGHT(42)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxKerningItem > RES_CHRATR_KERNING(9)
constexpr TypedWhichId< SwFormatFootnoteAtTextEnd > RES_FTN_AT_TXTEND(117)
constexpr TypedWhichId< SvxULSpaceItem > RES_UL_SPACE(92)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SvxShadowItem > RES_SHADOW(107)
constexpr TypedWhichId< SvxWidowsItem > RES_PARATR_WIDOWS(67)
constexpr TypedWhichId< SvXMLAttrContainerItem > RES_TXTATR_UNKNOWN_CONTAINER(54)
const SfxPoolItem * GetCurItem() const
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Base class of the Writer document model elements.
constexpr TypedWhichId< SvxContourItem > RES_CHRATR_CONTOUR(4)
constexpr TypedWhichId< SwGammaGrf > RES_GRFATR_GAMMA(141)