summaryrefslogtreecommitdiff
path: root/sw/source/ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/app')
-rw-r--r--sw/source/ui/app/appenv.cxx76
-rw-r--r--sw/source/ui/app/apphdl.cxx16
-rw-r--r--sw/source/ui/app/appopt.cxx86
-rw-r--r--sw/source/ui/app/docsh.cxx162
-rw-r--r--sw/source/ui/app/docsh2.cxx240
-rw-r--r--sw/source/ui/app/docshini.cxx44
-rw-r--r--sw/source/ui/app/docst.cxx136
-rw-r--r--sw/source/ui/app/docstyle.cxx414
-rw-r--r--sw/source/ui/app/mainwn.cxx12
-rw-r--r--sw/source/ui/app/swmodul1.cxx12
-rw-r--r--sw/source/ui/app/swmodule.cxx2
-rw-r--r--sw/source/ui/app/swwait.cxx18
12 files changed, 609 insertions, 609 deletions
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index ce06c22cfc88..6be2c5b5c3dd 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -105,16 +105,16 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
aText.EraseAllChars( '\r' );
- USHORT nTokenPos = 0;
+ sal_uInt16 nTokenPos = 0;
while( STRING_NOTFOUND != nTokenPos )
{
String aLine = aText.GetToken( 0, '\n', nTokenPos );
while ( aLine.Len() )
{
String sTmpText;
- BOOL bField = FALSE;
+ sal_Bool bField = sal_False;
- USHORT nPos = aLine.Search( '<' );
+ sal_uInt16 nPos = aLine.Search( '<' );
if ( nPos )
{
sTmpText = aLine.Copy( 0, nPos );
@@ -138,14 +138,14 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
// Datenbankfelder muesen mind. 3 Punkte beinhalten!
String sDBName( sTmpText.Copy( 1, sTmpText.Len() - 2));
- USHORT nCnt = sDBName.GetTokenCount('.');
+ sal_uInt16 nCnt = sDBName.GetTokenCount('.');
if (nCnt >= 3)
{
- ::ReplacePoint(sDBName, TRUE);
+ ::ReplacePoint(sDBName, sal_True);
SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, &rSh );
rFldMgr.InsertFld( aData );
sRet = sDBName;
- bField = TRUE;
+ bField = sal_True;
}
}
}
@@ -162,11 +162,11 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
// ----------------------------------------------------------------------------
-void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId)
+void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, sal_uInt16 nCollId)
{
- USHORT nCollCnt = pOldSh->GetTxtFmtCollCount();
+ sal_uInt16 nCollCnt = pOldSh->GetTxtFmtCollCount();
SwTxtFmtColl* pColl;
- for( USHORT nCnt = 0; nCnt < nCollCnt; ++nCnt )
+ for( sal_uInt16 nCnt = 0; nCnt < nCollCnt; ++nCnt )
if(nCollId == (pColl = &pOldSh->GetTxtFmtColl(nCnt))->GetPoolFmtId())
pNewSh->GetTxtCollFromPool(nCollId)->SetFmtAttr(pColl->GetAttrSet());
}
@@ -176,7 +176,7 @@ void lcl_CopyCollAttr(SwWrtShell* pOldSh, SwWrtShell* pNewSh, USHORT nCollId)
void SwModule::InsertEnv( SfxRequest& rReq )
{
-static USHORT nTitleNo = 0;
+static sal_uInt16 nTitleNo = 0;
SwDocShell *pMyDocSh;
SfxViewFrame *pFrame;
@@ -212,7 +212,7 @@ static USHORT nTitleNo = 0;
SwEnvCfgItem aEnvCfg;
//Haben wir schon einen Briefumschlag.
- BOOL bEnvChange = FALSE;
+ sal_Bool bEnvChange = sal_False;
SfxItemSet aSet(GetPool(), FN_ENVELOP, FN_ENVELOP, 0);
aSet.Put(aEnvCfg.GetItem());
@@ -260,7 +260,7 @@ static USHORT nTitleNo = 0;
if (nMode == ENV_NEWDOC || nMode == ENV_INSERT)
{
- SwWait aWait( (SwDocShell&)*xDocSh, TRUE );
+ SwWait aWait( (SwDocShell&)*xDocSh, sal_True );
// Dialog auslesen, Item in Config speichern
const SwEnvItem& rItem = pItem ? *pItem : (const SwEnvItem&) pDlg->GetOutputItemSet()->Get(FN_ENVELOP);
@@ -275,7 +275,7 @@ static USHORT nTitleNo = 0;
{
ASSERT(pOldSh, "Kein Dokument - war 'Einfuegen' nicht disabled???");
SvxPaperBinItem aItem( RES_PAPER_BIN );
- aItem.SetValue((BYTE)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
+ aItem.SetValue((sal_uInt8)pSh->getIDocumentDeviceAccess()->getPrinter(true)->GetPaperBin());
pOldSh->GetPageDescFromPool(RES_POOLPAGE_JAKET)->GetMaster().SetFmtAttr(aItem);
}
@@ -300,7 +300,7 @@ static USHORT nTitleNo = 0;
// Los geht's (Einfuegen)
pSh->StartUndo(UNDO_UI_INSERT_ENVELOPE, NULL);
pSh->StartAllAction();
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
if (bEnvChange)
{
@@ -308,8 +308,8 @@ static USHORT nTitleNo = 0;
pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
// Text der ersten Seite loeschen
- if ( !pSh->SttNxtPg(TRUE) )
- pSh->EndPg(TRUE);
+ if ( !pSh->SttNxtPg(sal_True) )
+ pSh->EndPg(sal_True);
pSh->DelRight();
// Rahmen der ersten Seite loeschen
if( pSh->GotoFly( rSendMark ) )
@@ -322,7 +322,7 @@ static USHORT nTitleNo = 0;
pSh->EnterSelFrmMode();
pSh->DelRight();
}
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
}
else
// Folgevorlage: Seite 1
@@ -332,21 +332,21 @@ static USHORT nTitleNo = 0;
if ( pSh->IsCrsrInTbl() )
{
pSh->SplitNode();
- pSh->Right( CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ pSh->Right( CRSR_SKIP_CHARS, sal_False, 1, sal_False );
SfxItemSet aBreakSet( pSh->GetAttrPool(), RES_BREAK, RES_BREAK, 0 );
aBreakSet.Put( SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
pSh->SetTblAttr( aBreakSet );
}
else
- pSh->InsertPageBreak(0, FALSE);
- pSh->SttEndDoc(TRUE);
+ pSh->InsertPageBreak(0, sal_False);
+ pSh->SttEndDoc(sal_True);
}
else
{
pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
// Los geht's (Drucken)
pSh->StartAllAction();
- pSh->DoUndo(FALSE);
+ pSh->DoUndo(sal_False);
// Neue Collections "Absender" und "Empfaenger" wieder in neues
// Dokument kopieren
@@ -383,8 +383,8 @@ static USHORT nTitleNo = 0;
long lLeft = rItem.lShiftRight,
lUpper = rItem.lShiftDown;
- USHORT nPageW = (USHORT) Max(rItem.lWidth, rItem.lHeight),
- nPageH = (USHORT) Min(rItem.lWidth, rItem.lHeight);
+ sal_uInt16 nPageW = (sal_uInt16) Max(rItem.lWidth, rItem.lHeight),
+ nPageH = (sal_uInt16) Min(rItem.lWidth, rItem.lHeight);
switch (rItem.eAlign)
{
@@ -401,18 +401,18 @@ static USHORT nTitleNo = 0;
}
SvxLRSpaceItem aLRMargin( RES_LR_SPACE );
SvxULSpaceItem aULMargin( RES_UL_SPACE );
- aLRMargin.SetLeft ((USHORT) lLeft );
- aULMargin.SetUpper((USHORT) lUpper);
+ aLRMargin.SetLeft ((sal_uInt16) lLeft );
+ aULMargin.SetUpper((sal_uInt16) lUpper);
aLRMargin.SetRight(0);
aULMargin.SetLower(0);
rFmt.SetFmtAttr(aLRMargin);
rFmt.SetFmtAttr(aULMargin);
// Kopf-, Fusszeilen
- rFmt.SetFmtAttr(SwFmtHeader(BOOL(FALSE)));
- pDesc->ChgHeaderShare(FALSE);
- rFmt.SetFmtAttr(SwFmtFooter(BOOL(FALSE)));
- pDesc->ChgFooterShare(FALSE);
+ rFmt.SetFmtAttr(SwFmtHeader(sal_Bool(sal_False)));
+ pDesc->ChgHeaderShare(sal_False);
+ rFmt.SetFmtAttr(SwFmtFooter(sal_Bool(sal_False)));
+ pDesc->ChgFooterShare(sal_False);
// Seitennumerierung
pDesc->SetUseOn(nsUseOnPage::PD_ALL);
@@ -436,9 +436,9 @@ static USHORT nTitleNo = 0;
// Page-Desc anwenden
- USHORT nPos;
+ sal_uInt16 nPos;
pSh->FindPageDescByName( pDesc->GetName(),
- FALSE,
+ sal_False,
&nPos );
@@ -446,7 +446,7 @@ static USHORT nTitleNo = 0;
pSh->ChgCurPageDesc(*pDesc);
// Rahmen einfuegen
- SwFlyFrmAttrMgr aMgr(FALSE, pSh, FRMMGR_TYPE_ENVELP);
+ SwFlyFrmAttrMgr aMgr(sal_False, pSh, FRMMGR_TYPE_ENVELP);
SwFldMgr aFldMgr;
aMgr.SetHeightSizeType(ATT_VAR_SIZE);
@@ -458,7 +458,7 @@ static USHORT nTitleNo = 0;
// Absender
if (rItem.bSend)
{
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lSendFromLeft + lLeft, rItem.lSendFromTop + lUpper),
Size (rItem.lAddrFromLeft - rItem.lSendFromLeft, 0));
@@ -473,7 +473,7 @@ static USHORT nTitleNo = 0;
}
// Empfaenger
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper),
@@ -490,12 +490,12 @@ static USHORT nTitleNo = 0;
pSh->SetPageObjsNewPage(aFlyArr, 1);
// Fertig
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
pSh->EndAllAction();
if (nMode == ENV_NEWDOC)
- pSh->DoUndo(TRUE);
+ pSh->DoUndo(sal_True);
else
pSh->EndUndo(UNDO_UI_INSERT_ENVELOPE);
@@ -505,7 +505,7 @@ static USHORT nTitleNo = 0;
if ( rItem.aAddrText.indexOf('<') >= 0 )
{
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_SBA_BRW_UPDATE,
SID_SBA_BRW_INSERT,
@@ -523,7 +523,7 @@ static USHORT nTitleNo = 0;
{
rReq.AppendItem( rItem );
if ( nMode == ENV_NEWDOC )
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_True ) );
}
rReq.Done();
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 653208aaf250..9ed011cdad78 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -202,7 +202,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
}
break;
case SID_ATTR_METRIC:
- rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(::GetDfltMetric(bWebView))));
+ rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(::GetDfltMetric(bWebView))));
break;
case FN_SET_MODOPT_TBLNUMFMT:
rSet.Put( SfxBoolItem( nWhich, pModuleConfig->
@@ -225,7 +225,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL)
{
SfxStringItem aURL(SID_FILE_NAME, rURL);
SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") );
- SfxBoolItem aHidden( SID_HIDDEN, TRUE );
+ SfxBoolItem aHidden( SID_HIDDEN, sal_True );
SfxStringItem aReferer(SID_REFERER, pView->GetDocShell()->GetTitle());
SfxObjectItem* pItem = (SfxObjectItem*)pView->GetViewFrame()->GetDispatcher()->
Execute(SID_OPENDOC, SFX_CALLMODE_SYNCHRON,
@@ -337,7 +337,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
m_pMMConfig->SetSourceView( m_pView );
m_pView->SetMailMergeConfigItem(0, 0, sal_True);
SfxViewFrame* pViewFrame = m_pView->GetViewFrame();
- pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, FALSE);
+ pViewFrame->ShowChildWindow(FN_MAILMERGE_CHILDWINDOW, sal_False);
DBG_ASSERT(m_pMMConfig, "no MailMergeConfigItem available");
bRestoreWizard = true;
}
@@ -750,7 +750,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
else if(rHint.ISA(SfxSimpleHint))
{
- USHORT nHintId = ((SfxSimpleHint&)rHint).GetId();
+ sal_uInt16 nHintId = ((SfxSimpleHint&)rHint).GetId();
if(SFX_HINT_DEINITIALIZING == nHintId)
{
DELETEZ(pWebUsrPref);
@@ -798,7 +798,7 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
{
if( pBrdCst == pUserOptions )
{
- bAuthorInitialised = FALSE;
+ bAuthorInitialised = sal_False;
}
else if( pBrdCst == pUndoOptions )
{
@@ -817,7 +817,7 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, sal
pDocShell = (SwDocShell*)SfxObjectShell::GetNext(*pDocShell, &aType);
}
}
- SwEditShell::SetUndoActionCount( static_cast< USHORT >(nNew));
+ SwEditShell::SetUndoActionCount( static_cast< sal_uInt16 >(nNew));
}
else if ( pBrdCst == pColorConfig || pBrdCst == pAccessibilityOptions )
{
@@ -952,11 +952,11 @@ const SwMasterUsrPref *SwModule::GetUsrPref(sal_Bool bWeb) const
{
// im Load der SwMasterUsrPref wird der SpellChecker gebraucht, dort darf
// er aber nicht angelegt werden #58256#
- pNonConstModule->pWebUsrPref = new SwMasterUsrPref(TRUE);
+ pNonConstModule->pWebUsrPref = new SwMasterUsrPref(sal_True);
}
else if(!bWeb && !pUsrPref)
{
- pNonConstModule->pUsrPref = new SwMasterUsrPref(FALSE);
+ pNonConstModule->pUsrPref = new SwMasterUsrPref(sal_False);
}
return bWeb ? pWebUsrPref : pUsrPref;
}
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index a1e6cef80cd1..5f2697405cb3 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -86,9 +86,9 @@ using namespace ::com::sun::star::lang;
*
* --------------------------------------------------*/
-SfxItemSet* SwModule::CreateItemSet( USHORT nId )
+SfxItemSet* SwModule::CreateItemSet( sal_uInt16 nId )
{
- BOOL bTextDialog = (nId == SID_SW_EDITOPTIONS) ? TRUE : FALSE;
+ sal_Bool bTextDialog = (nId == SID_SW_EDITOPTIONS) ? sal_True : sal_False;
// hier werden die Optionen fuer die Web- und den Textdialog zusmmengesetzt
SwViewOption aViewOpt = *GetUsrPref(!bTextDialog);
@@ -100,7 +100,7 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
if(pAppView)
{
// wenn Text dann nicht WebView und umgekehrt
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView && !bTextDialog) ||(!bWebView && bTextDialog))
{
aViewOpt = *pAppView->GetWrtShell().GetViewOptions();
@@ -197,20 +197,20 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
pRet->Put(SwPtrItem(FN_PARAM_STDFONTS, GetStdFontConfig()));
if( PTR_CAST( SwPagePreView, SfxViewShell::Current())!=0)
{
- SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, TRUE));
+ SfxBoolItem aBool(SfxBoolItem(SID_PRINTPREVIEW, sal_True));
pRet->Put(aBool);
}
FieldUnit eUnit = pPref->GetHScrollMetric();
if(pAppView)
pAppView->GetHLinealMetric(eUnit);
- pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< UINT16 >(eUnit)));
+ pRet->Put(SfxUInt16Item( FN_HSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit)));
eUnit = pPref->GetVScrollMetric();
if(pAppView)
pAppView->GetVLinealMetric(eUnit);
- pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< UINT16 >(eUnit) ));
- pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< UINT16 >(pPref->GetMetric()) ));
+ pRet->Put(SfxUInt16Item( FN_VSCROLL_METRIC, static_cast< sal_uInt16 >(eUnit) ));
+ pRet->Put(SfxUInt16Item( SID_ATTR_METRIC, static_cast< sal_uInt16 >(pPref->GetMetric()) ));
if(bTextDialog)
{
if(pAppView)
@@ -218,10 +218,10 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
const SvxTabStopItem& rDefTabs =
(const SvxTabStopItem&)pAppView->GetWrtShell().
GetDefault(RES_PARATR_TABSTOP);
- pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (USHORT)::GetTabDist(rDefTabs)));
+ pRet->Put( SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)::GetTabDist(rDefTabs)));
}
else
- pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (UINT16)pPref->GetDefTab()));
+ pRet->Put(SfxUInt16Item( SID_ATTR_DEFTABSTOP, (sal_uInt16)pPref->GetDefTab()));
}
/*-----------------01.02.97 11.13-------------------
@@ -235,8 +235,8 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
aGridItem.SetGridVisible( aViewOpt.IsGridVisible());
const Size& rSnapSize = aViewOpt.GetSnapSize();
- aGridItem.SetFldDrawX( (USHORT) (rSnapSize.Width() ));
- aGridItem.SetFldDrawY( (USHORT) (rSnapSize.Height()));
+ aGridItem.SetFldDrawX( (sal_uInt16) (rSnapSize.Width() ));
+ aGridItem.SetFldDrawY( (sal_uInt16) (rSnapSize.Height()));
aGridItem.SetFldDivisionX( aViewOpt.GetDivisionX());
aGridItem.SetFldDivisionY( aViewOpt.GetDivisionY());
@@ -292,16 +292,16 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
/* -----------------12.02.99 12:28-------------------
*
* --------------------------------------------------*/
-void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
- BOOL bTextDialog = nId == SID_SW_EDITOPTIONS;
+ sal_Bool bTextDialog = nId == SID_SW_EDITOPTIONS;
SwView* pAppView = GetView();
if(pAppView && pAppView->GetViewFrame() != SfxViewFrame::Current())
pAppView = 0;
if(pAppView)
{
// the text dialog mustn't apply data to the web view and vice versa
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pAppView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pAppView);
if( (bWebView == bTextDialog))
pAppView = 0; //
}
@@ -316,18 +316,18 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
/*---------------------------------------------------------------------
Seite Dokumentansicht auswerten
-----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_DOCDISP, sal_False, &pItem ))
{
const SwDocDisplayItem* pDocDispItem = (const SwDocDisplayItem*)pItem;
if(!aViewOpt.IsViewMetaChars())
{
- if( (!aViewOpt.IsTab( TRUE ) && pDocDispItem->bTab) ||
- (!aViewOpt.IsBlank( TRUE ) && pDocDispItem->bSpace) ||
- (!aViewOpt.IsParagraph( TRUE ) && pDocDispItem->bParagraphEnd) ||
- (!aViewOpt.IsLineBreak( TRUE ) && pDocDispItem->bManualBreak) )
+ if( (!aViewOpt.IsTab( sal_True ) && pDocDispItem->bTab) ||
+ (!aViewOpt.IsBlank( sal_True ) && pDocDispItem->bSpace) ||
+ (!aViewOpt.IsParagraph( sal_True ) && pDocDispItem->bParagraphEnd) ||
+ (!aViewOpt.IsLineBreak( sal_True ) && pDocDispItem->bManualBreak) )
{
- aViewOpt.SetViewMetaChars(TRUE);
+ aViewOpt.SetViewMetaChars(sal_True);
if(pBindings)
pBindings->Invalidate(FN_VIEW_META_CHARS);
}
@@ -345,20 +345,20 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
Elemente - Item auswerten
-----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ELEM, sal_False, &pItem ) )
{
const SwElemItem* pElemItem = (const SwElemItem*)pItem;
pElemItem->FillViewOptions( aViewOpt );
}
- if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_METRIC, sal_False, &pItem ) )
{
SFX_APP()->SetOptions(rSet);
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
::SetDfltMetric((FieldUnit)pMetricItem->GetValue(), !bTextDialog);
}
- if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(FN_HSCROLL_METRIC, sal_False, &pItem ) )
{
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue();
@@ -367,7 +367,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
pAppView->ChangeTabMetric(eUnit);
}
- if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(FN_VSCROLL_METRIC, sal_False, &pItem ) )
{
const SfxUInt16Item* pMetricItem = (const SfxUInt16Item*)pItem;
FieldUnit eUnit = (FieldUnit)pMetricItem->GetValue();
@@ -376,9 +376,9 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
pAppView->ChangeVLinealMetric(eUnit);
}
- if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_DEFTABSTOP, sal_False, &pItem ) )
{
- USHORT nTabDist = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTabDist = ((const SfxUInt16Item*)pItem)->GetValue();
pPref->SetDefTab(nTabDist);
if(pAppView)
{
@@ -403,7 +403,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
Seite Rastereinstellungen auswerten
----------------------------------------------------------------------*/
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS, sal_False, &pItem ))
{
const SvxGridItem* pGridItem = (const SvxGridItem*)pItem;
@@ -433,7 +433,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
// Writer Drucker Zusatzeinstellungen auswerten
//----------------------------------------------------------------------------
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_ADDPRINTER, sal_False, &pItem ))
{
SwPrintOptions* pOpt = GetPrtOptions(!bTextDialog);
if (pOpt)
@@ -447,7 +447,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_SHADOWCURSOR, sal_False, &pItem ))
{
((SwShadowCursorItem*)pItem)->FillViewOptions( aViewOpt );
if(pBindings)
@@ -465,7 +465,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
rWrtSh.AlignAllFormulasToBaseline();
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_CRSR_IN_PROTECTED, sal_False, &pItem ))
{
aViewOpt.SetCursorInProtectedArea(((const SfxBoolItem*)pItem)->GetValue());
}
@@ -477,19 +477,19 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
----------------------------------------------------------------------------*/
if( SFX_ITEM_SET == rSet.GetItemState(
- FN_PARAM_SWTEST, FALSE, &pItem ))
+ FN_PARAM_SWTEST, sal_False, &pItem ))
{
const SwTestItem* pTestItem = (const SwTestItem*)pItem;
- aViewOpt.SetTest1((BOOL)pTestItem->bTest1);
- aViewOpt.SetTest2((BOOL)pTestItem->bTest2);
- aViewOpt.SetTest3((BOOL)pTestItem->bTest3);
- aViewOpt.SetTest4((BOOL)pTestItem->bTest4);
- aViewOpt.SetTest5((BOOL)pTestItem->bTest5);
- aViewOpt.SetTest6((BOOL)pTestItem->bTest6);
- aViewOpt.SetTest7((BOOL)pTestItem->bTest7);
- aViewOpt.SetTest8((BOOL)pTestItem->bTest8);
- SwViewOption::SetTest9((BOOL)pTestItem->bTest9);
- aViewOpt.SetTest10((BOOL)pTestItem->bTest10);
+ aViewOpt.SetTest1((sal_Bool)pTestItem->bTest1);
+ aViewOpt.SetTest2((sal_Bool)pTestItem->bTest2);
+ aViewOpt.SetTest3((sal_Bool)pTestItem->bTest3);
+ aViewOpt.SetTest4((sal_Bool)pTestItem->bTest4);
+ aViewOpt.SetTest5((sal_Bool)pTestItem->bTest5);
+ aViewOpt.SetTest6((sal_Bool)pTestItem->bTest6);
+ aViewOpt.SetTest7((sal_Bool)pTestItem->bTest7);
+ aViewOpt.SetTest8((sal_Bool)pTestItem->bTest8);
+ SwViewOption::SetTest9((sal_Bool)pTestItem->bTest9);
+ aViewOpt.SetTest10((sal_Bool)pTestItem->bTest10);
}
#endif
// dann an der akt. View und Shell die entsp. Elemente setzen
@@ -498,7 +498,7 @@ void SwModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
/* -----------------12.02.99 12:28-------------------
*
* --------------------------------------------------*/
-SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SwModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = NULL;
SfxAllItemSet aSet(*(rSet.GetPool()));
@@ -567,7 +567,7 @@ SfxTabPage* SwModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemS
if(pCurrView)
{
// wenn Text dann nicht WebView und umgekehrt
- BOOL bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
+ sal_Bool bWebView = 0 != PTR_CAST(SwWebView, pCurrView);
if( (bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE == nId) ||
(!bWebView && RID_SW_TP_HTML_OPTTABLE_PAGE != nId) )
{
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index c839b5c03f52..b30b0f1198c5 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -150,11 +150,11 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
SwCrsrShell *pCrsrShell,
SwPaM* pPaM )
{
- BOOL bAPICall = FALSE;
+ sal_Bool bAPICall = sal_False;
const SfxPoolItem* pApiItem;
const SfxItemSet* pMedSet;
if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SFX_ITEM_SET ==
- pMedSet->GetItemState( FN_API_CALL, TRUE, &pApiItem ) )
+ pMedSet->GetItemState( FN_API_CALL, sal_True, &pApiItem ) )
bAPICall = ((const SfxBoolItem*)pApiItem)->GetValue();
const SfxFilter* pFlt = rMedium.GetFilter();
@@ -198,7 +198,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
{
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPassItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPassItem))
+ if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, sal_True, &pPassItem))
aPasswd = ((const SfxStringItem *)pPassItem)->GetValue();
}
@@ -224,7 +224,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
const SfxItemSet* pSet;
const SfxPoolItem* pItem;
if( 0 != ( pSet = rMedium.GetItemSet() ) && SFX_ITEM_SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) )
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) )
aOpt.ReadUserData( ((const SfxStringItem*)pItem)->GetValue() );
if( pRead )
@@ -238,17 +238,17 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
Beschreibung: Laden
--------------------------------------------------------------------*/
-BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
+sal_Bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertFrom" );
SwReader* pRdr;
SwRead pRead = StartConvertFrom(rMedium, &pRdr);
if (!pRead)
- return FALSE; // #129881# return if no reader is found
+ return sal_False; // #129881# return if no reader is found
SotStorageRef pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
// SfxProgress unterdruecken, wenn man Embedded ist
SW_MOD()->SetEmbeddedLoadSave(
@@ -259,7 +259,7 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
/* #106748# Restore the pool default if reading a saved document. */
pDoc->RemoveAllFmtLanguageDependencies();
- ULONG nErr = pRdr->Read( *pRead );
+ sal_uLong nErr = pRdr->Read( *pRead );
// Evtl. ein altes Doc weg
if ( pDoc != pRdr->GetDoc() )
@@ -279,10 +279,10 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
delete pRdr;
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- BOOL bOk = !IsError( nErr );
+ sal_Bool bOk = !IsError( nErr );
// --> OD 2006-11-07 #i59688#
// // StartFinishedLoading rufen. Nicht bei asynchronen Filtern!
@@ -305,13 +305,13 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
--------------------------------------------------------------------*/
-BOOL SwDocShell::Save()
+sal_Bool SwDocShell::Save()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::Save" );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
pView->GetEditWin().StopQuickHelp();
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
CalcLayoutForOLEObjects(); // format for OLE objets
// --> OD 2006-03-17 #i62875#
@@ -324,7 +324,7 @@ BOOL SwDocShell::Save()
}
// <--
- ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
if( SfxObjectShell::Save() )
{
switch( GetCreateMode() )
@@ -337,16 +337,16 @@ BOOL SwDocShell::Save()
{
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt );
- xWrt->SetOrganizerMode( TRUE );
+ xWrt->SetOrganizerMode( sal_True );
SwWriter aWrt( *GetMedium(), *pDoc );
nErr = aWrt.Write( xWrt );
- xWrt->SetOrganizerMode( FALSE );
+ xWrt->SetOrganizerMode( sal_False );
}
break;
case SFX_CREATE_MODE_EMBEDDED:
// SfxProgress unterdruecken, wenn man Embedded ist
- SW_MOD()->SetEmbeddedLoadSave( TRUE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_True );
// kein break;
case SFX_CREATE_MODE_STANDARD:
@@ -357,10 +357,10 @@ BOOL SwDocShell::Save()
{
//TODO/MBA: it looks as that this code can be removed!
//SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
- //aTmp.SaveOrDelMSVBAStorage( FALSE, aEmptyStr );
+ //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) (*this) );
- pDoc->SetContainsMSVBasic( FALSE );
+ pDoc->SetContainsMSVBasic( sal_False );
}
// TabellenBox Edit beenden!
@@ -370,11 +370,11 @@ BOOL SwDocShell::Save()
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, GetMedium()->GetBaseURL( true ), xWrt );
- BOOL bLockedView(FALSE);
+ sal_Bool bLockedView(sal_False);
if ( pWrtShell )
{
bLockedView = pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
}
SwWriter aWrt( *GetMedium(), *pDoc );
@@ -385,7 +385,7 @@ BOOL SwDocShell::Save()
}
break;
}
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
}
SetError( nErr ? nErr : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
@@ -406,7 +406,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveAs" );
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if(pView)
pView->GetEditWin().StopQuickHelp();
@@ -455,7 +455,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
}
// <--
- ULONG nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
+ sal_uLong nErr = ERR_SWG_WRITE_ERROR, nVBWarning = ERRCODE_NONE;
uno::Reference < embed::XStorage > xStor = rMedium.GetOutputStorage();
if( SfxObjectShell::SaveAs( rMedium ) )
{
@@ -479,10 +479,10 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
//TODO/MBA: it looks as that this code can be removed!
//SvxImportMSVBasic aTmp( *this, pIo->GetStorage() );
- //aTmp.SaveOrDelMSVBAStorage( FALSE, aEmptyStr );
+ //aTmp.SaveOrDelMSVBAStorage( sal_False, aEmptyStr );
if( SvtFilterOptions::Get()->IsLoadWordBasicStorage() )
nVBWarning = GetSaveWarningOfMSVBAStorage( (SfxObjectShell&) *this );
- pDoc->SetContainsMSVBasic( FALSE );
+ pDoc->SetContainsMSVBasic( sal_False );
}
// TabellenBox Edit beenden!
@@ -491,7 +491,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
// Modified-Flag merken und erhalten ohne den Link zu Callen
// (fuer OLE; nach Anweisung von MM)
- BOOL bIsModified = pDoc->IsModified();
+ sal_Bool bIsModified = pDoc->IsModified();
SwUndoNoModifiedPosition aOldPos = pDoc->getUndoNoModifiedPosition();
Link aOldOLELnk( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
@@ -503,11 +503,11 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
WriterRef xWrt;
::GetXMLWriter( aEmptyStr, rMedium.GetBaseURL( true ), xWrt );
- BOOL bLockedView(FALSE);
+ sal_Bool bLockedView(sal_False);
if ( pWrtShell )
{
bLockedView = pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
}
SwWriter aWrt( rMedium, *pDoc );
@@ -523,7 +523,7 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
}
pDoc->SetOle2Link( aOldOLELnk );
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
}
SetError( nErr ? nErr : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
@@ -541,12 +541,12 @@ SwSrcView* lcl_GetSourceView( SwDocShell* pSh )
return PTR_CAST( SwSrcView, pViewShell);
}
-BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
+sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::ConvertTo" );
const SfxFilter* pFlt = rMedium.GetFilter();
if( !pFlt )
- return FALSE;
+ return sal_False;
WriterRef xWriter;
SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter );
@@ -554,7 +554,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
{ // Der Filter ist nicht vorhanden
InfoBox( 0,
SW_RESSTR(STR_DLLNOTFOUND) ).Execute();
- return FALSE;
+ return sal_False;
}
//#i3370# remove quick help to prevent saving of autocorrection suggestions
@@ -569,22 +569,22 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
pView->GetPostItMgr()->UpdateDataOnActiveSidebarWin();
}
- ULONG nVBWarning = 0;
+ sal_uLong nVBWarning = 0;
if( pDoc->ContainsMSVBasic() )
{
- BOOL bSave = pFlt->GetUserData().EqualsAscii( "CWW8" )
+ sal_Bool bSave = pFlt->GetUserData().EqualsAscii( "CWW8" )
&& SvtFilterOptions::Get()->IsLoadWordBasicStorage();
if ( bSave )
{
- SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), FALSE );
+ SvStorageRef xStg = new SotStorage( rMedium.GetOutStream(), sal_False );
DBG_ASSERT( !xStg->GetError(), "No storage available for storing VBA macros!" );
if ( !xStg->GetError() )
{
nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") );
xStg->Commit();
- pDoc->SetContainsMSVBasic( TRUE );
+ pDoc->SetContainsMSVBasic( sal_True );
}
}
}
@@ -642,15 +642,15 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
pFlt->GetUserData().EqualsAscii( FILTER_XMLVW ) ) )
{
// eigenen Typ ermitteln
- BYTE nMyType = 0;
+ sal_uInt8 nMyType = 0;
if( ISA( SwWebDocShell) )
nMyType = 1;
else if( ISA( SwGlobalDocShell) )
nMyType = 2;
// gewuenschten Typ ermitteln
- BYTE nSaveType = 0;
- ULONG nSaveClipId = pFlt->GetFormat();
+ sal_uInt8 nSaveType = 0;
+ sal_uLong nSaveClipId = pFlt->GetFormat();
if( SOT_FORMATSTR_ID_STARWRITERWEB_8 == nSaveClipId ||
SOT_FORMATSTR_ID_STARWRITERWEB_60 == nSaveClipId ||
SOT_FORMATSTR_ID_STARWRITERWEB_50 == nSaveClipId ||
@@ -663,9 +663,9 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
nSaveType = 2;
// Flags am Dokument entsprechend umsetzen
- BOOL bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
- BOOL bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
- BOOL bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
+ sal_Bool bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
+ sal_Bool bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
+ sal_Bool bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
if( nMyType != nSaveType )
{
GetDoc()->set(IDocumentSettingAccess::HTML_MODE, 1 == nSaveType);
@@ -692,7 +692,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
}
// Jetzt das Dokument normal speichern
- BOOL bRet = SaveAs( rMedium );
+ sal_Bool bRet = SaveAs( rMedium );
if( nMyType != nSaveType )
{
@@ -733,7 +733,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
if( 0 != ( pSet = rMedium.GetItemSet() ) )
{
if( SFX_ITEM_SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS,
- TRUE, &pItem ) )
+ sal_True, &pItem ) )
sItemOpt = ((const SfxStringItem*)pItem)->GetValue();
}
if(sItemOpt.Len())
@@ -747,26 +747,26 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
SFX_CREATE_MODE_EMBEDDED == GetCreateMode());
// Kontext aufspannen, um die Anzeige der Selektion zu unterbinden
- ULONG nErrno;
+ sal_uLong nErrno;
String aFileName( rMedium.GetName() );
//Keine View also das ganze Dokument!
if ( pWrtShell )
{
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
// --> OD 2009-12-31 #i106906#
const sal_Bool bFormerLockView = pWrtShell->IsViewLocked();
pWrtShell->LockView( sal_True );
// <--
pWrtShell->StartAllAction();
pWrtShell->Push();
- SwWriter aWrt( rMedium, *pWrtShell, TRUE );
+ SwWriter aWrt( rMedium, *pWrtShell, sal_True );
nErrno = aWrt.Write( xWriter, &aFileName );
//JP 16.05.97: falls der SFX uns die View waehrend des speicherns
// entzieht
if( pWrtShell )
{
- pWrtShell->Pop(FALSE);
+ pWrtShell->Pop(sal_False);
pWrtShell->EndAllAction();
// --> OD 2009-12-31 #i106906#
pWrtShell->LockView( bFormerLockView );
@@ -789,7 +789,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
}
}
- SW_MOD()->SetEmbeddedLoadSave( FALSE );
+ SW_MOD()->SetEmbeddedLoadSave( sal_False );
SetError( nErrno ? nErrno : nVBWarning, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
if( !rMedium.IsStorage() )
rMedium.CloseOutStream();
@@ -803,14 +803,14 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
/*--------------------------------------------------------------------
- Beschreibung: ??? noch nicht zu aktivieren, muss TRUE liefern
+ Beschreibung: ??? noch nicht zu aktivieren, muss sal_True liefern
--------------------------------------------------------------------*/
sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xStor )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDocShell::SaveCompleted" );
- BOOL bRet = SfxObjectShell::SaveCompleted( xStor );
+ sal_Bool bRet = SfxObjectShell::SaveCompleted( xStor );
if( bRet )
{
// erst hier entscheiden, ob das Speichern geklappt hat oder nicht
@@ -822,9 +822,9 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
if( pOLEChildList )
{
- BOOL bResetModified = IsEnableSetModified();
+ sal_Bool bResetModified = IsEnableSetModified();
if( bResetModified )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
uno::Sequence < rtl::OUString > aNames = pOLEChildList->GetObjectNames();
for( sal_Int32 n = aNames.getLength(); n; n-- )
@@ -841,7 +841,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
DELETEZ( pOLEChildList );
if( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
return bRet;
}
@@ -851,12 +851,12 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
--------------------------------------------------------------------*/
void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
- USHORT nAspect )
+ sal_uInt16 nAspect )
{
//fix #25341# Draw sollte das Modified nicht beeinflussen
- BOOL bResetModified;
- if ( TRUE == (bResetModified = IsEnableSetModified()) )
- EnableSetModified( FALSE );
+ sal_Bool bResetModified;
+ if ( sal_True == (bResetModified = IsEnableSetModified()) )
+ EnableSetModified( sal_False );
//sollte am Document ein JobSetup haengen, dann kopieren wir uns diesen,
//um nach dem PrtOle2 diesen wieder am Doc zu verankern.
@@ -878,7 +878,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
pDev->SetFillColor();
pDev->SetLineColor();
pDev->SetBackground();
- BOOL bWeb = 0 != PTR_CAST(SwWebDocShell, this);
+ sal_Bool bWeb = 0 != PTR_CAST(SwWebDocShell, this);
SwPrintData aOpts;
ViewShell::PrtOle2( pDoc, SW_MOD()->GetUsrPref(bWeb), aOpts, pDev, aRect );
pDev->Pop();
@@ -889,7 +889,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
delete pOrig;
}
if ( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
@@ -911,14 +911,14 @@ void SwDocShell::SetVisArea( const Rectangle &rRect )
aRect.Move( nMoveX, nMoveY );
//Ruft das SfxInPlaceObject::SetVisArea()!
- pView->SetVisArea( aRect, TRUE );
+ pView->SetVisArea( aRect, sal_True );
}
else
SfxObjectShell::SetVisArea( aRect );
}
-Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
+Rectangle SwDocShell::GetVisArea( sal_uInt16 nAspect ) const
{
if ( nAspect == ASPECT_THUMBNAIL )
{
@@ -926,7 +926,7 @@ Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 1 );
SwCntntNode* pNd = pDoc->GetNodes().GoNext( &aIdx );
- const SwRect aPageRect = pNd->FindPageFrmRect( FALSE, 0, FALSE );
+ const SwRect aPageRect = pNd->FindPageFrmRect( sal_False, 0, sal_False );
return aPageRect.SVRect();
// Why does this have to be that complicated? I replaced this by the
@@ -939,8 +939,8 @@ Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
pDesc = &const_cast<const SwDoc *>(pDoc)->GetPageDesc( 0 );
//Das Format wird evtl. von der virtuellen Seitennummer bestimmt.
- const USHORT nPgNum = rDesc.GetNumOffset();
- const BOOL bOdd = nPgNum % 2 ? TRUE : FALSE;
+ const sal_uInt16 nPgNum = rDesc.GetNumOffset();
+ const sal_Bool bOdd = nPgNum % 2 ? sal_True : sal_False;
const SwFrmFmt *pFmt = bOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt();
if ( !pFmt ) //#40568#
pFmt = bOdd ? pDesc->GetLeftFmt() : pDesc->GetRightFmt();
@@ -976,7 +976,7 @@ void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter )
GetDoc()->setPrinter( 0, true, true );
}
-ULONG SwDocShell::GetMiscStatus() const
+sal_uLong SwDocShell::GetMiscStatus() const
{
return SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE;
}
@@ -1026,7 +1026,7 @@ sal_uInt16 SwDocShell::GetHiddenInformationState( sal_uInt16 nStates )
void SwDocShell::GetState(SfxItemSet& rSet)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -1044,7 +1044,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
// break;
case SID_PRINTPREVIEW:
{
- BOOL bDisable = IsInPlaceActive();
+ sal_Bool bDisable = IsInPlaceActive();
if ( !bDisable )
{
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
@@ -1053,7 +1053,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
if ( PTR_CAST(SwView, pTmpFrm->GetViewShell()) &&
((SwView*)pTmpFrm->GetViewShell())->GetWrtShell().getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE))
{
- bDisable = TRUE;
+ bDisable = sal_True;
break;
}
pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this);
@@ -1063,9 +1063,9 @@ void SwDocShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( SID_PRINTPREVIEW );
else
{
- SfxBoolItem aBool( SID_PRINTPREVIEW, FALSE );
+ SfxBoolItem aBool( SID_PRINTPREVIEW, sal_False );
if( PTR_CAST( SwPagePreView, SfxViewShell::Current()) )
- aBool.SetValue( TRUE );
+ aBool.SetValue( sal_True );
rSet.Put( aBool );
}
}
@@ -1074,7 +1074,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
{
SfxViewShell* pCurrView = GetView() ? (SfxViewShell*)GetView()
: SfxViewShell::Current();
- BOOL bSourceView = 0 != PTR_CAST(SwSrcView, pCurrView);
+ sal_Bool bSourceView = 0 != PTR_CAST(SwSrcView, pCurrView);
rSet.Put(SfxBoolItem(SID_SOURCEVIEW, bSourceView));
}
break;
@@ -1119,7 +1119,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
case SID_ATTR_YEAR2000:
{
- const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(FALSE);
+ const SvNumberFormatter* pFmtr = pDoc->GetNumberFormatter(sal_False);
rSet.Put( SfxUInt16Item( nWhich,
static_cast< sal_uInt16 >(
pFmtr ? pFmtr->GetYear2000()
@@ -1168,7 +1168,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
// Bit 1: -> neuer Zustand
long nStatus = (long)p;
if( IsEnableSetModified() )
- SetModified( (nStatus & 2) ? TRUE : FALSE );
+ SetModified( (nStatus & 2) ? sal_True : sal_False );
return 0;
}
@@ -1217,7 +1217,7 @@ void SwDocShell::LoadingFinished()
// if ( IsEnableSetModified() &&
// pDoc->IsModified() && pDoc->LinksUpdated() )
// {
-// EnableSetModified( FALSE );
+// EnableSetModified( sal_False );
// bResetEnableSetModified = true;
// }
// <--
@@ -1225,7 +1225,7 @@ void SwDocShell::LoadingFinished()
// // --> OD 2005-02-11 #i38810#
// if ( bResetEnableSetModified )
// {
-// EnableSetModified( TRUE );
+// EnableSetModified( sal_True );
// }
// // <--
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst(this);
@@ -1308,7 +1308,7 @@ void SwDocShell::CalcLayoutForOLEObjects()
// read by the binary filter:
void SwDocShell::UpdateLinks()
{
- GetDoc()->UpdateLinks(TRUE);
+ GetDoc()->UpdateLinks(sal_True);
// --> FME 2005-07-27 #i50703# Update footnote numbers
SwTxtFtn::SetUniqueSeqRefNo( *GetDoc() );
SwNodeIndex aTmp( GetDoc()->GetNodes() );
@@ -1385,8 +1385,8 @@ bool SwDocShell::HasChangeRecordProtection() const
void SwDocShell::SetChangeRecording( bool bActivate )
{
- USHORT nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0;
- USHORT nMode = pWrtShell->GetRedlineMode();
+ sal_uInt16 nOn = bActivate ? nsRedlineMode_t::REDLINE_ON : 0;
+ sal_uInt16 nMode = pWrtShell->GetRedlineMode();
pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
}
@@ -1399,7 +1399,7 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword )
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword();
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem )
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0))
return false;
@@ -1435,7 +1435,7 @@ bool SwDocShell::GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswdHash( pIDRA->GetRedlinePassword() );
- if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem )
+ if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, sal_False, &pItem )
&& ((SfxBoolItem*)pItem)->GetValue() == (aPasswdHash.getLength() != 0))
return false;
rPasswordHash = aPasswdHash;
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 5bbc29aab2ee..c053d21538e3 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -140,7 +140,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using ::rtl::OUString;
using namespace ::sfx2;
-extern BOOL FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
+extern sal_Bool FindPhyStyle( SwDoc& , const String& , SfxStyleFamily );
/*--------------------------------------------------------------------
Beschreibung: DocInfo kreieren (virtuell)
@@ -176,7 +176,7 @@ void SwDocShell::DoFlushDocInfo()
bool bUnlockView(true);
if ( pWrtShell ) {
bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); // lock visible section
+ pWrtShell->LockView( sal_True ); // lock visible section
pWrtShell->StartAllAction();
}
@@ -185,7 +185,7 @@ void SwDocShell::DoFlushDocInfo()
if ( pWrtShell ) {
pWrtShell->EndAllAction();
if ( bUnlockView ) {
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
}
}
@@ -197,7 +197,7 @@ void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVBAEventP
if ( rHint.ISA( SfxEventHint ) )
{
uno::Sequence< uno::Any > aArgs;
- ULONG nEventId = ((SfxEventHint&)rHint).GetEventId();
+ sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId();
switch( nEventId )
{
case SFX_EVENT_CREATEDOC:
@@ -230,7 +230,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
lcl_processCompatibleSfxHint( xVbaEvents, rHint );
#endif
- USHORT nAction = 0;
+ sal_uInt16 nAction = 0;
if( rHint.ISA(SfxSimpleHint) )
{
// swithc for more actions
@@ -252,11 +252,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( nAction )
{
- BOOL bUnlockView = sal_True; //initializing prevents warning
+ sal_Bool bUnlockView = sal_True; //initializing prevents warning
if( pWrtShell )
{
bUnlockView = !pWrtShell->IsViewLocked();
- pWrtShell->LockView( TRUE ); //lock visible section
+ pWrtShell->LockView( sal_True ); //lock visible section
pWrtShell->StartAllAction();
}
switch( nAction )
@@ -273,7 +273,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const bool bResetModified = IsEnableSetModified();
if ( bResetModified )
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
// --> OD 2005-02-01 #i41679#
const bool bIsDocModified = pDoc->IsModified();
// <--
@@ -285,7 +285,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
pDoc->ResetModified();
// <--
if ( bResetModified )
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
break;
// <--
@@ -295,7 +295,7 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
pWrtShell->EndAllAction();
if( bUnlockView )
- pWrtShell->LockView( FALSE );
+ pWrtShell->LockView( sal_False );
}
}
}
@@ -304,11 +304,11 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
Beschreibung: Benachrichtigung Doc schliessen
--------------------------------------------------------------------*/
-USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
+sal_uInt16 SwDocShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
- USHORT nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
+ sal_uInt16 nRet = SfxObjectShell::PrepareClose( bUI, bForBrowsing );
- if( TRUE == nRet ) //Unbedingt auf TRUE abfragen! (RET_NEWTASK)
+ if( sal_True == nRet ) //Unbedingt auf sal_True abfragen! (RET_NEWTASK)
EndListening( *this );
#ifdef FUTURE_VBA
@@ -330,14 +330,14 @@ USHORT SwDocShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
Beschreibung: Organizer
--------------------------------------------------------------------*/
-BOOL SwDocShell::Insert( SfxObjectShell &rSource,
- USHORT nSourceIdx1, // SourcePool: oberste Inhaltsebene (Vorlagen/Makros)
- USHORT nSourceIdx2, // Index in den Inhalt
- USHORT nSourceIdx3, // Index in die Inhaltsebene
- USHORT &rIdx1, // und das gleiche fuer den DestinationPool
- USHORT &rIdx2, // ""
- USHORT &rIdx3, // ""
- USHORT &rRemovedIdx ) // falls doppelte geloescht werden, Pos zurueck
+sal_Bool SwDocShell::Insert( SfxObjectShell &rSource,
+ sal_uInt16 nSourceIdx1, // SourcePool: oberste Inhaltsebene (Vorlagen/Makros)
+ sal_uInt16 nSourceIdx2, // Index in den Inhalt
+ sal_uInt16 nSourceIdx3, // Index in die Inhaltsebene
+ sal_uInt16 &rIdx1, // und das gleiche fuer den DestinationPool
+ sal_uInt16 &rIdx2, // ""
+ sal_uInt16 &rIdx3, // ""
+ sal_uInt16 &rRemovedIdx ) // falls doppelte geloescht werden, Pos zurueck
{
// --> OD 2005-05-10 #i48949# - actions aren't undoable. Thus, allow no undo
// actions
@@ -346,7 +346,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
GetDoc()->DoUndo( sal_False );
// <--
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (INDEX_IGNORE == rIdx1 && CONTENT_STYLE == nSourceIdx1)
rIdx1 = CONTENT_STYLE;
@@ -359,7 +359,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// wir koennen nicht in uns selbst hin und her moven
if( pHisPool == pMyPool )
- return FALSE;
+ return sal_False;
if( INDEX_IGNORE == rIdx2 )
rIdx2 = pMyPool->Count();
@@ -379,10 +379,10 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
( SFX_STYLE_FAMILY_CHAR == eOldFamily &&
rOldName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
RES_POOLCOLL_TEXT_BEGIN ] ))
- return FALSE;
+ return sal_False;
SfxStyleFamily eMyOldFamily( pMyPool->GetSearchFamily() );
- USHORT nMySrchMask = pMyPool->GetSearchMask();
+ sal_uInt16 nMySrchMask = pMyPool->GetSearchMask();
SfxStyleSheetBase* pExist;
if( ::FindPhyStyle( *pDoc, rOldName, eOldFamily ) )
@@ -391,7 +391,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
if( ERRCODE_BUTTON_OK != ErrorHandler::HandleError(
*new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, rOldName )) )
{
- return FALSE;
+ return sal_False;
}
// Da Replace den aStyleSheet-Member selbst benoetigt, muss
@@ -405,7 +405,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
GetDoc()->SetModified();
- return TRUE;
+ return sal_True;
}
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
@@ -439,7 +439,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// Dshalb muss hier der Index der neuen Vorlage im Pool
// ermittelt werden.
pExist = pMyPool->First();
- USHORT nIdx = 0;
+ sal_uInt16 nIdx = 0;
while( pExist )
{
if( pExist->GetName() == rOldName &&
@@ -467,7 +467,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
// wer bekommt den Neuen als Parent? wer benutzt den Neuen als Follow?
// (immer nur ueber die Instanziierten!!!)
pMyPool->SetSearchMask( eOldFamily, nMySrchMask );
- pMyPool->SetOrganizerMode( TRUE );
+ pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
@@ -528,7 +528,7 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
ASSERT(pDoc, "Doc fehlt");
GetDoc()->SetModified();
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = SfxObjectShell::Insert( rSource,
@@ -556,11 +556,11 @@ BOOL SwDocShell::Insert( SfxObjectShell &rSource,
Beschreibung: Vorlagen Remove
--------------------------------------------------------------------*/
-BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
- USHORT nIdx2,
- USHORT nIdx3)
+sal_Bool SwDocShell::Remove(sal_uInt16 nIdx1, // siehe Insert
+ sal_uInt16 nIdx2,
+ sal_uInt16 nIdx3)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if (CONTENT_STYLE == nIdx1)
{
@@ -579,13 +579,13 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
( SFX_STYLE_FAMILY_CHAR == eFamily &&
aName == *SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
RES_POOLCOLL_TEXT_BEGIN ] ))
- return FALSE;
+ return sal_False;
// also loeschen
pMyPool->Remove( pMySheet );
// jetzt noch die Parents/Follows aller Instanziierten korrigieren
- pMyPool->SetOrganizerMode( TRUE );
+ pMyPool->SetOrganizerMode( sal_True );
SfxStyleSheetBase* pTestSheet = pMyPool->First();
while (pTestSheet)
{
@@ -607,7 +607,7 @@ BOOL SwDocShell::Remove(USHORT nIdx1, // siehe Insert
}
pMyPool->SetOrganizerMode( SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = SfxObjectShell::Remove( nIdx1,
@@ -630,8 +630,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nWhich = rReq.GetSlot();
- BOOL bDone = FALSE;
+ sal_uInt16 nWhich = rReq.GetSlot();
+ sal_Bool bDone = sal_False;
switch ( nWhich )
{
case SID_AUTO_CORRECT_DLG:
@@ -639,10 +639,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
SvxSwAutoFmtFlags* pAFlags = &SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags();
SwAutoCompleteWord& rACW = SwDoc::GetAutoCompleteWords();
- BOOL bOldLocked = rACW.IsLockWordLstLocked(),
+ sal_Bool bOldLocked = rACW.IsLockWordLstLocked(),
bOldAutoCmpltCollectWords = pAFlags->bAutoCmpltCollectWords;
- rACW.SetLockWordLstLocked( TRUE );
+ rACW.SetLockWordLstLocked( sal_True );
SvStringsISortDtor aTmpLst;
aTmpLst.Insert( &rACW.GetWordList() );
@@ -650,7 +650,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SfxApplication* pApp = SFX_APP();
SfxRequest aAppReq(SID_AUTO_CORRECT_DLG, SFX_CALLMODE_SYNCHRON, pApp->GetPool());
- SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, TRUE );
+ SfxBoolItem aSwOptions( SID_AUTO_CORRECT_DLG, sal_True );
aAppReq.AppendItem(aSwOptions);
// SMARTTAGS
@@ -662,7 +662,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
aSet.Put( aSwOptions );
const SfxPoolItem* pOpenSmartTagOptionsItem = 0;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, FALSE, &pOpenSmartTagOptionsItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_OPEN_SMARTTAGOPTIONS, sal_False, &pOpenSmartTagOptionsItem ) )
aSet.Put( *static_cast<const SfxBoolItem*>(pOpenSmartTagOptionsItem) );
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
@@ -682,7 +682,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pAFlags->pAutoCmpltList = 0;
}
// remove all pointer we never delete the strings
- aTmpLst.Remove( (USHORT)0, aTmpLst.Count() );
+ aTmpLst.Remove( (sal_uInt16)0, aTmpLst.Count() );
if( !bOldAutoCmpltCollectWords && bOldAutoCmpltCollectWords !=
pAFlags->bAutoCmpltCollectWords )
@@ -704,20 +704,20 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_PRINTPREVIEW:
{
- BOOL bSet = FALSE, bFound = FALSE, bOnly = TRUE;
+ sal_Bool bSet = sal_False, bFound = sal_False, bOnly = sal_True;
SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
SfxViewShell* pViewShell = SfxViewShell::Current();
SwView* pCurrView = dynamic_cast< SwView *> ( pViewShell );
- BOOL bCurrent = IS_TYPE( SwPagePreView, pViewShell );
+ sal_Bool bCurrent = IS_TYPE( SwPagePreView, pViewShell );
while( pTmpFrm ) // search PreView
{
if( IS_TYPE( SwView, pTmpFrm->GetViewShell()) )
- bOnly = FALSE;
+ bOnly = sal_False;
else if( IS_TYPE( SwPagePreView, pTmpFrm->GetViewShell()))
{
pTmpFrm->GetFrame().Appear();
- bFound = TRUE;
+ bFound = sal_True;
}
if( bFound && !bOnly )
break;
@@ -725,12 +725,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
if( pArgs && SFX_ITEM_SET ==
- pArgs->GetItemState( SID_PRINTPREVIEW, FALSE, &pItem ))
+ pArgs->GetItemState( SID_PRINTPREVIEW, sal_False, &pItem ))
bSet = ((SfxBoolItem*)pItem)->GetValue();
else
bSet = !bCurrent;
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
if( bSet && !bFound ) // Keine gefunden, daher neue Preview anlegen
{
//Keine neue anlegen fuer BrowseView!
@@ -761,14 +761,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
case SID_TEMPLATE_LOAD:
{
String aFileName;
- static BOOL bText = TRUE;
- static BOOL bFrame = FALSE;
- static BOOL bPage = FALSE;
- static BOOL bNum = FALSE;
- static BOOL bMerge = FALSE;
- USHORT nRet = USHRT_MAX;
-
- USHORT nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0;
+ static sal_Bool bText = sal_True;
+ static sal_Bool bFrame = sal_False;
+ static sal_Bool bPage = sal_False;
+ static sal_Bool bNum = sal_False;
+ static sal_Bool bMerge = sal_False;
+ sal_uInt16 nRet = USHRT_MAX;
+
+ sal_uInt16 nFlags = bFrame ? SFX_LOAD_FRAME_STYLES : 0;
if(bPage)
nFlags|= SFX_LOAD_PAGE_STYLES;
if(bNum)
@@ -780,13 +780,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
if ( pArgs )
{
- SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE );
+ SFX_REQUEST_ARG( rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False );
if ( pTemplateItem )
{
aFileName = pTemplateItem->GetValue();
- SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, FALSE );
+ SFX_REQUEST_ARG( rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD, sal_False );
if ( pFlagsItem )
- nFlags = (USHORT) pFlagsItem->GetValue();
+ nFlags = (sal_uInt16) pFlagsItem->GetValue();
}
}
@@ -819,7 +819,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
pFlt = aIter.Next();
}
- BOOL bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
+ sal_Bool bWeb = 0 != dynamic_cast< SwWebDocShell *>( this );
const SfxFilter *pOwnFlt =
SwDocShell::Factory().GetFilterContainer()->
GetFilter4FilterName(String::CreateFromAscii("writer8"));
@@ -869,7 +869,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
bMerge = 0 != (nFlags&SFX_MERGE_STYLES);
aOpt.SetMerge( !bMerge );
- SetError( LoadStylesFromFile( aFileName, aOpt, FALSE ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
+ SetError( LoadStylesFromFile( aFileName, aOpt, sal_False ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ));
if ( !GetError() )
rReq.Done();
}
@@ -892,7 +892,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
SwIoSystem::GetFilterOfFormat(
String::CreateFromAscii("HTML"),
SwWebDocShell::Factory().GetFilterContainer() );
- BOOL bLocalHasName = HasName();
+ sal_Bool bLocalHasName = HasName();
if(bLocalHasName)
{
//check for filter type
@@ -901,7 +901,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
QueryBox aQuery(&pViewFrm->GetWindow(), SW_RES(MSG_SAVEAS_HTML_QUERY));
if(RET_YES == aQuery.Execute())
- bLocalHasName = FALSE;
+ bLocalHasName = sal_False;
else
break;
}
@@ -927,13 +927,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
#ifdef DBG_UTIL
{
- BOOL bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
- DBG_ASSERT(bWeb == TRUE, "SourceView nur in der WebDocShell");
+ sal_Bool bWeb = 0 != dynamic_cast<SwWebDocShell*>(this);
+ DBG_ASSERT(bWeb == sal_True, "SourceView nur in der WebDocShell");
}
#endif
// die SourceView ist fuer die SwWebDocShell die 1
- USHORT nSlot = SID_VIEWSHELL1;
- BOOL bSetModified = FALSE;
+ sal_uInt16 nSlot = SID_VIEWSHELL1;
+ sal_Bool bSetModified = sal_False;
SfxPrinter* pSavePrinter = 0;
if( 0 != pSrcView)
{
@@ -946,7 +946,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
utl::TempFile aTempFile;
aTempFile.EnableKillingFile();
pSrcView->SaveContent(aTempFile.GetURL());
- bDone = TRUE;
+ bDone = sal_True;
SfxEventConfiguration* pEvent = SFX_APP()->GetEventConfig();
SvxMacro aMac(aEmptyStr, aEmptyStr, STARBASIC);
pEvent->ConfigureEvent(GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC ), aMac, this);
@@ -965,7 +965,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
Export in den SourceMode und dem Speichern des Docs
else if(IsModified())
{
- USHORT nRet = QueryBox( SFX_APPWINDOW ,SW_RES(MSG_SAVE_HTML_QUERY)).Execute();
+ sal_uInt16 nRet = QueryBox( SFX_APPWINDOW ,SW_RES(MSG_SAVE_HTML_QUERY)).Execute();
if(RET_YES == nRet)
{
S F X _DISPATCHER().Execute(SID_SAVEDOC,
@@ -1010,13 +1010,13 @@ void SwDocShell::Execute(SfxRequest& rReq)
DBG_ASSERT(pDlg, "Dialogdiet fail!");
if(RET_OK == pDlg->Execute())
{
- BYTE nLevel = pDlg->GetLevel();
- BYTE nPara = pDlg->GetPara();
+ sal_uInt8 nLevel = pDlg->GetLevel();
+ sal_uInt8 nPara = pDlg->GetPara();
SwDoc* pSmryDoc = new SwDoc();
SfxObjectShellRef xDocSh( new SwDocShell( pSmryDoc, SFX_CREATE_MODE_STANDARD));
xDocSh->DoInitNew( 0 );
- BOOL bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
+ sal_Bool bImpress = FN_ABSTRACT_STARIMPRESS == nWhich;
pDoc->Summary( pSmryDoc, nLevel, nPara, bImpress );
if( bImpress )
{
@@ -1044,12 +1044,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
// Transfer ownership of stream to a lockbytes object
- SvLockBytes aLockBytes( pStrm, TRUE );
+ SvLockBytes aLockBytes( pStrm, sal_True );
SvLockBytesStat aStat;
if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
{
sal_uInt32 nLen = aStat.nSize;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
uno::Sequence< sal_Int8 > aSeq( nLen );
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -1115,12 +1115,12 @@ void SwDocShell::Execute(SfxRequest& rReq)
pStrm->Seek( STREAM_SEEK_TO_BEGIN );
// Transfer ownership of stream to a lockbytes object
- SvLockBytes aLockBytes( pStrm, TRUE );
+ SvLockBytes aLockBytes( pStrm, sal_True );
SvLockBytesStat aStat;
if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
{
sal_uInt32 nLen = aStat.nSize;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
uno::Sequence< sal_Int8 > aSeq( nLen );
aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -1151,17 +1151,17 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
break;
case SID_SPELLCHECKER_CHANGED:
- //! FALSE, TRUE, TRUE is on the save side but a probably overdone
- SW_MOD()->CheckSpellChanges(FALSE, TRUE, TRUE, FALSE );
+ //! sal_False, sal_True, sal_True is on the save side but a probably overdone
+ SW_MOD()->CheckSpellChanges(sal_False, sal_True, sal_True, sal_False );
break;
case SID_BROWSER_MODE:
case FN_PRINT_LAYOUT: //Fuer Web, genau umgekehrt zum BrowserMode
{
int eState = STATE_TOGGLE;
- BOOL bSet = sal_True;
+ sal_Bool bSet = sal_True;
const SfxPoolItem* pAttr=NULL;
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pAttr ))
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pAttr ))
{
bSet = ((SfxBoolItem*)pAttr)->GetValue();
if ( nWhich == FN_PRINT_LAYOUT )
@@ -1175,7 +1175,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
ToggleBrowserMode(bSet, 0);
// OS: numerische Reihenfolge beachten!
- static USHORT __READONLY_DATA aInva[] =
+ static sal_uInt16 __READONLY_DATA aInva[] =
{
SID_NEWWINDOW,/*5620*/
SID_BROWSER_MODE, /*6313*/
@@ -1234,14 +1234,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
case FN_NEW_HTML_DOC:
case FN_NEW_GLOBAL_DOC:
{
- bDone = FALSE;
- BOOL bCreateHtml = FN_NEW_HTML_DOC == nWhich;
+ bDone = sal_False;
+ sal_Bool bCreateHtml = FN_NEW_HTML_DOC == nWhich;
- BOOL bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei
+ sal_Bool bCreateByOutlineLevel = false; //#outline level,add by zhaojianwei
sal_Int32 nTemplateOutlineLevel = 0 ; //#outline level,add by zhaojianwei
String aFileName, aTemplateName;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich, sal_False, &pItem ) )
{
aFileName = ((const SfxStringItem*)pItem)->GetValue();
SFX_ITEMSET_ARG( pArgs, pTemplItem, SfxStringItem, SID_TEMPLATE_NAME, sal_False );
@@ -1293,7 +1293,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
const SfxFilter* pFlt;
- USHORT nStrId;
+ sal_uInt16 nStrId;
if( bCreateHtml )
{
@@ -1332,14 +1332,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
//#removed by zhaojianwei
- // const USHORT nCount = pDoc->GetTxtFmtColls()->Count();
+ // const sal_uInt16 nCount = pDoc->GetTxtFmtColls()->Count();
// Sequence<OUString> aListBoxEntries(nCount);
// OUString* pEntries = aListBoxEntries.getArray();
// sal_Int32 nIdx = 0;
// sal_Int16 nSelect = 0;
// OUString sStartTemplate;
// SwTxtFmtColl *pFnd = 0, *pAny = 0;
- // for(USHORT i = 0; i < nCount; ++i)
+ // for(sal_uInt16 i = 0; i < nCount; ++i)
// {
// SwTxtFmtColl &rTxtColl =
// *pDoc->GetTxtFmtColls()->GetObject( i );
@@ -1373,7 +1373,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if( rOutlNds.Count() )
{
int nLevel;
- for(USHORT n = 0; n < rOutlNds.Count(); ++n )
+ for(sal_uInt16 n = 0; n < rOutlNds.Count(); ++n )
if( ( nLevel = rOutlNds[n]->GetTxtNode()->GetAttrOutlineLevel()) > 0 &&
! bOutline[nLevel-1] )
{
@@ -1381,20 +1381,20 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
}
- const USHORT nStyleCount = pDoc->GetTxtFmtColls()->Count();
+ const sal_uInt16 nStyleCount = pDoc->GetTxtFmtColls()->Count();
Sequence<OUString> aListBoxEntries( MAXLEVEL + nStyleCount);
OUString* pEntries = aListBoxEntries.getArray();
sal_Int32 nIdx = 0 ;
OUString sOutline( SW_RESSTR(STR_FDLG_OUTLINE_LEVEL) );
- for( USHORT i = 0; i < MAXLEVEL; ++i )
+ for( sal_uInt16 i = 0; i < MAXLEVEL; ++i )
{
if( bOutline[i] )
pEntries[nIdx++] = sOutline + String::CreateFromInt32( i+1 );
}
OUString sStyle( SW_RESSTR(STR_FDLG_STYLE) );
- for(USHORT i = 0; i < nStyleCount; ++i)
+ for(sal_uInt16 i = 0; i < nStyleCount; ++i)
{
SwTxtFmtColl &rTxtColl =
*pDoc->GetTxtFmtColls()->GetObject( i );
@@ -1469,9 +1469,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
//<-end,zhaojianwei
if( aFileName.Len() )
{
- if( PrepareClose( FALSE ) )
+ if( PrepareClose( sal_False ) )
{
- SwWait aWait( *this, TRUE );
+ SwWait aWait( *this, sal_True );
//bDone = bCreateHtml //#outline level,removed by zhaojianwei
// ? pDoc->GenerateHTMLDoc( aFileName, pSplitColl )
@@ -1533,10 +1533,10 @@ void SwDocShell::Execute(SfxRequest& rReq)
break;
case SID_ATTR_YEAR2000:
- if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , FALSE, &pItem ))
+ if ( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nWhich , sal_False, &pItem ))
{
DBG_ASSERT(pItem->ISA(SfxUInt16Item), "falsches Item");
- USHORT nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nYear2K = ((SfxUInt16Item*)pItem)->GetValue();
//ueber Views iterieren und den State an den FormShells setzen
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( this );
@@ -1551,7 +1551,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
pCurrView = dynamic_cast<SwView*>( pViewShell );
}
- pDoc->GetNumberFormatter(TRUE)->SetYear2000(nYear2K);
+ pDoc->GetNumberFormatter(sal_True)->SetYear2000(nYear2K);
}
break;
@@ -1624,17 +1624,17 @@ void SwDocShell::FillClass( SvGlobalName * pClassName,
Beschreibung:
--------------------------------------------------------------------*/
-void SwDocShell::SetModified( BOOL bSet )
+void SwDocShell::SetModified( sal_Bool bSet )
{
SfxObjectShell::SetModified( bSet );
if( IsEnableSetModified())
{
if (!pDoc->IsInCallModified() )
{
- EnableSetModified( FALSE );
+ EnableSetModified( sal_False );
if( bSet )
{
- BOOL bOld = pDoc->IsModified();
+ sal_Bool bOld = pDoc->IsModified();
pDoc->SetModified();
if( !bOld )
pDoc->SetUndoNoResetModified();
@@ -1642,7 +1642,7 @@ void SwDocShell::SetModified( BOOL bSet )
else
pDoc->ResetModified();
- EnableSetModified( TRUE );
+ EnableSetModified( sal_True );
}
UpdateChildWindows();
@@ -1690,7 +1690,7 @@ class SwReloadFromHtmlReader : public SwReader
// <--
void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView )
{
- BOOL bModified = IsModified();
+ sal_Bool bModified = IsModified();
// MIB 23.6.97: Die HTTP-Header-Felder muessen geloescht werden,
// sonst gibt es welche aus Meta-Tags hinter doppelt und dreifach.
@@ -1709,7 +1709,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
BasicManager *pBasicMan = GetBasicManager();
if( pBasicMan && (pBasicMan != SFX_APP()->GetBasicManager()) )
{
- USHORT nLibCount = pBasicMan->GetLibCount();
+ sal_uInt16 nLibCount = pBasicMan->GetLibCount();
while( nLibCount )
{
StarBASIC *pBasic = pBasicMan->GetLib( --nLibCount );
@@ -1726,7 +1726,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
// Aus der Standard-Lib werden nur die Module geloescht
if( nLibCount )
- pBasicMan->RemoveLib( nLibCount, TRUE );
+ pBasicMan->RemoveLib( nLibCount, sal_True );
else
pBasic->Clear();
}
@@ -1763,7 +1763,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
SubInitNew();
- SfxMedium aMed( rStreamName, STREAM_READ, FALSE );
+ SfxMedium aMed( rStreamName, STREAM_READ, sal_False );
// --> OD 2005-08-01 #i48748# - use class <SwReloadFromHtmlReader>, because
// the base URL has to be set to the filename of the document <rMedname>
// and not to the base URL of the temporary file <aMed> in order to get
@@ -1779,7 +1779,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
{
SwWrtShell& rWrtSh = pCurrView->GetWrtShell();
if( rWrtSh.GetLayout())
- rWrtSh.CheckBrowseView( TRUE );
+ rWrtSh.CheckBrowseView( sal_True );
}
@@ -1797,7 +1797,7 @@ void SwDocShell::ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView
/* -----------------------------14.12.99 16:52--------------------------------
---------------------------------------------------------------------------*/
-void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
+void SwDocShell::ToggleBrowserMode(sal_Bool bSet, SwView* _pView )
{
GetDoc()->set(IDocumentSettingAccess::BROWSE_MODE, bSet );
UpdateFontList();
@@ -1822,15 +1822,15 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
// Currently there can be only one view (layout) if the document is viewed in Web layout
// So if there are more views we are in print layout and for toggling to Web layout all other views must be closed
- SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
+ SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this, sal_False);
do {
if( pTmpFrm != pTempView->GetViewFrame() )
{
pTmpFrm->DoClose();
- pTmpFrm = SfxViewFrame::GetFirst(this, FALSE);
+ pTmpFrm = SfxViewFrame::GetFirst(this, sal_False);
}
else
- pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, FALSE);
+ pTmpFrm = pTmpFrm->GetNext(*pTmpFrm, this, sal_False);
} while ( pTmpFrm );
@@ -1839,7 +1839,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
// set view columns before toggling:
if ( bSet )
{
- const USHORT nColumns = rViewOptions.GetViewLayoutColumns();
+ const sal_uInt16 nColumns = rViewOptions.GetViewLayoutColumns();
const bool bBookMode = rViewOptions.IsViewLayoutBookMode();
if ( 1 != nColumns || bBookMode )
{
@@ -1848,7 +1848,7 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
}
// Triggeres a formatting:
- pTempView->GetWrtShell().CheckBrowseView( TRUE );
+ pTempView->GetWrtShell().CheckBrowseView( sal_True );
pTempView->CheckVisArea();
if( GetDoc()->get(IDocumentSettingAccess::BROWSE_MODE) )
@@ -1865,10 +1865,10 @@ void SwDocShell::ToggleBrowserMode(BOOL bSet, SwView* _pView )
}
}
-ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
- SwgReaderOption& rOpt, BOOL bUnoCall )
+sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL,
+ SwgReaderOption& rOpt, sal_Bool bUnoCall )
{
- ULONG nErr = 0;
+ sal_uLong nErr = 0;
// Create a URL from filename
INetURLObject aURLObj( rURL );
@@ -1884,14 +1884,14 @@ ULONG SwDocShell::LoadStylesFromFile( const String& rURL,
SfxFilterMatcher aMatcher( sFactory );
//#b6445961# search for filter in WebDocShell, too
- SfxMedium aMed( rURL, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( rURL, STREAM_STD_READ, sal_False );
const SfxFilter* pFlt = 0;
- aMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE );
+ aMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
if(!pFlt)
{
String sWebFactory(String::CreateFromAscii(SwWebDocShell::Factory().GetShortName()));
SfxFilterMatcher aWebMatcher( sWebFactory );
- aWebMatcher.DetectFilter( aMed, &pFlt, FALSE, FALSE );
+ aWebMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False );
}
if( aMed.IsStorage() )
{
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 98fe7316ecd5..f39cbca5f305 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -170,30 +170,30 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
SfxPrinter* pPrt = pDoc->getPrinter( false );
String sEntry;
- USHORT aFontWhich[] =
+ sal_uInt16 aFontWhich[] =
{ RES_CHRATR_FONT,
RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT
};
- USHORT aFontHeightWhich[] =
+ sal_uInt16 aFontHeightWhich[] =
{
RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE
};
- USHORT aFontIds[] =
+ sal_uInt16 aFontIds[] =
{
FONT_STANDARD,
FONT_STANDARD_CJK,
FONT_STANDARD_CTL
};
- USHORT nFontTypes[] =
+ sal_uInt16 nFontTypes[] =
{
DEFAULTFONT_LATIN_TEXT,
DEFAULTFONT_CJK_TEXT,
DEFAULTFONT_CTL_TEXT
};
- USHORT aLangTypes[] =
+ sal_uInt16 aLangTypes[] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -202,8 +202,8 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
for(sal_uInt8 i = 0; i < 3; i++)
{
- USHORT nFontWhich = aFontWhich[i];
- USHORT nFontId = aFontIds[i];
+ sal_uInt16 nFontWhich = aFontWhich[i];
+ sal_uInt16 nFontId = aFontIds[i];
SvxFontItem* pFontItem = 0;
const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault( aLangTypes[i] );
LanguageType eLanguage = rLang.GetLanguage();
@@ -266,7 +266,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
}
}
- USHORT aFontIdPoolId[] =
+ sal_uInt16 aFontIdPoolId[] =
{
FONT_OUTLINE, RES_POOLCOLL_HEADLINE_BASE,
FONT_LIST, RES_POOLCOLL_NUMBUL_BASE,
@@ -282,8 +282,8 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
FONT_INDEX_CTL, RES_POOLCOLL_REGISTER_BASE
};
- USHORT nFontWhich = RES_CHRATR_FONT;
- USHORT nFontHeightWhich = RES_CHRATR_FONTSIZE;
+ sal_uInt16 nFontWhich = RES_CHRATR_FONT;
+ sal_uInt16 nFontHeightWhich = RES_CHRATR_FONTSIZE;
LanguageType eLanguage = static_cast<const SvxLanguageItem&>(pDoc->GetDefault( RES_CHRATR_LANGUAGE )).GetLanguage();
for(sal_uInt8 nIdx = 0; nIdx < 24; nIdx += 2)
{
@@ -351,14 +351,14 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
pDoc->SetDefault( SvxAdjustItem(SVX_ADJUST_RIGHT, RES_PARATR_ADJUST ) );
// OD 09.10.2003 #i18732# - set dynamic pool default for
- // item RES_FOLLOW_TEXT_FLOW to FALSE for *new document*.
+ // item RES_FOLLOW_TEXT_FLOW to sal_False for *new document*.
// Thus, redo this change in method <SwDoc::RemoveAllFmtLanguageDependencies()>,
// which is called from <SwDocShell::ConvertFrom(..)> in order to restore
// the static pool default.
- pDoc->SetDefault( SwFmtFollowTextFlow( FALSE ) );
+ pDoc->SetDefault( SwFmtFollowTextFlow( sal_False ) );
// --> collapsing borders FME 2005-05-27 #i29550#
- pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, TRUE ) );
+ pDoc->SetDefault( SfxBoolItem( RES_COLLAPSING_BORDERS, sal_True ) );
// <-- collapsing
//#i16874# AutoKerning as default for new documents
@@ -605,10 +605,10 @@ sal_Bool SwDocShell::Load( SfxMedium& rMedium )
{
if( ReadXML )
{
- ReadXML->SetOrganizerMode( TRUE );
+ ReadXML->SetOrganizerMode( sal_True );
SwReader aRdr( rMedium, aEmptyStr, pDoc );
nErr = aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( FALSE );
+ ReadXML->SetOrganizerMode( sal_False );
}
}
break;
@@ -716,10 +716,10 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );
if( ReadXML )
{
- ReadXML->SetOrganizerMode( TRUE );
+ ReadXML->SetOrganizerMode( sal_True );
SwReader aRdr( rMedium, aEmptyStr, pDoc );
nErr = aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( FALSE );
+ ReadXML->SetOrganizerMode( sal_False );
}
}
}
@@ -736,7 +736,7 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
if( !pFltr || !pFltr->GetUserData().EqualsAscii( FILTER_SWG ))
break;
- SfxMedium aMed( rNm, STREAM_STD_READ, FALSE );
+ SfxMedium aMed( rNm, STREAM_STD_READ, sal_False );
if( 0 == ( nErr = aMed.GetInStream()->GetError() ) )
{
SwWait aWait( *this, sal_True );
@@ -799,12 +799,12 @@ void SwDocShell::SubInitNew()
{
SvxHyphenZoneItem aHyp( (SvxHyphenZoneItem&) pDoc->GetDefault(
RES_PARATR_HYPHENZONE) );
- aHyp.GetMinLead() = static_cast< BYTE >(aLinguOpt.nHyphMinLeading);
- aHyp.GetMinTrail() = static_cast< BYTE >(aLinguOpt.nHyphMinTrailing);
+ aHyp.GetMinLead() = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinLeading);
+ aHyp.GetMinTrail() = static_cast< sal_uInt8 >(aLinguOpt.nHyphMinTrailing);
aDfltSet.Put( aHyp );
- sal_uInt16 nNewPos = static_cast< sal_uInt16 >(SW_MOD()->GetUsrPref(FALSE)->GetDefTab());
+ sal_uInt16 nNewPos = static_cast< sal_uInt16 >(SW_MOD()->GetUsrPref(sal_False)->GetDefTab());
if( nNewPos )
aDfltSet.Put( SvxTabStopItem( 1, nNewPos,
SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ) );
@@ -816,7 +816,7 @@ void SwDocShell::SubInitNew()
//default page mode for text grid
if(!bWeb)
{
- sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(FALSE)->IsSquaredPageMode();
+ sal_Bool bSquaredPageMode = SW_MOD()->GetUsrPref(sal_False)->IsSquaredPageMode();
pDoc->SetDefaultPageMode( bSquaredPageMode );
}
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index d06ab31b7478..5740300d3e66 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -95,8 +95,8 @@ using namespace ::com::sun::star;
void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
- USHORT nActualFamily = USHRT_MAX;
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_uInt16 nActualFamily = USHRT_MAX;
SwWrtShell* pShell = pSh ? pSh : GetWrtShell();
if(!pShell)
@@ -113,7 +113,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
SfxViewFrame* pFrame = pShell->GetView().GetViewFrame();
const ISfxTemplateCommon* pCommon = SFX_APP()->GetCurrentTemplateCommon(pFrame->GetBindings());
if( pCommon )
- nActualFamily = static_cast< USHORT >(pCommon->GetActualFamily());
+ nActualFamily = static_cast< sal_uInt16 >(pCommon->GetActualFamily());
}
while (nWhich)
@@ -163,12 +163,12 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
SfxTemplateItem aItem(nWhich, aName);
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if( pDoc->get(IDocumentSettingAccess::HTML_MODE) )
nMask = SWSTYLEBIT_HTML;
else
{
- const int nSelection = pShell->GetFrmType(0,TRUE);
+ const int nSelection = pShell->GetFrmType(0,sal_True);
if(pShell->GetCurTOX())
nMask = SWSTYLEBIT_IDX ;
else if(nSelection & FRMTYPE_HEADER ||
@@ -210,7 +210,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
rSet.DisableItem( nWhich );
else
{
- USHORT n = pShell->GetCurPageDesc( FALSE );
+ sal_uInt16 n = pShell->GetCurPageDesc( sal_False );
if( n < pShell->GetPageDescCnt() )
aName = pShell->GetPageDesc( n ).GetName();
@@ -271,42 +271,42 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
- USHORT nRet = 0xffff;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_uInt16 nRet = 0xffff;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
SwWrtShell* pActShell = 0;
- BOOL bSetReturn = TRUE;
+ sal_Bool bSetReturn = sal_True;
switch (nSlot)
{
case SID_STYLE_NEW:
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
- USHORT nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
String sName;
- USHORT nMask = 0;
+ sal_uInt16 nMask = 0;
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_NEW,
- FALSE, &pItem ))
+ sal_False, &pItem ))
sName = ((const SfxStringItem*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_MASK,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nMask = ((const SfxUInt16Item*)pItem)->GetValue();
String sParent;
if( SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_REFERENCE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
sParent = ((const SfxStringItem*)pItem)->GetValue();
- nRet = Edit( sName, sParent, nFamily, nMask, TRUE, FALSE, 0, rReq.IsAPI() );
+ nRet = Edit( sName, sParent, nFamily, nMask, sal_True, sal_False, 0, rReq.IsAPI() );
}
break;
case SID_STYLE_APPLY:
if( !pArgs )
{
- GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, FALSE);
+ GetView()->GetViewFrame()->GetDispatcher()->Execute(SID_STYLE_DESIGNER, sal_False);
break;
}
else
@@ -345,8 +345,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
case SID_STYLE_NEW_BY_EXAMPLE:
{
String aParam;
- USHORT nFamily = SFX_STYLE_FAMILY_PARA;
- USHORT nMask = 0;
+ sal_uInt16 nFamily = SFX_STYLE_FAMILY_PARA;
+ sal_uInt16 nMask = 0;
if( !pArgs )
{
@@ -386,14 +386,14 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
ASSERT( pArgs->Count(), "SfxBug ItemSet ist leer");
SwWrtShell* pShell = GetWrtShell();
- if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem ))
aParam = ((const SfxStringItem*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILY,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, sal_False, &pItem ))
{
String aFamily = ((const SfxStringItem*)pItem)->GetValue();
if(aFamily.CompareToAscii("CharacterStyles") == COMPARE_EQUAL)
@@ -413,10 +413,10 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
if( SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_MASK,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nMask = ((const SfxUInt16Item*)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_WRTSHELL,
- FALSE, &pItem ))
+ sal_False, &pItem ))
pActShell = pShell = (SwWrtShell*)((SwPtrItem*)pItem)->GetValue();
if( nSlot == SID_STYLE_UPDATE_BY_EXAMPLE )
@@ -445,7 +445,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
- if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, sal_False, &pItem))
{
aParam = ((const SfxStringItem*)pItem)->GetValue();
}
@@ -459,7 +459,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
switch(nSlot)
{
case SID_STYLE_EDIT:
- nRet = Edit(aParam, aEmptyStr, nFamily, nMask, FALSE, FALSE, pActShell );
+ nRet = Edit(aParam, aEmptyStr, nFamily, nMask, sal_False, sal_False, pActShell );
break;
case SID_STYLE_DELETE:
nRet = Delete(aParam, nFamily);
@@ -497,7 +497,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
if(bSetReturn)
{
- if(rReq.IsAPI()) // Basic bekommt nur TRUE oder FALSE
+ if(rReq.IsAPI()) // Basic bekommt nur sal_True oder sal_False
rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet !=0));
else
rReq.SetReturnValue(SfxUInt16Item(nSlot, nRet));
@@ -510,15 +510,15 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
--------------------------------------------------------------------*/
-USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFamily, USHORT nMask,
- BOOL bNew, BOOL bColumn, SwWrtShell* pActShell,
- BOOL bBasic )
+sal_uInt16 SwDocShell::Edit( const String &rName, const String &rParent, sal_uInt16 nFamily, sal_uInt16 nMask,
+ sal_Bool bNew, sal_Bool bColumn, SwWrtShell* pActShell,
+ sal_Bool bBasic )
{
ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
SfxStyleSheetBase *pStyle = 0;
- USHORT nRet = nMask;
- BOOL bModified = pDoc->IsModified();
+ sal_uInt16 nRet = nMask;
+ sal_Bool bModified = pDoc->IsModified();
if( bNew )
{
@@ -540,7 +540,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwTxtFmtColl* pColl = pWrtShell->FindTxtFmtCollByName( rParent );
if(!pColl)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(USHRT_MAX != nId)
pColl = pWrtShell->GetTxtCollFromPool( nId );
}
@@ -577,7 +577,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwCharFmt* pCFmt = pWrtShell->FindCharFmtByName( rParent );
if(!pCFmt)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(USHRT_MAX != nId)
pCFmt = pWrtShell->GetCharFmtFromPool( nId );
}
@@ -601,7 +601,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SwFrmFmt* pFFmt = pWrtShell->GetDoc()->FindFrmFmtByName( rParent );
if(!pFFmt)
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rParent, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
if(USHRT_MAX != nId)
pFFmt = pWrtShell->GetFrmFmtFromPool( nId );
}
@@ -619,7 +619,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
}
if(!pStyle)
- return FALSE;
+ return sal_False;
// Dialoge zusammenstoepseln
//
@@ -652,7 +652,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
SfxItemSet& rSet = xTmp->GetItemSet();
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_BACKGROUND,
- TRUE, &pTmpBrush ) )
+ sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -662,7 +662,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
if (!bBasic)
{
// vor dem Dialog wird der HtmlMode an der DocShell versenkt
- USHORT nHtmlMode = ::GetHtmlMode(this);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(this);
// In HTML mode, we do not always have a printer. In order to show
// the correct page size in the Format - Page dialog, we have to
@@ -674,7 +674,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
PutItem(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
FieldUnit eMetric = ::GetDfltMetric(0 != (HTMLMODE_ON&nHtmlMode));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateTemplateDialog( DLG_TEMPLATE_BASE,
@@ -709,7 +709,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
if(SFX_STYLE_FAMILY_PAGE == nFamily)
{
- static const USHORT aInval[] = {
+ static const sal_uInt16 aInval[] = {
SID_IMAGE_ORIENTATION,
SID_ATTR_CHAR_FONT,
FN_INSERT_CTRL, FN_INSERT_OBJ_CTRL, 0};
@@ -720,7 +720,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND,
- FALSE, &pTmpBrush ) )
+ sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -733,7 +733,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
if( SFX_STYLE_FAMILY_PAGE == nFamily && SvtLanguageOptions().IsCTLFontEnabled() )
{
const SfxPoolItem *pItem = NULL;
- if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE ) , TRUE, &pItem ) == SFX_ITEM_SET )
+ if( aTmpSet.GetItemState( GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False ) , sal_True, &pItem ) == SFX_ITEM_SET )
SwChartHelper::DoUpdateAllCharts( pDoc );
}
}
@@ -796,7 +796,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
{
const SfxPoolItem *pTmpBrush;
if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND,
- FALSE, &pTmpBrush ) )
+ sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -826,7 +826,7 @@ USHORT SwDocShell::Edit( const String &rName, const String &rParent, USHORT nFam
--------------------------------------------------------------------*/
-USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
+sal_uInt16 SwDocShell::Delete(const String &rName, sal_uInt16 nFamily)
{
SfxStyleSheetBase *pStyle = mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
@@ -838,9 +838,9 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
mxBasePool->Remove(pStyle);
GetWrtShell()->EndAllAction();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -848,15 +848,15 @@ USHORT SwDocShell::Delete(const String &rName, USHORT nFamily)
--------------------------------------------------------------------*/
-USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
- SwWrtShell* pShell, USHORT nMode )
+sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
+ SwWrtShell* pShell, sal_uInt16 nMode )
{
SwDocStyleSheet* pStyle =
(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
ASSERT(pStyle, "Wo ist der StyleSheet");
if(!pStyle)
- return FALSE;
+ return sal_False;
SwWrtShell *pSh = pShell ? pShell : GetWrtShell();
@@ -919,15 +919,15 @@ USHORT SwDocShell::ApplyStyles(const String &rName, USHORT nFamily,
-USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
+sal_uInt16 SwDocShell::DoWaterCan(const String &rName, sal_uInt16 nFamily)
{
ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
SwEditWin& rEdtWin = pView->GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
- BOOL bWaterCan = !(pApply && pApply->eType != 0);
+ sal_Bool bWaterCan = !(pApply && pApply->eType != 0);
if( !rName.Len() )
- bWaterCan = FALSE;
+ bWaterCan = sal_False;
SwApplyTemplate aTemplate;
aTemplate.eType = nFamily;
@@ -975,7 +975,7 @@ USHORT SwDocShell::DoWaterCan(const String &rName, USHORT nFamily)
--------------------------------------------------------------------*/
-USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell)
+sal_uInt16 SwDocShell::UpdateStyle(const String &rName, sal_uInt16 nFamily, SwWrtShell* pShell)
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
ASSERT(GetWrtShell(), "Keine Shell, keine Styles");
@@ -1026,7 +1026,7 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
// Vorlage auch anwenden, um harte Attributierung
// zu entfernen
- pCurrWrtShell->SetFrmFmt( pFrm, TRUE );
+ pCurrWrtShell->SetFrmFmt( pFrm, sal_True );
pCurrWrtShell->EndAllAction();
}
}
@@ -1069,8 +1069,8 @@ USHORT SwDocShell::UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell*
--------------------------------------------------------------------*/
-USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
- USHORT nMask, SwWrtShell* pShell )
+sal_uInt16 SwDocShell::MakeByExample( const String &rName, sal_uInt16 nFamily,
+ sal_uInt16 nMask, SwWrtShell* pShell )
{
SwWrtShell* pCurrWrtShell = pShell ? pShell : GetWrtShell();
SwDocStyleSheet* pStyle = (SwDocStyleSheet*)mxBasePool->Find(
@@ -1102,7 +1102,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
pColl->SetDerivedFrom(pCurrWrtShell->GetCurTxtFmtColl());
// setze die Maske noch an der Collection:
- USHORT nId = pColl->GetPoolFmtId() & 0x87ff;
+ sal_uInt16 nId = pColl->GetPoolFmtId() & 0x87ff;
switch( nMask & 0x0fff )
{
case SWSTYLEBIT_TEXT:
@@ -1148,12 +1148,12 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
/* #61359# jetzt auch wieder alle Orientierungen
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == aSet.GetItemState( RES_VERT_ORIENT,
- FALSE, &pItem ) &&
+ sal_False, &pItem ) &&
text::VertOrientation::NONE == ((SwFmtVertOrient*)pItem)->GetVertOrient())
aSet.ClearItem( RES_VERT_ORIENT );
if( SFX_ITEM_SET == aSet.GetItemState( RES_HORI_ORIENT,
- FALSE, &pItem ) &&
+ sal_False, &pItem ) &&
text::HoriOrientation::NONE == ((SwFmtHoriOrient*)pItem)->GetHoriOrient())
aSet.ClearItem( RES_HORI_ORIENT );
*/
@@ -1184,13 +1184,13 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
case SFX_STYLE_FAMILY_PAGE:
{
pCurrWrtShell->StartAllAction();
- USHORT nPgDsc = pCurrWrtShell->GetCurPageDesc();
+ sal_uInt16 nPgDsc = pCurrWrtShell->GetCurPageDesc();
SwPageDesc& rSrc = (SwPageDesc&)pCurrWrtShell->GetPageDesc( nPgDsc );
SwPageDesc& rDest = *(SwPageDesc*)pStyle->GetPageDesc();
- USHORT nPoolId = rDest.GetPoolFmtId();
- USHORT nHId = rDest.GetPoolHelpId();
- BYTE nHFId = rDest.GetPoolHlpFileId();
+ sal_uInt16 nPoolId = rDest.GetPoolFmtId();
+ sal_uInt16 nHId = rDest.GetPoolHelpId();
+ sal_uInt8 nHFId = rDest.GetPoolHlpFileId();
pCurrWrtShell->GetDoc()->CopyPageDesc( rSrc, rDest );
@@ -1230,7 +1230,7 @@ USHORT SwDocShell::MakeByExample( const String &rName, USHORT nFamily,
void SwDocShell::LoadStyles( SfxObjectShell& rSource )
{
- _LoadStyles(rSource, FALSE);
+ _LoadStyles(rSource, sal_False);
}
/* -----------------16.05.2003 15:45-----------------
bPreserveCurrentDocument determines whether SetFixFields() is called
@@ -1239,7 +1239,7 @@ void SwDocShell::LoadStyles( SfxObjectShell& rSource )
Calls of ::LoadStyles() normally use files especially loaded for the purpose
of importing styles.
--------------------------------------------------*/
-void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument )
+void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrentDocument )
{
/* [Beschreibung]
@@ -1268,7 +1268,7 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu
}
else
{
- BOOL bModified = pDoc->IsModified();
+ sal_Bool bModified = pDoc->IsModified();
pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc );
if( !bModified && pDoc->IsModified() && !pView )
{
@@ -1283,9 +1283,9 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocu
}
-void SwDocShell::FormatPage( const String& rPage, BOOL bColumn, SwWrtShell* pActShell )
+void SwDocShell::FormatPage( const String& rPage, sal_Bool bColumn, SwWrtShell* pActShell )
{
- Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, FALSE, bColumn, pActShell);
+ Edit( rPage, aEmptyStr, SFX_STYLE_FAMILY_PAGE, 0, sal_False, bColumn, pActShell);
}
Bitmap SwDocShell::GetStyleFamilyBitmap( SfxStyleFamily eFamily, BmpColorMode eColorMode )
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx
index b0b81c5df6e4..cc7792038f32 100644
--- a/sw/source/ui/app/docstyle.cxx
+++ b/sw/source/ui/app/docstyle.cxx
@@ -84,7 +84,7 @@
// die Familie wird neu generiert.
// Ausserdem gibt es jetzt zusaetzlich das Bit bPhysical. Ist dieses Bit
-// TRUE, werden die Pool-Formatnamen NICHT mit eingetragen.
+// sal_True, werden die Pool-Formatnamen NICHT mit eingetragen.
class SwImplShellAction
{
@@ -129,7 +129,7 @@ SwImplShellAction::~SwImplShellAction()
SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwCharFmt* pFmt = 0;
if( rName.Len() )
@@ -144,7 +144,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
if( !pFmt && bCreate )
{ // Pool abklappern
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetCharFmtFromPool(nId);
}
@@ -153,7 +153,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
{
if(pFmt)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
SwFmt* p = pFmt->DerivedFrom();
if( p && !p->IsDefault() )
pStyle->PresetParent( p->GetName() );
@@ -161,7 +161,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pFmt;
}
@@ -175,7 +175,7 @@ SwCharFmt* lcl_FindCharFmt( SwDoc& rDoc,
SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwTxtFmtColl* pColl = 0;
@@ -184,7 +184,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
pColl = rDoc.FindTxtFmtCollByName( rName );
if( !pColl && bCreate )
{ // Pool abklappern
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL);
if(nId != USHRT_MAX)
pColl = rDoc.GetTxtCollFromPool(nId);
}
@@ -194,7 +194,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
{
if(pColl)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if( pColl->DerivedFrom() && !pColl->DerivedFrom()->IsDefault() )
pStyle->PresetParent( pColl->DerivedFrom()->GetName() );
else
@@ -204,7 +204,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
pStyle->PresetFollow(rNext.GetName());
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pColl;
}
@@ -218,7 +218,7 @@ SwTxtFmtColl* lcl_FindParaFmt( SwDoc& rDoc,
SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
SwFrmFmt* pFmt = 0;
if( rName.Len() )
@@ -226,7 +226,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
pFmt = rDoc.FindFrmFmtByName( rName );
if( !pFmt && bCreate )
{ // Pool abklappern
- const USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
+ const sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT);
if(nId != USHRT_MAX)
pFmt = rDoc.GetFrmFmtFromPool(nId);
}
@@ -236,14 +236,14 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
{
if(pFmt)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if( pFmt->DerivedFrom() && !pFmt->DerivedFrom()->IsDefault() )
pStyle->PresetParent( pFmt->DerivedFrom()->GetName() );
else
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pFmt;
}
@@ -256,7 +256,7 @@ SwFrmFmt* lcl_FindFrmFmt( SwDoc& rDoc,
const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
const SwPageDesc* pDesc = 0;
@@ -265,7 +265,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
pDesc = rDoc.FindPageDescByName( rName );
if( !pDesc && bCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
if(nId != USHRT_MAX)
pDesc = rDoc.GetPageDescFromPool(nId);
}
@@ -275,14 +275,14 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
{
if(pDesc)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
if(pDesc->GetFollow())
pStyle->PresetFollow(pDesc->GetFollow()->GetName());
else
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pDesc;
}
@@ -290,7 +290,7 @@ const SwPageDesc* lcl_FindPageDesc( SwDoc& rDoc,
const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
const String& rName,
SwDocStyleSheet* pStyle = 0,
- BOOL bCreate = TRUE )
+ sal_Bool bCreate = sal_True )
{
const SwNumRule* pRule = 0;
@@ -299,7 +299,7 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
pRule = rDoc.FindNumRulePtr( rName );
if( !pRule && bCreate )
{
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE);
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE);
if(nId != USHRT_MAX)
pRule = rDoc.GetNumRuleFromPool(nId);
}
@@ -309,17 +309,17 @@ const SwNumRule* lcl_FindNumRule( SwDoc& rDoc,
{
if(pRule)
{
- pStyle->SetPhysical(TRUE);
+ pStyle->SetPhysical(sal_True);
pStyle->PresetParent( aEmptyStr );
}
else
- pStyle->SetPhysical(FALSE);
+ pStyle->SetPhysical(sal_False);
}
return pRule;
}
-USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
+sal_uInt16 lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
const String& rName )
{
if( rLst.Count() )
@@ -336,30 +336,30 @@ USHORT lcl_FindName( const SwPoolFmtList& rLst, SfxStyleFamily eFam,
default:; //prevent warning
}
sSrch += rName;
- for( USHORT i=0; i < rLst.Count(); ++i )
+ for( sal_uInt16 i=0; i < rLst.Count(); ++i )
if( *rLst[i] == sSrch )
return i;
}
return USHRT_MAX;
}
-BOOL FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
+sal_Bool FindPhyStyle( SwDoc& rDoc, const String& rName, SfxStyleFamily eFam )
{
switch( eFam )
{
case SFX_STYLE_FAMILY_CHAR :
- return 0 != lcl_FindCharFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindCharFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PARA :
- return 0 != lcl_FindParaFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindParaFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_FRAME:
- return 0 != lcl_FindFrmFmt( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindFrmFmt( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PAGE :
- return 0 != lcl_FindPageDesc( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindPageDesc( rDoc, rName, 0, sal_False );
case SFX_STYLE_FAMILY_PSEUDO:
- return 0 != lcl_FindNumRule( rDoc, rName, 0, FALSE );
+ return 0 != lcl_FindNumRule( rDoc, rName, 0, sal_False );
default:; //prevent warning
}
- return FALSE;
+ return sal_False;
}
@@ -372,7 +372,7 @@ void SwPoolFmtList::Append( char cChar, const String& rStr )
{
String* pStr = new String( cChar );
*pStr += rStr;
- for ( USHORT i=0; i < Count(); ++i )
+ for ( sal_uInt16 i=0; i < Count(); ++i )
{
if( *operator[](i) == *pStr )
{
@@ -404,7 +404,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
const String& rName,
SwDocStyleSheetPool& _rPool,
SfxStyleFamily eFam,
- USHORT _nMask) :
+ sal_uInt16 _nMask) :
SfxStyleSheetBase( rName, _rPool, eFam, _nMask ),
pCharFmt(0),
@@ -436,7 +436,7 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument,
SID_PARA_BACKGRND_DESTINATION, SID_ATTR_BRUSH_CHAR,
SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
0),
- bPhysical(FALSE)
+ bPhysical(sal_False)
{
nHelpId = UCHAR_MAX;
}
@@ -470,7 +470,7 @@ void SwDocStyleSheet::Reset()
aName.Erase();
aFollow.Erase();
aParent.Erase();
- SetPhysical(FALSE);
+ SetPhysical(sal_False);
}
/*--------------------------------------------------------------------
@@ -511,7 +511,7 @@ const String& SwDocStyleSheet::GetParent() const
String sTmp;
if( !pFmt ) // noch nicht vorhanden, also dflt. Parent
{
- USHORT i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
+ sal_uInt16 i = SwStyleNameMapper::GetPoolIdFromUIName( aName, eGetType );
i = ::GetPoolParent( i );
if( i && USHRT_MAX != i )
SwStyleNameMapper::FillUIName( i, sTmp );
@@ -548,19 +548,19 @@ const String& SwDocStyleSheet::GetFollow() const
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::HasFollowSupport() const
+sal_Bool SwDocStyleSheet::HasFollowSupport() const
{
switch(nFamily)
{
case SFX_STYLE_FAMILY_PARA :
- case SFX_STYLE_FAMILY_PAGE : return TRUE;
+ case SFX_STYLE_FAMILY_PAGE : return sal_True;
case SFX_STYLE_FAMILY_FRAME:
case SFX_STYLE_FAMILY_CHAR :
- case SFX_STYLE_FAMILY_PSEUDO: return FALSE;
+ case SFX_STYLE_FAMILY_PSEUDO: return sal_False;
default:
ASSERT(!this, "unbekannte Style-Familie");
}
- return FALSE;
+ return sal_False;
}
/*--------------------------------------------------------------------
@@ -568,28 +568,28 @@ BOOL SwDocStyleSheet::HasFollowSupport() const
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::HasParentSupport() const
+sal_Bool SwDocStyleSheet::HasParentSupport() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
case SFX_STYLE_FAMILY_PARA :
- case SFX_STYLE_FAMILY_FRAME: bRet = TRUE;
+ case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
default:; //prevent warning
}
return bRet;
}
-BOOL SwDocStyleSheet::HasClearParentSupport() const
+sal_Bool SwDocStyleSheet::HasClearParentSupport() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_PARA :
case SFX_STYLE_FAMILY_CHAR :
- case SFX_STYLE_FAMILY_FRAME: bRet = TRUE;
+ case SFX_STYLE_FAMILY_FRAME: bRet = sal_True;
default:; //prevent warning
}
return bRet;
@@ -655,8 +655,8 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
const SfxPoolItem* pItem = aIter.FirstItem();
String sPageNum, sModel, sBreak;
- BOOL bHasWesternFontPrefix = FALSE;
- BOOL bHasCJKFontPrefix = FALSE;
+ sal_Bool bHasWesternFontPrefix = sal_False;
+ sal_Bool bHasCJKFontPrefix = sal_False;
SvtCJKOptions aCJKOptions;
while ( pItem )
@@ -682,7 +682,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
*pItem, SFX_ITEM_PRESENTATION_COMPLETE,
eUnit, aItemPresentation, &aIntlWrapper ) )
{
- BOOL bIsDefault = FALSE;
+ sal_Bool bIsDefault = sal_False;
switch ( pItem->Which() )
{
case SID_ATTR_PARA_PAGENUM:
@@ -700,11 +700,11 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
case RES_CHRATR_CJK_POSTURE:
case RES_CHRATR_CJK_WEIGHT:
if(aCJKOptions.IsCJKFontEnabled())
- bIsDefault = TRUE;
+ bIsDefault = sal_True;
if(!bHasCJKFontPrefix)
{
aItemPresentation.Insert(SW_RESSTR(STR_CJK_FONT), 0);
- bHasCJKFontPrefix = TRUE;
+ bHasCJKFontPrefix = sal_True;
}
break;
case RES_CHRATR_FONT:
@@ -715,12 +715,12 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit)
if(!bHasWesternFontPrefix)
{
aItemPresentation.Insert(SW_RESSTR(STR_WESTERN_FONT), 0);
- bHasWesternFontPrefix = TRUE;
- bIsDefault = TRUE;
+ bHasWesternFontPrefix = sal_True;
+ bIsDefault = sal_True;
}
// no break;
default:
- bIsDefault = TRUE;
+ bIsDefault = sal_True;
}
if(bIsDefault)
{
@@ -778,20 +778,20 @@ String SwDocStyleSheet::GetDescription()
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetName( const String& rStr)
+sal_Bool SwDocStyleSheet::SetName( const String& rStr)
{
if( !rStr.Len() )
- return FALSE;
+ return sal_False;
if( aName != rStr )
{
if( !SfxStyleSheetBase::SetName( rStr ))
- return FALSE;
+ return sal_False;
}
else if(!bPhysical)
FillStyleSheet( FillPhysical );
- int bChg = FALSE;
+ int bChg = sal_False;
switch(nFamily)
{
case SFX_STYLE_FAMILY_CHAR :
@@ -800,7 +800,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
if( pCharFmt && pCharFmt->GetName() != rStr )
{
pCharFmt->SetName( rStr );
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -814,7 +814,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
else
pColl->SetName(rStr);
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -828,7 +828,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
else
pFrmFmt->SetName( rStr );
- bChg = TRUE;
+ bChg = sal_True;
}
break;
}
@@ -844,7 +844,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
String aOldName(aPageDesc.GetName());
aPageDesc.SetName( rStr );
- BOOL bDoesUndo = rDoc.DoesUndo();
+ sal_Bool bDoesUndo = rDoc.DoesUndo();
rDoc.DoUndo(aOldName.Len() > 0);
rDoc.ChgPageDesc(aOldName, aPageDesc);
@@ -852,7 +852,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
// <- #116530#
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
break;
case SFX_STYLE_FAMILY_PSEUDO:
@@ -871,7 +871,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
pNumRule = rDoc.FindNumRulePtr(rStr);
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
}
else
@@ -881,7 +881,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
// <--
rDoc.SetModified();
- bChg = TRUE;
+ bChg = sal_True;
}
}
// <- #106897#
@@ -900,7 +900,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
if( pSh )
pSh->CallChgLnk();
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -908,7 +908,7 @@ BOOL SwDocStyleSheet::SetName( const String& rStr)
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetParent( const String& rStr)
+sal_Bool SwDocStyleSheet::SetParent( const String& rStr)
{
SwFmt* pFmt = 0, *pParent = 0;
switch(nFamily)
@@ -938,7 +938,7 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
ASSERT(!this, "unbekannte Style-Familie");
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pFmt && pFmt->DerivedFrom() &&
pFmt->DerivedFrom()->GetName() != rStr )
{
@@ -963,10 +963,10 @@ BOOL SwDocStyleSheet::SetParent( const String& rStr)
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::SetFollow( const String& rStr)
+sal_Bool SwDocStyleSheet::SetFollow( const String& rStr)
{
if( rStr.Len() && !SfxStyleSheetBase::SetFollow( rStr ))
- return FALSE;
+ return sal_False;
SwImplShellAction aTmpSh( rDoc );
switch(nFamily)
@@ -992,7 +992,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
const SwPageDesc* pFollowDesc = rStr.Len()
? lcl_FindPageDesc(rDoc, rStr)
: 0;
- USHORT nId;
+ sal_uInt16 nId;
if( pFollowDesc != pDesc->GetFollow() &&
rDoc.FindPageDescByName( pDesc->GetName(), &nId ) )
{
@@ -1012,7 +1012,7 @@ BOOL SwDocStyleSheet::SetFollow( const String& rStr)
ASSERT(!this, "unbekannte Style-Familie");
}
- return TRUE;
+ return sal_True;
}
/*--------------------------------------------------------------------
@@ -1038,12 +1038,12 @@ SfxItemSet& SwDocStyleSheet::GetItemSet()
case SFX_STYLE_FAMILY_FRAME:
{
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
- aBoxInfo.SetTable( FALSE );
- aBoxInfo.SetDist( TRUE); // Abstandsfeld immer anzeigen
- aBoxInfo.SetMinDist( TRUE );// Minimalgroesse in Tabellen und Absaetzen setzen
+ aBoxInfo.SetTable( sal_False );
+ aBoxInfo.SetDist( sal_True); // Abstandsfeld immer anzeigen
+ aBoxInfo.SetMinDist( sal_True );// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetDefDist( MIN_BORDER_DIST );// Default-Abstand immer setzen
// Einzelne Linien koennen nur in Tabellen DontCare-Status haben
- aBoxInfo.SetValid( VALID_DISABLE, TRUE );
+ aBoxInfo.SetValid( VALID_DISABLE, sal_True );
if ( nFamily == SFX_STYLE_FAMILY_PARA )
{
ASSERT(pColl, "Wo ist die Collektion");
@@ -1150,7 +1150,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwFmt* pFmt = 0;
SwPageDesc* pNewDsc = 0;
- USHORT nPgDscPos = 0;
+ sal_uInt16 nPgDscPos = 0;
switch(nFamily)
{
@@ -1165,13 +1165,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
ASSERT(pColl, "Wo ist die Collection");
const SfxPoolItem* pAutoUpdate;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
pColl->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
}
const SwCondCollItem* pCondItem;
- if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, FALSE,
+ if( SFX_ITEM_SET != rSet.GetItemState( FN_COND_COLL, sal_False,
(const SfxPoolItem**)&pCondItem ))
pCondItem = 0;
@@ -1179,13 +1179,13 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SwFmt* pFindFmt;
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
- for(USHORT i = 0; i < COND_COMMAND_COUNT; i++)
+ for(sal_uInt16 i = 0; i < COND_COMMAND_COUNT; i++)
{
SwCollCondition aCond( 0, pCmds[ i ].nCnd, pCmds[ i ].nSubCond );
((SwConditionTxtFmtColl*)pColl)->RemoveCondition( aCond );
const String& rStyle = pCondItem->GetStyle( i );
if( rStyle.Len() &&
- 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE )))
+ 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
{
pFindFmt->Add( &aCond );
((SwConditionTxtFmtColl*)pColl)->InsertCondition( aCond );
@@ -1215,11 +1215,11 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwTxtFmtColl* pFindFmt;
const CommandStruct* pCmds = SwCondCollItem::GetCmds();
- for( USHORT i = 0; i < COND_COMMAND_COUNT; ++i )
+ for( sal_uInt16 i = 0; i < COND_COMMAND_COUNT; ++i )
{
const String& rStyle = pCondItem->GetStyle( i );
if( rStyle.Len() &&
- 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, TRUE )))
+ 0 != ( pFindFmt = lcl_FindParaFmt( rDoc, rStyle, 0, sal_True )))
{
pCColl->InsertCondition( SwCollCondition( pFindFmt,
pCmds[ i ].nCnd, pCmds[ i ].nSubCond ) );
@@ -1231,9 +1231,9 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
}
// --> OD 2008-02-12 #newlistlevelattrs#
if ( bResetIndentAttrsAtParagraphStyle &&
- rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, 0 ) == SFX_ITEM_SET &&
- rSet.GetItemState( RES_LR_SPACE, FALSE, 0 ) != SFX_ITEM_SET &&
- pColl->GetItemState( RES_LR_SPACE, FALSE, 0 ) == SFX_ITEM_SET )
+ rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, 0 ) == SFX_ITEM_SET &&
+ rSet.GetItemState( RES_LR_SPACE, sal_False, 0 ) != SFX_ITEM_SET &&
+ pColl->GetItemState( RES_LR_SPACE, sal_False, 0 ) == SFX_ITEM_SET )
{
rDoc.ResetAttrAtFormat( RES_LR_SPACE, *pColl );
}
@@ -1244,7 +1244,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
// neither the paragraph style nor the numbering style is used in the document
// the numbering style will not be saved with the document and the assignment got lost.
const SfxPoolItem* pNumRuleItem = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pNumRuleItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pNumRuleItem ) )
{ // Setting a numbering rule?
String sNumRule = ((SwNumRuleItem*)pNumRuleItem)->GetValue();
if( sNumRule.Len() )
@@ -1252,7 +1252,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
SwNumRule* pRule = rDoc.FindNumRulePtr( sNumRule );
if( !pRule )
{ // Numbering rule not in use yet.
- USHORT nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
+ sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sNumRule, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
if( USHRT_MAX != nPoolId ) // It's a standard numbering rule
{
pRule = rDoc.GetNumRuleFromPool( nPoolId ); // Create numbering rule (physical)
@@ -1263,7 +1263,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
pFmt = pColl;
- USHORT nId = pColl->GetPoolFmtId() &
+ sal_uInt16 nId = pColl->GetPoolFmtId() &
~ ( COLL_GET_RANGE_BITS | POOLGRP_NOCOLLID );
switch( GetMask() & ( 0x0fff & ~SWSTYLEBIT_CONDCOLL ) )
{
@@ -1293,7 +1293,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
ASSERT(pFrmFmt, "Wo ist das FrmFmt");
const SfxPoolItem* pAutoUpdate;
- if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,FALSE, &pAutoUpdate ))
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,sal_False, &pAutoUpdate ))
{
pFrmFmt->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
}
@@ -1329,7 +1329,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
break;
const SfxPoolItem* pItem;
- switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ switch( rSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
case SFX_ITEM_SET:
{
@@ -1366,7 +1366,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
{
SfxItemIter aIter( rSet );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if( IsInvalidItem( pItem ) ) // Clearen
{
@@ -1416,7 +1416,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
// <--
}
-void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
+void lcl_SaveStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc )
{
switch( nFamily )
{
@@ -1475,7 +1475,7 @@ void lcl_SaveStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
}
}
-void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
+void lcl_DeleteInfoStyles( sal_uInt16 nFamily, SvPtrarr& rArr, SwDoc& rDoc )
{
sal_uInt16 n, nCnt;
switch( nFamily )
@@ -1562,15 +1562,15 @@ void lcl_DeleteInfoStyles( USHORT nFamily, SvPtrarr& rArr, SwDoc& rDoc )
Beschreibung: Das Format ermitteln
--------------------------------------------------------------------*/
-BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
+sal_Bool SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
{
- BOOL bRet = FALSE;
- USHORT nPoolId = USHRT_MAX;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPoolId = USHRT_MAX;
SwFmt* pFmt = 0;
- BOOL bCreate = FillPhysical == eFType;
- BOOL bDeleteInfo = FALSE;
- BOOL bFillOnlyInfo = FillAllInfo == eFType;
+ sal_Bool bCreate = FillPhysical == eFType;
+ sal_Bool bDeleteInfo = sal_False;
+ sal_Bool bFillOnlyInfo = FillAllInfo == eFType;
SvPtrarr aDelArr;
switch(nFamily)
@@ -1580,9 +1580,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pCharFmt;
if( bFillOnlyInfo && !bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pCharFmt = lcl_FindCharFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pCharFmt = lcl_FindCharFmt(rDoc, aName, this, sal_True );
}
pFmt = pCharFmt;
@@ -1607,9 +1607,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pColl;
if( bFillOnlyInfo && !bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pColl = lcl_FindParaFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pColl = lcl_FindParaFmt(rDoc, aName, this, sal_True );
}
pFmt = pColl;
@@ -1630,9 +1630,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pFrmFmt;
if( bFillOnlyInfo && bPhysical )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pFrmFmt = lcl_FindFrmFmt(rDoc, aName, this, sal_True );
}
pFmt = pFrmFmt;
if( !bCreate && !pFmt )
@@ -1649,9 +1649,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pDesc;
if( bFillOnlyInfo && !pDesc )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pDesc = lcl_FindPageDesc( rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pDesc = lcl_FindPageDesc( rDoc, aName, this, sal_True );
}
if( pDesc )
@@ -1677,9 +1677,9 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
bPhysical = 0 != pNumRule;
if( bFillOnlyInfo && !pNumRule )
{
- bDeleteInfo = TRUE;
- ::lcl_SaveStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
- pNumRule = lcl_FindNumRule( rDoc, aName, this, TRUE );
+ bDeleteInfo = sal_True;
+ ::lcl_SaveStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
+ pNumRule = lcl_FindNumRule( rDoc, aName, this, sal_True );
}
if( pNumRule )
@@ -1710,7 +1710,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
if( pFmt )
nPoolId = pFmt->GetPoolFmtId();
- USHORT _nMask = 0;
+ sal_uInt16 _nMask = 0;
if( pFmt == rDoc.GetDfltCharFmt() )
_nMask |= SFXSTYLEBIT_READONLY;
else if( USER_FMT & nPoolId )
@@ -1743,7 +1743,7 @@ BOOL SwDocStyleSheet::FillStyleSheet( FillStyleType eFType )
SetMask( _nMask );
}
if( bDeleteInfo && bFillOnlyInfo )
- ::lcl_DeleteInfoStyles( static_cast< USHORT >(nFamily), aDelArr, rDoc );
+ ::lcl_DeleteInfoStyles( static_cast< sal_uInt16 >(nFamily), aDelArr, rDoc );
return bRet;
}
@@ -1761,7 +1761,7 @@ void SwDocStyleSheet::Create()
if( !pCharFmt )
pCharFmt = rDoc.MakeCharFmt(aName,
rDoc.GetDfltCharFmt());
- pCharFmt->SetAuto( FALSE );
+ pCharFmt->SetAuto( sal_False );
break;
case SFX_STYLE_FAMILY_PARA :
@@ -1779,7 +1779,7 @@ void SwDocStyleSheet::Create()
case SFX_STYLE_FAMILY_FRAME:
pFrmFmt = lcl_FindFrmFmt( rDoc, aName );
if( !pFrmFmt )
- pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), FALSE, FALSE);
+ pFrmFmt = rDoc.MakeFrmFmt(aName, rDoc.GetDfltFrmFmt(), sal_False, sal_False);
break;
@@ -1787,7 +1787,7 @@ void SwDocStyleSheet::Create()
pDesc = lcl_FindPageDesc( rDoc, aName );
if( !pDesc )
{
- USHORT nId = rDoc.MakePageDesc(aName);
+ sal_uInt16 nId = rDoc.MakePageDesc(aName);
pDesc = &const_cast<const SwDoc &>(rDoc).GetPageDesc(nId);
}
break;
@@ -1803,12 +1803,12 @@ void SwDocStyleSheet::Create()
// --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule* pRule = rDoc.GetNumRuleTbl()[
- rDoc.MakeNumRule( sTmpNm, 0, FALSE,
+ rDoc.MakeNumRule( sTmpNm, 0, sal_False,
// --> OD 2008-06-06 #i89178#
numfunc::GetDefaultPositionAndSpaceMode() ) ];
// <--
// <--
- pRule->SetAutoRule( FALSE );
+ pRule->SetAutoRule( sal_False );
if( !aName.Len() )
{
// --> OD 2008-07-08 #i91400#
@@ -1820,7 +1820,7 @@ void SwDocStyleSheet::Create()
break;
default:; //prevent warning
}
- bPhysical = TRUE;
+ bPhysical = sal_True;
aCoreSet.ClearItem();
}
@@ -1888,7 +1888,7 @@ void SwDocStyleSheet::PresetNameAndFamily(const String& rName)
--------------------------------------------------------------------*/
-void SwDocStyleSheet::SetPhysical(BOOL bPhys)
+void SwDocStyleSheet::SetPhysical(sal_Bool bPhys)
{
bPhysical = bPhys;
@@ -1909,7 +1909,7 @@ SwFrmFmt* SwDocStyleSheet::GetFrmFmt()
}
-BOOL SwDocStyleSheet::IsUsed() const
+sal_Bool SwDocStyleSheet::IsUsed() const
{
if( !bPhysical )
{
@@ -1919,7 +1919,7 @@ BOOL SwDocStyleSheet::IsUsed() const
// immer noch nicht ?
if( !bPhysical )
- return FALSE;
+ return sal_False;
const SwModify* pMod;
switch( nFamily )
@@ -1930,22 +1930,22 @@ BOOL SwDocStyleSheet::IsUsed() const
case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break;
case SFX_STYLE_FAMILY_PSEUDO:
- return pNumRule ? rDoc.IsUsed( *pNumRule ) : FALSE;
+ return pNumRule ? rDoc.IsUsed( *pNumRule ) : sal_False;
default:
ASSERT(!this, "unbekannte Style-Familie");
- return FALSE;
+ return sal_False;
}
return rDoc.IsUsed( *pMod );
}
-ULONG SwDocStyleSheet::GetHelpId( String& rFile )
+sal_uLong SwDocStyleSheet::GetHelpId( String& rFile )
{
static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
- USHORT nId = 0;
- USHORT nPoolId = 0;
+ sal_uInt16 nId = 0;
+ sal_uInt16 nPoolId = 0;
unsigned char nFileId = UCHAR_MAX;
rFile = sTemplateHelpFile;
@@ -1955,7 +1955,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
{
case SFX_STYLE_FAMILY_CHAR :
if( !pCharFmt &&
- 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, FALSE )) )
+ 0 == (pCharFmt = lcl_FindCharFmt( rDoc, aName, 0, sal_False )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -1965,7 +1965,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PARA:
if( !pColl &&
- 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, FALSE )) )
+ 0 == ( pColl = lcl_FindParaFmt( rDoc, aName, 0, sal_False )) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
return USHRT_MAX == nId ? 0 : nId;
@@ -1975,7 +1975,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_FRAME:
if( !pFrmFmt &&
- 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pFrmFmt = lcl_FindFrmFmt( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_FRMFMT );
return USHRT_MAX == nId ? 0 : nId;
@@ -1985,7 +1985,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PAGE:
if( !pDesc &&
- 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pDesc = lcl_FindPageDesc( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC );
return USHRT_MAX == nId ? 0 : nId;
@@ -1998,7 +1998,7 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
case SFX_STYLE_FAMILY_PSEUDO:
if( !pNumRule &&
- 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, FALSE ) ) )
+ 0 == ( pNumRule = lcl_FindNumRule( rDoc, aName, 0, sal_False ) ) )
{
nId = SwStyleNameMapper::GetPoolIdFromUIName( aName, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE );
return USHRT_MAX == nId ? 0 : nId;
@@ -2043,10 +2043,10 @@ static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp");
}
-void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId )
+void SwDocStyleSheet::SetHelpId( const String& r, sal_uLong nId )
{
- BYTE nFileId = static_cast< BYTE >(rDoc.SetDocPattern( r ));
- USHORT nHId = static_cast< USHORT >(nId); //!! SFX hat eigenmaechtig auf ULONG umgestellt!
+ sal_uInt8 nFileId = static_cast< sal_uInt8 >(rDoc.SetDocPattern( r ));
+ sal_uInt16 nHId = static_cast< sal_uInt16 >(nId); //!! SFX hat eigenmaechtig auf sal_uLong umgestellt!
SwFmt* pTmpFmt = 0;
switch( nFamily )
@@ -2082,7 +2082,7 @@ void SwDocStyleSheet::SetHelpId( const String& r, ULONG nId )
Beschreibung: Methoden fuer den DocStyleSheetPool
--------------------------------------------------------------------*/
-SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, BOOL bOrg )
+SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, sal_Bool bOrg )
: SfxStyleSheetBasePool( rDocument.GetAttrPool() )
, mxStyleSheet( new SwDocStyleSheet( rDocument, aEmptyStr, *this, SFX_STYLE_FAMILY_CHAR, 0 ) )
, rDoc( rDocument )
@@ -2107,15 +2107,15 @@ void SAL_CALL SwDocStyleSheetPool::release( ) throw ()
SfxStyleSheetBase& SwDocStyleSheetPool::Make(
const String& rName,
SfxStyleFamily eFam,
- USHORT _nMask,
- USHORT /*nPos*/ )
+ sal_uInt16 _nMask,
+ sal_uInt16 /*nPos*/ )
{
mxStyleSheet->PresetName(rName);
mxStyleSheet->PresetParent(aEmptyStr);
mxStyleSheet->PresetFollow(aEmptyStr);
mxStyleSheet->SetMask(_nMask) ;
mxStyleSheet->SetFamily(eFam);
- mxStyleSheet->SetPhysical(TRUE);
+ mxStyleSheet->SetPhysical(sal_True);
mxStyleSheet->Create();
return *mxStyleSheet.get();
@@ -2130,7 +2130,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const SfxStyleSheetBase& /*rOr
SfxStyleSheetBase* SwDocStyleSheetPool::Create( const String &,
- SfxStyleFamily, USHORT )
+ SfxStyleFamily, sal_uInt16 )
{
ASSERT( !this, "Create im SW-Stylesheet-Pool geht nicht" );
return NULL;
@@ -2163,7 +2163,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
SwImplShellAction aTmpSh( rDoc );
- BOOL bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
+ sal_Bool bSwSrcPool = GetAppName() == rSource.GetPool().GetAppName();
if( SFX_STYLE_FAMILY_PAGE == eFamily && bSwSrcPool )
{
// gesondert behandeln!!
@@ -2177,7 +2177,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
{
const SwFmt *pSourceFmt = 0;
SwFmt *pTargetFmt = 0;
- USHORT nPgDscPos = USHRT_MAX;
+ sal_uInt16 nPgDscPos = USHRT_MAX;
switch( eFamily )
{
case SFX_STYLE_FAMILY_CHAR :
@@ -2237,7 +2237,7 @@ void SwDocStyleSheetPool::Replace( SfxStyleSheetBase& rSource,
}
SfxStyleSheetIterator* SwDocStyleSheetPool::CreateIterator(
- SfxStyleFamily eFam, USHORT _nMask )
+ SfxStyleFamily eFam, sal_uInt16 _nMask )
{
return new SwStyleSheetIterator( this, eFam, _nMask );
}
@@ -2252,35 +2252,35 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
if( !pStyle )
return;
- BOOL bBroadcast = TRUE;
+ sal_Bool bBroadcast = sal_True;
SwImplShellAction aTmpSh( rDoc );
const String& rName = pStyle->GetName();
switch( pStyle->GetFamily() )
{
case SFX_STYLE_FAMILY_CHAR:
{
- SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, FALSE );
+ SwCharFmt* pFmt = lcl_FindCharFmt(rDoc, rName, 0, sal_False );
if(pFmt)
rDoc.DelCharFmt(pFmt);
}
break;
case SFX_STYLE_FAMILY_PARA:
{
- SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, FALSE );
+ SwTxtFmtColl* pColl = lcl_FindParaFmt(rDoc, rName, 0, sal_False );
if(pColl)
rDoc.DelTxtFmtColl(pColl);
}
break;
case SFX_STYLE_FAMILY_FRAME:
{
- SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, FALSE );
+ SwFrmFmt* pFmt = lcl_FindFrmFmt(rDoc, rName, 0, sal_False );
if(pFmt)
rDoc.DelFrmFmt(pFmt);
}
break;
case SFX_STYLE_FAMILY_PAGE :
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( rDoc.FindPageDescByName( rName, &nPos ))
rDoc.DelPageDesc( nPos );
}
@@ -2290,13 +2290,13 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
{
if( !rDoc.DelNumRule( rName ) )
// Broadcast nur versenden, wenn etwas geloescht wurde
- bBroadcast = FALSE;
+ bBroadcast = sal_False;
}
break;
default:
ASSERT(!this, "unbekannte Style-Familie");
- bBroadcast = FALSE;
+ bBroadcast = sal_False;
}
if( bBroadcast )
@@ -2305,7 +2305,7 @@ void SwDocStyleSheetPool::Remove( SfxStyleSheetBase* pStyle)
-BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
+sal_Bool SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
const String &rStyle, const String &rParent )
{
SwFmt* pFmt = 0, *pParent = 0;
@@ -2334,7 +2334,7 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
ASSERT(!this, "unbekannte Style-Familie");
}
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pFmt && pFmt->DerivedFrom() &&
pFmt->DerivedFrom()->GetName() != rParent )
{
@@ -2363,9 +2363,9 @@ BOOL SwDocStyleSheetPool::SetParent( SfxStyleFamily eFam,
}
SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
- SfxStyleFamily eFam, USHORT n )
+ SfxStyleFamily eFam, sal_uInt16 n )
{
- USHORT nSMask = n;
+ sal_uInt16 nSMask = n;
if( SFX_STYLE_FAMILY_PARA == eFam && rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
// dann sind nur HTML-Vorlagen von Interesse
@@ -2378,14 +2378,14 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
nSMask = SWSTYLEBIT_HTML;
}
- const BOOL bSearchUsed = ( n != SFXSTYLEBIT_ALL &&
- n & SFXSTYLEBIT_USED ) ? TRUE : FALSE;
+ const sal_Bool bSearchUsed = ( n != SFXSTYLEBIT_ALL &&
+ n & SFXSTYLEBIT_USED ) ? sal_True : sal_False;
const SwModify* pMod = 0;
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
mxStyleSheet->PresetName( rName );
mxStyleSheet->SetFamily( eFam );
- BOOL bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
+ sal_Bool bFnd = mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( mxStyleSheet->IsPhysical() )
{
@@ -2416,7 +2416,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
? !(pRule->GetPoolFmtId() & USER_FMT)
// benutzte gesucht und keine gefunden
: bSearchUsed ))
- bFnd = FALSE;
+ bFnd = sal_False;
}
break;
@@ -2428,7 +2428,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
// dann noch die Maske auswerten:
if( pMod && !(bSearchUsed && (bOrganizer || rDoc.IsUsed(*pMod)) ) )
{
- const USHORT nId = SFX_STYLE_FAMILY_PAGE == eFam
+ const sal_uInt16 nId = SFX_STYLE_FAMILY_PAGE == eFam
? ((SwPageDesc*)pMod)->GetPoolFmtId()
: ((SwFmt*)pMod)->GetPoolFmtId();
@@ -2436,7 +2436,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
? !(nId & USER_FMT)
// benutzte gesucht und keine gefunden
: bSearchUsed )
- bFnd = FALSE;
+ bFnd = sal_False;
}
return bFnd ? mxStyleSheet.get() : 0;
}
@@ -2444,12 +2444,12 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const String& rName,
/* */
SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
- SfxStyleFamily eFam, USHORT n )
+ SfxStyleFamily eFam, sal_uInt16 n )
: SfxStyleSheetIterator( pBase, eFam, n ),
mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ),
mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), aEmptyStr, *pBase, SFX_STYLE_FAMILY_CHAR, 0 ) )
{
- bFirstCalled = FALSE;
+ bFirstCalled = sal_False;
nLastPos = 0;
StartListening( *pBase );
}
@@ -2459,7 +2459,7 @@ SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
EndListening( mxIterSheet->GetPool() );
}
-USHORT SwStyleSheetIterator::Count()
+sal_uInt16 SwStyleSheetIterator::Count()
{
// Liste richtig fuellen lassen !!
if( !bFirstCalled )
@@ -2467,13 +2467,13 @@ USHORT SwStyleSheetIterator::Count()
return aLst.Count();
}
-SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx )
+SfxStyleSheetBase* SwStyleSheetIterator::operator[]( sal_uInt16 nIdx )
{
// gefunden
if( !bFirstCalled )
First();
mxStyleSheet->PresetNameAndFamily( *aLst[ nIdx ] );
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
return mxStyleSheet.get();
@@ -2482,7 +2482,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::operator[]( USHORT nIdx )
SfxStyleSheetBase* SwStyleSheetIterator::First()
{
// Alte Liste loeschen
- bFirstCalled = TRUE;
+ bFirstCalled = sal_True;
nLastPos = 0;
aLst.Erase();
@@ -2490,27 +2490,27 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
mxIterSheet->Reset();
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
- const USHORT nSrchMask = nMask;
- const BOOL bIsSearchUsed = SearchUsed();
+ const sal_uInt16 nSrchMask = nMask;
+ const sal_Bool bIsSearchUsed = SearchUsed();
- const BOOL bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode();
+ const sal_Bool bOrganizer = ((SwDocStyleSheetPool*)pBasePool)->IsOrganizerMode();
if( nSearchFamily == SFX_STYLE_FAMILY_CHAR
|| nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nArrLen = rDoc.GetCharFmts()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetCharFmts()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwCharFmt* pFmt = (*rDoc.GetCharFmts())[ i ];
if( pFmt->IsDefault() && pFmt != rDoc.GetDfltCharFmt() )
continue;
- const BOOL bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt));
+ const sal_Bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.IsUsed(*pFmt));
if( !bUsed )
{
// Standard ist keine Benutzervorlage #46181#
- const USHORT nId = rDoc.GetDfltCharFmt() == pFmt ?
- USHORT( RES_POOLCHR_INET_NORMAL ):
+ const sal_uInt16 nId = rDoc.GetDfltCharFmt() == pFmt ?
+ sal_uInt16( RES_POOLCHR_INET_NORMAL ):
pFmt->GetPoolFmtId();
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
? !(nId & USER_FMT)
@@ -2560,7 +2560,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_PARA ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- USHORT nSMask = nSrchMask;
+ sal_uInt16 nSMask = nSrchMask;
if( rDoc.get(IDocumentSettingAccess::HTML_MODE) )
{
// dann sind nur HTML-Vorlagen von Interesse
@@ -2574,18 +2574,18 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nSMask = SWSTYLEBIT_HTML;
}
- const USHORT nArrLen = rDoc.GetTxtFmtColls()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetTxtFmtColls()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwTxtFmtColl* pColl = (*rDoc.GetTxtFmtColls())[ i ];
if(pColl->IsDefault())
continue;
- const BOOL bUsed = bOrganizer || rDoc.IsUsed(*pColl);
+ const sal_Bool bUsed = bOrganizer || rDoc.IsUsed(*pColl);
if( !(bIsSearchUsed && bUsed ))
{
- const USHORT nId = pColl->GetPoolFmtId();
+ const sal_uInt16 nId = pColl->GetPoolFmtId();
switch ( (nSMask & ~SFXSTYLEBIT_USED) )
{
case SFXSTYLEBIT_USERDEF:
@@ -2615,7 +2615,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( (nId & COLL_GET_RANGE_BITS) != COLL_HTML_BITS)
{
// einige wollen wir aber auch in dieser Section sehen
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
switch( nId )
{
case RES_POOLCOLL_SENDADRESS: // --> ADDRESS
@@ -2632,7 +2632,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
case RES_POOLCOLL_STANDARD: // --> P
case RES_POOLCOLL_FOOTNOTE:
case RES_POOLCOLL_ENDNOTE:
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
if( bWeiter )
@@ -2651,7 +2651,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
aLst.Append( cPARA, pColl->GetName() );
}
- const BOOL bAll = nSMask == SFXSTYLEBIT_ALL;
+ const sal_Bool bAll = nSMask == SFXSTYLEBIT_ALL;
if ( bAll || (nSMask & ~SFXSTYLEBIT_USED) == SWSTYLEBIT_TEXT )
AppendStyleList(SwStyleNameMapper::GetTextUINameArray(),
bIsSearchUsed, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, cPARA );
@@ -2684,7 +2684,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( !bAll )
{
// dann auch die, die wir mappen:
- static USHORT aPoolIds[] = {
+ static sal_uInt16 aPoolIds[] = {
RES_POOLCOLL_SENDADRESS, // --> ADDRESS
RES_POOLCOLL_TABLE_HDLN, // --> TH
RES_POOLCOLL_TABLE, // --> TD
@@ -2702,7 +2702,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
0
};
- USHORT* pPoolIds = aPoolIds;
+ sal_uInt16* pPoolIds = aPoolIds;
String s;
while( *pPoolIds )
{
@@ -2718,8 +2718,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_FRAME ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nArrLen = rDoc.GetFrmFmts()->Count();
- for( USHORT i = 0; i < nArrLen; i++ )
+ const sal_uInt16 nArrLen = rDoc.GetFrmFmts()->Count();
+ for( sal_uInt16 i = 0; i < nArrLen; i++ )
{
SwFrmFmt* pFmt = (*rDoc.GetFrmFmts())[ i ];
@@ -2728,8 +2728,8 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
continue;
}
- const USHORT nId = pFmt->GetPoolFmtId();
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt));
+ const sal_uInt16 nId = pFmt->GetPoolFmtId();
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt));
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2754,13 +2754,13 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
if( nSearchFamily == SFX_STYLE_FAMILY_PAGE ||
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
- const USHORT nCount = rDoc.GetPageDescCnt();
- for(USHORT i = 0; i < nCount; ++i)
+ const sal_uInt16 nCount = rDoc.GetPageDescCnt();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
{
const SwPageDesc& rDesc =
const_cast<const SwDoc &>(rDoc).GetPageDesc(i);
- const USHORT nId = rDesc.GetPoolFmtId();
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc));
+ const sal_uInt16 nId = rDesc.GetPoolFmtId();
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rDesc));
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2781,12 +2781,12 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nSearchFamily == SFX_STYLE_FAMILY_ALL )
{
const SwNumRuleTbl& rNumTbl = rDoc.GetNumRuleTbl();
- for(USHORT i = 0; i < rNumTbl.Count(); ++i)
+ for(sal_uInt16 i = 0; i < rNumTbl.Count(); ++i)
{
const SwNumRule& rRule = *rNumTbl[ i ];
if( !rRule.IsAutoRule() )
{
- BOOL bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) );
+ sal_Bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) );
if( !bUsed )
{
if( (nSrchMask & ~SFXSTYLEBIT_USED) == SFXSTYLEBIT_USERDEF
@@ -2818,7 +2818,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Next()
if(aLst.Count() > 0 && nLastPos < aLst.Count())
{
mxIterSheet->PresetNameAndFamily(*aLst[nLastPos]);
- mxIterSheet->SetPhysical( FALSE );
+ mxIterSheet->SetPhysical( sal_False );
mxIterSheet->SetMask( nMask );
if(mxIterSheet->pSet)
{
@@ -2844,7 +2844,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName )
// neuer Name gesetzt, also bestimme seine Daten
mxStyleSheet->FillStyleSheet( SwDocStyleSheet::FillOnlyName );
if( !mxStyleSheet->IsPhysical() )
- mxStyleSheet->SetPhysical( FALSE );
+ mxStyleSheet->SetPhysical( sal_False );
return mxStyleSheet.get();
}
@@ -2852,16 +2852,16 @@ SfxStyleSheetBase* SwStyleSheetIterator::Find( const UniString& rName )
}
void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
- BOOL bTestUsed,
- USHORT nSection, char cType )
+ sal_Bool bTestUsed,
+ sal_uInt16 nSection, char cType )
{
if( bTestUsed )
{
SwDoc& rDoc = ((SwDocStyleSheetPool*)pBasePool)->GetDoc();
- for ( USHORT i=0; i < rList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < rList.Count(); ++i )
{
- BOOL bUsed = FALSE;
- USHORT nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection);
+ sal_Bool bUsed = sal_False;
+ sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName(*rList[i], (SwGetPoolIdFromName)nSection);
switch ( nSection )
{
case nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL:
@@ -2883,7 +2883,7 @@ void SwStyleSheetIterator::AppendStyleList(const SvStringsDtor& rList,
}
}
else
- for ( USHORT i=0; i < rList.Count(); ++i )
+ for ( sal_uInt16 i=0; i < rList.Count(); ++i )
aLst.Append( cType, *rList[i] );
}
@@ -2897,7 +2897,7 @@ void SwStyleSheetIterator::Notify( SfxBroadcaster&, const SfxHint& rHint )
if (pStyle)
{
- USHORT nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(),
+ sal_uInt16 nTmpPos = lcl_FindName( aLst, pStyle->GetFamily(),
pStyle->GetName() );
if( nTmpPos < aLst.Count() )
aLst.DeleteAndDestroy( nTmpPos );
diff --git a/sw/source/ui/app/mainwn.cxx b/sw/source/ui/app/mainwn.cxx
index e6085a4a8662..d9750b737617 100644
--- a/sw/source/ui/app/mainwn.cxx
+++ b/sw/source/ui/app/mainwn.cxx
@@ -58,7 +58,7 @@ static SvPtrarr *pProgressContainer = 0;
static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
{
- for ( USHORT i = 0; i < pProgressContainer->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pProgressContainer->Count(); ++i )
{
SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i];
if ( pTmp->pDocShell == pDocShell )
@@ -68,7 +68,7 @@ static SwProgress *lcl_SwFindProgress( SwDocShell *pDocShell )
}
-void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue,
+void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
SwDocShell *pDocShell )
{
if( !SW_MOD()->IsEmbeddedLoadSave() )
@@ -88,8 +88,8 @@ void StartProgress( USHORT nMessResId, long nStartValue, long nEndValue,
pProgress->pProgress = new SfxProgress( pDocShell,
SW_RESSTR(nMessResId),
nEndValue - nStartValue,
- FALSE,
- TRUE );
+ sal_False,
+ sal_True );
pProgress->nStartCount = 1;
pProgress->pDocShell = pDocShell;
pProgressContainer->Insert( (void*)pProgress, 0 );
@@ -115,7 +115,7 @@ void EndProgress( SwDocShell *pDocShell )
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
SwProgress *pProgress = 0;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < pProgressContainer->Count(); ++i )
{
SwProgress *pTmp = (SwProgress*)(*pProgressContainer)[i];
@@ -141,7 +141,7 @@ void EndProgress( SwDocShell *pDocShell )
}
-void SetProgressText( USHORT nId, SwDocShell *pDocShell )
+void SetProgressText( sal_uInt16 nId, SwDocShell *pDocShell )
{
if( pProgressContainer && !SW_MOD()->IsEmbeddedLoadSave() )
{
diff --git a/sw/source/ui/app/swmodul1.cxx b/sw/source/ui/app/swmodul1.cxx
index 2b3a5df1391b..f5e79b9da72f 100644
--- a/sw/source/ui/app/swmodul1.cxx
+++ b/sw/source/ui/app/swmodul1.cxx
@@ -160,7 +160,7 @@ SwView* SwModule::GetNextView(SwView* pView)
{
DBG_ASSERT(PTR_CAST(SwView, pView),"keine SwView uebergeben");
const TypeId aTypeId = TYPE(SwView);
- SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, TRUE);
+ SwView* pNView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId, sal_True);
return pNView;
}
@@ -236,7 +236,7 @@ void SwModule::ApplyUsrPref(const SwViewOption &rUsrPref, SwView* pActView,
/* -----------------------------28.09.00 12:36--------------------------------
---------------------------------------------------------------------------*/
-void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb )
+void SwModule::ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -274,7 +274,7 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, BOOL bWeb )
/*-- 12.11.2008 14:47:58---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwModule::ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb )
+void SwModule::ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb )
{
SwMasterUsrPref* pPref;
if(bWeb)
@@ -329,11 +329,11 @@ SwPrintOptions* SwModule::GetPrtOptions(sal_Bool bWeb)
{
if(bWeb && !pWebPrtOpt)
{
- pWebPrtOpt = new SwPrintOptions(TRUE);
+ pWebPrtOpt = new SwPrintOptions(sal_True);
}
else if(!bWeb && !pPrtOpt)
{
- pPrtOpt = new SwPrintOptions(FALSE);
+ pPrtOpt = new SwPrintOptions(sal_False);
}
return bWeb ? pWebPrtOpt : pPrtOpt;
@@ -353,7 +353,7 @@ SwChapterNumRules* SwModule::GetChapterNumRules()
Beschreibung:
--------------------------------------------------------------------*/
-void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, BOOL /*bOnlyIfAvailable*/)
+void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData, sal_Bool /*bOnlyIfAvailable*/)
{
Reference<XFrame> xFrame = rView.GetViewFrame()->GetFrame().GetFrameInterface();
Reference<XDispatchProvider> xDP(xFrame, uno::UNO_QUERY);
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 3f1c4665c6e3..644faae08d26 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -468,7 +468,7 @@ void SwDLL::RegisterControls()
::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod);
- ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod );
+ ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pMod );
}
diff --git a/sw/source/ui/app/swwait.cxx b/sw/source/ui/app/swwait.cxx
index 4392bdea04ac..95dd59900a13 100644
--- a/sw/source/ui/app/swwait.cxx
+++ b/sw/source/ui/app/swwait.cxx
@@ -36,31 +36,31 @@
#include <swwait.hxx>
-void SwDocShell::EnterWait( BOOL bLockDispatcher )
+void SwDocShell::EnterWait( sal_Bool bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
while ( pFrame )
{
pFrame->GetWindow().EnterWait();
if ( bLockDispatcher )
- pFrame->GetDispatcher()->Lock( TRUE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
+ pFrame->GetDispatcher()->Lock( sal_True );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
}
}
-void SwDocShell::LeaveWait( BOOL bLockDispatcher )
+void SwDocShell::LeaveWait( sal_Bool bLockDispatcher )
{
- SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, FALSE );
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
while ( pFrame )
{
pFrame->GetWindow().LeaveWait();
if ( bLockDispatcher )
- pFrame->GetDispatcher()->Lock( FALSE );
- pFrame = SfxViewFrame::GetNext( *pFrame, this, FALSE );
+ pFrame->GetDispatcher()->Lock( sal_False );
+ pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
}
}
-SwWait::SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher ) :
+SwWait::SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher ) :
rDoc ( rDocShell ),
bLock( bLockDispatcher )
{