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