2009-04-09 12:51:41 +0200 b_michaelsen r270689 : #i94949# cleaned up assertions after rebasing
2009-04-08 17:37:08 +0200 b_michaelsen r270658 : fixing sw/source/ui/utlui/makefile.mk
2009-04-07 17:56:54 +0200 b_michaelsen r270606 : added bookctrl.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-07 17:05:20 +0200 b_michaelsen r270603 : added crbm.cxx to EXCEPTIONFILES, because this is needed for stl on unxsols4
2009-04-02 23:44:38 +0200 b_michaelsen r270436 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@270033 (milestone: DEV300:m45)
2009-02-27 16:25:31 +0100 b_michaelsen r268606 : #i94949# fixed Windows buildbreaker
2009-02-25 18:01:13 +0100 b_michaelsen r268464 : #i94949# Bookmarktest document filter roundtrips
2009-02-24 18:23:55 +0100 b_michaelsen r268404 : #i94949# Bookmark unittests
2009-02-23 19:47:44 +0100 b_michaelsen r268370 : #i94949# added unittest for bookmarks
2009-02-23 12:22:07 +0100 b_michaelsen r268348 : #i94949# fixing CheckCrossReferences testcase
2009-02-20 18:12:50 +0100 b_michaelsen r268335 : #i94949# fixing SwXTextRange
2009-02-18 18:32:57 +0100 b_michaelsen r268252 : #i94949# deregistering DdeBookmarks on delete
2009-02-18 18:29:08 +0100 b_michaelsen r268251 : fixing dbgoutsw.cxx for debug builds
2009-02-16 18:42:43 +0100 b_michaelsen r267834 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@267171 (milestone: DEV300:m41)
2009-02-12 15:32:02 +0100 b_michaelsen r267667 : #i94949 fixed crossrefbookmark naming
2009-02-11 18:30:08 +0100 b_michaelsen r267624 : #94949# fixing bookmark navigation
2009-02-11 13:55:26 +0100 b_michaelsen r267599 : #i94949# fixed bookmark naming
2009-02-10 17:53:05 +0100 b_michaelsen r267571 : #i94949# renamed HasOtherMarkPos to IsExpanded
2009-02-10 17:23:01 +0100 b_michaelsen r267564 : #i94949# renamed ::sw::bookmark namespace to more fitting ::sw::mark
2009-02-10 16:16:32 +0100 b_michaelsen r267553 : #i94949# creating only CrossRefBookmark per Txtnode
2009-02-10 12:14:05 +0100 b_michaelsen r267547 : #i94949# fixed bookmark count in navigator
2009-02-09 19:12:18 +0100 b_michaelsen r267532 : #i94949# lcl_CopyBookmarks(..) - handle marks on boundaries correctly
2009-02-09 17:32:45 +0100 b_michaelsen r267524 : #i94949# setting the refobject of the DdeBookmark in Sin SwServerObject::SetDdeBookmark(..)
2009-02-09 17:22:15 +0100 b_michaelsen r267523 : #i94949# trying to harden SwServerObject
2009-02-09 16:47:32 +0100 b_michaelsen r267521 : #i94949# lcl_CopyBookmarks(..): try to get the source mark name, if possible
2009-02-09 16:05:42 +0100 b_michaelsen r267519 : #i94949# clearing the OtherMarkPos if PaM has no mark in repositionMark(..), swapping inverted bookmarks without hissing an assertion
2009-02-09 15:55:38 +0100 b_michaelsen r267518 : #i94949# checking for out-of-bounds in SwView::ExecuteStatusLine(..)
2009-02-09 15:23:47 +0100 b_michaelsen r267517 : #i94949# using an UNO_BOOKMARK in ui/dbui/dbinsdlg.cxx
2009-02-09 14:14:47 +0100 b_michaelsen r267514 : #i94949# IDocumentMarkAccess::GetType(..) asserts on unknown type
2009-02-09 14:04:25 +0100 b_michaelsen r267513 : #i94949# using rtl strings instead of tools-strings in CrossRefBookmarks
2009-02-09 13:55:01 +0100 b_michaelsen r267510 : #i94949# using empty string for UnoMark construction
2009-02-09 13:46:46 +0100 b_michaelsen r267509 : #i94949# removed superfluous #includes, removed superfluous member DdeBookmark::bGenerateName, initialized DdeBookmark::m_aRefObj removed superfluous local _FindItem::ClearObj
2009-02-06 14:38:37 +0100 b_michaelsen r267462 : #i94949# fixing FN_STAT_BOOKMARK dispatches
2009-02-05 18:05:07 +0100 b_michaelsen r267436 : #i94949# removing superfluous #includes
2009-02-04 15:51:31 +0100 b_michaelsen r267391 : fixing resync merge error
2009-02-02 19:39:55 +0100 b_michaelsen r267294 : #i94949# bookmark performance
2009-01-30 19:30:51 +0100 b_michaelsen r267229 : #i94949# throwing IllegalArgumentException, if appropriate
2009-01-30 19:29:56 +0100 b_michaelsen r267228 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:23:49 +0100 b_michaelsen r267227 : #i94949# refactored lcl_FillBookmarkArray, comments, constness
2009-01-30 19:16:06 +0100 b_michaelsen r267226 : #i94949# refactored lcl_FillBookmarkArray
2009-01-30 17:59:27 +0100 b_michaelsen r267222 : #i94949# removed superficial #include
2009-01-30 17:50:02 +0100 b_michaelsen r267220 : #i94949# SwXTextRange remembers its UNO bookmark
2009-01-29 20:19:58 +0100 b_michaelsen r267168 : #i94949# implemented IDocumentMarkAccess::findBookmark
2009-01-29 17:22:17 +0100 b_michaelsen r267162 : #i94949# implemented renameMark in Markmanager
2009-01-29 14:17:10 +0100 b_michaelsen r267134 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:21:54 +0100 b_michaelsen r267125 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:06:10 +0100 b_michaelsen r267120 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 13:00:09 +0100 b_michaelsen r267118 : #i94949# cleanup in SwXBookmark, whitespace
2009-01-29 10:35:10 +0100 b_michaelsen r267101 : #i94949# renamed SetCrsrToBkmk to SetCrsrToMark, moving to start/end of doc if no more bookmarks can be found
2009-01-28 17:05:36 +0100 b_michaelsen r267070 : #i94949# fixed order in aProvNamesId in unocoll.cxx
2009-01-28 15:46:13 +0100 b_michaelsen r267063 : #i94949# documentation
2009-01-28 15:36:59 +0100 b_michaelsen r267062 : #i94949# removing superficial #include
2009-01-28 15:30:36 +0100 b_michaelsen r267061 : #i94949# basic code conventions
2009-01-28 11:14:30 +0100 b_michaelsen r267039 : #i94949# comparing to the actual name of the new mark
2009-01-26 15:22:25 +0100 b_michaelsen r266927 : #i94949# performance fixes
2009-01-14 21:16:56 +0100 b_michaelsen r266332 : #i94949# fixing linux x86-64 compiler warnings
2009-01-14 19:52:06 +0100 b_michaelsen r266331 : #i94949# fixing some compiler warnings
2008-12-15 13:04:49 +0100 b_michaelsen r265474 : #i94949# fixed microsoft compiler warnings
2008-12-12 18:26:02 +0100 b_michaelsen r265434 : #i94949# fixed pro platform buildbreakers
2008-12-11 17:51:24 +0100 b_michaelsen r265342 : CWS-TOOLING: rebase CWS swrefactormarks2 to trunk@264807 (milestone: DEV300:m37)
2008-12-09 18:30:59 +0100 b_michaelsen r265134 : #i94949# fixed IDocumentMarkAccess::GetType for new mark inheritance tree
2008-12-09 16:56:26 +0100 b_michaelsen r265118 : #i94949# fixed deleteMark optimization
2008-12-09 14:55:58 +0100 b_michaelsen r265092 : #i94949# DdeLink and DdeBookmark
2008-12-05 18:28:05 +0100 b_michaelsen r264914 : #i94949# fixed InitDoc in bookmarks
2008-12-02 02:23:51 +0100 b_michaelsen r264649 : #i94949# removed obsolete naming proposal code in SwXTextRange, fixed navigator reminders to forget the oldest reminder when the pool is empty
2008-12-02 02:05:19 +0100 b_michaelsen r264648 : #i94949# using bisect search for delete
2008-12-02 01:58:16 +0100 b_michaelsen r264647 : #i94949# using bisect search for delete
2008-12-02 01:37:33 +0100 b_michaelsen r264646 : #i94949# using bisect search for delete
2008-12-02 01:03:29 +0100 b_michaelsen r264645 : #i94949# fixed deleteMark crash
2008-12-01 20:55:00 +0100 b_michaelsen r264638 : #i94949# removed crossrefs from ui enumerations
2008-12-01 15:48:12 +0100 b_michaelsen r264613 : #i94949# removed superfluous local functions
2008-12-01 15:01:19 +0100 b_michaelsen r264608 : #i94949# optimized insertion of new marks
2008-12-01 14:33:21 +0100 b_michaelsen r264603 : #i94949# simplified code finding Fieldmark for a position
2008-12-01 14:05:55 +0100 b_michaelsen r264598 : #i94949# fixed reverse travelling through marks, removed obsolete getUniqueMarkName()
2008-11-27 18:48:15 +0100 b_michaelsen r264515 : #i94949# fixed _SaveCntntIdx and friends
2008-11-27 15:59:49 +0100 b_michaelsen r264500 : #i94949# fix Mark position only in ctor
2008-11-27 15:52:28 +0100 b_michaelsen r264497 : #i94949# fixed Bug in SwXBookmark, was using pDoc too early
2008-11-26 14:54:22 +0100 b_michaelsen r264396 : #i94949# fixed documentation, simplified navigator reminder code
2008-11-24 20:45:51 +0100 b_michaelsen r264266 : #i94949# removed last obsolete getUniqueMarkName calls
2008-11-24 20:21:35 +0100 b_michaelsen r264265 : #i94949# fixed typo in IDocumentMarkAccess, removed obsolete getUniqueMarkName calls
2008-11-24 18:34:32 +0100 b_michaelsen r264264 : #i94949# repositioning of Marks, removed possibility to delete marks by name in the core, refactoring of navigator reminder generation
2008-11-21 14:08:49 +0100 b_michaelsen r264137 : #i94949# simplified makeMark
2008-11-21 12:07:09 +0100 b_michaelsen r264120 : #i94949# moved ShortName and KeyCode from IMark to IBookmark
2008-11-19 12:50:49 +0100 b_michaelsen r263981 : #i94949# starting refactoring of bookmark naming
2008-11-19 11:31:08 +0100 b_michaelsen r263972 : #i94949# getting rid of obsolete dynamic casts
2008-11-18 19:06:09 +0100 b_michaelsen r263795 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 17:50:18 +0100 b_michaelsen r263792 : #i94949# getting rid of index based mark access, IDocumentMarkAccess already provides iterators
2008-11-18 16:48:20 +0100 b_michaelsen r263783 : #i94949# removed methods from crsrsh which are already available directly via IDocumentMarkAccess
2008-11-18 11:31:35 +0100 b_michaelsen r263753 : #i94949# cleaning up mark code in crsrsh
2008-11-17 10:15:25 +0100 b_michaelsen r263705 : #i94949# removed possible integer overflow
2008-11-14 18:48:45 +0100 b_michaelsen r263695 : #i94949# management of mark names in MarkManager
2008-11-14 18:23:40 +0100 b_michaelsen r263693 : #i94949# using polymorphism to do mark-specific setup in SwDoc
2008-11-14 16:27:09 +0100 b_michaelsen r263684 : #i94949# got rid of makeCrossRefBookmark
2008-11-14 13:03:32 +0100 b_michaelsen r263674 : #i94949# refactored Correction methods
2008-11-13 12:27:55 +0100 b_michaelsen r263631 : #i94949# got rid of old-style tools assertions in new code
2008-11-12 16:58:16 +0100 b_michaelsen r263608 : #i94949# added assertion for unique names
2008-11-12 16:55:18 +0100 b_michaelsen r263607 : #i94949# maked XFormField deprecated
2008-11-12 13:04:29 +0100 b_michaelsen r263587 : #i94949# replaced IDocumentMarkAccess::GetType with simple dynamic_cast where possible
2008-11-11 18:45:53 +0100 b_michaelsen r263572 : #i94949# cleaned up SwHstryBookmark
2008-11-11 13:48:18 +0100 b_michaelsen r263557 : #i94949# removed dynamic_casts to SwModify by inheriting IMark from it
2008-11-11 11:26:28 +0100 b_michaelsen r263548 : #i94949# fixed SwXBookmark
2008-11-10 17:01:19 +0100 b_michaelsen r263529 : #i94949# fixed DdeBookmarks in clipboard
2008-11-10 16:44:52 +0100 b_michaelsen r263527 : #i94949# formatting
2008-11-10 16:29:16 +0100 b_michaelsen r263526 : #i94949# fixing unoobj.cxx
2008-11-10 16:23:50 +0100 b_michaelsen r263525 : #i94949# cleaning up crossrefbookmark.cxx/.hxx
2008-11-10 16:02:08 +0100 b_michaelsen r263524 : #i94949# Pdf Export should only generate 'real' bookmarks
2008-11-10 15:33:58 +0100 b_michaelsen r263521 : #i94949# removed const_casts
2008-11-10 15:12:06 +0100 b_michaelsen r263520 : #i94949# moved _DelBookmarks into MarksManager
2008-11-07 18:48:38 +0100 b_michaelsen r263480 : #i94949# using iterator interface
2008-11-07 18:41:46 +0100 b_michaelsen r263478 : #i94949# using iterator interface
2008-11-07 18:07:41 +0100 b_michaelsen r263477 : #i94949# using iterator interface
2008-11-07 17:54:41 +0100 b_michaelsen r263476 : #i94949# using iterator interface
2008-11-07 17:44:41 +0100 b_michaelsen r263475 : #i94949# moved correction methods into MarkManager
2008-11-06 18:47:28 +0100 b_michaelsen r263404 : #i94949# getting rid of superfluous const_casts
2008-11-06 17:58:01 +0100 b_michaelsen r263403 : #i94949# no more setting of mark positions outside of the core
2008-11-06 17:08:37 +0100 b_michaelsen r263401 : #i94949# removed setters from IMark
2008-11-06 13:55:25 +0100 b_michaelsen r263383 : #i94949 SwDoc does not implement IDocumentMarkAccess anymore
2008-11-04 18:17:03 +0100 b_michaelsen r263333 : #i94949# began removing IDocumentMarkAccess from SwDoc
2008-11-04 16:48:34 +0100 b_michaelsen r263330 : removing dead code (SwBitArray) found by mst
2008-11-04 16:29:32 +0100 b_michaelsen r263329 : removing dead code (SwBitArray) found by mst
2008-11-04 14:57:48 +0100 b_michaelsen r263326 : removing dead code (SwBitArray) found by mst
2008-11-04 14:50:18 +0100 b_michaelsen r263325 : #i94949# stricter typing in IDocumentMarkAccess
2008-10-24 15:16:27 +0200 b_michaelsen r262647 : #i94949# renamed ::sw:🔖:SimpleMark to NavigatorReminder to fit the IDocumentMarkAccess enum
2008-10-24 15:10:10 +0200 b_michaelsen r262646 : #i94949# only 'real' bookmark implement IBookmark, Marks also get removed from m_vFieldmarks on delete/clear
2008-10-24 13:06:23 +0200 b_michaelsen r262636 : #i94949# Fieldmark tabnavigation
2008-10-23 12:16:36 +0200 b_michaelsen r262619 : #i94949# Fieldmark classes and filters
2008-10-22 13:17:18 +0200 b_michaelsen r262597 : #i94949# writer import fixes
2008-10-21 11:30:38 +0200 b_michaelsen r262565 : #i94949# renamed methods containing Bookmark in the generic IMark interface
2008-10-20 14:09:02 +0200 b_michaelsen r262318 : #i94949# fixed SwDoc::CorrRel
2008-10-16 22:45:13 +0200 b_michaelsen r262273 : #i94949 simplified Before/After methods
2008-10-16 21:40:57 +0200 b_michaelsen r262271 : #i94949 renamed SimpleMark to NavigatorReminder
2008-10-16 21:15:23 +0200 b_michaelsen r262270 : #i94949 using shared_ptr only in MarkManager
2008-10-16 17:46:37 +0200 b_michaelsen r262269 : #i94949# getFieldmarkBefore and getFieldmarkAfter
2008-10-16 17:12:13 +0200 b_michaelsen r262265 : #i94949# cleanup in crbm.cxx
2008-10-16 12:49:01 +0200 b_michaelsen r262257 : #i94949# fixed usage of invalid iterator, fixed invalid cast
2008-10-15 15:34:20 +0200 b_michaelsen r262239 : #i94949# added moved files
2008-10-15 15:26:45 +0200 b_michaelsen r262237 : #i94949# initial reimplementation of Bookmarks
1029 lines
35 KiB
C++
1029 lines
35 KiB
C++
/*************************************************************************
|
|
*
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
*
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
|
*
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
*
|
|
* $RCSfile: dbgoutsw.cxx,v $
|
|
* $Revision: 1.27.18.2 $
|
|
*
|
|
* This file is part of OpenOffice.org.
|
|
*
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
* only, as published by the Free Software Foundation.
|
|
*
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License version 3 for more details
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
* <http://www.openoffice.org/license.html>
|
|
* for a copy of the LGPLv3 License.
|
|
*
|
|
************************************************************************/
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
#include "precompiled_sw.hxx"
|
|
#ifdef DEBUG
|
|
|
|
#include <tools/string.hxx>
|
|
#include <svtools/poolitem.hxx>
|
|
#include <svtools/itemiter.hxx>
|
|
#include <string>
|
|
#include <map>
|
|
#include <node.hxx>
|
|
#include <ndtxt.hxx>
|
|
#include <ndhints.hxx>
|
|
#include <txatbase.hxx>
|
|
#include <pam.hxx>
|
|
#include <docary.hxx>
|
|
#include <swundo.hxx>
|
|
#include <undobj.hxx>
|
|
#include <doc.hxx>
|
|
#include <frmfmt.hxx>
|
|
#include <fmtanchr.hxx>
|
|
#include <swrect.hxx>
|
|
#include <ndarr.hxx>
|
|
#include <paratr.hxx>
|
|
#include <SwNodeNum.hxx>
|
|
#include <dbgoutsw.hxx>
|
|
#include <SwRewriter.hxx>
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
static ByteString aDbgOutResult;
|
|
bool bDbgOutStdErr = false;
|
|
bool bDbgOutPrintAttrSet = false;
|
|
|
|
char* db_pretty_print(const String* str, int flags, char* fmt)
|
|
{
|
|
(void) fmt;
|
|
(void) flags;
|
|
return const_cast<char*>(dbg_out(*str));
|
|
}
|
|
|
|
template<class T>
|
|
String lcl_dbg_out_SvPtrArr(const T & rArr)
|
|
{
|
|
String aStr("[ ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
for (sal_Int16 n = 0; n < rArr.Count(); n++)
|
|
{
|
|
if (n > 0)
|
|
aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if (rArr[n])
|
|
aStr += lcl_dbg_out(*rArr[n]);
|
|
else
|
|
aStr += String("(null)", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
aStr += String(" ]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const void * pVoid)
|
|
{
|
|
char sBuffer[1024];
|
|
|
|
sprintf(sBuffer, "%p", pVoid);
|
|
|
|
String aTmpStr(sBuffer, RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return dbg_out(aTmpStr);
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const String & aStr)
|
|
{
|
|
aDbgOutResult = ByteString(aStr, RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if (bDbgOutStdErr)
|
|
fprintf(stderr, "%s", aDbgOutResult.GetBuffer());
|
|
|
|
return aDbgOutResult.GetBuffer();
|
|
}
|
|
|
|
|
|
struct CompareUShort
|
|
{
|
|
bool operator()(USHORT a, USHORT b) const
|
|
{
|
|
return a < b;
|
|
}
|
|
};
|
|
|
|
map<USHORT,String,CompareUShort> & GetItemWhichMap()
|
|
{
|
|
static map<USHORT,String,CompareUShort> aItemWhichMap;
|
|
static bool bInitialized = false;
|
|
|
|
if (! bInitialized)
|
|
{
|
|
aItemWhichMap[RES_CHRATR_CASEMAP] = String("CHRATR_CASEMAP", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CHARSETCOLOR] = String("CHRATR_CHARSETCOLOR", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_COLOR] = String("CHRATR_COLOR", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CONTOUR] = String("CHRATR_CONTOUR", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CROSSEDOUT] = String("CHRATR_CROSSEDOUT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_ESCAPEMENT] = String("CHRATR_ESCAPEMENT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_FONT] = String("CHRATR_FONT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_FONTSIZE] = String("CHRATR_FONTSIZE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_KERNING] = String("CHRATR_KERNING", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_LANGUAGE] = String("CHRATR_LANGUAGE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_POSTURE] = String("CHRATR_POSTURE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_PROPORTIONALFONTSIZE] = String("CHRATR_PROPORTIONALFONTSIZE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_SHADOWED] = String("CHRATR_SHADOWED", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_UNDERLINE] = String("CHRATR_UNDERLINE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_OVERLINE] = String("CHRATR_OVERLINE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_WEIGHT] = String("CHRATR_WEIGHT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_WORDLINEMODE] = String("CHRATR_WORDLINEMODE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_AUTOKERN] = String("CHRATR_AUTOKERN", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_BLINK] = String("CHRATR_BLINK", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_NOHYPHEN] = String("CHRATR_NOHYPHEN", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_NOLINEBREAK] = String("CHRATR_NOLINEBREAK", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_BACKGROUND] = String("CHRATR_BACKGROUND", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CJK_FONT] = String("CHRATR_CJK_FONT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CJK_FONTSIZE] = String("CHRATR_CJK_FONTSIZE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CJK_LANGUAGE] = String("CHRATR_CJK_LANGUAGE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CJK_POSTURE] = String("CHRATR_CJK_POSTURE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CJK_WEIGHT] = String("CHRATR_CJK_WEIGHT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CTL_FONT] = String("CHRATR_CTL_FONT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CTL_FONTSIZE] = String("CHRATR_CTL_FONTSIZE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CTL_LANGUAGE] = String("CHRATR_CTL_LANGUAGE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CTL_POSTURE] = String("CHRATR_CTL_POSTURE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_CTL_WEIGHT] = String("CHRATR_CTL_WEIGHT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_ROTATE] = String("CHRATR_ROTATE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_EMPHASIS_MARK] = String("CHRATR_EMPHASIS_MARK", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_TWO_LINES] = String("CHRATR_TWO_LINES", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_SCALEW] = String("CHRATR_SCALEW", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_RELIEF] = String("CHRATR_RELIEF", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHRATR_HIDDEN] = String("CHRATR_HIDDEN", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_AUTOFMT] = String("TXTATR_AUTOFMT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_INETFMT] = String("TXTATR_INETFMT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_REFMARK] = String("TXTATR_REFMARK", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_TOXMARK] = String("TXTATR_TOXMARK", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_CHARFMT] = String("TXTATR_CHARFMT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_DUMMY5] = String("TXTATR_DUMMY5", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_CJK_RUBY] = String("TXTATR_CJK_RUBY", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_UNKNOWN_CONTAINER] = String("TXTATR_UNKNOWN_CONTAINER", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_DUMMY6] = String("TXTATR_DUMMY6", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_DUMMY7] = String("TXTATR_DUMMY7", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_FIELD] = String("TXTATR_FIELD", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_FLYCNT] = String("TXTATR_FLYCNT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_FTN] = String("TXTATR_FTN", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_SOFTHYPH] = String("TXTATR_SOFTHYPH", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_HARDBLANK] = String("TXTATR_HARDBLANK", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_DUMMY1] = String("TXTATR_DUMMY1", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TXTATR_DUMMY2] = String("TXTATR_DUMMY2", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_LINESPACING] = String("PARATR_LINESPACING", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_ADJUST] = String("PARATR_ADJUST", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_SPLIT] = String("PARATR_SPLIT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_ORPHANS] = String("PARATR_ORPHANS", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_WIDOWS] = String("PARATR_WIDOWS", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_TABSTOP] = String("PARATR_TABSTOP", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_HYPHENZONE] = String("PARATR_HYPHENZONE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_DROP] = String("PARATR_DROP", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_REGISTER] = String("PARATR_REGISTER", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_NUMRULE] = String("PARATR_NUMRULE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_SCRIPTSPACE] = String("PARATR_SCRIPTSPACE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_HANGINGPUNCTUATION] = String("PARATR_HANGINGPUNCTUATION", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_FORBIDDEN_RULES] = String("PARATR_FORBIDDEN_RULES", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_VERTALIGN] = String("PARATR_VERTALIGN", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_SNAPTOGRID] = String("PARATR_SNAPTOGRID", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PARATR_CONNECT_BORDER] = String("PARATR_CONNECT_BORDER", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_FILL_ORDER] = String("FILL_ORDER", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_FRM_SIZE] = String("FRM_SIZE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PAPER_BIN] = String("PAPER_BIN", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_LR_SPACE] = String("LR_SPACE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_UL_SPACE] = String("UL_SPACE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PAGEDESC] = String("PAGEDESC", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_BREAK] = String("BREAK", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CNTNT] = String("CNTNT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_HEADER] = String("HEADER", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_FOOTER] = String("FOOTER", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PRINT] = String("PRINT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_OPAQUE] = String("OPAQUE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_PROTECT] = String("PROTECT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_SURROUND] = String("SURROUND", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_VERT_ORIENT] = String("VERT_ORIENT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_HORI_ORIENT] = String("HORI_ORIENT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_ANCHOR] = String("ANCHOR", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_BACKGROUND] = String("BACKGROUND", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_BOX] = String("BOX", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_SHADOW] = String("SHADOW", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_FRMMACRO] = String("FRMMACRO", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_COL] = String("COL", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_KEEP] = String("KEEP", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_URL] = String("URL", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_EDIT_IN_READONLY] = String("EDIT_IN_READONLY", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_LAYOUT_SPLIT] = String("LAYOUT_SPLIT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_CHAIN] = String("CHAIN", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_TEXTGRID] = String("TEXTGRID", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_LINENUMBER ] = String("LINENUMBER ", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_FTN_AT_TXTEND] = String("FTN_AT_TXTEND", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_END_AT_TXTEND] = String("END_AT_TXTEND", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_COLUMNBALANCE] = String("COLUMNBALANCE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_FRAMEDIR] = String("FRAMEDIR", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_HEADER_FOOTER_EAT_SPACING] = String("HEADER_FOOTER_EAT_SPACING", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_ROW_SPLIT] = String("ROW_SPLIT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_MIRRORGRF] = String("GRFATR_MIRRORGRF", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_CROPGRF] = String("GRFATR_CROPGRF", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_ROTATION] = String("GRFATR_ROTATION", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_LUMINANCE] = String("GRFATR_LUMINANCE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_CONTRAST] = String("GRFATR_CONTRAST", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_CHANNELR] = String("GRFATR_CHANNELR", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_CHANNELG] = String("GRFATR_CHANNELG", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_CHANNELB] = String("GRFATR_CHANNELB", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_GAMMA] = String("GRFATR_GAMMA", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_INVERT] = String("GRFATR_INVERT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_TRANSPARENCY] = String("GRFATR_TRANSPARENCY", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_GRFATR_DRAWMODE] = String("GRFATR_DRAWMODE", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_BOXATR_FORMAT] = String("BOXATR_FORMAT", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_BOXATR_FORMULA] = String("BOXATR_FORMULA", RTL_TEXTENCODING_ASCII_US);
|
|
aItemWhichMap[RES_BOXATR_VALUE] = String("BOXATR_VALUE", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
bInitialized = true;
|
|
}
|
|
|
|
return aItemWhichMap;
|
|
}
|
|
|
|
const String lcl_dbg_out(const SfxPoolItem & rItem)
|
|
{
|
|
String aStr("[ ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if (GetItemWhichMap().find(rItem.Which()) != GetItemWhichMap().end())
|
|
aStr += GetItemWhichMap()[rItem.Which()];
|
|
else
|
|
aStr += String::CreateFromInt32(rItem.Which());
|
|
|
|
aStr += String(" ]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem & rItem)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rItem));
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem * pItem)
|
|
{
|
|
return dbg_out(pItem ? lcl_dbg_out(*pItem) :
|
|
String("(nil)", RTL_TEXTENCODING_ASCII_US));
|
|
}
|
|
|
|
SW_DLLPUBLIC const String lcl_dbg_out(const SfxItemSet & rSet)
|
|
{
|
|
SfxItemIter aIter(rSet);
|
|
const SfxPoolItem * pItem;
|
|
bool bFirst = true;
|
|
String aStr = String("[ ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
pItem = aIter.FirstItem();
|
|
|
|
while (pItem )
|
|
{
|
|
if (!bFirst)
|
|
aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if ((sal_uIntPtr)pItem != SAL_MAX_SIZE)
|
|
aStr += lcl_dbg_out(*pItem);
|
|
else
|
|
aStr += String("invalid", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
bFirst = false;
|
|
|
|
pItem = aIter.NextItem();
|
|
}
|
|
|
|
aStr += String(" ]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SfxItemSet & rSet)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rSet));
|
|
}
|
|
|
|
const String lcl_dbg_out(const SwTxtAttr & rAttr)
|
|
{
|
|
String aStr("[ ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aStr += String::CreateFromInt32(*rAttr.GetStart());
|
|
aStr += String("->", RTL_TEXTENCODING_ASCII_US);
|
|
aStr += String::CreateFromInt32(*rAttr.GetEnd());
|
|
aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr += lcl_dbg_out(rAttr.GetAttr());
|
|
|
|
aStr += String(" ]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwTxtAttr & rAttr)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rAttr));
|
|
}
|
|
|
|
const String lcl_dbg_out(const SwpHints & rHints)
|
|
{
|
|
String aStr("[ SwpHints\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
for (USHORT i = 0; i < rHints.Count(); i++)
|
|
{
|
|
aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr += lcl_dbg_out(*rHints[i]);
|
|
aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
aStr += String("]\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwpHints &rHints)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rHints));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwPosition & rPos)
|
|
{
|
|
String aStr("( ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aStr += String::CreateFromInt32(rPos.nNode.GetIndex());
|
|
aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr += String::CreateFromInt32(rPos.nContent.GetIndex());
|
|
aStr += String(": ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr += String::CreateFromInt32
|
|
(reinterpret_cast<sal_IntPtr>(rPos.nContent.GetIdxReg()), 16);
|
|
|
|
aStr += String(" )", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwPosition & rPos)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rPos));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwPaM & rPam)
|
|
{
|
|
String aStr("[ Pt: ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aStr += lcl_dbg_out(*rPam.GetPoint());
|
|
|
|
if (rPam.HasMark())
|
|
{
|
|
aStr += String(", Mk: ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr += lcl_dbg_out(*rPam.GetMark());
|
|
}
|
|
|
|
aStr += String(" ]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwPaM & rPam)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rPam));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwNodeNum & )
|
|
{
|
|
return String();/*rNum.ToString();*/
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwNodeNum & rNum)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rNum));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwRect & rRect)
|
|
{
|
|
String aResult("[ [", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aResult += String::CreateFromInt32(rRect.Left());
|
|
aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
aResult += String::CreateFromInt32(rRect.Top());
|
|
aResult += String("], [", RTL_TEXTENCODING_ASCII_US);
|
|
aResult += String::CreateFromInt32(rRect.Right());
|
|
aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
aResult += String::CreateFromInt32(rRect.Bottom());
|
|
|
|
aResult += String("] ]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aResult;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwRect & rRect)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rRect));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwFrmFmt & rFrmFmt)
|
|
{
|
|
String aResult("[ ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
char sBuffer[256];
|
|
sprintf(sBuffer, "%p", &rFrmFmt);
|
|
|
|
aResult += String(sBuffer, RTL_TEXTENCODING_ASCII_US);
|
|
aResult += String("(", RTL_TEXTENCODING_ASCII_US);
|
|
aResult += rFrmFmt.GetName();
|
|
aResult += String(")", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if (rFrmFmt.IsAuto())
|
|
aResult += String("*", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aResult += String(" ,", RTL_TEXTENCODING_ASCII_US);
|
|
aResult += lcl_dbg_out(rFrmFmt.FindLayoutRect());
|
|
aResult += String(" ]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aResult;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwFrmFmt & rFrmFmt)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rFrmFmt));
|
|
}
|
|
|
|
const String lcl_AnchoredFrames(const SwNode & rNode)
|
|
{
|
|
String aResult("[", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
const SwDoc * pDoc = rNode.GetDoc();
|
|
if (pDoc)
|
|
{
|
|
const SwSpzFrmFmts * pFrmFmts = pDoc->GetSpzFrmFmts();
|
|
|
|
if (pFrmFmts)
|
|
{
|
|
bool bFirst = true;
|
|
for (USHORT nI = 0; nI < pFrmFmts->Count(); nI++)
|
|
{
|
|
const SwFmtAnchor & rAnchor = (*pFrmFmts)[nI]->GetAnchor();
|
|
const SwPosition * pPos = rAnchor.GetCntntAnchor();
|
|
|
|
if (pPos && &pPos->nNode.GetNode() == &rNode)
|
|
{
|
|
if (! bFirst)
|
|
aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if ((*pFrmFmts)[nI])
|
|
aResult += lcl_dbg_out(*(*pFrmFmts)[nI]);
|
|
bFirst = false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
aResult += String("]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aResult;
|
|
}
|
|
|
|
String lcl_dbg_out_NumType(sal_Int16 nType)
|
|
{
|
|
String aTmpStr;
|
|
|
|
switch (nType)
|
|
{
|
|
case SVX_NUM_NUMBER_NONE:
|
|
aTmpStr += String(" NONE", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
break;
|
|
case SVX_NUM_CHARS_UPPER_LETTER:
|
|
aTmpStr += String(" CHARS_UPPER_LETTER",
|
|
RTL_TEXTENCODING_ASCII_US);
|
|
|
|
break;
|
|
case SVX_NUM_CHARS_LOWER_LETTER:
|
|
aTmpStr += String(" CHARS_LOWER_LETTER",
|
|
RTL_TEXTENCODING_ASCII_US);
|
|
|
|
break;
|
|
case SVX_NUM_ROMAN_UPPER:
|
|
aTmpStr += String(" ROMAN_UPPER",
|
|
RTL_TEXTENCODING_ASCII_US);
|
|
|
|
break;
|
|
case SVX_NUM_ROMAN_LOWER:
|
|
aTmpStr += String(" ROMAN_LOWER",
|
|
RTL_TEXTENCODING_ASCII_US);
|
|
|
|
break;
|
|
case SVX_NUM_ARABIC:
|
|
aTmpStr += String(" ARABIC",
|
|
RTL_TEXTENCODING_ASCII_US);
|
|
|
|
break;
|
|
default:
|
|
aTmpStr += String(" ??",
|
|
RTL_TEXTENCODING_ASCII_US);
|
|
|
|
break;
|
|
}
|
|
|
|
return aTmpStr;
|
|
}
|
|
|
|
String lcl_dbg_out(const SwNode & rNode)
|
|
{
|
|
String aTmpStr;
|
|
|
|
aTmpStr += String("<node ", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += String("index =\"", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += String::CreateFromInt32(rNode.GetIndex());
|
|
aTmpStr += String("\"", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
#ifndef PRODUCT
|
|
aTmpStr += String(" serial=\"", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += String::CreateFromInt32(rNode.GetSerial());
|
|
aTmpStr += String("\"", RTL_TEXTENCODING_ASCII_US);
|
|
#endif
|
|
|
|
aTmpStr += String(" pointer=\"", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
char aBuffer[128];
|
|
sprintf(aBuffer, "%p", &rNode);
|
|
aTmpStr += String(aBuffer, RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aTmpStr += String("\">", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
const SwTxtNode * pTxtNode = rNode.GetTxtNode();
|
|
|
|
if (rNode.IsTxtNode())
|
|
{
|
|
const SfxItemSet * pAttrSet = pTxtNode->GetpSwAttrSet();
|
|
|
|
aTmpStr += String("<txt>", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += pTxtNode->GetTxt().Copy(0, 10);
|
|
aTmpStr += String("</txt>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if (rNode.IsTableNode())
|
|
aTmpStr += String("<tbl/>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aTmpStr += String("<outlinelevel>", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += String::CreateFromInt32(pTxtNode->GetAttrOutlineLevel()-1);
|
|
aTmpStr += String("</outlinelevel>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
const SwNumRule * pNumRule = pTxtNode->GetNumRule();
|
|
|
|
if (pNumRule != NULL)
|
|
{
|
|
aTmpStr += String("<number>", RTL_TEXTENCODING_ASCII_US);
|
|
if ( pTxtNode->GetNum() )
|
|
{
|
|
aTmpStr += lcl_dbg_out(*(pTxtNode->GetNum()));
|
|
}
|
|
aTmpStr += String("</number>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aTmpStr += String("<rule>", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += pNumRule->GetName();
|
|
|
|
const SfxPoolItem * pItem = NULL;
|
|
|
|
if (pAttrSet && SFX_ITEM_SET ==
|
|
pAttrSet->GetItemState(RES_PARATR_NUMRULE, FALSE, &pItem))
|
|
{
|
|
aTmpStr += String("(", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr +=
|
|
static_cast<const SwNumRuleItem *>(pItem)->GetValue();
|
|
aTmpStr += String(")", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += String("*", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
const SwNumFmt * pNumFmt = NULL;
|
|
aTmpStr += String("</rule>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if (pTxtNode->GetActualListLevel() > 0)
|
|
pNumFmt = pNumRule->GetNumFmt( static_cast< USHORT >(pTxtNode->GetActualListLevel()) );
|
|
|
|
if (pNumFmt)
|
|
{
|
|
aTmpStr += String("<numformat>", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr +=
|
|
lcl_dbg_out_NumType(pNumFmt->GetNumberingType());
|
|
aTmpStr += String("</numformat>", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
}
|
|
|
|
if (pTxtNode->IsCountedInList())
|
|
aTmpStr += String("<counted/>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
SwFmtColl * pColl = pTxtNode->GetFmtColl();
|
|
|
|
if (pColl)
|
|
{
|
|
aTmpStr += String("<coll>", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += pColl->GetName();
|
|
|
|
aTmpStr += String("(", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += String::CreateFromInt32
|
|
//(static_cast<SwTxtFmtColl *>(pColl)->GetOutlineLevel());//#outline level,zhaojianwei
|
|
(static_cast<SwTxtFmtColl *>(pColl)->GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
|
|
|
|
const SwNumRuleItem & rItem =
|
|
static_cast<const SwNumRuleItem &>
|
|
(pColl->GetFmtAttr(RES_PARATR_NUMRULE));
|
|
const String sNumruleName = rItem.GetValue();
|
|
|
|
if (sNumruleName.Len() > 0)
|
|
{
|
|
aTmpStr += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += sNumruleName;
|
|
}
|
|
aTmpStr += String(")", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += String("</coll>", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
SwFmtColl * pCColl = pTxtNode->GetCondFmtColl();
|
|
|
|
if (pCColl)
|
|
{
|
|
aTmpStr += String("<ccoll>", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += pCColl->GetName();
|
|
aTmpStr += String("</ccoll>", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
aTmpStr += String("<frms>", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += lcl_AnchoredFrames(rNode);
|
|
aTmpStr += String("</frms>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if (bDbgOutPrintAttrSet)
|
|
{
|
|
aTmpStr += String("<attrs>", RTL_TEXTENCODING_ASCII_US);
|
|
aTmpStr += lcl_dbg_out(pTxtNode->GetSwAttrSet());
|
|
aTmpStr += String("</attrs>", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
}
|
|
else if (rNode.IsStartNode())
|
|
aTmpStr += String("<start/>", RTL_TEXTENCODING_ASCII_US);
|
|
else if (rNode.IsEndNode())
|
|
aTmpStr += String("<end/>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aTmpStr += String("</node>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aTmpStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwNode & rNode)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rNode));
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwNode * pNode)
|
|
{
|
|
if (NULL != pNode)
|
|
return dbg_out(*pNode);
|
|
else
|
|
return NULL;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwCntntNode * pNode)
|
|
{
|
|
if (NULL != pNode)
|
|
return dbg_out(*pNode);
|
|
else
|
|
return NULL;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwTxtNode * pNode)
|
|
{
|
|
if (NULL != pNode)
|
|
return dbg_out(*pNode);
|
|
else
|
|
return NULL;
|
|
}
|
|
|
|
BOOL lcl_dbg_add_node(const SwNodePtr & pNode, void * pArgs)
|
|
{
|
|
if (pNode)
|
|
{
|
|
(*((String *) pArgs)) += lcl_dbg_out(*pNode);
|
|
(*((String *) pArgs)) += String("\n", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
//MBA: this code didn't compile, needed to add a return value
|
|
return TRUE;
|
|
}
|
|
|
|
String lcl_dbg_out(SwNodes & rNodes)
|
|
{
|
|
String aStr("<nodes>", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
for (ULONG i = 0; i < rNodes.Count(); i++)
|
|
{
|
|
SwNode * pNode = rNodes[i];
|
|
|
|
if (pNode->IsEndNode())
|
|
aStr += String("</nodes>\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aStr += lcl_dbg_out(*pNode);
|
|
aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if (pNode->IsStartNode())
|
|
aStr += String("<nodes>", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
aStr += String("</nodes>\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(SwNodes & rNodes)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rNodes));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwUndo & rUndo)
|
|
{
|
|
String aStr("[ ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aStr += String::CreateFromInt32(rUndo.GetId());
|
|
aStr += String(": ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
switch(rUndo.GetId())
|
|
{
|
|
case UNDO_START:
|
|
aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr +=
|
|
String::CreateFromInt32(dynamic_cast
|
|
<const SwUndoStart &>(rUndo).
|
|
GetUserId());
|
|
aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr += String::CreateFromInt32(dynamic_cast
|
|
<const SwUndoStart &>(rUndo).
|
|
GetEndOffset());
|
|
aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
break;
|
|
|
|
case UNDO_END:
|
|
aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr +=
|
|
String::CreateFromInt32(dynamic_cast
|
|
<const SwUndoEnd &>(rUndo).
|
|
GetId());
|
|
aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr += String::CreateFromInt32(dynamic_cast
|
|
<const SwUndoEnd &>(rUndo).
|
|
GetSttOffset());
|
|
aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
break;
|
|
|
|
default:
|
|
break;
|
|
}
|
|
|
|
aStr += rUndo.GetComment();
|
|
aStr += String(" ]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwUndo & rUndo)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rUndo));
|
|
}
|
|
|
|
String lcl_dbg_out(SwOutlineNodes & rNodes)
|
|
{
|
|
String aStr("[\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
for (USHORT i = 0; i < rNodes.Count(); i++)
|
|
{
|
|
aStr += lcl_dbg_out(*rNodes[i]);
|
|
aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
aStr += String("]\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(SwOutlineNodes & rNodes)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rNodes));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwUndos & rUndos)
|
|
{
|
|
USHORT nIndent = 0;
|
|
|
|
String aStr("[\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
for (USHORT n = 0; n < rUndos.Count(); n++)
|
|
{
|
|
SwUndo * pUndo = rUndos[n];
|
|
|
|
if (pUndo->GetId() == UNDO_END)
|
|
nIndent--;
|
|
|
|
for (USHORT nI = 0; n < nIndent; nI++)
|
|
aStr += String(" ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aStr += lcl_dbg_out(*pUndo);
|
|
aStr += String("\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
if (pUndo->GetId() == UNDO_START)
|
|
nIndent++;
|
|
}
|
|
|
|
aStr += String("]\n", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwUndos & rUndos)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rUndos));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwRewriter & rRewriter)
|
|
{
|
|
(void) rRewriter;
|
|
String aResult;
|
|
|
|
//aResult = rRewriter.ToString();
|
|
|
|
return aResult;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwRewriter & rRewriter)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rRewriter));
|
|
}
|
|
|
|
String lcl_dbg_out(const SvxNumberFormat & rFmt)
|
|
{
|
|
String aResult;
|
|
|
|
aResult = lcl_dbg_out_NumType(rFmt.GetNumberingType());
|
|
|
|
return aResult;
|
|
}
|
|
|
|
String lcl_dbg_out(const SwNumRule & rRule)
|
|
{
|
|
String aResult("[ ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aResult += rRule.GetName();
|
|
aResult += String(" [", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
for (BYTE n = 0; n < MAXLEVEL; n++)
|
|
{
|
|
if (n > 0)
|
|
aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aResult += lcl_dbg_out(rRule.Get(n));
|
|
}
|
|
|
|
aResult += String("]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aResult += String("]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aResult;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwNumRule & rRule)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rRule));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwTxtFmtColl & rFmt)
|
|
{
|
|
String aResult(rFmt.GetName());
|
|
|
|
aResult += String("(", RTL_TEXTENCODING_ASCII_US);
|
|
aResult += String::CreateFromInt32(rFmt.GetAttrOutlineLevel());
|
|
aResult += String(")", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aResult;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwTxtFmtColl & rFmt)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rFmt));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwFrmFmts & rFrmFmts)
|
|
{
|
|
return lcl_dbg_out_SvPtrArr<SwFrmFmts>(rFrmFmts);
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwFrmFmts & rFrmFmts)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rFrmFmts));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwNumRuleTbl & rTbl)
|
|
{
|
|
String aResult("[", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
for (USHORT n = 0; n < rTbl.Count(); n++)
|
|
{
|
|
if (n > 0)
|
|
aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aResult += rTbl[n]->GetName();
|
|
|
|
char sBuffer[256];
|
|
sprintf(sBuffer, "(%p)", rTbl[n]);
|
|
aResult += String(sBuffer, RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
aResult += String("]", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aResult;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwNumRuleTbl & rTbl)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rTbl));
|
|
}
|
|
|
|
String lcl_TokenType2Str(FormTokenType nType)
|
|
{
|
|
switch(nType)
|
|
{
|
|
case TOKEN_ENTRY_NO:
|
|
return String("NO", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_ENTRY_TEXT:
|
|
return String("ENTRY_TEXT", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_ENTRY:
|
|
return String("ENTRY", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_TAB_STOP:
|
|
return String("TAB_STOP", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_TEXT:
|
|
return String("TOKEN_TEXT", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_PAGE_NUMS:
|
|
return String("NUMS", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_CHAPTER_INFO:
|
|
return String("CHAPTER_INFO", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_LINK_START:
|
|
return String("LINK_START", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_LINK_END:
|
|
return String("LINK_END", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_AUTHORITY:
|
|
return String("AUTHORITY", RTL_TEXTENCODING_ASCII_US);
|
|
case TOKEN_END:
|
|
return String("END", RTL_TEXTENCODING_ASCII_US);
|
|
default:
|
|
return String("??", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
ASSERT(false, "should not be reached");
|
|
|
|
return String("??", RTL_TEXTENCODING_ASCII_US);
|
|
}
|
|
|
|
String lcl_dbg_out(const SwFormToken & rToken)
|
|
{
|
|
return rToken.GetString();
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwFormToken & rToken)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rToken));
|
|
}
|
|
|
|
String lcl_dbg_out(const SwFormTokens & rTokens)
|
|
{
|
|
String aStr("[", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
SwFormTokens::const_iterator aIt;
|
|
|
|
for (aIt = rTokens.begin(); aIt != rTokens.end(); aIt++)
|
|
{
|
|
if (aIt != rTokens.begin())
|
|
aStr += String(", ", RTL_TEXTENCODING_ASCII_US);
|
|
|
|
aStr += lcl_TokenType2Str(aIt->eTokenType);
|
|
aStr += String(": ", RTL_TEXTENCODING_ASCII_US);
|
|
aStr += lcl_dbg_out(*aIt);
|
|
}
|
|
|
|
aStr += String("]" , RTL_TEXTENCODING_ASCII_US);
|
|
|
|
return aStr;
|
|
}
|
|
|
|
SW_DLLPUBLIC const char * dbg_out(const SwFormTokens & rTokens)
|
|
{
|
|
return dbg_out(lcl_dbg_out(rTokens));
|
|
}
|
|
#endif // DEBUG
|
|
|