summaryrefslogtreecommitdiff
path: root/sw/source/ui/app/docsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/app/docsh.cxx')
-rw-r--r--sw/source/ui/app/docsh.cxx162
1 files changed, 81 insertions, 81 deletions
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;