[Libreoffice-commits] .: sw/inc sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Oct 20 08:09:10 PDT 2010


 sw/inc/viewopt.hxx                               |    4 
 sw/source/ui/cctrl/actctrl.cxx                   |   15 --
 sw/source/ui/cctrl/popbox.cxx                    |   17 --
 sw/source/ui/cctrl/swlbox.cxx                    |   74 +-----------
 sw/source/ui/chrdlg/break.cxx                    |    9 -
 sw/source/ui/chrdlg/chardlg.cxx                  |    9 -
 sw/source/ui/chrdlg/drpcps.cxx                   |   26 ----
 sw/source/ui/chrdlg/numpara.cxx                  |    2 
 sw/source/ui/chrdlg/pardlg.cxx                   |    6 -
 sw/source/ui/chrdlg/swuiccoll.cxx                |    9 -
 sw/source/ui/config/caption.cxx                  |   72 ------------
 sw/source/ui/config/cfgitems.cxx                 |   11 -
 sw/source/ui/config/dbconfig.cxx                 |    2 
 sw/source/ui/config/fontcfg.cxx                  |    9 -
 sw/source/ui/config/mailconfigpage.cxx           |    2 
 sw/source/ui/config/modcfg.cxx                   |   16 +-
 sw/source/ui/config/optcomp.cxx                  |    6 -
 sw/source/ui/config/optload.cxx                  |   19 +--
 sw/source/ui/config/optpage.cxx                  |  110 ++++---------------
 sw/source/ui/config/prtopt.cxx                   |    2 
 sw/source/ui/config/uinums.cxx                   |   98 -----------------
 sw/source/ui/config/usrpref.cxx                  |   10 -
 sw/source/ui/config/viewopt.cxx                  |   23 +---
 sw/source/ui/dbui/addresslistdialog.cxx          |   14 --
 sw/source/ui/dbui/addresslistdialog.hxx          |    6 -
 sw/source/ui/dbui/createaddresslistdialog.cxx    |   22 +--
 sw/source/ui/dbui/createaddresslistdialog.hxx    |    9 -
 sw/source/ui/dbui/dbinsdlg.cxx                   |   22 +--
 sw/source/ui/dbui/dbmgr.cxx                      |  131 ++++++++---------------
 sw/source/ui/dbui/dbtablepreviewdialog.cxx       |   16 --
 sw/source/ui/dbui/dbtablepreviewdialog.hxx       |    4 
 sw/source/ui/dbui/dbtree.cxx                     |   19 +--
 sw/source/ui/dbui/dbui.cxx                       |   17 --
 sw/source/ui/dbui/mailmergechildwindow.cxx       |    5 
 sw/source/ui/dbui/mailmergehelper.cxx            |   16 +-
 sw/source/ui/dbui/mailmergewizard.cxx            |    9 -
 sw/source/ui/dbui/mmaddressblockpage.cxx         |   17 --
 sw/source/ui/dbui/mmaddressblockpage.hxx         |   22 ---
 sw/source/ui/dbui/mmconfigitem.cxx               |   19 +--
 sw/source/ui/dbui/mmdocselectpage.hxx            |    2 
 sw/source/ui/dbui/mmgreetingspage.cxx            |    2 
 sw/source/ui/dbui/mmgreetingspage.hxx            |    6 -
 sw/source/ui/dbui/mmlayoutpage.cxx               |    8 -
 sw/source/ui/dbui/mmlayoutpage.hxx               |    2 
 sw/source/ui/dbui/mmmergepage.cxx                |    2 
 sw/source/ui/dbui/mmmergepage.hxx                |    2 
 sw/source/ui/dbui/mmoutputpage.cxx               |   22 +--
 sw/source/ui/dbui/mmoutputpage.hxx               |    4 
 sw/source/ui/dbui/mmoutputtypepage.hxx           |    2 
 sw/source/ui/dbui/mmpreparemergepage.hxx         |    2 
 sw/source/ui/dbui/selectdbtabledialog.cxx        |    2 
 sw/source/ui/dbui/selectdbtabledialog.hxx        |    3 
 sw/source/ui/dialog/SwSpellDialogChildWindow.cxx |    2 
 sw/source/ui/dialog/addrdlg.cxx                  |    3 
 sw/source/ui/dialog/ascfldlg.cxx                 |    2 
 sw/source/ui/dialog/docstdlg.cxx                 |    4 
 sw/source/ui/dialog/regionsw.cxx                 |   18 +--
 sw/source/ui/dialog/regionsw.hrc                 |    5 
 sw/source/ui/dialog/swdialmgr.cxx                |    2 
 sw/source/ui/dialog/swdlgfact.cxx                |    6 -
 sw/source/ui/dialog/swdlgfact.hxx                |    1 
 sw/source/ui/dialog/uiregionsw.cxx               |   77 ++++---------
 sw/source/ui/dochdl/gloshdl.cxx                  |   31 ++---
 sw/source/ui/envelp/envfmt.cxx                   |   27 ++--
 sw/source/ui/envelp/envimg.cxx                   |    8 -
 sw/source/ui/envelp/envlop1.cxx                  |   17 +-
 sw/source/ui/envelp/envprt.cxx                   |   19 +--
 sw/source/ui/envelp/label1.cxx                   |   55 +++++----
 sw/source/ui/envelp/labelcfg.cxx                 |    6 -
 sw/source/ui/envelp/labfmt.cxx                   |   35 ++----
 sw/source/ui/envelp/labimg.cxx                   |    4 
 sw/source/ui/envelp/labprt.cxx                   |    8 -
 sw/source/ui/envelp/mailmrge.cxx                 |   54 +--------
 sw/source/ui/envelp/syncbtn.cxx                  |   16 --
 sw/source/ui/globdoc/globdoc.cxx                 |    8 -
 sw/source/ui/inc/cfgitems.hxx                    |    2 
 sw/source/ui/inc/optpage.hxx                     |    2 
 77 files changed, 394 insertions(+), 976 deletions(-)

New commits:
commit f075ff1d9beb6a5d16e8705e272ae7987faeeca7
Author: Jacek Wolszczak <shutdownrunner at gmail.com>
Date:   Wed Oct 20 15:36:15 2010 +0100

    convert to new OSL family of asserts

diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 14c500f..cfd89da 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -173,7 +173,7 @@ protected:
 
     BYTE            nTblDest;           // Ziel fuer Tabellenhintergrund
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
     // korrespondieren zu den Angaben in ui/config/cfgvw.src
     BOOL  bTest1		:1;		// Test-Flag  "Layout not loading"
     BOOL  bTest2		:1;  	// Test-Flag  "WYSIWYG++"
@@ -426,7 +426,7 @@ public:
     USHORT GetViewLayoutColumns() const { return mnViewLayoutColumns; }
     void   SetViewLayoutColumns( USHORT nNew ) { mnViewLayoutColumns = nNew; }
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
     // korrespondieren zu den Angaben in ui/config/cfgvw.src
     inline BOOL IsTest1() const		{ return bTest1; }
     inline void SetTest1( BOOL b )	{ bTest1 = b; }
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index 19d6ae1..81f36bb 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -65,10 +65,6 @@ long NumEditAction::Notify( NotifyEvent& rNEvt )
     return nHandled;
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:	KeyInput fuer ShortName - Edits ohne Spaces
-------------------------------------------------------------------------*/
-
 NoSpaceEdit::NoSpaceEdit( Window* pParent, const ResId& rResId)
     : Edit(pParent, rResId),
     sForbiddenChars(String::CreateFromAscii(" "))
@@ -91,9 +87,7 @@ void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
     if(bCallParent)
         Edit::KeyInput(rEvt);
 }
-/* -----------------------------11.02.00 15:28--------------------------------
 
- ---------------------------------------------------------------------------*/
 void NoSpaceEdit::Modify()
 {
     Selection aSel = GetSelection();
@@ -113,15 +107,11 @@ void NoSpaceEdit::Modify()
     if(GetModifyHdl().IsSet())
         GetModifyHdl().Call(this);
 }
-/* -----------------25.06.2003 15:57-----------------
 
- --------------------------------------------------*/
 ReturnActionEdit::~ReturnActionEdit()
 {
-}            
-/* -----------------25.06.2003 15:58-----------------
+}
 
- --------------------------------------------------*/
 void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
 {
     const KeyCode aKeyCode = rEvt.GetKeyCode();
@@ -134,7 +124,6 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
     }    
     else 
         Edit::KeyInput(rEvt);
-}            
-
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/cctrl/popbox.cxx b/sw/source/ui/cctrl/popbox.cxx
index 787c715..9005eb3 100644
--- a/sw/source/ui/cctrl/popbox.cxx
+++ b/sw/source/ui/cctrl/popbox.cxx
@@ -36,22 +36,15 @@
 #include <popbox.hxx>
 #include <navipi.hxx>
 
-
-// --- class SwHelpToolBox ---------------------------------------------
-
-
 SwHelpToolBox::SwHelpToolBox( SwNavigationPI* pParent, const ResId& rResId )
     : ToolBox( pParent, rResId ),
     DropTargetHelper( this )
 {
 }
 
-
 void SwHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
 {
-        // Zuerst DoubleClick-Link auswerten
-        // Dessen Returnwert entscheidet ueber andere Verarbeitung
-        // Doppelclickhandler nur, wenn nicht auf einen Button geclickt wurde
+    // If doubleclick is detected use doublelick handler
     if(rEvt.GetButtons() == MOUSE_RIGHT &&
         0 == GetItemId(rEvt.GetPosPixel()))
     {
@@ -61,20 +54,14 @@ void SwHelpToolBox::MouseButtonDown(const MouseEvent &rEvt)
         ToolBox::MouseButtonDown(rEvt);
 }
 
-
 long SwHelpToolBox::DoubleClick( ToolBox* pCaller )
 {
-        // kein Doppelklick auf einen Button
+    // No doubleclick on button
     if( 0 == pCaller->GetCurItemId() && aDoubleClickLink.Call(0) )
         return TRUE;
     return FALSE;
 }
 
-/*-----------------26.02.94 00:36-------------------
- dtor ueberladen
---------------------------------------------------*/
-
-
 SwHelpToolBox::~SwHelpToolBox() {}
 
 sal_Int8 SwHelpToolBox::AcceptDrop( const AcceptDropEvent& rEvt )
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index 77f2cf9..908007f 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -30,7 +30,7 @@
 #include "precompiled_sw.hxx"
 
 
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
 #include <unotools/charclass.hxx>
 #include <swtypes.hxx>
 #include <swlbox.hxx>
@@ -40,11 +40,7 @@ using namespace nsSwComboBoxStyle;
 
 SV_IMPL_PTRARR(SwEntryLst, SwBoxEntry*)
 
-/*--------------------------------------------------------------------
-     Beschreibung: Ein ListboxElement
- --------------------------------------------------------------------*/
-
-
+//     Description: ListboxElement
 SwBoxEntry::SwBoxEntry() :
     bModified(FALSE),
     bNew(FALSE),
@@ -52,7 +48,6 @@ SwBoxEntry::SwBoxEntry() :
 {
 }
 
-
 SwBoxEntry::SwBoxEntry(const String& aNam, USHORT nIdx) :
     bModified(FALSE),
     bNew(FALSE),
@@ -61,18 +56,14 @@ SwBoxEntry::SwBoxEntry(const String& aNam, USHORT nIdx) :
 {
 }
 
-
 SwBoxEntry::SwBoxEntry(const SwBoxEntry& rOld) :
     bModified(rOld.bModified),
     bNew(rOld.bNew),
     aName(rOld.aName),
     nId(rOld.nId)
 {
-
 }
 
-
-
 SwComboBox::SwComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ):
     ComboBox(pParent, rId),
     nStyle(nStyleBits)
@@ -86,67 +77,39 @@ SwComboBox::SwComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ):
     }
 }
 
-/*--------------------------------------------------------------------
-     Beschreibung: Basisklasse Dtor
- --------------------------------------------------------------------*/
-
-
+// Basic class Dtor
 SwComboBox::~SwComboBox()
 {
-// das erledigen die Listen doch schon selbst im DTOR!
-//	aEntryLst.DeleteAndDestroy(0, 	aEntryLst.Count());
-//	aDelEntryLst.DeleteAndDestroy(0, aDelEntryLst.Count());
 }
 
-/*--------------------------------------------------------------------
-     Beschreibung: Eintrag in die ComboBox aufnehmen
- --------------------------------------------------------------------*/
-
-
 void SwComboBox::InsertEntry(const SwBoxEntry& rEntry)
 {
     InsertSorted(new SwBoxEntry(rEntry));
 }
 
-/*--------------------------------------------------------------------
-     Beschreibung: Eintrag aus der Liste loeschen
- --------------------------------------------------------------------*/
-
-
 void SwComboBox::RemoveEntry(USHORT nPos)
 {
     if(nPos >= aEntryLst.Count())
         return;
 
-    // Altes Element austragen
+    // Remove old element
     SwBoxEntry* pEntry = aEntryLst[nPos];
     aEntryLst.Remove(nPos, 1);
     ComboBox::RemoveEntry(nPos);
 
-    // keine neuen Eintraege in die Liste mit aufnehmen
+    // Don't add new entries to the list
     if(pEntry->bNew)
         return;
 
-    // in DeleteListe eintragen
+    // add to DelEntryLst
     aDelEntryLst.C40_INSERT(SwBoxEntry, pEntry, aDelEntryLst.Count());
 }
 
-
-
-/*--------------------------------------------------------------------
-     Beschreibung: Position by Name
- --------------------------------------------------------------------*/
-
 USHORT SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
 {
     return ComboBox::GetEntryPos(rEntry.aName);
 }
 
-/*--------------------------------------------------------------------
-     Beschreibung: Rund um die Entries
- --------------------------------------------------------------------*/
-
-
 const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const
 {
     if(nPos < aEntryLst.Count())
@@ -155,17 +118,11 @@ const SwBoxEntry& SwComboBox::GetEntry(USHORT nPos) const
     return aDefault;
 }
 
-/*--------------------------------------------------------------------
-     Beschreibung: geloeschte Eintraege
- --------------------------------------------------------------------*/
-
-
 USHORT SwComboBox::GetRemovedCount() const
 {
     return aDelEntryLst.Count();
 }
 
-
 const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const
 {
     if(nPos < aDelEntryLst.Count())
@@ -174,11 +131,6 @@ const SwBoxEntry& SwComboBox::GetRemovedEntry(USHORT nPos) const
     return aDefault;
 }
 
-/*--------------------------------------------------------------------
-     Beschreibung: Sortiert einfuegen
- --------------------------------------------------------------------*/
-
-
 void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
 {
     ComboBox::InsertEntry(pEntry->aName);
@@ -186,12 +138,6 @@ void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
     aEntryLst.C40_INSERT(SwBoxEntry, pEntry, nPos);
 }
 
-
-/*--------------------------------------------------------------------
-    Beschreibung: Je nach Option bestimmte Zeichen ausblenden
- --------------------------------------------------------------------*/
-
-
 void SwComboBox::KeyInput( const KeyEvent& rKEvt )
 {
     USHORT nChar = rKEvt.GetCharCode();
@@ -209,13 +155,7 @@ void SwComboBox::KeyInput( const KeyEvent& rKEvt )
     ComboBox::KeyInput(rKEvt);
 }
 
-
-
-/*--------------------------------------------------------------------
-    Beschreibung: Text nach Option konvertieren
- --------------------------------------------------------------------*/
-
-
+// Convert text according to option
 String SwComboBox::GetText() const
 {
     String aTxt( ComboBox::GetText() );
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 90929a4..933d67f 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -72,7 +72,6 @@ void SwBreakDlg::Apply()
     }
 }
 
-
 IMPL_LINK_INLINE_START( SwBreakDlg, ClickHdl, void *, EMPTYARG )
 {
     CheckEnable();
@@ -113,9 +112,9 @@ IMPL_LINK_INLINE_END( SwBreakDlg, PageNumModifyHdl, Edit *, EMPTYARG )
 IMPL_LINK( SwBreakDlg, OkHdl, Button *, EMPTYARG )
 {
     if(aPageNumBox.IsChecked()) {
-            // wenn unterschiedliche Seitenvorlagen, testen auf Gueltigkeit
+        // In case of differing page descriptions, test validity
         const USHORT nPos = aPageCollBox.GetSelectEntryPos();
-            // auf Position 0 steht 'Ohne'.
+        // auf Position 0 steht 'Ohne'.
         const SwPageDesc *pPageDesc;
         if ( 0 != nPos && LISTBOX_ENTRY_NOTFOUND != nPos )
             pPageDesc = rSh.FindPageDescByName( aPageCollBox.GetSelectEntry(),
@@ -123,7 +122,7 @@ IMPL_LINK( SwBreakDlg, OkHdl, Button *, EMPTYARG )
         else
             pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc());
 
-        OSL_ENSURE(pPageDesc, "Seitenvorlage nicht gefunden.");
+        OSL_ENSURE(pPageDesc, "Page description not found.");
         const USHORT nUserPage = USHORT(aPageNumEdit.GetValue());
         BOOL bOk = TRUE;
         switch(pPageDesc->GetUseOn())
@@ -178,7 +177,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
     aPageNumEdit.SetModifyHdl(LINK(this,SwBreakDlg,PageNumModifyHdl));
 
 
-    // Einfuegen der vorhandenen Seitenvorlagen in die Listbox
+    // Insert page description to Listbox
     const USHORT nCount = rSh.GetPageDescCnt();
     USHORT i;
 
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 8e2a097..a719191 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -76,11 +76,6 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 using namespace ::sfx2;
 
-/*--------------------------------------------------------------------
-    Beschreibung:	Der Traeger des Dialoges
- --------------------------------------------------------------------*/
-
-
 SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
                      const String* pStr, BOOL bIsDrwTxtDlg) :
     SfxTabDialog(pParent, SW_RES(DLG_CHAR), &rCoreSet, pStr != 0),
@@ -89,8 +84,6 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
 {
     FreeResource();
 
-    // bspFonr fuer beide Bsp-TabPages
-
     if(pStr)
     {
         String aTmp( GetText() );
@@ -231,8 +224,6 @@ SwCharURLPage::SwCharURLPage( 	Window* pParent,
         }
     }
     delete pList;
-
-
 }
 
 SwCharURLPage::~SwCharURLPage()
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 162ac9f..3fca1d4 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -517,11 +517,6 @@ void SwDropCapsPict::_InitPrinter()
     }
 }
 
-/****************************************************************************
-Dlg: Ctor
-****************************************************************************/
-
-
 SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) :
 
     SfxSingleTabDialog(pParent, rSet, 0)
@@ -532,20 +527,10 @@ SwDropCapsDlg::SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet ) :
     SetTabPage(pNewPage);
 }
 
-/****************************************************************************
-Dlg: Dtor
-****************************************************************************/
-
-
  SwDropCapsDlg::~SwDropCapsDlg()
 {
 }
 
-/****************************************************************************
-Page: Ctor
-****************************************************************************/
-
-
 SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
 
     SfxTabPage(pParent, SW_RES(TP_DROPCAPS), rSet),
@@ -582,7 +567,7 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
     aTextText.Enable( !bFormat );
     aTextEdit.Enable( !bFormat );
 
-    // Metriken
+    // Metrics
     SetMetric( aDistanceField, GetDfltMetric(bHtmlMode) );
 
     pPict->SetBorderStyle( WINDOW_BORDER_MONO );
@@ -598,10 +583,6 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
     aWholeWordCB  .SetClickHdl (LINK(this, SwDropCapsPage, WholeWordHdl ));
 }
 
-/****************************************************************************
-Page: Dtor
-****************************************************************************/
-
  SwDropCapsPage::~SwDropCapsPage()
 {
     delete pPict;
@@ -661,12 +642,13 @@ void  SwDropCapsPage::Reset(const SfxItemSet &rSet)
     ::FillCharStyleListBox(aTemplateBox, rSh.GetView().GetDocShell(), TRUE);
 
     aTemplateBox.InsertEntry(SW_RESSTR(SW_STR_NONE), 0);
-    // Vorlage defaulten
+
+    // Reset format
     aTemplateBox.SelectEntryPos(0);
     if (aFmtDrop.GetCharFmt())
         aTemplateBox.SelectEntry(aFmtDrop.GetCharFmt()->GetName());
 
-    // Controls enablen
+    // Enable controls
     aDropCapsBox.Check(aFmtDrop.GetLines() > 1);
     const USHORT nVal = USHORT(aDropCapsField.GetValue());
     if (bFormat)
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 43816b6..4f4423f 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -199,7 +199,7 @@ void	SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
         if(!aStyle.Len())
             aStyle = aNumberStyleLB.GetEntry(0);
 
-        if( aStyle.EqualsAscii("Outline"))// == String::CreateFromAscii("Outline")) //maybe need modify,zhaojianwei
+        if( aStyle.EqualsAscii("Outline"))
         {
             aNumberStyleLB.InsertEntry( msOutlineNumbering );
             aNumberStyleLB.SelectEntry( msOutlineNumbering );
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index f6f7a60..f91a439 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -65,8 +65,6 @@
 #include <svx/svxdlg.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/flagsdef.hxx>
-// STATIC DATA -----------------------------------------------------------
-
 
 SwParaDlg::SwParaDlg(Window *pParent,
                     SwView& rVw,
@@ -90,7 +88,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
     BOOL bHtmlMode = static_cast< BOOL >(nHtmlMode & HTMLMODE_ON);
     if(pTitle)
     {
-            // Update des Titels
+        // Update title
         String aTmp( GetText() );
         aTmp += SW_RESSTR(STR_TEXTCOLL_HEADER);
         aTmp += *pTitle;
@@ -188,7 +186,7 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
     SwWrtShell& rSh = rView.GetWrtShell();
     SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
 
-    // Bei Tabellenumrandung kann im Writer kein Schatten eingestellt werden
+    // Table borders cannot get any shade in Writer
     if (nId == TP_BORDER)
     {
         aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_PARA));
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index ee61ffd..a74bcf5 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -63,17 +63,12 @@ static USHORT __FAR_DATA aPageRg[] = {
     0
 };
 
-// Achtung im Code wird dieses Array direkt (0, 1, ...) indiziert
+// Warning! This table is indicated directly in code (0, 1, ...)
 static long nTabs[] =
     {	2, // Number of Tabs
         0, 100
     };
 
-/****************************************************************************
-Page: Ctor
-****************************************************************************/
-
-
 SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
 
     : SfxTabPage(pParent, SW_RES(TP_CONDCOLL), rSet),
@@ -98,7 +93,7 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
     FreeResource();
     SetExchangeSupport();
 
-    // Handler installieren
+    // Install handlers
     aConditionCB.SetClickHdl(	LINK(this, SwCondCollPage, OnOffHdl));
     aTbLinks.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
     aStyleLB.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx
index b4d3065..d1c5c52 100644
--- a/sw/source/ui/config/caption.cxx
+++ b/sw/source/ui/config/caption.cxx
@@ -30,7 +30,7 @@
 #include "precompiled_sw.hxx"
 
 
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
 
 #include "numrule.hxx"
 #include "caption.hxx"
@@ -88,77 +88,7 @@ BOOL InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
                                     // werden koennen, auf nichts weiteres vergleichen
 
 
-/*			 &&
-            sCategory == rOpt.sCategory &&
-            nNumType == rOpt.nNumType &&
-            sCaption == rOpt.sCaption &&
-            nPos == rOpt.nPos &&
-            nLevel == rOpt.nLevel &&
-            cSeparator == rOpt.cSeparator);*/
 }
 
-/*************************************************************************
-|*
-|*    InsCaptionOpt::operator>>()
-|*
-|*    Beschreibung      Stream-Leseoperator
-|*
-*************************************************************************/
-
-/*SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt )
-{
-    rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
-    UINT16 nVal;
-    BYTE   cVal;
-    BYTE   nVersion;
-
-    rIStream >> nVersion;
-    rIStream >> cVal;				rCapOpt.UseCaption() = cVal != 0;
-    rIStream >> nVal;				rCapOpt.eObjType = (SwCapObjType)nVal;
-    rIStream >> rCapOpt.aOleId;
-
-    rIStream.ReadByteString( rCapOpt.sCategory, eEncoding );
-    rIStream >> nVal;				rCapOpt.nNumType = nVal;
-    rIStream.ReadByteString( rCapOpt.sCaption, eEncoding );
-    rIStream >> nVal;				rCapOpt.nPos = nVal;
-    rIStream >> nVal;				rCapOpt.nLevel = nVal;
-
-    rIStream >> cVal;
-    rCapOpt.sSeparator = UniString(
-        ByteString(static_cast< char >(cVal)) , eEncoding).GetChar(0);
-
-    return rIStream;
-}
-*/
-/*************************************************************************
-|*
-|*    InsCaptionOpt::operator<<()
-|*
-|*    Beschreibung      Stream-Schreiboperator
-|*
-*************************************************************************/
-
-/*SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt )
-{
-    rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
-    rOStream	<< (BYTE)CAPTION_VERSION
-                << (BYTE)rCapOpt.UseCaption()
-                << (UINT16)rCapOpt.eObjType
-                << rCapOpt.aOleId;
-
-    rOStream.WriteByteString( rCapOpt.sCategory, eEncoding );
-
-    rOStream	<< (UINT16)rCapOpt.nNumType;
-
-    rOStream.WriteByteString( rCapOpt.sCaption, eEncoding );
-
-    BYTE cSep = ByteString(rCapOpt.sSeparator, eEncoding).GetChar(0);
-    rOStream 	<< (UINT16)rCapOpt.nPos
-                << (UINT16)rCapOpt.nLevel
-                << cSep;
-
-    return rOStream;
-}
-*/
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx
index 894186d..9afbcbb 100644
--- a/sw/source/ui/config/cfgitems.cxx
+++ b/sw/source/ui/config/cfgitems.cxx
@@ -85,7 +85,6 @@ SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt, USHORT _nWhich ) :
     bFldHiddenText      = rVOpt.IsShowHiddenField();
     bManualBreak 		= rVOpt.IsLineBreak(TRUE);
     bShowHiddenPara     = rVOpt.IsShowHiddenPara();
-
 }
 
 SfxPoolItem* SwDocDisplayItem::Clone( SfxItemPool*	) const
@@ -95,7 +94,7 @@ SfxPoolItem* SwDocDisplayItem::Clone( SfxItemPool*	) const
 
 int SwDocDisplayItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+    OSL_ENSURE( SfxPoolItem::operator==(rAttr), "different types" );
 
     const SwDocDisplayItem& rItem = (SwDocDisplayItem&)rAttr;
 
@@ -190,7 +189,7 @@ SfxPoolItem* SwElemItem::Clone( SfxItemPool* ) const
 
 int SwElemItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+    OSL_ENSURE( SfxPoolItem::operator==(rAttr), "different types" );
 
     const SwElemItem& rItem = (SwElemItem&)rAttr;
 
@@ -283,7 +282,7 @@ SfxPoolItem* SwAddPrinterItem::Clone( SfxItemPool* ) const
 
 int SwAddPrinterItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+    OSL_ENSURE( SfxPoolItem::operator==(rAttr), "different types" );
 
     const SwAddPrinterItem& rItem = (SwAddPrinterItem&)rAttr;
 
@@ -340,7 +339,7 @@ void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const
     rVOpt.SetShdwCrsrFillMode( eMode );
 }
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
 SwTestItem::SwTestItem( const SwTestItem& rTestItem ):
             SfxPoolItem(rTestItem)
 {
@@ -363,7 +362,7 @@ SfxPoolItem* SwTestItem::Clone( SfxItemPool* ) const
 
 int SwTestItem::operator==( const SfxPoolItem& rAttr ) const
 {
-    DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" );
+    OSL_ENSURE( SfxPoolItem::operator==(rAttr), "different types" );
 
     const SwTestItem& rItem = (const SwTestItem&) rAttr;
 
diff --git a/sw/source/ui/config/dbconfig.cxx b/sw/source/ui/config/dbconfig.cxx
index b3d66d0..4161b7a 100644
--- a/sw/source/ui/config/dbconfig.cxx
+++ b/sw/source/ui/config/dbconfig.cxx
@@ -96,7 +96,7 @@ void SwDBConfig::Load()
     }
     Sequence<Any> aValues = GetProperties(rNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == rNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == rNames.getLength())
     {
         for(int nProp = 0; nProp < rNames.getLength(); nProp++)
diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx
index d747091..989477a 100644
--- a/sw/source/ui/config/fontcfg.cxx
+++ b/sw/source/ui/config/fontcfg.cxx
@@ -121,7 +121,7 @@ SwStdFontConfig::SwStdFontConfig() :
     Sequence<OUString> aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -237,9 +237,6 @@ BOOL SwStdFontConfig::IsFontDefault(USHORT nFontType) const
     return bSame;
 }
 
-/* -----------------11.01.99 13:16-------------------
- * Standards auslesen
- * --------------------------------------------------*/
 String  SwStdFontConfig::GetDefaultFor(USHORT nFontType, LanguageType eLang)
 {
     String sRet;
@@ -301,7 +298,7 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(USHORT nFontType, LanguageType eL
 
 void SwStdFontConfig::ChangeInt( USHORT nFontType, sal_Int32 nHeight )
 {
-    DBG_ASSERT( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()");
+    OSL_ENSURE( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()");
     if( nFontType < DEF_FONT_COUNT && nDefaultFontHeight[nFontType] != nHeight)
     {
         SvtLinguOptions aLinguOpt;
@@ -329,7 +326,7 @@ void SwStdFontConfig::ChangeInt( USHORT nFontType, sal_Int32 nHeight )
 
 sal_Int32 SwStdFontConfig::GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang )
 {
-    DBG_ASSERT(nFont + FONT_PER_GROUP * nScriptType < DEF_FONT_COUNT, "wrong index in SwStdFontConfig::GetFontHeight()");
+    OSL_ENSURE(nFont + FONT_PER_GROUP * nScriptType < DEF_FONT_COUNT, "wrong index in SwStdFontConfig::GetFontHeight()");
     sal_Int32 nRet = nDefaultFontHeight[nFont + FONT_PER_GROUP * nScriptType];
     if(nRet <= 0)
         return GetDefaultHeightFor(nFont + FONT_PER_GROUP * nScriptType, eLang);
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 8a99c08..adb312f 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -415,7 +415,7 @@ void SwTestAccountSettingsDialog::Test()
         }
         catch(uno::Exception&)
         {
-            DBG_ERROR("exception caught");
+            OSL_ENSURE(false, "exception caught");
         }
     }
 
diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index 2a5ae79..86bdbfb 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -82,7 +82,7 @@ const InsCaptionOpt* SwModuleOptions::GetCapOption(
 {
     if(bHTML)
     {
-        DBG_ERROR("no caption option in sw/web!");
+        OSL_ENSURE(false, "no caption option in sw/web!");
         return 0;
     }
     else
@@ -105,7 +105,7 @@ BOOL SwModuleOptions::SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt)
 
     if(bHTML)
     {
-        DBG_ERROR("no caption option in sw/web!");
+        OSL_ENSURE(false, "no caption option in sw/web!");
     }
     else if (pOpt)
     {
@@ -188,7 +188,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
                                 nVal -= 'a' - 10;
                             else
                             {
-                                DBG_ERROR( "ungueltiger Hex-Wert" );
+                                OSL_ENSURE(false,  "wrong hex value" );
                                 bValidData = FALSE;
                                 break;
                             }
@@ -201,7 +201,7 @@ String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, BOOL bFromUI)
                         break;
                     }
 
-                    default:	// Unbekannt, daher nur Backslash einfuegen
+                    default:    // Unknown, so insert backslash
                         sReturn += '\\';
                         i--;
                         break;
@@ -366,7 +366,7 @@ void SwRevisionConfig::Load()
     const Sequence<OUString>& aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -905,7 +905,7 @@ void SwInsertConfig::Load()
     const Sequence<OUString>& aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         InsCaptionOpt* pWriterTableOpt = 0;
@@ -1194,7 +1194,7 @@ void SwTableConfig::Load()
     const Sequence<OUString>& aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -1304,7 +1304,7 @@ void SwMiscConfig::Load()
     const Sequence<OUString>& aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         OUString sTmp;
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 7600d62..ad15ef4 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -436,7 +436,7 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
                         case COPT_EXPAND_WORDSPACE:  pItem->m_bExpandWordSpace = bChecked; break;
                         default:
                         {
-                            DBG_ERRORFILE( "SwCompatibilityOptPage::UseAsDefaultHdl(): wrong option" );
+                            OSL_ENSURE(false, "SwCompatibilityOptPage::UseAsDefaultHdl(): wrong option" );
                         }
                     }
                 }
@@ -453,7 +453,7 @@ IMPL_LINK( SwCompatibilityOptPage, UseAsDefaultHdl, PushButton*, EMPTYARG )
 void SwCompatibilityOptPage::SetCurrentOptions( ULONG nOptions )
 {
     ULONG nCount = m_aOptionsLB.GetEntryCount();
-    DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
+    OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
     for ( USHORT i = 0; i < nCount; ++i )
     {
         BOOL bChecked = ( ( nOptions & 0x00000001 ) == 0x00000001 );
@@ -510,7 +510,7 @@ BOOL SwCompatibilityOptPage::FillItemSet( SfxItemSet&  )
     {
         ULONG nSavedOptions = m_nSavedOptions;
         ULONG nCount = m_aOptionsLB.GetEntryCount();
-        DBG_ASSERT( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
+        OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry overflow" );
 
         bool bSetParaSpaceMax = false;
 
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index c92c084..2f07abb 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -118,7 +118,7 @@ SwLoadOptPage::SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ) :
             case FUNIT_PICA:
             case FUNIT_INCH:
             {
-                // nur diese Metriken benutzen
+                // use only these metrics
                 USHORT nPos = aMetricLB.InsertEntry( sMetric );
                 aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
             }
@@ -346,7 +346,7 @@ IMPL_LINK(SwLoadOptPage, CaptionHdl, PushButton*, EMPTYARG)
 SwCaptionOptDlg::SwCaptionOptDlg(Window* pParent, const SfxItemSet& rSet) :
     SfxSingleTabDialog(pParent, rSet, 0)
 {
-    // TabPage erzeugen
+    // create TabPage
     SetTabPage((SwCaptionOptPage*) SwCaptionOptPage::Create(this, rSet));
 }
 
@@ -576,7 +576,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
         aAny = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION );
         if ( !( aAny >>= sTemp ) )
         {
-            DBG_ERRORFILE( "Couldn't get PRODUCTVERSION variable" );
+            OSL_ENSURE(false, "Couldn't get PRODUCTVERSION variable" );
         }
         else
         {
@@ -766,7 +766,7 @@ IMPL_LINK( SwCaptionOptPage, SaveEntryHdl, SvxCheckListBox *, EMPTYARG )
 {
     SvLBoxEntry* pEntry = aCheckLB.GetHdlEntry();
 
-    if (pEntry)		// Alles speichern
+    if (pEntry) // save all
         SaveEntry(pEntry);
 
     return 0;
@@ -807,12 +807,7 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
 IMPL_LINK( SwCaptionOptPage, ModifyHdl, Edit *, EMPTYARG )
 {
     String sFldTypeName = aCategoryBox.GetText();
-/*
-    SwFieldType* pType = sFldTypeName.Len() ? pMgr->GetFldType(RES_SETEXPFLD, sFldTypeName) : 0;
 
-    ((SfxSingleTabDialog*)GetParent())->GetOKButton()->Enable( (!pType || ((SwSetExpFieldType*)pType)->GetType() == GSE_SEQ)
-                                    && sFldTypeName.Len() != 0 );
-*/
     SfxSingleTabDialog *pDlg = (SfxSingleTabDialog *)GetParent();
     PushButton *pBtn = pDlg->GetOKButton();
     if (pBtn)
@@ -860,7 +855,7 @@ void SwCaptionOptPage::DrawSample()
             //#i61007# order of captions
             if( !bOrderNumberingFirst )
             {
-                // Kategorie
+                // category
                 aStr += aCategoryBox.GetText();
                 aStr += ' ';
             }
@@ -908,9 +903,7 @@ void SwCaptionOptPage::DrawSample()
     aPreview.SetPreviewText( aStr );
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:	ComboBox ohne Spaces
-------------------------------------------------------------------------*/
+// Description: ComboBox without Spaces
 void CaptionComboBox::KeyInput(const KeyEvent& rEvt)
 {
     if( rEvt.GetKeyCode().GetCode() != KEY_SPACE )
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index c7bc3af..7979a49 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -84,10 +84,6 @@
 
 using namespace ::com::sun::star;
 
-/*-----------------31.08.96 10.16-------------------
-    TabPage Anzeige/Inhalt
---------------------------------------------------*/
-
 SwContentOptPage::SwContentOptPage( Window* pParent,
                                       const SfxItemSet& rCoreSet ) :
     SfxTabPage( pParent, SW_RES( TP_CONTENT_OPT ), rCoreSet ),
@@ -156,20 +152,20 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
             case FUNIT_LINE:
             {
                 // nur diese Metriken benutzen
-                                // a horizontal ruler has not the 'line' unit
-                                // there isn't 'line' unit in HTML format
-                                if ( eFUnit != FUNIT_LINE )
-                                {
-                        USHORT nPos = aMetricLB.InsertEntry( sMetric );
-                        aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
-                            aHMetric.InsertEntry( sMetric );
-                                    aHMetric.SetEntryData( nPos, (void*)(long)eFUnit );
-                                }
-                                // a vetical ruler has not the 'character' unit
+                // a horizontal ruler has not the 'line' unit
+                // there isn't 'line' unit in HTML format
+                if ( eFUnit != FUNIT_LINE )
+                {
+                   USHORT nPos = aMetricLB.InsertEntry( sMetric );
+                   aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit );
+                   aHMetric.InsertEntry( sMetric );
+                   aHMetric.SetEntryData( nPos, (void*)(long)eFUnit );
+                }
+                // a vertical ruler has not the 'character' unit
                 if ( eFUnit != FUNIT_CHAR )
                 {
-                            USHORT nPos = aVMetric.InsertEntry( sMetric );
-                            aVMetric.SetEntryData( nPos, (void*)(long)eFUnit );
+                   USHORT nPos = aVMetric.InsertEntry( sMetric );
+                   aVMetric.SetEntryData( nPos, (void*)(long)eFUnit );
                 }
             }
             default:;//prevent warning
@@ -571,17 +567,6 @@ void SwAddPrinterTabPage::PageCreated (SfxAllItemSet aSet)
             aFaxList.Insert(rpString, 0);
         }
         SetFax( aFaxList );
-/*		SvStringsDtor aFaxList;
-        const List *pList = (pListItem)->GetList();
-        sal_uInt32 nCount = pList->Count();
-        for(sal_uInt32 i = 0; i < nCount ; i++)
-        {
-            String* pString = (String*)(pList->GetObject(i));
-            String* &rpString = pString;
-            aFaxList.Insert(rpString, 0 );
-        }
-        SetFax(aFaxList);
-*/
     }
 }
 
@@ -792,7 +777,6 @@ BOOL SwStdFontTabPage::FillItemSet( SfxItemSet& )
                 delete (SfxFont*) pFnt;
                 bDelete = FALSE;
             }
-//          lcl_SetColl(pWrtShell, RES_POOLCOLL_STANDARD, pPrinter, sStandard);
             bMod = TRUE;
         }
         if(bStandardHeightChanged)
@@ -1164,9 +1148,6 @@ void SwStdFontTabPage::PageCreated (SfxAllItemSet aSet)
     if (pFlagItem)
         SetFontMode(sal::static_int_cast< sal_uInt8, sal_uInt16>( pFlagItem->GetValue()));
 }
-/*-----------------18.01.97 12.14-------------------
-    Optionen Tabelle
---------------------------------------------------*/
 
 SwTableOptionsTabPage::SwTableOptionsTabPage( Window* pParent, const SfxItemSet& rSet ) :
     SfxTabPage(pParent, SW_RES(TP_OPTTABLE_PAGE), rSet),
@@ -1341,46 +1322,10 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet& rSet)
         bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
     }
 
-    //bestimmte Controls fuer HTML verstecken
+    // hide certain controls for html
     if(bHTMLMode)
     {
-/*        Point aPos(aCaptionFL.GetPosPixel());
-        long nYDiff = aTableFL.GetPosPixel().Y() - aPos.Y();
-        aTableFL.SetPosPixel(aPos);
-
-        aPos = aHeaderCB.GetPosPixel();
-        aPos.Y() -= nYDiff;
-        aHeaderCB.SetPosPixel(aPos);
-
-        aPos = aRepeatHeaderCB.GetPosPixel();
-        aPos.Y() -= nYDiff;
-        aRepeatHeaderCB.SetPosPixel(aPos);
-
-        aPos = aDontSplitCB.GetPosPixel(); // hier muss eine Luecke geschlossen werden
-        aPos.Y() -= nYDiff;
-        aBorderCB.SetPosPixel(aPos);
 
-        aPos = aTableInsertFL.GetPosPixel();
-        aPos.Y() -= nYDiff;
-        aTableInsertFL.SetPosPixel(aPos);
-
-        aPos = aNumFormattingCB.GetPosPixel();
-        aPos.Y() -= nYDiff;
-        aNumFormattingCB.SetPosPixel(aPos);
-
-        aPos = aNumFmtFormattingCB.GetPosPixel();
-        aPos.Y() -= nYDiff;
-        aNumFmtFormattingCB.SetPosPixel(aPos);
-
-        aPos = aNumAlignmentCB.GetPosPixel();
-        aPos.Y() -= nYDiff;
-        aNumAlignmentCB.SetPosPixel(aPos);
-
-        aCaptionFL.Hide();
-        aCaptionCB.Hide();
-        aCaptionFT.Hide();
-        aCaptionPB.Hide();
-*/
         aDontSplitCB.Hide();
     }
 
@@ -1422,9 +1367,6 @@ void SwTableOptionsTabPage::PageCreated (SfxAllItemSet aSet)
         SetWrtShell(pWrtSh->GetValue());
 }
 
-/*-----------------31.10.97 17:55-------------------
- TabPage fuer ShadowCrsr
---------------------------------------------------*/
 SwShdwCrsrOptionsTabPage::SwShdwCrsrOptionsTabPage( Window* pParent,
                                                     const SfxItemSet& rSet )
     : SfxTabPage(pParent, SW_RES(TP_OPTSHDWCRSR), rSet),
@@ -1497,7 +1439,6 @@ SwShdwCrsrOptionsTabPage::~SwShdwCrsrOptionsTabPage()
 {
 }
 
-
 SfxTabPage*	SwShdwCrsrOptionsTabPage::Create( Window* pParent, const SfxItemSet& rSet )
 {
     return new SwShdwCrsrOptionsTabPage( pParent, rSet );
@@ -1540,7 +1481,7 @@ BOOL SwShdwCrsrOptionsTabPage::FillItemSet( SfxItemSet& rSet )
     SwDocDisplayItem aDisp;
     if(pOldAttr)
         aDisp = *pOldAttr;
-    //
+
     aDisp.bParagraphEnd         = aParaCB       .IsChecked();
     aDisp.bTab                  = aTabCB        .IsChecked();
     aDisp.bSpace                = aSpacesCB     .IsChecked();
@@ -1648,7 +1589,7 @@ SwMarkPreview::SwMarkPreview( Window *pParent, const ResId& rResID ) :
 
     const Size aSz(GetOutputSizePixel());
 
-    // Seite
+    // Page
     aPage.SetSize(Size(aSz.Width() - 3, aSz.Height() - 3));
 
     ULONG nOutWPix = aPage.GetWidth();
@@ -1719,23 +1660,23 @@ void SwMarkPreview::Paint(const Rectangle &/*rRect*/)
 
     switch (nMarkPos)
     {
-        case 1:		// Links
+        case 1:		// left
             aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
             break;
 
-        case 2:		// Rechts
+        case 2:		// right
             aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
             break;
 
-        case 3:		// Aussen
+        case 3:		// outside
             break;
 
-        case 4:		// Innen
+        case 4:		// inside
             aLeftMark.SetPos(Point(aLeftPagePrtArea.Right() + 2, aLeftMark.Top()));
             aRightMark.SetPos(Point(aRightPagePrtArea.Left() - 2 - aRightMark.GetWidth(), aRightMark.Top()));
             break;
 
-        case 0:		// Keine
+        case 0:		// none
         default:
             return;
     }
@@ -2018,12 +1959,12 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet&  )
     const AuthorCharAttr &rDeletedAttr = pOpt->GetDeletedAuthorAttr();
     const AuthorCharAttr &rChangedAttr = pOpt->GetFormatAuthorAttr();
 
-    // Preview initialisieren
+    // initialise preview
     InitFontStyle(aInsertedPreviewWN);
     InitFontStyle(aDeletedPreviewWN);
     InitFontStyle(aChangedPreviewWN);
 
-    // Farblistboxen initialisieren
+    // initialisieren colour list box
     String sColor;
     aInsertColorLB.SetUpdateMode(FALSE);
     aDeletedColorLB.SetUpdateMode(FALSE);
@@ -2122,7 +2063,7 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet&  )
     }
     aMarkPosLB.SelectEntryPos(nPos);
 
-    // Einstellungen in Preview anzeigen
+    // show settings in preview
     AttribHdl(&aInsertLB);
     ColorHdl(&aInsertColorLB);
     AttribHdl(&aDeletedLB);
@@ -2362,10 +2303,7 @@ void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin)
 }
 
 
-#ifdef DBG_UTIL
-/*----------------- OS 11.01.95  -----------------------
- TabPage Testeinstellungen
--------------------------------------------------------*/
+#if OSL_DEBUG_LEVEL > 1
 
 void lcl_SetPosSize(Window& rWin, Point aPos, Size aSize)
 {
diff --git a/sw/source/ui/config/prtopt.cxx b/sw/source/ui/config/prtopt.cxx
index 6c274d4..038c8a2 100644
--- a/sw/source/ui/config/prtopt.cxx
+++ b/sw/source/ui/config/prtopt.cxx
@@ -94,7 +94,7 @@ SwPrintOptions::SwPrintOptions(sal_Bool bWeb) :
     Sequence<OUString> aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         for(int nProp = 0; nProp < aNames.getLength(); nProp++)
diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index d7a4be9..f9ad296 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -67,11 +67,6 @@ using namespace ::com::sun::star;
 #define NUMRULE_FILENAME "numrule.cfg"
 #define CHAPTER_FILENAME "chapter.cfg"
 
-/*------------------------------------------------------------------------
- Beschreibung:	Ops. zum Laden / Speichern
-------------------------------------------------------------------------*/
-
-
 SV_IMPL_PTRARR( _SwNumFmtsAttrs, SfxPoolItem* )
 
 
@@ -93,9 +88,6 @@ SwBaseNumRules::SwBaseNumRules( const String& rFileName )
     Init();
 }
 
-/*-----------------26.06.97 08.30-------------------
-
---------------------------------------------------*/
 SwBaseNumRules::~SwBaseNumRules()
 {
     if( bModified )
@@ -115,9 +107,6 @@ SwBaseNumRules::~SwBaseNumRules()
         delete pNumRules[i];
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
 void  SwBaseNumRules::Init()
 {
     for(USHORT i = 0; i < nMaxRules; ++i )
@@ -132,25 +121,17 @@ void  SwBaseNumRules::Init()
     }
 }
 
-/*-----------------26.06.97 08.30-------------------
-
---------------------------------------------------*/
-
 void SwBaseNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
 {
-    ASSERT(nIdx < nMaxRules, Array der NumRules ueberindiziert.);
+    OSL_ENSURE(nIdx < nMaxRules, "Array der NumRules ueberindiziert.");
     if( !pNumRules[nIdx] )
         pNumRules[nIdx] = new SwNumRulesWithName( rCopy );
     else
         *pNumRules[nIdx] = rCopy;
 }
 
-// PROTECTED METHODES ----------------------------------------------------
-/*------------------------------------------------------------------------
- Beschreibung:	Speichern
-------------------------------------------------------------------------*/
-
-BOOL /**/ SwBaseNumRules::Store(SvStream &rStream)
+// PROTECTED METHODS ----------------------------------------------------
+BOOL SwBaseNumRules::Store(SvStream &rStream)
 {
     rStream << ACT_NUM_VERSION;
         // Schreiben, welche Positionen durch eine Regel belegt sind
@@ -168,13 +149,6 @@ BOOL /**/ SwBaseNumRules::Store(SvStream &rStream)
     return TRUE;
 }
 
-
-
-/*------------------------------------------------------------------------
- Beschreibung:	Speichern / Laden
-------------------------------------------------------------------------*/
-
-
 int SwBaseNumRules::Load(SvStream &rStream)
 {
     int			rc = 0;
@@ -206,35 +180,21 @@ int SwBaseNumRules::Load(SvStream &rStream)
     return rc;
 }
 
-/*-----------------26.06.97 08.34-------------------
-
---------------------------------------------------*/
-
-/*------------------------------------------------------------------------*/
-
-
 SwChapterNumRules::SwChapterNumRules() :
     SwBaseNumRules(C2S(CHAPTER_FILENAME))
 {
 }
 
-/*------------------------------------------------------------------------*/
-
  SwChapterNumRules::~SwChapterNumRules()
 {
 }
 
-/*-----------------26.06.97 08.23-------------------
-
---------------------------------------------------*/
 void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, USHORT nIdx)
 {
     bModified = TRUE;
     SwBaseNumRules::ApplyNumRules(rCopy, nIdx);
 }
 
-/*------------------------------------------------------------------------*/
-
 SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
                                         const String &rName )
     : aName(rName)
@@ -249,28 +209,18 @@ SwNumRulesWithName::SwNumRulesWithName( const SwNumRule &rCopy,
     }
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
 SwNumRulesWithName::SwNumRulesWithName( const SwNumRulesWithName& rCopy )
 {
     memset( aFmts, 0, sizeof( aFmts ));
     *this = rCopy;
 }
 
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
 SwNumRulesWithName::~SwNumRulesWithName()
 {
     for( int n = 0; n < MAXLEVEL; ++n )
         delete aFmts[ n ];
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
 const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName &rCopy)
 {
     if( this != &rCopy )
@@ -290,9 +240,6 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName
     return *this;
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
 SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, USHORT nVersion )
 {
     CharSet eEncoding = gsl_getSystemTextEncoding();
@@ -306,7 +253,6 @@ SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, USHORT nVersion )
         // wegen eines kleinen aber schweren Fehlers schreibt die PreFinal die
         // gleiche VERSION_40A wie das SP2 #55402#
         else if(nVersion < VERSION_40A && n > 5)
-//		else if(nVersion < VERSION_50A && n > 5)
             c = 0;
         else
             rStream >> c;
@@ -318,16 +264,10 @@ SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, USHORT nVersion )
     }
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
 void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
 {
-    // --> OD 2008-02-11 #newlistlevelattrs#
-    // --> OD 2008-06-06 #i89178#
+    // #i89178#
     rChg = SwNumRule( aName, numfunc::GetDefaultPositionAndSpaceMode() );
-    // <--
     rChg.SetAutoRule( FALSE );
     _SwNumFmtGlobal* pFmt;
     for( USHORT n = 0; n < MAXLEVEL; ++n )
@@ -339,9 +279,6 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const
         }
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
 void SwNumRulesWithName::Store( SvStream &rStream )
 {
     CharSet eEncoding = gsl_getSystemTextEncoding();
@@ -359,10 +296,6 @@ void SwNumRulesWithName::Store( SvStream &rStream )
             rStream << (char)0;
     }
 }
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
 
 SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt )
     : aFmt( rFmt ), nCharPoolId( USHRT_MAX )
@@ -391,10 +324,6 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt )
     }
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
 SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFmt )
     :
     aFmt( rFmt.aFmt ),
@@ -405,10 +334,6 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm
         aItems.Insert( rFmt.aItems[ --n ]->Clone(), aItems.Count() );
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
 SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
                                                         USHORT nVersion )
     : nCharPoolId( USHRT_MAX )
@@ -539,18 +464,9 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
     }
 }
 
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
 SwNumRulesWithName::_SwNumFmtGlobal::~_SwNumFmtGlobal()
 {
 }
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
 
 void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
 {
@@ -598,7 +514,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
     {
         SfxPoolItem* pItem = aItems[ --n ];
         USHORT nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 );
-        ASSERT( nIVers != USHRT_MAX,
+        OSL_ENSURE( nIVers != USHRT_MAX,
                 "Was'n das: Item-Version USHRT_MAX in der aktuellen Version" );
         rStream << pItem->Which()
                 << nIVers;
@@ -630,10 +546,6 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
     }
 }
 
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
 void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
                             SwNumFmt& rNew ) const
 {
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index 1e4c07d..c54d9c6 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -186,7 +186,7 @@ void SwContentViewConfig::Load()
     Sequence<OUString> aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -326,7 +326,7 @@ void SwLayoutViewConfig::Load()
     Sequence<OUString> aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         for(int nProp = 0; nProp < aNames.getLength(); nProp++)
@@ -473,7 +473,7 @@ void SwGridConfig::Load()
     Sequence<OUString> aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
         Size aSnap(rParent.GetSnapSize());
@@ -557,7 +557,7 @@ void SwCursorConfig::Load()
     Sequence<OUString> aNames = GetPropertyNames();
     Sequence<Any> aValues = GetProperties(aNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aNames.getLength())
     {
 
@@ -618,7 +618,7 @@ void SwWebColorConfig::Load()
 {
     Sequence<Any> aValues = GetProperties(aPropNames);
     const Any* pValues = aValues.getConstArray();
-    DBG_ASSERT(aValues.getLength() == aPropNames.getLength(), "GetProperties failed");
+    OSL_ENSURE(aValues.getLength() == aPropNames.getLength(), "GetProperties failed");
     if(aValues.getLength() == aPropNames.getLength())
     {
         for(int nProp = 0; nProp < aPropNames.getLength(); nProp++)
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index b28c0c2..3ac5d13 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -52,7 +52,7 @@
 
 #include <editeng/acorrcfg.hxx>
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
 BOOL   SwViewOption::bTest9 = FALSE;		//DrawingLayerNotLoading
 #endif
 Color SwViewOption::aDocBoundColor(COL_LIGHTGRAY);
@@ -102,7 +102,7 @@ BOOL SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
             && mbViewLayoutBookMode == rOpt.mbViewLayoutBookMode
             && bShowPlaceHolderFields == rOpt.bShowPlaceHolderFields
             && bIdle == rOpt.bIdle
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
             // korrespondieren zu den Angaben in ui/config/cfgvw.src
             && bTest1 == rOpt.IsTest1()
             && bTest2 == rOpt.IsTest2()
@@ -146,7 +146,7 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut,
 
 USHORT SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const
 {
-    ASSERT( pOut, "no Outdev" );
+    OSL_ENSURE( pOut, "no Outdev" );
     return USHORT(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr )));
 }
 
@@ -178,9 +178,8 @@ SwViewOption::SwViewOption() :
     bStarOneSetting(FALSE),
     bIsPagePreview(FALSE),
     bSelectionInReadonly(FALSE),
-    // --> FME 2004-06-29 #114856# Formular view
+    // #114856# Formular view
     bFormView(FALSE),
-    // <--
     bBookview(FALSE),
     mbViewLayoutBookMode(FALSE),
     bShowPlaceHolderFields( sal_True ),
@@ -210,7 +209,7 @@ SwViewOption::SwViewOption() :
 
     bIdle = true;
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
     // korrespondieren zu den Angaben in ui/config/cfgvw.src
     bTest1 = bTest2 = bTest3 = bTest4 =
              bTest5 = bTest6 = bTest7 = bTest8 = bTest10 = FALSE;
@@ -221,9 +220,8 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
 {
     bReadonly = FALSE;
     bSelectionInReadonly = FALSE;
-    // --> FME 2004-06-29 #114856# Formular view
+    // #114856# Formular view
     bFormView       = rVOpt.bFormView;
-    // <--
     nZoom           = rVOpt.nZoom       ;
     aSnapSize   	= rVOpt.aSnapSize   ;
     mnViewLayoutColumns = rVOpt.mnViewLayoutColumns ;
@@ -246,7 +244,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
     bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
     bIdle           = rVOpt.bIdle;
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
     bTest1          = rVOpt.bTest1      ;
     bTest2          = rVOpt.bTest2      ;
     bTest3          = rVOpt.bTest3      ;
@@ -262,9 +260,8 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
 
 SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
 {
-    // --> DVO FME 2004-06-29 #114856# Formular view
+    // #114856# Formular view
     bFormView       = rVOpt.bFormView   ;
-    // <--
     nZoom   		= rVOpt.nZoom   	;
     aSnapSize   	= rVOpt.aSnapSize   ;
     mnViewLayoutColumns = rVOpt.mnViewLayoutColumns ;
@@ -287,7 +284,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
     bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
     bIdle           = rVOpt.bIdle;
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
     bTest1          = rVOpt.bTest1      ;
     bTest2          = rVOpt.bTest2      ;
     bTest3          = rVOpt.bTest3      ;
@@ -317,7 +314,7 @@ void SwViewOption::Init( Window *pWin )
 BOOL SwViewOption::IsAutoCompleteWords() const
 {
     const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
-    return /*rFlags.bAutoCompleteWords &&*/ rFlags.bAutoCmpltCollectWords;
+    return rFlags.bAutoCmpltCollectWords;
 }
 
 AuthorCharAttr::AuthorCharAttr() :
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index b9ada20..2869142 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -85,8 +85,6 @@ using namespace ::rtl;
 #define ITEMID_NAME         1
 #define ITEMID_TABLE        2
 
-//typedef SharedUNOComponent< XConnection >   SharedConnection;
-
 static const char* cUTF8 = "UTF-8";
 
 struct AddressUserData_Impl
@@ -227,7 +225,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent) :
     SwMailMergeConfigItem& rConfigItem = m_pAddressPage->GetWizard()->GetConfigItem();
     const SwDBData& rCurrentData = rConfigItem.GetCurrentDBData();
 
-    DBG_ASSERT(m_xDBContext.is(), "service 'com.sun.star.sdb.DatabaseContext' not found!");
+    OSL_ENSURE(m_xDBContext.is(), "service 'com.sun.star.sdb.DatabaseContext' not found!");
     sal_Bool bEnableEdit = sal_False;
     sal_Bool bEnableOK = sal_True;
     m_aListLB.SelectAll( FALSE );
@@ -349,7 +347,7 @@ IMPL_LINK(SwAddressListDialog, FilterHdl_Impl, PushButton*, EMPTYARG)
             }
             catch(Exception& )
             {
-                DBG_ERROR("exception caught in SwAddressListDialog::FilterHdl_Impl");
+                OSL_ENSURE(false, "exception caught in SwAddressListDialog::FilterHdl_Impl");
             }
         }
     }
@@ -543,10 +541,8 @@ IMPL_STATIC_LINK(SwAddressListDialog, StaticListBoxSelectHdl_Impl, SvLBoxEntry*,
     return 0;
 }
 
-/*-- 13.05.2004 14:59:25---------------------------------------------------
-    detect the number of tables for a data source
-    if only one is available then set it at the entry
-  -----------------------------------------------------------------------*/
+// detect the number of tables for a data source
+// if only one is available then set it at the entry
 void SwAddressListDialog::DetectTablesAndQueries(
         SvLBoxEntry* pSelect,
         bool bWidthDialog)
@@ -639,7 +635,7 @@ void SwAddressListDialog::DetectTablesAndQueries(
     }
     catch(Exception& )
     {
-        DBG_ERROR("exception caught in SwAddressListDialog::DetectTablesAndQueries");
+        OSL_ENSURE(false, "exception caught in SwAddressListDialog::DetectTablesAndQueries");
         m_aOK.Enable( sal_False );
     }
 }
diff --git a/sw/source/ui/dbui/addresslistdialog.hxx b/sw/source/ui/dbui/addresslistdialog.hxx
index 6952ac7..ab7e993 100644
--- a/sw/source/ui/dbui/addresslistdialog.hxx
+++ b/sw/source/ui/dbui/addresslistdialog.hxx
@@ -50,9 +50,7 @@ namespace com{namespace sun{namespace star{
     }
 }}}
 class SwMailMergeAddressBlockPage;
-/*-- 08.04.2004 14:04:29---------------------------------------------------
 
-  -----------------------------------------------------------------------*/
 class SwAddressListDialog : public SfxModalDialog
 {
     FixedInfo       m_aDescriptionFI;
@@ -85,9 +83,7 @@ class SwAddressListDialog : public SfxModalDialog
     SwMailMergeAddressBlockPage* m_pAddressPage;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>     m_xDBContext;
-//    ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>          m_xSource;
-//    ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>          m_xConnection;
-//    ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>    m_xColumnsSupplier;
+
     SwDBData                                                                        m_aDBData;
 
     void DetectTablesAndQueries(SvLBoxEntry* pSelect, bool bWidthDialog);
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index c131ace..2ec7817 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -234,14 +234,14 @@ void SwAddressControl_Impl::SetCurrentDataSet(sal_uInt32 nSet)
     {
         m_bNoDataSet = false;
         m_nCurrentDataSet = nSet;
-        DBG_ASSERT(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index");
+        OSL_ENSURE(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index");
         if(m_pData->aDBData.size() > m_nCurrentDataSet)
         {
             ::std::vector<Edit*>::iterator aEditIter;
             sal_uInt32 nIndex = 0;
             for(aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter, ++nIndex)
             {
-                DBG_ASSERT(nIndex < m_pData->aDBData[m_nCurrentDataSet].size(),
+                OSL_ENSURE(nIndex < m_pData->aDBData[m_nCurrentDataSet].size(),
                             "number of colums doesn't match number of Edits");
                 (*aEditIter)->SetText(m_pData->aDBData[m_nCurrentDataSet][nIndex]);
             }
@@ -288,15 +288,13 @@ void SwAddressControl_Impl::MakeVisible(const Rectangle & rRect)
     }
 }
 
-/*-- 19.04.2004 16:16:25---------------------------------------------------
-    copy data changes into database
-  -----------------------------------------------------------------------*/
+// copy data changes into database
 IMPL_LINK(SwAddressControl_Impl, EditModifyHdl_Impl, Edit*, pEdit)
 {
     //get the data element number of the current set
     sal_Int32 nIndex = (sal_Int32)(sal_IntPtr)pEdit->GetData();
     //get the index of the set
-    DBG_ASSERT(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index" );
+    OSL_ENSURE(m_pData->aDBData.size() > m_nCurrentDataSet, "wrong data set index" );
     if(m_pData->aDBData.size() > m_nCurrentDataSet)
     {
         m_pData->aDBData[m_nCurrentDataSet][nIndex] = pEdit->GetText();
@@ -425,7 +423,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
                 for( xub_StrLen nToken = 0; nToken < nHeaders; ++nToken)
                 {
                     String sHeader = sLine.GetToken( 0, '\t', nIndex );
-                    DBG_ASSERT(sHeader.Len() > 2 &&
+                    OSL_ENSURE(sHeader.Len() > 2 &&
                             sHeader.GetChar(0) == '\"' && sHeader.GetChar(sHeader.Len() - 1) == '\"',
                             "Wrong format of header");
                     if(sHeader.Len() > 2)
@@ -443,7 +441,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
                 for( xub_StrLen nToken = 0; nToken < nDataCount; ++nToken)
                 {
                     String sData = sLine.GetToken( 0, '\t', nIndex );
-                    DBG_ASSERT(sData.Len() >= 2 &&
+                    OSL_ENSURE(sData.Len() >= 2 &&
                                 sData.GetChar(0) == '\"' && sData.GetChar(sData.Len() - 1) == '\"',
                             "Wrong format of line");
                     if(sData.Len() >= 2)
@@ -481,10 +479,6 @@ SwCreateAddressListDialog::~SwCreateAddressListDialog()
     delete m_pFindDlg;
 }
 
-/*-- 13.04.2004 10:08:59---------------------------------------------------
-    add a new data set of empty strings and set the address input control
-    to that new set
-  -----------------------------------------------------------------------*/
 IMPL_LINK(SwCreateAddressListDialog, NewHdl_Impl, PushButton*, EMPTYARG)
 {
     sal_uInt32 nCurrent = m_pAddressControl->GetCurrentDataSet();
@@ -567,10 +561,6 @@ IMPL_LINK(SwCreateAddressListDialog, CustomizeHdl_Impl, PushButton*, pButton)
     return 0;
 }
 
-/*-- 23.04.2004 09:02:51---------------------------------------------------
-    writes the data into a .csv file
-    encoding is UTF8, separator is tab, strings are enclosed into "
-  -----------------------------------------------------------------------*/
 IMPL_LINK(SwCreateAddressListDialog, OkHdl_Impl, PushButton*, EMPTYARG)
 {
     if(!m_sURL.Len())
diff --git a/sw/source/ui/dbui/createaddresslistdialog.hxx b/sw/source/ui/dbui/createaddresslistdialog.hxx
index af58845..caf1baf 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.hxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.hxx
@@ -38,17 +38,14 @@
 
 class SwAddressControl_Impl;
 class SwMailMergeConfigItem;
-/*-- 19.04.2004 12:09:46---------------------------------------------------
-    container of the created database
-  -----------------------------------------------------------------------*/
+
+// container of the created database
 struct SwCSVData
 {
     ::std::vector< ::rtl::OUString >                    aDBColumnHeaders;
     ::std::vector< ::std::vector< ::rtl::OUString> >     aDBData;
 };
-/*-- 08.04.2004 14:04:39---------------------------------------------------
 
-  -----------------------------------------------------------------------*/
 class SwFindEntryDialog;
 class SwCreateAddressListDialog : public SfxModalDialog
 {
@@ -97,9 +94,7 @@ public:
     const String&           GetURL() const {    return m_sURL;    }
     void                    Find( const String& rSearch, sal_Int32 nColumn);
 };
-/*-- 13.04.2004 13:30:21---------------------------------------------------
 
-  -----------------------------------------------------------------------*/
 class SwFindEntryDialog : public ModelessDialog
 {
     FixedText               m_aFindFT;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index a289655..6656e40 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -354,7 +354,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
                             }
                             catch(const Exception& )
                             {
-                                DBG_ERROR("illegal number format key");
+                                OSL_ENSURE(false, "illegal number format key");
                             }
                         }
                     }
@@ -369,7 +369,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
             }
             if( !aDBColumns.Insert( pNew ))
             {
-                ASSERT( !this, "Spaltenname mehrfach vergeben?" );
+                OSL_ENSURE( !this, "Spaltenname mehrfach vergeben?" );
                 delete pNew;
             }
         }
@@ -778,10 +778,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
     }
 
     SwAbstractDialogFactory* pFact = swui::GetFactory();
-    DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+    OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
 
     SfxAbstractTabDialog* pDlg = pFact->CreateSwTableTabDlg(  pButton, rSh.GetAttrPool(),pTblSet, &rSh, DLG_FORMAT_TABLE );
-    DBG_ASSERT(pDlg, "Dialogdiet fail!");
+    OSL_ENSURE(pDlg, "Dialogdiet fail!");
     if( RET_OK == pDlg->Execute() )
         pTblSet->Put( *pDlg->GetOutputItemSet() );
     else if( bNewSet )
@@ -797,10 +797,10 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
 IMPL_LINK( SwInsertDBColAutoPilot, AutoFmtHdl, PushButton*, pButton )
 {
     SwAbstractDialogFactory* pFact = swui::GetFactory();
-    DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+    OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
 
     AbstractSwAutoFormatDlg* pDlg = pFact->CreateSwAutoFormatDlg(pButton, pView->GetWrtShellPtr(),DLG_AUTOFMT_TABLE, FALSE, pTAutoFmt);
-    DBG_ASSERT(pDlg, "Dialogdiet fail!");
+    OSL_ENSURE(pDlg, "Dialogdiet fail!");
     if( RET_OK == pDlg->Execute())
         pDlg->FillAutoFmtOfIndex( pTAutoFmt );
     delete pDlg;
@@ -1039,19 +1039,19 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
             if( aDBColumns.Seek_Entry( &aSrch, &nFndPos ) )
                 aColFlds.Insert( aDBColumns[ nFndPos ], n );
             else {
-                ASSERT( !this, "Datenbankspalte nicht mehr gefunden" );
+                OSL_ENSURE( !this, "database column not found" );
             }
         }
 
         if( nCols != aColFlds.Count() )
         {
-            ASSERT( !this, "nicht alle Datenbankspalten gefunden" );
+            OSL_ENSURE( !this, "not all database columns found" );
             nCols = aColFlds.Count();
         }
 
         if(!nRows || !nCols)
         {
-            ASSERT( !this, "wrong parameters" );
+            OSL_ENSURE( !this, "wrong parameters" );
             break;
         }
 
@@ -1181,12 +1181,12 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
                     }
                 }
                 catch(Exception&
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
                             aExcept
 #endif
                 )
                 {
-                    DBG_ERROR(ByteString(String(aExcept.Message), gsl_getSystemTextEncoding()).GetBuffer());
+                    OSL_ENSURE(false, ByteString(String(aExcept.Message), gsl_getSystemTextEncoding()).GetBuffer());
                 }
             }
 
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index c7118da..a7df045 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -284,7 +284,7 @@ BOOL lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
         }
         else
         {
-            DBG_ERROR("no absolute positioning available");
+            OSL_ENSURE(false, "no absolute positioning available");
         }
     }
     catch(Exception aExcept)
@@ -334,7 +334,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
 {
     SetMergeType( rMergeDesc.nMergeType );
 
-    DBG_ASSERT(!bInMerge && !pImpl->pMergeData, "merge already activated!");
+    OSL_ENSURE(!bInMerge && !pImpl->pMergeData, "merge already activated!");
 
     SwDBData aData;
     aData.nCommandType = CommandType::TABLE;
@@ -412,7 +412,7 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
     {
         pImpl->pMergeData->bEndOfDB = TRUE;
         pImpl->pMergeData->CheckEndOfDB();
-        DBG_ERROR("exception in MergeNew()");
+        OSL_ENSURE(false, "exception in MergeNew()");
     }
 
     uno::Reference<XDataSource> xSource = SwNewDBMgr::getDataSourceAsParent(xConnection,aData.sDataSource);
@@ -453,8 +453,9 @@ BOOL SwNewDBMgr::MergeNew(const SwMergeDescriptor& rMergeDesc )
                     rMergeDesc);
             break;
 
-        default:    	// Einfuegen der selektierten Eintraege
-                        // (war: InsertRecord)
+        default:
+            // insert selected entries
+            // (was: InsertRecord)
             ImportFromConnection(&rMergeDesc.rSh);
             break;
     }
@@ -777,9 +778,7 @@ void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget )
         RES_FRMATR_BEGIN, RES_FRMATR_END-1,
         RES_CHRATR_BEGIN, RES_CHRATR_END-1,
         RES_PARATR_BEGIN, RES_PARATR_END-1,
-        // --> OD 2008-02-25 #refactorlists##
         RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
-        // <--
         RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
         0
     };
@@ -958,7 +957,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
             // Progress, um KeyInputs zu unterbinden
             SfxProgress aProgress(pSourrceDocSh, ::aEmptyStr, 1);
 
-            // Alle Dispatcher sperren
+            // lock all dispatchers
             SfxViewFrame* pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
             while (pViewFrm)
             {
@@ -1027,7 +1026,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
                         for (USHORT i = 0; i < 10; i++)
                             Application::Reschedule();
 
-                        // Neues Dokument erzeugen und speichern
+                        // create and save new document
                         SfxObjectShellRef xWorkDocSh( new SwDocShell( SFX_CREATE_MODE_INTERNAL ));
                         SfxMedium* pWorkMed = new SfxMedium( sSourceDocumentURL, STREAM_STD_READ, TRUE );
                         pWorkMed->SetFilter( pSfxFlt );
@@ -1047,7 +1046,6 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
                             pWorkDoc->UpdateFlds(NULL, false);
                             SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_FIELD_MERGE_FINISHED, SwDocShell::GetEventName(STR_SW_EVENT_FIELD_MERGE_FINISHED), xWorkDocSh));
 
-                            // alle versteckten Felder/Bereiche entfernen
                             pWorkDoc->RemoveInvisibleContent();
 
                             // launch MailMergeEvent if required
@@ -1061,7 +1059,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
 
                             if(rMergeDescriptor.bCreateSingleFile || bAsSingleFile )
                             {
-                                DBG_ASSERT( pTargetShell, "no target shell available!" );
+                                OSL_ENSURE( pTargetShell, "no target shell available!" );
                                 // copy created file into the target document
                                 rWorkShell.ConvertFieldsToText();
                                 rWorkShell.SetNumberingRestart();
@@ -1098,7 +1096,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
                                     pTargetShell->InsertPageBreak( &sModifiedStartingPageDesc, nStartingPageNo );
                                 else
                                     pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
-                                DBG_ASSERT(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
+                                OSL_ENSURE(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
                                 //#i51359# add a second paragraph in case there's only one
                                 {
                                     SwNodeIndex aIdx( pWorkDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -1155,7 +1153,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
                                     String sMailAddress = GetDBField( xColumnProp, aDBFormat);
                                     if(!SwMailMergeHelper::CheckMailAddress( sMailAddress ))
                                     {
-                                        DBG_ERROR("invalid e-Mail address in database column");
+                                        OSL_ENSURE(false, "invalid e-Mail address in database column");
                                     }
                                     else
                                     {
@@ -1184,7 +1182,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
                                                 //read in the temporary file and use it as mail body
                                                 SfxMedium aMedium( sFileURL, STREAM_READ, TRUE);
                                                 SvStream* pInStream = aMedium.GetInStream();
-                                                DBG_ASSERT(pInStream, "no output file created?");
+                                                OSL_ENSURE(pInStream, "no output file created?");
                                                 if(pInStream)
                                                 {
                                                     pInStream->SetStreamCharSet( eEncoding );
@@ -1243,7 +1241,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
             {
                 if( rMergeDescriptor.nMergeType != DBMGR_MERGE_MAILMERGE )
                 {
-                    DBG_ASSERT( aTempFile.get(), "Temporary file not available" );
+                    OSL_ENSURE( aTempFile.get(), "Temporary file not available" );
                     INetURLObject aTempFileURL(bAsSingleFile ? sSubject : aTempFile->GetURL());
                     SfxMedium* pDstMed = new SfxMedium(
                         aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
@@ -1328,7 +1326,7 @@ BOOL SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell,
                         aFileIter != aFilesToRemove.end(); aFileIter++)
                 SWUnoHelper::UCB_DeleteFile( *aFileIter );
 
-            // Alle Dispatcher freigeben
+            // unlock all dispatchers
             pViewFrm = SfxViewFrame::GetFirst(pSourrceDocSh);
             while (pViewFrm)
             {
@@ -1421,7 +1419,7 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
             }
             catch(Exception&)
             {
-                DBG_ERROR("Exception in getColumns()");
+                OSL_ENSURE(false, "Exception in getColumns()");
             }
             if(!xCols.is() || !xCols->hasByName(rColNm))
                 return nRet;
@@ -1510,14 +1508,14 @@ ULONG SwNewDBMgr::GetColumnFmt( uno::Reference< XDataSource> xSource,
                     }
                     catch(const Exception&)
                     {
-                        DBG_ERROR("illegal number format key");
+                        OSL_ENSURE(false, "illegal number format key");
                     }
                 }
             }
         }
         catch( const Exception& )
         {
-            DBG_ERROR("no FormatKey property found");
+            OSL_ENSURE(false, "no FormatKey property found");
         }
         if(bUseDefault)
             nRet = SwNewDBMgr::GetDbtoolsClient().getDefaultNumberFormat(xColumn, xDocNumberFormatTypes,  aLocale);
@@ -1634,7 +1632,7 @@ uno::Reference< sdbcx::XColumnsSupplier> SwNewDBMgr::GetColumnSupplier(uno::Refe
     }
     catch( const uno::Exception& )
     {
-        DBG_ERROR("Exception in SwDBMgr::GetColumnSupplier");
+        OSL_ENSURE(false, "Exception in SwDBMgr::GetColumnSupplier");
     }
 
     return xRet;
@@ -1646,7 +1644,7 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
 {
     uno::Reference< XColumn > xColumn(xColumnProps, UNO_QUERY);
     String sRet;
-    DBG_ASSERT(xColumn.is(), "SwNewDBMgr::::ImportDBField: illegal arguments");
+    OSL_ENSURE(xColumn.is(), "SwNewDBMgr::::ImportDBField: illegal arguments");
     if(!xColumn.is())
         return sRet;
 
@@ -1681,8 +1679,6 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
         case DataType::TIME:
         case DataType::TIMESTAMP:
         {
-//			::Date aTempDate(rDBFormatData.aNullDate.Day,
-//				rDBFormatData.aNullDate.Month, rDBFormatData.aNullDate.Year);
 
             try
             {
@@ -1703,49 +1699,26 @@ String SwNewDBMgr::GetDBField(uno::Reference<XPropertySet> xColumnProps,
             }
             catch(Exception& )
             {
-                DBG_ERROR("exception caught");
+                OSL_ENSURE(false, "exception caught");
             }
 
         }
         break;
-
-//		case DataType::BINARY:
-//		case DataType::VARBINARY:
-//		case DataType::LONGVARBINARY:
-//		case DataType::SQLNULL:
-//		case DataType::OTHER:
-//		case DataType::OBJECT:
-//		case DataType::DISTINCT:
-//		case DataType::STRUCT:
-//		case DataType::ARRAY:
-//		case DataType::BLOB:
-//		case DataType::CLOB:
-//		case DataType::REF:
-//		default:
-    }
-//	if (pFormat)
-//	{
-//		SFX_ITEMSET_GET(*pCol, pFormatItem, SfxUInt32Item, SBA_DEF_FMTVALUE, sal_True);
-//		*pFormat = pFormatItem->GetValue();
-//	}
+    }
 
     return sRet;
 }
 
-/* -----------------------------06.07.00 14:28--------------------------------
-    releases the merge data source table or query after merge is completed
- ---------------------------------------------------------------------------*/
+// releases the merge data source table or query after merge is completed
 void	SwNewDBMgr::EndMerge()
 {
-    DBG_ASSERT(bInMerge, "merge is not active");
+    OSL_ENSURE(bInMerge, "merge is not active");
     bInMerge = FALSE;
     delete pImpl->pMergeData;
     pImpl->pMergeData = 0;
 }
 
-/* -----------------------------06.07.00 14:28--------------------------------
-    checks if a desired data source table or query is open
- ---------------------------------------------------------------------------*/
+// checks if a desired data source table or query is open
 BOOL    SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
             const String& rTableOrQuery, sal_Bool bMergeOnly)
 {
@@ -1770,9 +1743,7 @@ BOOL    SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
     return sal_False;
 }
 
-/* -----------------------------17.07.00 16:44--------------------------------
-    read column data a a specified position
- ---------------------------------------------------------------------------*/
+// read column data at a specified position
 BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
                             const String& rColumnName, sal_uInt32 nAbsRecordId,
                             long nLanguage,
@@ -1836,10 +1807,9 @@ BOOL SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableNam
     return bRet;
 }
 
-/* -----------------------------06.07.00 16:47--------------------------------
-    reads the column data at the current position
- ---------------------------------------------------------------------------*/
-BOOL	SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
+
+// reads the column data at the current position
+BOOL SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
                                 String &rResult, double *pNumber, sal_uInt32 * /*pFormat*/)
 {
     if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is() || pImpl->pMergeData->bAfterSelection )
@@ -1854,7 +1824,7 @@ BOOL	SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
 
 BOOL SwNewDBMgr::ToNextMergeRecord()
 {
-    DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
+    OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
     return ToNextRecord(pImpl->pMergeData);
 }
 
@@ -1920,7 +1890,7 @@ BOOL SwNewDBMgr::ToNextRecord(SwDSParam* pParam)
     return bRet;
 }
 
-/* -----------------------------13.07.00 17:23--------------------------------
+/* ------------------------------------------------------------------------
     synchronized labels contain a next record field at their end
     to assure that the next page can be created in mail merge
     the cursor position must be validated
@@ -1933,7 +1903,7 @@ BOOL SwNewDBMgr::ExistsNextRecord() const
 sal_uInt32 	SwNewDBMgr::GetSelectedRecordId()
 {
     sal_uInt32 	nRet = 0;
-    DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
+    OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
     if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is())
         return FALSE;
     try
@@ -1948,7 +1918,7 @@ sal_uInt32 	SwNewDBMgr::GetSelectedRecordId()
 
 sal_Bool SwNewDBMgr::ToRecordId(sal_Int32 nSet)
 {
-    DBG_ASSERT(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
+    OSL_ENSURE(pImpl->pMergeData && pImpl->pMergeData->xResultSet.is(), "no data source in merge");
     if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is()|| nSet < 0)
         return FALSE;
     sal_Bool bRet = FALSE;
@@ -2082,9 +2052,8 @@ sal_uInt32      SwNewDBMgr::GetSelectedRecordId(
     return nRet;
 }
 
-/* -----------------------------17.07.00 14:18--------------------------------
-    close all data sources - after fields were updated
- ---------------------------------------------------------------------------*/
+
+// close all data sources - after fields were updated
 void	SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
 {
     //the only thing done here is to reset the selection index
@@ -2430,7 +2399,7 @@ void SwNewDBMgr::ExecuteFormLetter(	SwWrtShell& rSh,
 
     if(!sDataSource.getLength() || !sDataTableOrQuery.getLength())
     {
-        DBG_ERROR("PropertyValues missing or unset");
+        OSL_ENSURE(false, "PropertyValues missing or unset");
         return;
     }
 
@@ -2442,7 +2411,7 @@ void SwNewDBMgr::ExecuteFormLetter(	SwWrtShell& rSh,
         pFound = FindDSConnection(sDataSource, TRUE);
     }
     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
-    DBG_ASSERT(pFact, "Dialogdiet fail!");
+    OSL_ENSURE(pFact, "Dialogdiet fail!");
     pImpl->pMergeDialog = pFact->CreateMailMergeDlg( DLG_MAILMERGE,
                                                         &rSh.GetView().GetViewFrame()->GetWindow(), rSh,
                                                         sDataSource,
@@ -2450,7 +2419,7 @@ void SwNewDBMgr::ExecuteFormLetter(	SwWrtShell& rSh,
                                                         nCmdType,
                                                         xConnection,
                                                         bWithDataSourceBrowser ? 0 : &aSelection);
-    DBG_ASSERT(pImpl->pMergeDialog, "Dialogdiet fail!");
+    OSL_ENSURE(pImpl->pMergeDialog, "Dialogdiet fail!");
     if(pImpl->pMergeDialog->Execute() == RET_OK)
     {
         aDescriptor[daSelection] <<= pImpl->pMergeDialog->GetSelection();
@@ -2591,7 +2560,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
     }
     if(!sDataSource.getLength() || !sDataTableOrQuery.getLength() || !xResSet.is())
     {
-        DBG_ERROR("PropertyValues missing or unset");
+        OSL_ENSURE(false, "PropertyValues missing or unset");
         return;
     }
     uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
@@ -2608,14 +2577,14 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
     aDBData.nCommandType = nCmdType;
 
     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
-    DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+    OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
 
     AbstractSwInsertDBColAutoPilot* pDlg = pFact->CreateSwInsertDBColAutoPilot( rSh.GetView(),
                                                                                 xSource,
                                                                                 xColSupp,
                                                                                 aDBData,
                                                                                 DLG_AP_INSERT_DB_SEL );
-    DBG_ASSERT(pDlg, "Dialogdiet fail!");
+    OSL_ENSURE(pDlg, "Dialogdiet fail!");
     if( RET_OK == pDlg->Execute() )
     {
         rtl::OUString sDummy;
@@ -2627,7 +2596,7 @@ void SwNewDBMgr::InsertText(SwWrtShell& rSh,
         }
         catch(Exception& )
         {
-            DBG_ERROR("exception caught");
+            OSL_ENSURE(false, "exception caught");
         }
     }
     delete pDlg;
@@ -2662,7 +2631,7 @@ uno::Reference<XDataSource> SwNewDBMgr::getDataSourceAsParent(const uno::Referen
     }
     catch(const Exception&)
     {
-        DBG_ERROR("exception in getDataSourceAsParent caught");
+        OSL_ENSURE(false, "exception in getDataSourceAsParent caught");
     }
     return xSource;
 }
@@ -2702,15 +2671,13 @@ uno::Reference<XResultSet> SwNewDBMgr::createCursor(const ::rtl::OUString& _sDat
     }
     catch(const Exception&)
     {
-        DBG_ASSERT(0,"Caught exception while creating a new RowSet!");
+        OSL_ENSURE(false,"Caught exception while creating a new RowSet!");
     }
     return xResultSet;
 }
 
-/*-- 13.05.2004 16:14:15---------------------------------------------------
-    merge all data into one resulting document and return the number of
-    merged documents
-  -----------------------------------------------------------------------*/
+
+// merge all data into one resulting document and return the number of merged documents
 sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
                             SwView& rSourceView )
 {
@@ -2744,7 +2711,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
     {
         pImpl->pMergeData->bEndOfDB = TRUE;
         pImpl->pMergeData->CheckEndOfDB();
-        DBG_ERROR("exception in MergeNew()");
+        OSL_ENSURE(false, "exception in MergeNew()");
     }
 
     //bCancel is set from the PrintMonitor
@@ -2900,7 +2867,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
                 pTargetShell->SetPageStyle(sModifiedStartingPageDesc);
             }
             USHORT nPageCountBefore = pTargetShell->GetPageCnt();
-            DBG_ASSERT(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
+            OSL_ENSURE(!pTargetShell->GetTableFmt(),"target document ends with a table - paragraph should be appended");
             //#i51359# add a second paragraph in case there's only one
             {
                 SwNodeIndex aIdx( pWorkDoc->GetNodes().GetEndOfExtras(), 2 );
@@ -2953,12 +2920,12 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
         }
         pTargetShell->EnterStdMode();
         pTargetShell->SttDoc();
-        //
+
     }
     catch( Exception& rEx)
     {
         (void)rEx;
-        DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
+        OSL_ENSURE(false, "exception caught in SwNewDBMgr::MergeDocuments");
     }
     DELETEZ(pImpl->pMergeData);
     bInMerge = FALSE;
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.cxx b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
index a5dfb9a..cf83bcb 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.cxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.cxx
@@ -109,21 +109,7 @@ SwDBTablePreviewDialog::SwDBTablePreviewDialog(Window* pParent, uno::Sequence< b
             xD->dispatch(aURL, rValues);
             m_pBeamerWIN->Show();
         }
-/*        uno::Reference<???::XController> xController = m_xFrame->getController();
-        pImpl->xFController = uno::Reference<???::XFormController>(xController, uno::UNO_QUERY);
-        if(pImpl->xFController.is())
-        {
-            uno::Reference< awt::XControl > xCtrl = pImpl->xFController->getCurrentControl(  );
-            pImpl->xSelSupp = uno::Reference<???::XSelectionSupplier>(xCtrl, uno::UNO_QUERY);
-            if(pImpl->xSelSupp.is())
-            {
-                pImpl->xChgLstnr = new SwXSelChgLstnr_Impl(*this);
-                pImpl->xSelSupp->addSelectionChangeListener(  pImpl->xChgLstnr );
-            }
-        }
-*/    }
-
-
+    }
 }
 
 SwDBTablePreviewDialog::~SwDBTablePreviewDialog()
diff --git a/sw/source/ui/dbui/dbtablepreviewdialog.hxx b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
index 19944e3..c100e37 100644
--- a/sw/source/ui/dbui/dbtablepreviewdialog.hxx
+++ b/sw/source/ui/dbui/dbtablepreviewdialog.hxx
@@ -38,10 +38,6 @@ namespace com{ namespace sun{ namespace star{
     namespace frame{ class XFrame;     }
     }}}
 
-
-/*-- 08.04.2004 14:04:29---------------------------------------------------
-
-  -----------------------------------------------------------------------*/
 class SwDBTablePreviewDialog : public SfxModalDialog
 {
     FixedInfo       m_aDescriptionFI;
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index 717c6ff..c4077f8 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -29,9 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-// INCLUDE ---------------------------------------------------------------
-
-
 #include <sot/formats.hxx>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
@@ -135,10 +132,6 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
         SwConnectionDataPtr pPtr = aConnections[i];
         if(pPtr->sSourceName == sSource)
         {
-//            SwConnectionDataPtr pPtr = aConnections[i];
-//            Reference<XComponent> xComp(pPtr->xConnection, UNO_QUERY);
-//            if(xComp.is())
-//                xComp->dispose();
             aConnections.DeleteAndDestroy(i);
             break;
         }
@@ -169,7 +162,7 @@ BOOL SwDBTreeList_Impl::HasContext()
             if(xContainer.is())
                 xContainer->addContainerListener( this );
         }
-        DBG_ASSERT(xDBContext.is(), "com.sun.star.sdb.DataBaseContext: service not available");
+        OSL_ENSURE(xDBContext.is(), "com.sun.star.sdb.DataBaseContext: service not available");
     }
     return xDBContext.is();
 }
@@ -323,7 +316,7 @@ void  SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
                     if(xTSupplier.is())
                     {
                         Reference<XNameAccess> xTbls = xTSupplier->getTables();
-                        DBG_ASSERT(xTbls->hasByName(sTableName), "table not available anymore?");
+                        OSL_ENSURE(xTbls->hasByName(sTableName), "table not available anymore?");
                         try
                         {
                             Any aTable = xTbls->getByName(sTableName);
@@ -341,7 +334,7 @@ void  SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
                     if(xQSupplier.is())
                     {
                         Reference<XNameAccess> xQueries = xQSupplier->getQueries();
-                        DBG_ASSERT(xQueries->hasByName(sTableName), "table not available anymore?");
+                        OSL_ENSURE(xQueries->hasByName(sTableName), "table not available anymore?");
                         try
                         {
                             Any aQuery = xQueries->getByName(sTableName);
@@ -374,7 +367,7 @@ void  SwDBTreeList::RequestingChilds(SvLBoxEntry* pParent)
             {
             }
         }
-        else	// Tabellennamen
+        else    // table names
         {
             try
             {
@@ -438,7 +431,7 @@ IMPL_LINK( SwDBTreeList, DBCompare, SvSortData*, pData )
     SvLBoxEntry* pRight = (SvLBoxEntry*)(pData->pRight );
 
     if (GetParent(pRight) && GetParent(GetParent(pRight)))
-        return COMPARE_GREATER;	// Spaltennamen nicht sortieren
+        return COMPARE_GREATER; // don't sort column names
 
     return DefaultCompare(pData);	// Sonst Basisklasse rufen
 }
@@ -453,7 +446,7 @@ String  SwDBTreeList::GetDBName(String& rTableName, String& rColumnName, BOOL* p
         if (GetParent(GetParent(pEntry)))
         {
             rColumnName = GetEntryText(pEntry);
-            pEntry = GetParent(pEntry);	// Spaltenname war selektiert
+            pEntry = GetParent(pEntry); // column name was selected
         }
         sDBName = GetEntryText(GetParent(pEntry));
         if(pbIsTable)
diff --git a/sw/source/ui/dbui/dbui.cxx b/sw/source/ui/dbui/dbui.cxx
index 69d0ee7..e4faad7 100644
--- a/sw/source/ui/dbui/dbui.cxx
+++ b/sw/source/ui/dbui/dbui.cxx
@@ -29,9 +29,6 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-// INCLUDE ---------------------------------------------------------------
-
-
 #include <tools/list.hxx>
 #include "wrtsh.hxx"
 
@@ -39,10 +36,6 @@
 #include "dbui.hrc"
 #include "dbui.hxx"
 
-/*---------------------------------------------------------------------
-    Beschreibung:
----------------------------------------------------------------------*/
-
 PrintMonitor::PrintMonitor( Window *pParent, PrintMonitorType eType )
 :	ModelessDialog( pParent, SW_RES(DLG_PRINTMONITOR) ),
     aDocName	(this, SW_RES( FT_DOCNAME )),
@@ -61,9 +54,7 @@ PrintMonitor::PrintMonitor( Window *pParent, PrintMonitorType eType )
     }
     FreeResource();
 }
-/*---------------------------------------------------------------------
-    
----------------------------------------------------------------------*/
+
 void lcl_ResizeControl( Window* pWin, long nDiff )
 {
     Size aSize( pWin->GetSizePixel() );
@@ -75,7 +66,7 @@ void lcl_RePosControl( Window* pWin, long nDiff )
     Point aPos( pWin->GetPosPixel() );
     aPos.X()  += nDiff; 
     pWin->SetPosPixel( aPos );   
-}      
+}
 
 void PrintMonitor::ResizeControls()
 {
@@ -103,10 +94,8 @@ void PrintMonitor::ResizeControls()
         lcl_RePosControl( &aCancel, nDiff );      
     }
 }
-/*---------------------------------------------------------------------
-    Progress Indicator for Creation of personalized Mail Merge documents:
----------------------------------------------------------------------*/
 
+// Progress Indicator for Creation of personalized Mail Merge documents:
 CreateMonitor::CreateMonitor( Window *pParent )
 :	ModelessDialog( pParent, SW_RES(DLG_MM_CREATIONMONITOR) ),
     m_aStatus	        (this, SW_RES( FT_STATUS )),
diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx
index c69d3bd..41d4b15 100644
--- a/sw/source/ui/dbui/mailmergechildwindow.cxx
+++ b/sw/source/ui/dbui/mailmergechildwindow.cxx
@@ -58,7 +58,6 @@
 using namespace ::com::sun::star;
 
 SFX_IMPL_FLOATINGWINDOW( SwMailMergeChildWindow, FN_MAILMERGE_CHILDWINDOW )
-//SFX_IMPL_FLOATINGWINDOW( SwSendMailChildWindow, FN_MAILMERGE_SENDMAIL_CHILDWINDOW )
 
 SwMailMergeChildWindow::SwMailMergeChildWindow( Window* _pParent,
                                 USHORT nId,
@@ -528,7 +527,7 @@ void  SwSendMailDialog::SendMails()
 {
     if(!m_pConfigItem)

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list