summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacek Wolszczak <shutdownrunner@gmail.com>2010-10-20 15:36:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2010-10-20 15:36:15 +0100
commitf075ff1d9beb6a5d16e8705e272ae7987faeeca7 (patch)
treef8e7e2a6bfe00a514855ae709f6b8bb311d05a0e
parentaa289b0ad1f12cbb0038d4ebc8b56d8079388ba6 (diff)
convert to new OSL family of asserts
-rw-r--r--sw/inc/viewopt.hxx4
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx15
-rw-r--r--sw/source/ui/cctrl/popbox.cxx17
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx74
-rw-r--r--sw/source/ui/chrdlg/break.cxx9
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx9
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx26
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx2
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx6
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx9
-rw-r--r--sw/source/ui/config/caption.cxx72
-rw-r--r--sw/source/ui/config/cfgitems.cxx11
-rw-r--r--sw/source/ui/config/dbconfig.cxx2
-rw-r--r--sw/source/ui/config/fontcfg.cxx9
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/config/modcfg.cxx16
-rw-r--r--sw/source/ui/config/optcomp.cxx6
-rw-r--r--sw/source/ui/config/optload.cxx19
-rw-r--r--sw/source/ui/config/optpage.cxx110
-rw-r--r--sw/source/ui/config/prtopt.cxx2
-rw-r--r--sw/source/ui/config/uinums.cxx98
-rw-r--r--sw/source/ui/config/usrpref.cxx10
-rw-r--r--sw/source/ui/config/viewopt.cxx23
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx14
-rw-r--r--sw/source/ui/dbui/addresslistdialog.hxx6
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx22
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.hxx9
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx22
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx131
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.cxx16
-rw-r--r--sw/source/ui/dbui/dbtablepreviewdialog.hxx4
-rw-r--r--sw/source/ui/dbui/dbtree.cxx19
-rw-r--r--sw/source/ui/dbui/dbui.cxx17
-rw-r--r--sw/source/ui/dbui/mailmergechildwindow.cxx5
-rw-r--r--sw/source/ui/dbui/mailmergehelper.cxx16
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx9
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx17
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx22
-rw-r--r--sw/source/ui/dbui/mmconfigitem.cxx19
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx6
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx8
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmmergepage.cxx2
-rw-r--r--sw/source/ui/dbui/mmmergepage.hxx2
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx22
-rw-r--r--sw/source/ui/dbui/mmoutputpage.hxx4
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.hxx2
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx2
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hxx3
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/ui/dialog/addrdlg.cxx3
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx2
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx4
-rw-r--r--sw/source/ui/dialog/regionsw.cxx18
-rw-r--r--sw/source/ui/dialog/regionsw.hrc5
-rw-r--r--sw/source/ui/dialog/swdialmgr.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx6
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx1
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx77
-rw-r--r--sw/source/ui/dochdl/gloshdl.cxx31
-rw-r--r--sw/source/ui/envelp/envfmt.cxx27
-rw-r--r--sw/source/ui/envelp/envimg.cxx8
-rw-r--r--sw/source/ui/envelp/envlop1.cxx17
-rw-r--r--sw/source/ui/envelp/envprt.cxx19
-rw-r--r--sw/source/ui/envelp/label1.cxx55
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx6
-rw-r--r--sw/source/ui/envelp/labfmt.cxx35
-rw-r--r--sw/source/ui/envelp/labimg.cxx4
-rw-r--r--sw/source/ui/envelp/labprt.cxx8
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx54
-rw-r--r--sw/source/ui/envelp/syncbtn.cxx16
-rw-r--r--sw/source/ui/globdoc/globdoc.cxx8
-rw-r--r--sw/source/ui/inc/cfgitems.hxx2
-rw-r--r--sw/source/ui/inc/optpage.hxx2
77 files changed, 394 insertions, 976 deletions
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 14c500fb4d..cfd89da8e1 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 19d6ae1c29..81f36bbedf 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 787c715af9..9005eb3fbc 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 77f2cf91d2..908007f732 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 90929a46de..933d67f7a3 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 8e2a0973ba..a719191afb 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 162ac9f594..3fca1d450f 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 43816b6673..4f4423ff1d 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 f6f7a60ead..f91a439146 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 ee61ffd729..a74bcf51a9 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 b4d3065015..d1c5c52de2 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 894186d0a7..9afbcbb074 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 b3d66d03ed..4161b7a1a9 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 d7470910f9..989477af11 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 8a99c08415..adb312f1d3 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 2a5ae796da..86bdbfb0a4 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 7600d62697..ad15ef4b43 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 c92c084e69..2f07abbb6b 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 c7bc3af870..7979a4975f 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 6c274d48a4..038c8a2bf4 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 d7a4be93e0..f9ad296c19 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 1e4c07d6a9..c54d9c6ade 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 b28c0c22b8..3ac5d135bc 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 b9ada20e5b..2869142c54 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 6952ac782f..ab7e993975 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 c131ace5c0..2ec78179d2 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 af588453db..caf1baf445 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 a2896554f7..6656e40f39 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 c7118dae87..a7df045539 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 a5dfb9a8f3..cf83bcba42 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 19944e3938..c100e377e3 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 717c6ff807..c4077f8b8c 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 69d0ee77f9..e4faad79b0 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 c69d3bd81f..41d4b156ce 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)
{
- DBG_ERROR("config item not set");
+ OSL_ENSURE(false, "config item not set");
return;
}
String sErrorMessage;
@@ -543,7 +542,7 @@ void SwSendMailDialog::SendMails()
LeaveWait();
if(!bIsLoggedIn)
{
- DBG_ERROR("create error message");
+ OSL_ENSURE(false, "create error message");
return;
}
m_pImpl->xMailDispatcher.set( new MailDispatcher(xSmtpServer));
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 358eaabb13..4b3f48e924 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -59,8 +59,6 @@ using namespace ::com::sun::star::sdbcx;
using rtl::OUString;
-//using ::rtl::OUString;
-
namespace SwMailMergeHelper
{
@@ -83,11 +81,11 @@ String CallSaveAsDialog(String& rFilter)
return sRet;
}
-/*-- 20.08.2004 09:39:18---------------------------------------------------
+/*
simple address check: check for '@'
for at least one '.' after the '@'
and for at least to characters before and after the dot
- -----------------------------------------------------------------------*/
+*/
bool CheckMailAddress( const ::rtl::OUString& rMailAddress )
{
String sAddress(rMailAddress);
@@ -177,7 +175,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
}
catch(uno::Exception& )
{
- DBG_ERROR("exception caught");
+ OSL_ENSURE(false, "exception caught");
}
return xSmtpServer;
}
@@ -255,13 +253,13 @@ void SwAddressPreview::SetAddress(const ::rtl::OUString& rAddress)
sal_uInt16 SwAddressPreview::GetSelectedAddress()const
{
- DBG_ASSERT(pImpl->nSelectedAddress < pImpl->aAdresses.size(), "selection invalid");
+ OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAdresses.size(), "selection invalid");
return pImpl->nSelectedAddress;
}
void SwAddressPreview::SelectAddress(sal_uInt16 nSelect)
{
- DBG_ASSERT(pImpl->nSelectedAddress < pImpl->aAdresses.size(), "selection invalid");
+ OSL_ENSURE(pImpl->nSelectedAddress < pImpl->aAdresses.size(), "selection invalid");
pImpl->nSelectedAddress = nSelect;
// now make it visible..
sal_uInt16 nSelectRow = nSelect / pImpl->nColumns;
@@ -543,7 +541,7 @@ String SwAddressPreview::FillData(
}
catch( sdbc::SQLException& )
{
- DBG_ERROR("SQLException caught");
+ OSL_ENSURE(false, "SQLException caught");
}
}
}
@@ -569,7 +567,7 @@ SwMergeAddressItem SwAddressIterator::Next()
{
aRet.bIsColumn = true;
xub_StrLen nClose = sAddress.Search('>');
- DBG_ASSERT(nClose != STRING_NOTFOUND, "closing '>' not found");
+ OSL_ENSURE(nClose != STRING_NOTFOUND, "closing '>' not found");
if( nClose != STRING_NOTFOUND )
{
aRet.sText = sAddress.Copy(1, nClose - 1);
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index bea0597735..a9192ebdd6 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -136,7 +136,7 @@ OWizardPage* SwMailMergeWizard::createPage(WizardState _nState)
case MM_MERGEPAGE : pRet = new SwMailMergeMergePage(this); break;
case MM_OUTPUTPAGE : pRet = new SwMailMergeOutputPage(this); break;
}
- DBG_ASSERT(pRet, "no page created in ::createPage");
+ OSL_ENSURE(pRet, "no page created in ::createPage");
return pRet;
}
@@ -144,6 +144,7 @@ void SwMailMergeWizard::enterState( WizardState _nState )
{
::svt::RoadmapWizard::enterState( _nState );
/*
+
entering a page after the layoutpage requires the insertion
of greeting and address block - if not yet done
entering the merge or output page requires to create the output document
@@ -211,7 +212,7 @@ String SwMailMergeWizard::getStateDisplayName( WizardState _nState ) const
}
return sRet;
}
-/*-- 24.06.2004 09:24:45---------------------------------------------------
+/*----------------------------------------------------------------------
enables/disables pages in the roadmap depending on the current
page and state
-----------------------------------------------------------------------*/
@@ -284,7 +285,7 @@ void SwMailMergeWizard::UpdateRoadmap()
enableState( nPage, bEnable );
}
}
-/*-- 24.06.2004 09:24:45---------------------------------------------------
+/*-- --------------------------------------------------------------------
enables/disables pages in the roadmap depending on the current
page and state
-----------------------------------------------------------------------*/
@@ -304,7 +305,7 @@ void SwMailMergeWizard::updateRoadmapItemLabel( WizardState _nState )
short SwMailMergeWizard::Execute()
{
- DBG_ERROR( "SwMailMergeWizard cannot be executed via Dialog::Execute!\n"
+ OSL_ENSURE(false, "SwMailMergeWizard cannot be executed via Dialog::Execute!\n"
"It creates a thread (MailDispatcher instance) that will call"
"back to VCL apartment => deadlock!\n"
"Use Dialog::StartExecuteModal to execute the dialog!" );
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index f050f89eeb..2c7fed8c04 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -396,9 +396,7 @@ void SwSelectAddressBlockDialog::SetAddressBlocks(const uno::Sequence< ::rtl::OU
m_aPreview.SelectAddress(nSelectedAddress);
}
-/*-- 25.06.2004 10:51:36---------------------------------------------------
- return the address blocks and put the selected one to the first position
- -----------------------------------------------------------------------*/
+// return the address blocks and put the selected one to the first position
const uno::Sequence< ::rtl::OUString >& SwSelectAddressBlockDialog::GetAddressBlocks()
{
//put the selected block to the first position
@@ -888,7 +886,7 @@ void SwCustomizeAddressBlockDialog::MoveFocus( Window* pMember, bool bNext )
}
if( aMemberIter == aControls.end() )
{
- DBG_ERROR( "Window not found?" );
+ OSL_ENSURE(false, "Window not found?" );
return;
}
@@ -1460,9 +1458,8 @@ void AddressMultiLineEdit::SetText( const String& rStr )
}
}
-/*-- 25.06.2004 12:32:41---------------------------------------------------
- Insert the new entry in front of the entry at the beginning of the selection
- -----------------------------------------------------------------------*/
+
+// Insert the new entry in front of the entry at the beginning of the selection
void AddressMultiLineEdit::InsertNewEntry( const String& rStr )
{
// insert new entry after current selected one.
@@ -1660,11 +1657,7 @@ void AddressMultiLineEdit::SelectCurrentItem()
Invalidate();
}
}
-/*-- 25.06.2004 09:10:43---------------------------------------------------
- returns the address
- remove trailing spaces
- and trailing empty paragraphs
- -----------------------------------------------------------------------*/
+
String AddressMultiLineEdit::GetAddress()
{
String sRet;
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 5b6169a6c5..b6c0d0d8cd 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -42,9 +42,7 @@
#include <svl/lstner.hxx>
class SwMailMergeWizard;
class SwMailMergeConfigItem;
-/*-- 13.04.2004 15:50:37---------------------------------------------------
-
- -----------------------------------------------------------------------*/
+
class SwMailMergeAddressBlockPage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
@@ -106,9 +104,7 @@ public:
SwMailMergeWizard* GetWizard() { return m_pWizard;}
};
-/*-- 13.04.2004 15:45:31---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwSelectAddressBlockDialog : public SfxModalDialog
{
FixedText m_aSelectFT;
@@ -151,10 +147,6 @@ public:
::rtl::OUString GetCountry() const;
};
-
-/*-- 26.05.2004 11:16:25---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwCustomizeAddressBlockDialog;
class DDListBox : public SvTreeListBox
{
@@ -165,9 +157,7 @@ public:
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
};
-/*-- 26.05.2004 11:16:25---------------------------------------------------
- -----------------------------------------------------------------------*/
#define MOVE_ITEM_LEFT 1
#define MOVE_ITEM_RIGHT 2
#define MOVE_ITEM_UP 4
@@ -205,10 +195,8 @@ public:
String GetCurrentItem();
void SelectCurrentItem();
};
-/*-- 13.04.2004 15:45:31---------------------------------------------------
- Dialog is used to create custom address blocks as well as
- custom greeting lines
- -----------------------------------------------------------------------*/
+
+// Dialog is used to create custom address blocks as well as custom greeting lines
class SwRestrictedComboBox : public ComboBox
{
String sForbiddenChars;
@@ -222,7 +210,7 @@ public:
~SwRestrictedComboBox();
- void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;}
+ void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;}
};
class SwCustomizeAddressBlockDialog : public SfxModalDialog
@@ -292,9 +280,7 @@ public:
void SetAddress(const ::rtl::OUString& rAddress);
::rtl::OUString GetAddress();
};
-/*-- 13.04.2004 17:41:11---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwAssignFieldsControl;
class SwAssignFieldsDialog : public SfxModalDialog
{
diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx
index df88cdce93..331215ea72 100644
--- a/sw/source/ui/dbui/mmconfigitem.cxx
+++ b/sw/source/ui/dbui/mmconfigitem.cxx
@@ -30,7 +30,7 @@
#include "precompiled_sw.hxx"
#include <mmconfigitem.hxx>
#include <swtypes.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/sdb/XCompletedConnection.hpp>
@@ -225,7 +225,7 @@ SwMailMergeConfigItem_Impl::SwMailMergeConfigItem_Impl() :
const Sequence<OUString>& rNames = GetPropertyNames();
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++)
@@ -445,7 +445,7 @@ void lcl_ConvertFromNumbers(OUString& rBlock, const ResStringArray& rHeaders)
}
else
{
- DBG_ERROR("parse error in address block or greeting line");
+ OSL_ENSURE(false, "parse error in address block or greeting line");
}
}
else
@@ -930,7 +930,7 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
}
catch(Exception&)
{
- DBG_ERROR("exception caught in xResultSet->SetFilter()");
+ OSL_ENSURE(false, "exception caught in xResultSet->SetFilter()");
}
xRowSet->execute();
m_pImpl->xResultSet = xRowSet.get();
@@ -940,7 +940,7 @@ Reference< XResultSet> SwMailMergeConfigItem::GetResultSet() const
}
catch(Exception& )
{
- DBG_ERROR("exception caught in: SwMailMergeConfigItem::GetResultSet() ");
+ OSL_ENSURE(false, "exception caught in: SwMailMergeConfigItem::GetResultSet() ");
}
}
return m_pImpl->xResultSet;
@@ -978,7 +978,7 @@ void SwMailMergeConfigItem::SetFilter(::rtl::OUString& rFilter)
}
catch(Exception&)
{
- DBG_ERROR("exception caught in SwMailMergeConfigItem::SetFilter()");
+ OSL_ENSURE(false, "exception caught in SwMailMergeConfigItem::SetFilter()");
}
}
}
@@ -1259,9 +1259,8 @@ Sequence< ::rtl::OUString> SwMailMergeConfigItem::GetColumnAssignment(
return aRet;
}
-/*-- 21.05.2004 12:31:31---------------------------------------------------
- returns the name that is assigned as e-mail column of the current data base
- -----------------------------------------------------------------------*/
+
+// returns the name that is assigned as e-mail column of the current data base
::rtl::OUString SwMailMergeConfigItem::GetAssignedColumn(sal_uInt32 nColumn) const
{
::rtl::OUString sRet;
@@ -1655,7 +1654,7 @@ void SwMailMergeConfigItem::AddMergedDocument(SwDocMergeInfo& rInfo)
SwDocMergeInfo& SwMailMergeConfigItem::GetDocumentMergeInfo(sal_uInt32 nDocument)
{
- DBG_ASSERT(m_pImpl->aMergeInfos.size() > nDocument,"invalid document index");
+ OSL_ENSURE(m_pImpl->aMergeInfos.size() > nDocument,"invalid document index");
return m_pImpl->aMergeInfos[nDocument];
}
diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx
index 74a74417d7..a24df21519 100644
--- a/sw/source/ui/dbui/mmdocselectpage.hxx
+++ b/sw/source/ui/dbui/mmdocselectpage.hxx
@@ -34,9 +34,7 @@
#include <vcl/button.hxx>
#include <svtools/stdctrl.hxx>
class SwMailMergeWizard;
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeDocSelectPage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index cb956b7699..c8cd2d8cd7 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -210,7 +210,7 @@ void SwMailMergeGreetingsPage::UpdatePreview()
}
catch( sdbc::SQLException& )
{
- DBG_ERROR("SQLException caught");
+ OSL_ENSURE(false, "SQLException caught");
}
}
}
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index 7ebe58a0c9..687f4afdf2 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -38,9 +38,7 @@
#include <svtools/svmedit.hxx>
class SwMailMergeWizard;
-/*-- 17.05.2004 14:51:45---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwGreetingsHandler
{
friend class SwMailBodyDialog;
@@ -76,9 +74,7 @@ class SwGreetingsHandler
void Contains(sal_Bool bContainsGreeting);
virtual void UpdatePreview();
};
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeGreetingsPage : public svt::OWizardPage,
public SwGreetingsHandler
{
@@ -127,9 +123,7 @@ public:
~SwMailMergeGreetingsPage();
};
-/*-- 17.05.2004 14:45:43---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailBodyDialog : public SfxModalDialog, public SwGreetingsHandler
{
CheckBox m_aGreetingLineCB;
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 2c40af46c6..0bcda18f4f 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -320,7 +320,7 @@ SwFrmFmt* SwMailMergeLayoutPage::InsertAddressFrame(
rShell.NewFlyFrm(aSet, sal_True );
SwFrmFmt* pRet = rShell.GetFlyFrmFmt();
- ASSERT( pRet, "Fly not inserted" );
+ OSL_ENSURE( pRet, "Fly not inserted" );
rShell.UnSelectFrm();
const Sequence< ::rtl::OUString> aBlocks = rConfigItem.GetAddressBlocks();
@@ -563,7 +563,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
// Female: [database.sGenderColumn] != "rFemaleGenderValue" && [database.NameColumn]
// Male: [database.sGenderColumn] == "rFemaleGenderValue" && [database.rGenderColumn]
// Neutral: [database.sNameColumn]
- DBG_ASSERT(sGenderColumn.Len() && rFemaleGenderValue.getLength(),
+ OSL_ENSURE(sGenderColumn.Len() && rFemaleGenderValue.getLength(),
"gender settings not available - how to form the condition?");
//column used as lastname
for(sal_Int8 eGender = SwMailMergeConfigItem::FEMALE;
@@ -672,7 +672,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
//put the cursor to the start of the paragraph
rShell.SttPara();
- DBG_ASSERT(0 == rShell.GetTableFmt(), "What to do with a table here?");
+ OSL_ENSURE(0 == rShell.GetTableFmt(), "What to do with a table here?");
}
IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
@@ -688,7 +688,7 @@ IMPL_LINK(SwMailMergeLayoutPage, PreviewLoadedHdl_Impl, void*, EMPTYARG)
SwXTextDocument* pXDoc = reinterpret_cast<SwXTextDocument*>(xDocTunnel->getSomething(SwXTextDocument::getUnoTunnelId()));
SwDocShell* pDocShell = pXDoc->GetDocShell();
m_pExampleWrtShell = pDocShell->GetWrtShell();
- DBG_ASSERT(m_pExampleWrtShell, "No SwWrtShell found!");
+ OSL_ENSURE(m_pExampleWrtShell, "No SwWrtShell found!");
if(!m_pExampleWrtShell)
return 0;
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index 8e970ae8cd..c9e24cd128 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -43,9 +43,7 @@ class SwWrtShell;
class SwView;
namespace com{ namespace sun{ namespace star{ namespace beans{ class XPropertySet;}}}}
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeLayoutPage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx
index 4bf6053d4b..ed4d2585b0 100644
--- a/sw/source/ui/dbui/mmmergepage.cxx
+++ b/sw/source/ui/dbui/mmmergepage.cxx
@@ -97,7 +97,7 @@ IMPL_LINK( SwMailMergeMergePage, FindHdl_Impl, PushButton*, EMPTYARG)
aSearchItem.SetBackward(m_aBackwardsCB.IsChecked());
SwView* pTargetView = m_pWizard->GetConfigItem().GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(pTargetView)
{
pTargetView->GetViewFrame()->GetDispatcher()->Execute(
diff --git a/sw/source/ui/dbui/mmmergepage.hxx b/sw/source/ui/dbui/mmmergepage.hxx
index 3981e3606c..6f512c77ce 100644
--- a/sw/source/ui/dbui/mmmergepage.hxx
+++ b/sw/source/ui/dbui/mmmergepage.hxx
@@ -35,9 +35,7 @@
#include <mailmergehelper.hxx>
#include <actctrl.hxx>
class SwMailMergeWizard;
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeMergePage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 7938ccc81d..77b1a92f3c 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -400,7 +400,7 @@ void SwMailMergeOutputPage::ActivatePage()
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
SwView* pTargetView = rConfigItem.GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(pTargetView)
{
SfxPrinter* pPrinter = pTargetView->GetWrtShell().getIDocumentDeviceAccess()->getPrinter( true );
@@ -412,7 +412,7 @@ void SwMailMergeOutputPage::ActivatePage()
m_aPrinterLB.SelectEntry( rConfigItem.GetSelectedPrinter() );
SwView* pSourceView = rConfigItem.GetSourceView();
- DBG_ASSERT(pSourceView, "no source view exists");
+ OSL_ENSURE(pSourceView, "no source view exists");
if(pSourceView)
{
SwDocShell* pDocShell = pSourceView->GetDocShell();
@@ -620,7 +620,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
SwView* pSourceView = rConfigItem.GetSourceView();
- DBG_ASSERT( pSourceView, "source view missing");
+ OSL_ENSURE( pSourceView, "source view missing");
if(pSourceView)
{
SfxViewFrame* pSourceViewFrm = pSourceView->GetViewFrame();
@@ -666,7 +666,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton)
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
SwView* pTargetView = rConfigItem.GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(!pTargetView)
return 0;
@@ -892,7 +892,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterChangeHdl_Impl, ListBox*, pBox)
IMPL_LINK(SwMailMergeOutputPage, PrintHdl_Impl, PushButton*, EMPTYARG)
{
SwView* pTargetView = m_pWizard->GetConfigItem().GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(!pTargetView)
return 0;
@@ -1005,7 +1005,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
//get the composed document
SwView* pTargetView = rConfigItem.GetTargetView();
- DBG_ASSERT(pTargetView, "no target view exists");
+ OSL_ENSURE(pTargetView, "no target view exists");
if(!pTargetView)
return 0;
@@ -1126,7 +1126,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
}
SfxStringItem aFilterName( SID_FILTER_NAME, pSfxFlt->GetFilterName() );
String sEMailColumn = m_aMailToLB.GetSelectEntry();
- DBG_ASSERT( sEMailColumn.Len(), "No email column selected");
+ OSL_ENSURE( sEMailColumn.Len(), "No email column selected");
Reference< sdbcx::XColumnsSupplier > xColsSupp( rConfigItem.GetResultSet(), UNO_QUERY);
Reference < container::XNameAccess> xColAccess = xColsSupp.is() ? xColsSupp->getColumns() : 0;
if(!sEMailColumn.Len() || !xColAccess.is() || !xColAccess->hasByName(sEMailColumn))
@@ -1219,12 +1219,12 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
}
xTempDocShell->DoClose();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
sal_Int32 nTarget =
#endif
rConfigItem.MoveResultSet(rInfo.nDBRow);
- DBG_ASSERT( nTarget == rInfo.nDBRow, "row of current document could not be selected");
- DBG_ASSERT( sEMailColumn.Len(), "No email column selected");
+ OSL_ENSURE( nTarget == rInfo.nDBRow, "row of current document could not be selected");
+ OSL_ENSURE( sEMailColumn.Len(), "No email column selected");
::rtl::OUString sEMail = lcl_GetColumnValueOf(sEMailColumn, xColAccess);
SwMailDescriptor aDesc;
aDesc.sEMail = sEMail;
@@ -1239,7 +1239,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
pInStream->SetStreamCharSet( eEncoding );
else
{
- DBG_ERROR("no output file created?");
+ OSL_ENSURE(false, "no output file created?");
continue;
}
ByteString sLine;
diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx
index 61349d7405..11f5daf4c6 100644
--- a/sw/source/ui/dbui/mmoutputpage.hxx
+++ b/sw/source/ui/dbui/mmoutputpage.hxx
@@ -50,9 +50,7 @@ namespace com{ namespace sun{ namespace star{
class XMailMessage;
}
}}}
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeOutputPage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
@@ -145,9 +143,7 @@ public:
~SwMailMergeOutputPage();
};
-/*-- 21.05.2004 12:48:50---------------------------------------------------
- -----------------------------------------------------------------------*/
struct SwMailDescriptor
{
::rtl::OUString sEMail;
diff --git a/sw/source/ui/dbui/mmoutputtypepage.hxx b/sw/source/ui/dbui/mmoutputtypepage.hxx
index 64e0eaa7d5..d79aad5eff 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.hxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.hxx
@@ -33,9 +33,7 @@
#include <svtools/stdctrl.hxx>
#include <mailmergehelper.hxx>
class SwMailMergeWizard;
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergeOutputTypePage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx
index 9f0edbc21d..18f8f20d7a 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.hxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.hxx
@@ -36,9 +36,7 @@
#include "actctrl.hxx"
class SwMailMergeWizard;
-/*-- 02.04.2004 09:21:06---------------------------------------------------
- -----------------------------------------------------------------------*/
class SwMailMergePrepareMergePage : public svt::OWizardPage
{
SwBoldFixedInfo m_aHeaderFI;
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index f0bd244a5d..1e31befb3d 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -167,7 +167,7 @@ IMPL_LINK(SwSelectDBTableDialog, PreviewHdl, PushButton*, pButton)
Reference<XPropertySet> xPrSet(xSource, UNO_QUERY);
xPrSet->getPropertyValue(C2U("Name")) >>= sDataSourceName;
}
- DBG_ASSERT(sDataSourceName.getLength(), "no data source found");
+ OSL_ENSURE(sDataSourceName.getLength(), "no data source found");
Sequence<PropertyValue> aProperties(5);
PropertyValue* pProperties = aProperties.getArray();
pProperties[0].Name = C2U("DataSourceName");
diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx
index 4292df70ec..a3398936f2 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.hxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.hxx
@@ -40,9 +40,6 @@ namespace com{namespace sun{namespace star{
}
}}}
-/*-- 08.04.2004 14:04:39---------------------------------------------------
-
- -----------------------------------------------------------------------*/
class SwSelectDBTableDialog : public SfxModalDialog
{
FixedText m_aSelectFI;
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index b4d690b481..0bf23a60a6 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -684,7 +684,7 @@ bool SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM
case SHELL_MODE_TABLE_TEXT:
case SHELL_MODE_TABLE_LIST_TEXT:
case SHELL_MODE_DRAWTEXT:
- DBG_ERROR("text already active in SwSpellDialogChildWindow::MakeTextSelection_Impl()");
+ OSL_ENSURE(false, "text already active in SwSpellDialogChildWindow::MakeTextSelection_Impl()");
break;
case SHELL_MODE_FRAME:
diff --git a/sw/source/ui/dialog/addrdlg.cxx b/sw/source/ui/dialog/addrdlg.cxx
index 734960f431..d7a50996c3 100644
--- a/sw/source/ui/dialog/addrdlg.cxx
+++ b/sw/source/ui/dialog/addrdlg.cxx
@@ -42,9 +42,8 @@ SwAddrDlg::SwAddrDlg(Window* pParent, const SfxItemSet& rSet ) :
SfxSingleTabDialog(pParent, rSet, 0)
{
- // TabPage erzeugen
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SFXPAGE_GENERAL );
if ( fnCreatePage )
{
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 7fa8dadc0d..28e96386b8 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -213,7 +213,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
delete pPrt;
}
- // initialisiere Sprache
+ // initialise language
{
if( !aOpt.GetLanguage() )
{
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 105ff4ca4e..bd2711b5a2 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -46,7 +46,7 @@
#include <docstdlg.hxx>
#include <modcfg.hxx>
-// fuer Statistikfelder
+// for statistics fields
#include <fldmgr.hxx>
#include <fldbas.hxx>
@@ -144,7 +144,7 @@ void SwDocStatPage::Update()
else if ( pVSh->ISA(SwPagePreView) )
pSh = ((SwPagePreView*)pVSh)->GetViewShell();
- ASSERT( pSh, "Shell not found" );
+ OSL_ENSURE( pSh, "Shell not found" );
SwWait aWait( *pSh->GetDoc()->GetDocShell(), TRUE );
pSh->StartAction();
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 1bf278395d..bb7c46be72 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -94,10 +94,10 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
// Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsertSectionTabDialog* aTabDlg = pFact->CreateInsertSectionTabDialog( DLG_INSERT_SECTION,
&GetView().GetViewFrame()->GetWindow(), aSet , rSh);
- DBG_ASSERT(aTabDlg, "Dialogdiet fail!");
+ OSL_ENSURE(aTabDlg, "Dialogdiet fail!");
aTabDlg->Execute();
rReq.Ignore();
delete aTabDlg;
@@ -143,17 +143,15 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
const BOOL bProtect = SFX_ITEM_SET ==
pSet->GetItemState(FN_PARAM_REGION_PROTECT, TRUE, &pItem)?
(BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
const BOOL bEditInReadonly = SFX_ITEM_SET ==
pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, TRUE, &pItem)?
(BOOL)((const SfxBoolItem *)pItem)->GetValue():FALSE;
- // <--
aSection.SetProtectFlag(bProtect);
aSection.SetHidden(bHidden);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aSection.SetEditInReadonlyFlag(bEditInReadonly);
- // <--
if(SFX_ITEM_SET ==
pSet->GetItemState(FN_PARAM_REGION_CONDITION, TRUE, &pItem))
@@ -207,10 +205,10 @@ IMPL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData*, pSect )
// Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsertSectionTabDialog* aTabDlg = pFact->CreateInsertSectionTabDialog( DLG_INSERT_SECTION,
&pThis->GetView().GetViewFrame()->GetWindow(),aSet , *pThis);
- DBG_ASSERT(aTabDlg, "Dialogdiet fail!");
+ OSL_ENSURE(aTabDlg, "Dialogdiet fail!");
aTabDlg->SetSectionData(*pSectionData);
aTabDlg->Execute();
@@ -237,10 +235,10 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
if(bStart)
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractEditRegionDlg* pEditRegionDlg = pFact->CreateEditRegionDlg( MD_EDIT_REGION,
pParentWin, rWrtShell);
- DBG_ASSERT(pEditRegionDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pEditRegionDlg, "Dialogdiet fail!");
if(pItem && pItem->ISA(SfxStringItem))
{
pEditRegionDlg->SelectSection(((const SfxStringItem*)pItem)->GetValue());
diff --git a/sw/source/ui/dialog/regionsw.hrc b/sw/source/ui/dialog/regionsw.hrc
index d396053ab2..72c85eb080 100644
--- a/sw/source/ui/dialog/regionsw.hrc
+++ b/sw/source/ui/dialog/regionsw.hrc
@@ -84,12 +84,11 @@
#define FL_FTN 53
#define IL_BITMAPS 54
#define ILH_BITMAPS 55
-// --> FME 2004-06-22 #114856# edit in readonly sections
+// #114856# edit in readonly sections
#define FL_PROPERTIES 56
#define CB_EDIT_IN_READONLY 57
-// <--
-/* Globale Resourcen */
+/* global resources */
#define STR_REG_DUPLICATE (RC_REGIONSW_BEGIN+6)
#define STR_INFO_DUPLICATE (RC_REGIONSW_BEGIN+7)
diff --git a/sw/source/ui/dialog/swdialmgr.cxx b/sw/source/ui/dialog/swdialmgr.cxx
index 5cd1adb816..7ff123857d 100644
--- a/sw/source/ui/dialog/swdialmgr.cxx
+++ b/sw/source/ui/dialog/swdialmgr.cxx
@@ -40,7 +40,7 @@
#include <sfx2/app.hxx>
//copy from core\bastyp\swtypes.cxx
-String aEmptyStr; // Konstante Strings
+String aEmptyStr; // constant strings
ResMgr* pSwResMgr=0;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 0247680dfa..06f3604132 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -583,13 +583,13 @@ long AbstractMailMergeWizard_Impl::GetResult()
return pDlg->GetResult();
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, pDialog )
#else
IMPL_LINK( AbstractMailMergeWizard_Impl, EndDialogHdl, SwMailMergeWizard*, EMPTYARG )
#endif
{
- DBG_ASSERT( pDialog == pDlg, "wrong dialog passed to EndDialogHdl!" );
+ OSL_ENSURE( pDialog == pDlg, "wrong dialog passed to EndDialogHdl!" );
aEndDlgHdl.Call( this );
aEndDlgHdl = Link();
@@ -1624,7 +1624,7 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( USHORT nId )
break;
case RID_SW_TP_OPTTEST_PAGE :
case TP_OPTTEST_PAGE :
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
pRet = SwTestTabPage::Create;
#endif
break;
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 864623140f..9811b09f59 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -28,7 +28,6 @@
#ifndef _SW_DLGFACT_HXX
#define _SW_DLGFACT_HXX
-// include ---------------------------------------------------------------
#include "swabstdlg.hxx"
class SwSaveLabelDlg;
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 053d78b383..3505d4a46e 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -376,10 +376,9 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aConditionFT ( this, SW_RES( FT_CONDITION ) ),
aConditionED ( this, SW_RES( ED_CONDITION ) ),
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aPropertiesFL ( this, SW_RES( FL_PROPERTIES ) ),
aEditInReadonlyCB ( this, SW_RES( CB_EDIT_IN_READONLY ) ),
- // <--
aOK ( this, SW_RES( PB_OK ) ),
aCancel ( this, SW_RES( PB_CANCEL ) ),
@@ -408,9 +407,8 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aPasswdCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangePasswdHdl));
aPasswdPB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangePasswdHdl));
aHideCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangeHideHdl));
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aEditInReadonlyCB.SetClickHdl ( LINK( this, SwEditRegionDlg, ChangeEditInReadonlyHdl));
- // <--
aOptionsPB.Show();
aOptionsPB.SetClickHdl ( LINK( this, SwEditRegionDlg, OptionsHdl));
@@ -441,11 +439,10 @@ SwEditRegionDlg::SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh )
aDDECB.SetClickHdl ( LINK( this, SwEditRegionDlg, DDEHdl ));
- //Ermitteln der vorhandenen Bereiche
pCurrSect = rSh.GetCurrSection();
RecurseList( 0, 0 );
- //falls der Cursor nicht in einem Bereich steht,
- //wird immer der erste selektiert
+ // if the cursor is not in a region
+ //the first one will always be selected
if( !aTree.FirstSelected() && aTree.First() )
aTree.Select( aTree.First() );
aTree.Show();
@@ -581,13 +578,10 @@ USHORT SwEditRegionDlg::FindArrPos(const SwSectionFmt* pFmt )
if (pFmt==&rSh.GetSectionFmt(i))
return i;
- DBG_ERROR( "SectionFormat nicht in der Liste" );
+ OSL_ENSURE(false, "SectionFormat not on the list" );
return USHRT_MAX;
}
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
SwEditRegionDlg::~SwEditRegionDlg( )
{
SvLBoxEntry* pEntry = aTree.First();
@@ -629,9 +623,9 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bDontCheckPasswd = sal_True;
SvLBoxEntry* pEntry=pBox->FirstSelected();
aHideCB .Enable(TRUE);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aEditInReadonlyCB.Enable(TRUE);
- // <--
+
aProtectCB .Enable(TRUE);
aFileCB .Enable(TRUE);
UNO_NMSPC::Sequence <sal_Int8> aCurPasswd;
@@ -639,18 +633,18 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
{
aHideCB.EnableTriState( TRUE );
aProtectCB.EnableTriState( TRUE );
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aEditInReadonlyCB.EnableTriState ( TRUE );
- // <--
+
aFileCB.EnableTriState( TRUE );
bool bHiddenValid = true;
bool bProtectValid = true;
bool bConditionValid = true;
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
bool bEditInReadonlyValid = true;
bool bEditInReadonly = true;
- // <--
+
bool bHidden = true;
bool bProtect = true;
String sCondition;
@@ -668,9 +662,9 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
sCondition = rData.GetCondition();
bHidden = rData.IsHidden();
bProtect = rData.IsProtectFlag();
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
bEditInReadonly = rData.IsEditInReadonlyFlag();
- // <--
+
bFile = (rData.GetType() != CONTENT_SECTION);
aCurPasswd = rData.GetPassword();
}
@@ -681,10 +675,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bConditionValid = FALSE;
bHiddenValid = (bHidden == rData.IsHidden());
bProtectValid = (bProtect == rData.IsProtectFlag());
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
bEditInReadonlyValid =
(bEditInReadonly == rData.IsEditInReadonlyFlag());
- // <--
+
bFileValid = (bFile ==
(rData.GetType() != CONTENT_SECTION));
bPasswdValid = (aCurPasswd == rData.GetPassword());
@@ -697,10 +691,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
bHidden ? STATE_CHECK : STATE_NOCHECK);
aProtectCB.SetState( !bProtectValid ? STATE_DONTKNOW :
bProtect ? STATE_CHECK : STATE_NOCHECK);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aEditInReadonlyCB.SetState( !bEditInReadonlyValid ? STATE_DONTKNOW :
bEditInReadonly ? STATE_CHECK : STATE_NOCHECK);
- // <--
+
aFileCB.SetState(!bFileValid ? STATE_DONTKNOW :
bFile ? STATE_CHECK : STATE_NOCHECK);
@@ -781,11 +775,10 @@ IMPL_LINK( SwEditRegionDlg, GetFirstEntryHdl, SvTreeListBox *, pBox )
? STATE_CHECK : STATE_NOCHECK);
aProtectCB.Enable();
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aEditInReadonlyCB.SetState((rData.IsEditInReadonlyFlag())
? STATE_CHECK : STATE_NOCHECK);
aEditInReadonlyCB.Enable();
- // <--
BOOL bPasswdEnabled = aProtectCB.IsChecked();
aPasswdCB.Enable(bPasswdEnabled);
@@ -801,9 +794,9 @@ IMPL_LINK( SwEditRegionDlg, DeselectHdl, SvTreeListBox *, pBox )
{
aHideCB .Enable(FALSE);
aProtectCB .Enable(FALSE);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aEditInReadonlyCB.Enable(FALSE);
- // <--
+
aPasswdCB .Enable(FALSE);
aPasswdCB .Enable(FALSE);
aConditionFT .Enable(FALSE);
@@ -1044,15 +1037,14 @@ IMPL_LINK( SwEditRegionDlg, ChangeDismissHdl, CheckBox *, EMPTYARG )
aProtectCB. Enable(FALSE);
aPasswdCB. Enable(FALSE);
aHideCB. Enable(FALSE);
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aEditInReadonlyCB.Enable(FALSE);
aEditInReadonlyCB.SetState(STATE_NOCHECK);
- // <--
aProtectCB. SetState(STATE_NOCHECK);
aPasswdCB. Check(FALSE);
aHideCB. SetState(STATE_NOCHECK);
aFileCB. Check(FALSE);
- //sonst liegt der Focus auf dem HelpButton
+ // otherwise the focus would be on HelpButton
aOK.GrabFocus();
UseFileHdl(&aFileCB);
}
@@ -1109,7 +1101,6 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox )
{
aDDECB.Check(FALSE);
DDEHdl(&aDDECB);
-// aFileNameED.SetText(aEmptyStr);
aSubRegionED.SetText(aEmptyStr);
}
}
@@ -1146,9 +1137,6 @@ IMPL_LINK( SwEditRegionDlg, FileSearchHdl, PushButton *, EMPTYARG )
return 0;
}
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
IMPL_LINK( SwEditRegionDlg, OptionsHdl, PushButton *, EMPTYARG )
{
if(!CheckPasswd())
@@ -1303,9 +1291,6 @@ IMPL_LINK( SwEditRegionDlg, FileNameHdl, Edit *, pEdit )
return 0;
}
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
IMPL_LINK( SwEditRegionDlg, DDEHdl, CheckBox*, pBox )
{
if(!CheckPasswd(pBox))
@@ -1625,10 +1610,9 @@ short SwInsertSectionTabDialog::Ok()
m_pSectionData->IsHidden()));
aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_PROTECT,
m_pSectionData->IsProtectFlag()));
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aRequest.AppendItem(SfxBoolItem( FN_PARAM_REGION_EDIT_IN_READONLY,
m_pSectionData->IsEditInReadonlyFlag()));
- // <--
String sLinkFileName( m_pSectionData->GetLinkFileName() );
aRequest.AppendItem(SfxStringItem( FN_PARAM_1, sLinkFileName.GetToken( 0, sfx2::cTokenSeperator )));
@@ -1663,10 +1647,9 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
aHideCB ( this, SW_RES( CB_HIDE ) ),
aConditionFT ( this, SW_RES( FT_CONDITION ) ),
aConditionED ( this, SW_RES( ED_CONDITION ) ),
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aPropertiesFL ( this, SW_RES( FL_PROPERTIES ) ),
aEditInReadonlyCB ( this, SW_RES( CB_EDIT_IN_READONLY ) ),
- // <--
m_pWrtSh(0),
m_pDocInserter(NULL),
@@ -1678,9 +1661,8 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(
aPasswdCB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, ChangePasswdHdl));
aPasswdPB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, ChangePasswdHdl));
aHideCB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, ChangeHideHdl));
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aEditInReadonlyCB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, ChangeEditInReadonlyHdl));
- // <--
aFileCB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, UseFileHdl ));
aFilePB.SetClickHdl ( LINK( this, SwInsertSectionTabPage, FileSearchHdl ));
aCurName.SetModifyHdl ( LINK( this, SwInsertSectionTabPage, NameEditHdl));
@@ -1729,9 +1711,7 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
aCurName.SetText( rSh.GetUniqueSectionName() );
}
}
-/* -----------------21.05.99 10:32-------------------
- *
- * --------------------------------------------------*/
+
BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
{
SwSectionData aSection(CONTENT_SECTION, aCurName.GetText());
@@ -1739,9 +1719,9 @@ BOOL SwInsertSectionTabPage::FillItemSet( SfxItemSet& )
BOOL bProtected = aProtectCB.IsChecked();
aSection.SetProtectFlag(bProtected);
aSection.SetHidden(aHideCB.IsChecked());
- // --> FME 2004-06-22 #114856# edit in readonly sections
+ // #114856# edit in readonly sections
aSection.SetEditInReadonlyFlag(aEditInReadonlyCB.IsChecked());
- // <--
+
if(bProtected)
{
aSection.SetPassword(m_aNewPasswd);
@@ -2172,7 +2152,6 @@ SfxTabPage* SwSectionFtnEndTabPage::Create( Window* pParent,
IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
{
-// pBox->EnableTriState( FALSE );
BOOL bFoot = &aFtnNtAtTextEndCB == pBox || &aFtnNtNumCB == pBox ||
&aFtnNtNumFmtCB == pBox ;
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index 4dd9d0f162..ba5de0746e 100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -79,7 +79,7 @@ using namespace ::com::sun::star;
const short RET_EDIT = 100;
-// PUBLIC METHODES -------------------------------------------------------
+// PUBLIC METHODS -------------------------------------------------------
struct TextBlockInfo_Impl
{
String sTitle;
@@ -97,10 +97,10 @@ SV_IMPL_REF( SwDocShell )
void SwGlossaryHdl::GlossaryDlg()
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractGlossaryDlg* pDlg = pFact->CreateGlossaryDlg( DLG_RENAME_GLOS,
pViewFrame, this, pWrtShell);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
String sName, sShortName;
if( RET_EDIT == pDlg->Execute() )
@@ -212,9 +212,6 @@ BOOL SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
return rStatGlossaries.NewGroupDoc(rGrpName, rTitle);
}
-/* -----------------23.11.98 13:10-------------------
- * Umbenennen eines Textbausteins
- * --------------------------------------------------*/
BOOL SwGlossaryHdl::RenameGroup(const String & rOld, String& rNew, const String& rNewTitle)
{
BOOL bRet = FALSE;
@@ -260,7 +257,7 @@ BOOL SwGlossaryHdl::CopyOrMove( const String& rSourceGroupName, String& rSource
//Der Index muss hier ermittelt werden, weil rSourceShortName in CopyBlock evtl veraendert wird
USHORT nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
- DBG_ASSERT(USHRT_MAX != nDeleteIdx, "Eintrag nicht gefunden");
+ OSL_ENSURE(USHRT_MAX != nDeleteIdx, "entry not found");
ULONG nRet = pSourceGroup->CopyBlock( *pDestGroup, rSourceShortName, rLongName );
if(!nRet && bMove)
{
@@ -303,13 +300,13 @@ USHORT SwGlossaryHdl::GetGlossaryCnt()
String SwGlossaryHdl::GetGlossaryName( USHORT nId )
{
- ASSERT(nId < GetGlossaryCnt(), Textbausteinarray ueberindiziert.);
+ OSL_ENSURE(nId < GetGlossaryCnt(), "Textbausteinarray ueberindiziert.");
return pCurGrp->GetLongName( nId );
}
String SwGlossaryHdl::GetGlossaryShortName(USHORT nId)
{
- ASSERT(nId < GetGlossaryCnt(), Textbausteinarray ueberindiziert.);
+ OSL_ENSURE(nId < GetGlossaryCnt(), "Textbausteinarray ueberindiziert.");
return pCurGrp->GetShortName( nId );
}
@@ -423,12 +420,12 @@ BOOL SwGlossaryHdl::DelGlossary(const String &rShortName)
------------------------------------------------------------------------*/
BOOL SwGlossaryHdl::ExpandGlossary()
{
- ASSERT(pWrtShell->CanInsert(), illegal);
+ OSL_ENSURE(pWrtShell->CanInsert(), "illegal");
SwTextBlocks *pGlossary;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossaryGetCurrGroup fnGetCurrGroup = pFact->GetGlossaryCurrGroupFunc( DLG_RENAME_GLOS );
- DBG_ASSERT(fnGetCurrGroup, "Dialogdiet fail!");
+ OSL_ENSURE(fnGetCurrGroup, "Dialogdiet fail!");
String sGroupName( (*fnGetCurrGroup)() );
if(STRING_NOTFOUND == sGroupName.Search(GLOS_DELIM))
FindGroupName(sGroupName);
@@ -449,7 +446,7 @@ BOOL SwGlossaryHdl::ExpandGlossary()
pWrtShell->LeaveBlockMode();
else if(pWrtShell->IsExtMode())
pWrtShell->LeaveExtMode();
- // Wort selektieren
+ // select word
pWrtShell->SelNearestWrd();
// Wort erfragen
if(pWrtShell->IsSelection())
@@ -512,10 +509,10 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstarctSwSelGlossaryDlg* pDlg = pFact->CreateSwSelGlossaryDlg( 0, aShortName, DLG_SEL_GLOS );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
for(USHORT i = 0; i < aFoundArr.Count(); ++i)
{
TextBlockInfo_Impl* pData = aFoundArr.GetObject(i);
@@ -541,7 +538,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
}
}
- // nicht gefunden
+ // not found
if( nFound == (USHORT) -1 )
{
if( !bCancel )
@@ -603,7 +600,7 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
------------------------------------------------------------------------*/
BOOL SwGlossaryHdl::InsertGlossary(const String &rName)
{
- ASSERT(pWrtShell->CanInsert(), illegal);
+ OSL_ENSURE(pWrtShell->CanInsert(), "illegal");
SwTextBlocks *pGlos =
pCurGrp? pCurGrp: rStatGlossaries.GetGroupDoc(aCurGrp);
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 3c46da7eab..26389566dd 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -33,9 +33,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
-
#include <hintids.hxx>
#include <tools/pstm.hxx>
@@ -112,7 +109,7 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
FreeResource();
SetExchangeSupport();
- // Metriken
+ // Metrics
FieldUnit aMetric = ::GetDfltMetric(FALSE);
SetMetric(aAddrLeftField, aMetric);
SetMetric(aAddrTopField, aMetric);
@@ -126,7 +123,7 @@ SwEnvFmtPage::SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet) :
aAddrEditButton.SetPopupMenu(::pMenu);
aSendEditButton.SetPopupMenu(::pMenu);
- // Handler installieren
+ // Install handlers
Link aLk = LINK(this, SwEnvFmtPage, ModifyHdl);
aAddrLeftField .SetUpHdl( aLk );
aAddrTopField .SetUpHdl( aLk );
@@ -229,14 +226,14 @@ IMPL_LINK_INLINE_END( SwEnvFmtPage, ModifyHdl, Edit *, pEdit )
IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
{
SwWrtShell* pSh = GetParent()->pSh;
- ASSERT(pSh, "Shell fehlt");
+ OSL_ENSURE(pSh, "Shell missing");
// Collection-Ptr ermitteln
BOOL bSender = pButton != &aAddrEditButton;
SwTxtFmtColl* pColl = pSh->GetTxtCollFromPool( static_cast< USHORT >(
bSender ? RES_POOLCOLL_SENDADRESS : RES_POOLCOLL_JAKETADRESS));
- ASSERT(pColl, "Text-Collection fehlt");
+ OSL_ENSURE(pColl, "Text collection missing");
switch (pButton->GetCurItemId())
{
@@ -262,10 +259,10 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
aTmpSet.ClearItem( RES_BACKGROUND );
SwAbstractDialogFactory* pFact = swui::GetFactory();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( GetParent(), pSh->GetView(), aTmpSet, DLG_CHAR ,&pColl->GetName() );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
SfxItemSet aOutputSet( *pDlg->GetOutputItemSet() );
@@ -291,7 +288,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
// Damit die Tabulatoren nicht uebergebuegelt werden:
SfxAllItemSet aTmpSet(*pCollSet);
- // Tabulatoren, DefaultTabs ins ItemSet Stecken
+ // Insert tabs, default tabs ito ItemSet
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
pSh->GetView().GetCurShell()->GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
@@ -299,7 +296,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
aTmpSet.Put( aDefDistItem );
- // Aktueller Tab
+ // Current tab
SfxUInt16Item aTabPos( SID_ATTR_TABSTOP_POS, 0 );
aTmpSet.Put( aTabPos );
@@ -320,6 +317,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
const SfxPoolItem* pItem = 0;
SfxItemSet* pOutputSet = (SfxItemSet*)pDlg->GetOutputItemSet();
USHORT nNewDist;
+
if( SFX_ITEM_SET == pOutputSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS,
FALSE, &pItem ) &&
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
@@ -331,7 +329,6 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
}
if( pOutputSet->Count() )
{
- //pColl->SetAttr( *pOutputSet );
pCollSet->Put(*pOutputSet);
}
}
@@ -487,7 +484,7 @@ void SwEnvFmtPage::SetMinMax()
aSendTopField .SetMin((long) 100 * (566), FUNIT_TWIP);
aSendTopField .SetMax((long) 100 * (GetFldVal(aAddrTopField ) - 2 * 566), FUNIT_TWIP);
- // First und Last
+ // First and last
aAddrLeftField.SetFirst(aAddrLeftField.GetMin());
aAddrLeftField.SetLast (aAddrLeftField.GetMax());
aAddrTopField .SetFirst(aAddrTopField .GetMin());
@@ -497,7 +494,7 @@ void SwEnvFmtPage::SetMinMax()
aSendTopField .SetFirst(aSendTopField .GetMin());
aSendTopField .SetLast (aSendTopField .GetMax());
- // Fields neu formatieren
+ // Reformat fields
aAddrLeftField .Reformat();
aAddrTopField .Reformat();
aSendLeftField .Reformat();
@@ -567,7 +564,7 @@ void __EXPORT SwEnvFmtPage::Reset(const SfxItemSet& rSet)
if (aIDs[i] == (USHORT)ePaper)
aSizeFormatBox.SelectEntryPos(i);
- // Die MetricFields
+ // Metric fields
SetFldVal(aAddrLeftField, rItem.lAddrFromLeft);
SetFldVal(aAddrTopField , rItem.lAddrFromTop );
SetFldVal(aSendLeftField, rItem.lSendFromLeft);
diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx
index 722b896b34..a0a06419a1 100644
--- a/sw/source/ui/envelp/envimg.cxx
+++ b/sw/source/ui/envelp/envimg.cxx
@@ -191,7 +191,7 @@ SwEnvCfgItem::SwEnvCfgItem() :
Sequence<Any> aValues = GetProperties(aNames);
EnableNotification(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++)
@@ -303,8 +303,10 @@ Sequence<rtl::OUString> SwEnvCfgItem::GetPropertyNames()
const int nCount = 13;
Sequence<OUString> aNames(nCount);
OUString* pNames = aNames.getArray();
+
for(int i = 0; i < nCount; i++)
pNames[i] = OUString::createFromAscii(aPropNames[i]);
+
return aNames;
}
@@ -327,7 +329,7 @@ bool SwEnvItem::QueryValue( Any& rVal, BYTE nMemberId ) const
case MID_ENV_SHIFT_RIGHT : rVal <<= lShiftRight; break;
case MID_ENV_SHIFT_DOWN : rVal <<= lShiftDown; break;
default:
- DBG_ERROR("Wrong memberId");
+ OSL_ENSURE(false, "Wrong memberId");
bRet = false;
}
return bRet;
@@ -359,7 +361,7 @@ bool SwEnvItem::PutValue(const Any& rVal, BYTE nMemberId)
case MID_ENV_SHIFT_RIGHT : bRet = (rVal >>= lShiftRight); break;
case MID_ENV_SHIFT_DOWN : bRet = (rVal >>= lShiftDown); break;
default:
- DBG_ERROR("Wrong memberId");
+ OSL_ENSURE(false,"Wrong memberId");
}
return bRet;
}
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 221dd3c50f..6c5bac1af5 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -32,8 +32,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#include "dbmgr.hxx"
#include <sfx2/app.hxx>
#include <vcl/msgbox.hxx>
@@ -116,7 +114,7 @@ void SwEnvPreview::Paint(const Rectangle &)
SetFillColor( aBack );
DrawRect(Rectangle(Point(nX, nY), Size(nW, nH)));
- // Absender
+ // Sender
if (rItem.bSend)
{
long nSendX = nX + (USHORT) (f * rItem.lSendFromLeft),
@@ -128,7 +126,7 @@ void SwEnvPreview::Paint(const Rectangle &)
DrawRect(Rectangle(Point(nSendX, nSendY), Size(nSendW, nSendH)));
}
- // Empfaenger
+ // Addressee
long nAddrX = nX + (USHORT) (f * rItem.lAddrFromLeft),
nAddrY = nY + (USHORT) (f * rItem.lAddrFromTop ),
nAddrW = (USHORT) (f * (nPageW - rItem.lAddrFromLeft - 566)),
@@ -136,7 +134,7 @@ void SwEnvPreview::Paint(const Rectangle &)
SetFillColor( aMedium );
DrawRect(Rectangle(Point(nAddrX, nAddrY), Size(nAddrW, nAddrH)));
- // Briefmarke
+ // Stamp
long nStmpW = (USHORT) (f * 1417 /* 2,5 cm */),
nStmpH = (USHORT) (f * 1701 /* 3,0 cm */),
nStmpX = nX + nW - (USHORT) (f * 566) - nStmpW,
@@ -231,7 +229,7 @@ SwEnvPage::SwEnvPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
pSh = GetParent()->pSh;
- // Handler installieren
+ // Install handlers
aDatabaseLB .SetSelectHdl(LINK(this, SwEnvPage, DatabaseHdl ));
aTableLB .SetSelectHdl(LINK(this, SwEnvPage, DatabaseHdl ));
aInsertBT .SetClickHdl (LINK(this, SwEnvPage, FieldHdl ));
@@ -261,8 +259,8 @@ IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
}
else
sActDBName.SetToken(1, DB_DELIM, aTableLB.GetSelectEntry());
- pSh->GetNewDBMgr()->GetColumnNames(
- &aDBFieldLB, aDatabaseLB.GetSelectEntry(), aTableLB.GetSelectEntry());
+ pSh->GetNewDBMgr()->GetColumnNames(&aDBFieldLB, aDatabaseLB.GetSelectEntry(),
+ aTableLB.GetSelectEntry());
return 0;
}
@@ -271,12 +269,10 @@ IMPL_LINK( SwEnvPage, FieldHdl, Button *, EMPTYARG )
String aStr ( '<' );
aStr += aDatabaseLB.GetSelectEntry();
aStr += '.';
-// aStr += DB_DELIM;
aStr += aTableLB.GetSelectEntry();
aStr += '.';
aStr += aTableLB.GetEntryData(aTableLB.GetSelectEntryPos()) == 0 ? '0' : '1';
aStr += '.';
-// aStr += DB_DELIM;
aStr += aDBFieldLB.GetSelectEntry();
aStr += '>';
aAddrEdit.ReplaceSelected(aStr);
@@ -308,6 +304,7 @@ void SwEnvPage::InitDatabaseBox()
aDatabaseLB.Clear();
Sequence<OUString> aDataNames = SwNewDBMgr::GetExistingDatabaseNames();
const OUString* pDataNames = aDataNames.getConstArray();
+
for (long i = 0; i < aDataNames.getLength(); i++)
aDatabaseLB.InsertEntry(pDataNames[i]);
diff --git a/sw/source/ui/envelp/envprt.cxx b/sw/source/ui/envelp/envprt.cxx
index 1b485001e4..58544cc074 100644
--- a/sw/source/ui/envelp/envprt.cxx
+++ b/sw/source/ui/envelp/envprt.cxx
@@ -65,12 +65,12 @@ SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) :
FreeResource();
SetExchangeSupport();
- // Metriken
+ // Metrics
FieldUnit eUnit = ::GetDfltMetric(FALSE);
SetMetric(aRightField, eUnit);
SetMetric(aDownField , eUnit);
- // Handler installieren
+ // Install handlers
aTopButton .SetClickHdl(LINK(this, SwEnvPrtPage, ClickHdl));
aBottomButton.SetClickHdl(LINK(this, SwEnvPrtPage, ClickHdl));
@@ -82,9 +82,7 @@ SwEnvPrtPage::SwEnvPrtPage(Window* pParent, const SfxItemSet& rSet) :
// ToolBox
Size aSz = aAlignBox.CalcWindowSizePixel();
aAlignBox.SetSizePixel(aSz);
-// aAlignBox.SetPosPixel(Point(aNoNameFL.GetPosPixel().X() + (aNoNameFL.GetSizePixel().Width() - aSz.Width()) / 2, aAlignBox.GetPosPixel().Y()));
aAlignBox.SetClickHdl(LINK(this, SwEnvPrtPage, AlignHdl));
-
}
SwEnvPrtPage::~SwEnvPrtPage()
@@ -96,7 +94,7 @@ IMPL_LINK( SwEnvPrtPage, ClickHdl, Button *, EMPTYARG )
sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
if (aBottomButton.IsChecked())
{
- // Briefumschlaege von unten
+ // Envelope from botton
aAlignBox.SetItemImage(ITM_HOR_LEFT, Bitmap(SW_RES(bHC ? BMP_HOR_LEFT_LOWER_H : BMP_HOR_LEFT_LOWER)));
aAlignBox.SetItemImage(ITM_HOR_CNTR, Bitmap(SW_RES(bHC ? BMP_HOR_CNTR_LOWER_H : BMP_HOR_CNTR_LOWER)));
aAlignBox.SetItemImage(ITM_HOR_RGHT, Bitmap(SW_RES(bHC ? BMP_HOR_RGHT_LOWER_H : BMP_HOR_RGHT_LOWER)));
@@ -106,7 +104,7 @@ IMPL_LINK( SwEnvPrtPage, ClickHdl, Button *, EMPTYARG )
}
else
{
- // Briefumschlaege von oben
+ // Envelope from top
aAlignBox.SetItemImage(ITM_HOR_LEFT, Bitmap(SW_RES(bHC ? BMP_HOR_LEFT_UPPER_H : BMP_HOR_LEFT_UPPER)));
aAlignBox.SetItemImage(ITM_HOR_CNTR, Bitmap(SW_RES(bHC ? BMP_HOR_CNTR_UPPER_H : BMP_HOR_CNTR_UPPER)));
aAlignBox.SetItemImage(ITM_HOR_RGHT, Bitmap(SW_RES(bHC ? BMP_HOR_RGHT_UPPER_H : BMP_HOR_RGHT_UPPER)));
@@ -121,7 +119,7 @@ IMPL_LINK( SwEnvPrtPage, ButtonHdl, Button *, pBtn )
{
if (pBtn == &aPrtSetup)
{
- // Druck-Setup aufrufen
+ // Call printer setup
if (pPrt)
{
PrinterSetupDialog* pDlg = new PrinterSetupDialog(this );
@@ -145,7 +143,7 @@ IMPL_LINK( SwEnvPrtPage, AlignHdl, ToolBox *, EMPTYARG )
}
else
{
- // GetCurItemId() == 0 ist moeglich!
+ // GetCurItemId() == 0 is possible!
const SwEnvItem& rItem = (const SwEnvItem&) GetItemSet().Get(FN_ENVELOP);
aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT, TRUE);
}
@@ -192,10 +190,7 @@ BOOL SwEnvPrtPage::FillItemSet(SfxItemSet& rSet)
void SwEnvPrtPage::Reset(const SfxItemSet& rSet)
{
-// SfxItemSet aSet(rSet);
-// aSet.Put(GetParent()->aEnvItem);
-
- // Item auslesen
+ // Read item
const SwEnvItem& rItem = (const SwEnvItem&) rSet.Get(FN_ENVELOP);
aAlignBox.CheckItem((USHORT) rItem.eAlign + ITM_HOR_LEFT);
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 2d80eab8e0..bdc0ca159b 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -83,7 +83,7 @@ void SwLabRec::FillItem( SwLabItem& rItem ) const
void SwLabDlg::_ReplaceGroup( const String &rMake )
{
- //Die alten Eintraege vernichten.
+ // Remove old entries
pRecs->Remove( 1, pRecs->Count() - 1 );
aLabelsCfg.FillLabels(rtl::OUString(rMake), *pRecs);
aLstGroup = rMake;
@@ -146,7 +146,7 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet,
{
SetText(sBusinessCardDlg);
}
- // Benutzer-Etikette aus writer.cfg lesen
+ // Read user label from writer.cfg
SwLabItem aItem((const SwLabItem&)rSet.Get( FN_LABEL ));
SwLabRec* pRec = new SwLabRec;
const String aTmp( SW_RES( STR_CUSTOM ) );
@@ -180,6 +180,7 @@ SwLabDlg::SwLabDlg(Window* pParent, const SfxItemSet& rSet,
if ( aMakes.Count() )
_ReplaceGroup( *aMakes[nLstGroup] );
+
if (pExampleSet)
pExampleSet->Put(aItem);
}
@@ -195,16 +196,16 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem)
const SwLabItem& rOldItem = (const SwLabItem&)GetInputSetImpl()->Get(FN_LABEL);
if (rActItem != rOldItem)
- { // Wurde schon mal mit (hoffentlich) korrektem Inhalt "geputtet"
+ {
+ // Wurde schon mal mit (hoffentlich) korrektem Inhalt "geputtet"
rItem = rActItem;
}
else
{
rItem = rOldItem;
- // Im rItem stehen (vom Namen mal abgesehen) immer nur die
- // benutzerdefinierbaren Einstellungen. Daher richtige Werte
- // direkt aus dem Record besorgen:
+ // In rItem there are only settings defined by users.
+ // Therefore get the real settings directly from Record
SwLabRec* pRec = GetRecord(rItem.aType, rItem.bCont);
pRec->FillItem( rItem );
}
@@ -227,7 +228,7 @@ SwLabRec* SwLabDlg::GetRecord(const String &rRecName, sal_Bool bCont)
break;
}
}
- if (!bFound) // Benutzerdefiniert
+ if (!bFound) // User defined
pRec = Recs()[0];
return(pRec);
@@ -244,10 +245,10 @@ Printer *SwLabDlg::GetPrt()
SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
SfxTabPage(pParent, SW_RES(TP_LAB_LAB), rSet),
pNewDBMgr(NULL),
- aItem ((const SwLabItem&) rSet.Get(FN_LABEL)),
+ aItem ((const SwLabItem&) rSet.Get(FN_LABEL)),
aWritingText (this, SW_RES(TXT_WRITING)),
- aAddrBox (this, SW_RES(BOX_ADDR )),
+ aAddrBox (this, SW_RES(BOX_ADDR )),
aWritingEdit (this, SW_RES(EDT_WRITING)),
aDatabaseFT (this, SW_RES(FT_DATABASE)),
aDatabaseLB (this, SW_RES(LB_DATABASE)),
@@ -259,10 +260,10 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
aWritingFL (this, SW_RES(FL_WRITING)),
aContButton (this, SW_RES(BTN_CONT )),
aSheetButton (this, SW_RES(BTN_SHEET )),
- aMakeText (this, SW_RES(TXT_MAKE )),
- aMakeBox (this, SW_RES(BOX_MAKE )),
- aTypeText (this, SW_RES(TXT_TYPE )),
- aTypeBox (this, SW_RES(BOX_TYPE )),
+ aMakeText (this, SW_RES(TXT_MAKE )),
+ aMakeBox (this, SW_RES(BOX_MAKE )),
+ aTypeText (this, SW_RES(TXT_TYPE )),
+ aTypeBox (this, SW_RES(BOX_TYPE )),
aHiddenSortTypeBox(this, WB_SORT|WB_HIDE),
aFormatInfo (this, SW_RES(INF_FORMAT )),
aFormatFL (this, SW_RES(FL_FORMAT ))
@@ -273,15 +274,15 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
SetExchangeSupport();
- // Handler installieren
- aAddrBox .SetClickHdl (LINK(this, SwLabPage, AddrHdl ));
- aDatabaseLB .SetSelectHdl(LINK(this, SwLabPage, DatabaseHdl ));
- aTableLB .SetSelectHdl(LINK(this, SwLabPage, DatabaseHdl ));
- aInsertBT .SetClickHdl (LINK(this, SwLabPage, FieldHdl ));
- aContButton .SetClickHdl (LINK(this, SwLabPage, PageHdl ));
- aSheetButton .SetClickHdl (LINK(this, SwLabPage, PageHdl ));
- aMakeBox .SetSelectHdl(LINK(this, SwLabPage, MakeHdl ));
- aTypeBox .SetSelectHdl(LINK(this, SwLabPage, TypeHdl ));
+ // Install handlers
+ aAddrBox .SetClickHdl (LINK(this, SwLabPage, AddrHdl ));
+ aDatabaseLB .SetSelectHdl(LINK(this, SwLabPage, DatabaseHdl ));
+ aTableLB .SetSelectHdl(LINK(this, SwLabPage, DatabaseHdl ));
+ aInsertBT .SetClickHdl (LINK(this, SwLabPage, FieldHdl ));
+ aContButton .SetClickHdl (LINK(this, SwLabPage, PageHdl ));
+ aSheetButton .SetClickHdl (LINK(this, SwLabPage, PageHdl ));
+ aMakeBox .SetSelectHdl(LINK(this, SwLabPage, MakeHdl ));
+ aTypeBox .SetSelectHdl(LINK(this, SwLabPage, TypeHdl ));
InitDatabaseBox();
@@ -292,10 +293,11 @@ SwLabPage::SwLabPage(Window* pParent, const SfxItemSet& rSet) :
{
String &rStr = *GetParent()->Makes()[i];
aMakeBox.InsertEntry( rStr );
+
if ( rStr == String(aItem.aLstMake) )
nLstGroup = i;
}
-// Reset(rSet);
+
aMakeBox.SelectEntryPos( nLstGroup );
aMakeBox.GetSelectHdl().Call( &aMakeBox );
}
@@ -335,7 +337,6 @@ void SwLabPage::SetToBusinessCard()
Point aFLPos(aWritingFL.GetPosPixel());
long nDiffPos = aFormatFL.GetPosPixel().Y() - aFLPos.Y();
Size aFLSz(aFormatFL.GetSizePixel());
-// aFLSz.Height() += nDiffPos;
aFormatFL.SetPosSizePixel(aFLPos, aFLSz);
// move all controls up
@@ -358,8 +359,10 @@ void SwLabPage::SetToBusinessCard()
IMPL_LINK( SwLabPage, AddrHdl, Button *, EMPTYARG )
{
String aWriting;
+
if ( aAddrBox.IsChecked() )
aWriting = MakeSender();
+
aWritingEdit.SetText( aWriting.ConvertLineEnd() );
aWritingEdit.GrabFocus();
return 0;
@@ -373,6 +376,7 @@ IMPL_LINK( SwLabPage, DatabaseHdl, ListBox *, pListBox )
if (pListBox == &aDatabaseLB)
GetNewDBMgr()->GetTableNames(&aTableLB, sActDBName);
+
GetNewDBMgr()->GetColumnNames(&aDBFieldLB, sActDBName, aTableLB.GetSelectEntry());
return 0;
}
@@ -690,7 +694,8 @@ sal_Bool SwVisitingCardPage::FillItemSet(SfxItemSet& rSet)
{
String* pGroup = (String*)aAutoTextGroupLB.GetEntryData(
aAutoTextGroupLB.GetSelectEntryPos());
- DBG_ASSERT(pGroup, "no group selected?");
+ OSL_ENSURE(pGroup, "no group selected?");
+
if(pGroup)
aLabItem.sGlossaryGroup = *pGroup;
diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index e3cc760a5a..e2afb7cfbc 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -86,8 +86,8 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
case 0: pValues[nProp] >>= sTmp; pNewRec->aType = sTmp; break;
case 1:
{
-//all values are contained as colon-separated 1/100 mm values except for the
-//continuous flag ('C'/'S')
+ //all values are contained as colon-separated 1/100 mm values
+ //except for the continuous flag ('C'/'S')
pValues[nProp] >>= sTmp;
String sMeasure(sTmp);
USHORT nTokenCount = sMeasure.GetTokenCount(';');
@@ -228,7 +228,7 @@ void SwLabelConfig::SaveLabel( const rtl::OUString& rManufacturer,
{
if(!AddNode(OUString(), rManufacturer))
{
- DBG_ERROR("New configuration node could not be created");
+ OSL_ENSURE(false, "New configuration node could not be created");
return ;
}
else
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 861db50a7f..23b0bc60ec 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -97,7 +97,7 @@ SwLabPreview::SwLabPreview( const SwLabFmtPage* pParent, const ResId& rResID ) :
lXHeight = GetTextHeight();
lXWidth = GetTextWidth('X');
- // Skalierungsfaktor
+ // Scale factor
float fx = (float)(lOutWPix - (2 * (lLeftWidth + 15))) / (float)lOutWPix;
lOutWPix23 = (long)((float)lOutWPix * fx);
@@ -139,7 +139,7 @@ void SwLabPreview::Paint(const Rectangle &)
else
lDispH += ROUND(aItem.lVDist / 10);
- // Skalierungsfaktor
+ // Scale factor Skalierungsfaktor
float fx = (float) lOutWPix23 / Max(1L, lDispW),
fy = (float) lOutHPix23 / Max(1L, lDispH),
f = fx < fy ? fx : fy;
@@ -169,7 +169,7 @@ void SwLabPreview::Paint(const Rectangle &)
if (aItem.nRows == 1)
DrawLine(Point(lX0, lY0 + lOutlineH - 1), Point(lX0 + lOutlineW - 1, lY0 + lOutlineH - 1)); // Unten
- // Etiketten
+ // Labels
SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH)));
SetFillColor(rWinColor);
for (USHORT nRow = 0; nRow < Min((USHORT) 2, (USHORT) aItem.nRows); nRow++)
@@ -240,7 +240,7 @@ void SwLabPreview::Paint(const Rectangle &)
}
}
-// Pfeil bzw. Intervall zeichnen --------------------------------------------
+// Arror or interval character --------------------------------------------
void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, BOOL bArrow)
{
@@ -250,10 +250,10 @@ void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, BOOL bArrow)
{
Point aArr[3];
- // Pfeil zeichnen
+ // Arrow character
if (rP1.Y() == rP2.Y())
{
- // Waagerecht
+ // Horizontal
aArr[0].X() = rP2.X() - 5;
aArr[0].Y() = rP2.Y() - 2;
aArr[1].X() = rP2.X();
@@ -263,7 +263,7 @@ void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, BOOL bArrow)
}
else
{
- // Senkrecht
+ // Vertical
aArr[0].X() = rP2.X() - 2;
aArr[0].Y() = rP2.Y() - 5;
aArr[1].X() = rP2.X() + 2;
@@ -278,16 +278,16 @@ void SwLabPreview::DrawArrow(const Point &rP1, const Point &rP2, BOOL bArrow)
}
else
{
- // Intervall zeichnen
+ // Interval symbol
if (rP1.Y() == rP2.Y())
{
- // Waagerecht
+ // Horizontal
DrawLine(Point(rP1.X(), rP1.Y() - 2), Point(rP1.X(), rP1.Y() + 2));
DrawLine(Point(rP2.X(), rP2.Y() - 2), Point(rP2.X(), rP2.Y() + 2));
}
else
{
- // Senkrecht
+ // Vertical
DrawLine(Point(rP1.X() - 2, rP1.Y()), Point(rP1.X() + 2, rP1.Y()));
DrawLine(Point(rP2.X() - 2, rP2.Y()), Point(rP2.X() + 2, rP2.Y()));
}
@@ -329,7 +329,7 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
FreeResource();
SetExchangeSupport();
- // Metriken
+ // Metrics
FieldUnit aMetric = ::GetDfltMetric(FALSE);
SetMetric(aHDistField , aMetric);
SetMetric(aVDistField , aMetric);
@@ -338,7 +338,7 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
SetMetric(aLeftField , aMetric);
SetMetric(aUpperField , aMetric);
- // Handler installieren
+ // Install handlers
Link aLk = LINK(this, SwLabFmtPage, ModifyHdl);
aHDistField .SetModifyHdl( aLk );
aVDistField .SetModifyHdl( aLk );
@@ -360,7 +360,7 @@ SwLabFmtPage::SwLabFmtPage(Window* pParent, const SfxItemSet& rSet) :
aRowsField .SetLoseFocusHdl( aLk );
aSavePB.SetClickHdl( LINK (this, SwLabFmtPage, SaveHdl));
- // Timer einstellen
+ // Set timer
aPreviewTimer.SetTimeout(1000);
aPreviewTimer.SetTimeoutHdl(LINK(this, SwLabFmtPage, PreviewHdl));
}
@@ -369,7 +369,7 @@ SwLabFmtPage::~SwLabFmtPage()
{
}
-// Modify-Handler der MetricFields. Preview-Timer starten -------------------
+// Modify-handler of MetricFields. start preview timer
IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
{
bModified = TRUE;
@@ -378,7 +378,7 @@ IMPL_LINK_INLINE_START( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwLabFmtPage, ModifyHdl, Edit *, EMPTYARG )
-// Preview invalidaten ------------------------------------------------------
+// Invalidate preview
IMPL_LINK_INLINE_START( SwLabFmtPage, PreviewHdl, Timer *, EMPTYARG )
{
aPreviewTimer.Stop();
@@ -390,7 +390,7 @@ IMPL_LINK_INLINE_START( SwLabFmtPage, PreviewHdl, Timer *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwLabFmtPage, PreviewHdl, Timer *, EMPTYARG )
-// LoseFocus-Handler: Bei Aenderung sofort updaten --------------------------
+// LoseFocus-Handler: Update on change --------------------------
IMPL_LINK_INLINE_START( SwLabFmtPage, LoseFocusHdl, Control *, pControl )
{
if (((Edit*) pControl)->IsModified())
@@ -399,7 +399,6 @@ IMPL_LINK_INLINE_START( SwLabFmtPage, LoseFocusHdl, Control *, pControl )
}
IMPL_LINK_INLINE_END( SwLabFmtPage, LoseFocusHdl, Control *, pControl )
-// Minima und Maxima fuer Fields festlegen ----------------------------------
void SwLabFmtPage::ChangeMinMax()
{
long lMax = 31748; // 56 cm
@@ -508,7 +507,7 @@ BOOL SwLabFmtPage::FillItemSet(SfxItemSet& rSet)
void SwLabFmtPage::Reset(const SfxItemSet& )
{
- // Fields initialisieren
+ // Initialise fields
GetParent()->GetLabItem(aItem);
aHDistField .SetMax(100 * aItem.lHDist , FUNIT_TWIP);
diff --git a/sw/source/ui/envelp/labimg.cxx b/sw/source/ui/envelp/labimg.cxx
index c42c88aa5b..1f6b9a7b9e 100644
--- a/sw/source/ui/envelp/labimg.cxx
+++ b/sw/source/ui/envelp/labimg.cxx
@@ -155,7 +155,7 @@ int SwLabItem::operator ==(const SfxPoolItem& rItem) const
aLstMake == rLab.aLstMake&&
aLstType == rLab.aLstType&&
sDBName == rLab.sDBName &&
- aPrivFirstName == rLab.aPrivFirstName&&
+ aPrivFirstName == rLab.aPrivFirstName&&
aPrivName == rLab.aPrivName&&
aPrivShortCut == rLab.aPrivShortCut&&
aPrivFirstName2 == rLab.aPrivFirstName2&&
@@ -276,7 +276,7 @@ SwLabCfgItem::SwLabCfgItem(sal_Bool bLabel) :
Sequence<Any> aValues = GetProperties(aNames);
EnableNotification(aNames);
const Any* pValues = aValues.getConstArray();
- DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+ OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
sal_Bool bNoConfigValues = sal_True;
if(aValues.getLength() == aNames.getLength())
{
diff --git a/sw/source/ui/envelp/labprt.cxx b/sw/source/ui/envelp/labprt.cxx
index ff35266cf4..3e7b756c35 100644
--- a/sw/source/ui/envelp/labprt.cxx
+++ b/sw/source/ui/envelp/labprt.cxx
@@ -67,7 +67,7 @@ SwLabPrtPage::SwLabPrtPage(Window* pParent, const SfxItemSet& rSet) :
FreeResource();
SetExchangeSupport();
- // Handler installieren
+ // Install handlers
Link aLk = LINK(this, SwLabPrtPage, CountHdl);
aPageButton .SetClickHdl( aLk );
aSingleButton.SetClickHdl( aLk );
@@ -95,7 +95,7 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
{
if (pButton == &aPrtSetup)
{
- // Druck-Setup aufrufen
+ // Call printer setup
if (!pPrinter)
pPrinter = new Printer;
@@ -116,9 +116,9 @@ IMPL_LINK( SwLabPrtPage, CountHdl, Button *, pButton )
if ( bEnable )
aColField.GrabFocus();
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( pButton == &aPageButton, "NewButton?" );
+ OSL_ENSURE( pButton == &aPageButton, "NewButton?" );
#endif
return 0;
}
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 3b88f2c8ad..9087994c14 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -142,12 +142,9 @@ void SwXSelChgLstnr_Impl::selectionChanged( const EventObject& ) throw (Runtime
void SwXSelChgLstnr_Impl::disposing( const EventObject& ) throw (RuntimeException)
{
- DBG_ERROR("disposing");
+ OSL_ENSURE(false, "disposing");
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
const String& rSourceName,
const String& rTblName,
@@ -336,8 +333,6 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
pModOpt = SW_MOD()->GetModuleConfig();
- //aSingleJobsCB.Check(pModOpt->IsSinglePrintJob());// not supported in since cws printerpullpages anymore
-
sal_Int16 nMailingMode(pModOpt->GetMailingFormats());
aFormatSwCB.Check((nMailingMode & TXTFORMAT_OFFICE) != 0);
aFormatHtmlCB.Check((nMailingMode & TXTFORMAT_HTML) != 0);
@@ -345,7 +340,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
aAllRB.Check(TRUE);
- // Handler installieren
+ // Install handlers
Link aLk = LINK(this, SwMailMergeDlg, ButtonHdl);
aOkBTN.SetClickHdl(aLk);
@@ -473,10 +468,6 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwMailMergeDlg::~SwMailMergeDlg()
{
if(xFrame.is())
@@ -495,10 +486,6 @@ SwMailMergeDlg::~SwMailMergeDlg()
delete pImpl;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
void SwMailMergeDlg::Apply()
{
}
@@ -509,18 +496,21 @@ void lcl_MoveControlY( Window* ppW, long nDiffSize )
aPos.Y() += nDiffSize;
ppW->SetPosPixel( aPos );
}
+
void lcl_MoveControlX( Window* ppW, long nDiffSize )
{
Point aPos( ppW->GetPosPixel());
aPos.X() += nDiffSize;
ppW->SetPosPixel( aPos );
}
+
void lcl_ChangeWidth( Window* ppW, long nDiffSize )
{
Size aSize( ppW->GetSizePixel());
aSize.Width() += nDiffSize;
ppW->SetSizePixel( aSize );
}
+
void SwMailMergeDlg::Resize()
{
//the only controls that profit from the resize is pBeamerWin
@@ -598,10 +588,6 @@ void SwMailMergeDlg::Resize()
}
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, ButtonHdl, Button *, pBtn )
{
if (pBtn == &aOkBTN)
@@ -612,10 +598,6 @@ IMPL_LINK( SwMailMergeDlg, ButtonHdl, Button *, pBtn )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, OutputTypeHdl, RadioButton *, pBtn )
{
sal_Bool bPrint = pBtn == &aPrinterRB;
@@ -665,9 +647,6 @@ IMPL_LINK( SwMailMergeDlg, SaveTypeHdl, RadioButton*, pBtn )
}
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox )
{
@@ -682,20 +661,12 @@ IMPL_LINK( SwMailMergeDlg, FilenameHdl, CheckBox*, pBox )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, ModifyHdl, NumericField *, EMPTYARG )
{
aFromRB.Check();
return (0);
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
bool SwMailMergeDlg::ExecQryShell()
{
if(pImpl->xSelSupp.is())
@@ -755,7 +726,7 @@ bool SwMailMergeDlg::ExecQryShell()
pMgr->SetSubject(sPath);
}
- if (aFromRB.IsChecked()) // Liste Einfuegen
+ if (aFromRB.IsChecked()) // Insert list
{
// Safe: the maximal value of the fields is limited
sal_Int32 nStart = sal::static_int_cast<sal_Int32>(aFromNF.GetValue());
@@ -770,7 +741,7 @@ bool SwMailMergeDlg::ExecQryShell()
*pSelection <<= i;
}
else if (aAllRB.IsChecked() )
- m_aSelection.realloc(0); // Leere Selektion = Alles einfuegen
+ m_aSelection.realloc(0); // Empty selection = insert all
else
{
if(pImpl->xSelSupp.is())
@@ -813,10 +784,6 @@ bool SwMailMergeDlg::ExecQryShell()
return true;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, InsertPathHdl, PushButton *, EMPTYARG )
{
String sPath( aPathED.GetText() );
@@ -835,7 +802,6 @@ IMPL_LINK( SwMailMergeDlg, InsertPathHdl, PushButton *, EMPTYARG )
C2U( "com.sun.star.ui.dialogs.FolderPicker" ) ),
UNO_QUERY );
}
-// pFileDlg->SetHelpId(HID_FILEDLG_MAILMRGE1);
xFP->setDisplayDirectory(sPath);
if( xFP->execute() == RET_OK )
{
@@ -848,17 +814,13 @@ IMPL_LINK( SwMailMergeDlg, InsertPathHdl, PushButton *, EMPTYARG )
return 0;
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
IMPL_LINK( SwMailMergeDlg, AttachFileHdl, PushButton *, EMPTYARG )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
AbstractSvxMultiFileDialog* pFileDlg = pFact->CreateSvxMultiFileDialog( this );
- DBG_ASSERT(pFileDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pFileDlg, "Dialogdiet fail!");
pFileDlg->SetFiles(aAttachED.GetText());
pFileDlg->SetHelpId(HID_FILEDLG_MAILMRGE2);
diff --git a/sw/source/ui/envelp/syncbtn.cxx b/sw/source/ui/envelp/syncbtn.cxx
index c355cdacb3..9af6643645 100644
--- a/sw/source/ui/envelp/syncbtn.cxx
+++ b/sw/source/ui/envelp/syncbtn.cxx
@@ -47,10 +47,6 @@
SFX_IMPL_FLOATINGWINDOW( SwSyncChildWin, FN_SYNC_LABELS )
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwSyncChildWin::SwSyncChildWin( Window* _pParent,
USHORT nId,
SfxBindings* pBindings,
@@ -78,10 +74,6 @@ SwSyncChildWin::SwSyncChildWin( Window* _pParent,
pWindow->Show();
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
SwSyncBtnDlg::SwSyncBtnDlg( SfxBindings* _pBindings,
SfxChildWindow* pChild,
Window *pParent) :
@@ -92,18 +84,10 @@ SwSyncBtnDlg::SwSyncBtnDlg( SfxBindings* _pBindings,
aSyncBtn.SetClickHdl(LINK(this, SwSyncBtnDlg, BtnHdl));
}
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
__EXPORT SwSyncBtnDlg::~SwSyncBtnDlg()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwSyncBtnDlg, BtnHdl, PushButton *, EMPTYARG )
{
SfxViewFrame::Current()->GetDispatcher()->Execute(FN_UPDATE_ALL_LINKS, SFX_CALLMODE_ASYNCHRON);
diff --git a/sw/source/ui/globdoc/globdoc.cxx b/sw/source/ui/globdoc/globdoc.cxx
index a5a3acc19e..a4aedcb1ec 100644
--- a/sw/source/ui/globdoc/globdoc.cxx
+++ b/sw/source/ui/globdoc/globdoc.cxx
@@ -43,13 +43,11 @@
#include "cfgid.h"
-/*--------------------------------------------------------------------
- Beschreibung: Alle Filter registrieren
- --------------------------------------------------------------------*/
+
+// Description: Register all filters
TYPEINIT1(SwGlobalDocShell, SwDocShell);
-//-------------------------------------------------------------------------
SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter/GlobalDocument" )
SwGlobalDocShell::SwGlobalDocShell(SfxObjectCreateMode eMode ) :
@@ -70,7 +68,7 @@ void SwGlobalDocShell::FillClass( SvGlobalName * pClassName,
sal_Bool bTemplate /* = sal_False */) const
{
(void)bTemplate;
- DBG_ASSERT( bTemplate == sal_False, "No template for Writer Global" );
+ OSL_ENSURE( bTemplate == sal_False, "No template for Writer Global" );
if (nVersion == SOFFICE_FILEFORMAT_60)
{
diff --git a/sw/source/ui/inc/cfgitems.hxx b/sw/source/ui/inc/cfgitems.hxx
index 51d75d9474..8c8a55bda9 100644
--- a/sw/source/ui/inc/cfgitems.hxx
+++ b/sw/source/ui/inc/cfgitems.hxx
@@ -203,7 +203,7 @@ public:
void SetOn( BOOL bFlag ) { bOn = bFlag; }
};
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
/*--------OS 12.01.95 -----------------------------------
Item fuer Einstellungsdialog - Testeinstellungen
diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx
index 9d8bb82055..2fdb986bf2 100644
--- a/sw/source/ui/inc/optpage.hxx
+++ b/sw/source/ui/inc/optpage.hxx
@@ -439,7 +439,7 @@ public:
TabPage Testeinstellungen fuer SW
--------------------------------------------------------- */
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
class SwTestTabPage : public SfxTabPage
{