summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-12-21 20:40:13 +0100
committerArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-12-21 20:40:13 +0100
commit884fa769a72a05840d8b58b9bb9a8cc6efd634f9 (patch)
treeb406778b578c633cf66fdec30007604899fb2a2a /sw/source/core
parent7005c0671d1df923c036687e3e39293620db2151 (diff)
parent3439c301e10bf14bdc7d1494ea0a4b5f170627bb (diff)
aw078: resync to DEV300m68for integration
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx8
-rw-r--r--sw/source/core/access/accmap.cxx18
-rw-r--r--sw/source/core/attr/calbck.cxx6
-rw-r--r--sw/source/core/attr/hints.cxx16
-rw-r--r--sw/source/core/attr/swatrset.cxx4
-rw-r--r--sw/source/core/bastyp/bparr.cxx2
-rw-r--r--sw/source/core/bastyp/calc.cxx4
-rw-r--r--sw/source/core/bastyp/index.cxx10
-rw-r--r--sw/source/core/bastyp/init.cxx6
-rw-r--r--sw/source/core/bastyp/swcache.cxx20
-rw-r--r--sw/source/core/bastyp/swrect.cxx123
-rw-r--r--sw/source/core/bastyp/swregion.cxx2
-rw-r--r--sw/source/core/crsr/crsrsh.cxx6
-rw-r--r--sw/source/core/crsr/crstrvl.cxx10
-rw-r--r--sw/source/core/crsr/findattr.cxx4
-rw-r--r--sw/source/core/crsr/findtxt.cxx2
-rw-r--r--sw/source/core/crsr/pam.cxx2
-rw-r--r--sw/source/core/crsr/swcrsr.cxx2
-rw-r--r--sw/source/core/crsr/trvltbl.cxx2
-rw-r--r--sw/source/core/crsr/viscrs.cxx6
-rw-r--r--sw/source/core/doc/SwStyleNameMapper.cxx2
-rw-r--r--sw/source/core/doc/dbgoutsw.cxx6
-rw-r--r--sw/source/core/doc/doc.cxx52
-rw-r--r--sw/source/core/doc/doccomp.cxx4
-rw-r--r--sw/source/core/doc/docdde.cxx2
-rw-r--r--sw/source/core/doc/docdesc.cxx2
-rw-r--r--sw/source/core/doc/docdraw.cxx2
-rw-r--r--sw/source/core/doc/docfld.cxx12
-rw-r--r--sw/source/core/doc/docfly.cxx4
-rw-r--r--sw/source/core/doc/docfmt.cxx99
-rw-r--r--sw/source/core/doc/docglbl.cxx6
-rw-r--r--sw/source/core/doc/doclay.cxx8
-rw-r--r--sw/source/core/doc/docnew.cxx13
-rw-r--r--sw/source/core/doc/docredln.cxx17
-rw-r--r--sw/source/core/doc/docsort.cxx26
-rw-r--r--sw/source/core/doc/docstat.cxx6
-rw-r--r--sw/source/core/doc/doctxm.cxx6
-rw-r--r--sw/source/core/doc/fmtcol.cxx2
-rw-r--r--sw/source/core/doc/htmltbl.cxx8
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/doc/number.cxx16
-rw-r--r--sw/source/core/doc/swstylemanager.cxx2
-rw-r--r--sw/source/core/doc/tblafmt.cxx8
-rw-r--r--sw/source/core/doc/tblcpy.cxx2
-rw-r--r--sw/source/core/doc/tblrwcl.cxx6
-rw-r--r--sw/source/core/doc/visiturl.cxx2
-rw-r--r--sw/source/core/docnode/ndcopy.cxx4
-rw-r--r--sw/source/core/docnode/ndindex.cxx8
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx2
-rw-r--r--sw/source/core/docnode/ndnum.cxx2
-rw-r--r--sw/source/core/docnode/ndsect.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx6
-rw-r--r--sw/source/core/docnode/node.cxx21
-rw-r--r--sw/source/core/docnode/nodes.cxx4
-rw-r--r--sw/source/core/docnode/section.cxx4
-rw-r--r--sw/source/core/docnode/swthreadmanager.cxx18
-rw-r--r--sw/source/core/draw/dpage.cxx4
-rw-r--r--sw/source/core/draw/drawdoc.cxx4
-rw-r--r--sw/source/core/edit/autofmt.cxx2
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/edit/edglss.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx6
-rw-r--r--sw/source/core/edit/ednumber.cxx2
-rw-r--r--sw/source/core/edit/edtab.cxx2
-rw-r--r--sw/source/core/edit/edtox.cxx2
-rw-r--r--sw/source/core/except/dbgloop.cxx2
-rw-r--r--sw/source/core/except/makefile.mk6
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/core/fields/dbfld.cxx2
-rw-r--r--sw/source/core/fields/docufld.cxx88
-rw-r--r--sw/source/core/fields/fldbas.cxx8
-rw-r--r--sw/source/core/fields/flddat.cxx2
-rw-r--r--sw/source/core/fields/flddropdown.cxx2
-rw-r--r--sw/source/core/fields/reffld.cxx2
-rw-r--r--sw/source/core/fields/usrfld.cxx4
-rw-r--r--sw/source/core/frmedt/fecopy.cxx2
-rw-r--r--sw/source/core/frmedt/fedesc.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx6
-rw-r--r--sw/source/core/frmedt/feflyole.cxx2
-rw-r--r--sw/source/core/graphic/ndgrf.cxx4
-rw-r--r--sw/source/core/inc/SwXTextDefaults.hxx2
-rw-r--r--sw/source/core/inc/blink.hxx2
-rw-r--r--sw/source/core/inc/dbg_lay.hxx2
-rw-r--r--sw/source/core/inc/dbgloop.hxx2
-rw-r--r--sw/source/core/inc/docsort.hxx2
-rw-r--r--sw/source/core/inc/doctxm.hxx2
-rw-r--r--sw/source/core/inc/drawfont.hxx34
-rw-r--r--sw/source/core/inc/flyfrm.hxx2
-rw-r--r--sw/source/core/inc/fntcache.hxx2
-rw-r--r--sw/source/core/inc/frame.hxx2
-rw-r--r--sw/source/core/inc/ftnfrm.hxx4
-rw-r--r--sw/source/core/inc/layact.hxx4
-rw-r--r--sw/source/core/inc/laycache.hxx2
-rw-r--r--sw/source/core/inc/mvsave.hxx2
-rw-r--r--sw/source/core/inc/noteurl.hxx2
-rw-r--r--sw/source/core/inc/pagefrm.hxx2
-rw-r--r--sw/source/core/inc/rootfrm.hxx4
-rw-r--r--sw/source/core/inc/scriptinfo.hxx2
-rw-r--r--sw/source/core/inc/scrrect.hxx2
-rw-r--r--sw/source/core/inc/swblocks.hxx2
-rw-r--r--sw/source/core/inc/swcache.hxx14
-rw-r--r--sw/source/core/inc/swfntcch.hxx2
-rw-r--r--sw/source/core/inc/swfont.hxx2
-rw-r--r--sw/source/core/inc/swthreadmanager.hxx15
-rw-r--r--sw/source/core/inc/tblrwcl.hxx4
-rw-r--r--sw/source/core/inc/txtfrm.hxx2
-rw-r--r--sw/source/core/inc/visiturl.hxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx6
-rw-r--r--sw/source/core/layout/calcmove.cxx6
-rw-r--r--sw/source/core/layout/dbg_lay.cxx6
-rw-r--r--sw/source/core/layout/fly.cxx2
-rw-r--r--sw/source/core/layout/flylay.cxx4
-rw-r--r--sw/source/core/layout/frmtool.cxx2
-rw-r--r--sw/source/core/layout/ftnfrm.cxx14
-rw-r--r--sw/source/core/layout/layact.cxx10
-rw-r--r--sw/source/core/layout/laycache.cxx2
-rw-r--r--sw/source/core/layout/layhelp.hxx2
-rw-r--r--sw/source/core/layout/layouter.cxx2
-rw-r--r--sw/source/core/layout/makefile.mk6
-rw-r--r--sw/source/core/layout/newfrm.cxx4
-rw-r--r--sw/source/core/layout/pagechg.cxx8
-rw-r--r--sw/source/core/layout/paintfrm.cxx6
-rw-r--r--sw/source/core/layout/sectfrm.cxx8
-rw-r--r--sw/source/core/layout/ssfrm.cxx2
-rw-r--r--sw/source/core/layout/tabfrm.cxx6
-rw-r--r--sw/source/core/layout/trvlfrm.cxx2
-rw-r--r--sw/source/core/layout/unusedf.cxx2
-rw-r--r--sw/source/core/layout/virtoutp.cxx4
-rw-r--r--sw/source/core/layout/wsfrm.cxx8
-rw-r--r--sw/source/core/makefile.mk4
-rw-r--r--sw/source/core/sw3io/sw3convert.cxx10
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx2
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx2
-rw-r--r--sw/source/core/swg/swblocks.cxx4
-rw-r--r--sw/source/core/table/swnewtable.cxx8
-rw-r--r--sw/source/core/table/swtable.cxx10
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx24
-rw-r--r--sw/source/core/text/atrstck.cxx21
-rw-r--r--sw/source/core/text/frmcrsr.cxx4
-rw-r--r--sw/source/core/text/frmform.cxx14
-rw-r--r--sw/source/core/text/frmpaint.cxx2
-rw-r--r--sw/source/core/text/guess.cxx2
-rw-r--r--sw/source/core/text/inftxt.cxx18
-rw-r--r--sw/source/core/text/inftxt.hxx6
-rw-r--r--sw/source/core/text/itratr.hxx2
-rw-r--r--sw/source/core/text/itrcrsr.cxx25
-rw-r--r--sw/source/core/text/itrform2.cxx2
-rw-r--r--sw/source/core/text/itrpaint.cxx2
-rw-r--r--sw/source/core/text/makefile.mk11
-rw-r--r--sw/source/core/text/porfld.cxx7
-rw-r--r--sw/source/core/text/porfld.hxx2
-rw-r--r--sw/source/core/text/porglue.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx2
-rw-r--r--sw/source/core/text/porlay.hxx2
-rw-r--r--sw/source/core/text/porlin.cxx8
-rw-r--r--sw/source/core/text/porlin.hxx4
-rw-r--r--sw/source/core/text/redlnitr.cxx2
-rw-r--r--sw/source/core/text/redlnitr.hxx2
-rw-r--r--sw/source/core/text/txtfly.cxx8
-rw-r--r--sw/source/core/text/txtfly.hxx6
-rw-r--r--sw/source/core/text/txtfrm.cxx13
-rw-r--r--sw/source/core/text/txtftn.cxx6
-rw-r--r--sw/source/core/text/txthyph.cxx2
-rw-r--r--sw/source/core/text/txtinit.cxx2
-rw-r--r--sw/source/core/text/txtio.cxx2
-rw-r--r--sw/source/core/text/txtpaint.cxx2
-rw-r--r--sw/source/core/text/txtpaint.hxx2
-rw-r--r--sw/source/core/text/txttab.cxx4
-rw-r--r--sw/source/core/tox/toxhlp.cxx24
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/core/txtnode/atrfld.cxx2
-rw-r--r--sw/source/core/txtnode/atrftn.cxx2
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx8
-rw-r--r--sw/source/core/txtnode/fntcache.cxx6
-rw-r--r--sw/source/core/txtnode/fntcap.cxx4
-rw-r--r--sw/source/core/txtnode/ndhints.cxx18
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx31
-rw-r--r--sw/source/core/txtnode/swfont.cxx2
-rw-r--r--sw/source/core/txtnode/thints.cxx106
-rw-r--r--sw/source/core/txtnode/txatbase.cxx2
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx8
-rw-r--r--sw/source/core/txtnode/txtedt.cxx4
-rw-r--r--sw/source/core/undo/docundo.cxx4
-rw-r--r--sw/source/core/undo/rolbck.cxx4
-rw-r--r--sw/source/core/undo/unattr.cxx2
-rw-r--r--sw/source/core/undo/undobj.cxx30
-rw-r--r--sw/source/core/undo/undobj1.cxx2
-rw-r--r--sw/source/core/undo/unredln.cxx51
-rw-r--r--sw/source/core/undo/untbl.cxx9
-rw-r--r--sw/source/core/unocore/swunohelper.cxx2
-rw-r--r--sw/source/core/unocore/unochart.cxx2
-rw-r--r--sw/source/core/unocore/unocoll.cxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx10
-rw-r--r--sw/source/core/unocore/unodraw.cxx5
-rw-r--r--sw/source/core/unocore/unoevent.cxx2
-rw-r--r--sw/source/core/unocore/unofield.cxx2
-rw-r--r--sw/source/core/unocore/unomap.cxx2
-rw-r--r--sw/source/core/unocore/unoobj.cxx2
-rw-r--r--sw/source/core/unocore/unoobj2.cxx8
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx5
-rw-r--r--sw/source/core/unocore/unoport.cxx6
-rw-r--r--sw/source/core/unocore/unoportenum.cxx1
-rw-r--r--sw/source/core/unocore/unoprnms.cxx2
-rw-r--r--sw/source/core/unocore/unosect.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx6
-rw-r--r--sw/source/core/unocore/unotbl.cxx4
-rw-r--r--sw/source/core/unocore/unotext.cxx54
-rw-r--r--sw/source/core/view/vdraw.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx41
-rw-r--r--sw/source/core/view/vprint.cxx61
210 files changed, 1029 insertions, 794 deletions
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index 0c6106461f49..8f9caf5f022b 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -39,7 +39,7 @@
using std::vector;
using std::find;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
unsigned long SwNumberTreeNode::nInstances = 0;
#endif
@@ -55,7 +55,7 @@ SwNumberTreeNode::SwNumberTreeNode()
{
mItLastValid = mChildren.end();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
mnSerial = nInstances;
nInstances++;
#endif
@@ -80,7 +80,7 @@ SwNumberTreeNode::~SwNumberTreeNode()
ASSERT( IsPhantom() || mpParent == NULL, ": I'm not supposed to have a parent.");
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nInstances--;
#endif
@@ -1108,7 +1108,7 @@ SwNumberTreeNode::GetIterator(const SwNumberTreeNode * pChild) const
// return aStr;
//}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
unsigned long SwNumberTreeNode::GetInstances()
{
return nInstances;
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index a9ec7b047da8..a0d8053574ae 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -100,12 +100,12 @@ class SwAccessibleContextMap_Impl: public _SwAccessibleContextMap_Impl
{
public:
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Bool mbLocked;
#endif
SwAccessibleContextMap_Impl()
-#ifndef PRODUCT
+#ifdef DBG_UTIL
: mbLocked( sal_False )
#endif
{}
@@ -227,11 +227,11 @@ class SwAccessibleShapeMap_Impl: public _SwAccessibleShapeMap_Impl
public:
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Bool mbLocked;
#endif
SwAccessibleShapeMap_Impl( SwAccessibleMap *pMap )
-#ifndef PRODUCT
+#ifdef DBG_UTIL
: mbLocked( sal_False )
#endif
{
@@ -1009,7 +1009,7 @@ SwAccessibleMap::~SwAccessibleMap()
{
vos::OGuard aGuard( maMutex );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( !mpFrmMap || mpFrmMap->empty(),
"Frame map should be empty after disposing the root frame" );
if( mpFrmMap )
@@ -1062,7 +1062,7 @@ SwAccessibleMap::~SwAccessibleMap()
{
vos::OGuard aGuard( maEventMutex );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( !(mpEvents || mpEventMap), "pending events" );
if( mpEvents )
{
@@ -1101,12 +1101,12 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView(
if( !mpFrmMap )
{
mpFrmMap = new SwAccessibleContextMap_Impl;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
mpFrmMap->mbLocked = sal_False;
#endif
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( !mpFrmMap->mbLocked, "Map is locked" );
mpFrmMap->mbLocked = sal_True;
#endif
@@ -1138,7 +1138,7 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView(
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
mpFrmMap->mbLocked = sal_False;
#endif
}
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index e4410c26e8bb..5827fb55c29e 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -38,7 +38,7 @@
#include <swcache.hxx>
#include <swfntcch.hxx>
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#include <unotextmarkup.hxx>
#endif
@@ -211,7 +211,7 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
LockModify();
-#ifdef PRODUCT
+#ifndef DBG_UTIL
bInModify = TRUE;
#else
if( !pOldValue )
@@ -287,7 +287,7 @@ void SwModify::Add(SwClient *pDepend)
// nur wenn das hier noch nicht eingetragen ist einfuegen
if(pDepend->pRegisteredIn != this )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwClientIter* pTmp = pClientIters;
while( pTmp )
{
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index 6fce2c4a59f5..8d71c70cf58f 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -47,12 +47,6 @@ SwFmtChg::SwFmtChg( SwFmt *pFmt )
{}
-SwInsChr::SwInsChr( xub_StrLen nP )
- : SwMsgPoolItem( RES_INS_CHR ),
- nPos( nP )
-{}
-
-
SwInsTxt::SwInsTxt( xub_StrLen nP, xub_StrLen nL )
: SwMsgPoolItem( RES_INS_TXT ),
@@ -147,7 +141,7 @@ SwAttrSetChg::~SwAttrSetChg()
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void SwAttrSetChg::ClearItem( USHORT nWhch )
{
@@ -183,7 +177,7 @@ SfxPoolItem* SwMsgPoolItem::Clone( SfxItemPool* ) const
* Ist keines vorhanden, returnt ein 0-Pointer !!!
* Used to be inlined (hintids.hxx) in PRODUCT.
******************************************************************************/
-#ifdef PRODUCT
+#ifndef DBG_UTIL
const SfxPoolItem* GetDfltAttr( USHORT nWhich )
{
return aAttrTab[ nWhich - POOLATTR_BEGIN ];
@@ -227,12 +221,6 @@ SwVirtPageNumInfo::SwVirtPageNumInfo( const SwPageFrm *pPg ) :
// aList.Insert(rNd.GetIndex(), &rNd);
//}
-SwNRuleLowerLevel::SwNRuleLowerLevel( const String& rRuleName, BYTE nSrchLvl )
- : SwMsgPoolItem( RES_GETLOWERNUMLEVEL ), rName( rRuleName ),
- nLvl(nSrchLvl)
-{
-}
-
SwFindNearestNode::SwFindNearestNode( const SwNode& rNd )
: SwMsgPoolItem( RES_FINDNEARESTNODE ), pNd( &rNd ), pFnd( 0 )
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 4f9d3c3b77cc..9a4b14a53866 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -33,7 +33,7 @@
#include <hintids.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/colritem.hxx>
#include <svx/brshitem.hxx>
#include <svx/bolnitem.hxx>
@@ -387,7 +387,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
// <--
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
ASSERT( !this, "weder Format noch ContentNode - keine Attribute kopiert");
#endif
diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx
index fd91c3529f52..9158dffe96dd 100644
--- a/sw/source/core/bastyp/bparr.cxx
+++ b/sw/source/core/bastyp/bparr.cxx
@@ -41,7 +41,7 @@
// immer ~ 20 * MAXENTRY == 20000 Eintraege
const USHORT nBlockGrowSize = 20;
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define CHECKIDX( p, n, i, c )
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index aba5dbc74283..7193bb31eb9c 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -49,9 +49,9 @@
#include <unotools/charclass.hxx>
#include <svx/unolingu.hxx>
#include <svx/scripttypeitem.hxx>
-#include <svtools/useroptions.hxx>
+#include <unotools/useroptions.hxx>
#include <tools/datetime.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <swmodule.hxx>
#include <doc.hxx>
#include <viewsh.hxx>
diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx
index cecbb7308f49..93939b9b7940 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -39,7 +39,7 @@
#include "index.hxx"
#include "error.h" // fuers ASSERT
-#ifndef PRODUCT
+#ifdef DBG_UTIL
int SwIndex::nSerial = 0;
#endif
@@ -103,7 +103,7 @@ SwIndex::SwIndex( SwIndexReg* pArr, xub_StrLen nIdx )
else
ChgValue( *pArray->pFirst, nIdx );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
IDX_CHK_ARRAY
@@ -115,7 +115,7 @@ SwIndex::SwIndex( const SwIndex& rIdx, short nIdx )
{
ChgValue( rIdx, rIdx.nIndex + nIdx );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
IDX_CHK_ARRAY
@@ -126,7 +126,7 @@ SwIndex::SwIndex( const SwIndex& rIdx )
: nIndex( rIdx.nIndex ), pArray( rIdx.pArray ), pNext( 0 ), pPrev( 0 )
{
ChgValue( rIdx, rIdx.nIndex );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
IDX_CHK_ARRAY
@@ -371,7 +371,7 @@ void SwIndexReg::Update( SwIndex const & rIdx, const xub_StrLen nDiff,
ARR_CHK_ARRAY
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#ifndef CFRONT
/*************************************************************************
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 9f275aa09ed3..9e2b5efced77 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -34,7 +34,7 @@
#include <tools/globname.hxx>
#include <vcl/mapmod.hxx>
#include <svx/xmlcnitm.hxx>
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <svx/pbinitem.hxx>
#include <svx/keepitem.hxx>
#include <svx/nlbkitem.hxx>
@@ -83,7 +83,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <unotools/collatorwrapper.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <unotools/transliterationwrapper.hxx>
#include <svx/acorrcfg.hxx>
@@ -780,7 +780,7 @@ void _FinitCore()
delete SwEditShell::pAutoFmtFlags;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
//Defaultattribut freigeben lassen um asserts zu vermeiden.
if ( aAttrTab[0]->GetRefCount() )
SfxItemPool::ReleaseDefaults( aAttrTab, POOLATTR_END-POOLATTR_BEGIN, FALSE);
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 0e9ed9fd3720..ea2513d6237e 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -38,7 +38,7 @@
SV_IMPL_PTRARR(SwCacheObjArr,SwCacheObj*);
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define INCREMENT( nVar )
#else
#define INCREMENT( nVar ) ++nVar
@@ -53,7 +53,7 @@ SV_IMPL_PTRARR(SwCacheObjArr,SwCacheObj*);
|*
|*************************************************************************/
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void SwCache::Check()
{
@@ -90,7 +90,7 @@ void SwCache::Check()
}
#endif
-#if !defined(PRODUCT) && defined(MADEBUG)
+#if defined(DBG_UTIL) && defined(MADEBUG)
#define CHECK Check();
#else
#define CHECK
@@ -107,7 +107,7 @@ void SwCache::Check()
SwCache::SwCache( const USHORT nInitSize, const USHORT nGrowSize
-#ifndef PRODUCT
+#ifdef DBG_UTIL
, const ByteString &rNm
#endif
) :
@@ -118,7 +118,7 @@ SwCache::SwCache( const USHORT nInitSize, const USHORT nGrowSize
pLast( 0 ),
nMax( nInitSize ),
nCurMax( nInitSize )
-#ifndef PRODUCT
+#ifdef DBG_UTIL
, aName( rNm ),
nAppend( 0 ),
nInsertFree( 0 ),
@@ -137,7 +137,7 @@ SwCache::SwCache( const USHORT nInitSize, const USHORT nGrowSize
{
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwCache::~SwCache()
@@ -197,7 +197,7 @@ void SwCache::Flush( const BYTE )
SwCacheObj *pTmp;
while ( pObj )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if ( pObj->IsLocked() )
{
ASSERT( TRUE, "Flushing locked objects." );
@@ -322,7 +322,7 @@ SwCacheObj *SwCache::Get( const void *pOwner, const USHORT nIndex,
ToTop( pRet );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if ( pRet )
++nGetSuccess;
else
@@ -346,7 +346,7 @@ SwCacheObj *SwCache::Get( const void *pOwner, const BOOL bToTop )
if ( bToTop && pRet && pRet != pFirst )
ToTop( pRet );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if ( pRet )
++nGetSuccess;
else
@@ -588,7 +588,7 @@ SwCacheObj::~SwCacheObj()
|*
|*************************************************************************/
-#ifndef PRODUCT
+#ifdef DBG_UTIL
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 21fd4c7a2970..e156c71aa5fb 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sw.hxx"
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#ifndef _STREAM_HXX //autogen
#include <tools/stream.hxx>
#endif
@@ -53,13 +53,12 @@
SwRect::SwRect( const Rectangle &rRect ) :
- nX( rRect.Left() ),
- nY( rRect.Top() )
+ m_Point( rRect.Left(), rRect.Top() )
{
- nWidth = rRect.Right() == RECT_EMPTY ? 0 :
- rRect.Right() - rRect.Left() +1;
- nHeight = rRect.Bottom() == RECT_EMPTY ? 0 :
- rRect.Bottom() - rRect.Top() + 1;
+ m_Size.setWidth(rRect.Right() == RECT_EMPTY ? 0 :
+ rRect.Right() - rRect.Left() +1);
+ m_Size.setHeight(rRect.Bottom() == RECT_EMPTY ? 0 :
+ rRect.Bottom() - rRect.Top() + 1);
}
/*************************************************************************
@@ -139,7 +138,7 @@ SwRect& SwRect::Intersection( const SwRect& rRect )
}
else
//Def.: Bei einer leeren Intersection wird nur die SSize genullt.
- nHeight = nWidth = 0;
+ SSize(0, 0);
return *this;
}
@@ -239,78 +238,90 @@ BOOL SwRect::IsOver( const SwRect& rRect ) const
void SwRect::Justify()
{
- if ( nHeight < 0 )
+ if ( m_Size.getHeight() < 0 )
{
- nY = nY + nHeight + 1;
- nHeight = -nHeight;
+ m_Point.Y() += m_Size.getHeight() + 1;
+ m_Size.setHeight(-m_Size.getHeight());
}
- if ( nWidth < 0 )
+ if ( m_Size.getWidth() < 0 )
{
- nX = nX + nWidth + 1;
- nWidth = -nWidth;
+ m_Point.Y() += m_Size.getWidth() + 1;
+ m_Size.setWidth(-m_Size.getWidth());
}
}
// Similiar to the inline methods, but we need the function pointers
-void SwRect::_Width( const long nNew ) { nWidth = nNew; }
-void SwRect::_Height( const long nNew ) { nHeight = nNew; }
-void SwRect::_Left( const long nLeft ){ nWidth += nX - nLeft; nX = nLeft; }
-void SwRect::_Right( const long nRight ){ nWidth = nRight - nX; }
-void SwRect::_Top( const long nTop ){ nHeight += nY - nTop; nY = nTop; }
-void SwRect::_Bottom( const long nBottom ){ nHeight = nBottom - nY; }
-
-long SwRect::_Width() const{ return nWidth; }
-long SwRect::_Height() const{ return nHeight; }
-long SwRect::_Left() const{ return nX; }
-long SwRect::_Right() const{ return nX + nWidth; }
-long SwRect::_Top() const{ return nY; }
-long SwRect::_Bottom() const{ return nY + nHeight; }
-
-void SwRect::AddWidth( const long nAdd ) { nWidth += nAdd; }
-void SwRect::AddHeight( const long nAdd ) { nHeight += nAdd; }
-void SwRect::SubLeft( const long nSub ){ nWidth += nSub; nX -= nSub; }
-void SwRect::AddRight( const long nAdd ){ nWidth += nAdd; }
-void SwRect::SubTop( const long nSub ){ nHeight += nSub; nY -= nSub; }
-void SwRect::AddBottom( const long nAdd ){ nHeight += nAdd; }
-void SwRect::SetPosX( const long nNew ){ nX = nNew; }
-void SwRect::SetPosY( const long nNew ){ nY = nNew; }
+void SwRect::_Width( const long nNew ) { m_Size.setWidth(nNew); }
+void SwRect::_Height( const long nNew ) { m_Size.setHeight(nNew); }
+void SwRect::_Left( const long nLeft ){ m_Size.Width() += m_Point.getX() - nLeft; m_Point.setX(nLeft); }
+void SwRect::_Right( const long nRight ){ m_Size.setWidth(nRight - m_Point.getX()); }
+void SwRect::_Top( const long nTop ){ m_Size.Height() += m_Point.getY() - nTop; m_Point.setY(nTop); }
+void SwRect::_Bottom( const long nBottom ){ m_Size.setHeight(nBottom - m_Point.getY()); }
+
+long SwRect::_Width() const{ return m_Size.getWidth(); }
+long SwRect::_Height() const{ return m_Size.getHeight(); }
+long SwRect::_Left() const{ return m_Point.getX(); }
+long SwRect::_Right() const{ return m_Point.getX() + m_Size.getWidth(); }
+long SwRect::_Top() const{ return m_Point.getY(); }
+long SwRect::_Bottom() const{ return m_Point.getY() + m_Size.getHeight(); }
+
+void SwRect::AddWidth( const long nAdd ) { m_Size.Width() += nAdd; }
+void SwRect::AddHeight( const long nAdd ) { m_Size.Height() += nAdd; }
+void SwRect::SubLeft( const long nSub ){ m_Size.Width() += nSub; m_Point.X() -= nSub; }
+void SwRect::AddRight( const long nAdd ){ m_Size.Width() += nAdd; }
+void SwRect::SubTop( const long nSub ){ m_Size.Height() += nSub; m_Point.Y() -= nSub; }
+void SwRect::AddBottom( const long nAdd ){ m_Size.Height() += nAdd; }
+void SwRect::SetPosX( const long nNew ){ m_Point.setX(nNew); }
+void SwRect::SetPosY( const long nNew ){ m_Point.setY(nNew); }
const Size SwRect::_Size() const { return SSize(); }
-const Size SwRect::SwappedSize() const { return Size( nHeight, nWidth ); }
+const Size SwRect::SwappedSize() const { return Size( m_Size.getHeight(), m_Size.getWidth() ); }
const Point SwRect::TopLeft() const { return Pos(); }
-const Point SwRect::TopRight() const { return Point( nX + nWidth, nY ); }
-const Point SwRect::BottomLeft() const { return Point( nX, nY + nHeight ); }
+const Point SwRect::TopRight() const { return Point( m_Point.getX() + m_Size.getWidth(), m_Point.getY() ); }
+const Point SwRect::BottomLeft() const { return Point( m_Point.getX(), m_Point.getY() + m_Size.getHeight() ); }
const Point SwRect::BottomRight() const
- { return Point( nX + nWidth, nY + nHeight ); }
-long SwRect::GetLeftDistance( long nLimit ) const { return nX - nLimit; }
-long SwRect::GetBottomDistance( long nLim ) const { return nLim - nY - nHeight;}
-long SwRect::GetTopDistance( long nLimit ) const { return nY - nLimit; }
-long SwRect::GetRightDistance( long nLim ) const { return nLim - nX - nWidth; }
+ { return Point( m_Point.getX() + m_Size.getWidth(), m_Point.getY() + m_Size.getHeight() ); }
+long SwRect::GetLeftDistance( long nLimit ) const { return m_Point.getX() - nLimit; }
+long SwRect::GetBottomDistance( long nLim ) const { return nLim - m_Point.getY() - m_Size.getHeight();}
+long SwRect::GetTopDistance( long nLimit ) const { return m_Point.getY() - nLimit; }
+long SwRect::GetRightDistance( long nLim ) const { return nLim - m_Point.getX() - m_Size.getWidth(); }
BOOL SwRect::OverStepLeft( long nLimit ) const
- { return nLimit > nX && nX + nWidth > nLimit; }
+ { return nLimit > m_Point.getX() && m_Point.getX() + m_Size.getWidth() > nLimit; }
BOOL SwRect::OverStepBottom( long nLimit ) const
- { return nLimit > nY && nY + nHeight > nLimit; }
+ { return nLimit > m_Point.getY() && m_Point.getY() + m_Size.getHeight() > nLimit; }
BOOL SwRect::OverStepTop( long nLimit ) const
- { return nLimit > nY && nY + nHeight > nLimit; }
+ { return nLimit > m_Point.getY() && m_Point.getY() + m_Size.getHeight() > nLimit; }
BOOL SwRect::OverStepRight( long nLimit ) const
- { return nLimit > nX && nX + nWidth > nLimit; }
+ { return nLimit > m_Point.getX() && m_Point.getX() + m_Size.getWidth() > nLimit; }
void SwRect::SetLeftAndWidth( long nLeft, long nNew )
- { nX = nLeft; nWidth = nNew; }
+{
+ m_Point.setX(nLeft);
+ m_Size.setWidth(nNew);
+}
void SwRect::SetTopAndHeight( long nTop, long nNew )
- { nY = nTop; nHeight = nNew; }
+{
+ m_Point.setY(nTop);
+ m_Size.setHeight(nNew);
+}
void SwRect::SetRightAndWidth( long nRight, long nNew )
- { nX = nRight - nNew; nWidth = nNew; }
+{
+ m_Point.setX(nRight - nNew);
+ m_Size.setWidth(nNew);
+}
void SwRect::SetBottomAndHeight( long nBottom, long nNew )
- { nY = nBottom - nNew; nHeight = nNew; }
+{
+ m_Point.setY(nBottom - nNew);
+ m_Size.setHeight(nNew);
+}
void SwRect::SetUpperLeftCorner( const Point& rNew )
- { nX = rNew.nA; nY = rNew.nB; }
+ { m_Point = rNew; }
void SwRect::SetUpperRightCorner( const Point& rNew )
- { nX = rNew.nA - nWidth; nY = rNew.nB; }
+ { m_Point = Point(rNew.nA - m_Size.getWidth(), rNew.nB); }
void SwRect::SetLowerLeftCorner( const Point& rNew )
- { nX = rNew.nA; nY = rNew.nB - nHeight; }
+ { m_Point = Point(rNew.nA, rNew.nB - m_Size.getHeight()); }
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*************************************************************************
* operator<<( ostream&, SwRect&)
*************************************************************************/
diff --git a/sw/source/core/bastyp/swregion.cxx b/sw/source/core/bastyp/swregion.cxx
index ba8ee121a362..2bab385f0b5a 100644
--- a/sw/source/core/bastyp/swregion.cxx
+++ b/sw/source/core/bastyp/swregion.cxx
@@ -117,7 +117,7 @@ void SwRegionRects::operator-=( const SwRect &rRect )
if ( 0 < (nTmp = aInter.Top() - aTmp.Top()) )
{
const long nOldVal = aTmp.Height();
- aTmp.SSize().Height() = nTmp;
+ aTmp.Height(nTmp);
InsertRect( aTmp, i, bDel );
aTmp.Height( nOldVal );
}
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 8a82e66c4c7b..3637cc19354d 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -332,7 +332,7 @@ if( GetWin() )
}
-#if !defined( PRODUCT )
+#if defined(DBG_UTIL)
void SwCrsrShell::SttCrsrMove()
{
@@ -1459,7 +1459,7 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
Point aCentrPt( aCharRect.Center() );
aTmpState.bSetInReadOnly = IsReadOnlyAvailable();
pTblFrm->GetCrsrOfst( pTblCrsr->GetPoint(), aCentrPt, &aTmpState );
-#ifdef PRODUCT
+#ifndef DBG_UTIL
pTblFrm->GetCharRect( aCharRect, *pTblCrsr->GetPoint() );
#else
if ( !pTblFrm->GetCharRect( aCharRect, *pTblCrsr->GetPoint() ) )
@@ -2014,7 +2014,7 @@ void SwCrsrShell::Combine()
SwCrsrSaveState aSaveState( *pCurCrsr );
if( pCrsrStk->HasMark() ) // nur wenn GetMark gesetzt wurde
{
-#ifdef PRODUCT
+#ifndef DBG_UTIL
CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, TRUE );
#else
if( !CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, TRUE ))
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 23a9bf139ef1..b315e31bae48 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -33,7 +33,7 @@
#include <hintids.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svx/lrspitem.hxx>
#include <svx/adjitem.hxx>
#include <svx/brkitem.hxx>
@@ -1337,7 +1337,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( !bRet && (
SwContentAtPos::SW_TABLEBOXFML & rCntntAtPos.eCntntAtPos
-#ifndef PRODUCT
+#ifdef DBG_UTIL
|| SwContentAtPos::SW_TABLEBOXVALUE & rCntntAtPos.eCntntAtPos
#endif
))
@@ -1349,7 +1349,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
if( pSttNd && 0 != ( pTblNd = pTxtNd->FindTableNode()) &&
0 != ( pBox = pTblNd->GetTable().GetTblBox(
pSttNd->GetIndex() )) &&
-#ifndef PRODUCT
+#ifdef DBG_UTIL
( SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
RES_BOXATR_FORMULA, FALSE, &pItem ) ||
SFX_ITEM_SET == pBox->GetFrmFmt()->GetItemState(
@@ -1383,7 +1383,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
// erzeuge aus der internen (fuer CORE)
// die externe (fuer UI) Formel
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_TABLEBOXFML;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( RES_BOXATR_VALUE == pItem->Which() )
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_TABLEBOXVALUE;
else
@@ -1417,7 +1417,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( !bRet && SwContentAtPos::SW_CURR_ATTRS & rCntntAtPos.eCntntAtPos )
{
xub_StrLen n = aPos.nContent.GetIndex();
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 5697912b21fe..28a79a3471de 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -38,8 +38,8 @@
#include <i18npool/mslangid.hxx>
#include <hintids.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/itemiter.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/whiter.hxx>
#include <svx/brkitem.hxx>
#include <svx/colritem.hxx>
#include <svx/fontitem.hxx>
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index e5e87a33bc5d..996f377fda43 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -37,7 +37,7 @@
#define _SVSTDARR_USHORTS
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <vcl/svapp.hxx>
#include <txatritr.hxx>
#include <fldbas.hxx>
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 4b2f9332fb78..36bff61e57bf 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -550,7 +550,7 @@ void SwPaM::SetMark()
(*m_pMark) = (*m_pPoint);
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void SwPaM::Exchange()
{
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index ea5853916b8c..45e72963eb0f 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -39,7 +39,7 @@
#include <com/sun/star/i18n/CharType.hdl>
#include <unotools/charclass.hxx>
-#include <svtools/ctloptions.hxx>
+#include <svl/ctloptions.hxx>
#include <swmodule.hxx>
#include <fmtcntnt.hxx>
#include <swtblfmt.hxx>
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 4546a108b2ec..108da63d9b17 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -307,7 +307,7 @@ BOOL SwCrsrShell::SelTblBox()
const SwStartNode* pStartNode =
pCurCrsr->GetPoint()->nNode.GetNode().FindTableBoxStartNode();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// the old code checks whether we're in a table by asking the
// frame. This should yield the same result as searching for the
// table box start node, right?
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index a6019057df5e..8a9dc3c0a458 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -34,7 +34,7 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <vcl/dialog.hxx>
@@ -862,7 +862,7 @@ BOOL SwShellCrsr::UpDown( BOOL bUp, USHORT nCnt )
&GetPtPos(), GetShell()->GetUpDownX() );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
@@ -1001,7 +1001,7 @@ BOOL SwShellTableCrsr::IsInside( const Point& rPt ) const
return FALSE;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
// am sichtbaren Cursor
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 6084b53abc5b..2cfb515bff59 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -34,7 +34,7 @@
#include <SwStyleNameMapper.hxx>
#define _SVSTDARR_STRINGSDTOR
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <tools/resmgr.hxx>
#include <poolfmt.hxx>
#ifndef _RDIC_HRC
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 9fda3564a400..d35c340975cb 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -33,8 +33,8 @@
#ifdef DEBUG
#include <tools/string.hxx>
-#include <svtools/poolitem.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/itemiter.hxx>
#include <string>
#include <map>
#include <node.hxx>
@@ -551,7 +551,7 @@ String lcl_dbg_out(const SwNode & rNode)
aTmpStr += String::CreateFromInt32(rNode.GetIndex());
aTmpStr += String("\"", RTL_TEXTENCODING_ASCII_US);
-#ifndef PRODUCT
+#ifdef DBG_UTIL
aTmpStr += String(" serial=\"", RTL_TEXTENCODING_ASCII_US);
aTmpStr += String::CreateFromInt32(rNode.GetSerial());
aTmpStr += String("\"", RTL_TEXTENCODING_ASCII_US);
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 0441d14edf1d..bac7d6f7ea0d 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -47,7 +47,7 @@
#include <tools/urlobj.hxx>
#include <tools/poly.hxx>
#include <vcl/virdev.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <sfx2/printer.hxx>
#include <svx/keepitem.hxx>
#include <svx/cscoitem.hxx>
@@ -106,6 +106,8 @@
#include <SwUndoFmt.hxx>
#include <unocrsr.hxx>
#include <docsh.hxx>
+#include <docufld.hxx>
+
#include <vector>
#include <osl/diagnose.h>
@@ -465,6 +467,9 @@ void SwDoc::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/
if ( bDeleteOld )
delete pPrt;
pPrt = pP;
+
+ if ( pDrawModel && !get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) )
+ pDrawModel->SetRefDevice( pPrt );
}
if ( bCallPrtDataChanged &&
@@ -493,6 +498,9 @@ void SwDoc::setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOl
if ( bDeleteOld )
delete pVirDev;
pVirDev = pVd;
+
+ if ( pDrawModel && get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) )
+ pDrawModel->SetRefDevice( pVirDev );
}
}
@@ -528,6 +536,9 @@ void SwDoc::setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewH
pMyVirDev->SetReferenceDevice( VirtualDevice::REFDEV_MODE06 );
else
pMyVirDev->SetReferenceDevice( VirtualDevice::REFDEV_MODE_MSO1 );
+
+ if( pDrawModel )
+ pDrawModel->SetRefDevice( pMyVirDev );
}
else
{
@@ -537,8 +548,10 @@ void SwDoc::setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewH
// triggers this funny situation:
// getReferenceDevice()->getPrinter()->CreatePrinter_()
// ->setPrinter()-> PrtDataChanged()
- getPrinter( true );
+ SfxPrinter* pPrinter = getPrinter( true );
// <--
+ if( pDrawModel )
+ pDrawModel->SetRefDevice( pPrinter );
}
set(IDocumentSettingAccess::USE_VIRTUAL_DEVICE, bNewVirtual );
@@ -1066,6 +1079,24 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
}
}
+ // #i93174#: notes contain paragraphs that are not nodes
+ {
+ SwFieldType * const pPostits( GetSysFldType(RES_POSTITFLD) );
+ SwClientIter aIter(*pPostits);
+ SwFmtFld const * pFmtFld =
+ static_cast<SwFmtFld const*>(aIter.First( TYPE(SwFmtFld) ));
+ while (pFmtFld)
+ {
+ if (pFmtFld->IsFldInDoc())
+ {
+ SwPostItField const * const pField(
+ static_cast<SwPostItField const*>(pFmtFld->GetFld()));
+ rStat.nAllPara += pField->GetNumberOfParagraphs();
+ }
+ pFmtFld = static_cast<SwFmtFld const*>(aIter.Next());
+ }
+ }
+
rStat.nPage = GetRootFrm() ? GetRootFrm()->GetPageNum() : 0;
rStat.bModified = FALSE;
SetDocStat( rStat );
@@ -1091,12 +1122,21 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
aStat[n++].Value <<= (sal_Int32)rStat.nChar;
// For e.g. autotext documents there is no pSwgInfo (#i79945)
- if (GetDocShell()) {
- uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
- GetDocShell()->GetModel(), uno::UNO_QUERY_THROW);
- uno::Reference<document::XDocumentProperties> xDocProps(
+ SfxObjectShell * const pObjShell( GetDocShell() );
+ if (pObjShell)
+ {
+ const uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
+ pObjShell->GetModel(), uno::UNO_QUERY_THROW);
+ const uno::Reference<document::XDocumentProperties> xDocProps(
xDPS->getDocumentProperties());
+ // #i96786#: do not set modified flag when updating statistics
+ const bool bDocWasModified( IsModified() );
+ const ModifyBlocker_Impl b(pObjShell);
xDocProps->setDocumentStatistics(aStat);
+ if (!bDocWasModified)
+ {
+ ResetModified();
+ }
}
// event. Stat. Felder Updaten
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index 68c84dd3b644..047b5b2dc582 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -428,7 +428,7 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
SetDiscard( rData2, pDiscard2, pCount1 );
// die Arrays koennen wir wieder vergessen
- delete pCount1; delete pCount2;
+ delete [] pCount1; delete [] pCount2;
CheckDiscard( rData1.GetLineCount(), pDiscard1 );
CheckDiscard( rData2.GetLineCount(), pDiscard2 );
@@ -437,7 +437,7 @@ Compare::Compare( ULONG nDiff, CompareData& rData1, CompareData& rData2 )
pMD2 = new MovedData( rData2, pDiscard2 );
// die Arrays koennen wir wieder vergessen
- delete pDiscard1; delete pDiscard2;
+ delete [] pDiscard1; delete [] pDiscard2;
}
{
diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx
index 36c23b14b8a0..468ab59146de 100644
--- a/sw/source/core/doc/docdde.cxx
+++ b/sw/source/core/doc/docdde.cxx
@@ -41,7 +41,7 @@
#include <tools/urlobj.hxx>
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svx/linkmgr.hxx> // LinkManager
#include <unotools/charclass.hxx>
#include <fmtcntnt.hxx>
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 12e5d597a7c4..0aff3b40fc8a 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -70,7 +70,7 @@
#include <fldbas.hxx>
#include <swwait.hxx>
#include <GetMetricVal.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#ifndef _STATSTR_HRC
#include <statstr.hrc>
#endif
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 95e18a7e78af..364c664d0bea 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -258,7 +258,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
SwDrawContact *pContact = (SwDrawContact*)GetUserCall(pObj);
// --> OD 2005-08-16 #i53320#
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwAnchoredDrawObject* pAnchoredDrawObj =
static_cast<SwAnchoredDrawObject*>(pContact->GetAnchoredObj( pObj ));
ASSERT( bGroupMembersNotPositioned == pAnchoredDrawObj->NotYetPositioned(),
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index fba401974a5b..551fcc41c2ee 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -39,7 +39,7 @@
#include <tools/datetime.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_ULONGS
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#endif
#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
@@ -601,7 +601,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
{
if( aPara.CalcWithStackOverflow() )
pFld->CalcField( aPara );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
// mind. ein ASSERT
@@ -669,7 +669,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
{
if( aPara.CalcWithStackOverflow() )
pFml->Calc( aPara, nValue );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
// mind. ein ASSERT
@@ -907,7 +907,7 @@ void _SetGetExpFld::SetBodyPos( const SwCntntFrm& rFrm )
SwNodeIndex aIdx( *rFrm.GetNode() );
SwDoc& rDoc = *aIdx.GetNodes().GetDoc();
SwPosition aPos( aIdx );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( ::GetBodyTxtNode( rDoc, aPos, rFrm ), "wo steht das Feld" );
#else
::GetBodyTxtNode( rDoc, aPos, rFrm );
@@ -2551,7 +2551,7 @@ void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, USHORT nFldWhich )
{
// einen Index fuers bestimmen vom TextNode anlegen
SwPosition aPos( rDoc.GetNodes().GetEndOfPostIts() );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( GetBodyTxtNode( rDoc, aPos, *pFrm ), "wo steht das Feld" );
#else
GetBodyTxtNode( rDoc, aPos, *pFrm );
@@ -2599,7 +2599,7 @@ void SwDocUpdtFld::GetBodyNode( const SwSectionNode& rSectNd )
if( !pFrm )
break;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( GetBodyTxtNode( rDoc, aPos, *pFrm ), "wo steht das Feld" );
#else
GetBodyTxtNode( rDoc, aPos, *pFrm );
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index 507e63ba7a47..9935842e6800 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -33,7 +33,7 @@
#include <hintids.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdmodel.hxx>
@@ -677,7 +677,7 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
// Continue with next selected object and assert, if this isn't excepted.
if ( !pContact )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bool bNoUserCallExcepted =
pObj->ISA(SwDrawVirtObj) &&
!static_cast<SwDrawVirtObj*>(pObj)->IsConnected();
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index c054b7ee5579..312f8fb7b00f 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -37,20 +37,20 @@
#define _SVSTDARR_USHORTS
#include <hintids.hxx>
#include <rtl/logfile.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <sfx2/app.hxx>
-#include <svtools/misccfg.hxx>
#include <svx/tstpitem.hxx>
#include <svx/eeitem.hxx>
#include <svx/langitem.hxx>
#include <svx/lrspitem.hxx>
#include <svx/brkitem.hxx>
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#ifndef _ZFORLIST_HXX //autogen
#define _ZFORLIST_DECLARE_TABLE
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#endif
#include <comphelper/processfactory.hxx>
+#include <unotools/misccfg.hxx>
#include <com/sun/star/i18n/WordType.hdl>
#include <fmtpdsc.hxx>
#include <fmthdft.hxx>
@@ -625,7 +625,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
(RES_TXTATR_CHARFMT == nWhich) ||
(RES_TXTATR_INETFMT == nWhich) ||
(RES_TXTATR_AUTOFMT == nWhich) ||
- isUNKNOWNATR(nWhich) )
+ (RES_TXTATR_UNKNOWN_CONTAINER == nWhich) )
{
pCharSet = &rChgSet;
bCharAttr = true;
@@ -636,7 +636,8 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
|| isPARATR_LIST(nWhich)
// <--
|| isFRMATR(nWhich)
- || isGRFATR(nWhich) )
+ || isGRFATR(nWhich)
+ || isUNKNOWNATR(nWhich) )
{
pOtherSet = &rChgSet;
bOtherAttr = true;
@@ -653,7 +654,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
RES_TXTATR_AUTOFMT, RES_TXTATR_AUTOFMT,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
+ RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
0 );
SfxItemSet* pTmpOtherItemSet = new SfxItemSet( pDoc->GetAttrPool(),
@@ -663,6 +664,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
// <--
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_GRFATR_BEGIN, RES_GRFATR_END-1,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0 );
pTmpCharItemSet->Put( rChgSet );
@@ -755,7 +757,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
SfxItemSet aTxtSet( pDoc->GetAttrPool(),
RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK,
RES_TXTATR_META, RES_TXTATR_METAFIELD,
- RES_TXTATR_CJK_RUBY, RES_TXTATR_WITHEND_END-1,
+ RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
0 );
aTxtSet.Put( rChgSet );
@@ -1744,36 +1746,45 @@ BOOL lcl_SetTxtFmtColl( const SwNodePtr& rpNode, void* pArgs )
pFmt != pCNd->GetFmtColl() &&
pFmt->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET )
{
- // --> OD 2008-04-08 #refactorlists#
-// if ( pPara->pHistory )
-// {
-// SwTxtNode* pTNd( dynamic_cast<SwTxtNode*>(pCNd) );
-// ASSERT( pTNd,
-// "<lcl_SetTxtFmtColl(..)> - text node expected -> crash" );
-// SwRegHistory aRegH( pTNd, *pTNd, pPara->pHistory );
-// pCNd->ResetAttr( RES_PARATR_NUMRULE );
-// }
-// else
-// {
-// pCNd->ResetAttr( RES_PARATR_NUMRULE );
-// }
- std::auto_ptr< SwRegHistory > pRegH;
- if ( pPara->pHistory )
+ // --> OD 2009-09-07 #b6876367#
+ // Check, if the list style of the paragraph will change.
+ bool bChangeOfListStyleAtParagraph( true );
+ SwTxtNode* pTNd( dynamic_cast<SwTxtNode*>(pCNd) );
+ ASSERT( pTNd,
+ "<lcl_SetTxtFmtColl(..)> - text node expected -> crash" );
{
- SwTxtNode* pTNd( dynamic_cast<SwTxtNode*>(pCNd) );
- ASSERT( pTNd,
- "<lcl_SetTxtFmtColl(..)> - text node expected -> crash" );
- pRegH.reset( new SwRegHistory( pTNd, *pTNd, pPara->pHistory ) );
+ SwNumRule* pNumRuleAtParagraph( pTNd->GetNumRule() );
+ if ( pNumRuleAtParagraph )
+ {
+ const SwNumRuleItem& rNumRuleItemAtParagraphStyle =
+ pFmt->GetNumRule();
+ if ( rNumRuleItemAtParagraphStyle.GetValue() ==
+ pNumRuleAtParagraph->GetName() )
+ {
+ bChangeOfListStyleAtParagraph = false;
+ }
+ }
}
- pCNd->ResetAttr( RES_PARATR_NUMRULE );
+ if ( bChangeOfListStyleAtParagraph )
+ {
+ // --> OD 2008-04-08 #refactorlists#
+ std::auto_ptr< SwRegHistory > pRegH;
+ if ( pPara->pHistory )
+ {
+ pRegH.reset( new SwRegHistory( pTNd, *pTNd, pPara->pHistory ) );
+ }
- // reset all list attributes
- pCNd->ResetAttr( RES_PARATR_LIST_LEVEL );
- pCNd->ResetAttr( RES_PARATR_LIST_ISRESTART );
- pCNd->ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
- pCNd->ResetAttr( RES_PARATR_LIST_ISCOUNTED );
- pCNd->ResetAttr( RES_PARATR_LIST_ID );
+ pCNd->ResetAttr( RES_PARATR_NUMRULE );
+
+ // reset all list attributes
+ pCNd->ResetAttr( RES_PARATR_LIST_LEVEL );
+ pCNd->ResetAttr( RES_PARATR_LIST_ISRESTART );
+ pCNd->ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
+ pCNd->ResetAttr( RES_PARATR_LIST_ISCOUNTED );
+ pCNd->ResetAttr( RES_PARATR_LIST_ID );
+ }
+ // <--
}
// <--
}
@@ -2442,7 +2453,7 @@ void SwDoc::_CreateNumberFormatter()
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pNumberFormatter = new SvNumberFormatter( xMSF, eLang );
pNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL );
- pNumberFormatter->SetYear2000(static_cast<USHORT>(SFX_APP()->GetMiscConfig()->GetYear2000()));
+ pNumberFormatter->SetYear2000(static_cast<USHORT>(::utl::MiscCfg().GetYear2000()));
}
@@ -2658,18 +2669,18 @@ namespace docfunc
if ( !pParentTxtFmtColl )
continue;
- // --> OD 2007-12-07 #i77708#
- // consider that explicitly no list style is set - empty string
- // at numrule item.
-// const SwNumRuleItem& rDirectItem = pParentTxtFmtColl->GetNumRule();
-// if ( rDirectItem.GetValue().Len() != 0 )
if ( SFX_ITEM_SET == pParentTxtFmtColl->GetItemState( RES_PARATR_NUMRULE ) )
{
- bRet = true;
- break;
+ // --> OD 2009-11-12 #i106218#
+ // consider that the outline style is set
+ const SwNumRuleItem& rDirectItem = pParentTxtFmtColl->GetNumRule();
+ if ( rDirectItem.GetValue() != rDoc.GetOutlineNumRule()->GetName() )
+ {
+ bRet = true;
+ break;
+ }
+ // <--
}
- // <--
-
}
}
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 113319494e03..df5efb6521c8 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -34,9 +34,9 @@
#include <hintids.hxx>
#include <unotools/tempfile.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 1af12a64bf2f..b97d1fbcd642 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -31,8 +31,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#include <svtools/linguprops.hxx>
-#include <svtools/lingucfg.hxx>
+#include <unotools/linguprops.hxx>
+#include <unotools/lingucfg.hxx>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <hintids.hxx>
#include <com/sun/star/util/XCloseable.hpp>
@@ -212,7 +212,7 @@ SwFrmFmt *SwDoc::MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet )
}
break;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
case FLY_PAGE:
case FLY_AUTO_CNTNT:
case FLY_AT_FLY:
@@ -1693,7 +1693,7 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( const String &rTxt,
SwTxtAttr * const pHnt =
pTxtNode->GetTxtAttrForCharAt( nIdx, RES_TXTATR_FLYCNT );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( pHnt && pHnt->Which() == RES_TXTATR_FLYCNT,
"Missing FlyInCnt-Hint." );
ASSERT( pHnt && ((SwFmtFlyCnt&)pHnt->GetFlyCnt()).
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 2a36ce970615..57d017bd050e 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -47,14 +47,14 @@
#include <sfx2/docfile.hxx>
#include <sfx2/frame.hxx>
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <svx/svxids.hrc>
#include <svx/svdogrp.hxx>
#include <svx/linkmgr.hxx>
#include <svx/forbiddencharacterstable.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/compatibility.hxx>
-#include <svtools/lingucfg.hxx>
+#include <svl/zforlist.hxx>
+#include <unotools/compatibility.hxx>
+#include <unotools/lingucfg.hxx>
#include <svx/svdpage.hxx>
#include <paratr.hxx>
#include <fchrfmt.hxx>
@@ -319,7 +319,7 @@ SwDoc::SwDoc() :
mbInsOnlyTxtGlssry =
mbContains_MSVBasic =
mbKernAsianPunctuation =
-#ifndef PRODUCT
+#ifdef DBG_UTIL
mbXMLExport =
#endif
// --> OD 2006-03-21 #b6375613#
@@ -1353,6 +1353,7 @@ SwDoc* SwDoc::CreateCopy() const
ResetModified();
*/
+ pRet->ReplaceStyles( *(SwDoc*)this );
//copy content
pRet->Paste( *this );
return pRet;
@@ -1417,7 +1418,7 @@ void SwDoc::Paste( const SwDoc& rSource )
SwFmtAnchor aAnchor( rCpyFmt.GetAnchor() );
if( FLY_PAGE == aAnchor.GetAnchorId() )
{
- aAnchor.SetPageNum( aAnchor.GetPageNum() + /*nStartPageNumber - */1 );
+ aAnchor.SetPageNum( aAnchor.GetPageNum() /*+ nStartPageNumber - */);
}
else
continue;
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index daeda48ccae3..dddf027647c1 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -35,7 +35,7 @@
#include <hintids.hxx>
#include <tools/shl.hxx>
#ifndef _SFX_ITEMITER_HXX //autogen
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#endif
#include <sfx2/app.hxx>
#include <svx/colritem.hxx>
@@ -59,7 +59,7 @@ using namespace com::sun::star;
TYPEINIT1(SwRedlineHint, SfxHint);
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define _CHECK_REDLINE( pDoc )
#define _DEBUG_REDLINE( pDoc )
@@ -309,9 +309,11 @@ Verhalten von Delete-Redline:
bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
{
-#ifndef PRODUCT
+#if 0
+// #i93179# disabled: ASSERT in ~SwIndexReg #ifdef DBG_UTIL
SwRedline aCopy( *pNewRedl );
#endif
+ bool bError = true;
_CHECK_REDLINE( this )
if( IsRedlineOn() && !IsShowOriginal( eRedlineMode ) &&
@@ -431,6 +433,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
pRedlineTbl->Insert( pRedl );
}
+ bError = false;
bDelete = true;
}
else if( (( POS_BEFORE == eCmpPos &&
@@ -446,6 +449,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
pRedlineTbl->Remove( n );
pRedlineTbl->Insert( pRedl );
+ bError = false;
bDelete = true;
}
else if ( POS_OUTSIDE == eCmpPos )
@@ -1108,7 +1112,8 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
case POS_EQUAL:
case POS_INSIDE:
- delete pNewRedl, pNewRedl = 0;
+ // TODO Check if there is any side effect
+ //delete pNewRedl, pNewRedl = 0;
break;
case POS_OUTSIDE:
@@ -1271,7 +1276,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
}
_CHECK_REDLINE( this )
- return 0 != pNewRedl;
+ return ( 0 != pNewRedl ) || !bError;
}
void SwDoc::CompressRedlines()
@@ -3693,7 +3698,7 @@ void SwRedline::SetContentIdx( const SwNodeIndex* pIdx )
delete pCntntSect, pCntntSect = 0;
bIsVisible = FALSE;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
ASSERT( !this, "das ist keine gueltige Operation" );
#endif
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 67fec1f7d33d..3f1a6babac56 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -386,7 +386,7 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
{
if( bUndo )
{
- pRedlUndo = new SwUndoRedlineSort( rPaM, rOpt );
+ pRedlUndo = new SwUndoRedlineSort( *pRedlPam,rOpt );
DoUndo( FALSE );
}
// erst den Bereich kopieren, dann
@@ -471,20 +471,36 @@ BOOL SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
AppendUndo( pRedlUndo );
}
- // nBeg ist der Start vom sortierten Bereich
+ // nBeg is start of sorted range
SwNodeIndex aSttIdx( GetNodes(), nBeg );
- // der Kopierte Bereich ist das Geloeschte
- AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_DELETE, *pRedlPam ), true);
+ // the copied range is deleted
+ SwRedline *const pDeleteRedline(
+ new SwRedline( nsRedlineType_t::REDLINE_DELETE, *pRedlPam ));
- // das sortierte ist das Eingefuegte
+ // pRedlPam points to nodes that may be deleted (hidden) by
+ // AppendRedline, so adjust it beforehand to prevent ASSERT
pRedlPam->GetPoint()->nNode = aSttIdx;
SwCntntNode* pCNd = aSttIdx.GetNode().GetCntntNode();
pRedlPam->GetPoint()->nContent.Assign( pCNd, 0 );
+ AppendRedline(pDeleteRedline, true);
+
+ // the sorted range is inserted
AppendRedline( new SwRedline( nsRedlineType_t::REDLINE_INSERT, *pRedlPam ), true);
if( pRedlUndo )
+ {
+ SwNodeIndex aInsEndIdx( pRedlPam->GetMark()->nNode, -1 );
+ pRedlPam->GetMark()->nNode = aInsEndIdx;
+ SwCntntNode *const pPrevNode =
+ pRedlPam->GetMark()->nNode.GetNode().GetCntntNode();
+ pRedlPam->GetMark()->nContent.Assign( pPrevNode, pPrevNode->Len() );
+
+ pRedlUndo->SetValues( *pRedlPam );
+ }
+
+ if( pRedlUndo )
pRedlUndo->SetOffset( aSttIdx );
delete pRedlPam, pRedlPam = 0;
diff --git a/sw/source/core/doc/docstat.cxx b/sw/source/core/doc/docstat.cxx
index 23e6fe5b055d..04c85a3a8d2a 100644
--- a/sw/source/core/doc/docstat.cxx
+++ b/sw/source/core/doc/docstat.cxx
@@ -45,10 +45,10 @@ SwDocStat::SwDocStat() :
nOLE(0),
nPage(1),
nPara(1),
+ nAllPara(1),
nWord(0),
nChar(0),
- bModified(TRUE),
- pInternStat(0)
+ bModified(TRUE)
{}
/************************************************************************
@@ -62,9 +62,9 @@ void SwDocStat::Reset()
nOLE = 0;
nPage = 1;
nPara = 1;
+ nAllPara= 1;
nWord = 0;
nChar = 0;
bModified = TRUE;
- pInternStat = 0;
}
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 0119274f7b5e..4433d3b5e7e2 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -36,7 +36,7 @@
#include <hintids.hxx>
#define _SVSTDARR_STRINGSSORT
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svx/langitem.hxx>
#include <svx/brkitem.hxx>
#include <svx/tstpitem.hxx>
@@ -2220,7 +2220,9 @@ void SwTOXBaseSection::_UpdatePageNum( SwTxtNode* pNd,
}
}
pNd->InsertText( aNumStr, aPos,
- IDocumentContentOperations::INS_EMPTYEXPAND );
+ static_cast<IDocumentContentOperations::InsertFlags>(
+ IDocumentContentOperations::INS_EMPTYEXPAND |
+ IDocumentContentOperations::INS_FORCEHINTEXPAND) );
if(pPageNoCharFmt)
{
SwFmtCharFmt aCharFmt( pPageNoCharFmt );
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index 6ee49a81b4b7..86a4edf2aa87 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -48,7 +48,7 @@
//--> #outlinelevel added by zhaojianwei
#ifndef _SFXINTITEM_HXX
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#endif
//<--end
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index e4b7b9e87a88..e3effed7250c 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -397,7 +397,7 @@ USHORT SwHTMLTableLayout::GetBrowseWidth( const SwDoc& rDoc )
*/
ASSERT( nWidth, "No browse width available" );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
// und wenn das auch nicht klappt, gibt es zur Zeit keine Breite
@@ -1660,13 +1660,13 @@ static BOOL lcl_ResizeBox( const SwTableBox*& rpBox, void* pPara )
static BOOL lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara )
{
USHORT *pWidth = (USHORT *)pPara;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
USHORT nOldWidth = *pWidth;
#endif
*pWidth = 0;
((SwTableLine *)rpLine)->GetTabBoxes().ForEach( &lcl_ResizeBox, pWidth );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( !nOldWidth || Abs(*pWidth-nOldWidth) < COLFUZZY,
"Zeilen einer Box sind unterschiedlich lang" );
#endif
@@ -1777,7 +1777,7 @@ void SwHTMLTableLayout::SetWidths( BOOL bCallPass2, USHORT nAbsAvail,
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
// steht im tblrwcl.cxx
extern void _CheckBoxWidth( const SwTableLine&, SwTwips );
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 9f464aac5424..54139e06c340 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -39,7 +39,7 @@
#include <vcl/svapp.hxx>
#include <svtools/imapobj.hxx>
#include <svtools/imap.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <svtools/soerr.hxx>
#include <sfx2/progress.hxx>
#include <sfx2/docfile.hxx>
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 94925f5ffc5e..2fe9b11808ec 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -64,7 +64,7 @@
#include <algorithm>
// <--
// --> OD 2008-06-06 #i89178#
-#include <svtools/saveopt.hxx>
+#include <unotools/saveopt.hxx>
// <--
// --> OD 2008-07-08 #i91400#
#include <IDocumentListsAccess.hxx>
@@ -478,7 +478,7 @@ const SwFmtVertOrient* SwNumFmt::GetGraphicOrientation() const
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
long int SwNumRule::nInstances = 0;
#endif
@@ -512,7 +512,7 @@ SwNumRule::SwNumRule( const String& rNm,
msDefaultListId()
// <--
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nSerial = nInstances++;
#endif
@@ -632,7 +632,7 @@ SwNumRule::SwNumRule( const SwNumRule& rNumRule )
msDefaultListId( rNumRule.msDefaultListId )
// <--
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nSerial = nInstances++;
#endif
@@ -1317,6 +1317,7 @@ namespace numfunc
@author OD
*/
virtual void Notify( const uno::Sequence<rtl::OUString>& aPropertyNames );
+ virtual void Commit();
static SwDefBulletConfig* mpInstance;
@@ -1487,6 +1488,10 @@ namespace numfunc
InitFont();
}
+ void SwDefBulletConfig::Commit()
+ {
+ }
+
const String& GetDefBulletFontname()
{
return SwDefBulletConfig::getInstance()->GetFontname();
@@ -1562,6 +1567,7 @@ namespace numfunc
@author OD
*/
virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames );
+ virtual void Commit();
static SwNumberingUIBehaviorConfig* mpInstance;
@@ -1596,6 +1602,8 @@ namespace numfunc
return aPropNames;
}
+ void SwNumberingUIBehaviorConfig::Commit() {}
+
void SwNumberingUIBehaviorConfig::LoadConfig()
{
com::sun::star::uno::Sequence<rtl::OUString> aPropNames = GetPropNames();
diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx
index bda693e8d6ae..e5394ef11f3f 100644
--- a/sw/source/core/doc/swstylemanager.cxx
+++ b/sw/source/core/doc/swstylemanager.cxx
@@ -34,7 +34,7 @@
#include "swstylemanager.hxx"
#include <hash_map>
-#include <svtools/stylepool.hxx>
+#include <svl/stylepool.hxx>
#include <doc.hxx>
#include <charfmt.hxx>
#include <docary.hxx>
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 630979ff72ed..cb968231d575 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -37,10 +37,10 @@
#include <tools/shl.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/docfile.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/pathoptions.hxx>
+#include <svl/urihelper.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
+#include <unotools/pathoptions.hxx>
#include <sfx2/app.hxx>
#include <svx/dialmgr.hxx>
#ifndef _SVX_DIALOGS_HRC
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 5eea4c33247c..2ef5bf28268e 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -35,7 +35,7 @@
#include <hintids.hxx>
#define _ZFORLIST_DECLARE_TABLE
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
#include <cntfrm.hxx>
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 14a3ed87a8d1..a8cf3f819444 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -74,7 +74,7 @@ using namespace com::sun::star::uno;
using namespace ::com::sun::star;
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define CHECK_TABLE(t)
#else
#ifdef DEBUG
@@ -197,7 +197,7 @@ BOOL lcl_DelOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
typedef BOOL (*FN_lcl_SetBoxWidth)(SwTableLine*, CR_SetBoxWidth&, SwTwips, BOOL );
-#if !defined( PRODUCT ) || defined( JP_DEBUG )
+#if defined(DBG_UTIL) || defined( JP_DEBUG )
void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
@@ -3506,7 +3506,7 @@ void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
}
}
-#if !defined( PRODUCT ) || defined( JP_DEBUG )
+#if defined(DBG_UTIL) || defined( JP_DEBUG )
void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize )
{
diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx
index d5d0832c0a20..6f256bacce2c 100644
--- a/sw/source/core/doc/visiturl.cxx
+++ b/sw/source/core/doc/visiturl.cxx
@@ -33,7 +33,7 @@
#include <sfx2/docfile.hxx>
-#include <svtools/inethist.hxx>
+#include <svl/inethist.hxx>
#include <fmtinfmt.hxx>
#include <txtinet.hxx>
#include <doc.hxx>
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index a2263bc3f442..a185fe0299e8 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -59,7 +59,7 @@
#include <pagedesc.hxx>
#include <poolfmt.hxx>
#include <SwNodeNum.hxx>
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define CHECK_TABLE(t)
#else
#ifdef DEBUG
@@ -1329,7 +1329,7 @@ void SwDoc::CopyWithFlyInFly( const SwNodeRange& rRg, const xub_StrLen nEndConte
aRedlRest.Restore();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
//JP 17.06.99: Bug 66973 - check count only if the selection is in
// the same (or no) section. Becaus not full selected
diff --git a/sw/source/core/docnode/ndindex.cxx b/sw/source/core/docnode/ndindex.cxx
index 54936230228d..d4611aad60d7 100644
--- a/sw/source/core/docnode/ndindex.cxx
+++ b/sw/source/core/docnode/ndindex.cxx
@@ -37,7 +37,7 @@
#include "error.h" // fuers ASSERT
#include "ndindex.hxx"
-#ifndef PRODUCT
+#ifdef DBG_UTIL
int SwNodeIndex::nSerial = 0;
#endif
@@ -71,7 +71,7 @@ SwNodeIndex::SwNodeIndex( SwNodes& rNds, ULONG nIdx )
{
rNds.RegisterIndex( *this );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
}
@@ -86,7 +86,7 @@ SwNodeIndex::SwNodeIndex( const SwNodeIndex& rIdx, long nDiff )
pNd = rIdx.pNd;
pNd->GetNodes().RegisterIndex( *this );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
}
@@ -101,7 +101,7 @@ SwNodeIndex::SwNodeIndex( const SwNode& rNd, long nDiff )
pNd = (SwNode*)&rNd;
pNd->GetNodes().RegisterIndex( *this );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
MySerial = ++nSerial; // nur in der nicht PRODUCT-Version
#endif
}
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index 817fa3c257aa..f1cd2abe6e58 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -34,7 +34,7 @@
#include <hintids.hxx>
#include <tools/poly.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <svx/contdlg.hxx>
#include <vcl/svapp.hxx>
#include <docary.hxx>
diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx
index ae70599de061..aaf4814b3577 100644
--- a/sw/source/core/docnode/ndnum.cxx
+++ b/sw/source/core/docnode/ndnum.cxx
@@ -50,7 +50,7 @@ BOOL SwOutlineNodes::Seek_Entry( const SwNodePtr rSrch, USHORT* pFndPos ) const
//JP 17.03.98: aufgrund des Bug 48592 - wo unter anderem nach Undo/Redo
// Nodes aus dem falschen NodesArray im OutlineArray standen,
// jetzt mal einen Check eingebaut.
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
for( USHORT n = 1; n < nO; ++n )
if( &(*this)[ n-1 ]->GetNodes() !=
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 0f44f1f3898a..1ab54e18dbec 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -34,7 +34,7 @@
#include <hintids.hxx>
#include <svx/linkmgr.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <tools/resid.hxx>
#include <fmtcntnt.hxx>
#include <fmtanchr.hxx>
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index a7e7675966c3..08174467da1f 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -104,7 +104,7 @@
// --> OD 2005-12-05 #i27138#
#include <rootfrm.hxx>
// <--
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define CHECK_TABLE(t)
#else
#ifdef DEBUG
@@ -1322,7 +1322,8 @@ SwTableNode* SwNodes::TextToTable( const std::vector< std::vector<SwNodeRange> >
SwTxtNode& rTxtNode = static_cast<SwTxtNode&>(rNode);
// setze den bei allen TextNode in der Tabelle den TableNode
// als StartNode
- rTxtNode.pStartOfSection = pTblNd;
+// FIXME: this is setting wrong node StartOfSections in nested tables.
+// rTxtNode.pStartOfSection = pTblNd;
// remove PageBreaks/PageDesc/ColBreak
const SwAttrSet* pSet = rTxtNode.GetpSwAttrSet();
if( pSet )
@@ -1401,7 +1402,6 @@ SwTableNode* SwNodes::TextToTable( const std::vector< std::vector<SwNodeRange> >
aCellNodeIdx = SwNodeIndex( *aCellNodeIdx.GetNode().EndOfSectionNode() );
}
-
// Section der Box zuweisen
pBox = new SwTableBox( pBoxFmt, *pSttNd, pLine );
pLine->GetTabBoxes().C40_INSERT( SwTableBox, pBox, nBoxes++ );
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 61dd90bc509c..3318b2575230 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -341,7 +341,7 @@ USHORT SwNode::GetSectionLevel() const
|*
*******************************************************************/
-#ifndef PRODUCT
+#ifdef DBG_UTIL
long SwNode::nSerial = 0;
#endif
@@ -373,7 +373,7 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const BYTE nNdType )
pStartOfSection = (SwStartNode*)this;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nMySerial = nSerial;
nSerial++;
#endif
@@ -406,7 +406,7 @@ SwNode::SwNode( SwNodes& rNodes, ULONG nPos, const BYTE nNdType )
pStartOfSection = (SwStartNode*)this;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nMySerial = nSerial;
nSerial++;
#endif
@@ -1479,7 +1479,6 @@ SwCntntNode *SwCntntNode::JoinPrev()
// erfrage vom Modify Informationen
BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
{
- const SwNumRuleItem* pItem;
switch( rInfo.Which() )
{
case RES_AUTOFMT_DOCNODE:
@@ -1509,18 +1508,6 @@ BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
// return TRUE;
// <--
- case RES_GETLOWERNUMLEVEL:
- if( IsTxtNode() &&
- 0 != ( pItem = (SwNumRuleItem*)GetNoCondAttr(
- RES_PARATR_NUMRULE, TRUE )) && pItem->GetValue().Len() &&
- pItem->GetValue() == ((SwNRuleLowerLevel&)rInfo).GetName() &&
- ((SwTxtNode*)this)->GetActualListLevel()
- > ((SwNRuleLowerLevel&)rInfo).GetLevel() )
- {
- return FALSE;
- }
- break;
-
case RES_FINDNEARESTNODE:
if( ((SwFmtPageDesc&)GetAttr( RES_PAGEDESC )).GetPageDesc() )
((SwFindNearestNode&)rInfo).CheckNode( *this );
@@ -1572,7 +1559,7 @@ BOOL SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
}
return bRet;
}
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
BOOL SwCntntNode::SetAttr( const SfxItemSet& rSet )
{
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index ce24e4ba06b5..e005326b6732 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -50,7 +50,7 @@
#include <fmtmeta.hxx>
#include <docsh.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
extern BOOL CheckNodesRange( const SwNodeIndex& rStt,
const SwNodeIndex& rEnd, BOOL bChkSection );
@@ -408,7 +408,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
if( pFrmNd && !((SwCntntNode*)pFrmNd)->GetDepends() )
pFrmNd = 0;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( !pFrmNd )
ASSERT( !this, "ChgNode() - kein FrameNode gefunden" );
#endif
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 1a174d9d54de..f73d22cbd74a 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -34,8 +34,8 @@
#include <stdlib.h>
#include <hintids.hxx>
-#include <svtools/intitem.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <svx/protitem.hxx>
diff --git a/sw/source/core/docnode/swthreadmanager.cxx b/sw/source/core/docnode/swthreadmanager.cxx
index 61ffa301f708..3f06c26de608 100644
--- a/sw/source/core/docnode/swthreadmanager.cxx
+++ b/sw/source/core/docnode/swthreadmanager.cxx
@@ -39,35 +39,29 @@
@author OD
*/
-SwThreadManager* SwThreadManager::mpThreadManager = 0;
-osl::Mutex* SwThreadManager::mpGetManagerMutex = new osl::Mutex();
+bool SwThreadManager::mbThreadManagerInstantiated = false;
SwThreadManager::SwThreadManager()
: mpThreadManagerImpl( new ThreadManager( SwThreadJoiner::GetThreadJoiner() ) )
{
mpThreadManagerImpl->Init();
+ mbThreadManagerInstantiated = true;
}
SwThreadManager::~SwThreadManager()
{
- delete mpThreadManagerImpl;
}
+struct InitInstance : public rtl::Static<SwThreadManager, InitInstance> {};
+
SwThreadManager& SwThreadManager::GetThreadManager()
{
- osl::MutexGuard aGuard(*mpGetManagerMutex);
-
- if ( mpThreadManager == 0 )
- {
- mpThreadManager = new SwThreadManager();
- }
-
- return *mpThreadManager;
+ return InitInstance::get();
}
bool SwThreadManager::ExistsThreadManager()
{
- return (mpThreadManager != 0);
+ return mbThreadManagerInstantiated;
}
oslInterlockedCount SwThreadManager::AddThread( const rtl::Reference< ObservableThread >& rThread )
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index a5d8ccd24e61..e7b3ebd80245 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -32,8 +32,8 @@
#include "precompiled_sw.hxx"
#include <basic/basmgr.hxx>
#include <svtools/imapobj.hxx>
-#include <svtools/urihelper.hxx>
-#include <svtools/securityoptions.hxx>
+#include <svl/urihelper.hxx>
+#include <unotools/securityoptions.hxx>
#include <vcl/help.hxx>
#include <svx/svdview.hxx>
#include <fmturl.hxx>
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 78ede2495f78..ddafb796473e 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -35,9 +35,9 @@
#include <svx/svxids.hrc>
#endif
#include <tools/stream.hxx>
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <sot/storage.hxx>
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <svx/forbiddencharacterstable.hxx>
#include <unotools/ucbstreamhelper.hxx>
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 7bacee8fbde4..dd42123a7bc2 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -38,7 +38,7 @@
#include <ctype.h>
#include <hintids.hxx>
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <unotools/charclass.hxx>
#include <svx/boxitem.hxx>
#include <svx/lrspitem.hxx>
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 5ca8e4f2c3cb..36f4010d0df5 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -60,7 +60,7 @@
#include <crsskip.hxx>
#include <txtfrm.hxx> // SwTxtFrm
#include <scriptinfo.hxx>
-#include <svtools/ctloptions.hxx>
+#include <svl/ctloptions.hxx>
#include <charfmt.hxx> // #i27615#
#include <numrule.hxx>
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index 64ed3068d79c..b58ad492aaed 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -34,7 +34,7 @@
#include <osl/endian.h>
#include <hintids.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <tools/cachestr.hxx>
#include <doc.hxx>
#include <pam.hxx>
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 4d7cbc07e4ad..3b70c1aa4bd6 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -283,7 +283,7 @@ const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
if( pGrf->IsSwapOut() ||
( pGrfNode->IsLinkedFile() && GRAPHIC_DEFAULT == pGrf->GetType() ) )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( pGrfNode->SwapIn( bWait ) || !bWait, "Grafik konnte nicht geladen werden" );
#else
pGrfNode->SwapIn( bWait );
@@ -294,7 +294,7 @@ const Graphic* SwEditShell::GetGraphic( BOOL bWait ) const
{
if ( pGrf->IsSwapOut() && !pGrfNode->IsLinkedFile() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( pGrfNode->SwapIn( bWait ) || !bWait, "Grafik konnte nicht geladen werden" );
#else
pGrfNode->SwapIn( bWait );
@@ -726,7 +726,7 @@ Graphic SwEditShell::GetIMapGraphic() const
if( rGrf.IsSwapOut() || ( ((SwGrfNode*)pNd)->IsLinkedFile() &&
GRAPHIC_DEFAULT == rGrf.GetType() ) )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( ((SwGrfNode*)pNd)->SwapIn( TRUE ) || !TRUE, "Grafik konnte nicht geladen werden" );
#else
((SwGrfNode*)pNd)->SwapIn( TRUE );
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx
index 7dd2000ce9a6..b28764d3e55d 100644
--- a/sw/source/core/edit/ednumber.cxx
+++ b/sw/source/core/edit/ednumber.cxx
@@ -585,7 +585,7 @@ BOOL SwEditShell::IsProtectedOutlinePara() const
}
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
ASSERT(!this, "Cursor not on an outline node" );
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 3bdb011a3d6b..ce6916c7cfca 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -36,7 +36,7 @@
#include <hints.hxx>
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 0888693eaedc..f86565b6990b 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -38,7 +38,7 @@
#include <tools/urlobj.hxx>
#include <svtools/txtcmp.hxx>
#ifndef SVTOOLS_FSTATHELPER_HXX
-#include <svtools/fstathelper.hxx>
+#include <svl/fstathelper.hxx>
#endif
#include <sfx2/docfile.hxx>
#include "svx/unolingu.hxx"
diff --git a/sw/source/core/except/dbgloop.cxx b/sw/source/core/except/dbgloop.cxx
index 2f551d4f7826..a492831df2bf 100644
--- a/sw/source/core/except/dbgloop.cxx
+++ b/sw/source/core/except/dbgloop.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#error Wer fummelt denn an den makefiles rum?
#endif
#include <tools/stream.hxx>
diff --git a/sw/source/core/except/makefile.mk b/sw/source/core/except/makefile.mk
index 1000bcaab883..660eb8faf596 100644
--- a/sw/source/core/except/makefile.mk
+++ b/sw/source/core/except/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# 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
@@ -49,8 +49,7 @@ PRJPCH=
CXXFILES =
-.IF "$(product)"==""
-.IF "$(cap)"==""
+.IF "$(dbgutil)"!=""
CXXFILES += \
errhdl.cxx \
dbgloop.cxx
@@ -59,7 +58,6 @@ SLOFILES += \
$(SLO)$/errhdl.obj \
$(SLO)$/dbgloop.obj
.ENDIF
-.ENDIF
# --- Tagets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 5b6bda70ed4e..bec8e9c2d7cf 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -38,7 +38,7 @@
#define _SVSTDARR_ULONGS
#include <hintids.hxx>
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svx/unolingu.hxx>
#include <svx/langitem.hxx>
#include <swtypes.hxx>
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 996f3b092313..7c6b991be535 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -34,7 +34,7 @@
#include <float.h>
#include <sfx2/app.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <svx/pageitem.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <com/sun/star/sdbc/DataType.hpp>
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 6bb8ff4902ea..c4241a33c798 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -47,31 +47,32 @@
#include <com/sun/star/text/UserFieldFormat.hpp>
#include <com/sun/star/text/PageNumberType.hpp>
#include <com/sun/star/text/ReferenceFieldPart.hpp>
-#ifndef _COM_SUN_STAR_TEXT_FilenameDisplayFormat_HPP_
#include <com/sun/star/text/FilenameDisplayFormat.hpp>
-#endif
#include <com/sun/star/text/XDependentTextField.hpp>
#include <com/sun/star/text/DocumentStatistic.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/util/Date.hpp>
+#include <com/sun/star/util/Duration.hpp>
#include <unotools/localedatawrapper.hxx>
#include <svx/unolingu.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <comphelper/string.hxx>
#include <tools/urlobj.hxx>
-#ifndef _APP_HXX //autogen
#include <vcl/svapp.hxx>
-#endif
-#include <svtools/urihelper.hxx>
-#include <svtools/useroptions.hxx>
-#include <svtools/syslocale.hxx>
+#include <svl/urihelper.hxx>
+#include <unotools/useroptions.hxx>
+#include <unotools/syslocale.hxx>
+#include <svl/zforlist.hxx>
#include <tools/time.hxx>
#include <tools/datetime.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/util/Date.hpp>
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/util/Time.hpp>
#include <tools/shl.hxx>
#include <swmodule.hxx>
@@ -90,9 +91,7 @@
#include <cntfrm.hxx> //
#include <pam.hxx>
#include <viewsh.hxx>
-#ifndef _DBMGR_HXX
#include <dbmgr.hxx>
-#endif
#include <shellres.hxx>
#include <docufld.hxx>
#include <flddat.hxx>
@@ -100,16 +99,10 @@
#include <ndtxt.hxx>
#include <expfld.hxx>
#include <poolfmt.hxx>
-#ifndef _DOCSH_HXX
#include <docsh.hxx>
-#endif
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <swunohelper.hxx>
-#ifndef _COMCORE_HRC
#include <comcore.hrc>
-#endif
#include <svx/outliner.hxx>
#include <svx/outlobj.hxx>
@@ -1114,6 +1107,21 @@ SwDocInfoField::SwDocInfoField(SwDocInfoFieldType* pTyp, sal_uInt16 nSub, const
/* ---------------------------------------------------------------------------
---------------------------------------------------------------------------*/
+template<class T>
+double lcl_TimeToDouble( const T& rTime )
+{
+ const double fMilliSecondsPerDay = 86400000.0;
+ return ((rTime.Hours*3600000)+(rTime.Minutes*60000)+(rTime.Seconds*1000)+(rTime.HundredthSeconds*10)) / fMilliSecondsPerDay;
+}
+
+template<class D>
+double lcl_DateToDouble( const D& rDate, const Date& rNullDate )
+{
+ long nDate = Date::DateToDays( rDate.Day, rDate.Month, rDate.Year );
+ long nNullDate = Date::DateToDays( rNullDate.GetDay(), rNullDate.GetMonth(), rNullDate.GetYear() );
+ return double( nDate - nNullDate );
+}
+
String SwDocInfoField::Expand() const
{
if ( ( nSubType & 0xFF ) == DI_CUSTOM )
@@ -1145,18 +1153,43 @@ String SwDocInfoField::Expand() const
::rtl::OUString sVal;
uno::Reference < script::XTypeConverter > xConverter( comphelper::getProcessServiceFactory()
->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")), uno::UNO_QUERY );
- uno::Any aNew = xConverter->convertToSimpleType( aAny, uno::TypeClass_STRING );
- aNew >>= sVal;
+ util::Date aDate;
+ util::DateTime aDateTime;
+ util::Duration aDuration;
+ if( aAny >>= aDate)
+ {
+ SvNumberFormatter* pFormatter = pDocShell->GetDoc()->GetNumberFormatter();
+ Date* pNullDate = pFormatter->GetNullDate();
+ sVal = ExpandValue( lcl_DateToDouble<util::Date>( aDate, *pNullDate ), GetFormat(), GetLanguage());
+ }
+ else if( aAny >>= aDateTime )
+ {
+ double fDateTime = lcl_TimeToDouble<util::DateTime>( aDateTime );
+ SvNumberFormatter* pFormatter = pDocShell->GetDoc()->GetNumberFormatter();
+ Date* pNullDate = pFormatter->GetNullDate();
+ fDateTime += lcl_DateToDouble<util::DateTime>( aDateTime, *pNullDate );
+ sVal = ExpandValue( fDateTime, GetFormat(), GetLanguage());
+ }
+ else if( aAny >>= aDuration )
+ {
+ String sText(aDuration.Negative ? '-' : '+');
+ sText += ViewShell::GetShellRes()->sDurationFormat;
+ sText.SearchAndReplace(String::CreateFromAscii( "%1"), String::CreateFromInt32( aDuration.Years ) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%2"), String::CreateFromInt32( aDuration.Months ) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%3"), String::CreateFromInt32( aDuration.Days ) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%4"), String::CreateFromInt32( aDuration.Hours ) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%5"), String::CreateFromInt32( aDuration.Minutes) );
+ sText.SearchAndReplace(String::CreateFromAscii( "%6"), String::CreateFromInt32( aDuration.Seconds) );
+ sVal = sText;
+ }
+ else
+ {
+ uno::Any aNew = xConverter->convertToSimpleType( aAny, uno::TypeClass_STRING );
+ aNew >>= sVal;
+ }
((SwDocInfoField*)this)->aContent = sVal;
}
}
- else
- {
- // property is "void" - means it has not been added until now - do it!
- aAny <<= ::rtl::OUString(aContent);
- uno::Reference < beans::XPropertyContainer > xCont( xSet, uno::UNO_QUERY );
- xCont->addProperty( aName, ::com::sun::star::beans::PropertyAttribute::REMOVEABLE, aAny );
- }
}
catch (uno::Exception&) {}
}
@@ -1877,6 +1910,11 @@ void SwPostItField::SetTextObject( OutlinerParaObject* pText )
mpText = pText;
}
+sal_uInt32 SwPostItField::GetNumberOfParagraphs() const
+{
+ return (mpText) ? mpText->Count() : 1;
+}
+
/*-----------------05.03.98 13:42-------------------
--------------------------------------------------*/
@@ -2320,7 +2358,7 @@ sal_uInt16 SwRefPageGetFieldType::MakeSetList( _SetGetExpFlds& rTmpLst )
{
// einen sdbcx::Index fuers bestimmen vom TextNode anlegen
SwPosition aPos( pDoc->GetNodes().GetEndOfPostIts() );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( GetBodyTxtNode( *pDoc, aPos, *pFrm ),
"wo steht das Feld" );
#else
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index a06f595293aa..07b3d89692c6 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -35,8 +35,8 @@
// #include <math.h>
#include <float.h>
#include <rtl/math.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <svx/unolingu.hxx>
#ifndef _UNOFLDMID_H
#include <unofldmid.h>
@@ -167,7 +167,7 @@ SwFieldType::SwFieldType( USHORT nWhichId )
DBG_CTOR( SwFieldType, 0 );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwFieldType::~SwFieldType()
{
@@ -213,7 +213,7 @@ SwField::~SwField()
Beschreibung: Statt Umweg ueber den Typ
--------------------------------------------------------------------*/
-#ifndef PRODUCT
+#ifdef DBG_UTIL
USHORT SwField::Which() const
{
ASSERT(pType, "Kein Typ vorhanden");
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index 0e86e0307f1c..495d53dba382 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -33,7 +33,7 @@
// #include <math.h>
#include <tools/datetime.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <com/sun/star/util/DateTime.hpp>
#include <doc.hxx>
#include <fldbas.hxx>
diff --git a/sw/source/core/fields/flddropdown.cxx b/sw/source/core/fields/flddropdown.cxx
index a8cd34834eac..258f78359f91 100644
--- a/sw/source/core/fields/flddropdown.cxx
+++ b/sw/source/core/fields/flddropdown.cxx
@@ -37,7 +37,7 @@
#include <algorithm>
#define INCLUDED_ALGORITHM
#endif
-#include <svtools/poolitem.hxx>
+#include <svl/poolitem.hxx>
#ifndef _UNOFLDMID_H
#include <unofldmid.h>
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 372cf878f842..5952d0aba4ea 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -34,7 +34,7 @@
#define _SVSTDARR_USHORTSSORT
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <com/sun/star/text/ReferenceFieldPart.hpp>
#include <com/sun/star/text/ReferenceFieldSource.hpp>
#include <unotools/localedatawrapper.hxx>
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 6a0b0e518147..9b9d888adb8b 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -32,8 +32,8 @@
#include "precompiled_sw.hxx"
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
#include <svx/svdmodel.hxx>
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index ccd2d86e4531..c0986ef9185b 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -37,7 +37,7 @@
#include <vcl/graph.hxx>
#include <sot/formats.hxx>
#include <sot/storage.hxx>
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewsh.hxx>
#include <svx/xexch.hxx>
diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx
index e8e91ae37621..500fe108dc4b 100644
--- a/sw/source/core/frmedt/fedesc.cxx
+++ b/sw/source/core/frmedt/fedesc.cxx
@@ -70,7 +70,7 @@ USHORT SwFEShell::GetPageDescCnt() const
void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
//Die SS veraendert keinen PageDesc, sondern setzt nur das Attribut.
//Der Pagedesc muss im Dokument vorhanden sein!
BOOL bFound = FALSE;
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 1b18dc178dae..a8a19c95f5ab 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <hintids.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svtools/imapobj.hxx>
#include <svtools/soerr.hxx>
#include <svx/protitem.hxx>
@@ -218,7 +218,7 @@ sal_Bool lcl_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet )
SwDoc* pDoc = (SwDoc*)rFmt.GetDoc();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( !(nNew == FLY_PAGE &&
(FLY_AT_CNTNT==nOld || FLY_AUTO_CNTNT==nOld || FLY_IN_CNTNT==nOld ) &&
pDoc->IsInHeaderFooter( rOldAnch.GetCntntAnchor()->nNode )),
@@ -602,7 +602,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, sal_Bool bMoveIt )
SwRect aTmpRect( aRet, rAbsPos );
if( aTmpRect.HasArea() )
MakeVisible( aTmpRect );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
//TODO: That doesn't seem to be intended
if( Color(COL_TRANSPARENT) != GetOut()->GetLineColor() )
{
diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx
index 71148c5dc018..69e0edf34b98 100644
--- a/sw/source/core/frmedt/feflyole.cxx
+++ b/sw/source/core/frmedt/feflyole.cxx
@@ -37,7 +37,7 @@
#endif
#include <sfx2/viewsh.hxx>
#include <sfx2/app.hxx>
-#include <svtools/moduleoptions.hxx>
+#include <unotools/moduleoptions.hxx>
#include <sfx2/viewfrm.hxx>
#include <sot/exchange.hxx>
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 55fbb54bd718..ca89ce8665bc 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -33,9 +33,9 @@
#include <hintids.hxx>
#include <vcl/salbtype.hxx> // FRound
#include <tools/urlobj.hxx>
-#include <svtools/undo.hxx>
+#include <svl/undo.hxx>
#ifndef SVTOOLS_FSTATHELPER_HXX
-#include <svtools/fstathelper.hxx>
+#include <svl/fstathelper.hxx>
#endif
#include <svtools/imap.hxx>
#include <svtools/filter.hxx>
diff --git a/sw/source/core/inc/SwXTextDefaults.hxx b/sw/source/core/inc/SwXTextDefaults.hxx
index 6fb301c40ab8..7fa3f3b934ed 100644
--- a/sw/source/core/inc/SwXTextDefaults.hxx
+++ b/sw/source/core/inc/SwXTextDefaults.hxx
@@ -36,7 +36,7 @@
#ifndef _COM_SUN_STAR_BEANS_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
#endif
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
class SwDoc;
diff --git a/sw/source/core/inc/blink.hxx b/sw/source/core/inc/blink.hxx
index 15c6b2d20099..59ce97ae34cf 100644
--- a/sw/source/core/inc/blink.hxx
+++ b/sw/source/core/inc/blink.hxx
@@ -37,7 +37,7 @@ class SwTxtFrm;
#include <vcl/timer.hxx>
#include <tools/gen.hxx>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
class SwBlinkPortion
{
diff --git a/sw/source/core/inc/dbg_lay.hxx b/sw/source/core/inc/dbg_lay.hxx
index aa9d17b2ef1d..3cc41ef12a4c 100644
--- a/sw/source/core/inc/dbg_lay.hxx
+++ b/sw/source/core/inc/dbg_lay.hxx
@@ -66,7 +66,7 @@
#define SNAP_FLYFRAMES 0x00000002
#define SNAP_TABLECONT 0x00000004
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#include "swtypes.hxx"
diff --git a/sw/source/core/inc/dbgloop.hxx b/sw/source/core/inc/dbgloop.hxx
index b45014d088e5..a655bbf26194 100644
--- a/sw/source/core/inc/dbgloop.hxx
+++ b/sw/source/core/inc/dbgloop.hxx
@@ -31,7 +31,7 @@
#ifndef _DBGLOOP_HXX
#define _DBGLOOP_HXX
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#include <tools/solar.h>
diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx
index 19ee562e0ed3..0f2cdc02c1e1 100644
--- a/sw/source/core/inc/docsort.hxx
+++ b/sw/source/core/inc/docsort.hxx
@@ -30,7 +30,7 @@
#ifndef _SORT_HXX
#define _SORT_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <ndindex.hxx>
diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx
index adaa950fcd9a..f8a0c3ff2402 100644
--- a/sw/source/core/inc/doctxm.hxx
+++ b/sw/source/core/inc/doctxm.hxx
@@ -31,7 +31,7 @@
#define _DOCTXM_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <tools/gen.hxx>
#include <tox.hxx>
#include <section.hxx>
diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx
index 0c624b41f939..63b829c8fb85 100644
--- a/sw/source/core/inc/drawfont.hxx
+++ b/sw/source/core/inc/drawfont.hxx
@@ -97,7 +97,7 @@ class SwDrawTextInfo
SwDrawTextInfo(); // nicht zulaessig
public:
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BOOL bPos : 1; // These flags should control, that the appropriate
BOOL bWrong : 1; // Set-function has been called before calling
BOOL bGrammarCheck : 1; // the Get-function of a member
@@ -160,7 +160,7 @@ public:
bUpper = FALSE;
bDrawSpace = FALSE;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// these flags control, whether the matching member variables have
// been set by using the Set-function before they may be accessed
// by their Get-function:
@@ -383,7 +383,7 @@ public:
void SetPos( const Point &rNew )
{
pPos = &rNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bPos = TRUE;
#endif
}
@@ -391,7 +391,7 @@ public:
void SetHyphPos( xub_StrLen *pNew )
{
pHyphPos = pNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bHyph = TRUE;
#endif
}
@@ -404,7 +404,7 @@ public:
void SetWrong( const SwWrongList* pNew )
{
pWrong = pNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bWrong = TRUE;
#endif
}
@@ -412,7 +412,7 @@ public:
void SetGrammarCheck( const SwWrongList* pNew )
{
pGrammarCheck = pNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bGrammarCheck = TRUE;
#endif
}
@@ -425,7 +425,7 @@ public:
void SetSize( const Size &rNew )
{
pSize = &rNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bSize = TRUE;
#endif
}
@@ -433,7 +433,7 @@ public:
void SetFont( SwFont* pNew )
{
pFnt = pNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bFnt = TRUE;
#endif
}
@@ -451,7 +451,7 @@ public:
void SetOfst( xub_StrLen nNew )
{
nOfst = nNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bOfst = TRUE;
#endif
}
@@ -459,7 +459,7 @@ public:
void SetLeft( long nNew )
{
nLeft = nNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bLeft = TRUE;
#endif
}
@@ -467,7 +467,7 @@ public:
void SetRight( long nNew )
{
nRight = nNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bRight = TRUE;
#endif
}
@@ -475,7 +475,7 @@ public:
void SetKanaDiff( long nNew )
{
nKanaDiff = nNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bKana = TRUE;
#endif
}
@@ -488,7 +488,7 @@ public:
void SetAscent( USHORT nNew )
{
nAscent = nNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bAscent = TRUE;
#endif
}
@@ -510,7 +510,7 @@ public:
nSpace = nNew;
nSperren = 0;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bSpace = TRUE;
bSperr = TRUE;
#endif
@@ -518,7 +518,7 @@ public:
void SetNumberOfBlanks( xub_StrLen nNew )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bNumberOfBlanks = TRUE;
#endif
nNumberOfBlanks = nNew;
@@ -547,7 +547,7 @@ public:
void SetUpper( BOOL bNew )
{
bUpper = bNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bUppr = TRUE;
#endif
}
@@ -555,7 +555,7 @@ public:
void SetDrawSpace( BOOL bNew )
{
bDrawSpace = bNew;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bDrawSp = TRUE;
#endif
}
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index dc8975f3fd47..4e3c196814c6 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -168,7 +168,7 @@ public:
virtual void CheckDirection( BOOL bVert );
virtual void Cut();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
#endif
diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx
index 5b1dff0a52cb..de68dc28f6c5 100644
--- a/sw/source/core/inc/fntcache.hxx
+++ b/sw/source/core/inc/fntcache.hxx
@@ -54,7 +54,7 @@ class SwFntCache : public SwCache
public:
inline SwFntCache() : SwCache(50,50
-#ifndef PRODUCT
+#ifdef DBG_UTIL
, ByteString( RTL_CONSTASCII_STRINGPARAM(
"Globaler Font-Cache pFntCache" ))
#endif
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 02c8040b83c3..c9bbb72693ce 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -29,7 +29,7 @@
************************************************************************/
#ifndef _FRAME_HXX
#define _FRAME_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include "swtypes.hxx" // fuer SwTwips
#include "swrect.hxx"
#include "calbck.hxx" // fuer SwClient
diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx
index ee8d2a56d0d1..d135786ee683 100644
--- a/sw/source/core/inc/ftnfrm.hxx
+++ b/sw/source/core/inc/ftnfrm.hxx
@@ -74,7 +74,7 @@ class SwFtnFrm: public SwLayoutFrm
// --> OD 2005-05-18 #i49383# - control unlock of position of lower anchored objects.
bool mbUnlockPosOfLowerObjs : 1;
// <--
-#ifndef PRODUCT
+#ifdef DBG_UTIL
protected:
virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
@@ -89,7 +89,7 @@ public:
BOOL operator<( const SwTxtFtn* pTxtFtn ) const;
-#ifdef PRODUCT
+#ifndef DBG_UTIL
const SwCntntFrm *GetRef() const { return pRef; }
SwCntntFrm *GetRef() { return pRef; }
#else
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index 49edc1d28d53..ad4c7730d07c 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -218,13 +218,13 @@ class SwLayIdle
BOOL bPageValid; // Konnte die Seite alles validiert werden?
BOOL bAllValid; // Konnte alles validiert werden?
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BOOL bIndicator;
#endif
#ifdef _LAYACT_CXX
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void ShowIdle( ColorData eName );
#endif
diff --git a/sw/source/core/inc/laycache.hxx b/sw/source/core/inc/laycache.hxx
index 339b0cd5bdfc..336d68083566 100644
--- a/sw/source/core/inc/laycache.hxx
+++ b/sw/source/core/inc/laycache.hxx
@@ -72,7 +72,7 @@ public:
return pImpl; }
void UnlockImpl() { --nLockCount; }
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Bool CompareLayout( const SwDoc& rDoc ) const;
#endif
};
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index 6cbdd743761d..bdeb9ca256c5 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -35,7 +35,7 @@
#ifndef _KEYCOD_HXX //autogen
#include <vcl/keycod.hxx>
#endif
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <IDocumentMarkAccess.hxx>
#include <vector>
diff --git a/sw/source/core/inc/noteurl.hxx b/sw/source/core/inc/noteurl.hxx
index bc98e5f8c37d..3dd87375b7f8 100644
--- a/sw/source/core/inc/noteurl.hxx
+++ b/sw/source/core/inc/noteurl.hxx
@@ -32,7 +32,7 @@
#define _NOTEURL_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <tools/string.hxx>
#include "swrect.hxx"
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index 09c19c7d69fd..a16dbb365b0f 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -31,7 +31,7 @@
#define _PAGEFRM_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include "ftnboss.hxx"
#include <tools/mempool.hxx>
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index c04b30792b53..be5b8acd22da 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -203,7 +203,7 @@ public:
virtual void Paint( const SwRect& ) const;
virtual SwTwips ShrinkFrm( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
virtual SwTwips GrowFrm ( SwTwips, BOOL bTst = FALSE, BOOL bInfo = FALSE );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
virtual void Cut();
virtual void Paste( SwFrm* pParent, SwFrm* pSibling = 0 );
#endif
@@ -313,7 +313,7 @@ public:
void InsertEmptySct( SwSectionFrm* pDel );
void DeleteEmptySct() { if( pDestroy ) _DeleteEmptySct(); }
void RemoveFromList( SwSectionFrm* pSct ) { if( pDestroy ) _RemoveFromList( pSct ); }
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// Wird zur Zeit nur fuer ASSERTs benutzt:
BOOL IsInDelList( SwSectionFrm* pSct ) const; // Ist der SectionFrm in der Liste enthalten?
#endif
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 39dded3d3257..7564b5fba15a 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -34,7 +34,7 @@
#define _SVSTDARR_BYTES
#define _SVSTDARR_USHORTS
#define _SVSTDARR_XUB_STRLEN
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <i18npool/lang.h>
#include <list>
diff --git a/sw/source/core/inc/scrrect.hxx b/sw/source/core/inc/scrrect.hxx
index 433ca1f180a2..f5e987617c0b 100644
--- a/sw/source/core/inc/scrrect.hxx
+++ b/sw/source/core/inc/scrrect.hxx
@@ -30,7 +30,7 @@
#ifndef _SCRRECT_HXX
#define _SCRRECT_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include "swrect.hxx"
#include <swtypes.hxx>
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index 6fcf0a9a625d..5ebc2e7e128f 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -35,7 +35,7 @@
#ifndef _DATE_HXX //autogen
#include <tools/datetime.hxx>
#endif
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
class SfxMedium;
diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx
index c2348483a49a..c225e1d47d83 100644
--- a/sw/source/core/inc/swcache.hxx
+++ b/sw/source/core/inc/swcache.hxx
@@ -60,7 +60,7 @@
*
*/
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#ifndef _STRING_HXX //autogen
#include <tools/string.hxx>
#endif
@@ -68,7 +68,7 @@
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
class SwCacheObj;
@@ -94,7 +94,7 @@ class SwCache : public SwCacheObjArr
void DeleteObj( SwCacheObj *pObj );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ByteString aName;
long nAppend; //Anzahl der Eintragungen durch Erweiterung.
long nInsertFree; //Anzahl der Eintragungen auf freie Plaetze.
@@ -116,7 +116,7 @@ class SwCache : public SwCacheObjArr
public:
//nur BYTE hineinstecken!!!
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwCache( const USHORT nInitSize, const USHORT nGrowSize,
const ByteString &rNm );
~SwCache();
@@ -197,7 +197,7 @@ public:
inline BOOL IsLocked() const { return 0 != nLock; }
-#ifdef PRODUCT
+#ifndef DBG_UTIL
inline void Lock() { ++nLock; }
inline void Unlock() { --nLock; }
#else
@@ -249,7 +249,7 @@ public:
inline void SwCache::IncreaseMax( const USHORT nAdd )
{
nCurMax = nCurMax + sal::static_int_cast< USHORT >(nAdd);
-#ifndef PRODUCT
+#ifdef DBG_UTIL
++nIncreaseMax;
#endif
}
@@ -257,7 +257,7 @@ inline void SwCache::DecreaseMax( const USHORT nSub )
{
if ( nCurMax > nSub )
nCurMax = nCurMax - sal::static_int_cast< USHORT >(nSub);
-#ifndef PRODUCT
+#ifdef DBG_UTIL
++nDecreaseMax;
#endif
}
diff --git a/sw/source/core/inc/swfntcch.hxx b/sw/source/core/inc/swfntcch.hxx
index bad28cd2a6a0..1b1fd47db7b3 100644
--- a/sw/source/core/inc/swfntcch.hxx
+++ b/sw/source/core/inc/swfntcch.hxx
@@ -49,7 +49,7 @@ class SwFontCache : public SwCache
public:
inline SwFontCache() : SwCache(50,50
-#ifndef PRODUCT
+#ifdef DBG_UTIL
, "Globaler AttributSet/Font-Cache pSwFontCache"
#endif
) {}
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 7cb8c80b305d..110ed4e4db2c 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -848,7 +848,7 @@ public:
* class SvStatistics
*************************************************************************/
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define SV_STAT(nWhich)
#else
diff --git a/sw/source/core/inc/swthreadmanager.hxx b/sw/source/core/inc/swthreadmanager.hxx
index a8a0de5d0d4e..e3d08955433b 100644
--- a/sw/source/core/inc/swthreadmanager.hxx
+++ b/sw/source/core/inc/swthreadmanager.hxx
@@ -34,6 +34,10 @@
#include <osl/mutex.hxx>
#include <rtl/ref.hxx>
+#include <boost/utility.hpp>
+#include <memory>
+
+
class ObservableThread;
class ThreadManager;
@@ -45,6 +49,7 @@ class ThreadManager;
@author OD
*/
class SwThreadManager
+ : private ::boost::noncopyable
{
public:
@@ -52,6 +57,9 @@ class SwThreadManager
static bool ExistsThreadManager();
+ // private: don't call!
+ SwThreadManager();
+ // private: don't call!
~SwThreadManager();
oslInterlockedCount AddThread( const rtl::Reference< ObservableThread >& rThread );
@@ -76,12 +84,9 @@ class SwThreadManager
bool StartingOfThreadsSuspended();
private:
- static SwThreadManager* mpThreadManager;
- static osl::Mutex* mpGetManagerMutex;
+ static bool mbThreadManagerInstantiated;
- ThreadManager* mpThreadManagerImpl;
-
- SwThreadManager();
+ ::std::auto_ptr<ThreadManager> mpThreadManagerImpl;
};
#endif
diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx
index b9a614455edf..529bfbdb575f 100644
--- a/sw/source/core/inc/tblrwcl.hxx
+++ b/sw/source/core/inc/tblrwcl.hxx
@@ -31,7 +31,7 @@
#define _TBLRWCL_HXX
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <vector>
#include <swtypes.hxx>
@@ -69,7 +69,7 @@ BOOL lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* pPara );
BOOL lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* pPara );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
#endif
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index b0b2b807ab43..79cd2a1a574c 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -405,7 +405,7 @@ public:
inline sal_Bool IsSwapped() const { return bIsSwapped; }
// Hat der Frm eine lokale Fussnote (in diesem Frm bzw. Follow)?
-#ifdef PRODUCT
+#ifndef DBG_UTIL
void CalcFtnFlag();
#else
void CalcFtnFlag( xub_StrLen nStop = STRING_LEN );//Fuer den Test von SplitFrm
diff --git a/sw/source/core/inc/visiturl.hxx b/sw/source/core/inc/visiturl.hxx
index e2a1ef147c7b..f63b537fd81b 100644
--- a/sw/source/core/inc/visiturl.hxx
+++ b/sw/source/core/inc/visiturl.hxx
@@ -33,7 +33,7 @@
-#include <svtools/lstner.hxx>
+#include <svl/lstner.hxx>
class SwDoc;
class SwURLStateChanged : public SfxListener
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 7601f4ae370d..5560a5c07309 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -127,7 +127,7 @@
// --> OD 2006-03-06 #125892#
#include <HandleAnchorNodeChg.hxx>
// <--
-#include <svtools/cjkoptions.hxx>
+#include <svl/cjkoptions.hxx>
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -691,7 +691,7 @@ void SwFmtPageDesc::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
//mich also bei meinem Format aus.
//Dabei werden ich Deletet!!!
if( IS_TYPE( SwFmt, pDefinedIn ))
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
sal_Bool bDel = ((SwFmt*)pDefinedIn)->ResetFmtAttr( RES_PAGEDESC );
ASSERT( bDel, ";-) FmtPageDesc nicht zerstoert." );
@@ -700,7 +700,7 @@ void SwFmtPageDesc::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
((SwFmt*)pDefinedIn)->ResetFmtAttr( RES_PAGEDESC );
#endif
else if( IS_TYPE( SwCntntNode, pDefinedIn ))
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
sal_Bool bDel = ((SwCntntNode*)pDefinedIn)->ResetAttr( RES_PAGEDESC );
ASSERT( bDel, ";-) FmtPageDesc nicht zerstoert." );
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index b24ee7fd78b1..9648eb12dabf 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -851,7 +851,7 @@ void SwPageFrm::MakeAll()
if ( Frm() != aOldRect && GetUpper() )
static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( 0, 0 );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
//Der Upper (Root) muss mindestens so breit
//sein, dass er die breiteste Seite aufnehmen kann.
if ( GetUpper() )
@@ -1139,7 +1139,7 @@ void SwCntntFrm::MakeAll()
// <--
PROTOCOL_ENTER( this, PROT_MAKEALL, 0, 0 )
-#ifndef PRODUCT
+#ifdef DBG_UTIL
const SwDoc *pDoc = GetAttrSet()->GetDoc();
if( pDoc )
{
@@ -1695,7 +1695,7 @@ void SwCntntFrm::MakeAll()
( !bSct || !FindSctFrm()->IsColLocked() ) )
bMoveOrFit = TRUE;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
ASSERT( FALSE, "+TxtFrm hat WouldFit-Versprechen nicht eingehalten." );
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 5eeaef485d29..0dabddec6b5f 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -106,7 +106,7 @@
*
* --------------------------------------------------*/
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#error Wer fummelt denn an den makefiles rum?
#endif
@@ -119,7 +119,7 @@
#define _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTSSORT
#define _SVSTDARR_LONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <stdio.h>
@@ -139,7 +139,7 @@ SwImplProtocol* SwProtocol::pImpl = NULL;
ULONG lcl_GetFrameId( const SwFrm* pFrm )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
static BOOL bFrameId = FALSE;
if( bFrameId )
return pFrm->GetFrmId();
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 9ce3bc237db4..a528f252ecb2 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include "hintids.hxx"
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svtools/imap.hxx>
#ifndef _GRAPH_HXX //autogen
#include <vcl/graph.hxx>
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 252ea3298531..aff881499c3b 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -277,7 +277,7 @@ void SwFlyFreeFrm::MakeAll()
}
Unlock();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SWRECTFN( this )
ASSERT( bHeightClipped || ( (Frm().*fnRect->fnGetHeight)() > 0 &&
(Prt().*fnRect->fnGetHeight)() > 0),
@@ -966,7 +966,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
}
if ( !pSortedObjs->Insert( _rNewObj ) )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( pSortedObjs->Contains( _rNewObj ),
"Drawing object not appended into list <pSortedObjs>." );
#endif
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index f7fa2a0a8e80..648ec971c7a0 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1690,7 +1690,7 @@ void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
delete pPageMaker;
if( pDoc->GetLayoutCache() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
pDoc->GetLayoutCache()->CompareLayout( *pDoc );
#endif
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 73fdfaabe570..f73457ae5565 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -356,7 +356,7 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL )
//moeglich.
//Wenn die Seite eine spezielle Fussnotenseite ist, so nehmen wir uns auch
//soviel Platz wie eben moeglich.
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if ( !GetUpper() || !GetUpper()->IsFtnBossFrm() )
{ ASSERT( !this, "Keine FtnBoss." );
return 0;
@@ -562,7 +562,7 @@ void SwFtnFrm::InvalidateNxtFtnCnts( SwPageFrm *pPage )
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, BOOL bTst, BOOL bInfo )
{
@@ -711,7 +711,7 @@ void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
pDel->Cut();
delete pDel;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwDoc *pDoc = GetFmt()->GetDoc();
if ( GetPrev() )
{
@@ -1142,7 +1142,7 @@ SwFtnContFrm *SwFtnBossFrm::MakeFtnCont()
//immer direkt hinter dem Bodytext.
//Sein FrmFmt ist immer das DefaultFrmFmt.
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if ( FindFtnCont() )
{ ASSERT( !this, "Fussnotencontainer bereits vorhanden." );
return 0;
@@ -1171,7 +1171,7 @@ SwFtnContFrm *SwFtnBossFrm::FindFtnCont()
while( pFrm && !pFrm->IsFtnContFrm() )
pFrm = pFrm->GetNext();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if ( pFrm )
{
SwFrm *pFtn = pFrm->GetLower();
@@ -1416,7 +1416,7 @@ void SwFtnBossFrm::ResetFtn( const SwFtnFrm *pCheck )
void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew )
{
-#if (OSL_DEBUG_LEVEL > 1) && !defined(PRODUCT)
+#if (OSL_DEBUG_LEVEL > 1) && defined(DBG_UTIL)
static USHORT nStop = 0;
if ( nStop == pNew->GetFrmId() )
{
@@ -3278,7 +3278,7 @@ SwSaveFtnHeight::~SwSaveFtnHeight()
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
//JP 15.10.2001: in a non pro version test if the attribute has the same
// meaning which his reference is
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index fb365e4a5116..18d03bb167d0 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -69,7 +69,7 @@
#include <SwSmartTagMgr.hxx>
#define _SVSTDARR_BOOLS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#define _LAYACT_CXX
#include "layact.hxx"
@@ -116,7 +116,7 @@
//Sparen von Schreibarbeit um den Zugriff auf zerstoerte Seiten zu vermeiden.
-#ifndef PRODUCT
+#ifdef DBG_UTIL
static void BreakPoint()
{
@@ -2808,7 +2808,7 @@ BOOL SwLayIdle::DoIdleJob( IdleJobType eJob, BOOL bVisAreaOnly )
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
/*************************************************************************
@@ -2857,7 +2857,7 @@ void SwLayIdle::ShowIdle( ColorData eColorData )
SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
pRoot( pRt ),
pImp( pI )
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
, bIndicator( FALSE )
#endif
@@ -3041,7 +3041,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
if( pImp->IsAccessible() )
pImp->FireAccessibleEvents();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
if ( bIndicator && pImp->GetShell()->GetWin() )
{
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index 56995fcfcb26..32c7ea0f54a4 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -348,7 +348,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
{
sal_Bool bRet = sal_True;
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 91e5379228d8..8d53429e395b 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -34,7 +34,7 @@
#define _SVSTDARR_ULONGS
#define _SVSTDARR_BYTES
#define _SVSTDARR_XUB_STRLEN
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <swrect.hxx>
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index 1afbe6632d4b..f9a75f01f008 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -201,7 +201,7 @@ void SwLooping::Control( SwPageFrm* pPage )
}
else if( ++nCount > LOOP_DETECT )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#if OSL_DEBUG_LEVEL > 1
static BOOL bNoLouie = FALSE;
if( bNoLouie )
diff --git a/sw/source/core/layout/makefile.mk b/sw/source/core/layout/makefile.mk
index e2e8a2c282e8..234ee77c5586 100644
--- a/sw/source/core/layout/makefile.mk
+++ b/sw/source/core/layout/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# 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
@@ -105,12 +105,10 @@ SLOFILES = \
$(SLO)$/virtoutp.obj \
$(SLO)$/wsfrm.obj
-.IF "$(product)"==""
-.IF "$(cap)"==""
+.IF "$(dbgutil)"!=""
SLOFILES += \
$(SLO)$/dbg_lay.obj
.ENDIF
-.ENDIF
# --- Targets -------------------------------------------------------
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 82a1ad0690ac..a3e94a8e0f15 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -311,7 +311,7 @@ void _FrmInit()
{
SwRootFrm::pVout = new SwLayVout();
SwCache *pNew = new SwCache( 100, 100
-#ifndef PRODUCT
+#ifdef DBG_UTIL
, "static SwBorderAttrs::pCache"
#endif
);
@@ -322,7 +322,7 @@ void _FrmInit()
void _FrmFinit()
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// im Chache duerfen nur noch 0-Pointer stehen
for( USHORT n = SwFrm::GetCachePtr()->Count(); n; )
if( (*SwFrm::GetCachePtr())[ --n ] )
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index b73f8b4d1eeb..927308ed3c28 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/embed/EmbedStates.hpp>
#include <ndole.hxx>
#include <docary.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <fmtfsize.hxx>
#include <fmthdft.hxx>
#include <fmtclds.hxx>
@@ -1196,7 +1196,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
if ( pPage->GetFmt() != pFmtWish )
pPage->SetFrmFmt( pFmtWish );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
ASSERT( FALSE, "CheckPageDescs, missing solution" );
@@ -1239,7 +1239,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, BOOL bNotifyFields )
pDoc->UpdatePageFlds( &aMsgHnt );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
//Ein paar Pruefungen muessen schon erlaubt sein.
//1. Keine zwei EmptyPages hintereinander.
@@ -1670,7 +1670,7 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
{
//Umhaengen kann er sich selbst, indem wir ihm
//einfach ein Modify mit seinem AnkerAttr schicken.
-#ifdef PRODUCT
+#ifndef DBG_UTIL
rFmt.SwModify::Modify( 0, (SwFmtAnchor*)&rAnch );
#else
const sal_uInt32 nCnt = pPage->GetSortedObjs()->Count();
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 7dcbc4ef80a9..a52423e24bc1 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -41,7 +41,7 @@
#endif
#include <tools/poly.hxx>
#define _SVSTDARR_LONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svx/xoutbmp.hxx>
#include <sfx2/progress.hxx>
#include <svx/brshitem.hxx>
@@ -1366,7 +1366,7 @@ void MA_FASTCALL lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
continue;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
//Flys, die innerhalb des eigenen verankert sind, muessen eine
//groessere OrdNum haben oder Zeichengebunden sein.
if ( pSelfFly && bLowerOfSelf )
@@ -2052,7 +2052,7 @@ void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const OutputDevice &aOut )
io_aSwRect = SwRect( aSizedRect );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
Rectangle aTestOrgPxRect = aOut.LogicToPixel( io_aSwRect.SVRect() );
Rectangle aTestNewPxRect = aOut.LogicToPixel( aSizedRect );
ASSERT( aTestOrgPxRect == aTestNewPxRect,
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index e6275cb5481a..96294b27d1ca 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sw.hxx"
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <hints.hxx>
#include <txtftn.hxx>
#include <fmtftn.hxx>
@@ -1160,6 +1160,10 @@ void SwSectionFrm::SimpleFormat()
SWRECTFN( this )
if( GetPrev() || GetUpper() )
{
+ // --> OD 2009-09-28 #b6882166#
+ // assure notifications on position changes.
+ const SwLayNotify aNotify( this );
+ // <--
(this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), FALSE );
bValidPos = TRUE;
}
@@ -2777,7 +2781,7 @@ void SwRootFrm::_RemoveFromList( SwSectionFrm* pSct )
pDestroy->Remove( nPos );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
BOOL SwRootFrm::IsInDelList( SwSectionFrm* pSct ) const
{
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 1efe4c723e7b..4d854cd80273 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -411,7 +411,7 @@ SwFrm::~SwFrm()
delete pDrawObjs;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// JP 15.10.2001: for detection of access to deleted frames
pDrawObjs = (SwSortedObjs*)0x33333333;
#endif
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index f2a507bbd764..61f08281e5f9 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -48,7 +48,7 @@
#include "dbg_lay.hxx"
#include <ftnidx.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <docary.hxx>
#include <svx/keepitem.hxx>
#include <svx/ulspitem.hxx>
@@ -3650,7 +3650,7 @@ SwCntntFrm *SwTabFrm::FindLastCntnt()
// Spalten abklappern, dies erledigt SwSectionFrm::FindLastCntnt
if( pRet->IsColBodyFrm() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
SwSectionFrm* pSect = pRet->FindSctFrm();
ASSERT( pSect, "Wo kommt denn die Spalte her?")
ASSERT( IsAnLower( pSect ), "Gespaltene Zelle?" );
@@ -4617,7 +4617,7 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
{
bValidSize = TRUE;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if ( HasFixSize() )
{
const SwFmtFrmSize &rFrmSize = GetFmt()->GetFrmSize();
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 4cbb6ffaa7b8..73f2b4d7fc42 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1286,7 +1286,7 @@ const SwCntntFrm *SwLayoutFrm::GetCntntPos( Point& rPoint,
break;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( pActual, "Keinen Cntnt gefunden." );
if ( bBodyOnly )
ASSERT( pActual->IsInDocBody(), "Cnt nicht im Body." );
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index e7d602ae5aba..994a4d9ce625 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -67,7 +67,7 @@ BOOL SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState* ) const
return FALSE;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void SwRootFrm::Cut()
{
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index b27b505acf8f..a8b6b2aedad1 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -42,7 +42,7 @@
// OD 12.11.2002 #96272# - include declaration for <SetMappingForVirtDev>
#include "setmapvirtdev.hxx"
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*************************************************************************
* class DbgRect
@@ -186,7 +186,7 @@ void SwLayVout::Enter( ViewShell *pShell, SwRect &rRect, BOOL bOn )
{
Flush();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( pShell->GetViewOptions()->IsTest3() )
{
++nCount;
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index af97063da6e3..4bf0ba0860a5 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -38,7 +38,7 @@
#ifndef _OUTDEV_HXX
#include <vcl/outdev.hxx>
#endif
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svx/brshitem.hxx>
#include <svx/keepitem.hxx>
#include <svx/brkitem.hxx>
@@ -102,7 +102,7 @@ SwFrm::SwFrm( SwModify *pMod ) :
pPrev( 0 ),
pDrawObjs( 0 )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
bFlag01 = bFlag02 = bFlag03 = bFlag04 = bFlag05 = 0;
#endif
@@ -3866,7 +3866,7 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, BYTE nInv )
if( pLastSctCnt == pCnt )
pLastSctCnt = NULL;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
ASSERT( !pLastSctCnt, "Where's the last SctCntnt?" );
#endif
@@ -3894,7 +3894,7 @@ void lcl_InvalidateCntnt( SwCntntFrm *pCnt, BYTE nInv )
pLastSctCnt = NULL;
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
ASSERT( !pLastTabCnt, "Where's the last TabCntnt?" );
#endif
diff --git a/sw/source/core/makefile.mk b/sw/source/core/makefile.mk
index d9ea1102e375..d87e67b21863 100644
--- a/sw/source/core/makefile.mk
+++ b/sw/source/core/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# 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
@@ -73,7 +73,7 @@ SUBLIBS3= \
$(SLB)$/SwNumberTree.lib \
$(SLB)$/tablecore.lib
-.IF "$(PRODUCT)" == ""
+.IF "$(dbgutil)"!=""
SUBLIBS3+= \
$(SLB)$/except.lib
.ENDIF
diff --git a/sw/source/core/sw3io/sw3convert.cxx b/sw/source/core/sw3io/sw3convert.cxx
index 5dea22089355..e22f66175aa6 100644
--- a/sw/source/core/sw3io/sw3convert.cxx
+++ b/sw/source/core/sw3io/sw3convert.cxx
@@ -38,15 +38,15 @@
#include <stdio.h>
#include "hintids.hxx"
#include <tools/resid.hxx>
-#include <svtools/macitem.hxx>
-#include <svtools/zforlist.hxx>
-#include <svtools/zformat.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/macitem.hxx>
+#include <svl/zforlist.hxx>
+#include <svl/zformat.hxx>
+#include <svl/urihelper.hxx>
#include <sfx2/linkmgr.hxx>
#ifndef _SVSTDARR_USHORTS_DECL
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
#include <svx/lrspitem.hxx>
#include <svx/tstpitem.hxx>
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index 33acd99f8760..36a501c482a7 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sw.hxx"
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <SwXMLSectionList.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index f5a5690bbfd0..861867799aee 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sw.hxx"
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XTransactedObject.hpp>
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <svtools/unoevent.hxx>
#include <sfx2/docfile.hxx>
#include <unotools/streamwrap.hxx>
diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx
index 5bbe5ecde7b0..c0ebddd3885b 100644
--- a/sw/source/core/swg/swblocks.cxx
+++ b/sw/source/core/swg/swblocks.cxx
@@ -36,9 +36,9 @@
#include <sot/storage.hxx>
#include <tools/urlobj.hxx>
#ifndef SVTOOLS_FSTATHELPER_HXX
-#include <svtools/fstathelper.hxx>
+#include <svl/fstathelper.hxx>
#endif
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <unotools/charclass.hxx>
#include <frmfmt.hxx>
#include <doc.hxx>
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index 62634d31d744..3b6cc4fbac36 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -50,7 +50,7 @@
#include <svx/protitem.hxx>
#include <swtblfmt.hxx>
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define CHECK_TABLE(t)
#else
#ifdef DEBUG
@@ -779,7 +779,7 @@ BOOL SwTable::NewInsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes,
aFndBox.MakeFrms( *this );
// aFndBox.RestoreChartData( *this );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
const SwTableBoxes &rTabBoxes = aLines[0]->GetTabBoxes();
long nNewWidth = 0;
@@ -2147,7 +2147,7 @@ void SwTable::CleanUpBottomRowSpan( USHORT nDelLines )
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
struct RowSpanCheck
{
@@ -2181,7 +2181,7 @@ void SwTable::CheckConsistency() const
if( nRowSp < 0 )
{
ASSERT( aIter != aRowSpanCells.end(), "Missing master box" )
-#ifndef PRODUCT
+#ifdef DBG_UTIL
//RowSpanCheck &rCheck = *aIter;
#endif
ASSERT( aIter->nLeft == nWidth && aIter->nRight == nNewWidth,
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 070e8eb625f9..4683c866e6a7 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -74,7 +74,7 @@
#include <redline.hxx>
#include <list>
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define CHECK_TABLE(t)
#else
#ifdef DEBUG
@@ -1090,7 +1090,7 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
// steht im tblrwcl.cxx
extern void _CheckBoxWidth( const SwTableLine&, SwTwips );
@@ -1197,7 +1197,7 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
USHORT nPos = (USHORT)nSum;
while( pCurr != rChanges.end() && pCurr->first < nPos )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
USHORT nTemp = pCurr->first;
nTemp = pCurr->second;
#endif
@@ -1297,7 +1297,7 @@ static void lcl_CalcNewWidths( std::list<USHORT> &rSpanPos, ChangeList& rChanges
void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
const SwTabCols &rOld, const SwTableBox *pStart, BOOL bCurRowOnly )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
static int nCallCount = 0;
++nCallCount;
#endif
@@ -2013,7 +2013,7 @@ BOOL SwTableBox::IsInHeadline( const SwTable* pTbl ) const
return pTbl->GetTabLines()[ 0 ] == pLine;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ULONG SwTableBox::GetSttIdx() const
{
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 1784ad946e41..84698050f12a 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -46,7 +46,7 @@
#include <svx/langitem.hxx>
#include <svx/scripttypeitem.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/zforlist.hxx>
+#include <svl/zforlist.hxx>
#include <swatrset.hxx>
#include <frmatr.hxx>
#include <paratr.hxx>
@@ -106,7 +106,7 @@ FrmTagIdMap SwEnhancedPDFExportHelper::aFrmTagIdMap;
LanguageType SwEnhancedPDFExportHelper::eLanguageDefault = 0;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
static std::vector< USHORT > aStructStack;
@@ -295,7 +295,7 @@ SwTaggedPDFHelper::SwTaggedPDFHelper( const Num_Info* pNumInfo,
if ( mpPDFExtOutDevData && mpPDFExtOutDevData->GetIsExportTaggedPDF() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Int32 nCurrentStruct = mpPDFExtOutDevData->GetCurrentStructureElement();
lcl_DBGCheckStack();
#endif
@@ -308,7 +308,7 @@ SwTaggedPDFHelper::SwTaggedPDFHelper( const Num_Info* pNumInfo,
else
BeginTag( vcl::PDFWriter::NonStructElement, aEmptyString );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nCurrentStruct = mpPDFExtOutDevData->GetCurrentStructureElement();
lcl_DBGCheckStack();
#endif
@@ -323,13 +323,13 @@ SwTaggedPDFHelper::~SwTaggedPDFHelper()
{
if ( mpPDFExtOutDevData && mpPDFExtOutDevData->GetIsExportTaggedPDF() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Int32 nCurrentStruct = mpPDFExtOutDevData->GetCurrentStructureElement();
lcl_DBGCheckStack();
#endif
EndStructureElements();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nCurrentStruct = mpPDFExtOutDevData->GetCurrentStructureElement();
lcl_DBGCheckStack();
#endif
@@ -398,7 +398,7 @@ bool SwTaggedPDFHelper::CheckReopenTag()
const bool bSuccess = mpPDFExtOutDevData->SetCurrentStructureElement( nReopenTag );
ASSERT( bSuccess, "Failed to reopen tag" )
-#ifndef PRODUCT
+#ifdef DBG_UTIL
aStructStack.push_back( 99 );
#endif
@@ -421,7 +421,7 @@ bool SwTaggedPDFHelper::CheckRestoreTag() const
(void)bSuccess;
ASSERT( bSuccess, "Failed to restore reopened tag" )
-#ifndef PRODUCT
+#ifdef DBG_UTIL
aStructStack.pop_back();
#endif
@@ -441,7 +441,7 @@ void SwTaggedPDFHelper::BeginTag( vcl::PDFWriter::StructElement eType, const Str
const sal_Int32 nId = mpPDFExtOutDevData->BeginStructureElement( eType, rtl::OUString( rString ) );
++nEndStructureElement;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
aStructStack.push_back( static_cast<USHORT>(eType) );
#endif
@@ -501,7 +501,7 @@ void SwTaggedPDFHelper::EndTag()
{
mpPDFExtOutDevData->EndStructureElement();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
aStructStack.pop_back();
#endif
}
@@ -977,7 +977,7 @@ void SwTaggedPDFHelper::BeginNumberedListStructureElements()
nRestoreCurrentTag = mpPDFExtOutDevData->GetCurrentStructureElement();
mpPDFExtOutDevData->SetCurrentStructureElement( nReopenTag );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
aStructStack.push_back( 99 );
#endif
}
@@ -1529,7 +1529,7 @@ SwEnhancedPDFExportHelper::SwEnhancedPDFExportHelper( SwEditShell& rSh,
aNumListBodyIdMap.clear();
aFrmTagIdMap.clear();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
aStructStack.clear();
#endif
diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx
index a6ed9f42255b..31040d9665c5 100644
--- a/sw/source/core/text/atrstck.cxx
+++ b/sw/source/core/text/atrstck.cxx
@@ -34,7 +34,7 @@
#include <errhdl.hxx> // ASSERT
#include <atrhndl.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <vcl/outdev.hxx>
#include <svx/cmapitem.hxx>
#include <svx/colritem.hxx>
@@ -523,13 +523,11 @@ void SwAttrHandler::PushAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
sal_Bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
{
- ASSERT( rItem.Which() < RES_TXTATR_WITHEND_END ||
- RES_UNKNOWNATR_CONTAINER == rItem.Which() ,
+ ASSERT( rItem.Which() < RES_TXTATR_WITHEND_END,
"I do not want this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
// robust
- if ( RES_TXTATR_WITHEND_END <= rItem.Which() ||
- RES_UNKNOWNATR_CONTAINER == rItem.Which() )
+ if ( RES_TXTATR_WITHEND_END <= rItem.Which() )
return sal_False;
USHORT nStack = StackPos[ rItem.Which() ];
@@ -557,6 +555,9 @@ sal_Bool SwAttrHandler::Push( const SwTxtAttr& rAttr, const SfxPoolItem& rItem )
void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
{
+ if ( RES_TXTATR_WITHEND_END <= rAttr.Which() )
+ return; // robust
+
// these special attributes in fact represent a collection of attributes
// they have to be removed from each stack they belong to
if ( RES_TXTATR_INETFMT == rAttr.Which() ||
@@ -583,7 +584,7 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
}
// this is the usual case, we have a basic attribute, remove it from the
// stack and reset the font
- else if ( RES_UNKNOWNATR_CONTAINER != rAttr.Which() )
+ else
{
aAttrStack[ StackPos[ rAttr.Which() ] ].Remove( rAttr );
// reset font according to attribute on top of stack
@@ -600,13 +601,13 @@ void SwAttrHandler::PopAndChg( const SwTxtAttr& rAttr, SwFont& rFnt )
void SwAttrHandler::Pop( const SwTxtAttr& rAttr )
{
- ASSERT( rAttr.Which() < RES_TXTATR_WITHEND_END ||
- RES_UNKNOWNATR_CONTAINER == rAttr.Which() ,
+ ASSERT( rAttr.Which() < RES_TXTATR_WITHEND_END,
"I do not have this attribute, nWhich >= RES_TXTATR_WITHEND_END" );
- if ( RES_UNKNOWNATR_CONTAINER != rAttr.Which() &&
- rAttr.Which() < RES_TXTATR_WITHEND_END )
+ if ( rAttr.Which() < RES_TXTATR_WITHEND_END )
+ {
aAttrStack[ StackPos[ rAttr.Which() ] ].Remove( rAttr );
+ }
}
/*************************************************************************
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 8e5bf1bfc25c..5fc45ef66953 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -887,7 +887,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
aCharBox.Pos().X() = aCharBox.Pos().X() - 150;
// siehe Kommentar in SwTxtFrm::GetCrsrOfst()
-#ifndef PRODUCT
+#ifdef DBG_UTIL
const ULONG nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
// Der Node soll nicht gewechselt werden
@@ -1253,7 +1253,7 @@ sal_Bool SwTxtFrm::_UnitDown(SwPaM *pPam, const SwTwips nOffset,
if( pNextLine || bFirstOfDouble )
{
aCharBox.SSize().Width() /= 2;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// siehe Kommentar in SwTxtFrm::GetCrsrOfst()
const ULONG nOldNode = pPam->GetPoint()->nNode.GetIndex();
#endif
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index b5a3dff475ae..f86a767dcec2 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -248,7 +248,7 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst )
( pMyFollow->IsVertical() && !pMyFollow->Prt().Width() ) ||
( ! pMyFollow->IsVertical() && !pMyFollow->Prt().Height() ) )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
const SwFrm *pOldUp = GetUpper();
#endif
@@ -377,7 +377,7 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst )
pPage->ValidateCntnt();
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( pOldUp == GetUpper(), "SwTxtFrm::CalcFollow: heavy follow" );
#endif
@@ -667,7 +667,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else if ( pFoll->GetValidPrtAreaFlag() ||
pFoll->GetValidSizeFlag() )
{
@@ -767,7 +767,7 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const xub_StrLen nTxtPos )
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
CalcFtnFlag( nTxtPos-1 );
@@ -1843,7 +1843,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
const SwFrm *pDbgFtnCont = (const SwFrm*)(FindPageFrm()->FindFtnCont());
(void)pDbgFtnCont;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// nStopAt laesst sich vom CV bearbeiten.
static MSHORT nStopAt = 0;
if( nStopAt == GetFrmId() )
@@ -2089,7 +2089,7 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
const XubString aXXX = GetTxtNode()->GetTxt();
const SwTwips nDbgY = Frm().Top();
(void)nDbgY;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// nStopAt laesst sich vom CV bearbeiten.
static MSHORT nStopAt = 0;
if( nStopAt == GetFrmId() )
@@ -2135,7 +2135,7 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
//DBG_LOOP; shadows declaration above.
//resolved into:
#if OSL_DEBUG_LEVEL > 1
-#ifndef PRODUCT
+#ifdef DBG_UTIL
DbgLoop aDbgLoop2( (const void*) this );
#endif
#endif
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 5a88599c6e35..05c142e1fd84 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -728,7 +728,7 @@ void SwTxtFrm::Paint( const SwRect &rRect ) const
//DBG_LOOP; shadows declaration above.
//resolved into:
#if OSL_DEBUG_LEVEL > 1
-#ifndef PRODUCT
+#ifdef DBG_UTIL
DbgLoop aDbgLoop2( (const void*) this );
#endif
#endif
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index a5eba7301052..2413133dc378 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -176,7 +176,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
{
nCutPos = rInf.GetTxtBreak( nLineWidth, nMaxLen, nMaxComp );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if ( STRING_LEN != nCutPos )
{
rInf.GetTxtSize( &rSI, rInf.GetIdx(), nCutPos - rInf.GetIdx(),
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index fea63bf2dca0..2448b061bc1d 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -33,8 +33,8 @@
#include <com/sun/star/uno/Sequence.h>
-#include <svtools/linguprops.hxx>
-#include <svtools/lingucfg.hxx>
+#include <unotools/linguprops.hxx>
+#include <unotools/lingucfg.hxx>
#include <hintids.hxx>
#include <sfx2/printer.hxx>
#include <svx/hyznitem.hxx>
@@ -114,13 +114,13 @@ namespace numfunc
}
// <--
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// Test2: WYSIWYG++
// Test4: WYSIWYG debug
static sal_Bool bDbgLow = sal_False;
#endif
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Bool SwTxtSizeInfo::IsOptCalm() const { return !GetOpt().IsTest3(); }
@@ -236,7 +236,7 @@ SwTxtInfo::SwTxtInfo( const SwTxtInfo &rInf )
{ }
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*************************************************************************
* ChkOutDev()
*************************************************************************/
@@ -288,7 +288,7 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
bSnapToGrid( rNew.SnapToGrid() ),
nDirection( rNew.GetDirection() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ChkOutDev( *this );
#endif
}
@@ -325,7 +325,7 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt,
pRef = pOut;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ChkOutDev( *this );
#endif
@@ -412,7 +412,7 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const XubString &rTxt,
bSnapToGrid( rNew.SnapToGrid() ),
nDirection( rNew.GetDirection() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ChkOutDev( *this );
#endif
SetLen( GetMinLen( *this ) );
@@ -570,7 +570,7 @@ void SwTxtPaintInfo::CtorInitTxtPaintInfo( SwTxtFrm *pFrame, const SwRect &rPain
pGrammarCheckList = NULL;
pSmartTags = NULL; // SMARTTAGS
-#ifdef PRODUCT
+#ifndef DBG_UTIL
pBrushItem = 0;
#else
pBrushItem = ((SvxBrushItem*)-1);
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 42873bf67ff2..77b6e03d4f26 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -79,7 +79,7 @@ class SwWrongList;
#define DIR_RIGHT2LEFT 2
#define DIR_TOP2BOTTOM 3
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#define OPTCALM( rInf ) (rInf).IsOptCalm()
#define OPTLOW( rInf ) (rInf).IsOptLow()
#define OPTDBG( rInf ) (rInf).IsOptDbg()
@@ -380,7 +380,7 @@ public:
{ return ( pKanaComp && nKanaIdx < pKanaComp->Count() )
? (*pKanaComp)[nKanaIdx] : 0; }
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Bool IsOptCalm() const;
sal_Bool IsOptLow() const;
sal_Bool IsOptDbg() const;
@@ -423,7 +423,7 @@ class SwTxtPaintInfo : public SwTxtSizeInfo
void _DrawBackBrush( const SwLinePortion &rPor ) const;
protected:
-#ifdef PRODUCT
+#ifndef DBG_UTIL
SwTxtPaintInfo() { pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pWrongList = 0; pSmartTags = 0; pSpaceAdd = 0; pBrushItem = 0;}
#else
SwTxtPaintInfo() { pFrm = 0; pWrongList = 0; pGrammarCheckList = 0; pSmartTags = 0; pSpaceAdd = 0;
diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
index 18b2fec04609..3966057ced80 100644
--- a/sw/source/core/text/itratr.hxx
+++ b/sw/source/core/text/itratr.hxx
@@ -37,7 +37,7 @@
#define _SVSTDARR_XUB_STRLEN
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
class OutputDevice;
class SwFont;
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index cf6603d8a4d7..c42ba1c25df0 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -158,7 +158,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
const SwTxtNode *pNode = pFrm->GetTxtNode();
const SvxLRSpaceItem &rSpace = pFrm->GetTxtNode()->GetSwAttrSet().GetLRSpace();
- // --> OD 2009-09-02 #i95907#
+ // --> OD 2009-09-08 #i95907#, #b6879723#
const bool bListLevelIndentsApplicable = pFrm->GetTxtNode()->AreListLevelIndentsApplicable();
// <--
@@ -183,7 +183,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
pFrm->Prt().Left() +
nLMWithNum -
pNode->GetLeftMarginWithNum( sal_False ) -
- // --> OD 2009-09-02 #i95907#
+ // --> OD 2009-09-08 #i95907#, #b6879723#
// rSpace.GetLeft() +
// rSpace.GetTxtLeft();
( bListLevelIndentsApplicable
@@ -193,14 +193,18 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
}
else
{
- if ( !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
+ // --> OD 2009-09-08 #i95907#, #b6879723#
+// if ( !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
+ if ( bListLevelIndentsApplicable ||
+ !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
+ // <--
{
// this calculation is identical this the calculation for R2L layout - see above
nLeft = pFrm->Frm().Left() +
pFrm->Prt().Left() +
nLMWithNum -
pNode->GetLeftMarginWithNum( sal_False ) -
- // --> OD 2009-09-02 #i95907#
+ // --> OD 2009-09-08 #i95907#, #b6879723#
// rSpace.GetLeft() +
// rSpace.GetTxtLeft();
( bListLevelIndentsApplicable
@@ -223,7 +227,7 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
// paras inside cells inside new documents:
( pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) ||
!pFrm->IsInTab() ||
- !nLMWithNum) )
+ !nLMWithNum ) )
// <--
{
nLeft = pFrm->Prt().Left() + pFrm->Frm().Left();
@@ -235,8 +239,8 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
nFirst = nLeft;
else
{
- short nFLOfst;
- long nFirstLineOfs;
+ short nFLOfst = 0;
+ long nFirstLineOfs = 0;
if( !pNode->GetFirstLineOfsWithNum( nFLOfst ) &&
rSpace.IsAutoFirst() )
{
@@ -290,8 +294,13 @@ void SwTxtMargin::CtorInitTxtMargin( SwTxtFrm *pNewFrm, SwTxtSizeInfo *pNewInf )
else
nFirstLineOfs = nFLOfst;
+ // --> OD 2009-09-08 #i95907#, #b6879723#
+// if ( pFrm->IsRightToLeft() ||
+// !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
if ( pFrm->IsRightToLeft() ||
- !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
+ bListLevelIndentsApplicable ||
+ !pNode->getIDocumentSettingAccess()->get(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) )
+ // <--
{
nFirst = nLeft + nFirstLineOfs;
}
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index cb54872d19e2..22f454033929 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -66,7 +66,7 @@
#include <doc.hxx> // SwDoc
#include <pormulti.hxx> // SwMultiPortion
#define _SVSTDARR_LONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <unotools/charclass.hxx>
#if OSL_DEBUG_LEVEL > 1
diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx
index 7cfb941545a8..852b5661e3f8 100644
--- a/sw/source/core/text/itrpaint.cxx
+++ b/sw/source/core/text/itrpaint.cxx
@@ -103,7 +103,7 @@ void SwTxtPainter::CtorInitTxtPainter( SwTxtFrm *pNewFrm, SwTxtPaintInfo *pNewIn
pInf = pNewInf;
SwFont *pMyFnt = GetFnt();
GetInfo().SetFont( pMyFnt );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( ALIGN_BASELINE != pMyFnt->GetAlign() )
{
ASSERT( ALIGN_BASELINE == pMyFnt->GetAlign(),
diff --git a/sw/source/core/text/makefile.mk b/sw/source/core/text/makefile.mk
index fbc000002ee1..d710c9797997 100644
--- a/sw/source/core/text/makefile.mk
+++ b/sw/source/core/text/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# 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
@@ -50,13 +50,6 @@ CFLAGS+=-DENABLE_GRAPHITE
.ENDIF
# --- Files --------------------------------------------------------
-.IF "$(product)$(cap)" == ""
-CXXFILES += \
- txtio.cxx
-.ENDIF
-
-
-
SLOFILES = \
$(SLO)$/atrstck.obj \
$(SLO)$/EnhancedPDFExportHelper.obj \
@@ -100,7 +93,7 @@ SLOFILES = \
$(SLO)$/SwGrammarMarkUp.obj \
$(SLO)$/wrong.obj
-.IF "$(product)$(cap)" == ""
+.IF "$(dbgutil)"!=""
SLOFILES += \
$(SLO)$/txtio.obj
.ENDIF
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 932eb1c72b6f..162c0fddd07b 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -82,8 +82,13 @@ SwFldPortion *SwFldPortion::Clone( const XubString &rExpand ) const
{
SwFont *pNewFnt;
if( 0 != ( pNewFnt = pFnt ) )
+ {
pNewFnt = new SwFont( *pFnt );
- SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt );
+ }
+ // --> OD 2009-11-25 #i107143#
+ // pass placeholder property to created <SwFldPortion> instance.
+ SwFldPortion* pClone = new SwFldPortion( rExpand, pNewFnt, bPlaceHolder );
+ // <--
pClone->SetNextOffset( nNextOffset );
pClone->m_bNoLength = this->m_bNoLength;
return pClone;
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 331ee8d401c7..b2ece8ffe8c6 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -60,7 +60,7 @@ protected:
sal_Bool bAnimated : 1; // wird von SwGrfNumPortion benutzt
sal_Bool bNoPaint : 1; // wird von SwGrfNumPortion benutzt
sal_Bool bReplace : 1; // wird von SwGrfNumPortion benutzt
- sal_Bool bPlaceHolder : 1;
+ const sal_Bool bPlaceHolder : 1;
sal_Bool m_bNoLength : 1; // HACK for meta suffix (no CH_TXTATR)
inline void SetFont( SwFont *pNew ) { pFnt = pNew; }
diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index 6dec3c790283..6a656bef5451 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -114,7 +114,7 @@ void SwGluePortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.OnWin() && rInf.GetOpt().IsBlank() && rInf.IsNoSymbol() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
const xub_Unicode cChar = rInf.GetChar( rInf.GetIdx() );
ASSERT( CH_BLANK == cChar || CH_BULLET == cChar,
"SwGluePortion::Paint: blank expected" );
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 76eba6b1e77b..7b3d381929e2 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1293,7 +1293,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
nLastKashida = nChg;
};
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// check kashida data
long nTmpKashidaPos = -1;
sal_Bool bWrongKash = sal_False;
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index db21e72d04ec..540c7bad3a4d 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -258,7 +258,7 @@ public:
const SwLinePortion* _pDontConsiderPortion = NULL,
const bool _bNoFlyCntPorAndLinePor = false ) const;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void DebugPortions( SvStream &rOs, const XubString &rTxt,
const xub_StrLen nStart ); //$ ostream
#endif
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 08561df3f3b6..f05a4677a592 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -47,7 +47,7 @@
#include "porglue.hxx"
#include "inftxt.hxx"
#include "blink.hxx"
-#ifndef PRODUCT
+#ifdef DBG_UTIL
sal_Bool ChkChain( SwLinePortion *pStart )
{
@@ -216,7 +216,7 @@ SwLinePortion *SwLinePortion::Insert( SwLinePortion *pIns )
{
pIns->FindLastPortion()->SetPortion( pPortion );
SetPortion( pIns );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ChkChain( this );
#endif
return pIns;
@@ -247,7 +247,7 @@ SwLinePortion *SwLinePortion::Append( SwLinePortion *pIns )
SwLinePortion *pPos = FindLastPortion();
pPos->SetPortion( pIns );
pIns->SetPortion( 0 );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ChkChain( this );
#endif
return pIns;
@@ -307,7 +307,7 @@ SwPosSize SwLinePortion::GetTxtSize( const SwTxtSizeInfo & ) const
return SwPosSize();
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*************************************************************************
* virtual SwLinePortion::Check()
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 7777e5968969..89887d2b4955 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -42,7 +42,7 @@ class SwPortionHandler;
// Das CLASSIO-Makro implementiert die 'freischwebende' Funktion.
// Auf diese Weise erhaelt man beide Vorteile: virtuelle Ausgabeoperatoren
// und allgemeine Verwendbarkeit.
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#define OUTPUT_OPERATOR virtual SvStream &operator<<( SvStream & aOs ) const;
#else
#define OUTPUT_OPERATOR
@@ -177,7 +177,7 @@ public:
virtual void Paint( const SwTxtPaintInfo &rInf ) const = 0;
void PrePaint( const SwTxtPaintInfo &rInf, const SwLinePortion *pLast ) const;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
virtual sal_Bool Check( SvStream &rOs, SwTxtSizeInfo &rInfo ); //$ ostream
#endif
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx
index 3ecc266865ed..a2ad2083b9b4 100644
--- a/sw/source/core/text/redlnitr.cxx
+++ b/sw/source/core/text/redlnitr.cxx
@@ -33,7 +33,7 @@
#include "hintids.hxx"
-#include <svtools/whiter.hxx>
+#include <svl/whiter.hxx>
#include <tools/shl.hxx>
#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
#include <com/sun/star/i18n/ScriptType.hdl>
diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx
index 67588e976ee3..08b630b133d0 100644
--- a/sw/source/core/text/redlnitr.hxx
+++ b/sw/source/core/text/redlnitr.hxx
@@ -39,7 +39,7 @@
#include "swfont.hxx"
#ifndef _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
class SwTxtNode;
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 706eca2ec52e..561c1abf2923 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -98,7 +98,7 @@
#include <svx/svdoedge.hxx>
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#include "viewopt.hxx" // SwViewOptions, nur zum Testen (Test2)
#endif
#include "doc.hxx"
@@ -1817,7 +1817,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
delete pPolyPolygon;
// UPPER_LOWER_TEST
-#ifndef PRODUCT
+#ifdef DBG_UTIL
const SwRootFrm* pTmpRootFrm = pFmt->getIDocumentLayoutAccess()->GetRootFrm();
if( pTmpRootFrm->GetCurrShell() )
{
@@ -1890,7 +1890,7 @@ const SwRect SwContourCache::ContourRect( const SwFmt* pFmt,
* SwContourCache::ShowContour()
* zeichnet die PolyPolygone des Caches zu Debugzwecken.
*************************************************************************/
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void SwContourCache::ShowContour( OutputDevice* pOut, const SdrObject* pObj,
const Color& rClosedColor, const Color& rOpenColor )
@@ -1941,7 +1941,7 @@ void SwContourCache::ShowContour( OutputDevice* pOut, const SdrObject* pObj,
* SwTxtFly::ShowContour()
* zeichnet die PolyPolygone des Caches zu Debugzwecken.
*************************************************************************/
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void SwTxtFly::ShowContour( OutputDevice* pOut )
{
diff --git a/sw/source/core/text/txtfly.hxx b/sw/source/core/text/txtfly.hxx
index f7dd3e1c592e..611e628eb8e4 100644
--- a/sw/source/core/text/txtfly.hxx
+++ b/sw/source/core/text/txtfly.hxx
@@ -29,7 +29,7 @@
************************************************************************/
#ifndef _TXTFLY_HXX
#define _TXTFLY_HXX
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include "swtypes.hxx"
#include "swrect.hxx"
@@ -102,7 +102,7 @@ public:
const long nXPos,
const sal_Bool bRight );
// <--
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void ShowContour( OutputDevice* pOut, const SdrObject* pObj,
const Color& rClosedColor, const Color& rOpenColor );
#endif
@@ -235,7 +235,7 @@ public:
}
// <--
-#ifndef PRODUCT
+#ifdef DBG_UTIL
void ShowContour( OutputDevice* pOut );
#endif
};
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 14944264d39e..7df571159c38 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sw.hxx"
#include <hintids.hxx>
#include <hints.hxx>
-#include <svtools/ctloptions.hxx>
+#include <svl/ctloptions.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/sfxuno.hxx>
#include <svx/langitem.hxx>
@@ -940,17 +940,6 @@ void SwTxtFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
InvalidateLineNum();
}
break;
- case RES_INS_CHR:
- {
- nPos = ((SwInsChr*)pNew)->nPos;
- InvalidateRange( SwCharRange( nPos, 1 ), 1 );
- SET_WRONG( nPos, 1, true )
- SET_SCRIPT_INVAL( nPos )
- bSetFldsDirty = sal_True;
- if( HasFollow() )
- lcl_ModifyOfst( this, nPos, 1 );
- }
- break;
case RES_INS_TXT:
{
nPos = ((SwInsTxt*)pNew)->nPos;
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 6981ca472419..61c4110a6761 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -106,7 +106,7 @@ SwTxtFrm *SwTxtFrm::FindFtnRef( const SwTxtFtn *pFtn )
* CalcFtnFlag()
*************************************************************************/
-#ifdef PRODUCT
+#ifndef DBG_UTIL
void SwTxtFrm::CalcFtnFlag()
#else
void SwTxtFrm::CalcFtnFlag( xub_StrLen nStop )//Fuer den Test von SplitFrm
@@ -120,7 +120,7 @@ void SwTxtFrm::CalcFtnFlag( xub_StrLen nStop )//Fuer den Test von SplitFrm
const USHORT nSize = pHints->Count();
-#ifdef PRODUCT
+#ifndef DBG_UTIL
const xub_StrLen nEnd = GetFollow() ? GetFollow()->GetOfst() : STRING_LEN;
#else
const xub_StrLen nEnd = nStop != STRING_LEN ? nStop
@@ -364,7 +364,7 @@ SwTwips SwTxtFrm::_GetFtnFrmHeight() const
SwTwips nTmp = (*fnRect->fnYDiff)( (pCont->*fnRect->fnGetPrtBottom)(),
(Frm().*fnRect->fnGetTop)() );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( nTmp < 0 )
{
sal_Bool bInvalidPos = sal_False;
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 81a5c98e1913..87b3e2b01a07 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -47,7 +47,7 @@
#include <guess.hxx> //
#include <splargs.hxx> // SwInterHyphInfo
-#ifndef PRODUCT
+#ifdef DBG_UTIL
extern const sal_Char *GetLangName( const MSHORT nLang );
#endif
diff --git a/sw/source/core/text/txtinit.cxx b/sw/source/core/text/txtinit.cxx
index 5bfad43be0b9..03dda0aad402 100644
--- a/sw/source/core/text/txtinit.cxx
+++ b/sw/source/core/text/txtinit.cxx
@@ -79,7 +79,7 @@ void _TextInit()
pFntCache = new SwFntCache; // Cache for SwSubFont -> SwFntObj = { Font aFont, Font* pScrFont, Font* pPrtFont, OutputDevice* pPrinter, ... }
pSwFontCache = new SwFontCache; // Cache for SwTxtFmtColl -> SwFontObj = { SwFont aSwFont, SfxPoolItem* pDefaultArray }
SwCache *pTxtCache = new SwCache( 250, 100 // Cache for SwTxtFrm -> SwTxtLine = { SwParaPortion* pLine }
-#ifndef PRODUCT
+#ifdef DBG_UTIL
, "static SwTxtFrm::pTxtCache"
#endif
);
diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx
index 854d252afed8..1d77783bfdc6 100644
--- a/sw/source/core/text/txtio.cxx
+++ b/sw/source/core/text/txtio.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sw.hxx"
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#error Wer fummelt denn an den makefiles?
#endif
diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx
index b756567d8106..fab41e155639 100644
--- a/sw/source/core/text/txtpaint.cxx
+++ b/sw/source/core/text/txtpaint.cxx
@@ -122,7 +122,7 @@ void SwSaveClip::_ChgClip( const SwRect &rRect, const SwTxtFrm* pFrm,
#endif
}
#if OSL_DEBUG_LEVEL > 1
-#ifndef PRODUCT
+#ifdef DBG_UTIL
static sal_Bool bDbg = sal_False;
if( bDbg )
{
diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx
index da1c14121b4a..73ab5d16f788 100644
--- a/sw/source/core/text/txtpaint.hxx
+++ b/sw/source/core/text/txtpaint.hxx
@@ -71,7 +71,7 @@ inline SwSaveClip::~SwSaveClip()
Reset();
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*************************************************************************
* class SwDbgOut
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 64bb8be5fc12..434239c12b30 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -328,7 +328,7 @@ SwTabPortion::SwTabPortion( const KSHORT nTabPosition, const xub_Unicode cFillCh
: SwFixPortion( 0, 0 ), nTabPos(nTabPosition), cFill(cFillChar)
{
nLineLength = 1;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( IsFilled() )
{
ASSERT( ' ' != cFill, "SwTabPortion::CTOR: blanks ?!" );
@@ -563,7 +563,7 @@ sal_Bool SwTabPortion::PostFormat( SwTxtFormatInfo &rInf )
void SwTabPortion::Paint( const SwTxtPaintInfo &rInf ) const
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// Wir wollen uns die Fixbreite anzeigen
if( rInf.OnWin() && OPTDBG( rInf ) &&
!rInf.GetOpt().IsPagePreview() && \
diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx
index 95805c8203c1..daa2ed84d386 100644
--- a/sw/source/core/tox/toxhlp.cxx
+++ b/sw/source/core/tox/toxhlp.cxx
@@ -62,12 +62,12 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper()
}
}
catch ( UNO_NMSPC::Exception&
-#ifndef PRODUCT
+#ifdef DBG_UTIL
e
#endif
)
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ByteString aMsg( "IndexEntrySupplierWrapper: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -88,12 +88,12 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String& rTxt,
sRet = xIES->getIndexKey( rTxt, rTxtReading, rLocale );
}
catch ( UNO_NMSPC::Exception&
-#ifndef PRODUCT
+#ifdef DBG_UTIL
e
#endif
)
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ByteString aMsg( "getIndexKey: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -109,12 +109,12 @@ String IndexEntrySupplierWrapper::GetFollowingText( BOOL bMorePages ) const
sRet = xIES->getIndexFollowPageWord( bMorePages, aLcl );
}
catch ( UNO_NMSPC::Exception&
-#ifndef PRODUCT
+#ifdef DBG_UTIL
e
#endif
)
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ByteString aMsg( "getIndexFollowPageWord: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -132,12 +132,12 @@ IndexEntrySupplierWrapper::GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLc
sRet = xIES->getAlgorithmList( rLcl );
}
catch ( UNO_NMSPC::Exception&
-#ifndef PRODUCT
+#ifdef DBG_UTIL
e
#endif
)
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ByteString aMsg( "getAlgorithmList: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -155,12 +155,12 @@ sal_Bool IndexEntrySupplierWrapper::LoadAlgorithm(
bRet = xIES->loadAlgorithm( rLcl, sSortAlgorithm, nOptions );
}
catch ( UNO_NMSPC::Exception&
-#ifndef PRODUCT
+#ifdef DBG_UTIL
e
#endif
)
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ByteString aMsg( "loadAlgorithm: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
@@ -181,12 +181,12 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry(
rTxt2, rTxtReading2, rLocale2 );
}
catch ( UNO_NMSPC::Exception&
-#ifndef PRODUCT
+#ifdef DBG_UTIL
e
#endif
)
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ByteString aMsg( "compareIndexEntry: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index b51ffb862f3c..94aed72e90ae 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -191,7 +191,7 @@ SwTOXSortTabBase::SwTOXSortTabBase( TOXSortType nTyp, const SwCntntNode* pNd,
{
SwPosition aPos( *pNd );
const SwDoc& rDoc = *pNd->GetDoc();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( GetBodyTxtNode( rDoc, aPos, *pFrm ),
"wo steht der Absatz" );
#else
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 9c54bc60e239..68c779f9914b 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -46,7 +46,7 @@
#include "hints.hxx"
#include <IDocumentFieldsAccess.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
TYPEINIT3( SwFmtFld, SfxPoolItem, SwClient,SfxBroadcaster)
TYPEINIT1(SwFmtFldHint, SfxHint);
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index fd35ccd1477c..906d6ff8cebb 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -35,7 +35,7 @@
#define _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTSSORT
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <doc.hxx>
#include <cntfrm.hxx> // ASSERT in ~SwTxtFtn()
#include <pagefrm.hxx> // RemoveFtn()
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index 8093a84dbbd9..14f31f277078 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -35,9 +35,9 @@
#include "unomid.h"
#include <basic/sbxvar.hxx>
-#include <svtools/macitem.hxx>
-#include <svtools/stritem.hxx>
-#include <svtools/stylepool.hxx>
+#include <svl/macitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/stylepool.hxx>
#include <fmtautofmt.hxx>
#include <fchrfmt.hxx>
#include <fmtinfmt.hxx>
@@ -59,7 +59,7 @@
#include <unometa.hxx>
#include <unoobj.hxx> // SwXTextRange
#include <docsh.hxx>
-#include <svtools/zforlist.hxx> // GetNumberFormat
+#include <svl/zforlist.hxx> // GetNumberFormat
#include <boost/bind.hpp>
#include <algorithm>
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 826398ec2ce6..7aec6d4e9884 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -386,7 +386,9 @@ USHORT SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice& rOut )
const FontMetric aOutMet( rRefDev.GetFontMetric() );
long nTmpPrtHeight = (USHORT)aOutMet.GetAscent() + aOutMet.GetDescent();
(void) nTmpPrtHeight;
- ASSERT( nTmpPrtHeight == nPrtHeight, "GetTextHeight != Ascent + Descent" )
+ // #i106098#: do not compare with == here due to rounding error
+ ASSERT( abs(nTmpPrtHeight - nPrtHeight) < 3,
+ "GetTextHeight != Ascent + Descent" );
#endif
((OutputDevice&)rRefDev).SetFont( aOldFnt );
@@ -1042,7 +1044,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// a window. Therefore bUseSrcFont is always 0 in this case.
//
-#ifndef PRODUCT
+#ifdef DBG_UTIL
const BOOL bNoAdjust = bPrt ||
( pWin &&
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 160758d861b2..4b7dc35a6484 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -707,7 +707,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
if( nPos == STRING_LEN || nPos > nMaxPos )
nPos = nMaxPos;
ASSERT( nPos, "nextCharBlock not implemented?" );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( !nPos )
nPos = nMaxPos;
#endif
@@ -821,7 +821,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
if( nPos == STRING_LEN || nPos > nMaxPos )
nPos = nMaxPos;
ASSERT( nPos, "endOfCharBlock not implemented?" );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( !nPos )
nPos = nMaxPos;
#endif
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index 54be1b261655..ef165b010aea 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -2,6 +2,8 @@
*
* 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
@@ -50,7 +52,7 @@ _SV_IMPL_SORTAR_ALG( SwpHtEnd, SwTxtAttr* )
void DumpHints( const SwpHtStart &rHtStart,
const SwpHtEnd &rHtEnd )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
aDbstream << "DumpHints:" << endl;
(aDbstream << "\tStarts:" ).WriteNumber(rHtStart.Count()) << endl;
for( USHORT i = 0; i < rHtStart.Count(); ++i )
@@ -247,7 +249,7 @@ BOOL SwpHtEnd::Seek_Entry( const SwTxtAttr *pElement, USHORT *pPos ) const
void SwpHintsArray::Insert( const SwTxtAttr *pHt )
{
Resort();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
USHORT nPos;
ASSERT(!m_HintStarts.Seek_Entry( pHt, &nPos ),
"Insert: hint already in HtStart");
@@ -256,7 +258,7 @@ void SwpHintsArray::Insert( const SwTxtAttr *pHt )
#endif
m_HintStarts.Insert( pHt );
m_HintEnds.Insert( pHt );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#ifdef NIE
(aDbstream << "Insert: " ).WriteNumber( long( pHt ) ) << endl;
DumpHints( m_HintStarts, m_HintEnds );
@@ -275,7 +277,7 @@ void SwpHintsArray::DeleteAtPos( const USHORT nPos )
USHORT nEndPos;
m_HintEnds.Seek_Entry( pHt, &nEndPos );
m_HintEnds.Remove( nEndPos );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#ifdef NIE
(aDbstream << "DeleteAtPos: " ).WriteNumber( long( pHt ) ) << endl;
DumpHints( m_HintStarts, m_HintEnds );
@@ -283,7 +285,7 @@ void SwpHintsArray::DeleteAtPos( const USHORT nPos )
#endif
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
/*************************************************************************
* SwpHintsArray::Check()
@@ -441,7 +443,7 @@ bool SwpHintsArray::Resort()
if( pLast && !lcl_IsLessStart( *pLast, *pHt ) )
{
#ifdef NIE
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// ASSERT( bResort, "!Resort/Start: correcting hints-array" );
aDbstream << "Resort: Starts" << endl;
DumpHints( m_HintStarts, m_HintEnds );
@@ -464,7 +466,7 @@ bool SwpHintsArray::Resort()
if( pLast && !lcl_IsLessEnd( *pLast, *pHt ) )
{
#ifdef NIE
-#ifndef PRODUCT
+#ifdef DBG_UTIL
aDbstream << "Resort: Ends" << endl;
DumpHints( m_HintStarts, m_HintEnds );
#endif
@@ -480,7 +482,7 @@ bool SwpHintsArray::Resort()
}
pLast = pHt;
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#ifdef NIE
aDbstream << "Resorted:" << endl;
DumpHints( m_HintStarts, m_HintEnds );
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index f5ebacaac8cd..a779898d4aaa 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -40,12 +40,12 @@
// --> OD 2008-01-17 #newlistlevelattrs#
#include <svx/tstpitem.hxx>
// <--
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_ULONGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#endif
-#include <svtools/ctloptions.hxx>
+#include <svl/ctloptions.hxx>
#include <swmodule.hxx>
#include <txtfld.hxx>
#include <txtinet.hxx>
@@ -92,13 +92,13 @@
#include <numrule.hxx>
//--> #outlinelevel added by zhaojianwei
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
//<--end
#include <swtable.hxx>
#include <docsh.hxx>
#include <SwNodeNum.hxx>
// --> OD 2008-02-25 #refactorlists#
-#include <svtools/intitem.hxx>
+#include <svl/intitem.hxx>
#include <list.hxx>
// <--
@@ -111,7 +111,7 @@ SV_DECL_PTRARR(SwpHts,SwTxtAttr*,1,1)
// Leider ist das SwpHints nicht ganz wasserdicht:
// Jeder darf an den Hints rumfummeln, ohne die Sortierreihenfolge
// und Verkettung sicherstellen zu muessen.
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#define CHECK_SWPHINTS(pNd) { if( pNd->GetpSwpHints() && \
!pNd->GetDoc()->IsInReading() ) \
pNd->GetpSwpHints()->Check(); }
@@ -372,7 +372,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
((SwTxtFrm*)pFrm)->SetFtn( TRUE );
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
while( 0 != (pCntnt = (SwCntntFrm*)aIter.Next()) )
{
SwFtnFrm *pDbgFtn = pCntnt->FindFtnFrm();
@@ -943,9 +943,7 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
bool bNoExp = false;
bool bResort = false;
const USHORT coArrSz = static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN) +
- static_cast<USHORT>(RES_UNKNOWNATR_END) -
- static_cast<USHORT>(RES_UNKNOWNATR_BEGIN);
+ static_cast<USHORT>(RES_CHRATR_BEGIN);
BOOL aDontExp[ coArrSz ];
memset( &aDontExp, 0, coArrSz * sizeof(BOOL) );
@@ -980,14 +978,6 @@ void SwTxtNode::Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
nWhPos = static_cast<USHORT>(nWhich -
RES_CHRATR_BEGIN);
}
- else if (isUNKNOWNATR(nWhich))
- {
- nWhPos = static_cast<USHORT>(
- nWhich -
- static_cast<USHORT>(RES_UNKNOWNATR_BEGIN) +
- static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN) );
- }
else
continue;
@@ -2852,6 +2842,9 @@ long SwTxtNode::GetLeftMarginWithNum( BOOL bTxtLeft ) const
BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
{
BOOL bRet( FALSE );
+ // --> OD 2009-09-08 #i95907#, #b6879723#
+ rFLOffset = 0;
+ // <--
// --> OD 2005-11-02 #i51089 - TUNING#
const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : 0L;
@@ -2885,8 +2878,6 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
}
// <--
}
- else
- rFLOffset = 0;
bRet = TRUE;
}
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 3c2a643099cb..7213c1e60efd 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -88,7 +88,7 @@
#define FNT_ATM_HACK
#endif
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// globale Variable
SvStatistics aSvStat;
#endif
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 12f8e210e7c5..b0d23e7ca4ee 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -35,9 +35,9 @@
#include <hintids.hxx>
#include <sot/factory.hxx>
#include <svx/xmlcnitm.hxx>
-#include <svtools/whiter.hxx>
-#include <svtools/itemiter.hxx>
-#include <svtools/stylepool.hxx>
+#include <svl/whiter.hxx>
+#include <svl/itemiter.hxx>
+#include <svl/stylepool.hxx>
#include <svx/fontitem.hxx>
#include <svx/langitem.hxx>
#include <svx/emphitem.hxx>
@@ -84,11 +84,11 @@
// OD 26.06.2003 #108784#
#include <dcontact.hxx>
#include <docsh.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <algorithm>
#include <map>
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#define CHECK Check();
#else
#define CHECK
@@ -153,12 +153,14 @@ bool isOverlap(const xub_StrLen nStart1, const xub_StrLen nEnd1,
|| ((nStart1 < nStart2) && (nStart2 < nEnd1) && (nEnd1 < nEnd2)); // (2)
}
+/// #i106930#: now asymmetric: empty hint1 is _not_ nested, but empty hint2 is
static
bool isNestedAny(const xub_StrLen nStart1, const xub_StrLen nEnd1,
const xub_StrLen nStart2, const xub_StrLen nEnd2)
{
- return (nStart1 == nStart2) // in this case ends do not matter
- || ((nStart1 < nStart2) ? (nEnd1 >= nEnd2) : (nEnd1 <= nEnd2));
+ return ((nStart1 == nStart2) || (nEnd1 == nEnd2))
+ ? (nStart1 != nEnd1) // same start/end: nested except if hint1 empty
+ : ((nStart1 < nStart2) ? (nEnd1 >= nEnd2) : (nEnd1 <= nEnd2));
}
static
@@ -658,7 +660,7 @@ void SwpHints::BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
}
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( !rNode.GetDoc()->IsInReading() )
CHECK;
#endif
@@ -1065,11 +1067,6 @@ SwTxtAttr* MakeTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr,
case RES_TXTATR_TOXMARK:
pNew = new SwTxtTOXMark( (SwTOXMark&)rNew, nStt, &nEnd );
break;
- case RES_UNKNOWNATR_CONTAINER:
- case RES_TXTATR_UNKNOWN_CONTAINER:
- pNew = new SwTxtXMLAttrContainer( (SvXMLAttrContainerItem&)rNew,
- nStt, nEnd );
- break;
case RES_TXTATR_CJK_RUBY:
pNew = new SwTxtRuby( (SwFmtRuby&)rNew, nStt, nEnd );
break;
@@ -1415,11 +1412,11 @@ bool SwTxtNode::InsertHint( SwTxtAttr * const pAttr, const SetAttrMode nMode )
// FussNote im Redline-Bereich NICHT ins FtnArray einfuegen!
if( StartOfSectionIndex() > rNodes.GetEndOfRedlines().GetIndex() )
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
const BOOL bSuccess =
#endif
pDoc->GetFtnIdxs().Insert( pTxtFtn );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
ASSERT( bSuccess, "FtnIdx nicht eingetragen." );
#endif
}
@@ -1669,8 +1666,7 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
SfxItemSet aCharSet( *rSet.GetPool(), aCharAutoFmtSetRange );
- USHORT nWhich, nCount = 0;
- SwTxtAttr* pNew;
+ USHORT nCount = 0;
SfxItemIter aIter( *pSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
@@ -1678,8 +1674,10 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
{
if ( pItem && (reinterpret_cast<SfxPoolItem*>(-1) != pItem))
{
- nWhich = pItem->Which();
- if ( isCHRATR(nWhich) || isTXTATR(nWhich) || isUNKNOWNATR(nWhich) )
+ const USHORT nWhich = pItem->Which();
+ ASSERT( isCHRATR(nWhich) || isTXTATR(nWhich),
+ "SwTxtNode::SetAttr(): unknown attribute" );
+ if ( isCHRATR(nWhich) || isTXTATR(nWhich) )
{
if ((RES_TXTATR_CHARFMT == nWhich) &&
(GetDoc()->GetDfltCharFmt() ==
@@ -1698,7 +1696,8 @@ BOOL SwTxtNode::SetAttr( const SfxItemSet& rSet, xub_StrLen nStt,
}
else
{
- pNew = MakeTxtAttr( *GetDoc(),
+
+ SwTxtAttr *const pNew = MakeTxtAttr( *GetDoc(),
const_cast<SfxPoolItem&>(*pItem), nStt, nEnd );
if ( pNew )
{
@@ -1862,20 +1861,18 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
}
const USHORT nSize = m_pSwpHints->Count();
- USHORT n;
- xub_StrLen nAttrStart;
- const xub_StrLen* pAttrEnd;
if( nStt == nEnd ) // kein Bereich:
{
- for( n = 0; n < nSize; ++n ) //
+ for (USHORT n = 0; n < nSize; ++n)
{
const SwTxtAttr* pHt = (*m_pSwpHints)[n];
- nAttrStart = *pHt->GetStart();
+ const xub_StrLen nAttrStart = *pHt->GetStart();
if( nAttrStart > nEnd ) // ueber den Bereich hinaus
break;
- if( 0 == ( pAttrEnd = pHt->GetEnd() )) // nie Attribute ohne Ende
+ const xub_StrLen* pAttrEnd = pHt->GetEnd();
+ if ( ! pAttrEnd ) // no attributes without end
continue;
if( ( nAttrStart < nStt &&
@@ -1889,22 +1886,21 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
else // es ist ein Bereich definiert
{
// --> FME 2007-03-13 #i75299#
- std::vector< SwPoolItemEndPair >* pAttrArr = 0;
+ ::std::auto_ptr< std::vector< SwPoolItemEndPair > > pAttrArr;
// <--
const USHORT coArrSz = static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN) +
- static_cast<USHORT>(RES_UNKNOWNATR_END) -
- static_cast<USHORT>(RES_UNKNOWNATR_BEGIN);
+ static_cast<USHORT>(RES_CHRATR_BEGIN);
- for( n = 0; n < nSize; ++n )
+ for (USHORT n = 0; n < nSize; ++n)
{
const SwTxtAttr* pHt = (*m_pSwpHints)[n];
- nAttrStart = *pHt->GetStart();
+ const xub_StrLen nAttrStart = *pHt->GetStart();
if( nAttrStart > nEnd ) // ueber den Bereich hinaus
break;
- if( 0 == ( pAttrEnd = pHt->GetEnd() )) // nie Attribute ohne Ende
+ const xub_StrLen* pAttrEnd = pHt->GetEnd();
+ if ( ! pAttrEnd ) // no attributes without end
continue;
BOOL bChkInvalid = FALSE;
@@ -1927,7 +1923,7 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
if( bChkInvalid )
{
// uneindeutig ?
- SfxItemIter* pItemIter = 0;
+ ::std::auto_ptr< SfxItemIter > pItemIter;
const SfxPoolItem* pItem = 0;
if ( RES_TXTATR_AUTOFMT == pHt->Which() )
@@ -1935,7 +1931,7 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
const SfxItemSet* pAutoSet = CharFmt::GetItemSet( pHt->GetAttr() );
if ( pAutoSet )
{
- pItemIter = new SfxItemIter( *pAutoSet );
+ pItemIter.reset( new SfxItemIter( *pAutoSet ) );
pItem = pItemIter->GetCurItem();
}
}
@@ -1947,9 +1943,14 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
while ( pItem )
{
const USHORT nHintWhich = pItem->Which();
+ ASSERT(!isUNKNOWNATR(nHintWhich),
+ "SwTxtNode::GetAttr(): unkonwn attribute?");
- if( !pAttrArr )
- pAttrArr = new std::vector< SwPoolItemEndPair >( coArrSz );
+ if ( !pAttrArr.get() )
+ {
+ pAttrArr.reset(
+ new std::vector< SwPoolItemEndPair >(coArrSz));
+ }
std::vector< SwPoolItemEndPair >::iterator pPrev = pAttrArr->begin();
if (isCHRATR(nHintWhich) ||
@@ -1957,12 +1958,6 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
{
pPrev += nHintWhich - RES_CHRATR_BEGIN;
}
- else if (isUNKNOWNATR(nHintWhich))
- {
- pPrev += nHintWhich - RES_UNKNOWNATR_BEGIN + (
- static_cast< USHORT >(RES_TXTATR_WITHEND_END) -
- static_cast< USHORT >(RES_CHRATR_BEGIN) );
- }
else
{
pPrev = pAttrArr->end();
@@ -2006,28 +2001,21 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
}
}
- pItem = ( pItemIter && !pItemIter->IsAtEnd() ) ? pItemIter->NextItem() : 0;
+ pItem = ( pItemIter.get() && !pItemIter->IsAtEnd() )
+ ? pItemIter->NextItem() : 0;
} // end while
-
- delete pItemIter;
}
}
- if( pAttrArr )
+ if ( pAttrArr.get() )
{
- for( n = 0; n < coArrSz; ++n )
+ for (USHORT n = 0; n < coArrSz; ++n)
{
const SwPoolItemEndPair& rItemPair = (*pAttrArr)[ n ];
if( (0 != rItemPair.mpItem) && ((SfxPoolItem*)-1 != rItemPair.mpItem) )
{
- USHORT nWh;
- if( n < static_cast<USHORT>( static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN) ) )
- nWh = static_cast<USHORT>(n + RES_CHRATR_BEGIN);
- else
- nWh = n - static_cast<USHORT>( static_cast<USHORT>(RES_TXTATR_WITHEND_END) -
- static_cast<USHORT>(RES_CHRATR_BEGIN) +
- static_cast<USHORT>(RES_UNKNOWNATR_BEGIN) );
+ const USHORT nWh =
+ static_cast<USHORT>(n + RES_CHRATR_BEGIN);
if( nEnd <= rItemPair.mnEndPos ) // hinter oder genau Ende
{
@@ -2039,8 +2027,6 @@ BOOL SwTxtNode::GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
rSet.InvalidateItem( nWh );
}
}
-
- delete pAttrArr;
}
}
if( aFmtSet.Count() )
@@ -2630,7 +2616,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
{
SwpHintsArray::Insert( pHint );
CalcFlags();
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( !rNode.GetDoc()->IsInReading() )
CHECK;
#endif
@@ -2723,7 +2709,7 @@ bool SwpHints::TryInsertHint( SwTxtAttr* const pHint, SwTxtNode &rNode,
rNode.Modify( 0, &aHint );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if( !bNoHintAdjustMode && !rNode.GetDoc()->IsInReading() )
CHECK;
#endif
diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx
index 0ce234483f40..0269b9697892 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -32,7 +32,7 @@
#include "precompiled_sw.hxx"
-#include <svtools/itempool.hxx>
+#include <svl/itempool.hxx>
#include <txatbase.hxx>
#include <fmtfld.hxx>
#include <docufld.hxx>
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index 18db65d13dc8..afed4e1af732 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -31,7 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <hints.hxx>
#include <sfx2/objsh.hxx>
@@ -52,13 +51,6 @@
TYPEINIT1(SwTxtINetFmt,SwClient);
TYPEINIT1(SwTxtRuby,SwClient);
-// ATT_XMLCONTAINERITEM ******************************
-
-SwTxtXMLAttrContainer::SwTxtXMLAttrContainer(
- SvXMLAttrContainerItem& rAttr,
- xub_StrLen nStt, xub_StrLen nEnde )
- : SwTxtAttrEnd( rAttr, nStt, nEnde )
-{}
/*************************************************************************
* class SwTxtCharFmt
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index b34d013f3264..1b931ad68fd5 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -41,7 +41,7 @@
#endif
#include <hintids.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <svx/splwrap.hxx>
#include <svx/langitem.hxx>
#include <svx/fontitem.hxx>
@@ -368,7 +368,6 @@ static bool lcl_HaveCommonAttributes( IStyleAccess& rStyleAccess,
return bRet;
}
-
inline BOOL InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
return ((nIdx >=nStart) && (nIdx <= nEnd));
}
@@ -1676,6 +1675,7 @@ void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
void SwTxtNode::CountWords( SwDocStat& rStat,
xub_StrLen nStt, xub_StrLen nEnd ) const
{
+ ++rStat.nAllPara; // #i93174#: count _all_ paragraphs
if( nStt < nEnd )
{
if ( !IsHidden() )
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 1eeb9246dffe..b0d8a486b1ae 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -203,7 +203,7 @@ void SwDoc::AppendUndo( SwUndo* pUndo )
USHORT nEnde = UNDO_ACTION_LIMIT;
// nur zum Testen der neuen DOC-Member
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
SwUndoId nId = UNDO_EMPTY;
USHORT nUndosCnt = 0, nSttEndCnt = 0;
@@ -551,7 +551,7 @@ SwUndoId SwDoc::EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter)
pUndoEnd->SetSttOffset( nSize );
// nur zum Testen der Start/End-Verpointerung vom Start/End Undo
-#ifndef PRODUCT
+#ifdef DBG_UTIL
{
USHORT nEndCnt = 1, nCnt = pUndos->Count();
SwUndoId nTmpId = UNDO_EMPTY;
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index ffc831fe16e5..7f868d770100 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -33,7 +33,7 @@
#include <hintids.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <fmtftn.hxx>
#include <fchrfmt.hxx>
#include <fmtflcnt.hxx>
@@ -833,7 +833,7 @@ SwHistoryResetAttrSet::SwHistoryResetAttrSet( const SfxItemSet& rSet,
, m_Array( (BYTE)rSet.Count() )
{
SfxItemIter aIter( rSet );
- bool bAutoStyle = true;
+ bool bAutoStyle = false;
while( TRUE )
{
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index e5312b3cefdd..87e0531dd893 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -39,7 +39,7 @@
#include <svx/svdmodel.hxx>
#include <svx/tstpitem.hxx>
#include <svx/svdpage.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <fmtflcnt.hxx>
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 87522d4d59f8..6a9b61c7aeb8 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -68,7 +68,7 @@ public:
SwNodeIndex* GetMvSttIdx() const
{ return SwUndoSaveSection::GetMvSttIdx(); }
-#ifndef PRODUCT
+#ifdef DBG_UTIL
USHORT nRedlineCount;
#endif
};
@@ -666,14 +666,9 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition& rMark,
{
if( !pHistory )
pHistory = new SwHistory;
- if( pAPos->nNode < pEnd->nNode &&
- ( ( nsDelCntntType::DELCNT_CHKNOCNTNT & nDelCntntType ) ||
- ( pStt->nNode < pAPos->nNode || !pStt->nContent.GetIndex() ) ) )
+ if (IsDestroyFrameAnchoredAtChar(
+ *pAPos, *pStt, *pEnd, nDelCntntType))
{
- // Here we identified the objects to destroy:
- // - anchored between start and end of the selection
- // - anchored in start of the selection with "CheckNoContent"
- // - anchored in start of sel. and the selection start at pos 0
pHistory->Add( *pFmt, nChainInsPos );
n = n >= rSpzArr.Count() ? rSpzArr.Count() : n+1;
}
@@ -1094,7 +1089,7 @@ SwRedlineSaveData::SwRedlineSaveData( SwComparePosition eCmpPos,
ASSERT( !this, "keine gueltigen Daten!" )
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
nRedlineCount = rSttPos.nNode.GetNode().GetDoc()->GetRedlineTbl().Count();
#endif
}
@@ -1388,3 +1383,20 @@ String DenoteSpecialCharacters(const String & rStr)
return aResult;
}
+
+bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos,
+ SwPosition const & rStart, SwPosition const & rEnd,
+ DelCntntType const nDelCntntType)
+{
+
+ // Here we identified the objects to destroy:
+ // - anchored between start and end of the selection
+ // - anchored in start of the selection with "CheckNoContent"
+ // - anchored in start of sel. and the selection start at pos 0
+ return (rAnchorPos.nNode < rEnd.nNode)
+ && ( (nsDelCntntType::DELCNT_CHKNOCNTNT & nDelCntntType)
+ || (rStart.nNode < rAnchorPos.nNode)
+ || !rStart.nContent.GetIndex()
+ );
+}
+
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index dd261282e5c7..10bcae715f28 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -33,7 +33,7 @@
#include <hintids.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/itemiter.hxx>
#include <fmtflcnt.hxx>
#include <fmtanchr.hxx>
#include <fmtcntnt.hxx>
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index e2cb9fb37428..21103ebb224d 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -247,6 +247,12 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
// im aSaveRange steht der kopierte, sprich der originale.
SwDoc& rDoc = rIter.GetDoc();
+ SwPosition* pStart = rIter.pAktPam->Start();
+ SwPosition* pEnd = rIter.pAktPam->End();
+
+ SwNodeIndex aPrevIdx( pStart->nNode, -1 );
+ ULONG nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+
if( 0 == ( nsRedlineMode_t::REDLINE_SHOW_DELETE & rDoc.GetRedlineMode()) )
{
// die beiden Redline Objecte suchen und diese dann anzeigen lassen,
@@ -254,17 +260,17 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
// das Geloeschte ist versteckt, also suche das INSERT
// Redline Object. Dahinter steht das Geloeschte
USHORT nFnd = rDoc.GetRedlinePos(
- *rDoc.GetNodes()[ nSttNode + nOffset + 1 ],
+ *rDoc.GetNodes()[ nSttNode + 1 ],
nsRedlineType_t::REDLINE_INSERT );
ASSERT( USHRT_MAX != nFnd && nFnd+1 < rDoc.GetRedlineTbl().Count(),
"kein Insert Object gefunden" );
++nFnd;
- rDoc.GetRedlineTbl()[nFnd]->Show();
- SetPaM( *rIter.pAktPam );
+ rDoc.GetRedlineTbl()[nFnd]->Show( 1 );
}
{
SwPaM aTmp( *rIter.pAktPam->GetMark() );
+ aTmp.GetMark()->nContent = 0;
aTmp.SetMark();
aTmp.GetPoint()->nNode = nSaveEndNode;
aTmp.GetPoint()->nContent.Assign( aTmp.GetCntntNode(), nSaveEndCntnt );
@@ -272,13 +278,52 @@ void SwUndoRedlineSort::_Undo( SwUndoIter& rIter )
}
rDoc.DelFullPara( *rIter.pAktPam );
+
+ SwPaM* pPam = rIter.pAktPam;
+ pPam->DeleteMark();
+ pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
+ SwCntntNode* pCNd = pPam->GetCntntNode();
+ pPam->GetPoint()->nContent.Assign(pCNd, 0 );
+ pPam->SetMark();
+
+ pPam->GetPoint()->nNode += nOffsetTemp;
+ pCNd = pPam->GetCntntNode();
+ pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
+
+ SetValues( *pPam );
+
SetPaM( *rIter.pAktPam );
}
void SwUndoRedlineSort::_Redo( SwUndoIter& rIter )
{
SwPaM& rPam = *rIter.pAktPam;
+
+ SwPaM* pPam = &rPam;
+ SwPosition* pStart = pPam->Start();
+ SwPosition* pEnd = pPam->End();
+
+ SwNodeIndex aPrevIdx( pStart->nNode, -1 );
+ ULONG nOffsetTemp = pEnd->nNode.GetIndex() - pStart->nNode.GetIndex();
+ xub_StrLen nCntStt = pStart->nContent.GetIndex();
+
rIter.GetDoc().SortText( rPam, *pOpt );
+
+ pPam->DeleteMark();
+ pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 );
+ SwCntntNode* pCNd = pPam->GetCntntNode();
+ xub_StrLen nLen = pCNd->Len();
+ if( nLen > nCntStt )
+ nLen = nCntStt;
+ pPam->GetPoint()->nContent.Assign(pCNd, nLen );
+ pPam->SetMark();
+
+ pPam->GetPoint()->nNode += nOffsetTemp;
+ pCNd = pPam->GetCntntNode();
+ pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() );
+
+ SetValues( rPam );
+
SetPaM( rPam );
rPam.GetPoint()->nNode = nSaveEndNode;
rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), nSaveEndCntnt );
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 3d5dbd429e49..a90807e53877 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -66,8 +66,7 @@
#include <comcore.hrc>
#include <unochart.hxx>
-
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define CHECK_TABLE(t)
#else
#ifdef DEBUG
@@ -77,7 +76,7 @@
#endif
#endif
-#ifdef PRODUCT
+#ifndef DBG_UTIL
#define _DEBUG_REDLINE( pDoc )
#else
void lcl_DebugRedline( const SwDoc* pDoc );
@@ -195,7 +194,7 @@ public:
void InsertSort( SvUShorts& rArr, USHORT nIdx, USHORT* pInsPos = 0 );
void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos = 0 );
-#if defined( JP_DEBUG ) && !defined( PRODUCT )
+#if defined( JP_DEBUG ) && defined(DBG_UTIL)
#include "shellio.hxx"
void DumpDoc( SwDoc* pDoc, const String& rFileNm );
void CheckTable( const SwTable& );
@@ -3253,7 +3252,7 @@ void InsertSort( SvULongs& rArr, ULONG nIdx, USHORT* pInsPos )
*pInsPos = nU;
}
-#if defined( JP_DEBUG ) && !defined( PRODUCT )
+#if defined( JP_DEBUG ) && defined(DBG_UTIL)
void DumpDoc( SwDoc* pDoc, const String& rFileNm )
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index a3a044295e0d..ae275ea50e92 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -52,7 +52,7 @@
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/contentbroker.hxx>
#include <ucbhelper/content.hxx>
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <swunohelper.hxx>
#include <swunodef.hxx>
#include <errhdl.hxx>
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 8103b924ae98..411bc33a82ce 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -41,7 +41,7 @@
#include <vos/mutex.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/zforlist.hxx> // SvNumberFormatter
+#include <svl/zforlist.hxx> // SvNumberFormatter
#include <svtools/chartprettypainter.hxx>
#include <tools/link.hxx>
diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
index 0a95eee00bcd..78afe3987d61 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -59,7 +59,7 @@
#include <com/sun/star/text/XTextTablesSupplier.hpp>
#include <com/sun/star/text/TableColumnSeparator.hpp>
#include <com/sun/star/text/XTextTable.hpp>
-#include <svtools/PasswordHelper.hxx>
+#include <svl/PasswordHelper.hxx>
#include <svtools/unoimap.hxx>
#include <svtools/unoevent.hxx>
#include <unotbl.hxx>
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index 8c84dce7948a..4f4c7c2658b5 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -59,7 +59,7 @@
#include <swundo.hxx>
#include <cntfrm.hxx>
#include <pagefrm.hxx>
-#include <svtools/eitem.hxx>
+#include <svl/eitem.hxx>
#include <tools/urlobj.hxx>
#include <docary.hxx>
#include <swtable.hxx>
@@ -70,11 +70,11 @@
#include <svtools/ctrltool.hxx>
#define _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTSSORT
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/fcontnr.hxx>
-#include <svtools/stritem.hxx>
+#include <svl/stritem.hxx>
#include <com/sun/star/beans/PropertyState.hpp>
#include <SwStyleNameMapper.hxx>
#include <redline.hxx>
@@ -1032,9 +1032,11 @@ void makeRedline( SwPaM& rPaM,
}
SwRedline* pRedline = new SwRedline( aRedlineData, rPaM );
+ RedlineMode_t nPrevMode = pRedlineAccess->GetRedlineMode( );
+
pRedlineAccess->SetRedlineMode_intern(nsRedlineMode_t::REDLINE_ON);
bool bRet = pRedlineAccess->AppendRedline( pRedline, false );
- pRedlineAccess->SetRedlineMode_intern(nsRedlineMode_t::REDLINE_NONE);
+ pRedlineAccess->SetRedlineMode_intern( nPrevMode );
if( !bRet )
throw lang::IllegalArgumentException();
}
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index f0addeed003f..4f1b2c1770e3 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -2110,6 +2110,7 @@ void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange)
OTextCursorHelper* pCursor = 0;
SwXTextPortion* pPortion = 0;
SwXText* pText = 0;
+ SwXParagraph* pParagraph = 0;
pRange = reinterpret_cast< SwXTextRange * >(
sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextRange::getUnoTunnelId()) ));
@@ -2119,6 +2120,8 @@ void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange)
sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( OTextCursorHelper::getUnoTunnelId()) ));
pPortion = reinterpret_cast< SwXTextPortion * >(
sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXTextPortion::getUnoTunnelId()) ));
+ pParagraph = reinterpret_cast< SwXParagraph * >(
+ sal::static_int_cast< sal_IntPtr >( xRangeTunnel->getSomething( SwXParagraph::getUnoTunnelId( ) ) ) );
if (pRange)
pDoc = pRange->GetDoc();
@@ -2130,6 +2133,8 @@ void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange)
{
pDoc = pPortion->GetCursor()->GetDoc();
}
+ else if ( !pDoc && pParagraph && pParagraph->GetTxtNode( ) )
+ pDoc = pParagraph->GetTxtNode( )->GetDoc( );
}
diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx
index 26486cb255dc..c721f6f0cad5 100644
--- a/sw/source/core/unocore/unoevent.cxx
+++ b/sw/source/core/unocore/unoevent.cxx
@@ -43,7 +43,7 @@
#include <svx/svxids.hrc>
#endif
#include "fmtinfmt.hxx"
-#include <svtools/macitem.hxx>
+#include <svl/macitem.hxx>
#include <rtl/ustrbuf.hxx>
#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP
#include <com/sun/star/beans/PropertyValue.hpp>
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index f8de0eb39691..b010b329287d 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -88,7 +88,7 @@
#include <tools/urlobj.hxx>
#include <svx/dataaccessdescriptor.hxx>
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
#include <textapi.hxx>
diff --git a/sw/source/core/unocore/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index f2f48e382508..1ce2d6bc3792 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -2250,6 +2250,8 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{SW_PROP_NMID(UNO_NAME_NAME), FIELD_PROP_PAR4, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0},
{SW_PROP_NMID(UNO_NAME_CURRENT_PRESENTATION), FIELD_PROP_PAR3, CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE, 0},
{SW_PROP_NMID(UNO_NAME_IS_FIXED), FIELD_PROP_BOOL1, CPPU_E2T(CPPUTYPE_BOOLEAN) , PROPERTY_NONE,0},
+ {SW_PROP_NMID(UNO_NAME_NUMBER_FORMAT), FIELD_PROP_FORMAT, CPPU_E2T(CPPUTYPE_INT32), PROPERTY_NONE, 0},
+ {SW_PROP_NMID(UNO_NAME_IS_FIXED_LANGUAGE), FIELD_PROP_BOOL4, CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, 0},
COMMON_FLDTYP_PROPERTIES
{0,0,0,0,0,0}
};
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 3f07ccf66b62..72d5b02c769a 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -112,7 +112,7 @@
#include <fmtflcnt.hxx>
#define _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTSSORT
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svx/brshitem.hxx>
#include <fmtclds.hxx>
#include <dcontact.hxx>
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index b7764778d31c..23e868ee5065 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -112,7 +112,7 @@
#define _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTSSORT
#define _SVSTDARR_XUB_STRLEN
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <svx/brshitem.hxx>
#include <fmtclds.hxx>
#include <dcontact.hxx>
@@ -1192,6 +1192,12 @@ SwXTextRange::SwXTextRange(SwFrmFmt& rTblFmt) :
m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR)),
pMark(NULL)
{
+ SwTable* pTable = SwTable::FindTable( &rTblFmt );
+ SwTableNode* pTblNode = pTable->GetTableNode( );
+ SwPosition aPosition( *pTblNode );
+ SwPaM aPam( aPosition );
+
+ _CreateNewBookmark( aPam );
}
SwXTextRange::~SwXTextRange()
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 227b8cf58e42..6fc184e2a50f 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -48,7 +48,7 @@
#define _SVSTDARR_USHORTS
#define _SVSTDARR_USHORTSSORT
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <com/sun/star/beans/SetPropertyTolerantFailed.hpp>
#include <com/sun/star/beans/GetPropertyTolerantResult.hpp>
@@ -293,7 +293,6 @@ void SAL_CALL SwXParagraph::SetPropertyValues_Impl(
const OUString* pPropertyNames = rPropertyNames.getConstArray();
const uno::Any* pValues = rValues.getConstArray();
const SfxItemPropertyMap* pMap = m_pPropSet->getPropertyMap();
- OUString sTmp;
SwParaSelection aParaSel( & aCursor );
for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength(); nProp++)
{
@@ -306,7 +305,7 @@ void SAL_CALL SwXParagraph::SetPropertyValues_Impl(
throw beans::PropertyVetoException ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Property is read-only: " ) ) + pPropertyNames[nProp], static_cast < cppu::OWeakObject * > ( this ) );
SwXTextCursor::SetPropertyValue(aCursor, *m_pPropSet,
- sTmp, pValues[nProp]);
+ pPropertyNames[nProp], pValues[nProp]);
}
}
}
diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
index 04d073a09df3..808884e207a8 100644
--- a/sw/source/core/unocore/unoport.cxx
+++ b/sw/source/core/unocore/unoport.cxx
@@ -35,7 +35,7 @@
#include <cmdid.h>
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include <unocrsrhelper.hxx>
#include <unoport.hxx>
#include <unoobj.hxx>
@@ -719,10 +719,6 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL SwXTextPortion:
aResult.Result = beans::TolerantPropertySetResultType::SUCCESS;
aResultVector.push_back( aResult );
}
- // this assertion should never occur!
- DBG_ASSERT( !aResultVector.size() || aResult.Result != beans::TolerantPropertySetResultType::UNKNOWN_FAILURE,
- "unknown failure while retrieving property" );
-
}
}
catch (beans::UnknownPropertyException &)
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index b49816d9c9e3..a8426cf8b438 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -831,7 +831,6 @@ lcl_ExportHints(
case RES_TXTATR_AUTOFMT:
case RES_TXTATR_INETFMT:
case RES_TXTATR_CHARFMT:
- case RES_TXTATR_UNKNOWN_CONTAINER:
break; // these are handled as properties of a "Text" portion
default:
DBG_ERROR("unknown attribute");
diff --git a/sw/source/core/unocore/unoprnms.cxx b/sw/source/core/unocore/unoprnms.cxx
index edd0721d5b63..bafe4be0598d 100644
--- a/sw/source/core/unocore/unoprnms.cxx
+++ b/sw/source/core/unocore/unoprnms.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <tools/debug.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include <unoprnms.hxx>
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 1308c6ad7d3e..690118cb81b3 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -36,7 +36,7 @@
#include <cmdid.h>
#include <hintids.hxx>
-#include <svtools/urihelper.hxx>
+#include <svl/urihelper.hxx>
#include <svx/brshitem.hxx>
#ifndef _SVX_XMLCNITEM_HXX
#include <svx/xmlcnitm.hxx>
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 722235e3c391..4f40e12c2326 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -35,10 +35,10 @@
#include <hintids.hxx>
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
-#include <svtools/smplhint.hxx>
+#include <svl/smplhint.hxx>
#include <svtools/ctrltool.hxx>
-#include <svtools/style.hxx>
-#include <svtools/itemiter.hxx>
+#include <svl/style.hxx>
+#include <svl/itemiter.hxx>
#include <svx/pageitem.hxx>
#include <svx/sizeitem.hxx>
#include <svx/ulspitem.hxx>
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 20dde56ead7d..36a8808fd351 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -63,7 +63,7 @@
#include <fmtpdsc.hxx>
#include <pagedesc.hxx>
#define _SVSTDARR_STRINGS
-#include <svtools/svstdarr.hxx>
+#include <svl/svstdarr.hxx>
#include <viewsh.hxx>
#include <tabfrm.hxx>
#include <redline.hxx>
@@ -87,7 +87,7 @@
#include <com/sun/star/table/CellContentType.hpp>
#include <unotbl.hxx>
#include <unoobj.hxx>
-#include <svtools/zforlist.hxx> // SvNumberFormatter
+#include <svl/zforlist.hxx> // SvNumberFormatter
#include <svx/brkitem.hxx>
#include <svx/shaditem.hxx>
#include <svx/lrspitem.hxx>
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 56e3cbacd822..7ae4b209f49f 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -66,6 +66,8 @@
#include <memory>
#include <stdlib.h>
+#include <iostream>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -1827,19 +1829,11 @@ uno::Reference< text::XTextTable > SwXText::convertToTable(
*/
if(aStartCellPam.Start()->nNode < aEndCellPam.End()->nNode)
{
- const SwNode& rStartNode = aStartCellPam.Start()->nNode.GetNode();
- if(!rStartNode.IsTxtNode() ||
- !aEndCellPam.End()->nNode.GetNode().IsTxtNode())
- {
- //start and end of the cell must be on a SwTxtNode
- bExcept = true;
- break;
- }
// increment on each StartNode and decrement on each EndNode
// we must reach zero at the end and must not go below zero
long nOpenNodeBlock = 0;
SwNodeIndex aCellIndex = aStartCellPam.Start()->nNode;
- while( ++aCellIndex < aEndCellPam.End()->nNode.GetIndex())
+ while( aCellIndex < aEndCellPam.End()->nNode.GetIndex())
{
if( aCellIndex.GetNode().IsStartNode() )
++nOpenNodeBlock;
@@ -1850,6 +1844,7 @@ uno::Reference< text::XTextTable > SwXText::convertToTable(
bExcept = true;
break;
}
+ ++aCellIndex;
}
if( nOpenNodeBlock != 0)
{
@@ -1895,7 +1890,9 @@ uno::Reference< text::XTextTable > SwXText::convertToTable(
//node border anyway
}
else
+ {
bExcept = true;
+ }
}
//now check if there's a need to insert another paragraph break
if( aEndCellPam.End()->nContent.GetIndex() < aEndCellPam.End()->nNode.GetNode().GetTxtNode()->Len())
@@ -1952,7 +1949,22 @@ uno::Reference< text::XTextTable > SwXText::convertToTable(
const beans::PropertyValue* pTableProperties = rTableProperties.getConstArray();
sal_Int32 nProperty = 0;
for( ; nProperty < rTableProperties.getLength(); ++nProperty)
- xPrSet->setPropertyValue( pTableProperties[nProperty].Name, pTableProperties[nProperty].Value );
+ {
+ try
+ {
+ xPrSet->setPropertyValue( pTableProperties[nProperty].Name, pTableProperties[nProperty].Value );
+ }
+ catch ( const uno::Exception e )
+ {
+#if DEBUG
+ std::clog << "Exception when setting property: ";
+ std::clog << rtl::OUStringToOString( pTableProperties[nProperty].Name, RTL_TEXTENCODING_UTF8 ).getStr( );
+ std::clog << ". Message: ";
+ std::clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( );
+ std::clog << std::endl;
+#endif
+ }
+ }
//apply row properties
uno::Reference< table::XTableRows > xRows = xRet->getRows();
@@ -2009,6 +2021,7 @@ uno::Reference< text::XTextTable > SwXText::convertToTable(
//--<
#endif
+
//apply cell properties
for( nRow = 0; nRow < rCellProperties.getLength(); ++nRow)
{
@@ -2021,7 +2034,8 @@ uno::Reference< text::XTextTable > SwXText::convertToTable(
uno::Reference< beans::XPropertySet > xCell( pTextTable->getCellByPosition(nCell, nRow), uno::UNO_QUERY );
for( nProperty = 0; nProperty < nCellProperties; ++nProperty)
{
- if(aCellProperties[nProperty].Name.equalsAsciiL(
+ const OUString& rName = aCellProperties[nProperty].Name;
+ if( rName.equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM ( "VerticalMerge")))
{
//determine left border position
@@ -2085,7 +2099,23 @@ uno::Reference< text::XTextTable > SwXText::convertToTable(
}
}
else
- xCell->setPropertyValue(aCellProperties[nProperty].Name, aCellProperties[nProperty].Value);
+ {
+ try
+ {
+ xCell->setPropertyValue(rName, aCellProperties[nProperty].Value);
+ }
+ catch ( const uno::Exception e )
+ {
+ // Apply the paragraph and char properties to the cell's content
+ uno::Reference< text::XText > xCellText( xCell, uno::UNO_QUERY );
+ uno::Reference< text::XTextCursor > xCellCurs = xCellText->createTextCursor( );
+ xCellCurs->gotoStart( false );
+ xCellCurs->gotoEnd( true );
+
+ uno::Reference< beans::XPropertySet > xCellTextProps( xCellCurs, uno::UNO_QUERY );
+ xCellTextProps->setPropertyValue( rName, aCellProperties[nProperty].Value );
+ }
+ }
}
}
}
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 7429eb5c444d..da9800c9068a 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -45,7 +45,7 @@
/// include <svx/svdoutl.hxx>
#include <svx/svdoutl.hxx>
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#ifndef _SVX_FMGLOB_HXX
#include <svx/fmglob.hxx>
#endif
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 2c25ffbad82a..cd80439877f6 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -376,6 +376,37 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
// #i75172# end DrawingLayer paint
DLPostPaint2(true);
}
+
+ // --> OD 2009-12-03 #i107365#
+ // Direct paint has been performed. Thus, take care of
+ // transparent child windows.
+ if ( GetWin() )
+ {
+ Window& rWindow = *(GetWin());
+ if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount())
+ {
+ const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect()));
+
+ for ( sal_uInt16 a(0); a < rWindow.GetChildCount(); a++ )
+ {
+ Window* pCandidate = rWindow.GetChild(a);
+
+ if ( pCandidate && pCandidate->IsPaintTransparent() )
+ {
+ const Rectangle aCandidatePosSizePixel(
+ pCandidate->GetPosPixel(),
+ pCandidate->GetSizePixel());
+
+ if ( aCandidatePosSizePixel.IsOver(aRectanglePixel) )
+ {
+ pCandidate->Invalidate( INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN );
+ pCandidate->Update();
+ }
+ }
+ }
+ }
+ }
+ // <--
}
delete pVout;
@@ -407,7 +438,7 @@ void ViewShell::ImplEndAction( const BOOL bIdleEnd )
UISizeNotify();
++nStartAction;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// test option 'No Scroll' suppresses the automatic repair of the scrolled area
if ( !GetViewOptions()->IsTest8() )
#endif
@@ -589,7 +620,7 @@ void ViewShell::MakeVisible( const SwRect &rRect )
EndAction();
} while( nOldH != pRoot->Frm().Height() && nLoopCnt-- );
}
-#ifndef PRODUCT
+#ifdef DBG_UTIL
else
{
//MA: 04. Nov. 94, braucht doch keiner oder??
@@ -746,7 +777,7 @@ void ViewShell::LayoutIdle()
SET_CURR_SHELL( this );
-#ifndef PRODUCT
+#ifdef DBG_UTIL
// Wenn Test5 gedrueckt ist, wird der IdleFormatierer abgeknipst.
if( pOpt->IsTest5() )
return;
@@ -1146,7 +1177,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
if ( rRect == VisArea() )
return;
-#ifndef PRODUCT
+#ifdef DBG_UTIL
if ( bInEndAction )
{
//Da Rescheduled doch schon wieder irgendwo einer?
@@ -2685,7 +2716,7 @@ const BitmapEx& ViewShell::GetReplacementBitmap( bool bIsErrorState )
if( !*ppRet )
{
USHORT nBmpResId =
- Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark()
+ Application::GetSettings().GetStyleSettings().GetHighContrastMode()
? nHCResId : nResId;
*ppRet = new BitmapEx( SW_RES( nBmpResId ) );
}
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index cf72af66d0a8..e64a3f58eba2 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -45,7 +45,7 @@
#include <svx/pbinitem.hxx>
#include <svx/svdview.hxx>
#include <unotools/localedatawrapper.hxx>
-#include <svtools/syslocale.hxx>
+#include <unotools/syslocale.hxx>
#include <txtfld.hxx>
#include <fmtfld.hxx>
#include <fmtfsize.hxx>
@@ -776,16 +776,32 @@ SwDoc * ViewShell::CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef &rDocShellR
pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
}
- // Die Y-Position der ersten Selektion
- const Point aSelPoint = pFESh->IsTableMode() ?
- pFESh->GetTableCrsr()->GetSttPos() :
- pFirstCrsr->GetSttPos();
+ Point aSelPoint;
+ if( pFESh->IsTableMode() )
+ {
+ SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
+
+ const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
+ const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0;
+ if( pCntntFrm )
+ {
+ SwRect aCharRect;
+ SwCrsrMoveState aTmpState( MV_NONE );
+ pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState );
+ aSelPoint = Point( aCharRect.Left(), aCharRect.Top() );
+ }
+ }
+ else
+ {
+ aSelPoint = pFirstCrsr->GetSttPos();
+ }
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
+ ASSERT( pPage, "no page found!" );
- // und ihren Seitendescribtor
- const SwPageDesc* pPageDesc = pPrtDoc->FindPageDescByName(
- pPage->GetPageDesc()->GetName() );
+ // get page descriptor - fall back to the first one if pPage could not be found
+ const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
+ pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
{ // Am letzten Absatz die Absatzattribute richten:
@@ -868,15 +884,32 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
// Die Y-Position der ersten Selektion
// Die Y-Position der ersten Selektion
- const Point aSelPoint = pFESh->IsTableMode() ?
- pFESh->GetTableCrsr()->GetSttPos() :
- pFirstCrsr->GetSttPos();
+ Point aSelPoint;
+ if( pFESh->IsTableMode() )
+ {
+ SwShellTableCrsr* pShellTblCrsr = pFESh->GetTableCrsr();
+
+ const SwCntntNode* pCntntNode = pShellTblCrsr->GetNode()->GetCntntNode();
+ const SwCntntFrm *pCntntFrm = pCntntNode ? pCntntNode->GetFrm( 0, pShellTblCrsr->Start() ) : 0;
+ if( pCntntFrm )
+ {
+ SwRect aCharRect;
+ SwCrsrMoveState aTmpState( MV_NONE );
+ pCntntFrm->GetCharRect( aCharRect, *pShellTblCrsr->Start(), &aTmpState );
+ aSelPoint = Point( aCharRect.Left(), aCharRect.Top() );
+ }
+ }
+ else
+ {
+ aSelPoint = pFirstCrsr->GetSttPos();
+ }
const SwPageFrm* pPage = GetLayout()->GetPageAtPos( aSelPoint );
+ ASSERT( pPage, "no page found!" );
- // und ihren Seitendescribtor
- const SwPageDesc* pPageDesc = pPrtDoc->FindPageDescByName(
- pPage->GetPageDesc()->GetName() );
+ // get page descriptor - fall back to the first one if pPage could not be found
+ const SwPageDesc* pPageDesc = pPage ? pPrtDoc->FindPageDescByName(
+ pPage->GetPageDesc()->GetName() ) : &pPrtDoc->_GetPageDesc( (sal_uInt16)0 );
if( !pFESh->IsTableMode() && pActCrsr->HasMark() )
{ // Am letzten Absatz die Absatzattribute richten: