diff options
-rw-r--r-- | sw/Library_sw.mk | 2 | ||||
-rw-r--r-- | sw/inc/crsrsh.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/bastyp/swcache.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/crsr/trvltbl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/acmplwrd.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/docfly.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/scriptinfo.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/dbg_lay.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/layout/ftnfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/porlay.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/porlin.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/portxt.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/txtio.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/text/xmldump.cxx | 15 | ||||
-rw-r--r-- | sw/source/core/undo/undobj.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/undo/unins.cxx | 1 | ||||
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww1/fltshell.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/app/docsh2.cxx | 2 |
22 files changed, 33 insertions, 34 deletions
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index b79e71d1d7e6..d9b0034ac042 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -80,6 +80,7 @@ $(eval $(call gb_Library_add_linked_libs,sw,\ vbahelper \ vcl \ xo \ + xml2 \ $(gb_STDLIBS) \ )) @@ -376,6 +377,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/core/text/txttab \ sw/source/core/text/widorp \ sw/source/core/text/wrong \ + sw/source/core/text/xmldump \ sw/source/core/tox/tox \ sw/source/core/tox/toxhlp \ sw/source/core/tox/txmsrt \ diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 9d69a0be7f12..2a91682b5dc4 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -452,7 +452,7 @@ public: #if OSL_DEBUG_LEVEL > 1 void SttCrsrMove(); - void EndCrsrMove( const sal_Bool bIdleEnd = FALSE ); + void EndCrsrMove( const sal_Bool bIdleEnd = sal_False ); #else void SttCrsrMove() { ++nCrsrMove; StartAction(); } void EndCrsrMove( const sal_Bool bIdleEnd = sal_False ) diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index 34502cdcc920..003eb58438bc 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -177,7 +177,7 @@ void SwCache::Flush( const sal_uInt8 ) #if OSL_DEBUG_LEVEL > 1 if ( pObj->IsLocked() ) { - OSL_ENSURE( TRUE, "Flushing locked objects." ); + OSL_ENSURE( sal_False, "Flushing locked objects." ); if ( !pRealFirst ) { pRealFirst = pFirst = pLast = pObj; diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 2734a6ab3d8c..27dd81249c2c 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -309,7 +309,7 @@ sal_Bool SwCrsrShell::SelTblBox() // frame. This should yield the same result as searching for the // table box start node, right? SwFrm *pFrm = GetCurrFrm(); - DBG_ASSERT( !pFrm->IsInTab() == !(pStartNode != NULL), + OSL_ENSURE( !pFrm->IsInTab() == !(pStartNode != NULL), "Schroedinger's table: We're in a box, and also we aren't." ); #endif diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index dd4219417214..b597117315a9 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -248,7 +248,7 @@ SwAutoCompleteWord::~SwAutoCompleteWord() #if OSL_DEBUG_LEVEL > 1 sal_uLong nStrings = SwAutoCompleteString::GetElementCount(); sal_uLong nClients = SwAutoCompleteClient::GetElementCount(); - DBG_ASSERT(!nStrings && !nClients, "AutoComplete: clients or string count mismatch"); + OSL_ENSURE(!nStrings && !nClients, "AutoComplete: clients or string count mismatch"); #endif } diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 68e93ed41542..a2d76d1c6961 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -406,7 +406,7 @@ lcl_SetFlyFrmAttr(SwDoc & rDoc, case RES_PAGEDESC: case RES_CNTNT: case RES_FOOTER: - OSL_ENSURE( !this, ":-) Unbekanntes Attribut fuer Fly." ); + OSL_ENSURE( sal_False, ":-) Unbekanntes Attribut fuer Fly." ); // kein break; case RES_CHAIN: rSet.ClearItem( nWhich ); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index fe7b0626300a..ecd245e125af 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1517,8 +1517,6 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTxtFmtColls *const pTxtFmtCollTbl, { ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); ::sw::DrawUndoGuard const drawUndoGuard(rDoc.GetIDocumentUndoRedo()); - OSL_ENSURE( RES_DRAWFRMFMT == pContact->GetFmt()->Which(), - "Kein DrawFrmFmt" ); // Erstmal das Feld bauen, weil ueber den Namen die TxtColl besorgt // werden muss diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 769ef029e5b4..a0bf4f415cca 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -688,7 +688,7 @@ Graphic SwEditShell::GetIMapGraphic() const GRAPHIC_DEFAULT == rGrf.GetType() ) ) { #if OSL_DEBUG_LEVEL > 1 - OSL_ENSURE( ((SwGrfNode*)pNd)->SwapIn( TRUE ) || !TRUE, "Grafik konnte nicht geladen werden" ); + OSL_ENSURE( ((SwGrfNode*)pNd)->SwapIn( sal_True ), "Grafik konnte nicht geladen werden" ); #else ((SwGrfNode*)pNd)->SwapIn( sal_True ); #endif diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx index 01c0e40e88a9..d814bc089666 100644 --- a/sw/source/core/inc/scriptinfo.hxx +++ b/sw/source/core/inc/scriptinfo.hxx @@ -401,7 +401,7 @@ inline sal_uInt8 SwScriptInfo::GetDirType( const size_t nCnt ) const inline size_t SwScriptInfo::CountKashida() const { return aKashida.size(); } inline xub_StrLen SwScriptInfo::GetKashida( const size_t nCnt ) const { - OSL_ENSURE( nCnt < aKashida.Count(),"No Kashidas today!"); + OSL_ENSURE( nCnt < aKashida.size(),"No Kashidas today!"); return aKashida[ nCnt ]; } @@ -426,7 +426,7 @@ inline sal_uInt8 SwScriptInfo::GetCompType( const size_t nCnt ) const inline size_t SwScriptInfo::CountHiddenChg() const { return aHiddenChg.size(); }; inline xub_StrLen SwScriptInfo::GetHiddenChg( const size_t nCnt ) const { - OSL_ENSURE( nCnt < aHiddenChg.Count(),"No HiddenChg today!"); + OSL_ENSURE( nCnt < aHiddenChg.size(),"No HiddenChg today!"); return aHiddenChg[ nCnt ]; } diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index f84f2bc88e7b..63fbf9fe9592 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -29,8 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 +/* * Und hier die Beschreibung: * * Durch die PROTOCOL-Makros wird es ermoeglicht, Ereignisse im Frame-Methoden zu protokollieren. diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index ffbbd530bfd5..98cdc5dda2fb 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -2365,7 +2365,7 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest, || pAttr->GetFtn().IsEndNote() ) return; - OSL_ENSURE( this == pSrc->FindFtnBossFrm( TRUE ), + OSL_ENSURE( this == pSrc->FindFtnBossFrm( sal_True ), "SwPageFrm::MoveFtns: source frame isn't on that FtnBoss" ); SwFtnFrm *pFtn = FindFirstFtn(); diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index de3945b25e8a..fd80b1ec4b0a 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -429,8 +429,8 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const { // TODO/LATER: is EmbeddedObjectContainer not enough? // the created document will be closed by pDoc ( should use SfxObjectShellLock ) - OSL_ENSURE( pDoc->GetRefForDocShell(), - "wo ist die Ref-Klasse fuer die DocShell?"); + pPersistShell = new SwDocShell( pDoc, SFX_CREATE_MODE_INTERNAL ); + pDoc->SetTmpDocShell( pPersistShell ); pPersistShell->DoInitNew( NULL ); } diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index bc7e560ad1d6..fb9ffd504152 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -260,7 +260,7 @@ public: void DebugPortions( SvStream &rOs, const XubString &rTxt, const xub_StrLen nStart ); //$ ostream - void dumpLineAsXml(xmlTextWriter* writer, USHORT& ofs, String& aText); + void dumpLineAsXml(xmlTextWriter* writer, sal_uInt16& ofs, String& aText); #endif OUTPUT_OPERATOR diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx index efa942a4cbcc..a4f887113173 100644 --- a/sw/source/core/text/porlin.hxx +++ b/sw/source/core/text/porlin.hxx @@ -201,7 +201,7 @@ public: virtual void HandlePortion( SwPortionHandler& rPH ) const; #if OSL_DEBUG_LEVEL > 1 - void dumpPortionAsXml(USHORT ofs, String& aText, xmlTextWriter* writer); + void dumpPortionAsXml(sal_uInt16 ofs, String& aText, xmlTextWriter* writer); #endif OUTPUT_OPERATOR }; diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx index 3b00ec7ffedb..8a201cf1f87e 100644 --- a/sw/source/core/text/portxt.hxx +++ b/sw/source/core/text/portxt.hxx @@ -68,7 +68,7 @@ public: virtual void HandlePortion( SwPortionHandler& rPH ) const; #if OSL_DEBUG_LEVEL > 1 - void dumpPortionAsXml(USHORT ofs, String& aText, xmlTextWriter* writer); + void dumpPortionAsXml(sal_uInt16 ofs, String& aText, xmlTextWriter* writer); #endif OUTPUT_OPERATOR diff --git a/sw/source/core/text/txtio.cxx b/sw/source/core/text/txtio.cxx index a3826ac4cc7e..12707a861c0d 100644 --- a/sw/source/core/text/txtio.cxx +++ b/sw/source/core/text/txtio.cxx @@ -29,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 #include "viewsh.hxx" // IsDbg() #include "viewopt.hxx" // IsDbg() @@ -730,8 +730,8 @@ SvStream &SwDropPortion::operator<<( SvStream &rOs ) const //$ ostream return rOs; } -#endif /* OSL_DEBUG_LEVEL */ +#endif -#endif // DBG_UTIL +#endif /* OSL_DEBUG_LEVEL */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index a92bb46a4c99..2f610c64a4e8 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -33,15 +33,14 @@ #include "porlin.hxx" #include "porlay.hxx" #include "portxt.hxx" +#include <libxml/xmlwriter.h> #include <SwPortionHandler.hxx> - - class XmlPortionDumper:public SwPortionHandler { private: xmlTextWriterPtr writer; - USHORT ofs; + sal_uInt16 ofs; public: XmlPortionDumper( xmlTextWriterPtr some_writer ):writer( some_writer ), ofs( 0 ) @@ -58,8 +57,8 @@ class XmlPortionDumper:public SwPortionHandler @param rText text which is painted on-screen */ - virtual void Text( USHORT nLength, - USHORT nType ) + virtual void Text( sal_uInt16 nLength, + sal_uInt16 nType ) { ofs += nLength; xmlTextWriterStartElement( writer, BAD_CAST( "Text" ) ); @@ -80,9 +79,9 @@ class XmlPortionDumper:public SwPortionHandler @param nType type of this portion */ - virtual void Special( USHORT nLength, + virtual void Special( sal_uInt16 nLength, const String & rText, - USHORT nType ) + sal_uInt16 nType ) { xmlTextWriterStartElement( writer, BAD_CAST( "Special" ) ); xmlTextWriterWriteFormatAttribute( writer, @@ -111,7 +110,7 @@ class XmlPortionDumper:public SwPortionHandler * @param nLength * number of 'model string' characters to be skipped */ - virtual void Skip( USHORT nLength ) + virtual void Skip( sal_uInt16 nLength ) { xmlTextWriterStartElement( writer, BAD_CAST( "Skip" ) ); xmlTextWriterWriteFormatAttribute( writer, diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 3721fc31a504..6292f1a72da4 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -940,8 +940,8 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, { // ueberpruefe, ob der Inhalt an der alten Position steht SwNodeIndex aSttIdx( pDoc->GetNodes(), nStartPos ); - OSL_ENSURE( !pDoc->GetNodes()[ aSttIdx ]->GetCntntNode(), - "RestoreSection(): Position on content node"); +// OSL_ENSURE( !pDoc->GetNodes()[ aSttIdx ]->GetCntntNode(), +// "RestoreSection(): Position on content node"); // move den Inhalt aus dem UndoNodes-Array in den Fly SwStartNode* pSttNd = pDoc->GetNodes().MakeEmptySection( aSttIdx, diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index ab1018098e91..4d3fc535d95e 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -513,7 +513,6 @@ SwUndoReplace::SwUndoReplace(SwPaM const& rPam, : SwUndo( UNDO_REPLACE ) , m_pImpl(new Impl(rPam, rIns, bRegExp)) { - OSL_ENSURE( !nAktPos, "Redo ohne vorheriges Undo??" ); } SwUndoReplace::~SwUndoReplace() diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index ee40c39471ee..1dea4ffbef9c 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -379,7 +379,7 @@ void SwRTFParser::Continue( int nToken ) #if OSL_DEBUG_LEVEL > 1 // !!! sollte nicht moeglich sein, oder ?? - OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(), + OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_True ).nNode.GetIndex(), "Pam.Bound1 steht noch im Node" ); OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(), "Pam.Bound2 steht noch im Node" ); diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 668244a95383..6847e3cbf2f5 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -1625,7 +1625,7 @@ sal_Bool SwFltOutDoc::SeekCell(short nRow, short nCol, sal_Bool bPam) if ((sal_uInt16)nRow >= pTableLines->Count()) { - OSL_ENSURE((USHORT)nRow >= pTableLines->Count(), "SwFltOutDoc"); + OSL_ENSURE((sal_uInt16)nRow >= pTableLines->Count(), "SwFltOutDoc"); return sal_False; } pTableLine = (*pTableLines)[nRow]; diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index 5c653171f016..266d75ef6020 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -888,7 +888,7 @@ void SwDocShell::Execute(SfxRequest& rReq) #if OSL_DEBUG_LEVEL > 1 { sal_Bool bWeb = 0 != dynamic_cast<SwWebDocShell*>(this); - OSL_ENSURE(bWeb == TRUE, "SourceView only in WebDocShell"); + OSL_ENSURE(bWeb == sal_True, "SourceView only in WebDocShell"); } #endif // the SourceView is not the 1 for SwWebDocShell |