summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/textfld.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/shells/textfld.cxx')
-rw-r--r--sw/source/ui/shells/textfld.cxx144
1 files changed, 72 insertions, 72 deletions
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 5ac611fed854..ea30db9235c5 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -85,11 +85,11 @@
using namespace nsSwDocInfoSubType;
-extern BOOL bNoInterrupt; // in mainwn.cxx
+extern sal_Bool bNoInterrupt; // in mainwn.cxx
-String& lcl_AppendRedlineStr( String& rStr, USHORT nRedlId )
+String& lcl_AppendRedlineStr( String& rStr, sal_uInt16 nRedlId )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
switch( nRedlId )
{
case nsRedlineType_t::REDLINE_INSERT: nResId = STR_REDLINE_INSERTED; break;
@@ -110,17 +110,17 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwWrtShell& rSh = GetShell();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
- BOOL bMore = FALSE;
- BOOL bIsText = TRUE;
- USHORT nInsertType = 0;
- USHORT nInsertSubType = 0;
- ULONG nInsertFormat = 0;
+ sal_Bool bMore = sal_False;
+ sal_Bool bIsText = sal_True;
+ sal_uInt16 nInsertType = 0;
+ sal_uInt16 nInsertSubType = 0;
+ sal_uLong nInsertFormat = 0;
switch(nSlot)
{
@@ -138,7 +138,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if(rLink.IsVisible())
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), FALSE, &rLink );
+ SfxAbstractLinksDialog* pDlg = pFact->CreateLinksDialog( pMDI, &rSh.GetLinkManager(), sal_False, &rLink );
if ( pDlg )
{
pDlg->Execute();
@@ -168,7 +168,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
const String& rMacro = ((SwMacroField*)pFld)->GetMacro();
- USHORT nPos = rMacro.Search('.', 0);
+ sal_uInt16 nPos = rMacro.Search('.', 0);
if(nPos != STRING_NOTFOUND)
{
SvxMacro aMacro( rMacro.Copy(nPos + 1), rMacro.Copy(0,nPos), STARBASIC );
@@ -181,14 +181,14 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_GOTO_NEXT_INPUTFLD:
case FN_GOTO_PREV_INPUTFLD:
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SwFieldType* pFld = rSh.GetFldType( 0, RES_INPUTFLD );
if( pFld && rSh.MoveFldType( pFld,
FN_GOTO_NEXT_INPUTFLD == nSlot ))
{
rSh.ClearMark();
- rSh.StartInputFldDlg( rSh.GetCurFld(), FALSE );
- bRet = TRUE;
+ rSh.StartInputFldDlg( rSh.GetCurFld(), sal_False );
+ bRet = sal_True;
}
rReq.SetReturnValue( SfxBoolItem( nSlot, bRet ));
@@ -196,7 +196,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if(bMore)
{
@@ -206,40 +206,40 @@ void SwTextShell::ExecField(SfxRequest &rReq)
{
case FN_INSERT_DBFIELD:
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if( pItem )
{
- ULONG nFormat = 0;
- USHORT nType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nType = 0;
String aPar1 = ((SfxStringItem *)pItem)->GetValue();
String aPar2;
sal_Int32 nCommand = 0;
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nType = ((SfxUInt16Item *)pItem)->GetValue();
aPar1 += DB_DELIM;
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_1, FALSE, &pItem ))
+ FN_PARAM_1, sal_False, &pItem ))
{
aPar1 += ((SfxStringItem *)pItem)->GetValue();
}
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_3, FALSE, &pItem ))
+ FN_PARAM_3, sal_False, &pItem ))
nCommand = ((SfxInt32Item*)pItem)->GetValue();
aPar1 += DB_DELIM;
aPar1 += String::CreateFromInt32(nCommand);
aPar1 += DB_DELIM;
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_2, FALSE, &pItem ))
+ FN_PARAM_2, sal_False, &pItem ))
{
aPar1 += ((SfxStringItem *)pItem)->GetValue();
}
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_CONTENT, FALSE, &pItem ))
+ FN_PARAM_FIELD_CONTENT, sal_False, &pItem ))
aPar2 = ((SfxStringItem *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_FORMAT, FALSE, &pItem ))
+ FN_PARAM_FIELD_FORMAT, sal_False, &pItem ))
nFormat = ((SfxUInt32Item *)pItem)->GetValue();
DBG_WARNING("Command is not yet used");
sal_Unicode cSeparator = ' ';
@@ -252,30 +252,30 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_INSERT_FIELD_CTRL:
case FN_INSERT_FIELD:
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if( pItem && nSlot != FN_INSERT_FIELD_CTRL)
{
- ULONG nFormat = 0;
- USHORT nType = 0;
- USHORT nSubType = 0;
+ sal_uLong nFormat = 0;
+ sal_uInt16 nType = 0;
+ sal_uInt16 nSubType = 0;
String aPar1 = ((SfxStringItem *)pItem)->GetValue();
String aPar2;
sal_Unicode cSeparator = ' ';
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nType = ((SfxUInt16Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_FIELD_SUBTYPE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
nSubType = ((SfxUInt16Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_CONTENT, FALSE, &pItem ))
+ FN_PARAM_FIELD_CONTENT, sal_False, &pItem ))
aPar2 = ((SfxStringItem *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_FIELD_FORMAT, FALSE, &pItem ))
+ FN_PARAM_FIELD_FORMAT, sal_False, &pItem ))
nFormat = ((SfxUInt32Item *)pItem)->GetValue();
if( SFX_ITEM_SET == pArgs->GetItemState(
- FN_PARAM_3, FALSE, &pItem ))
+ FN_PARAM_3, sal_False, &pItem ))
{
String sTmp = ((SfxStringItem *)pItem)->GetValue();
if(sTmp.Len())
@@ -306,7 +306,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pVFrame->ToggleChildWindow(FN_INSERT_FIELD); // Dialog anzeigen
// Flddlg auf neue TabPage umschalten
- USHORT nId = SwFldDlgWrapper::GetChildWindowId();
+ sal_uInt16 nId = SwFldDlgWrapper::GetChildWindowId();
SwFldDlgWrapper *pWrp = (SwFldDlgWrapper*)pVFrame->GetChildWindow(nId);
if (pWrp)
pWrp->ShowPage();
@@ -326,7 +326,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Delete( pNoteItem->GetValue() );
}
@@ -344,7 +344,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pNoteItem, SfxStringItem, nSlot, sal_False);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Hide( pNoteItem->GetValue() );
}
@@ -352,7 +352,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_POSTIT:
{
SwPostItField* pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
- BOOL bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
+ sal_Bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
if (bNew || GetView().GetPostItMgr()->IsAnswer())
{
SvtUserOptions aUserOpt;
@@ -369,9 +369,9 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwInsertFld_Data aData(TYP_POSTITFLD, 0, sAuthor, aEmptyStr, 0);
aFldMgr.InsertFld(aData);
rSh.Push();
- rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, FALSE);
+ rSh.SwCrsrShell::Left(1, CRSR_SKIP_CHARS, sal_False);
pPostIt = (SwPostItField*)aFldMgr.GetCurFld();
- rSh.Pop(FALSE); // Cursorpos restaurieren
+ rSh.Pop(sal_False); // Cursorpos restaurieren
}
if (pPostIt)
@@ -416,7 +416,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
sComment = pRedline->GetComment();
- BOOL bTravel = FALSE;
+ sal_Bool bTravel = sal_False;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
@@ -443,8 +443,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
pActRed = rSh.SelPrevRedline();
}
- BOOL bPrev = pActRed != 0;
- rSh.Pop(FALSE);
+ sal_Bool bPrev = pActRed != 0;
+ rSh.Pop(sal_False);
rSh.EndAction();
rSh.ClearMark();
@@ -453,8 +453,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rSh.StartAction();
rSh.Push();
pActRed = rSh.SelNextRedline();
- BOOL bNext = pActRed != 0;
- rSh.Pop(FALSE); // Cursorpos restaurieren
+ sal_Bool bNext = pActRed != 0;
+ rSh.Pop(sal_False); // Cursorpos restaurieren
if( rSh.IsCrsrPtAtEnd() )
rSh.SwapPam();
@@ -465,7 +465,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact2, "Dialogdiet fail!");
- AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, TRUE );
+ AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
@@ -482,7 +482,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
}
rSh.SetCareWin(pDlg->GetWindow());
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
if ( pDlg->Execute() == RET_OK )
{
@@ -495,7 +495,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
delete pDlg;
rSh.SetCareWin(NULL);
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
rSh.ClearMark();
GetView().AttrChangedNotify(GetShellPtr());
}
@@ -505,8 +505,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_JAVAEDIT:
{
String aType, aText;
- BOOL bIsUrl=FALSE;
- BOOL bNew=FALSE, bUpdate=FALSE;
+ sal_Bool bIsUrl=sal_False;
+ sal_Bool bNew=sal_False, bUpdate=sal_False;
SwFldMgr* pMgr = new SwFldMgr;
if ( pItem )
{
@@ -563,21 +563,21 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_INSERT_FLD_DATE :
nInsertType = TYP_DATEFLD;
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_TIME :
nInsertType = TYP_TIMEFLD;
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_PGNUMBER:
nInsertType = TYP_PAGENUMBERFLD;
nInsertFormat = SVX_NUM_PAGEDESC; // wie Seitenvorlage
- bIsText = FALSE;
+ bIsText = sal_False;
goto FIELD_INSERT;
case FN_INSERT_FLD_PGCOUNT :
nInsertType = TYP_DOCSTATFLD;
nInsertSubType = 0;
- bIsText = FALSE;
+ bIsText = sal_False;
nInsertFormat = SVX_NUM_PAGEDESC;
goto FIELD_INSERT;
case FN_INSERT_FLD_TOPIC :
@@ -604,7 +604,7 @@ FIELD_INSERT:
}
break;
default:
- ASSERT(FALSE, falscher Dispatcher);
+ ASSERT(sal_False, falscher Dispatcher);
return;
}
}
@@ -615,8 +615,8 @@ void SwTextShell::StateField( SfxItemSet &rSet )
SwWrtShell& rSh = GetShell();
SfxWhichIter aIter( rSet );
const SwField* pField = 0;
- int bGetField = FALSE;
- USHORT nWhich = aIter.FirstWhich();
+ int bGetField = sal_False;
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -651,10 +651,10 @@ void SwTextShell::StateField( SfxItemSet &rSet )
if( !bGetField )
{
pField = rSh.GetCurFld();
- bGetField = TRUE;
+ bGetField = sal_True;
}
- USHORT nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX;
+ sal_uInt16 nTempWhich = pField ? pField->GetTyp()->Which() : USHRT_MAX;
if( USHRT_MAX == nTempWhich ||
RES_POSTITFLD == nTempWhich ||
RES_SCRIPTFLD == nTempWhich ||
@@ -673,7 +673,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
if(!bGetField)
{
pField = rSh.GetCurFld();
- bGetField = TRUE;
+ bGetField = sal_True;
}
if(!pField || pField->GetTyp()->Which() != RES_MACROFLD)
rSet.DisableItem(nWhich);
@@ -707,7 +707,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
break;
case FN_POSTIT :
case FN_JAVAEDIT :
- BOOL bCurField = FALSE;
+ sal_Bool bCurField = sal_False;
pField = rSh.GetCurFld();
if(nWhich == FN_POSTIT)
bCurField = pField && pField->GetTyp()->Which() == RES_POSTITFLD;
@@ -732,7 +732,7 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
const String& rName = rHlnkItem.GetName();
const String& rURL = rHlnkItem.GetURL();
const String& rTarget = rHlnkItem.GetTargetFrame();
- USHORT nType = (USHORT)rHlnkItem.GetInsertMode();
+ sal_uInt16 nType = (sal_uInt16)rHlnkItem.GetInsertMode();
nType &= ~HLINK_HTMLMODE;
const SvxMacroTableDtor* pMacroTbl = rHlnkItem.GetMacroTbl();
@@ -745,10 +745,10 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
rSh.GetCurAttr( aSet );
const SfxPoolItem* pItem;
- if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, FALSE, &pItem))
+ if(SFX_ITEM_SET == aSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
{
// Links selektieren
- rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, FALSE);
+ rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT, sal_False);
}
switch (nType)
{
@@ -770,13 +770,13 @@ void SwTextShell::InsertHyperlink(const SvxHyperlinkItem& rHlnkItem)
aINetFmt.SetMacro(SFX_EVENT_MOUSEOUT_OBJECT, *pMacro);
}
rSh.SttSelect();
- rSh.InsertURL( aINetFmt, rName, TRUE );
+ rSh.InsertURL( aINetFmt, rName, sal_True );
rSh.EndSelect();
}
break;
case HLINK_BUTTON:
- BOOL bSel = rSh.HasSelection();
+ sal_Bool bSel = rSh.HasSelection();
if(bSel)
rSh.DelRight();
InsertURLButton( rURL, rTarget, rName );
@@ -809,18 +809,18 @@ IMPL_LINK( SwTextShell, RedlineNextHdl, AbstractSvxPostItDialog *, pBtn )
const SwRedline *pActRed = pSh->SelNextRedline();
pSh->Pop(pActRed != 0);
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if (pActRed)
{
pSh->StartAction();
pSh->Push();
bEnable = pSh->SelNextRedline() != 0;
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAction();
}
- pDlg->EnableTravel(bEnable, TRUE);
+ pDlg->EnableTravel(bEnable, sal_True);
if( pSh->IsCrsrPtAtEnd() )
pSh->SwapPam();
@@ -861,18 +861,18 @@ IMPL_LINK( SwTextShell, RedlinePrevHdl, AbstractSvxPostItDialog *, pBtn )
const SwRedline *pActRed = pSh->SelPrevRedline();
pSh->Pop(pActRed != 0);
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if (pActRed)
{
pSh->StartAction();
pSh->Push();
bEnable = pSh->SelPrevRedline() != 0;
- pSh->Pop(FALSE);
+ pSh->Pop(sal_False);
pSh->EndAction();
}
- pDlg->EnableTravel(TRUE, bEnable);
+ pDlg->EnableTravel(sal_True, bEnable);
pRedline = pSh->GetCurrRedline();
sComment = pRedline->GetComment();