summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacek Wolszczak <shutdownrunner@gmail.com>2010-10-13 22:54:07 +0200
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2010-10-13 22:54:07 +0200
commit4df23ed7855c2c2e7d14ce86d69b849da3aa1cd2 (patch)
treead082f4f30979750d77191148ceb5d249080e0d6
parent4aa0892847596ad97c642744af22ddf4f64e409e (diff)
Replace ASSERT and DBG_ASSERT with OSL_ENSURE
-rw-r--r--sw/source/ui/app/appenv.cxx68
-rw-r--r--sw/source/ui/app/apphdl.cxx22
-rw-r--r--sw/source/ui/app/applab.cxx51
-rw-r--r--sw/source/ui/app/appopt.cxx14
-rw-r--r--sw/source/ui/app/docsh.cxx16
-rw-r--r--sw/source/ui/app/docsh2.cxx48
-rw-r--r--sw/source/ui/app/docshdrw.cxx10
-rw-r--r--sw/source/ui/app/docshini.cxx24
-rw-r--r--sw/source/ui/app/docst.cxx33
-rw-r--r--sw/source/ui/app/docstyle.cxx116
-rw-r--r--sw/source/ui/app/swdll.cxx15
-rw-r--r--sw/source/ui/app/swmodul1.cxx68
-rw-r--r--sw/source/ui/app/swmodule.cxx18
-rw-r--r--sw/source/ui/chrdlg/break.cxx3
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx36
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx36
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx29
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx47
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx3
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx31
-rw-r--r--sw/source/ui/chrdlg/tblnumfm.cxx7
21 files changed, 189 insertions, 506 deletions
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index 004b6853015f..d732b7e94a34 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -87,11 +87,7 @@
#define ENV_CANCEL SHRT_MAX
-// --------------------------------------------------------------------------
-
-
-// Funktion wird fuer Etiketten und Briefumschlaege benutzt!
-// im applab.cxx und appenv.cxx
+// Function used for labels and envelopes in applab.cxx and appenv.cxx
String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText )
{
String sRet;
@@ -127,7 +123,7 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
sTmpText = aLine.Copy( 0, nPos + 1);
aLine.Erase( 0, nPos + 1);
- // Datenbankfelder muesen mind. 3 Punkte beinhalten!
+ // Database fields must contain at least 3 points!
String sDBName( sTmpText.Copy( 1, sTmpText.Len() - 2));
USHORT nCnt = sDBName.GetTokenCount('.');
if (nCnt >= 3)
@@ -145,14 +141,11 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
}
rSh.InsertLineBreak();
}
- rSh.DelLeft(); // Letzten Linebreak wieder l???schen
+ rSh.DelLeft(); // Again remove last linebreak
return sRet;
}
-// ----------------------------------------------------------------------------
-
-
void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId)
{
USHORT nCollCnt = pOldSh->GetTxtFmtCollCount();
@@ -162,12 +155,9 @@ void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId)
pNewSh->GetTxtCollFromPool(nCollId)->SetFmtAttr(pColl->GetAttrSet());
}
-// ----------------------------------------------------------------------------
-
-
void SwModule::InsertEnv( SfxRequest& rReq )
{
-static USHORT nTitleNo = 0;
+ static USHORT nTitleNo = 0;
SwDocShell *pMyDocSh;
SfxViewFrame *pFrame;
@@ -175,11 +165,11 @@ static USHORT nTitleNo = 0;
SwWrtShell *pOldSh,
*pSh;
- //aktuelle Shell besorgen
+ // Get current shell
pMyDocSh = (SwDocShell*) SfxObjectShell::Current();
pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0;
- // Neues Dokument erzeugen (kein Show!)
+ // Create new document (don't show!)
SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
@@ -199,10 +189,10 @@ static USHORT nTitleNo = 0;
::lcl_CopyCollAttr(pOldSh, pSh, RES_POOLCOLL_SENDADRESS);
}
- // SwEnvItem aus Config lesen
+ // Read SwEnvItem from config
SwEnvCfgItem aEnvCfg;
- //Haben wir schon einen Briefumschlag.
+ // Check if there's already an envelope.
BOOL bEnvChange = FALSE;
SfxItemSet aSet(GetPool(), FN_ENVELOP, FN_ENVELOP, 0);
@@ -236,10 +226,10 @@ static USHORT nTitleNo = 0;
if ( !pItem )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg = pFact->CreateSwEnvDlg( pParent, aSet, pOldSh, pTempPrinter, !bEnvChange, DLG_ENV );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
nMode = pDlg->Execute();
}
else
@@ -253,7 +243,7 @@ static USHORT nTitleNo = 0;
{
SwWait aWait( (SwDocShell&)*xDocSh, TRUE );
- // Dialog auslesen, Item in Config speichern
+ // Read dialog and save item to config
const SwEnvItem& rItem = pItem ? *pItem : (const SwEnvItem&) pDlg->GetOutputItemSet()->Get(FN_ENVELOP);
aEnvCfg.GetItem() = rItem;
aEnvCfg.Commit();
@@ -264,7 +254,7 @@ static USHORT nTitleNo = 0;
//gereicht wurde.
if ( nMode != ENV_NEWDOC )
{
- ASSERT(pOldSh, "Kein Dokument - war 'Einfuegen' nicht disabled???");
+ OSL_ENSURE(pOldSh, "No document - wasn't 'Insert' disabled???");
SvxPaperBinItem aItem( RES_PAPER_BIN );
aItem.SetValue((BYTE)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
pOldSh->GetPageDescFromPool(RES_POOLPAGE_JAKET)->GetMaster().SetFmtAttr(aItem);
@@ -280,15 +270,15 @@ static USHORT nTitleNo = 0;
if (nMode == ENV_INSERT)
{
- SetView(&pOldSh->GetView()); // Pointer auf oberste View restaurieren
+ SetView(&pOldSh->GetView()); // Set pointer to top view
- //Neues Dok wieder loeschen
+ // Delete new document
xDocSh->DoClose();
pSh = pOldSh;
//#i4251# selected text or objects in the document should
//not be deleted on inserting envelopes
pSh->EnterStdMode();
- // Los geht's (Einfuegen)
+ // Here it goes (insert)
pSh->StartUndo(UNDO_UI_INSERT_ENVELOPE, NULL);
pSh->StartAllAction();
pSh->SttEndDoc(TRUE);
@@ -298,11 +288,11 @@ static USHORT nTitleNo = 0;
// Folgevorlage: Seite 2
pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
- // Text der ersten Seite loeschen
+ // Delete text from the first page
if ( !pSh->SttNxtPg(TRUE) )
pSh->EndPg(TRUE);
pSh->DelRight();
- // Rahmen der ersten Seite loeschen
+ // Delete frame of the first page
if( pSh->GotoFly( rSendMark ) )
{
pSh->EnterSelFrmMode();
@@ -319,7 +309,7 @@ static USHORT nTitleNo = 0;
// Folgevorlage: Seite 1
pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
- // Seitenumbruch einfuegen
+ // Insert page break
if ( pSh->IsCrsrInTbl() )
{
pSh->SplitNode();
@@ -349,14 +339,14 @@ static USHORT nTitleNo = 0;
}
SET_CURR_SHELL(pSh);
- pSh->SetNewDoc(); // Performanceprobleme vermeiden
+ pSh->SetNewDoc(); // Avoid performance problems
// Flys dieser Seite merken
SvPtrarr aFlyArr(0, 5);
if( ENV_NEWDOC != nMode && !bEnvChange )
pSh->GetPageObjs( aFlyArr );
- // Page-Desc ermitteln
+ // Get page description
SwPageDesc* pDesc = pSh->GetPageDescFromPool(RES_POOLPAGE_JAKET);
SwFrmFmt& rFmt = pDesc->GetMaster();
@@ -399,20 +389,20 @@ static USHORT nTitleNo = 0;
rFmt.SetFmtAttr(aLRMargin);
rFmt.SetFmtAttr(aULMargin);
- // Kopf-, Fusszeilen
+ // Header and footer
rFmt.SetFmtAttr(SwFmtHeader(BOOL(FALSE)));
pDesc->ChgHeaderShare(FALSE);
rFmt.SetFmtAttr(SwFmtFooter(BOOL(FALSE)));
pDesc->ChgFooterShare(FALSE);
- // Seitennumerierung
+ // Page numbering
pDesc->SetUseOn(nsUseOnPage::PD_ALL);
- // Einstellen der Seitengroesse
+ // Page size
rFmt.SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE,
nPageW + lLeft, nPageH + lUpper));
- // Einstellen der Numerierungsart der Seite
+ // Set type of page numbering
SvxNumberType aType;
aType.SetNumberingType(SVX_NUM_NUMBER_NONE);
pDesc->SetNumType(aType);
@@ -425,7 +415,7 @@ static USHORT nTitleNo = 0;
pDesc->SetLandscape( rItem.eAlign >= ENV_VER_LEFT &&
rItem.eAlign <= ENV_VER_RGHT);
- // Page-Desc anwenden
+ // Apply page description
USHORT nPos;
pSh->FindPageDescByName( pDesc->GetName(),
@@ -446,7 +436,7 @@ static USHORT nTitleNo = 0;
aMgr.SetULSpace( 0L, 0L );
aMgr.SetLRSpace( 0L, 0L );
- // Absender
+ // Sender
if (rItem.bSend)
{
pSh->SttEndDoc(TRUE);
@@ -463,7 +453,7 @@ static USHORT nTitleNo = 0;
aMgr.UpdateAttrMgr();
}
- // Empfaenger
+ // Addressee
pSh->SttEndDoc(TRUE);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
@@ -480,7 +470,7 @@ static USHORT nTitleNo = 0;
if (aFlyArr.Count())
pSh->SetPageObjsNewPage(aFlyArr, 1);
- // Fertig
+ // Finished
pSh->SttEndDoc(TRUE);
pSh->EndAllAction();
@@ -526,7 +516,7 @@ static USHORT nTitleNo = 0;
xDocSh->DoClose();
--nTitleNo;
- // Pointer auf oberste View restaurieren
+ // Set pointer to top view
if (pOldSh)
SetView(&pOldSh->GetView());
}
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 7b620efd3c48..9cd66778d899 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -30,7 +30,7 @@
#include <hintids.hxx>
#include <tools/urlobj.hxx>
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
#include <tools/link.hxx>
#define _SVSTDARR_STRINGSDTOR
@@ -297,8 +297,8 @@ SwMailMergeWizardExecutor::SwMailMergeWizardExecutor()
SwMailMergeWizardExecutor::~SwMailMergeWizardExecutor()
{
- DBG_ASSERT( m_pWizard == 0, "SwMailMergeWizardExecutor: m_pWizard must be Null!" );
- DBG_ASSERT( m_pMMConfig == 0, "SwMailMergeWizardExecutor: m_pMMConfig must be Null!" );
+ OSL_ENSURE( m_pWizard == 0, "SwMailMergeWizardExecutor: m_pWizard must be Null!" );
+ OSL_ENSURE( m_pMMConfig == 0, "SwMailMergeWizardExecutor: m_pMMConfig must be Null!" );
}
void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs )
@@ -310,7 +310,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
}
m_pView = ::GetActiveView(); // not owner!
- DBG_ASSERT(m_pView, "no current view?");
+ OSL_ENSURE(m_pView, "no current view?");
if(m_pView)
{
// keep self alive until done.
@@ -331,7 +331,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
m_pView->SetMailMergeConfigItem(0, 0, sal_True);
SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, FALSE);
- DBG_ASSERT(m_pMMConfig, "no MailMergeConfigItem available");
+ OSL_ENSURE(m_pMMConfig, "no MailMergeConfigItem available");
bRestoreWizard = true;
}
// to make it bullet proof ;-)
@@ -427,7 +427,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
#endif
{
#if OSL_DEBUG_LEVEL > 1
- DBG_ASSERT( pDialog == m_pWizard, "wrong dialog passed to EndDialogHdl!" );
+ OSL_ENSURE( pDialog == m_pWizard, "wrong dialog passed to EndDialogHdl!" );
(void) pDialog;
#endif
@@ -469,7 +469,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
uno::Reference< frame::XFrame > xFrame =
m_pView->GetViewFrame()->GetFrame().GetFrameInterface();
xFrame->getContainerWindow()->setVisible(sal_False);
- DBG_ASSERT(pTargetView, "No target view has been created");
+ OSL_ENSURE(pTargetView, "No target view has been created");
if(pTargetView)
{
// destroy wizard asynchronously
@@ -508,7 +508,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
{
SwView* pTargetView = m_pMMConfig->GetTargetView();
SwView* pSourceView = m_pMMConfig->GetSourceView();
- DBG_ASSERT(pTargetView && pSourceView, "source or target view not available" );
+ OSL_ENSURE(pTargetView && pSourceView, "source or target view not available" );
if(pTargetView && pSourceView)
{
m_pView2Close = pTargetView;
@@ -678,11 +678,11 @@ void SwModule::ExecOther(SfxRequest& rReq)
}
/*--------------------------------------------------------------------
- Beschreibung: Notifies abfangen
+ Beschreibung: Catch notifications
--------------------------------------------------------------------*/
- // Hint abfangen fuer DocInfo
+// Catch hint for DocInfo
void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
if( rHint.ISA( SfxEventHint ) )
@@ -792,7 +792,7 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
if(!nNew || !nOld)
{
sal_Bool bUndo = nNew != 0;
- //ueber DocShells iterieren und Undo umschalten
+ // Iterate through DocShells and switch undos
TypeId aType(TYPE(SwDocShell));
SwDocShell* pDocShell = (SwDocShell*)SfxObjectShell::GetFirst(&aType);
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 133d06a039db..9a95eef7fe64 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -89,13 +89,11 @@
using namespace ::com::sun::star;
using ::rtl::OUString;
-// steht im appenv.cxx
+// is in appenv.cxx
extern String InsertLabEnvText( SwWrtShell& , SwFldMgr& , const String& );
const char __FAR_DATA MASTER_LABEL[] = "MasterLabel";
-// --------------------------------------------------------------------------
-
const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
SwFrmFmt &rFmt,
sal_uInt16 nCol, sal_uInt16 nRow, sal_Bool bPage)
@@ -113,18 +111,17 @@ const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
aSet.Put(SwFmtVertOrient(rItem.lUpper + nRow * rItem.lVDist,
text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ));
}
- const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, &rFmt ); // Fly einfuegen
- ASSERT( pFmt, "Fly not inserted" );
+ const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, &rFmt ); // Insert Fly
+ OSL_ENSURE( pFmt, "Fly not inserted" );
- rSh.UnSelectFrm(); //Rahmen wurde automatisch selektiert
+ rSh.UnSelectFrm(); //Frame was selected automatically
rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) );
- //
if(!rItem.bSynchron || !(nCol|nRow))
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( rItem.sGlossaryGroup );
@@ -153,10 +150,10 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem,
aSet.Put(SwFmtVertOrient(rItem.lUpper + nRow * rItem.lVDist,
text::VertOrientation::NONE, text::RelOrientation::PAGE_FRAME ));
}
- const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, &rFmt ); // Fly einfuegen
- ASSERT( pFmt, "Fly not inserted" );
+ const SwFrmFmt *pFmt = rSh.NewFlyFrm(aSet, sal_True, &rFmt ); // Insert Fly
+ OSL_ENSURE( pFmt, "Fly not inserted" );
- rSh.UnSelectFrm(); //Rahmen wurde automatisch selektiert
+ rSh.UnSelectFrm(); //Frame was selected automatically
rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) );
@@ -172,13 +169,11 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem,
return pFmt;
}
-// ----------------------------------------------------------------------------
-
void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
{
-static sal_uInt16 nLabelTitleNo = 0;
-static sal_uInt16 nBCTitleNo = 0;
+ static sal_uInt16 nLabelTitleNo = 0;
+ static sal_uInt16 nBCTitleNo = 0;
// DB-Manager anlegen
SwNewDBMgr* pNewDBMgr = new SwNewDBMgr;
@@ -191,24 +186,24 @@ static sal_uInt16 nBCTitleNo = 0;
aSet.Put( aLabCfg.GetItem() );
SwAbstractDialogFactory* pDialogFactory = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pDialogFactory, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pDialogFactory, "SwAbstractDialogFactory fail!");
AbstarctSwLabDlg* pDlg = pDialogFactory->CreateSwLabDlg( 0, aSet, pNewDBMgr, bLabel, DLG_LAB );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( RET_OK == pDlg->Execute() )
{
- // Dialog auslesen, Item in Config speichern
+ // Read dialog, store item in config
const SwLabItem& rItem = (const SwLabItem&) pDlg->
GetOutputItemSet()->Get(FN_LABEL);
aLabCfg.GetItem() = rItem;
aLabCfg.Commit();
- // Neues Dokument erzeugen.
+ // Create new document
SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD));
xDocSh->DoInitNew( 0 );
- // Drucker
+ // Printer
Printer *pPrt = pDlg->GetPrt();
if (pPrt)
{
@@ -221,7 +216,7 @@ static sal_uInt16 nBCTitleNo = 0;
SwView *pNewView = (SwView*) pViewFrame->GetViewShell();
pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird.
- // Dokumenttitel setzen
+ // Set document title
String aTmp;
if(bLabel)
{
@@ -239,7 +234,7 @@ static sal_uInt16 nBCTitleNo = 0;
// Shell ermitteln
SwWrtShell *pSh = pNewView->GetWrtShellPtr();
- ASSERT( pSh, "missing WrtShell" );
+ OSL_ENSURE( pSh, "missing WrtShell" );
{ // block for locks the dispatcher!!
@@ -250,7 +245,7 @@ static sal_uInt16 nBCTitleNo = 0;
pSh->DoUndo( sal_False );
pSh->StartAllAction();
- pSh->SetNewDoc(); // Performanceprobleme vermeiden
+ pSh->SetNewDoc(); // Avoid performance problems
SwPageDesc aDesc = pSh->GetPageDesc( 0 );
SwFrmFmt& rFmt = aDesc.GetMaster();
@@ -265,7 +260,7 @@ static sal_uInt16 nBCTitleNo = 0;
rFmt.SetFmtAttr(aLRMargin);
rFmt.SetFmtAttr(aULMargin);
- // Kopf- und Fusszeilen
+ // Header and footer
rFmt.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
aDesc.ChgHeaderShare(sal_False);
rFmt.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
@@ -396,7 +391,7 @@ static sal_uInt16 nBCTitleNo = 0;
pSh->Pop( sal_False );
}
if ( i + 1 != rItem.nRows )
- pSh->SplitNode(); // Kleine Optimierung
+ pSh->SplitNode(); // Small optimisation
}
}
else
@@ -414,7 +409,7 @@ static sal_uInt16 nBCTitleNo = 0;
if(!bLabel)
{
uno::Reference< frame::XModel > xModel = pSh->GetView().GetDocShell()->GetBaseModel();
- DBG_ASSERT(pDialogFactory, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pDialogFactory, "SwAbstractDialogFactory fail!");
SwLabDlgMethod SwLabDlgUpdateFieldInformation = pDialogFactory->GetSwLabDlgStaticMethod ();
SwLabDlgUpdateFieldInformation(xModel, rItem);
}
@@ -432,14 +427,14 @@ static sal_uInt16 nBCTitleNo = 0;
if( rItem.aWriting.indexOf( '<' ) >= 0 )
{
- // Datenbankbrowser mit zuletzt verwendeter Datenbank oeffnen
+ // Open database browser on recently used database
ShowDBObj( *pNewView, pSh->GetDBData() );
}
if( rItem.bSynchron )
{
SfxDispatcher* pDisp = pViewFrame->GetDispatcher();
- ASSERT(pDisp, "Heute kein Dispatcher am Frame?");
+ OSL_ENSURE(pDisp, "No dispatcher in frame?");
pDisp->Execute(FN_SYNC_LABELS, SFX_CALLMODE_ASYNCHRON);
}
rReq.SetReturnValue(SfxVoidItem(bLabel ? FN_LABEL : FN_BUSINESS_CARD));
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index d65da7d95b70..9d080ce6b7ca 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -106,9 +106,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
}
/********************************************************************/
- /* */
- /* Optionen/Bearbeiten */
- /* */
+ /* Options/Edit */
/********************************************************************/
SfxItemSet* pRet = new SfxItemSet (GetPool(), FN_PARAM_DOCDISP, FN_PARAM_ELEM,
SID_PRINTPREVIEW, SID_PRINTPREVIEW,
@@ -127,7 +125,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
SID_ATTR_LANGUAGE, SID_ATTR_LANGUAGE,
SID_ATTR_CHAR_CJK_LANGUAGE, SID_ATTR_CHAR_CJK_LANGUAGE,
SID_ATTR_CHAR_CTL_LANGUAGE, SID_ATTR_CHAR_CTL_LANGUAGE,
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
FN_PARAM_SWTEST, FN_PARAM_SWTEST,
#endif
0);
@@ -246,7 +244,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
pRet->Put(SvxBrushItem(aViewOpt.GetRetoucheColor(), RES_BACKGROUND));
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
// Test options
SwTestItem aTestItem(FN_PARAM_SWTEST);
aTestItem.bTest1 = aViewOpt.IsTest1();
@@ -454,7 +452,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
/*--------------------------------------------------------------------------
Writer Testseite auswerten
----------------------------------------------------------------------------*/
@@ -575,7 +573,7 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS
}
}
break;
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
case RID_SW_TP_OPTTEST_PAGE:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -613,7 +611,7 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS
break;
}
- DBG_ASSERT( pRet, "SwModule::CreateTabPage(): Unknown tabpage id" );
+ OSL_ENSURE( pRet, "SwModule::CreateTabPage(): Unknown tabpage id" );
return pRet;
}
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 220a5f56d2f3..776890b61415 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -183,7 +183,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
else
return 0;
- // PassWord Checken
+ // Check password
String aPasswd;
if ((*ppRdr)->NeedsPasswd( *pRead ))
{
@@ -215,13 +215,13 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
const SfxPoolItem *pItem;
if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pItem))
{
- DBG_ASSERT(pItem->IsA( TYPE(SfxStringItem) ), "Fehler Parametertype");
+ OSL_ENSURE(pItem->IsA( TYPE(SfxStringItem) ), "Wrong parameter type");
comphelper::OStorageHelper::SetCommonStoragePassword( rMedium.GetStorage(), ((const SfxStringItem *)pItem)->GetValue() );
}
// Fuer's Dokument-Einfuegen noch die FF-Version, wenn's der
// eigene Filter ist.
- ASSERT( /*pRead != ReadSw3 || */pRead != ReadXML || pFlt->GetVersion(),
- "Am Filter ist keine FF-Version gesetzt" );
+ OSL_ENSURE( /*pRead != ReadSw3 || */pRead != ReadXML || pFlt->GetVersion(),
+ "No FF version set in filter" );
}
// #i30171# set the UpdateDocMode at the SwDocShell
SFX_ITEMSET_ARG( rMedium.GetItemSet(), pUpdateDocItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
@@ -550,7 +550,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
WriterRef xWriter;
SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter );
if( !xWriter.Is() )
- { // Der Filter ist nicht vorhanden
+ { // Filter not available
InfoBox( 0,
SW_RESSTR(STR_DLLNOTFOUND) ).Execute();
return FALSE;
@@ -578,7 +578,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
if ( bSave )
{
SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), FALSE );
- DBG_ASSERT( !xStg->GetError(), "No storage available for storing VBA macros!" );
+ OSL_ENSURE( !xStg->GetError(), "No storage available for storing VBA macros!" );
if ( !xStg->GetError() )
{
nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") );
@@ -960,7 +960,7 @@ sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
}
if ( nStates & HIDDENINFORMATION_NOTES )
{
- ASSERT( GetWrtShell(), "No SwWrtShell, no information" )
+ OSL_ENSURE( GetWrtShell(), "No SwWrtShell, no information" )
if ( GetWrtShell() )
{
SwFieldType* pType = GetWrtShell()->GetFldType( RES_POSTITFLD, aEmptyStr );
@@ -1088,7 +1088,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
}
break;
- default: DBG_ASSERT(!this,"Hier darfst Du nicht hinein!");
+ default: OSL_ENSURE(!this,"You cannot get here!");
}
nWhich = aIter.NextWhich();
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 816db715744d..27a35d66c40d 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -149,7 +149,7 @@ SfxDocumentInfoDialog* SwDocShell::CreateDocumentInfoDialog(
if ( pVSh && !pVSh->ISA(SwSrcView) )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
pDlg->AddTabPage(TP_DOC_STAT, SW_RESSTR(STR_DOC_STAT),pFact->GetTabPageCreatorFunc( TP_DOC_STAT ),0);
}
}
@@ -199,7 +199,7 @@ void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventP
}
/*--------------------------------------------------------------------
- Beschreibung: Benachrichtigung bei geaenderter DocInfo
+ Beschreibung: Benachrichtigung bei geaenderter DocInfo
--------------------------------------------------------------------*/
void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
@@ -498,7 +498,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
pMyPool->SetSearchMask( eMyOldFamily, nMySrchMask );
// Model geaendert
- ASSERT(pDoc, "Doc fehlt");
+ OSL_ENSURE(pDoc, "Doc missing");
GetDoc()->SetModified();
bRet = TRUE;
@@ -588,17 +588,13 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
nIdx3 );
- // Model geaendert
- ASSERT(pDoc, "Doc fehlt");
+ // Model changed
+ OSL_ENSURE(pDoc, "Doc missing");
GetDoc()->SetModified();
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDocShell::Execute(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -896,10 +892,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
break;
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
{
BOOL bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
- DBG_ASSERT(bWeb == TRUE, "SourceView nur in der WebDocShell");
+ OSL_ENSURE(bWeb == TRUE, "SourceView only in WebDocShell");
}
#endif
// die SourceView ist fuer die SwWebDocShell die 1
@@ -957,10 +953,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
case FN_ABSTRACT_NEWDOC:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+ OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
AbstractSwInsertAbstractDlg* pDlg = pFact->CreateSwInsertAbstractDlg(0, DLG_INSERT_ABSTRACT );
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
BYTE nLevel = pDlg->GetLevel();
@@ -1408,7 +1404,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_ATTR_YEAR2000:
if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pItem ))
{
- DBG_ASSERT(pItem->ISA(SfxUInt16Item), "falsches Item");
+ OSL_ENSURE(pItem->ISA(SfxUInt16Item), "wrong Item");
USHORT nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
//ueber Views iterieren und den State an den FormShells setzen
@@ -1498,10 +1494,6 @@ void SwDocShell::ReconnectDdeLink(SfxObjectShell& rServer)
rLinkManager.ReconnectDdeLink(rServer);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDocShell::FillClass( SvGlobalName * pClassName,
sal_uInt32 * pClipFormat,
String * /*pAppName*/,
@@ -1532,11 +1524,6 @@ void SwDocShell::FillClass( SvGlobalName * pClassName,
*pUserName = SW_RESSTR(STR_HUMAN_SWDOC_NAME);
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDocShell::SetModified( BOOL bSet )
{
SfxObjectShell::SetModified( bSet );
@@ -1563,10 +1550,6 @@ void SwDocShell::SetModified( BOOL bSet )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDocShell::UpdateChildWindows()
{
// Flddlg ggf neu initialisieren (z.B. fuer TYP_SETVAR)
@@ -1585,9 +1568,6 @@ void SwDocShell::UpdateChildWindows()
pRed->ReInitDlg( this );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
// #i48748#
class SwReloadFromHtmlReader : public SwReader
{
@@ -1645,8 +1625,8 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
}
}
- ASSERT( pBasicMan->GetLibCount() <= 1,
- "Loschen des Basics hat nicht geklappt" );
+ OSL_ENSURE( pBasicMan->GetLibCount() <= 1,
+ "Deleting Basics didn't work" );
}
}
sal_Bool bWasBrowseMode = pDoc->get(IDocumentSettingAccess::BROWSE_MODE);
@@ -1804,7 +1784,7 @@ ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
}
if( aMed.IsStorage() )
{
- DBG_ASSERT((pFlt ? pFlt->GetVersion() : 0) >= SOFFICE_FILEFORMAT_60, "which file version?");
+ OSL_ENSURE((pFlt ? pFlt->GetVersion() : 0) >= SOFFICE_FILEFORMAT_60, "which file version?");
pRead = ReadXML;
// the SW3IO - Reader need the pam/wrtshell, because only then he
// insert the styles!
@@ -1822,7 +1802,7 @@ ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
pReader = new SwReader( aMed, rURL, pDoc );
}
- ASSERT( pRead, "no reader found" );
+ OSL_ENSURE( pRead, "no reader found" );
if( pRead )
{
pRead->GetReaderOpt().SetTxtFmts( rOpt.IsTxtFmts() );
diff --git a/sw/source/ui/app/docshdrw.cxx b/sw/source/ui/app/docshdrw.cxx
index 33e8a06ab51f..1afc4ace9100 100644
--- a/sw/source/ui/app/docshdrw.cxx
+++ b/sw/source/ui/app/docshdrw.cxx
@@ -28,18 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
-
#include <svx/svxids.hrc>
-
-
-
-
-
-
-
-
#include <svl/stritem.hxx>
#include <svx/drawitem.hxx>
#include <svx/svdmodel.hxx>
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 414dd4e60dcd..db90e86eec49 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -28,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <svx/dialogs.hrc>
@@ -117,7 +116,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::InitNew" );
sal_Bool bRet = SfxObjectShell::InitNew( xStor );
- ASSERT( GetMapUnit() == MAP_TWIP, "map unit is not twip!" );
+ OSL_ENSURE( GetMapUnit() == MAP_TWIP, "map unit is not twip!" );
sal_Bool bHTMLTemplSet = sal_False;
if( bRet )
{
@@ -154,7 +153,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
SubInitNew();
- // fuer alle
+ // for all
SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
SfxPrinter* pPrt = pDoc->getPrinter( false );
@@ -498,7 +497,7 @@ void SwDocShell::UpdateFontList()
if(!bInUpdateFontList)
{
bInUpdateFontList = true;
- ASSERT(pDoc, "Kein Doc keine FontList");
+ OSL_ENSURE(pDoc, "No Doc no FontList");
if( pDoc )
{
delete pFontList;
@@ -567,7 +566,7 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
// Das Laden
// fuer MD
- ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
+ OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
if(GetCreateMode() != SFX_CREATE_MODE_ORGANIZER)
{
@@ -629,15 +628,15 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
pDoc->set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
}
}
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 1
else
- ASSERT( !this, "ohne Sw3Reader geht nichts" );
+ OSL_ENSURE( !this, "it won't do without Sw3Reader" );
#endif
}
break;
default:
- ASSERT( !this, "Load: new CreateMode?" );
+ OSL_ENSURE( !this, "Load: new CreateMode?" );
}
@@ -660,11 +659,6 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
return bRet;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
-
sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::LoadFrom" );
@@ -684,7 +678,7 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
// Das Laden
SwWait aWait( *this, sal_True );
{
- ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
+ OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
if( ReadXML )
{
@@ -713,7 +707,7 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
void SwDocShell::SubInitNew()
{
- ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
+ OSL_ENSURE( !mxBasePool.is(), "who hasn't destroyed their Pool?" );
mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
UpdateFontList();
InitDraw();
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 426bc214b566..756da2e52df1 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -382,7 +382,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
else
{
- ASSERT( pArgs->Count(), "SfxBug ItemSet ist leer");
+ OSL_ENSURE( pArgs->Count(), "SfxBug ItemSet is empty");
SwWrtShell* pShell = GetWrtShell();
if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
@@ -484,7 +484,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
break;
default:
- DBG_ERROR( "Falsche Slot-Id");
+ DBG_ERROR( "Invalid SlotId");
}
rReq.Done();
@@ -513,7 +513,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
BOOL bNew, BOOL bColumn, SwWrtShell* pActShell,
BOOL bBasic )
{
- ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
+ OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
SfxStyleSheetBase *pStyle = 0;
USHORT nRet = nMask;
@@ -614,7 +614,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
else
{
pStyle = mxBasePool->Find( rName, (SfxStyleFamily)nFamily );
- ASSERT(pStyle, "Vorlage nicht gefunden");
+ OSL_ENSURE(pStyle, "Vorlage nicht gefunden");
}
if(!pStyle)
@@ -663,11 +663,11 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode));
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateTemplateDialog( DLG_TEMPLATE_BASE,
0, *(xTmp.get()), nFamily, bColumn,
pActShell ? pActShell : pWrtShell, bNew);
- DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
GetWrtShell()->StartAllAction();
@@ -817,7 +817,7 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
if(pStyle)
{
- ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
+ OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
GetWrtShell()->StartAllAction();
mxBasePool->Remove(pStyle);
@@ -839,13 +839,14 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
- ASSERT(pStyle, "Wo ist der StyleSheet");
+ OSL_ENSURE(pStyle, "Where's the StyleSheet");
+
if(!pStyle)
return FALSE;
SwWrtShell *pSh = pShell ? pShell : GetWrtShell();
- ASSERT( pSh, "Keine Shell, keine Styles");
+ OSL_ENSURE( pSh, "No Shell, no Styles");
pSh->StartAllAction();
@@ -891,7 +892,7 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
break;
}
default:
- DBG_ERROR("Unbekannte Familie");
+ DBG_ERROR("Unknown family");
}
pSh->EndAllAction();
@@ -906,13 +907,15 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
{
- ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
+ OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
SwEditWin& rEdtWin = pView->GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
BOOL bWaterCan = !(pApply && pApply->eType != 0);
+
if( !rName.Len() )
bWaterCan = FALSE;
+
SwApplyTemplate aTemplate;
aTemplate.eType = nFamily;
@@ -921,7 +924,8 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
- ASSERT(pStyle, "Wo ist der StyleSheet");
+ OSL_ENSURE (pStyle, "Where's the StyleSheet");
+
if(!pStyle) return nFamily;
switch(nFamily)
@@ -943,13 +947,12 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
break;
default:
- DBG_ERROR( "Unbekannte Familie");
+ DBG_ERROR( "Unknown family");
}
}
else
aTemplate.eType = 0;
- // Template anwenden
pView->GetEditWin().SetApplyTemplate(aTemplate);
return nFamily;
@@ -963,7 +966,7 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell)
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
- ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
+ OSL_ENSURE(GetWrtShell(), "No Shell, no Styles");
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index 11754550fa65..78cce95224fa 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -320,7 +320,6 @@ USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
{
if( rLst.Count() )
{
- // suchen
String sSrch( ' ' );
switch( eFam )
{
@@ -474,7 +473,7 @@ const String& SwDocStyleSheet::GetParent() const
{
if( !bPhysical )
{
- // dann pruefe, ob schon im Doc vorhanden
+ // check if it's already in document
SwFmt* pFmt = 0;
SwGetPoolIdFromName eGetType;
switch(nFamily)
@@ -497,7 +496,7 @@ const String& SwDocStyleSheet::GetParent() const
case SFX_STYLE_FAMILY_PAGE:
case SFX_STYLE_FAMILY_PSEUDO:
default:
- return aEmptyStr; // es gibt keinen Parent
+ return aEmptyStr; // there's no parent
}
String sTmp;
@@ -550,7 +549,7 @@ BOOL SwDocStyleSheet::HasFollowSupport() const
case SFX_STYLE_FAMILY_CHAR :
case SFX_STYLE_FAMILY_PSEUDO: return FALSE;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
return FALSE;
}
@@ -659,7 +658,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
case SID_ATTR_AUTO_STYLE_UPDATE:
case SID_PARA_BACKGRND_DESTINATION:
case RES_PAGEDESC:
- //CTL no yet supported
+ //CTL not yet supported
case RES_CHRATR_CTL_FONT:
case RES_CHRATR_CTL_FONTSIZE:
case RES_CHRATR_CTL_LANGUAGE:
@@ -785,7 +784,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
{
case SFX_STYLE_FAMILY_CHAR :
{
- ASSERT(pCharFmt, "SwCharFormat fehlt!");
+ OSL_ENSURE(pCharFmt, "SwCharFormat missing!");
if( pCharFmt && pCharFmt->GetName() != rStr )
{
pCharFmt->SetName( rStr );
@@ -795,7 +794,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
}
case SFX_STYLE_FAMILY_PARA :
{
- ASSERT(pColl, "Collektion fehlt!");
+ OSL_ENSURE(pColl, "Collection missing!");
if( pColl && pColl->GetName() != rStr )
{
if (pColl->GetName().Len() > 0)
@@ -809,7 +808,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
}
case SFX_STYLE_FAMILY_FRAME:
{
- ASSERT(pFrmFmt, "FrmFmt fehlt!");
+ OSL_ENSURE(pFrmFmt, "FrmFmt missing!");
if( pFrmFmt && pFrmFmt->GetName() != rStr )
{
if (pFrmFmt->GetName().Len() > 0)
@@ -822,7 +821,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
break;
}
case SFX_STYLE_FAMILY_PAGE :
- ASSERT(pDesc, "PageDesc fehlt!");
+ OSL_ENSURE(pDesc, "PageDesc missing!");
if( pDesc && pDesc->GetName() != rStr )
{
//PageDesc setzen - mit vorherigem kopieren - ist fuer das
@@ -843,7 +842,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
- ASSERT(pNumRule, "NumRule fehlt!");
+ OSL_ENSURE(pNumRule, "NumRule missing!");
if (pNumRule)
{
@@ -873,12 +872,12 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
if( bChg )
{
- rPool.First(); // interne Liste muss geupdatet werden
+ rPool.First(); // internal list has to be updated
rPool.Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) );
SwEditShell* pSh = rDoc.GetEditShell();
if( pSh )
@@ -898,19 +897,19 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
- ASSERT( pCharFmt, "SwCharFormat fehlt!" )
+ OSL_ENSURE( pCharFmt, "SwCharFormat missing!" )
if( 0 != ( pFmt = pCharFmt ) && rStr.Len() )
pParent = lcl_FindCharFmt(rDoc, rStr);
break;
case SFX_STYLE_FAMILY_PARA :
- ASSERT( pColl, "Collektion fehlt!")
+ OSL_ENSURE( pColl, "Collektion missing!")
if( 0 != ( pFmt = pColl ) && rStr.Len() )
pParent = lcl_FindParaFmt( rDoc, rStr );
break;
case SFX_STYLE_FAMILY_FRAME:
- ASSERT(pFrmFmt, "FrameFormat fehlt!");
+ OSL_ENSURE(pFrmFmt, "FrameFormat missing!");
if( 0 != ( pFmt = pFrmFmt ) && rStr.Len() )
pParent = lcl_FindFrmFmt( rDoc, rStr );
break;
@@ -919,7 +918,7 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
case SFX_STYLE_FAMILY_PSEUDO:
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
BOOL bRet = FALSE;
@@ -957,7 +956,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
{
case SFX_STYLE_FAMILY_PARA :
{
- ASSERT(pColl, "Collection fehlt!");
+ OSL_ENSURE(pColl, "Collection missing!");
if( pColl )
{
SwTxtFmtColl* pFollow = pColl;
@@ -970,7 +969,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
}
case SFX_STYLE_FAMILY_PAGE :
{
- ASSERT(pDesc, "PageDesc fehlt!");
+ OSL_ENSURE(pDesc, "PageDesc missing!");
if( pDesc )
{
const SwPageDesc* pFollowDesc = rStr.Len()
@@ -993,7 +992,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
case SFX_STYLE_FAMILY_PSEUDO:
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknwown style family");
}
return TRUE;
@@ -1012,8 +1011,9 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
{
case SFX_STYLE_FAMILY_CHAR:
{
- ASSERT(pCharFmt, "Wo ist das SwCharFmt");
+ OSL_ENSURE(pCharFmt, "Where's SwCharFmt");
aCoreSet.Put(pCharFmt->GetAttrSet());
+
if(pCharFmt->DerivedFrom())
aCoreSet.SetParent(&pCharFmt->DerivedFrom()->GetAttrSet());
}
@@ -1030,19 +1030,21 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
aBoxInfo.SetValid( VALID_DISABLE, TRUE );
if ( nFamily == SFX_STYLE_FAMILY_PARA )
{
- ASSERT(pColl, "Wo ist die Collektion");
+ OSL_ENSURE(pColl, "Where's Collection");
aCoreSet.Put(pColl->GetAttrSet());
aCoreSet.Put( aBoxInfo );
aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, pColl->IsAutoUpdateFmt()));
+
if(pColl->DerivedFrom())
aCoreSet.SetParent(&pColl->DerivedFrom()->GetAttrSet());
}
else
{
- ASSERT(pFrmFmt, "Wo ist das FrmFmt");
+ OSL_ENSURE(pFrmFmt, "Where's FrmFmt");
aCoreSet.Put(pFrmFmt->GetAttrSet());
aCoreSet.Put( aBoxInfo );
aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, pFrmFmt->IsAutoUpdateFmt()));
+
if(pFrmFmt->DerivedFrom())
aCoreSet.SetParent(&pFrmFmt->DerivedFrom()->GetAttrSet());
}
@@ -1051,21 +1053,21 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
case SFX_STYLE_FAMILY_PAGE :
{
- ASSERT(pDesc, "Kein PageDescriptor");
+ OSL_ENSURE(pDesc, "No PageDescriptor");
::PageDescToItemSet(*((SwPageDesc*)pDesc), aCoreSet);
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
{
- ASSERT(pNumRule, "Keine NumRule");
+ OSL_ENSURE(pNumRule, "No NumRule");
SvxNumRule aRule = pNumRule->MakeSvxNumRule();
aCoreSet.Put(SvxNumBulletItem(aRule));
}
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
// Member der Basisklasse
pSet = &aCoreSet;
@@ -1080,10 +1082,10 @@ void SwDocStyleSheet::MergeIndentAttrsOfListStyle( SfxItemSet& rSet )
return;
}
- ASSERT( pColl, "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style");
+ OSL_ENSURE( pColl, "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style");
if ( pColl->AreListLevelIndentsApplicable() )
{
- ASSERT( pColl->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET,
+ OSL_ENSURE( pColl->GetItemState( RES_PARATR_NUMRULE ) == SFX_ITEM_SET,
"<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - list level indents are applicable at paragraph style, but no list style found. Serious defect -> please inform OD." );
const String sNumRule = pColl->GetNumRule().GetValue();
if( sNumRule.Len() )
@@ -1104,10 +1106,6 @@ void SwDocStyleSheet::MergeIndentAttrsOfListStyle( SfxItemSet& rSet )
}
}
-/*--------------------------------------------------------------------
- Beschreibung: ItemSet setzen
- --------------------------------------------------------------------*/
-
// handling of parameter <bResetIndentAttrsAtParagraphStyle>
void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
const bool bResetIndentAttrsAtParagraphStyle )
@@ -1118,7 +1116,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwImplShellAction aTmpSh( rDoc );
- ASSERT( &rSet != &aCoreSet, "SetItemSet mit eigenem Set ist nicht erlaubt" );
+ OSL_ENSURE( &rSet != &aCoreSet, "SetItemSet with own Set is not allowed" );
if ( rDoc.DoesUndo() )
{
@@ -1135,14 +1133,14 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
case SFX_STYLE_FAMILY_CHAR :
{
- ASSERT(pCharFmt, "Wo ist das CharFormat");
+ OSL_ENSURE(pCharFmt, "Where's CharFormat");
pFmt = pCharFmt;
}
break;
case SFX_STYLE_FAMILY_PARA :
{
- ASSERT(pColl, "Wo ist die Collection");
+ OSL_ENSURE(pColl, "Where's Collection");
const SfxPoolItem* pAutoUpdate;
if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
{
@@ -1171,7 +1169,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
}
- // Document auf die neue Bedingungen updaten
+ // Update document to new conditions
SwCondCollCondChg aMsg( pColl );
pColl->Modify( &aMsg, &aMsg );
}
@@ -1267,7 +1265,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
case SFX_STYLE_FAMILY_FRAME:
{
- ASSERT(pFrmFmt, "Wo ist das FrmFmt");
+ OSL_ENSURE(pFrmFmt, "Where's FrmFmt");
const SfxPoolItem* pAutoUpdate;
if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
{
@@ -1279,7 +1277,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
case SFX_STYLE_FAMILY_PAGE :
{
- ASSERT(pDesc, "Wo ist der PageDescriptor");
+ OSL_ENSURE(pDesc, "Where's PageDescriptor");
if( rDoc.FindPageDescByName( pDesc->GetName(), &nPgDscPos ))
{
@@ -1299,7 +1297,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
case SFX_STYLE_FAMILY_PSEUDO:
{
- ASSERT(pNumRule, "Wo ist die NumRule");
+ OSL_ENSURE(pNumRule, "Where's NumRule");
if (!pNumRule)
break;
@@ -1331,7 +1329,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
if( pFmt && rSet.Count())
@@ -1371,7 +1369,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
else
{
aCoreSet.ClearItem();
- if( pNewDsc ) // den muessen wir noch vernichten!!
+ if( pNewDsc ) // we still need to delete it
{
rDoc.PreDelPageDesc(pNewDsc); // #i7983#
delete pNewDsc;
@@ -1696,7 +1694,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
if( pFmt )
{
- ASSERT( bPhysical, "Format nicht gefunden" );
+ OSL_ENSURE( bPhysical, "Format not found" );
nHelpId = pFmt->GetPoolHelpId();
if( pFmt->GetPoolHlpFileId() != UCHAR_MAX )
@@ -1764,7 +1762,6 @@ void SwDocStyleSheet::Create()
pNumRule = lcl_FindNumRule( rDoc, aName );
if( !pNumRule )
{
- //JP 05.02.99: temp Namen erzeugen, damit kein ASSERT kommt
String sTmpNm( aName );
if( !aName.Len() )
sTmpNm = rDoc.GetUniqueNumRuleName();
@@ -1788,12 +1785,6 @@ void SwDocStyleSheet::Create()
aCoreSet.ClearItem();
}
-/*--------------------------------------------------------------------
- Beschreibung: Konkrete Formate rausholen
- --------------------------------------------------------------------*/
-
-
-
SwCharFmt* SwDocStyleSheet::GetCharFmt()
{
if(!bPhysical)
@@ -1801,7 +1792,6 @@ SwCharFmt* SwDocStyleSheet::GetCharFmt()
return pCharFmt;
}
-
SwTxtFmtColl* SwDocStyleSheet::GetCollection()
{
if(!bPhysical)
@@ -1809,7 +1799,6 @@ SwTxtFmtColl* SwDocStyleSheet::GetCollection()
return pColl;
}
-
const SwPageDesc* SwDocStyleSheet::GetPageDesc()
{
if(!bPhysical)
@@ -1826,7 +1815,7 @@ const SwNumRule * SwDocStyleSheet::GetNumRule()
void SwDocStyleSheet::SetNumRule(const SwNumRule& rRule)
{
- DBG_ASSERT(pNumRule, "Wo ist die NumRule");
+ OSL_ENSURE(pNumRule, "Wo ist die NumRule");
rDoc.ChgNumRuleFmts( rRule );
}
@@ -1872,7 +1861,6 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt()
return pFrmFmt;
}
-
BOOL SwDocStyleSheet::IsUsed() const
{
if( !bPhysical )
@@ -1881,7 +1869,6 @@ BOOL SwDocStyleSheet::IsUsed() const
pThis->FillStyleSheet( FillOnlyName );
}
- // immer noch nicht ?
if( !bPhysical )
return FALSE;
@@ -1897,7 +1884,7 @@ BOOL SwDocStyleSheet::IsUsed() const
return pNumRule ? rDoc.IsUsed( *pNumRule ) : FALSE;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
return FALSE;
}
return rDoc.IsUsed( *pMod );
@@ -1974,7 +1961,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
return 0;
}
@@ -2028,7 +2015,7 @@ void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId )
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
return ;
}
if( pTmpFmt )
@@ -2084,7 +2071,7 @@ SfxStyleSheetBase& SwDocStyleSheetPool::Make(
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOrg*/)
{
- ASSERT(!this , "Create im SW-Stylesheet-Pool geht nicht" );
+ OSL_ENSURE(!this , "Create im SW-Stylesheet-Pool geht nicht" );
return NULL;
}
@@ -2092,7 +2079,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOr
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const String &,
SfxStyleFamily, USHORT )
{
- ASSERT( !this, "Create im SW-Stylesheet-Pool geht nicht" );
+ OSL_ENSURE( !this, "Create im SW-Stylesheet-Pool geht nicht" );
return NULL;
}
@@ -2255,7 +2242,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
bBroadcast = FALSE;
}
@@ -2291,7 +2278,7 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
BOOL bRet = FALSE;
@@ -2381,7 +2368,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
break;
default:
- ASSERT(!this, "unbekannte Style-Familie");
+ OSL_ENSURE(!this, "unknown style family");
}
}
@@ -2439,12 +2426,12 @@ SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx )
SfxStyleSheetBase* SwStyleSheetIterator::First()
{
- // Alte Liste loeschen
+ // Delete old list
bFirstCalled = TRUE;
nLastPos = 0;
aLst.Erase();
- // aktuellen loeschen
+ // Delete current
mxIterSheet->Reset();
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
@@ -2564,7 +2551,6 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
case SWSTYLEBIT_EXTRA:
if((nId & COLL_GET_RANGE_BITS) != COLL_EXTRA_BITS) continue;
break;
-
case SWSTYLEBIT_HTML | SFXSTYLEBIT_USERDEF:
if(IsPoolUserFmt(nId))
break;
@@ -2834,7 +2820,7 @@ void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
bUsed = rDoc.IsPoolPageDescUsed( nId );
break;
default:
- ASSERT( !this, "unknown PoolFmt-Id" );
+ OSL_ENSURE( !this, "unknown PoolFmt-Id" );
}
if ( bUsed )
aLst.Append( cType, *rList[i] );
diff --git a/sw/source/ui/app/swdll.cxx b/sw/source/ui/app/swdll.cxx
index 4a4c4c303b10..e3dd72d08750 100644
--- a/sw/source/ui/app/swdll.cxx
+++ b/sw/source/ui/app/swdll.cxx
@@ -52,13 +52,6 @@
#include <unomid.h>
-
-/*************************************************************************
-|*
-|* Init
-|*
-\************************************************************************/
-
void SwDLL::Init()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDLL" );
@@ -121,14 +114,6 @@ void SwDLL::Init()
RegisterControls();
}
-
-
-/*************************************************************************
-|*
-|* Exit
-|*
-\************************************************************************/
-
void SwDLL::Exit()
{
// called directly befor unloading the DLL
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index 28692fa27005..607efffb1abd 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -59,7 +59,7 @@
#include <docsh.hxx>
#include <dbmgr.hxx>
#include <uinums.hxx>
-#include <prtopt.hxx> // fuer PrintOptions
+#include <prtopt.hxx> // for PrintOptions
#include <navicfg.hxx>
#include <doc.hxx>
#include <cmdid.h>
@@ -118,11 +118,6 @@ void lcl_SetUIPrefs(const SwViewOption* pPref, SwView* pView, ViewShell* pSh )
pView->GetPostItMgr()->PrepareView(true);
}
-/*--------------------------------------------------------------------
- Beschreibung: Aktuelle SwWrtShell
- --------------------------------------------------------------------*/
-
-
SwWrtShell* GetActiveWrtShell()
{
SwView *pActive = ::GetActiveView();
@@ -131,32 +126,23 @@ SwWrtShell* GetActiveWrtShell()
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung: Pointer auf die aktuelle Sicht
- --------------------------------------------------------------------*/
-
-
SwView* GetActiveView()
{
SfxViewShell* pView = SfxViewShell::Current();
return PTR_CAST( SwView, pView );
}
-/*--------------------------------------------------------------------
- Beschreibung: Ueber Views iterieren - static
- --------------------------------------------------------------------*/
SwView* SwModule::GetFirstView()
{
- // liefert nur sichtbare SwViews
+ // returns only sivible SwView
const TypeId aTypeId = TYPE(SwView);
SwView* pView = (SwView*)SfxViewShell::GetFirst(&aTypeId);
return pView;
}
-
SwView* SwModule::GetNextView(SwView* pView)
{
- DBG_ASSERT(PTR_CAST(SwView, pView),"keine SwView uebergeben");
+ OSL_ENSURE(PTR_CAST(SwView, pView),"return no SwView");
const TypeId aTypeId = TYPE(SwView);
SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, TRUE);
return pNView;
@@ -365,7 +351,6 @@ void SwModule::ApplyUserCharUnit(BOOL bApplyChar, BOOL bWeb)
}
}
-
SwNavigationConfig* SwModule::GetNavigationConfig()
{
if(!pNavigationConfig)
@@ -375,7 +360,6 @@ SwNavigationConfig* SwModule::GetNavigationConfig()
return pNavigationConfig;
}
-
SwPrintOptions* SwModule::GetPrtOptions(sal_Bool bWeb)
{
if(bWeb && !pWebPrtOpt)
@@ -397,10 +381,6 @@ SwChapterNumRules* SwModule::GetChapterNumRules()
return pChapterNumRules;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAvailable*/)
{
Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface();
@@ -427,9 +407,6 @@ void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAva
}
}
}
-/*--------------------------------------------------------------------
- Beschreibung: Redlining
- --------------------------------------------------------------------*/
sal_uInt16 SwModule::GetRedlineAuthor()
{
@@ -444,13 +421,9 @@ sal_uInt16 SwModule::GetRedlineAuthor()
return InsertRedlineAuthor( sActAuthor );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
const String& SwModule::GetRedlineAuthor(sal_uInt16 nPos)
{
- DBG_ASSERT(nPos<pAuthorNames->Count(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
+ OSL_ENSURE(nPos<pAuthorNames->Count(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
while (!(nPos<pAuthorNames->Count()))
{
InsertRedlineAuthor(String(RTL_CONSTASCII_USTRINGPARAM("nn")));
@@ -458,10 +431,6 @@ const String& SwModule::GetRedlineAuthor(sal_uInt16 nPos)
return *pAuthorNames->GetObject(nPos);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwModule::InsertRedlineAuthor(const String& rAuthor)
{
sal_uInt16 nPos = 0;
@@ -475,10 +444,6 @@ sal_uInt16 SwModule::InsertRedlineAuthor(const String& rAuthor)
return nPos;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet,
const AuthorCharAttr &rAttr )
{
@@ -545,19 +510,11 @@ void lcl_FillAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet,
rSet.Put( SvxColorItem( aCol, RES_CHRATR_COLOR ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModule::GetInsertAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet)
{
lcl_FillAuthorAttr(nAuthor, rSet, pModuleConfig->GetInsertAuthorAttr());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwModule::GetDeletedAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet)
{
lcl_FillAuthorAttr(nAuthor, rSet, pModuleConfig->GetDeletedAuthorAttr());
@@ -572,19 +529,11 @@ void SwModule::GetFormatAuthorAttr( sal_uInt16 nAuthor, SfxItemSet &rSet )
lcl_FillAuthorAttr( nAuthor, rSet, pModuleConfig->GetFormatAuthorAttr() );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwModule::GetRedlineMarkPos()
{
return pModuleConfig->GetMarkAlignMode();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwModule::IsInsTblFormatNum(sal_Bool bHTML) const
{
return pModuleConfig->IsInsTblFormatNum(bHTML);
@@ -595,19 +544,11 @@ sal_Bool SwModule::IsInsTblChangeNumFormat(sal_Bool bHTML) const
return pModuleConfig->IsInsTblChangeNumFormat(bHTML);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwModule::IsInsTblAlignNum(sal_Bool bHTML) const
{
return pModuleConfig->IsInsTblAlignNum(bHTML);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
const Color &SwModule::GetRedlineMarkColor()
{
return pModuleConfig->GetMarkAlignColor();
@@ -618,7 +559,6 @@ const SwViewOption* SwModule::GetViewOption(sal_Bool bWeb)
return GetUsrPref( bWeb );
}
-// returne den definierten DocStat - WordDelimiter
const String& SwModule::GetDocStatWordDelim() const
{
return pModuleConfig->GetWordDelimiter();
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 6f9e81c9d8f6..f0fe33e6107b 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -154,8 +154,6 @@ TYPEINIT1( SwModule, SfxModule );
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-//************************************************************************
-
SwModule::SwModule( SfxObjectFactory* pWebFact,
SfxObjectFactory* pFact,
SfxObjectFactory* pGlobalFact )
@@ -217,9 +215,6 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
// at the view options.
GetColorConfig();
}
-
-//************************************************************************
-
uno::Reference< scanner::XScannerManager >
SwModule::GetScannerManager()
{
@@ -256,8 +251,6 @@ uno::Reference< linguistic2::XLanguageGuessing > SwModule::GetLanguageGuesser()
return m_xLanguageGuesser;
}
-//************************************************************************
-
SwModule::~SwModule()
{
SetPool(0);
@@ -266,16 +259,12 @@ SwModule::~SwModule()
EndListening( *SFX_APP() );
}
-//************************************************************************
-
void SwModule::CreateLngSvcEvtListener()
{
if (!xLngSvcEvtListener.is())
xLngSvcEvtListener = new SwLinguServiceEventListener;
}
-//************************************************************************
-
void SwDLL::RegisterFactories()
{
//Diese Id's duerfen nicht geaendert werden. Mittels der Id's wird vom
@@ -292,9 +281,6 @@ void SwDLL::RegisterFactories()
}
}
-//************************************************************************
-
-
void SwDLL::RegisterInterfaces()
{
SwModule* pMod = SW_MOD();
@@ -332,8 +318,6 @@ void SwDLL::RegisterInterfaces()
SwAnnotationShell::RegisterInterface(pMod);
}
-//************************************************************************
-
void SwDLL::RegisterControls()
{
SwModule* pMod = SW_MOD();
@@ -454,7 +438,7 @@ void SwDLL::RegisterControls()
void SwModule::InitAttrPool()
{
- DBG_ASSERT(!pAttrPool, "Pool ist schon da!");
+ OSL_ENSURE(!pAttrPool, "Pool already exists!");
pAttrPool = new SwAttrPool(0);
SetPool(pAttrPool);
}
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index fbd8032de708..58e34c30be20 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -122,7 +122,7 @@ IMPL_LINK( SwBreakDlg, OkHdl, Button *, EMPTYARG )
else
pPageDesc = &rSh.GetPageDesc(rSh.GetCurPageDesc());
- ASSERT(pPageDesc, Seitenvorlage nicht gefunden.);
+ OSL_ENSURE(pPageDesc, "Seitenvorlage nicht gefunden.");
const USHORT nUserPage = USHORT(aPageNumEdit.GetValue());
BOOL bOk = TRUE;
switch(pPageDesc->GetUseOn())
@@ -201,7 +201,6 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS ) :
FreeResource();
}
-
void SwBreakDlg::CheckEnable()
{
BOOL bEnable = TRUE;
diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx
index 44b144d28f4b..d9bcd4935e1f 100644
--- a/sw/source/ui/chrdlg/ccoll.cxx
+++ b/sw/source/ui/chrdlg/ccoll.cxx
@@ -161,33 +161,19 @@ SwCondCollItem::SwCondCollItem(USHORT _nWhich ) :
{
}
-/****************************************************************************
-
-****************************************************************************/
-
SwCondCollItem::~SwCondCollItem()
{
}
-/****************************************************************************
-
-****************************************************************************/
-
-
SfxPoolItem* SwCondCollItem::Clone( SfxItemPool * /*pPool*/ ) const
{
return new SwCondCollItem(*this);
}
-/****************************************************************************
-
-****************************************************************************/
-
-
int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
{
- DBG_ASSERT( SfxPoolItem::operator==(rItem), "unterschiedliche Typen" );
+ OSL_ENSURE( SfxPoolItem::operator==(rItem), "different types" );
BOOL bReturn = TRUE;
for(USHORT i = 0; i < COND_COMMAND_COUNT; i++)
if(sStyles[i] != ((SwCondCollItem&)rItem).sStyles[i])
@@ -199,38 +185,18 @@ int SwCondCollItem::operator==( const SfxPoolItem& rItem) const
return bReturn;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
const String& SwCondCollItem::GetStyle(USHORT nPos) const
{
return nPos < COND_COMMAND_COUNT ? sStyles[nPos] : aEmptyStr;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
void SwCondCollItem::SetStyle(const String* pStyle, USHORT nPos)
{
if( nPos < COND_COMMAND_COUNT )
sStyles[nPos] = pStyle ? *pStyle : aEmptyStr;
}
-
-/****************************************************************************
-
-****************************************************************************/
-
-
const CommandStruct* SwCondCollItem::GetCmds()
{
return aCmds;
}
-
-
-
-
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 1159c8a08fb8..cccb6b23b15b 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -99,7 +99,7 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
SetText(aTmp);
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
AddTabPage(TP_CHAR_STD, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
AddTabPage(TP_CHAR_EXT, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
AddTabPage(TP_CHAR_POS, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 );
@@ -117,10 +117,6 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
else if(!aCJKOptions.IsDoubleLinesEnabled())
RemoveTabPage( TP_CHAR_TWOLN );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwCharDlg::~SwCharDlg()
{
@@ -130,8 +126,6 @@ SwCharDlg::~SwCharDlg()
Beschreibung: FontList setzen
--------------------------------------------------------------------*/
-
-
void SwCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
@@ -168,10 +162,6 @@ void SwCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
}
}
-/*-----------------14.08.96 11.28-------------------
-
---------------------------------------------------*/
-
SwCharURLPage::SwCharURLPage( Window* pParent,
const SfxItemSet& rCoreSet ) :
SfxTabPage( pParent, SW_RES( TP_CHAR_URL ), rCoreSet ),
@@ -244,19 +234,11 @@ SwCharURLPage::SwCharURLPage( Window* pParent,
}
-/*-----------------15.08.96 09.04-------------------
-
---------------------------------------------------*/
-
SwCharURLPage::~SwCharURLPage()
{
delete pINetItem;
}
-/*-----------------14.08.96 11.31-------------------
-
---------------------------------------------------*/
-
void SwCharURLPage::Reset(const SfxItemSet& rSet)
{
const SfxPoolItem* pItem;
@@ -295,10 +277,6 @@ void SwCharURLPage::Reset(const SfxItemSet& rSet)
}
}
-/*-----------------14.08.96 11.32-------------------
-
---------------------------------------------------*/
-
BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
{
::rtl::OUString sURL = aURLED.GetText();
@@ -348,21 +326,12 @@ BOOL SwCharURLPage::FillItemSet(SfxItemSet& rSet)
return bModified;
}
-
-/*-----------------14.08.96 11.30-------------------
-
---------------------------------------------------*/
-
SfxTabPage* SwCharURLPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwCharURLPage( pParent, rAttrSet ) );
}
-/*-----------------14.08.96 15.00-------------------
-
---------------------------------------------------*/
-
IMPL_LINK( SwCharURLPage, InsertFileHdl, PushButton *, EMPTYARG )
{
FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
@@ -373,9 +342,6 @@ IMPL_LINK( SwCharURLPage, InsertFileHdl, PushButton *, EMPTYARG )
}
return 0;
}
-/*-----------------14.08.96 15.00-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwCharURLPage, EventHdl, PushButton *, EMPTYARG )
{
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 11a7a82b2c5f..2af0b133e6ef 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -31,8 +31,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#include <hintids.hxx>
#define _SVSTDARR_STRINGSDTOR
#define _SVSTDARR_STRINGSISORTDTOR
@@ -44,7 +42,6 @@
#include "wrtsh.hxx"
#include "globals.hrc"
-
#include <vcl/metric.hxx>
#include <svl/stritem.hxx>
#include <editeng/fontitem.hxx>
@@ -90,10 +87,6 @@ static USHORT __FAR_DATA aPageRg[] = {
0
};
-
-
-// class SwDropCapsPict *****************************************************
-
class SwDropCapsPict : public Control
{
String maText;
@@ -196,21 +189,12 @@ static void calcFontHeightAnyAscent( OutputDevice* _pWin, Font& _rFont, long& _n
}
}
-/****************************************************************************
-Pict: Dtor
-****************************************************************************/
-
-
SwDropCapsPict::~SwDropCapsPict()
{
if( mbDelPrinter )
delete mpPrinter;
}
-/****************************************************************************
-Pict: Update Font
-****************************************************************************/
-
#define LINES 10
#define BORDER 2
@@ -266,7 +250,7 @@ void SwDropCapsPict::UpdatePaintSettings( void )
SwCharFmt *pFmt = pPage->rSh.GetCharStyle(
pPage->aTemplateBox.GetSelectEntry(),
SwWrtShell::GETSTYLE_CREATEANY );
- ASSERT(pFmt, "Zeichenvorlage existiert nicht!");
+ OSL_ENSURE(pFmt, "character style doesn't exist!");
const SvxFontItem &rFmtFont = pFmt->GetFont();
aFont.SetFamily (rFmtFont.GetFamily());
@@ -330,7 +314,7 @@ void SwDropCapsPict::Paint(const Rectangle &/*rRect*/)
Size (aOutputSizePixel.Width () - 2 * BORDER,
aOutputSizePixel.Height() - 2 * BORDER))));
- ASSERT(mnLineH > 0, "So klein lassen wir uns nicht machen");
+ OSL_ENSURE(mnLineH > 0, "We cannot make it that small");
long nY0 = (aOutputSizePixel.Height() - (LINES * mnTotLineH)) / 2;
SetFillColor( maTextLineColor );
for (USHORT i = 0; i < LINES; ++i)
@@ -602,7 +586,7 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
pPict->SetBorderStyle( WINDOW_BORDER_MONO );
- // Handler installieren
+ // Install handler
Link aLk = LINK(this, SwDropCapsPage, ModifyHdl);
aDropCapsField.SetModifyHdl( aLk );
aLinesField .SetModifyHdl( aLk );
@@ -617,13 +601,11 @@ SwDropCapsPage::SwDropCapsPage(Window *pParent, const SfxItemSet &rSet) :
Page: Dtor
****************************************************************************/
-
SwDropCapsPage::~SwDropCapsPage()
{
delete pPict;
}
-
int SwDropCapsPage::DeactivatePage(SfxItemSet * _pSet)
{
if ( _pSet )
@@ -636,7 +618,6 @@ int SwDropCapsPage::DeactivatePage(SfxItemSet * _pSet)
Page: Factory
****************************************************************************/
-
SfxTabPage* SwDropCapsPage::Create(Window *pParent,
const SfxItemSet &rSet)
{
@@ -647,7 +628,6 @@ SfxTabPage* SwDropCapsPage::Create(Window *pParent,
Page: FillItemSet-Overload
****************************************************************************/
-
BOOL SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
{
if(bModified)
@@ -659,7 +639,6 @@ BOOL SwDropCapsPage::FillItemSet(SfxItemSet &rSet)
Page: Reset-Overload
****************************************************************************/
-
void SwDropCapsPage::Reset(const SfxItemSet &rSet)
{
// Zeichen, Zeilen, Abstand und Text
@@ -831,13 +810,11 @@ IMPL_LINK_INLINE_START( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
}
IMPL_LINK_INLINE_END( SwDropCapsPage, SelectHdl, ListBox *, EMPTYARG )
-
USHORT* SwDropCapsPage::GetRanges()
{
return aPageRg;
}
-
void SwDropCapsPage::FillSet( SfxItemSet &rSet )
{
if(bModified)
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 355e3950be04..1f92cf21851a 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -32,8 +32,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#include "cmdid.h"
#include "swtypes.hxx"
#include "hintids.hxx"
@@ -48,9 +46,9 @@
#include <fmtline.hxx>
#include <numpara.hxx>
#include <numpara.hrc>
-// --> OD 2008-04-14 #outlinelevel#
+
#include <app.hrc>
-// <--
+
// Globals ******************************************************************
@@ -58,9 +56,7 @@ static USHORT __FAR_DATA aPageRg[] = {
FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT,
0
};
-/*-----------------31.01.98 08:34-------------------
---------------------------------------------------*/
SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
const SfxItemSet& rAttr ) :
SfxTabPage(pParent, SW_RES(TP_NUMPARA), rAttr),
@@ -78,9 +74,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
aRestartParaCountCB ( this, SW_RES( CB_RESTART_PARACOUNT ) ),
aRestartFT ( this, SW_RES( FT_RESTART_NO ) ),
aRestartNF ( this, SW_RES( NF_RESTART_PARA ) ),
- // --> OD 2008-04-14 #outlinelevel#
msOutlineNumbering( SW_RES( STR_OUTLINE_NUMBERING ) ),
- // <--
bModified(FALSE),
bCurNumrule(FALSE)
{
@@ -110,36 +104,24 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(Window* pParent,
aRestartParaCountCB.SetClickHdl(
LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl));
}
-/*-----------------31.01.98 08:34-------------------
---------------------------------------------------*/
SwParagraphNumTabPage::~SwParagraphNumTabPage()
{
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
SfxTabPage* SwParagraphNumTabPage::Create( Window* pParent,
const SfxItemSet& rSet )
{
return new SwParagraphNumTabPage(pParent, rSet);
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
USHORT* SwParagraphNumTabPage::GetRanges()
{
return aPageRg;
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
{
- //<-#outline level, added by zhaojianwei
if( aOutlineLvLB.GetSelectEntryPos() != aOutlineLvLB.GetSavedValue())
{
USHORT aOutlineLv = aOutlineLvLB.GetSelectEntryPos();
@@ -150,7 +132,7 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
delete pOutlineLv;
bModified = TRUE;
}
- //<-end
+
if( aNumberStyleLB.GetSelectEntryPos() != aNumberStyleLB.GetSavedValue())
{
String aStyle;
@@ -189,9 +171,6 @@ BOOL SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
return bModified;
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
{
BOOL bHasNumberStyle = FALSE;
@@ -293,23 +272,18 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet )
bModified = FALSE;
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
void SwParagraphNumTabPage::DisableOutline()
{
aOutlineLvFT.Disable();
aOutlineLvLB.Disable();
}
+
void SwParagraphNumTabPage::DisableNumbering()
{
aNumberStyleFT.Disable();
aNumberStyleLB.Disable();
}
-/*-----------------31.01.98 08:38-------------------
-
---------------------------------------------------*/
void SwParagraphNumTabPage::EnableNewStart()
{
aNewStartCB.Show();
@@ -317,9 +291,6 @@ void SwParagraphNumTabPage::EnableNewStart()
aNewStartNF.Show();
}
-/*-----------------31.01.98 08:56-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG )
{
BOOL bEnable = aNewStartCB.IsChecked();
@@ -328,9 +299,6 @@ IMPL_LINK( SwParagraphNumTabPage, NewStartHdl_Impl, CheckBox*, EMPTYARG )
return 0;
}
-/*-----------------05.02.98 10:01-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG)
{
aRestartParaCountCB.Enable(aCountParaCB.IsChecked());
@@ -343,15 +311,8 @@ IMPL_LINK( SwParagraphNumTabPage, LineCountHdl_Impl, CheckBox* , EMPTYARG)
return 0;
}
-/*-----------------05.02.98 13:39-------------------
-
---------------------------------------------------*/
IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox )
{
-// String dd=aNumberStyleLB.GetSavedValue();
-// if( msOutlineNumbering == dd)
- {
- }
BOOL bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0;
aNewStartCB.Enable(bEnable);
NewStartHdl_Impl(&aNewStartCB);
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index b1429bb6a481..318c1c4ab82e 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -241,12 +241,11 @@ void __EXPORT SwParaDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
}
else if( TP_NUMPARA == nId)
{
- //-->#outline level,added by zhaojianwei
SwTxtFmtColl* pTmpColl = rSh.GetCurTxtFmtColl();
if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() )
{
((SwParagraphNumTabPage&)rPage).DisableOutline() ;
- }//<-end
+ }
((SwParagraphNumTabPage&)rPage).EnableNewStart();
ListBox & rBox = ((SwParagraphNumTabPage&)rPage).GetStyleBox();
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index a9d90a4c02e4..68d94ba56517 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -32,8 +32,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
#include "cmdid.h"
#include <tools/list.hxx>
#include "swmodule.hxx"
@@ -237,22 +235,11 @@ void __EXPORT SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
}
-/****************************************************************************
-
-****************************************************************************/
-
-
USHORT* __EXPORT SwCondCollPage::GetRanges()
{
return aPageRg;
}
-
-/****************************************************************************
-
-****************************************************************************/
-
-
IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
{
const BOOL bEnable = pBox->IsChecked();
@@ -269,11 +256,6 @@ IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
return 0;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
{
SvLBoxEntry* pE = aTbLinks.FirstSelected();
@@ -281,7 +263,7 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
if( !pE || LISTBOX_ENTRY_NOTFOUND ==
( nPos = aTbLinks.GetModel()->GetAbsPos( pE ) ) )
{
- ASSERT( pE, "wo kommt der leere Eintrag her?" );
+ OSL_ENSURE( pE, "where's the empty entry from?" );
return 0;
}
@@ -303,11 +285,6 @@ IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
return 0;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
{
if(pBox == &aFilterLB)
@@ -318,6 +295,7 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
SfxStyleSheetBasePool* pPool = rSh.GetView().GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_PARA, nSearchFlags);
const SfxStyleSheetBase* pBase = pPool->First();
+
while( pBase )
{
if(!pFmt || pBase->GetName() != pFmt->GetName())
@@ -345,11 +323,6 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
return 0;
}
-/****************************************************************************
-
-****************************************************************************/
-
-
void SwCondCollPage::SetCollection( SwFmt* pFormat, BOOL bNew )
{
pFmt = pFormat;
diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx
index 06310f4fdbe1..077ee604aabb 100644
--- a/sw/source/ui/chrdlg/tblnumfm.cxx
+++ b/sw/source/ui/chrdlg/tblnumfm.cxx
@@ -32,9 +32,6 @@
#undef SW_DLLIMPLEMENTATION
#endif
-
-
-
#include <svx/svxids.hrc>
#include <svx/numinf.hxx>
#include <swtypes.hxx>
@@ -52,8 +49,9 @@ SwNumFmtDlg::SwNumFmtDlg(Window* pParent, const SfxItemSet& rSet)
{
// TabPage erzeugen
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- DBG_ASSERT(pFact, "Dialogdiet fail!");
+ OSL_ENSURE(pFact, "Dialogdiet fail!");
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT );
+
if ( fnCreatePage )
{
SfxTabPage* pNewPage = (*fnCreatePage)( this, rSet );
@@ -64,7 +62,6 @@ SwNumFmtDlg::SwNumFmtDlg(Window* pParent, const SfxItemSet& rSet)
}
}
-
SwNumFmtDlg::~SwNumFmtDlg()
{
}