summaryrefslogtreecommitdiff
path: root/sw/source/ui/app/appenv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/app/appenv.cxx')
-rw-r--r--sw/source/ui/app/appenv.cxx78
1 files changed, 39 insertions, 39 deletions
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index 4b3218a3ac00..c08bfb5bf6df 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -92,16 +92,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 );
@@ -122,14 +122,14 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
// Database fields must contain at least 3 points!
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;
}
}
}
@@ -143,18 +143,18 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText
return sRet;
}
-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());
}
void SwModule::InsertEnv( SfxRequest& rReq )
{
- static USHORT nTitleNo = 0;
+ static sal_uInt16 nTitleNo = 0;
SwDocShell *pMyDocSh;
SfxViewFrame *pFrame;
@@ -167,7 +167,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pOldSh = pMyDocSh ? pMyDocSh->GetWrtShell() : 0;
// Create new document (don't show!)
- SfxObjectShellRef xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
+ SfxObjectShellLock xDocSh( new SwDocShell( SFX_CREATE_MODE_STANDARD ) );
xDocSh->DoInitNew( 0 );
pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
pNewView = (SwView*) pFrame->GetViewShell();
@@ -190,7 +190,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
SwEnvCfgItem aEnvCfg;
// Check if there's already an envelope.
- BOOL bEnvChange = FALSE;
+ sal_Bool bEnvChange = sal_False;
SfxItemSet aSet(GetPool(), FN_ENVELOP, FN_ENVELOP, 0);
aSet.Put(aEnvCfg.GetItem());
@@ -238,7 +238,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
if (nMode == ENV_NEWDOC || nMode == ENV_INSERT)
{
- SwWait aWait( (SwDocShell&)*xDocSh, TRUE );
+ SwWait aWait( (SwDocShell&)*xDocSh, sal_True );
// Read dialog and save item to config
const SwEnvItem& rItem = pItem ? *pItem : (const SwEnvItem&) pDlg->GetOutputItemSet()->Get(FN_ENVELOP);
@@ -253,7 +253,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
{
OSL_ENSURE(pOldSh, "No document - wasn't 'Insert' 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);
}
@@ -278,7 +278,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Here it goes (insert)
pSh->StartUndo(UNDO_UI_INSERT_ENVELOPE, NULL);
pSh->StartAllAction();
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
if (bEnvChange)
{
@@ -286,8 +286,8 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
// Delete text from the first page
- if ( !pSh->SttNxtPg(TRUE) )
- pSh->EndPg(TRUE);
+ if ( !pSh->SttNxtPg(sal_True) )
+ pSh->EndPg(sal_True);
pSh->DelRight();
// Delete frame of the first page
if( pSh->GotoFly( rSendMark ) )
@@ -300,7 +300,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pSh->EnterSelFrmMode();
pSh->DelRight();
}
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
}
else
// Followup template: page 1
@@ -310,21 +310,21 @@ void SwModule::InsertEnv( SfxRequest& rReq )
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());
// Let's go (print)
pSh->StartAllAction();
- pSh->DoUndo(FALSE);
+ pSh->DoUndo(sal_False);
// Again, copy the new collections "Sender" and "Reciever" to
// a new document
@@ -360,8 +360,8 @@ void SwModule::InsertEnv( SfxRequest& rReq )
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)
{
@@ -378,18 +378,18 @@ void SwModule::InsertEnv( SfxRequest& rReq )
}
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);
// Header and footer
- 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);
// Page numbering
pDesc->SetUseOn(nsUseOnPage::PD_ALL);
@@ -413,9 +413,9 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Apply page description
- USHORT nPos;
+ sal_uInt16 nPos;
pSh->FindPageDescByName( pDesc->GetName(),
- FALSE,
+ sal_False,
&nPos );
@@ -423,7 +423,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pSh->ChgCurPageDesc(*pDesc);
// Insert Frame
- SwFlyFrmAttrMgr aMgr(FALSE, pSh, FRMMGR_TYPE_ENVELP);
+ SwFlyFrmAttrMgr aMgr(sal_False, pSh, FRMMGR_TYPE_ENVELP);
SwFldMgr aFldMgr;
aMgr.SetHeightSizeType(ATT_VAR_SIZE);
@@ -435,7 +435,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
// Sender
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));
@@ -450,7 +450,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
}
// Addressee
- pSh->SttEndDoc(TRUE);
+ pSh->SttEndDoc(sal_True);
aMgr.InsertFlyFrm(FLY_AT_PAGE,
Point(rItem.lAddrFromLeft + lLeft, rItem.lAddrFromTop + lUpper),
@@ -467,12 +467,12 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pSh->SetPageObjsNewPage(aFlyArr, 1);
// Finished
- 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);
@@ -482,7 +482,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
if ( rItem.aAddrText.indexOf('<') >= 0 )
{
- static USHORT const aInva[] =
+ static sal_uInt16 const aInva[] =
{
SID_SBA_BRW_UPDATE,
SID_SBA_BRW_INSERT,
@@ -500,7 +500,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
{
rReq.AppendItem( rItem );
if ( nMode == ENV_NEWDOC )
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, TRUE ) );
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_True ) );
}
rReq.Done();