summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/shells')
-rw-r--r--sw/source/ui/shells/annotsh.cxx124
-rw-r--r--sw/source/ui/shells/basesh.cxx377
-rw-r--r--sw/source/ui/shells/beziersh.cxx30
-rw-r--r--sw/source/ui/shells/drawdlg.cxx38
-rw-r--r--sw/source/ui/shells/drawsh.cxx44
-rw-r--r--sw/source/ui/shells/drwbassh.cxx107
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx30
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx84
-rw-r--r--sw/source/ui/shells/frmsh.cxx116
-rw-r--r--sw/source/ui/shells/grfsh.cxx68
-rw-r--r--sw/source/ui/shells/grfshex.cxx1
-rwxr-xr-x[-rw-r--r--]sw/source/ui/shells/langhelper.cxx44
-rw-r--r--sw/source/ui/shells/listsh.cxx28
-rw-r--r--sw/source/ui/shells/makefile.mk84
-rw-r--r--sw/source/ui/shells/mediash.cxx12
-rw-r--r--sw/source/ui/shells/navsh.cxx14
-rw-r--r--sw/source/ui/shells/shells.src834
-rw-r--r--sw/source/ui/shells/tabsh.cxx233
-rw-r--r--sw/source/ui/shells/textdrw.cxx2
-rw-r--r--sw/source/ui/shells/textfld.cxx148
-rw-r--r--sw/source/ui/shells/textglos.cxx24
-rw-r--r--sw/source/ui/shells/textidx.cxx26
-rw-r--r--sw/source/ui/shells/textsh.cxx200
-rw-r--r--sw/source/ui/shells/textsh1.cxx202
-rw-r--r--sw/source/ui/shells/textsh2.cxx22
-rw-r--r--sw/source/ui/shells/txtattr.cxx74
-rw-r--r--sw/source/ui/shells/txtcrsr.cxx84
-rw-r--r--sw/source/ui/shells/txtnum.cxx30
28 files changed, 1069 insertions, 2011 deletions
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index 56742b7220..16f04b3fa2 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -160,7 +160,7 @@ SwAnnotationShell::~SwAnnotationShell()
{
}
-SfxUndoManager* SwAnnotationShell::GetUndoManager()
+::svl::IUndoManager* SwAnnotationShell::GetUndoManager()
{
SwPostItMgr* pPostItMgr = rView.GetPostItMgr();
if ( !pPostItMgr ||
@@ -265,9 +265,9 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
Outliner * pOutliner = pOLV->GetOutliner();
if(pOutliner)
{
- ULONG nParaCount = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount = pOutliner->GetParagraphCount();
if (nParaCount > 0)
- pOLV->SelectRange(0L, USHORT(nParaCount) );
+ pOLV->SelectRange(0L, sal_uInt16(nParaCount) );
}
break;
}
@@ -362,7 +362,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
const SfxPoolItem* pItem = 0;
if(pNewAttrs)
- pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ pNewAttrs->GetItemState(nSlot, sal_False, &pItem );
if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()!=SwPostItHelper::DELETED)
pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
break;
@@ -414,7 +414,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -452,7 +452,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, DLG_CHAR,0, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -500,7 +500,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -526,7 +526,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
const SfxPoolItem* pPoolItem;
- if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) )
+ if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
{
if( !( (SfxBoolItem*)pPoolItem)->GetValue() )
bLeftToRight = !bLeftToRight;
@@ -536,8 +536,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- USHORT nAdjust = SVX_ADJUST_LEFT;
- if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) )
+ sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) )
nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
if( bLeftToRight )
@@ -590,7 +590,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
while(nWhich)
{
sal_uInt16 nEEWhich = 0;
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case SID_ATTR_CHAR_FONT:
@@ -600,12 +600,12 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
{
if ( pOLV )
{
- USHORT nScriptType = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
SfxItemPool* pSecondPool = aEditAttr.GetPool()->GetSecondaryPool();
if( !pSecondPool )
pSecondPool = aEditAttr.GetPool();
SvxScriptSetItem aSetItem( nSlotId, *pSecondPool );
- aSetItem.GetItemSet().Put( aEditAttr, FALSE );
+ aSetItem.GetItemSet().Put( aEditAttr, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
@@ -626,7 +626,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case FN_SET_SUPER_SCRIPT:
case FN_SET_SUB_SCRIPT:
{
- USHORT nEsc = 0;
+ sal_uInt16 nEsc = 0;
const SfxPoolItem *pEscItem = 0;
if (nWhich==FN_SET_SUPER_SCRIPT)
nEsc = SVX_ESCAPEMENT_SUPERSCRIPT;
@@ -726,7 +726,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- BOOL bFlag = FALSE;
+ sal_Bool bFlag = sal_False;
switch( ( ( (SvxFrameDirectionItem&) aEditAttr.Get( EE_PARA_WRITINGDIR ) ) ).GetValue() )
{
case FRMDIR_HORI_LEFT_TOP:
@@ -773,7 +773,7 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
}
}
-void SwAnnotationShell::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
+void SwAnnotationShell::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
{
rView.ExecSearch(rReq,bNoMessage);
}
@@ -821,7 +821,7 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &rView.GetEditWin() ) );
- ULONG nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
+ sal_uLong nFormat = pDlg->GetFormat( aDataHelper.GetTransferable() );
if (nFormat > 0)
{
@@ -836,9 +836,9 @@ void SwAnnotationShell::ExecClpbrd(SfxRequest &rReq)
}
case SID_CLIPBOARD_FORMAT_ITEMS:
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
const SfxPoolItem* pItem;
- if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, TRUE, &pItem) == SFX_ITEM_SET &&
+ if ( rReq.GetArgs() && rReq.GetArgs()->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET &&
pItem->ISA(SfxUInt32Item) )
{
nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
@@ -915,7 +915,7 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet)
void SwAnnotationShell::StateStatusLine(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -1006,7 +1006,6 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
case FN_REPLY:
case FN_POSTIT:
case FN_DELETE_COMMENT:
- case FN_DELETE_NOTE:
if ( pPostItMgr->HasActiveSidebarWin() )
pPostItMgr->GetActiveSidebarWin()->ExecuteCommand(nSlot);
break;
@@ -1015,7 +1014,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False);
if ( pItem )
pPostItMgr->Delete( pItem->GetValue() );
break;
@@ -1027,7 +1026,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, nSlot, sal_False);
if ( pItem )
pPostItMgr->Hide( pItem->GetValue() );
}
@@ -1041,28 +1040,19 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case FN_POSTIT:
- case FN_DELETE_NOTE:
case FN_DELETE_NOTE_AUTHOR:
case FN_DELETE_ALL_NOTES:
case FN_HIDE_NOTE:
case FN_HIDE_NOTE_AUTHOR:
case FN_HIDE_ALL_NOTES:
- {
- if ( !pPostItMgr ||
- !pPostItMgr->HasActiveAnnotationWin() )
- {
- rSet.DisableItem(nWhich);
- }
- break;
- }
case FN_DELETE_COMMENT:
{
if ( !pPostItMgr ||
- !pPostItMgr->HasActiveSidebarWin() /*HasActiveRedCommentWin()*/ )
+ !pPostItMgr->HasActiveAnnotationWin() )
{
rSet.DisableItem(nWhich);
}
@@ -1095,7 +1085,7 @@ void SwAnnotationShell::GetNoteState(SfxItemSet &rSet)
if (pPostItMgr->HasActiveSidebarWin())
{
if ( (pPostItMgr->GetActiveSidebarWin()->IsProtected()) &&
- ( (nSlotId==FN_DELETE_NOTE) || (nSlotId==FN_REPLY) ) )
+ ( (nSlotId==FN_DELETE_COMMENT) || (nSlotId==FN_REPLY) ) )
rSet.DisableItem( nWhich );
}
nWhich = aIter.NextWhich();
@@ -1269,7 +1259,7 @@ void SwAnnotationShell::GetLinguState(SfxItemSet &rSet)
{
const SfxPoolItem &rItem = rView.GetWrtShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) );
LanguageType nLang = ((const SvxLanguageItem &)
rItem).GetLanguage();
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
@@ -1355,17 +1345,17 @@ void SwAnnotationShell::ExecTransliteration(SfxRequest &rReq)
void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- SfxUndoManager* pUndoManager = GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
SwWrtShell &rSh = rView.GetWrtShell();
long aOldHeight = rView.GetPostItMgr()->HasActiveSidebarWin()
? rView.GetPostItMgr()->GetActiveSidebarWin()->GetPostItTextHeight()
: 0;
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
sal_uInt16 nCnt = 1;
const SfxPoolItem* pItem=0;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ) )
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
switch( nId )
{
@@ -1384,7 +1374,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
nCnt = 0;
while( nSteps-- )
- pUndoManager->Undo(0);
+ pUndoManager->Undo();
}
if ( nCnt )
@@ -1408,7 +1398,7 @@ void SwAnnotationShell::ExecUndo(SfxRequest &rReq)
nCnt = 0;
while( nSteps-- )
- pUndoManager->Redo(0);
+ pUndoManager->Redo();
}
if ( nCnt )
@@ -1431,8 +1421,8 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
return;
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
- SfxUndoManager* pUndoManager = GetUndoManager();
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
SfxViewFrame *pSfxViewFrame = rView.GetViewFrame();
SwWrtShell &rSh = rView.GetWrtShell();
@@ -1445,8 +1435,10 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
sal_uInt16 nCount = pUndoManager->GetUndoActionCount();
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
- else if( rSh.GetUndoIds() )
+ else if (rSh.GetLastUndoInfo(0, 0))
+ {
rSet.Put( SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::UNDO)) );
+ }
else
rSet.DisableItem(nWhich);
break;
@@ -1456,8 +1448,10 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
sal_uInt16 nCount = pUndoManager->GetRedoActionCount();
if ( nCount )
pSfxViewFrame->GetSlotState( nWhich, pSfxViewFrame->GetInterface(), &rSet );
- else if(rSh.GetRedoIds())
+ else if (rSh.GetFirstRedoInfo(0))
+ {
rSet.Put(SfxStringItem( nWhich, rSh.GetDoString(SwWrtShell::REDO)) );
+ }
else
rSet.DisableItem(nWhich);
break;
@@ -1467,34 +1461,36 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
{
if( pUndoManager )
{
- UniString (SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString (::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWhich )
{
nCount = pUndoManager->GetUndoActionCount();
- fnGetComment = &SfxUndoManager::GetUndoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetUndoActionComment;
}
else
{
nCount = pUndoManager->GetRedoActionCount();
- fnGetComment = &SfxUndoManager::GetRedoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetRedoActionComment;
}
String sList;
if( nCount )
{
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pUndoManager->*fnGetComment)( n ) )
+ ( sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
+= '\n';
}
SfxStringListItem aItem( nWhich );
- if( nWhich == SID_GETUNDOSTRINGS && rSh.GetUndoIds() )
+ if ((nWhich == SID_GETUNDOSTRINGS) &&
+ rSh.GetLastUndoInfo(0, 0))
{
rSh.GetDoStrings( SwWrtShell::UNDO, aItem );
}
- else if( nWhich == SID_GETREDOSTRINGS && rSh.GetRedoIds() )
+ else if ((nWhich == SID_GETREDOSTRINGS) &&
+ (rSh.GetFirstRedoInfo(0)))
{
rSh.GetDoStrings( SwWrtShell::UNDO, aItem );
}
@@ -1526,7 +1522,7 @@ void SwAnnotationShell::StateUndo(SfxItemSet &rSet)
void SwAnnotationShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
rSet.DisableItem( nWhich );
@@ -1545,7 +1541,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String sSym;
String sFontName;
@@ -1553,25 +1549,25 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
{
sSym = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
sFontName = pFontItem->GetValue();
}
SfxItemSet aSet(pOLV->GetAttribs());
- USHORT nScript = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScript = pOLV->GetSelectedScriptType();
SvxFontItem aSetDlgFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aSetDlgFont = *(SvxFontItem*)pI;
else
aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
SID_ATTR_CHAR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!sFontName.Len())
sFontName = aSetDlgFont.GetFamilyName();
}
@@ -1582,7 +1578,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAllItemSet aAllSet( GetPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -1595,11 +1591,11 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
@@ -1624,7 +1620,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
// nicht flackern
pOLV->HideCursor();
Outliner * pOutliner = pOLV->GetOutliner();
- pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetUpdateMode(sal_False);
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
@@ -1643,7 +1639,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
aFont.GetStyleName(), aFont.GetPitch(),
aFont.GetCharSet(),
EE_CHAR_FONTINFO );
- USHORT nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym );
+ sal_uInt16 nScriptBreak = pBreakIt->GetAllScriptsOfText( sSym );
if( SCRIPTTYPE_LATIN & nScriptBreak )
aSetFont.Put( aFontItem, EE_CHAR_FONTINFO );
if( SCRIPTTYPE_ASIAN & nScriptBreak )
@@ -1662,7 +1658,7 @@ void SwAnnotationShell::InsertSymbol(SfxRequest& rReq)
pOLV->SetAttribs( aFontSet );
// ab jetzt wieder anzeigen
- pOutliner->SetUpdateMode(TRUE);
+ pOutliner->SetUpdateMode(sal_True);
pOLV->ShowCursor();
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) );
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 26f20de5c9..3056cb315f 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <sot/factory.hxx>
#include <hintids.hxx>
#include <svl/urihelper.hxx>
@@ -113,7 +114,6 @@
#include <instable.hxx>
#include <svx/fmshell.hxx> // for FN_XFORMS_DESIGN_MODE
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <comcore.hrc>
#include <unomid.h>
@@ -122,19 +122,16 @@ FlyMode SwBaseShell::eFrameMode = FLY_DRAG_END;
//Fuer die Erkennung der Id, die variable von Gallery mit SID_GALLERY_BG_BRUSH
//ankommt.
-static BYTE nParagraphPos;
-static BYTE nGraphicPos;
-static BYTE nOlePos;
-static BYTE nFramePos;
-static BYTE nTablePos;
-static BYTE nTableRowPos;
-static BYTE nTableCellPos;
-static BYTE nPagePos;
-static BYTE nHeaderPos;
-static BYTE nFooterPos;
-
-#define Interior
-#include <svx/svxslots.hxx>
+static sal_uInt8 nParagraphPos;
+static sal_uInt8 nGraphicPos;
+static sal_uInt8 nOlePos;
+static sal_uInt8 nFramePos;
+static sal_uInt8 nTablePos;
+static sal_uInt8 nTableRowPos;
+static sal_uInt8 nTableCellPos;
+static sal_uInt8 nPagePos;
+static sal_uInt8 nHeaderPos;
+static sal_uInt8 nFooterPos;
#define SwBaseShell
#define Shadow
@@ -186,11 +183,11 @@ void lcl_UpdateIMapDlg( SwWrtShell& rSh )
delete pList;
}
-BOOL lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
+sal_Bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
{
Graphic aGraf( rSh.GetIMapGraphic() );
GraphicType nGrfType = aGraf.GetType();
- BOOL bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
+ sal_Bool bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
if( bRet )
{
String aGrfName;
@@ -222,7 +219,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq)
if( rSh.IsNoNum() )
{
rSh.SttCrsrMove();
- BOOL bLeft = rSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ sal_Bool bLeft = rSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
if( bLeft )
{
rSh.DelLeft();
@@ -258,7 +255,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
- USHORT nId = rReq.GetSlot();
+ sal_uInt16 nId = rReq.GetSlot();
sal_Bool bIgnore = sal_False;
switch( nId )
{
@@ -274,8 +271,8 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
pTransfer->Cut();
else
{
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
pTransfer->Copy();
rSh.LockView( bLockedView );
}
@@ -309,7 +306,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pFmt;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pFmt ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pFmt ) )
{
TransferableDataHelper aDataHelper(
TransferableDataHelper::CreateFromSystemClipboard(
@@ -381,7 +378,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest &rReq)
// temp. Variablen, da die Shell nach dem Paste schon
// zerstoert sein kann
SwView* pView = &rView;
- ULONG nFormatId = 0;
+ sal_uLong nFormatId = 0;
rReq.Ignore();
bIgnore = sal_True;
int nRet = SwTransferable::PasteSpecial( rSh, aDataHelper, nFormatId );
@@ -421,9 +418,9 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet)
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter(rSet);
- const BOOL bCopy = rSh.HasSelection();
+ const sal_Bool bCopy = rSh.HasSelection();
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
@@ -476,10 +473,10 @@ void SwBaseShell::ExecUndo(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nId = rReq.GetSlot(), nCnt = 1;
+ sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ))
nCnt = ((SfxUInt16Item*)pItem)->GetValue();
// #i106349#: save pointer: undo/redo may delete the shell, i.e., this!
@@ -516,42 +513,48 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while(nWhich)
{
switch(nWhich)
{
case SID_UNDO:
{
- if( rSh.GetUndoIds() )
+ if (rSh.GetLastUndoInfo(0, 0))
+ {
rSet.Put( SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::UNDO)));
+ }
else
rSet.DisableItem(nWhich);
break;
}
case SID_REDO:
{
- if(rSh.GetRedoIds())
+ if (rSh.GetFirstRedoInfo(0))
+ {
rSet.Put(SfxStringItem(nWhich,
rSh.GetDoString(SwWrtShell::REDO)));
+ }
else
rSet.DisableItem(nWhich);
break;
}
case SID_REPEAT:
{ // Repeat nur moeglich wenn kein REDO moeglich - UI-Restriktion
- if(rSh.GetRedoIds() == UNDO_EMPTY &&
+ if ((!rSh.GetFirstRedoInfo(0)) &&
!rSh.IsSelFrmMode() &&
- rSh.GetRepeatIds() )
+ (UNDO_EMPTY != rSh.GetRepeatInfo(0)))
+ {
rSet.Put(SfxStringItem(nWhich, rSh.GetRepeatString()));
+ }
else
rSet.DisableItem(nWhich);
break;
}
case SID_GETUNDOSTRINGS:
- if( rSh.GetUndoIds() )
+ if (rSh.GetLastUndoInfo(0, 0))
{
SfxStringListItem aStrLst( nWhich );
rSh.GetDoStrings( SwWrtShell::UNDO, aStrLst );
@@ -562,7 +565,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet)
break;
case SID_GETREDOSTRINGS:
- if( rSh.GetRedoIds() )
+ if (rSh.GetFirstRedoInfo(0))
{
SfxStringListItem aStrLst( nWhich );
rSh.GetDoStrings( SwWrtShell::REDO, aStrLst );
@@ -584,9 +587,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem *pItem;
SwWrtShell &rSh = GetShell();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case FN_REPAGINATE:
@@ -603,12 +606,12 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwDocStat aDocStat;
rSh.UpdateDocStat(aDocStat);
rSh.EndAllTblBoxEdit();
- rSh.ViewShell::UpdateFlds(TRUE);
+ rSh.ViewShell::UpdateFlds(sal_True);
if( rSh.IsCrsrInTbl() )
{
if( !rSh.IsTblComplexForChart() )
- SwTableFUNC( &rSh, FALSE).UpdateChart();
+ SwTableFUNC( &rSh, sal_False).UpdateChart();
rSh.ClearTblBoxCntnt();
rSh.SaveTblBoxCntnt();
}
@@ -616,7 +619,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_UPDATE_CHARTS:
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
rSh.UpdateAllCharts();
}
break;
@@ -628,7 +631,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if( rSh.GetLinkManager().GetLinks().Count() )
{
rSh.StartAllAction();
- rSh.GetLinkManager().UpdateAllLinks( FALSE, TRUE, TRUE );
+ rSh.GetLinkManager().UpdateAllLinks( sal_False, sal_True, sal_True );
rSh.EndAllAction();
}
SfxDispatcher &rDis = *rTempView.GetViewFrame()->GetDispatcher();
@@ -640,7 +643,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case FN_UPDATE_INPUTFIELDS:
- rSh.UpdateInputFlds(NULL, FALSE);
+ rSh.UpdateInputFlds(NULL, sal_False);
break;
case FN_PREV_BOOKMARK:
rReq.SetReturnValue(SfxBoolItem( nSlot, rSh.GoPrevBookmark()));
@@ -671,7 +674,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.ClearMark();
rSh.EndSelect();
}
- BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
+ sal_Bool bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
if (pCurField)
rSh.ClickToField(*pCurField);
@@ -690,15 +693,15 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
rSh.EnterStdMode();
nSlot == FN_START_DOC_DIRECT ?
- rSh.SttEndDoc(TRUE) :
- rSh.SttEndDoc(FALSE);
+ rSh.SttEndDoc(sal_True) :
+ rSh.SttEndDoc(sal_False);
}
break;
case FN_GOTO_PREV_OBJ:
case FN_GOTO_NEXT_OBJ:
{
- BOOL bSuccess = rSh.GotoObj(
- nSlot == FN_GOTO_NEXT_OBJ ? TRUE : FALSE);
+ sal_Bool bSuccess = rSh.GotoObj(
+ nSlot == FN_GOTO_NEXT_OBJ ? sal_True : sal_False);
rReq.SetReturnValue(SfxBoolItem(nSlot, bSuccess));
if (bSuccess && !rSh.IsSelFrmMode())
{
@@ -711,14 +714,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case SID_GALLERY_FORMATS:
{
const int nSelType = rSh.GetSelectionType();
- if(SFX_ITEM_SET == pArgs->GetItemState( nSlot, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState( nSlot, sal_True, &pItem))
{
GalleryExplorer* pGal = 0;
if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) &&
0!= (pGal = SVX_GALLERY())&&
0 != (SGA_FORMAT_GRAPHIC & ((SfxUInt32Item*)pItem)->GetValue()))
{
- SwWait aWait( *rView.GetDocShell(), TRUE );
+ SwWait aWait( *rView.GetDocShell(), sal_True );
String aGrfName, aFltName;
const Graphic aGrf( pGal->GetGraphic() );
@@ -750,19 +753,19 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if (pArgs)
{
// aktuellen PageDescriptor ermitteln und damit den Set fuellen
- const USHORT nCurIdx = rSh.GetCurPageDesc();
+ const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
SwPageDesc aPageDesc(rSh.GetPageDesc(nCurIdx));
SwFrmFmt &rFmt = aPageDesc.GetMaster();
SwFmtCol aFmtCol = rFmt.GetCol();
- USHORT nCount;
+ sal_uInt16 nCount;
if(SFX_ITEM_SET == pArgs->GetItemState(nSlot))
nCount = ((SfxUInt16Item &)pArgs->Get(nSlot)).GetValue();
else
nCount = ((SfxUInt16Item &)pArgs->Get(SID_ATTR_COLUMNS)).GetValue();
- USHORT nGutterWidth = DEF_GUTTER_WIDTH;
+ sal_uInt16 nGutterWidth = DEF_GUTTER_WIDTH;
aFmtCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX);
aFmtCol.SetWishWidth(USHRT_MAX);
@@ -773,7 +776,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.ChgPageDesc(nCurIdx, aPageDesc);
}
else
- GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, FALSE);
+ GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_PAGE_COLUMN_DLG, sal_False);
}
break;
case FN_CONVERT_TABLE_TO_TEXT:
@@ -789,7 +792,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwTableAutoFmt* pTAFmt = 0;
SwTableAutoFmtTbl* pAutoFmtTbl = 0;
bool bDeleteFormat = true;
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, TRUE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_1, sal_True, &pItem))
{
aInsTblOpts.mnInsMode = 0;
//Delimiter
@@ -797,14 +800,14 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if(sDelim.Len())
cDelim = sDelim.GetChar(0);
//AutoFormat
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_2, sal_True, &pItem))
{
String sAutoFmt = static_cast< const SfxStringItem* >(pItem)->GetValue();
pAutoFmtTbl = new SwTableAutoFmtTbl;
pAutoFmtTbl->Load();
- for( USHORT i = 0, nCount = pAutoFmtTbl->Count(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = pAutoFmtTbl->Count(); i < nCount; i++ )
{
SwTableAutoFmt* pFmt = (*pAutoFmtTbl)[ i ];
if( pFmt->GetName() == sAutoFmt )
@@ -816,19 +819,19 @@ void SwBaseShell::Execute(SfxRequest &rReq)
}
}
//WithHeader
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, TRUE, &pItem) &&
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_3, sal_True, &pItem) &&
static_cast< const SfxBoolItem* >(pItem)->GetValue())
aInsTblOpts.mnInsMode |= tabopts::HEADLINE;
// RepeatHeaderLines
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_4, sal_True, &pItem))
aInsTblOpts.mnRowsToRepeat =
- (USHORT)static_cast< const SfxInt16Item* >(pItem)->GetValue();
+ (sal_uInt16)static_cast< const SfxInt16Item* >(pItem)->GetValue();
//WithBorder
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, TRUE, &pItem) &&
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_5, sal_True, &pItem) &&
static_cast< const SfxBoolItem* >(pItem)->GetValue())
aInsTblOpts.mnInsMode |= tabopts::DEFAULT_BORDER;
//DontSplitTable
- if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, TRUE, &pItem) &&
+ if(SFX_ITEM_SET == pArgs->GetItemState( FN_PARAM_6, sal_True, &pItem) &&
!static_cast< const SfxBoolItem* >(pItem)->GetValue() )
aInsTblOpts.mnInsMode |= tabopts::SPLIT_LAYOUT;
}
@@ -852,7 +855,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
//Shellwechsel!
SwView& rSaveView = rView;
- BOOL bInserted = FALSE;
+ sal_Bool bInserted = sal_False;
//recording:
SfxViewFrame* pViewFrame = GetView().GetViewFrame();
@@ -903,8 +906,8 @@ void SwBaseShell::Execute(SfxRequest &rReq)
// oj #107754#
if ( SID_STYLE_WATERCAN == nSlot )
{
- const BOOL bLockedView = rSh.IsViewLocked();
- rSh.LockView( TRUE ); //lock visible section
+ const sal_Bool bLockedView = rSh.IsViewLocked();
+ rSh.LockView( sal_True ); //lock visible section
GetView().GetDocShell()->ExecStyleSheet(rReq);
@@ -921,7 +924,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case SID_IMAP:
{
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow( nId );
@@ -950,7 +953,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
case SID_CONTOUR_DLG:
{
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->ToggleChildWindow( nId );
@@ -980,7 +983,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
SwFmtSurround aSur( (SwFmtSurround&)aSet.Get( RES_SURROUND ) );
if ( !aSur.IsContour() )
{
- aSur.SetContour( TRUE );
+ aSur.SetContour( sal_True );
if ( aSur.GetSurround() == SURROUND_NONE )
aSur.SetSurround( SURROUND_PARALLEL );
aSet.Put( aSur );
@@ -1033,7 +1036,15 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.SetFlyFrmAttr(aSet);
}
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ // if new anchor is 'as char' and it is a Math object and the usual
+ // pre-conditions are met then align the formula to the baseline of the text
+ const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
+ const bool bDoMathBaselineAlignment = xObj.is() && SotExchange::IsMath( xObj->getClassID() )
+ && FLY_AS_CHAR == eSet && rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT );
+ if (bDoMathBaselineAlignment)
+ rSh.AlignFormulaToBaseline( xObj );
+
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
if( nHtmlMode )
{
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_HORI_ORIENT);
@@ -1115,10 +1126,10 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
if( rSh.GetLinkManager().GetLinks().Count() )
{
- BOOL bUpdateGrf = FALSE, bCallErrHdl = FALSE;
+ sal_Bool bUpdateGrf = sal_False, bCallErrHdl = sal_False;
rSh.EnterStdMode();
rSh.StartAllAction();
- rSh.GetLinkManager().UpdateAllLinks( FALSE, bCallErrHdl, bUpdateGrf );
+ rSh.GetLinkManager().UpdateAllLinks( sal_False, bCallErrHdl, bUpdateGrf );
rSh.EndAllAction();
}
}
@@ -1126,11 +1137,11 @@ void SwBaseShell::Execute(SfxRequest &rReq)
case FN_XFORMS_DESIGN_MODE:
if( pArgs != NULL
- && pArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET
+ && pArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET
&& pItem != NULL
&& pItem->ISA( SfxBoolItem ) )
{
- BOOL bDesignMode =
+ sal_Bool bDesignMode =
static_cast<const SfxBoolItem*>( pItem )->GetValue();
// set form design mode
@@ -1148,12 +1159,12 @@ void SwBaseShell::Execute(SfxRequest &rReq)
break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if(bMore && pArgs)
{
pItem = 0;
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
if(pItem)
switch(nSlot)
{
@@ -1176,7 +1187,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
else if ( rSh.IsFrmSelected() )
{
// Umrandungsattribute ueber Frame-Manager setzen
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aMgr.SetAttrSet( *pArgs );
aMgr.UpdateFlyFrm();
}
@@ -1208,7 +1219,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
else if ( rSh.IsFrmSelected() )
{
// Umrandungsattribute ueber Frame-Manager setzen
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aMgr.SetAttrSet(*pArgs);
aMgr.UpdateFlyFrm();
}
@@ -1232,25 +1243,25 @@ void SwBaseShell::Execute(SfxRequest &rReq)
* --------------------------------------------------*/
IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
{
- USHORT nGrfType;
+ sal_uInt16 nGrfType;
SwWrtShell &rSh = GetShell();
if( CNT_GRF == rSh.SwEditShell::GetCntType() &&
GRAPHIC_NONE != ( nGrfType = rSh.GetGraphicType() ) &&
aGrfUpdateSlots.Count() )
{
- BOOL bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
+ sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
SfxViewFrame* pVFrame = GetView().GetViewFrame();
- USHORT nSlot;
- for( USHORT n = 0; n < aGrfUpdateSlots.Count(); ++n )
+ sal_uInt16 nSlot;
+ for( sal_uInt16 n = 0; n < aGrfUpdateSlots.Count(); ++n )
{
- BOOL bSetState = FALSE;
- BOOL bState = FALSE;
+ sal_Bool bSetState = sal_False;
+ sal_Bool bState = sal_False;
switch( nSlot = aGrfUpdateSlots[ n ] )
{
case SID_IMAP:
case SID_IMAP_EXEC:
{
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ?
(SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )
->GetWindow()) : 0;
@@ -1261,14 +1272,14 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
lcl_UpdateIMapDlg( rSh );
if( !bProtect && SID_IMAP == nSlot )
- bSetState = TRUE, bState = 0 != pDlg;
+ bSetState = sal_True, bState = 0 != pDlg;
}
break;
case SID_CONTOUR_DLG:
if( !bProtect )
{
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ?
(SvxIMapDlg*) ( pVFrame->GetChildWindow( nId )
->GetWindow()) : 0;
@@ -1276,7 +1287,7 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
rSh.GetIMapInventor() )
lcl_UpdateContourDlg( rSh, nsSelectionType::SEL_GRF );
- bSetState = TRUE;
+ bSetState = sal_True;
bState = 0 != pDlg;
}
break;
@@ -1287,7 +1298,7 @@ IMPL_LINK(SwBaseShell, GraphicArrivedHdl, SwCrsrShell* , EMPTYARG )
SfxItemSet aSet(GetPool(), RES_SURROUND, RES_SURROUND);
rSh.GetFlyFrmAttr(aSet);
const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND);
- bSetState = TRUE;
+ bSetState = sal_True;
bState = rWrap.IsContour();
}
break;
@@ -1327,7 +1338,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
SwWrtShell &rSh = GetShell();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
pGetStateSet = &rSet;
while ( nWhich )
{
@@ -1341,7 +1352,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_GALLERY_ENABLE_ADDCOPY:
// #108230# allow copy from gallery in Writer AND Writer/Web!
- rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_GALLERY_ENABLE_ADDCOPY, sal_True ) );
break;
case FN_EDIT_REGION:
if( !rSh.IsAnySectionInDoc() )
@@ -1355,7 +1366,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TABLE_TO_TEXT:
{
- USHORT eFrmType = rSh.GetFrmType(0,TRUE);
+ sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
!rSh.GetTableFmt() )
rSet.DisableItem( nWhich );
@@ -1363,7 +1374,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TO_TABLE:
{
- USHORT eFrmType = rSh.GetFrmType(0,TRUE);
+ sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
!rSh.IsTextToTableAvailable() )
rSet.DisableItem( nWhich );
@@ -1371,7 +1382,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case FN_CONVERT_TEXT_TABLE:
{
- USHORT eFrmType = rSh.GetFrmType(0,TRUE);
+ sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
if( (eFrmType & FRMTYPE_FOOTNOTE) ||
(!rSh.GetTableFmt() && !rSh.IsTextToTableAvailable() ) )
rSet.DisableItem( nWhich );
@@ -1386,11 +1397,11 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
if ( rSh.IsTableMode() )
{
SwFrmFmt *pFmt = rSh.GetTableFmt();
- aSet.Put(pFmt->GetFmtAttr( nWhich, TRUE ));
+ aSet.Put(pFmt->GetFmtAttr( nWhich, sal_True ));
}
else if( rSh.IsFrmSelected() )
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aSet.Put( aMgr.GetAttrSet() );
}
else
@@ -1409,17 +1420,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
// --> OD 2006-11-08 #i59688#
// improve efficiency:
// If selected object is protected, item has to disabled.
- const BOOL bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
+ const sal_Bool bProtect = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT);
if ( bProtect )
{
rSet.DisableItem( nWhich );
}
else
{
- const USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
- const BOOL bHas = pVFrame->HasChildWindow( nId );
- const BOOL bFrmSel = rSh.IsFrmSelected();
- const BOOL bIsGraphicSelection =
+ const sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ const sal_Bool bHas = pVFrame->HasChildWindow( nId );
+ const sal_Bool bFrmSel = rSh.IsFrmSelected();
+ const sal_Bool bIsGraphicSelection =
rSh.GetSelectionType() == nsSelectionType::SEL_GRF;
// --> OD 2006-11-08 #i59688#
@@ -1428,10 +1439,10 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
//wenn die Grafik ausgeswappt ist, dann muss der
//Status asynchron ermittelt werden
//bis dahin wird der Slot disabled
- if ( bHas && bIsGraphicSelection && rSh.IsGrfSwapOut( TRUE ) )
+ if ( bHas && bIsGraphicSelection && rSh.IsGrfSwapOut( sal_True ) )
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -1457,17 +1468,17 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_IMAP_EXEC:
{
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
if( !rSh.IsFrmSelected())
- bDisable = TRUE;
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ bDisable = sal_True;
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
if(!bDisable && pVFrame->HasChildWindow( nId ))
{
if(rSh.GetSelectionType() == nsSelectionType::SEL_GRF
- && rSh.IsGrfSwapOut(TRUE))
+ && rSh.IsGrfSwapOut(sal_True))
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -1486,21 +1497,21 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_CONTOUR_DLG:
{
- BOOL bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
+ sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
if( bParentCntProt || 0 != (HTMLMODE_ON & ::GetHtmlMode(
GetView().GetDocShell() )) )
rSet.DisableItem( nWhich );
else
{
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
- BOOL bHas = GetView().GetViewFrame()->HasChildWindow( nId );
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
+ sal_Bool bHas = GetView().GetViewFrame()->HasChildWindow( nId );
int nSel = rSh.GetSelectionType();
- BOOL bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE));
+ sal_Bool bOk = 0 != (nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE));
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
if( !bHas && !bOk )
- bDisable = TRUE;
+ bDisable = sal_True;
// --> OD 2006-11-08 #i59688#
// avoid unnecessary loading of selected graphic.
// The graphic is only needed, if the dialog is open.
@@ -1508,12 +1519,12 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
// asynchron ermittelt werden bis dahin wird der Slot
// disabled
else if ( bHas && (nSel & nsSelectionType::SEL_GRF) &&
- rSh.IsGrfSwapOut(TRUE) )
+ rSh.IsGrfSwapOut(sal_True) )
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
// --> OD 2007-07-04 #i75481#
- bDisable = TRUE;
+ bDisable = sal_True;
// <--
}
else if( bHas && bOk )
@@ -1539,16 +1550,16 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
break;
case SID_CONTOUR_EXEC:
{
- BOOL bDisable = FALSE;
+ sal_Bool bDisable = sal_False;
int nSel = rSh.GetSelectionType();
if( !(nSel & (nsSelectionType::SEL_GRF|nsSelectionType::SEL_OLE)) )
- bDisable = TRUE;
- USHORT nId = SvxContourDlgChildWindow::GetChildWindowId();
+ bDisable = sal_True;
+ sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
if( !bDisable && GetView().GetViewFrame()->HasChildWindow( nId ))
{
SvxContourDlg *pDlg = SWCONTOURDLG(GetView());
if( pDlg->GetEditingObject() != rSh.GetIMapInventor() )
- bDisable = TRUE;
+ bDisable = sal_True;
}
rSet.Put(SfxBoolItem(nWhich, bDisable));
}
@@ -1561,8 +1572,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
case FN_TOOL_ANKER_AT_CHAR:
case FN_TOOL_ANKER_FRAME:
{
- BOOL bObj = 0 != rSh.IsObjSelected();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if( !bParentCntProt && (bObj || rSh.IsFrmSelected()))
{
@@ -1572,7 +1583,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
rSh.GetFlyFrmAttr(aSet);
RndStdIds eSet = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetAnchorId();
- const BOOL bSet =
+ const sal_Bool bSet =
((nWhich == FN_TOOL_ANKER_PAGE) &&
(eSet == FLY_AT_PAGE))
|| ((nWhich == FN_TOOL_ANKER_PARAGRAPH) &&
@@ -1585,7 +1596,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
(eSet == FLY_AS_CHAR));
if(nWhich != FN_TOOL_ANKER)
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
if( ( nWhich == FN_TOOL_ANKER_PAGE &&
((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS)))) ||
( nWhich == FN_TOOL_ANKER_FRAME && !rSh.IsFlyInFly() ) )
@@ -1595,7 +1606,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
}
else
{
- USHORT nSlotId = 0;
+ sal_uInt16 nSlotId = 0;
switch (eSet)
{
@@ -1634,8 +1645,8 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
case FN_FRAME_WRAP_LEFT:
case FN_FRAME_WRAP_RIGHT:
{
- BOOL bObj = 0 != rSh.IsObjSelected();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if( !bParentCntProt && (bObj || rSh.IsFrmSelected()))
{
@@ -1654,9 +1665,9 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
const SwFmtSurround& rWrap = (const SwFmtSurround&)aSet.Get(RES_SURROUND);
const SvxOpaqueItem& rOpaque = (const SvxOpaqueItem&)aSet.Get(RES_OPAQUE);
- BOOL bOpaque = rOpaque.GetValue();
+ sal_Bool bOpaque = rOpaque.GetValue();
SwSurround nSurround = rWrap.GetSurround();
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
bool bDisable =
(nAnchorType == - 1) || (nAnchorType == FLY_AS_CHAR);
@@ -1706,10 +1717,10 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
{
int nSel = rSh.GetSelectionType();
if( (nSel & nsSelectionType::SEL_GRF) &&
- rSh.IsGrfSwapOut(TRUE))
+ rSh.IsGrfSwapOut(sal_True))
{
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else if( rSh.IsFrmSelected() )
{
@@ -1719,7 +1730,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
GRAPHIC_NONE == rSh.GetIMapGraphic().GetType();
}
}
- bSet = bDisable ? FALSE : rWrap.IsContour();
+ bSet = bDisable ? sal_False : rWrap.IsContour();
break;
case FN_WRAP_ANCHOR_ONLY:
@@ -1775,7 +1786,7 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -1789,7 +1800,7 @@ void SwBaseShell::StateDisableItems( SfxItemSet &rSet )
--------------------------------------------------------------------*/
void SwBaseShell::StateStyle( SfxItemSet &rSet )
{
- BOOL bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = GetShell().IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
ShellModes eMode = GetView().GetShellMode();
if ( bParentCntProt ||
@@ -1800,7 +1811,7 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet )
SHELL_MODE_BEZIER == eMode )
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
rSet.DisableItem( nWhich );
@@ -1811,10 +1822,10 @@ void SwBaseShell::StateStyle( SfxItemSet &rSet )
GetView().GetDocShell()->StateStyleSheet(rSet, &GetShell());
}
-void SwBaseShell::SetWrapMode( USHORT nSlot )
+void SwBaseShell::SetWrapMode( sal_uInt16 nSlot )
{
SwWrtShell &rSh = GetShell();
- BOOL bObj = 0 != rSh.IsObjSelected();
+ sal_Bool bObj = 0 != rSh.IsObjSelected();
if( bObj || rSh.IsFrmSelected())
{
SfxItemSet aSet(GetPool(), RES_OPAQUE, RES_SURROUND);
@@ -1831,7 +1842,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
case FN_FRAME_NOWRAP:
nSurround = SURROUND_NONE;
if (aWrap.IsContour())
- aWrap.SetContour(FALSE);
+ aWrap.SetContour(sal_False);
break;
case FN_FRAME_WRAP_IDEAL:
nSurround = SURROUND_IDEAL;
@@ -1855,7 +1866,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
break;
case FN_FRAME_WRAPTHRU_TRANSP:
if (aWrap.IsContour())
- aWrap.SetContour(FALSE);
+ aWrap.SetContour(sal_False);
// kein break!!!
case FN_FRAME_WRAPTHRU:
nSurround = SURROUND_THROUGHT;
@@ -1880,7 +1891,7 @@ void SwBaseShell::SetWrapMode( USHORT nSlot )
if (bObj && nOldSurround != nSurround &&
(nOldSurround == SURROUND_NONE || nOldSurround == SURROUND_THROUGHT))
{
- aWrap.SetContour(TRUE);
+ aWrap.SetContour(sal_True);
}
}
@@ -1917,7 +1928,7 @@ void SwBaseShell::SetFrmMode(FlyMode eMode, SwWrtShell *pSh )
}
else if( eMode == FLY_DRAG_END )
{
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_POSITION, SID_ATTR_SIZE, 0
};
@@ -1958,10 +1969,10 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
{
SwWrtShell &rSh = GetShell();
SvxScriptSetItem* pSSetItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SfxItemPool& rPool = rSh.GetAttrPool();
- USHORT nWhich = rPool.GetWhich( nSlot );
- USHORT nScripts = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nWhich = rPool.GetWhich( nSlot );
+ sal_uInt16 nScripts = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
SfxItemSet aHeightSet( GetPool(), RES_CHRATR_FONTSIZE, RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE, RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE, RES_CHRATR_CTL_FONTSIZE,
@@ -2003,7 +2014,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
LanguageType nInputLang = GetView().GetEditWin().GetInputLanguage();
if(nInputLang != LANGUAGE_DONTKNOW && nInputLang != LANGUAGE_SYSTEM)
nScripts = SvtLanguageOptions::GetScriptTypeOfLanguage( nInputLang );
- UINT32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight();
+ sal_uInt32 nHeight = static_cast< const SvxFontHeightItem& >(pArgs->Get( nWhich )).GetHeight();
SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
SfxItemSet aLangSet( GetPool(), RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
@@ -2040,9 +2051,9 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
nCTLSize = (sal_Int32) nHeight;
break;
}
- aHeightSet.Put( SvxFontHeightItem( (UINT32)nWesternSize, 100, RES_CHRATR_FONTSIZE ));
- aHeightSet.Put( SvxFontHeightItem( (UINT32)nCJKSize, 100, RES_CHRATR_CJK_FONTSIZE ));
- aHeightSet.Put( SvxFontHeightItem( (UINT32)nCTLSize, 100, RES_CHRATR_CTL_FONTSIZE ));
+ aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nWesternSize, 100, RES_CHRATR_FONTSIZE ));
+ aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCJKSize, 100, RES_CHRATR_CJK_FONTSIZE ));
+ aHeightSet.Put( SvxFontHeightItem( (sal_uInt32)nCTLSize, 100, RES_CHRATR_CTL_FONTSIZE ));
pArgs = &aHeightSet;
}
}
@@ -2071,7 +2082,7 @@ void SwBaseShell::ExecTxtCtrl( SfxRequest& rReq )
delete pSSetItem;
}
else
- GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, FALSE);
+ GetView().GetViewFrame()->GetDispatcher()->Execute( SID_CHAR_DLG, sal_False);
rReq.Done();
}
@@ -2084,11 +2095,11 @@ void SwBaseShell::GetTxtCtrlState( SfxItemSet& rSet )
void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
{
SwWrtShell &rSh = GetShell();
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
SfxItemSet* pFntCoreSet = 0;
- USHORT nScriptType = SCRIPTTYPE_LATIN;
+ sal_uInt16 nScriptType = SCRIPTTYPE_LATIN;
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
switch( nWhich )
@@ -2121,7 +2132,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
}
SfxItemPool& rPool = *rSet.GetPool();
SvxScriptSetItem aSetItem( rPool.GetSlotId( nWhich ), rPool );
- aSetItem.GetItemSet().Put( *pFntCoreSet, FALSE );
+ aSetItem.GetItemSet().Put( *pFntCoreSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
@@ -2140,7 +2151,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
aFont.SetCharSet(((const SvxFontItem*)pI)->GetCharSet());
}
- BOOL bVertical = rSh.IsInVerticalText();
+ sal_Bool bVertical = rSh.IsInVerticalText();
aFont.SetOrientation(bVertical ? 2700 : 0);
aFont.SetVertical(bVertical);
GetView().GetEditWin().SetInputContext( InputContext( aFont, INPUTCONTEXT_TEXT |
@@ -2153,7 +2164,7 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
if( bFirst )
{
rSh.GetCurAttr( rSet );
- bFirst = FALSE;
+ bFirst = sal_False;
}
}
nWhich = aIter.NextWhich();
@@ -2165,7 +2176,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
int nSelType = rSh.GetSelectionType();
if( nSelType & nsSelectionType::SEL_OLE )
@@ -2176,7 +2187,7 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
if ( nSelType & nsSelectionType::SEL_FRM )
{
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if (bParentCntProt)
{
rSet.DisableItem( SID_BACKGROUND_COLOR );
@@ -2227,7 +2238,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
}
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if( !pArgs && nSlot != SID_BACKGROUND_COLOR)
return ;
@@ -2321,8 +2332,8 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
// Tabellenzelle(n) selektiert?
- BOOL bPrepare = TRUE;
- BOOL bTableMode = rSh.IsTableMode();
+ sal_Bool bPrepare = sal_True;
+ sal_Bool bTableMode = rSh.IsTableMode();
if ( bTableMode )
{
SfxItemSet aCoreSet( GetPool(),
@@ -2335,9 +2346,9 @@ void SwBaseShell::GetBorderState(SfxItemSet &rSet)
}
else if ( rSh.IsFrmSelected() )
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
rSet.Put( aMgr.GetAttrSet() );
- bPrepare = FALSE;
+ bPrepare = sal_False;
}
else
// Umrandungsattribute ganz normal ueber Shell holen
@@ -2353,15 +2364,15 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
Window *pMDI = &GetView().GetViewFrame()->GetWindow();
//Damit aus dem Basic keine Dialoge fuer Hintergrund-Views aufgerufen werden:
- BOOL bBackground = (&GetView() != GetActiveView());
+ sal_Bool bBackground = (&GetView() != GetActiveView());
const SfxPoolItem* pItem = 0;
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pOutSet = 0;
bool bDone = false;
if(pArgs)
- pArgs->GetItemState( GetPool().GetWhich(nSlot), FALSE, &pItem );
+ pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem );
switch ( nSlot )
{
@@ -2378,7 +2389,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
{
if( !bBackground )
{
- const USHORT nCurIdx = rSh.GetCurPageDesc();
+ const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
const SwPageDesc& rPageDesc = rSh.GetPageDesc( nCurIdx );
//temp. View, weil die Shell nach dem Dialog nicht mehr gueltig sein muss
//z.B. Kopfzeile ausschalten
@@ -2417,7 +2428,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
else if ( rSh.IsFrmSelected() )
{
// Umrandungsattribute ueber Frame-Manager setzen
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
aSet.Put( aMgr.GetAttrSet() );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -2546,11 +2557,11 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
const SfxItemSet* pArgs = _rRequest.GetArgs();
SwWrtShell& rSh = GetShell();
- if ( !( rSh.GetFrmType( 0, TRUE ) & FRMTYPE_FOOTNOTE ) )
+ if ( !( rSh.GetFrmType( 0, sal_True ) & FRMTYPE_FOOTNOTE ) )
{
SwView &rTempView = GetView(); // Da GetView() nach Shellwechsel nicht mehr geht
- BOOL bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
- BOOL bCallEndUndo = FALSE;
+ sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rTempView.GetDocShell())&HTMLMODE_ON);
+ sal_Bool bCallEndUndo = sal_False;
if( !pArgs && rSh.IsSelection() && !rSh.IsInClickToEdit() &&
!rSh.IsTableMode() )
@@ -2559,9 +2570,9 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
SwInsertTableOptions aInsTblOpts = pModOpt->GetInsTblFlags(bHTMLMode);
rSh.StartUndo(UNDO_INSTABLE);
- bCallEndUndo = TRUE;
+ bCallEndUndo = sal_True;
- BOOL bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL );
+ sal_Bool bInserted = rSh.TextToTable( aInsTblOpts, '\t', text::HoriOrientation::FULL );
rSh.EnterStdMode();
if (bInserted)
rTempView.AutoCaption(TABLE_CAP);
@@ -2569,8 +2580,8 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
}
else
{
- USHORT nCols = 0;
- USHORT nRows = 0;
+ sal_uInt16 nCols = 0;
+ sal_uInt16 nRows = 0;
SwInsertTableOptions aInsTblOpts( tabopts::ALL_TBL_INS_ATTR, 1 );
String aTableName, aAutoName;
SwTableAutoFmt* pTAFmt = 0;
@@ -2596,7 +2607,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
{
SwTableAutoFmtTbl aTableTbl;
aTableTbl.Load();
- for ( USHORT n=0; n<aTableTbl.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aTableTbl.Count(); n++ )
{
if ( aTableTbl[n]->GetName() == aAutoName )
{
@@ -2608,7 +2619,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
}
if ( pFlags )
- aInsTblOpts.mnInsMode = (USHORT) pFlags->GetValue();
+ aInsTblOpts.mnInsMode = (sal_uInt16) pFlags->GetValue();
else
{
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -2643,7 +2654,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
_rRequest.Done();
rSh.StartUndo(UNDO_INSTABLE);
- bCallEndUndo = TRUE;
+ bCallEndUndo = sal_True;
rSh.StartAllAction();
if( rSh.HasSelection() )
@@ -2681,7 +2692,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
switch ( nWhich )
{
case SID_GALLERY_BG_BRUSH:
@@ -2692,11 +2703,11 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
nParagraphPos = nGraphicPos = nOlePos = nFramePos = nTablePos =
nTableRowPos = nTableCellPos = nPagePos =
nHeaderPos = nFooterPos = 0;
- BYTE nPos = 1;
+ sal_uInt8 nPos = 1;
pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_PAGE ), pLst->Count() );
nPagePos = nPos++;
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
- BOOL bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_Bool bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
if ( (!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) &&
(nSel & nsSelectionType::SEL_TXT) )
@@ -2736,7 +2747,7 @@ void SwBaseShell::GetGalleryState( SfxItemSet &rSet )
pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_OLE ), pLst->Count() );
nOlePos = nPos++;
}
- const USHORT nType = rSh.GetFrmType(0,TRUE);
+ const sal_uInt16 nType = rSh.GetFrmType(0,sal_True);
if ( nType & FRMTYPE_HEADER )
{
pLst->Insert( (void*) new SW_RESSTR( STR_SWBG_HEADER ), pLst->Count() );
@@ -2762,7 +2773,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
rSh.StartAction();
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_GALLERY_BG_BRUSH:
@@ -2771,7 +2782,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
if ( nSel & nsSelectionType::SEL_DRW_TXT )
break;
- BYTE nPos = (BYTE)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue();
+ sal_uInt8 nPos = (sal_uInt8)((SfxUInt16Item &)pArgs->Get(SID_GALLERY_BG_POS)).GetValue();
++nPos;
SvxBrushItem aBrush( (SvxBrushItem&)pArgs->Get(SID_GALLERY_BG_BRUSH));
@@ -2792,7 +2803,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
}
else if ( nPos == nPagePos || nPos == nHeaderPos || nPos == nFooterPos )
{
- USHORT nDesc = rSh.GetCurPageDesc();
+ sal_uInt16 nDesc = rSh.GetCurPageDesc();
SwPageDesc aDesc( rSh.GetPageDesc( nDesc ) );
if ( nPos == nPagePos )
aDesc.GetMaster().SetFmtAttr( aBrush );
@@ -2819,7 +2830,7 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
void SwBaseShell::ExecField( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case FN_CHANGE_DBFIELD:
diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx
index 6e8d7a36e2..dbcd205d73 100644
--- a/sw/source/ui/shells/beziersh.cxx
+++ b/sw/source/ui/shells/beziersh.cxx
@@ -79,12 +79,12 @@ void SwBezierShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
switch (nSlotId)
{
@@ -93,7 +93,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
if (pSh->IsObjSelected())
{
if (pSdrView->HasMarkedPoints())
- pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, FALSE);
+ pSh->GetView().GetViewFrame()->GetDispatcher()->Execute(SID_BEZIER_DELETE, sal_False);
else
{
pSh->DelSelectedObj();
@@ -130,7 +130,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
case SID_BEZIER_INSERT:
{
GetView().GetEditWin().SetBezierMode(nSlotId);
- static USHORT const aInva[] =
+ static sal_uInt16 aInva[] =
{
SID_BEZIER_INSERT,
SID_BEZIER_MOVE,
@@ -190,7 +190,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
{
pSdrView->SetMarkedPointsSmooth(eKind);
- static USHORT const aInva[] =
+ static sal_uInt16 aInva[] =
{
SID_BEZIER_SMOOTH,
SID_BEZIER_EDGE,
@@ -226,7 +226,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
GetShell().SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
void SwBezierShell::GetState(SfxItemSet &rSet)
@@ -234,7 +234,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
SdrView* pSdrView = GetShell().GetDrawView();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -243,7 +243,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
case SID_BEZIER_MOVE:
case SID_BEZIER_INSERT:
{
- USHORT nEditMode = GetView().GetEditWin().GetBezierMode();
+ sal_uInt16 nEditMode = GetView().GetEditWin().GetBezierMode();
rSet.Put(SfxBoolItem(nWhich, nEditMode == nWhich));
}
@@ -274,8 +274,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
switch (eSegm)
{
case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
- case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,FALSE)); break; // Button reingedrueckt = Kurve
- case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,TRUE)); break;
+ case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_False)); break; // Button reingedrueckt = Kurve
+ case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_True)); break;
default:; //prevent warning
}
}
@@ -289,7 +289,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
else
{
SdrPathSmoothKind eSmooth = pSdrView->GetMarkedPointsSmooth();
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
switch (eSmooth)
{
case SDRPATHSMOOTH_DONTCARE :
@@ -319,8 +319,8 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
switch (eClose)
{
case SDROBJCLOSED_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CLOSE); break;
- case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,FALSE)); break;
- case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,TRUE)); break;
+ case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_False)); break;
+ case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_True)); break;
default:; //prevent warning
}
}
diff --git a/sw/source/ui/shells/drawdlg.cxx b/sw/source/ui/shells/drawdlg.cxx
index 021b3a9485..9e82ea68d4 100644
--- a/sw/source/ui/shells/drawdlg.cxx
+++ b/sw/source/ui/shells/drawdlg.cxx
@@ -54,8 +54,8 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
SwWrtShell* pSh = &GetShell();
SdrView* pView = pSh->GetDrawView();
SdrModel* pDoc = pView->GetModel();
- BOOL bChanged = pDoc->IsChanged();
- pDoc->SetChanged(FALSE);
+ sal_Bool bChanged = pDoc->IsChanged();
+ pDoc->SetChanged(sal_False);
SfxItemSet aNewAttr( pDoc->GetItemPool() );
pView->GetAttributes( aNewAttr );
@@ -70,7 +70,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
if ( pFact )
{
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, pView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
{
@@ -90,7 +90,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
case SID_ATTRIBUTES_AREA:
{
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet Factory fail!");
@@ -109,10 +109,10 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
if (bHasMarked)
pView->SetAttributes(*pDlg->GetOutputItemSet());
else
- pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, 0
};
@@ -127,7 +127,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
case SID_ATTRIBUTES_LINE:
{
- BOOL bHasMarked = pView->AreObjectsMarked();
+ sal_Bool bHasMarked = pView->AreObjectsMarked();
const SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -146,12 +146,12 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
pSh->StartAction();
if(bHasMarked)
- pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetAttrToMarked(*pDlg->GetOutputItemSet(), sal_False);
else
- pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), FALSE);
+ pView->SetDefaultAttr(*pDlg->GetOutputItemSet(), sal_False);
pSh->EndAction();
- static USHORT const aInval[] =
+ static sal_uInt16 aInval[] =
{
SID_ATTR_LINE_STYLE, SID_ATTR_LINE_WIDTH,
SID_ATTR_LINE_COLOR, 0
@@ -172,7 +172,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
GetShell().SetModified();
else
if (bChanged)
- pDoc->SetChanged(TRUE);
+ pDoc->SetChanged(sal_True);
}
void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
@@ -180,17 +180,17 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
SwWrtShell* pSh = &GetShell();
SdrView* pView = pSh->GetDrawView();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bChanged = pView->GetModel()->IsChanged();
- pView->GetModel()->SetChanged(FALSE);
+ sal_Bool bChanged = pView->GetModel()->IsChanged();
+ pView->GetModel()->SetChanged(sal_False);
GetView().NoRotate();
if (pArgs)
{
if(pView->AreObjectsMarked())
- pView->SetAttrToMarked(*rReq.GetArgs(), FALSE);
+ pView->SetAttrToMarked(*rReq.GetArgs(), sal_False);
else
- pView->SetDefaultAttr(*rReq.GetArgs(), FALSE);
+ pView->SetDefaultAttr(*rReq.GetArgs(), sal_False);
}
else
{
@@ -202,13 +202,13 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
case SID_ATTR_FILL_GRADIENT:
case SID_ATTR_FILL_HATCH:
case SID_ATTR_FILL_BITMAP:
- pDis->Execute(SID_ATTRIBUTES_AREA, FALSE);
+ pDis->Execute(SID_ATTRIBUTES_AREA, sal_False);
break;
case SID_ATTR_LINE_STYLE:
case SID_ATTR_LINE_DASH:
case SID_ATTR_LINE_WIDTH:
case SID_ATTR_LINE_COLOR:
- pDis->Execute(SID_ATTRIBUTES_LINE, FALSE);
+ pDis->Execute(SID_ATTRIBUTES_LINE, sal_False);
break;
}
}
@@ -216,7 +216,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest& rReq)
GetShell().SetModified();
else
if (bChanged)
- pView->GetModel()->SetChanged(TRUE);
+ pView->GetModel()->SetChanged(sal_True);
}
void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
@@ -225,7 +225,7 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
if (pSdrView->AreObjectsMarked())
{
- BOOL bDisable = Disable( rSet );
+ sal_Bool bDisable = Disable( rSet );
if( !bDisable )
pSdrView->GetAttributes( rSet );
diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx
index 9744c07df7..6152846ae9 100644
--- a/sw/source/ui/shells/drawsh.cxx
+++ b/sw/source/ui/shells/drawsh.cxx
@@ -90,16 +90,16 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SdrView *pSdrView = rSh.GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
- BOOL bMirror = TRUE;
+ sal_Bool bMirror = sal_True;
switch (nSlotId)
{
@@ -169,7 +169,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
break;
case FN_FLIP_HORZ_GRAFIC:
- bMirror = FALSE;
+ bMirror = sal_False;
/* no break */
case FN_FLIP_VERT_GRAFIC:
rSh.MirrorSelection( bMirror );
@@ -178,7 +178,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
case SID_FONTWORK:
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if (pArgs)
{
@@ -235,7 +235,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -291,7 +291,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
rSh.SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
void SwDrawShell::GetState(SfxItemSet& rSet)
@@ -299,8 +299,8 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
- BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
@@ -326,7 +326,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
case SID_OBJECT_ROTATE:
{
- const BOOL bIsRotate = GetView().IsDrawRotate();
+ const sal_Bool bIsRotate = GetView().IsDrawRotate();
if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected )
rSet.DisableItem( nWhich );
else
@@ -355,7 +355,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem( nWhich , GetView().GetViewFrame()->HasChildWindow(nId)));
}
}
@@ -383,8 +383,8 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
SdrView* pDrView = rSh.GetDrawView();
- BOOL bChanged = pDrView->GetModel()->IsChanged();
- pDrView->GetModel()->SetChanged(FALSE);
+ sal_Bool bChanged = pDrView->GetModel()->IsChanged();
+ pDrView->GetModel()->SetChanged(sal_False);
const SdrMarkList& rMarkList = pDrView->GetMarkedObjectList();
@@ -395,16 +395,16 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
if ( pDrView->IsTextEdit() )
{
- pDrView->SdrEndTextEdit( TRUE );
+ pDrView->SdrEndTextEdit( sal_True );
GetView().AttrChangedNotify(&rSh);
}
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) ==
+ if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
SFX_ITEM_SET &&
((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(GetView().GetViewFrame()->
GetChildWindow(nId)->GetWindow());
@@ -422,7 +422,7 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
rSh.SetModified();
else
if (bChanged)
- pDrView->GetModel()->SetChanged(TRUE);
+ pDrView->GetModel()->SetChanged(sal_True);
}
/*************************************************************************
@@ -438,7 +438,7 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
const SdrObject* pObj = NULL;
SvxFontWorkDialog* pDlg = NULL;
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( pVFrame->HasChildWindow(nId) )
@@ -451,14 +451,14 @@ void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
#define XATTR_ANZ 12
- static const USHORT nXAttr[ XATTR_ANZ ] =
+ static const sal_uInt16 nXAttr[ XATTR_ANZ ] =
{
XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE,
XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM,
XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW,
XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL
};
- for( USHORT i = 0; i < XATTR_ANZ; )
+ for( sal_uInt16 i = 0; i < XATTR_ANZ; )
rSet.DisableItem( nXAttr[ i++ ] );
}
else
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index 01e41bbfae..7d027bb208 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -89,14 +89,14 @@ TYPEINIT1(SwDrawBaseShell,SwBaseShell)
SwDrawBaseShell::SwDrawBaseShell(SwView &_rView):
SwBaseShell( _rView )
{
- GetShell().NoEdit(TRUE);
+ GetShell().NoEdit(sal_True);
SwEditWin& rWin = GetView().GetEditWin();
rWin.SetBezierMode(SID_BEZIER_MOVE);
if ( !_rView.GetDrawFuncPtr() )
- _rView.GetEditWin().StdDrawMode( OBJ_NONE, TRUE );
+ _rView.GetEditWin().StdDrawMode( OBJ_NONE, sal_True );
SwTransferable::CreateSelection( GetShell() );
}
@@ -113,12 +113,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
//Sonderfall Align per Menue
if(pItem && nSlotId == SID_OBJECT_ALIGN)
@@ -128,11 +128,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
nSlotId++;
}
- BOOL bAlignPossible = pSh->IsAlignPossible();
+ sal_Bool bAlignPossible = pSh->IsAlignPossible();
- BOOL bTopParam = TRUE, bBottomParam = TRUE;
- BOOL bNotify = FALSE;
- BOOL bDone = FALSE;
+ sal_Bool bTopParam = sal_True, bBottomParam = sal_True;
+ sal_Bool bNotify = sal_False;
+ sal_Bool bDone = sal_False;
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
switch (nSlotId)
@@ -162,14 +162,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, TRUE, RC_DLG_SWWRAPDLG );
+ SfxAbstractDialog* pDlg = pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, sal_True, RC_DLG_SWWRAPDLG );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
{
const SfxPoolItem* pWrapItem;
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, FALSE, &pWrapItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_DRAW_WRAP_DLG, sal_False, &pWrapItem))
{
short nLayer = ((const SfxInt16Item*)pWrapItem)->GetValue();
if (nLayer == 1)
@@ -198,12 +198,12 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
SfxAbstractTabDialog *pDlg=NULL;
- BOOL bCaption = FALSE;
+ sal_Bool bCaption = sal_False;
// Erlaubte Verankerungen:
short nAnchor = pSh->GetAnchorId();
- USHORT nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT;
- USHORT nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
+ sal_uInt16 nAllowedAnchors = SVX_OBJ_AT_CNTNT|SVX_OBJ_IN_CNTNT;
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
if( !((HTMLMODE_ON & nHtmlMode) && (0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS))) )
nAllowedAnchors |= SVX_OBJ_PAGE;
@@ -211,7 +211,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
nAllowedAnchors |= SVX_OBJ_AT_FLY;
if (pObj->GetObjIdentifier() == OBJ_CAPTION )
- bCaption = TRUE;
+ bCaption = sal_True;
if (bCaption)
{
@@ -240,19 +240,20 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
}
SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
- const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+ const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aSet( *aNewAttr.GetPool(), pRange );
FieldUnit eMetric = ::GetDfltMetric(0 != dynamic_cast<SwWebView*>(&GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
- aSet.Put( aNewAttr, FALSE );
+ aSet.Put( aNewAttr, sal_False );
if (bCaption)
pSdrView->GetAttributes( aSet );
aSet.Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, nAnchor));
- BOOL bRTL;
- aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(TRUE, bRTL)));
+ sal_Bool bRTL;
+ sal_Bool bVertL2R;
+ aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_VERTICAL_TEXT, pSh->IsFrmVertical(sal_True, bRTL, bVertL2R)));
aSet.Put(SfxBoolItem(SID_ATTR_TRANSFORM_IN_RTL_TEXT, bRTL));
SwFrmFmt* pFrmFmt = FindFrmFmt( pObj );
@@ -280,18 +281,18 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
pSh->StartAllAction();
// --> OD 2004-07-14 #i30451#
- pSh->StartUndo();
+ pSh->StartUndo(UNDO_INSFMTATTR);
pSdrView->SetGeoAttrToMarked(*pOutSet);
if (bCaption)
pSdrView->SetAttributes(*pOutSet);
- BOOL bPosCorr =
+ sal_Bool bPosCorr =
SFX_ITEM_SET != pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_POS_X, FALSE ) &&
+ SID_ATTR_TRANSFORM_POS_X, sal_False ) &&
SFX_ITEM_SET != pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_POS_Y, FALSE );
+ SID_ATTR_TRANSFORM_POS_Y, sal_False );
SfxItemSet aFrmAttrSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END - 1);
@@ -299,11 +300,11 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pAnchorItem;
if(SFX_ITEM_SET == pOutSet->GetItemState(
- SID_ATTR_TRANSFORM_ANCHOR, FALSE, &pAnchorItem))
+ SID_ATTR_TRANSFORM_ANCHOR, sal_False, &pAnchorItem))
{
if(!bSingleSelection)
pSh->ChgAnchor(((const SfxInt16Item*)pAnchorItem)
- ->GetValue(), FALSE, bPosCorr );
+ ->GetValue(), sal_False, bPosCorr );
else
{
SwFmtAnchor aAnchor(pFrmFmt->GetAnchor());
@@ -315,10 +316,10 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pHoriRelation = 0;
const SfxPoolItem* pHoriPosition = 0;
const SfxPoolItem* pHoriMirror = 0;
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, FALSE, &pHoriOrient);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, FALSE, &pHoriRelation);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, FALSE, &pHoriPosition);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, FALSE, &pHoriMirror);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_ORIENT, sal_False, &pHoriOrient);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_RELATION, sal_False, &pHoriRelation);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_POSITION, sal_False, &pHoriPosition);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_HORI_MIRROR, sal_False, &pHoriMirror);
if(pHoriOrient || pHoriRelation || pHoriPosition || pHoriMirror)
{
if(pHoriOrient)
@@ -337,9 +338,9 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
const SfxPoolItem* pVertOrient = 0;
const SfxPoolItem* pVertRelation = 0;
const SfxPoolItem* pVertPosition = 0;
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, FALSE, &pVertOrient);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, FALSE, &pVertRelation);
- pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, FALSE, &pVertPosition);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_ORIENT, sal_False, &pVertOrient);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_RELATION, sal_False, &pVertRelation);
+ pOutSet->GetItemState(SID_ATTR_TRANSFORM_VERT_POSITION, sal_False, &pVertPosition);
if(pVertOrient || pVertRelation || pVertPosition )
{
if(pVertOrient)
@@ -353,14 +354,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
aFrmAttrSet.Put( aVOrient );
}
const SfxPoolItem* pFollowItem = 0;
- pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, FALSE, &pFollowItem);
+ pOutSet->GetItemState(RES_FOLLOW_TEXT_FLOW, sal_False, &pFollowItem);
if(pFollowItem)
aFrmAttrSet.Put(*pFollowItem);
if(aFrmAttrSet.Count())
pSh->SetDrawingAttr(aFrmAttrSet);
- rBind.InvalidateAll(FALSE);
+ rBind.InvalidateAll(sal_False);
// --> OD 2004-07-14 #i30451#
pSh->EndUndo( UNDO_INSFMTATTR );
@@ -379,7 +380,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case FN_BACKSPACE:
if (pSh->IsObjSelected() && !pSdrView->IsTextEdit())
{
- bDone = TRUE;
+ bDone = sal_True;
if( GetView().IsDrawRotate() )
{
@@ -408,7 +409,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
pSh->LeaveSelFrmMode();
// #105852# FME
}
- bNotify = TRUE;
+ bNotify = sal_True;
}
break;
@@ -432,7 +433,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (pSh->IsGroupSelected())
{
pSdrView->EnterMarkedGroup();
- rBind.InvalidateAll(FALSE);
+ rBind.InvalidateAll(sal_False);
}
break;
@@ -458,7 +459,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if( rMarkList.GetMarkCount() == 1 && bAlignPossible )
{ // Objekte nicht aneinander ausrichten
- USHORT nAnchor = pSh->GetAnchorId();
+ sal_uInt16 nAnchor = pSh->GetAnchorId();
if (nAnchor == FLY_AS_CHAR)
{
sal_Int16 nVertOrient = -1;
@@ -521,14 +522,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
break;
case FN_FRAME_UP:
- bTopParam = FALSE;
+ bTopParam = sal_False;
/* no break */
case SID_FRAME_TO_TOP:
pSh->SelectionToTop( bTopParam );
break;
case FN_FRAME_DOWN:
- bBottomParam = FALSE;
+ bBottomParam = sal_False;
/* no break */
case SID_FRAME_TO_BOTTOM:
pSh->SelectionToBottom( bBottomParam );
@@ -536,7 +537,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case FN_NAME_SHAPE:
{
- bDone = TRUE;
+ bDone = sal_True;
if(1L == pSdrView->GetMarkedObjectCount())
{
@@ -568,7 +569,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
// #i68101#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- bDone = TRUE;
+ bDone = sal_True;
if(1L == pSdrView->GetMarkedObjectCount())
{
@@ -610,7 +611,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
pSh->SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
// 40220: Nach dem Loeschen von DrawObjekten ueber die API GPF durch Selbstzerstoerung
if(bNotify)
GetView().AttrChangedNotify(pSh); // ggf Shellwechsel...
@@ -657,8 +658,8 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
SwWrtShell &rSh = GetShell();
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
- BOOL bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
@@ -744,9 +745,9 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
}
}
-BOOL SwDrawBaseShell::Disable(SfxItemSet& rSet, USHORT nWhich)
+sal_Bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich)
{
- BOOL bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT);
+ sal_Bool bDisable = GetShell().IsSelObjProtected(FLYPROTECT_CONTENT);
if (bDisable)
{
@@ -798,8 +799,12 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->bFollowTextFlow,
pValidation->bMirror, NULL, &pValidation->aPercentSize);
- BOOL bRTL;
- BOOL bIsInVertical = pSh->IsFrmVertical(TRUE, bRTL);
+ sal_Bool bIsInVertical( sal_False );
+ {
+ sal_Bool bRTL;
+ sal_Bool bVertL2R;
+ bIsInVertical = pSh->IsFrmVertical(sal_True, bRTL, bVertL2R);
+ }
if(bIsInVertical)
{
Point aPos(aBoundRect.Pos());
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index 12c60a263d..a3fe8afa76 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -162,7 +162,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SvxScriptSetItem aSetItem( nSlot, *pPool2 );
// #i78017 establish the same behaviour as in Writer
- USHORT nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScriptTypes = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScriptTypes = pOLV->GetSelectedScriptType();
@@ -277,7 +277,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwView* pView = &GetView();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
// util::Language gibts an der EditEngine nicht! Daher nicht im Set.
@@ -290,7 +290,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( pView->GetWindow(), *pView, aDlgAttr, DLG_CHAR,0, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -349,7 +349,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -372,7 +372,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{
SwView* pView = &GetView();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(),
EE_ITEMS_START, EE_ITEMS_END,
SID_ATTR_PARA_HYPHENZONE, SID_ATTR_PARA_HYPHENZONE,
@@ -394,7 +394,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet)
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
@@ -488,7 +488,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
const SfxPoolItem* pPoolItem;
- if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, TRUE, &pPoolItem ) )
+ if( pNewAttrs && SFX_ITEM_SET == pNewAttrs->GetItemState( nSlot, sal_True, &pPoolItem ) )
{
if( !( (SfxBoolItem*)pPoolItem)->GetValue() )
bLeftToRight = !bLeftToRight;
@@ -498,8 +498,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
EE_PARA_WRITINGDIR, EE_PARA_WRITINGDIR,
0 );
- USHORT nAdjust = SVX_ADJUST_LEFT;
- if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) )
+ sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) )
nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
if( bLeftToRight )
@@ -555,8 +555,8 @@ void SwDrawTextShell::GetState(SfxItemSet& rSet)
while(nWhich)
{
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
- BOOL bFlag = FALSE;
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
+ sal_Bool bFlag = sal_False;
switch( nSlotId )
{
case SID_LANGUAGE_STATUS://20412:
@@ -640,7 +640,7 @@ ASK_ESCAPE:
// disable "Thesaurus" if the language is not supported
const SfxPoolItem &rItem = GetShell().GetDoc()->GetDefault(
GetWhichOfScript( RES_CHRATR_LANGUAGE,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage())) );
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage())) );
LanguageType nLang = ((const SvxLanguageItem &) rItem).GetLanguage();
uno::Reference< linguistic2::XThesaurus > xThes( ::GetThesaurus() );
@@ -772,11 +772,11 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
SfxWhichIter aIter(rSet);
sal_uInt16 nWhich = aIter.FirstWhich();
- USHORT nScriptType = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
while(nWhich)
{
sal_uInt16 nEEWhich = 0;
- USHORT nSlotId = GetPool().GetSlotId( nWhich );
+ sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
case SID_ATTR_CHAR_FONT:
@@ -788,7 +788,7 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
if( !pEditPool )
pEditPool = aEditAttr.GetPool();
SvxScriptSetItem aSetItem( nSlotId, *pEditPool );
- aSetItem.GetItemSet().Put( aEditAttr, FALSE );
+ aSetItem.GetItemSet().Put( aEditAttr, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
if( pI )
rSet.Put( *pI, nWhich );
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 7d8499e5d8..6fce73b22e 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -111,7 +111,7 @@ void SwDrawTextShell::Init()
if( !pOutliner )
return ;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- ULONG nCtrl = pOutliner->GetControlWord();
+ sal_uLong nCtrl = pOutliner->GetControlWord();
nCtrl |= EE_CNTRL_AUTOCORRECT;
SetUndoManager(&pOutliner->GetUndoManager());
@@ -139,7 +139,7 @@ SwDrawTextShell::SwDrawTextShell(SwView &rV) :
Init();
- rSh.NoEdit(TRUE);
+ rSh.NoEdit(sal_True);
SetName(String::CreateFromAscii("ObjectText"));
SetHelpId(SW_DRWTXTSHELL);
}
@@ -161,7 +161,7 @@ SwWrtShell& SwDrawTextShell::GetShell()
void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet )
{
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
@@ -188,7 +188,7 @@ void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr)
}
}
-BOOL SwDrawTextShell::IsTextEdit()
+sal_Bool SwDrawTextShell::IsTextEdit()
{
return pSdrView->IsTextEdit();
}
@@ -197,7 +197,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( rReq.GetArgs() )
{
@@ -213,7 +213,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
void SwDrawTextShell::StateFontWork(SfxItemSet& rSet)
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame()->HasChildWindow(nId)));
}
@@ -246,12 +246,12 @@ void SwDrawTextShell::ExecFormText(SfxRequest& rReq)
rTempView.AttrChangedNotify(&rSh);
}
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) ==
+ if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
SFX_ITEM_SET &&
((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
{
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)(
pVFrame->GetChildWindow(nId)->GetWindow());
@@ -279,7 +279,7 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
const SdrObject* pObj = NULL;
SvxFontWorkDialog* pDlg = NULL;
- const USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ const sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if ( pVFrame->HasChildWindow(nId) )
@@ -292,13 +292,13 @@ void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
!((SdrTextObj*) pObj)->HasText() )
{
#define XATTR_ANZ 12
- static const USHORT nXAttr[ XATTR_ANZ ] =
+ static const sal_uInt16 nXAttr[ XATTR_ANZ ] =
{ XATTR_FORMTXTSTYLE, XATTR_FORMTXTADJUST, XATTR_FORMTXTDISTANCE,
XATTR_FORMTXTSTART, XATTR_FORMTXTMIRROR, XATTR_FORMTXTSTDFORM,
XATTR_FORMTXTHIDEFORM, XATTR_FORMTXTOUTLINE, XATTR_FORMTXTSHADOW,
XATTR_FORMTXTSHDWCOLOR, XATTR_FORMTXTSHDWXVAL, XATTR_FORMTXTSHDWYVAL
};
- for( USHORT i = 0; i < XATTR_ANZ; )
+ for( sal_uInt16 i = 0; i < XATTR_ANZ; )
rSet.DisableItem( nXAttr[ i++ ] );
}
else
@@ -446,7 +446,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
const SfxPoolItem* pItem = 0;
if(pNewAttrs)
{
- pNewAttrs->GetItemState(nSlot, FALSE, &pItem );
+ pNewAttrs->GetItemState(nSlot, sal_False, &pItem );
pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
}
break;
@@ -457,9 +457,9 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
if(pOutliner)
{
- ULONG nParaCount = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount = pOutliner->GetParagraphCount();
if (nParaCount > 0)
- pOLV->SelectRange(0L, USHORT(nParaCount) );
+ pOLV->SelectRange(0L, sal_uInt16(nParaCount) );
}
}
break;
@@ -467,7 +467,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
case FN_FORMAT_RESET: // delete hard text attributes
{
pOLV->RemoveAttribsKeepLanguages( true );
- pOLV->GetEditView().GetEditEngine()->RemoveFields(TRUE);
+ pOLV->GetEditView().GetEditEngine()->RemoveFields(sal_True);
rReq.Done();
}
break;
@@ -494,7 +494,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog(
&(GetView().GetViewFrame()->GetWindow()),
&aNewAttr, pSdrView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if (nResult == RET_OK)
{
@@ -515,7 +515,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
return;
}
- GetView().GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
if (IsTextEdit() && pOLV->GetOutliner()->IsModified())
rSh.SetModified();
@@ -528,31 +528,31 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq)
{
if( IsTextEdit() )
{
- BOOL bCallBase = TRUE;
+ sal_Bool bCallBase = sal_True;
const SfxItemSet* pArgs = rReq.GetArgs();
if( pArgs )
{
- USHORT nId = rReq.GetSlot(), nCnt = 1;
+ sal_uInt16 nId = rReq.GetSlot(), nCnt = 1;
const SfxPoolItem* pItem;
switch( nId )
{
case SID_UNDO:
case SID_REDO:
- if( SFX_ITEM_SET == pArgs->GetItemState( nId, FALSE, &pItem ) &&
+ if( SFX_ITEM_SET == pArgs->GetItemState( nId, sal_False, &pItem ) &&
1 < (nCnt = ((SfxUInt16Item*)pItem)->GetValue()) )
{
// then we make by ourself.
- SfxUndoManager* pUndoManager = GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
if( pUndoManager )
{
if( SID_UNDO == nId )
while( nCnt-- )
- pUndoManager->Undo(0);
+ pUndoManager->Undo();
else
while( nCnt-- )
- pUndoManager->Redo(0);
+ pUndoManager->Redo();
}
- bCallBase = FALSE;
+ bCallBase = sal_False;
GetView().GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
break;
@@ -576,7 +576,7 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
SfxViewFrame *pSfxViewFrame = GetView().GetViewFrame();
SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
switch ( nWhich )
@@ -584,27 +584,27 @@ void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
case SID_GETUNDOSTRINGS:
case SID_GETREDOSTRINGS:
{
- SfxUndoManager* pUndoManager = GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
if( pUndoManager )
{
- UniString (SfxUndoManager:: *fnGetComment)( USHORT ) const;
+ UniString (::svl::IUndoManager:: *fnGetComment)( size_t, bool const ) const;
sal_uInt16 nCount;
if( SID_GETUNDOSTRINGS == nWhich )
{
nCount = pUndoManager->GetUndoActionCount();
- fnGetComment = &SfxUndoManager::GetUndoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetUndoActionComment;
}
else
{
nCount = pUndoManager->GetRedoActionCount();
- fnGetComment = &SfxUndoManager::GetRedoActionComment;
+ fnGetComment = &::svl::IUndoManager::GetRedoActionComment;
}
if( nCount )
{
String sList;
for( sal_uInt16 n = 0; n < nCount; ++n )
- ( sList += (pUndoManager->*fnGetComment)( n ) )
+ ( sList += (pUndoManager->*fnGetComment)( n, ::svl::IUndoManager::TopLevel ) )
+= '\n';
SfxStringListItem aItem( nWhich );
@@ -687,7 +687,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String sSym;
String sFontName;
@@ -695,25 +695,25 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
{
sSym = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
sFontName = pFontItem->GetValue();
}
SfxItemSet aSet(pOLV->GetAttribs());
- USHORT nScript = pOLV->GetSelectedScriptType();
+ sal_uInt16 nScript = pOLV->GetSelectedScriptType();
SvxFontItem aSetDlgFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aSetDlgFont = *(SvxFontItem*)pI;
else
aSetDlgFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
SID_ATTR_CHAR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!sFontName.Len())
sFontName = aSetDlgFont.GetFamilyName();
}
@@ -722,7 +722,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if(!sSym.Len())
{
SfxAllItemSet aAllSet( GetPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*rView.GetWrtShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -735,11 +735,11 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aFont.SetName( pFontItem->GetFamilyName() );
@@ -764,7 +764,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
// nicht flackern
pOLV->HideCursor();
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
- pOutliner->SetUpdateMode(FALSE);
+ pOutliner->SetUpdateMode(sal_False);
SfxItemSet aOldSet( pOLV->GetAttribs() );
SfxItemSet aFontSet( *aOldSet.GetPool(),
@@ -802,7 +802,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
pOLV->SetAttribs( aFontSet );
// ab jetzt wieder anzeigen
- pOutliner->SetUpdateMode(TRUE);
+ pOutliner->SetUpdateMode(sal_True);
pOLV->ShowCursor();
rReq.AppendItem( SfxStringItem( GetPool().GetWhich(SID_CHARMAP), sSym ) );
@@ -812,7 +812,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
}
}
-SfxUndoManager* SwDrawTextShell::GetUndoManager()
+::svl::IUndoManager* SwDrawTextShell::GetUndoManager()
{
SwWrtShell &rSh = GetShell();
pSdrView = rSh.GetDrawView();
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 66f0b0b402..447d46e926 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -54,7 +54,7 @@
#include <vcl/msgbox.hxx>
// <--
-
+#include <doc.hxx>
#include <fmturl.hxx>
#include <fmtclds.hxx>
#include <fmtcnct.hxx>
@@ -80,6 +80,7 @@
#include <helpid.h>
#include <cmdid.h>
+#include <cfgitems.hxx>
#include <globals.hrc>
#include <popup.hrc>
#include <shells.hrc>
@@ -131,10 +132,10 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
//Erstmal die, die keinen FrmMgr benoetigen.
SwWrtShell &rSh = GetShell();
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
@@ -284,11 +285,11 @@ void SwFrameShell::Execute(SfxRequest &rReq)
break;
case FN_FRAME_UP:
- rSh.SelectionToTop( FALSE );
+ rSh.SelectionToTop( sal_False );
break;
case FN_FRAME_DOWN:
- rSh.SelectionToBottom( FALSE );
+ rSh.SelectionToBottom( sal_False );
break;
case FN_INSERT_FRAME:
if (!pArgs)
@@ -303,15 +304,15 @@ void SwFrameShell::Execute(SfxRequest &rReq)
else
{
// Rahmen existiert bereits, nur Spaltenanzahl wird geaendert
- USHORT nCols = 1;
- if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ sal_uInt16 nCols = 1;
+ if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
nCols = ((SfxUInt16Item *)pItem)->GetValue();
SfxItemSet aSet(GetPool(),RES_COL,RES_COL);
rSh.GetFlyFrmAttr( aSet );
SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL));
// GutterWidth wird nicht immer uebergeben, daher erst besorgen (siehe view2: Execute auf diesen Slot)
- USHORT nGutterWidth = aCol.GetGutterWidth();
+ sal_uInt16 nGutterWidth = aCol.GetGutterWidth();
if(!nCols )
nCols++;
aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth());
@@ -335,7 +336,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case SID_HYPERLINK_SETLINK:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_HYPERLINK_SETLINK, sal_False, &pItem))
{
const SvxHyperlinkItem& rHLinkItem = *(const SvxHyperlinkItem *)pItem;
const String& rURL = rHLinkItem.GetURL();
@@ -350,7 +351,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (sOldName.ToUpperAscii() != sFlyName.ToUpperAscii())
{
String sName(sOldName);
- USHORT i = 1;
+ sal_uInt16 i = 1;
while (rSh.FindFlyByName(sName))
{
sName = sOldName;
@@ -359,7 +360,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
rSh.SetFlyName(sName);
}
- aURL.SetURL( rURL, FALSE );
+ aURL.SetURL( rURL, sal_False );
aURL.SetTargetFrameName(rTarget);
aSet.Put( aURL );
@@ -421,7 +422,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -436,7 +437,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
delete pDialog;
}
break;
- default: bMore = TRUE;
+ default: bMore = sal_True;
}
if ( !bMore )
@@ -444,9 +445,9 @@ void SwFrameShell::Execute(SfxRequest &rReq)
return;
}
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
- BOOL bUpdateMgr = TRUE;
- BOOL bCopyToFmt = FALSE;
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
+ sal_Bool bUpdateMgr = sal_True;
+ sal_Bool bCopyToFmt = sal_False;
switch ( nSlot )
{
case SID_OBJECT_ALIGN_MIDDLE:
@@ -509,18 +510,18 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if(pArgs)
{
aMgr.SetAttrSet( *pArgs );
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
}
}
break;
case SID_ATTR_ULSPACE:
case SID_ATTR_LRSPACE:
{
- if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem))
+ if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem))
{
aMgr.SetAttrSet( *pArgs );
if(SID_ATTR_ULSPACE == nSlot && SID_ATTR_ULSPACE == nSlot)
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
}
}
break;
@@ -530,7 +531,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (nSel & nsSelectionType::SEL_GRF)
{
rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG);
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
}
else
{
@@ -547,14 +548,13 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SID_HTML_MODE, SID_HTML_MODE,
FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT,
+ FN_OLE_IS_MATH, FN_OLE_IS_MATH,
+ FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT,
0);
const SwViewOption* pVOpt = rSh.GetViewOptions();
if(nSel & nsSelectionType::SEL_OLE)
- {
- aSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO,
- pVOpt->IsKeepRatio()));
- }
+ aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) );
aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if( nSel & nsSelectionType::SEL_OLE )
@@ -583,23 +583,29 @@ void SwFrameShell::Execute(SfxRequest &rReq)
if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff)
rSize.SetHeight(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height());
- UINT16 nDefPage = 0;
- if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET)
+ // disable vertical positioning for Math Objects anchored 'as char' if baseline alignment is activated
+ aSet.Put( SfxBoolItem( FN_MATH_BASELINE_ALIGNMENT,
+ rSh.GetDoc()->get( IDocumentSettingAccess::MATH_BASELINE_ALIGNMENT ) ) );
+ const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
+ aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) );
+
+ sal_uInt16 nDefPage = 0;
+ if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, sal_False, &pItem) == SFX_ITEM_SET)
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
aSet.Put(SfxFrameItem( SID_DOCFRAME, &GetView().GetViewFrame()->GetTopFrame()));
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
- 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();
OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
GetView().GetViewFrame(),
GetView().GetWindow(),
- aSet, FALSE,
+ aSet, sal_False,
nSel & nsSelectionType::SEL_GRF ? DLG_FRM_GRF :
nSel & nsSelectionType::SEL_OLE ? DLG_FRM_OLE :
DLG_FRM_STD,
- FALSE,
+ sal_False,
nDefPage);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
@@ -610,13 +616,13 @@ void SwFrameShell::Execute(SfxRequest &rReq)
{
rReq.Done(*pOutSet);
if(nSel & nsSelectionType::SEL_OLE &&
- SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, TRUE, &pItem))
+ SFX_ITEM_SET == pOutSet->GetItemState(FN_KEEP_ASPECT_RATIO, sal_True, &pItem))
{
SwViewOption aUsrPref( *pVOpt );
aUsrPref.SetKeepRatio(((const SfxBoolItem*)pItem)->GetValue());
SW_MOD()->ApplyUsrPref(aUsrPref, &GetView());
}
- if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, TRUE, &pItem))
+ if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, sal_True, &pItem))
{
// #i73249#
rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue());
@@ -628,7 +634,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.AutoUpdateFrame(pFmt, *pOutSet);
// alles, dass das Format nicht kann, muss hart
// gesetzt werden
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue());
SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
RES_SURROUND, RES_SURROUND,
@@ -637,7 +643,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
0);
aShellSet.Put(*pOutSet);
aMgr.SetAttrSet(aShellSet);
- if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, FALSE, &pItem))
+ if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue());
}
else
@@ -646,7 +652,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
const SwFrmFmt* pCurrFlyFmt = rSh.GetFlyFrmFmt();
if(SFX_ITEM_SET ==
pOutSet->GetItemState(FN_PARAM_CHAIN_PREVIOUS,
- FALSE, &pItem))
+ sal_False, &pItem))
{
rSh.HideChainMarker();
@@ -680,7 +686,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
rSh.SetChainMarker();
}
if(SFX_ITEM_SET ==
- pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, FALSE,
+ pOutSet->GetItemState(FN_PARAM_CHAIN_NEXT, sal_False,
&pItem))
{
rSh.HideChainMarker();
@@ -717,7 +723,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
}
else
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
delete pDlg;
}
}
@@ -725,19 +731,19 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case FN_FRAME_MIRROR_ON_EVEN_PAGES:
{
SwFmtHoriOrient aHori(aMgr.GetHoriOrient());
- BOOL bMirror = !aHori.IsPosToggle();
+ sal_Bool bMirror = !aHori.IsPosToggle();
aHori.SetPosToggle(bMirror);
SfxItemSet aSet(GetPool(), RES_HORI_ORIENT, RES_HORI_ORIENT);
aSet.Put(aHori);
aMgr.SetAttrSet(aSet);
- bCopyToFmt = TRUE;
+ bCopyToFmt = sal_True;
rReq.SetReturnValue(SfxBoolItem(nSlot, bMirror));
}
break;
// --> OD 2009-07-14 #i73249#
case FN_TITLE_DESCRIPTION_SHAPE:
{
- bUpdateMgr = FALSE;
+ bUpdateMgr = sal_False;
SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList();
if ( pSdrView &&
pSdrView->GetMarkedObjectCount() == 1 )
@@ -788,7 +794,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
void SwFrameShell::GetState(SfxItemSet& rSet)
{
SwWrtShell &rSh = GetShell();
- BOOL bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_Bool bHtmlMode = 0 != ::GetHtmlMode(rSh.GetView().GetDocShell());
if (rSh.IsFrmSelected())
{
SfxItemSet aSet( rSh.GetAttrPool(),
@@ -799,16 +805,16 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
0 );
rSh.GetFlyFrmAttr( aSet );
- BOOL bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS);
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bProtect = rSh.IsSelObjProtected(FLYPROTECT_POS);
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
bProtect |= bParentCntProt;
- const USHORT eFrmType = rSh.GetFrmType(0,TRUE);
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, FRMMGR_TYPE_NONE );
+ const sal_uInt16 eFrmType = rSh.GetFrmType(0,sal_True);
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, FRMMGR_TYPE_NONE );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -830,7 +836,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
case RES_PRINT:
case RES_SURROUND:
{
- rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), TRUE ));
+ rSet.Put(aSet.Get(GetPool().GetWhich(nWhich), sal_True ));
}
break;
case SID_OBJECT_ALIGN_LEFT :
@@ -877,7 +883,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
else
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if (eFrmType & FRMTYPE_FLY_INCNT)
{
switch (nWhich)
@@ -942,7 +948,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
SfxItemSet aURLSet(GetPool(), RES_URL, RES_URL);
rSh.GetFlyFrmAttr( aURLSet );
- if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, TRUE, &pItem))
+ if(SFX_ITEM_SET == aURLSet.GetItemState(RES_URL, sal_True, &pItem))
{
const SwFmtURL* pFmtURL = (const SwFmtURL*)pItem;
aHLinkItem.SetURL(pFmtURL->GetURL());
@@ -972,7 +978,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
}
else
{
- BOOL bChainMode = rSh.GetView().GetEditWin().IsChainMode();
+ sal_Bool bChainMode = rSh.GetView().GetEditWin().IsChainMode();
rSet.Put( SfxBoolItem( FN_FRAME_CHAIN, bChainMode ) );
}
}
@@ -1055,7 +1061,7 @@ SwFrameShell::~SwFrameShell()
void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
{
SwWrtShell &rSh = GetShell();
- BOOL bDefault = FALSE;
+ sal_Bool bDefault = sal_False;
if (!rSh.IsFrmSelected())
return;
@@ -1070,7 +1076,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
const SvxBoxItem& rBoxItem = (const SvxBoxItem&)aFrameSet.Get(RES_BOX);
if (pPoolBoxItem == &rBoxItem)
- bDefault = TRUE;
+ bDefault = sal_True;
SvxBoxItem aBoxItem(rBoxItem);
@@ -1083,7 +1089,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
{
case SID_ATTR_BORDER:
{
- if (pArgs->GetItemState(RES_BOX, TRUE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(RES_BOX, sal_True, &pItem) == SFX_ITEM_SET)
{
SvxBoxItem aNewBox(*((SvxBoxItem *)pItem));
const SvxBorderLine* pBorderLine;
@@ -1127,7 +1133,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
case SID_FRAME_LINESTYLE:
{
- if (pArgs->GetItemState(SID_FRAME_LINESTYLE, FALSE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_FRAME_LINESTYLE, sal_False, &pItem) == SFX_ITEM_SET)
{
const SvxLineItem* pLineItem =
(const SvxLineItem*)pItem;
@@ -1181,7 +1187,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
case SID_FRAME_LINECOLOR:
{
- if (pArgs->GetItemState(SID_FRAME_LINECOLOR, FALSE, &pItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_FRAME_LINECOLOR, sal_False, &pItem) == SFX_ITEM_SET)
{
const Color& rNewColor = ((const SvxColorItem*)pItem)->GetValue();
@@ -1244,7 +1250,7 @@ void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBo
void SwFrameShell::GetLineStyleState(SfxItemSet &rSet)
{
SwWrtShell &rSh = GetShell();
- BOOL bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
+ sal_Bool bParentCntProt = rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
if (bParentCntProt)
{
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 7464b22b06..2d826fec42 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -95,7 +95,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch(nSlot)
{
case SID_TWAIN_TRANSFER:
@@ -130,7 +130,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
{
- SwFlyFrmAttrMgr aMgr( FALSE, &rSh, rSh.IsFrmSelected() ?
+ SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ?
FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF);
const SwViewOption* pVOpt = rSh.GetViewOptions();
SwViewOption aUsrPref( *pVOpt );
@@ -152,10 +152,10 @@ void SwGrfShell::Execute(SfxRequest &rReq)
FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
0);
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
FieldUnit eMetric = ::GetDfltMetric((0 != (nHtmlMode&HTMLMODE_ON)));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)) );
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
const SwRect* pRect = &rSh.GetAnyCurRect(RECT_PAGE);
SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, pRect->Width(), pRect->Height());
@@ -242,7 +242,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_GRF,
GetView().GetViewFrame(),
GetView().GetWindow(),
- aSet, FALSE, DLG_FRM_GRF);
+ aSet, sal_False, DLG_FRM_GRF);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( pDlg->Execute() )
{
@@ -253,7 +253,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
rReq.Done(*pSet);
// change the 2 frmsize SizeItems to the correct SwFrmSizeItem
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE, sal_False, &pItem ))
{
SwFmtFrmSize aSize;
const Size& rSz = ((SvxSizeItem*)pItem)->GetSize();
@@ -261,11 +261,11 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSize.SetHeight( rSz.Height() );
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_FRMSIZE_PERCENT, FALSE, &pItem ))
+ SID_ATTR_GRAF_FRMSIZE_PERCENT, sal_False, &pItem ))
{
const Size& rRelativeSize = ((SvxSizeItem*)pItem)->GetSize();
- aSize.SetWidthPercent( static_cast< BYTE >( rRelativeSize.Width() ) );
- aSize.SetHeightPercent( static_cast< BYTE >( rRelativeSize.Height() ) );
+ aSize.SetWidthPercent( static_cast< sal_uInt8 >( rRelativeSize.Width() ) );
+ aSize.SetHeightPercent( static_cast< sal_uInt8 >( rRelativeSize.Height() ) );
}
pSet->Put( aSize );
}
@@ -289,20 +289,20 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
aMgr.UpdateFlyFrm();
- BOOL bApplyUsrPref = FALSE;
+ sal_Bool bApplyUsrPref = sal_False;
if (SFX_ITEM_SET == pSet->GetItemState(
- FN_KEEP_ASPECT_RATIO, TRUE, &pItem ))
+ FN_KEEP_ASPECT_RATIO, sal_True, &pItem ))
{
aUsrPref.SetKeepRatio(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_KEEP_ZOOM, TRUE, &pItem ))
+ SID_ATTR_GRAF_KEEP_ZOOM, sal_True, &pItem ))
{
aUsrPref.SetGrfKeepZoom(
((const SfxBoolItem*)pItem)->GetValue() );
- bApplyUsrPref = TRUE;
+ bApplyUsrPref = sal_True;
}
if( bApplyUsrPref )
@@ -310,7 +310,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
// and now set all the graphic attributes and other stuff
if( SFX_ITEM_SET == pSet->GetItemState(
- SID_ATTR_GRAF_GRAPHIC, TRUE, &pItem ))
+ SID_ATTR_GRAF_GRAPHIC, sal_True, &pItem ))
{
if( ((SvxBrushItem*)pItem)->GetGraphicLink() )
sGrfNm = *((SvxBrushItem*)pItem)->GetGraphicLink();
@@ -325,7 +325,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( sGrfNm.Len() )
{
SwDocShell* pDocSh = GetView().GetDocShell();
- SwWait aWait( *pDocSh, TRUE );
+ SwWait aWait( *pDocSh, sal_True );
SfxMedium* pMedium = pDocSh->GetMedium();
INetURLObject aAbs;
if( pMedium )
@@ -337,7 +337,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
}
}
if ( SFX_ITEM_SET == pSet->GetItemState(
- FN_SET_FRM_ALT_NAME, TRUE, &pItem ))
+ FN_SET_FRM_ALT_NAME, sal_True, &pItem ))
{
// #i73249#
rSh.SetObjTitle( ((const SfxStringItem*)pItem)->GetValue() );
@@ -375,7 +375,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
void SwGrfShell::ExecAttr( SfxRequest &rReq )
{
- USHORT nGrfType;
+ sal_uInt16 nGrfType;
if( CNT_GRF == GetShell().GetCntType() &&
( GRAPHIC_BITMAP == ( nGrfType = GetShell().GetGraphicType()) ||
GRAPHIC_GDIMETAFILE == nGrfType ))
@@ -384,8 +384,8 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
RES_GRFATR_END -1 );
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- USHORT nSlot = rReq.GetSlot();
- if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, FALSE, &pItem ))
+ sal_uInt16 nSlot = rReq.GetSlot();
+ if( !pArgs || SFX_ITEM_SET != pArgs->GetItemState( nSlot, sal_False, &pItem ))
pItem = 0;
switch( nSlot )
@@ -396,7 +396,7 @@ void SwGrfShell::ExecAttr( SfxRequest &rReq )
GetShell().GetCurAttr( aGrfSet );
SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get(
RES_GRFATR_MIRRORGRF ) );
- USHORT nMirror = aMirror.GetValue();
+ sal_uInt16 nMirror = aMirror.GetValue();
if( FN_FLIP_VERT_GRAFIC == nSlot )
switch( nMirror )
{
@@ -524,23 +524,23 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
SwWrtShell &rSh = GetShell();
SfxItemSet aCoreSet( GetPool(), aNoTxtNodeSetRange );
rSh.GetCurAttr( aCoreSet );
- BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
- BOOL bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
+ sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
+ sal_Bool bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
SetGetStateSet( &rSet );
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- BOOL bDisable = bParentCntProt;
+ sal_Bool bDisable = bParentCntProt;
switch( nWhich )
{
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
case SID_TWAIN_TRANSFER:
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
break;
case FN_SAVE_GRAPHIC:
if( rSh.GetGraphicType() == GRAPHIC_NONE )
@@ -556,7 +556,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_COLOR_SETTINGS:
{
if ( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
else
{
svx::ToolboxAccess aToolboxAccess( TOOLBOX_NAME );
@@ -616,7 +616,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_ATTR_GRAF_GAMMA:
if( !bParentCntProt )
- rSet.Put( SfxUInt32Item( nWhich, static_cast< UINT32 >(
+ rSet.Put( SfxUInt32Item( nWhich, static_cast< sal_uInt32 >(
( (SwGammaGrf&)aCoreSet.Get( RES_GRFATR_GAMMA ) ).GetValue() * 100 ) ) );
break;
case SID_ATTR_GRAF_TRANSPARENCE:
@@ -628,7 +628,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{
if( pGrfObj->IsAnimated() ||
GRAPHIC_GDIMETAFILE == pGrfObj->GetType() )
- bDisable = TRUE;
+ bDisable = sal_True;
else
rSet.Put( SfxUInt16Item( nWhich, ((SwTransparencyGrf&)
aCoreSet.Get(RES_GRFATR_TRANSPARENCY)).GetValue() ));
@@ -661,18 +661,18 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
case SID_GRFFILTER_SOLARIZE:
{
if( bParentCntProt || !bIsGrfCntnt )
- bDisable = TRUE;
+ bDisable = sal_True;
// #i59688# load graphic only if type is unknown
else
{
- const USHORT eGraphicType( rSh.GetGraphicType() );
+ const sal_uInt16 eGraphicType( rSh.GetGraphicType() );
if ( ( eGraphicType == GRAPHIC_NONE ||
eGraphicType == GRAPHIC_DEFAULT ) &&
- rSh.IsGrfSwapOut( TRUE ) )
+ rSh.IsGrfSwapOut( sal_True ) )
{
rSet.DisableItem( nWhich );
if( AddGrfUpdateSlot( nWhich ))
- rSh.GetGraphic(FALSE); // start the loading
+ rSh.GetGraphic(sal_False); // start the loading
}
else
{
@@ -684,7 +684,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
break;
default:
- bDisable = FALSE;
+ bDisable = sal_False;
}
if( bDisable )
diff --git a/sw/source/ui/shells/grfshex.cxx b/sw/source/ui/shells/grfshex.cxx
index 4be17b7fa1..2273153881 100644
--- a/sw/source/ui/shells/grfshex.cxx
+++ b/sw/source/ui/shells/grfshex.cxx
@@ -65,7 +65,6 @@
// -> #111827#
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <comcore.hrc>
// <- #111827#
diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx
index aba8f7f037..fec296968e 100644..100755
--- a/sw/source/ui/shells/langhelper.cxx
+++ b/sw/source/ui/shells/langhelper.cxx
@@ -71,14 +71,14 @@ using namespace ::com::sun::star;
namespace SwLangHelper
{
- USHORT GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet )
+ sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet )
{
ESelection aSelection = pOLV->GetSelection();
EditView& rEditView=pOLV->GetEditView();
EditEngine* pEditEngine=rEditView.GetEditEngine();
// the value of used script types
- const USHORT nScriptType =pOLV->GetSelectedScriptType();
+ const sal_uInt16 nScriptType =pOLV->GetSelectedScriptType();
String aScriptTypesInUse( String::CreateFromInt32( nScriptType ) );//pEditEngine->GetScriptType(aSelection)
SvtLanguageTable aLangTable;
@@ -189,7 +189,7 @@ namespace SwLangHelper
if (!bForSelection) // document language to be changed...
{
rSh.StartAction();
- rSh.LockView( TRUE );
+ rSh.LockView( sal_True );
rSh.Push();
// prepare to apply new language to all text in document
@@ -209,7 +209,7 @@ namespace SwLangHelper
if (bForSelection)
{
const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions();
- ULONG nCntrl = pEditEngine->GetControlWord();
+ sal_uLong nCntrl = pEditEngine->GetControlWord();
// turn off
if (!pVOpt->IsOnlineSpell())
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
@@ -231,8 +231,8 @@ namespace SwLangHelper
if (!bForSelection)
{
// need to release view and restore selection...
- rSh.Pop( FALSE );
- rSh.LockView( FALSE );
+ rSh.Pop( sal_False );
+ rSh.LockView( sal_False );
rSh.EndAction();
}
}
@@ -256,13 +256,13 @@ namespace SwLangHelper
const LanguageType nLang = SvtLanguageTable().GetType( rLangText );
if (nLang != LANGUAGE_DONTKNOW)
{
- USHORT nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
EditEngine* pEditEngine = pOLV ? pOLV->GetEditView().GetEditEngine() : NULL;
OSL_ENSURE( !pOLV || pEditEngine, "OutlinerView without EditEngine???" );
//get ScriptType
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -322,11 +322,9 @@ namespace SwLangHelper
rCharFmt.ResetFmtAttr(nLangWhichId);
}
- // set respective language attribute in text document to default
+ // #i102191: hard set respective language attribute in text document
// (for all text in the document - which should be selected by now...)
- SvUShortsSort aAttribs;
- aAttribs.Insert( nLangWhichId );
- rWrtSh.ResetAttr( &aAttribs );
+ rWrtSh.SetAttr( SvxLanguageItem( nLang, nLangWhichId ) );
}
}
}
@@ -340,7 +338,7 @@ namespace SwLangHelper
void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet )
{
// EditEngine IDs
- const USHORT aLangWhichId_EE[3] =
+ const sal_uInt16 aLangWhichId_EE[3] =
{
EE_CHAR_LANGUAGE,
EE_CHAR_LANGUAGE_CJK,
@@ -348,7 +346,7 @@ namespace SwLangHelper
};
// Writewr IDs
- const USHORT aLangWhichId_Writer[3] =
+ const sal_uInt16 aLangWhichId_Writer[3] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -430,7 +428,7 @@ namespace SwLangHelper
/// If there are more than one languages used LANGUAGE_DONTKNOW will be returned.
/// @param nLangWhichId : one of
/// RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,
- LanguageType GetLanguage( SwWrtShell &rSh, USHORT nLangWhichId )
+ LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId )
{
SfxItemSet aSet( rSh.GetAttrPool(), nLangWhichId, nLangWhichId );
rSh.GetCurAttr( aSet );
@@ -438,13 +436,13 @@ namespace SwLangHelper
return GetLanguage(aSet,nLangWhichId);
}
- LanguageType GetLanguage( SfxItemSet aSet, USHORT nLangWhichId )
+ LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId )
{
LanguageType nLang = LANGUAGE_SYSTEM;
const SfxPoolItem *pItem = 0;
- SfxItemState nState = aSet.GetItemState( nLangWhichId, TRUE, &pItem );
+ SfxItemState nState = aSet.GetItemState( nLangWhichId, sal_True, &pItem );
if (nState > SFX_ITEM_DEFAULT && pItem)
{
// the item is set and can be used
@@ -472,10 +470,10 @@ namespace SwLangHelper
LanguageType GetCurrentLanguage( SwWrtShell &rSh )
{
// get all script types used in current selection
- const USHORT nScriptType = rSh.GetScriptType();
+ const sal_uInt16 nScriptType = rSh.GetScriptType();
//set language attribute to use according to the script type
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -494,7 +492,7 @@ namespace SwLangHelper
// check if all script types are set to LANGUAGE_NONE and return
// that if this is the case. Otherwise, having multiple script types
// in use always means there are several languages in use...
- const USHORT aScriptTypes[3] =
+ const sal_uInt16 aScriptTypes[3] =
{
RES_CHRATR_LANGUAGE,
RES_CHRATR_CJK_LANGUAGE,
@@ -520,10 +518,10 @@ namespace SwLangHelper
/// 'In use' means the language(s) matching the script type(s) of the
/// selected text. Or in other words, the language a spell checker would use.
/// If there is more than one language LANGUAGE_DONTKNOW will be returned.
- LanguageType GetCurrentLanguage( SfxItemSet aSet, USHORT nScriptType )
+ LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType )
{
//set language attribute to use according to the script type
- USHORT nLangWhichId = 0;
+ sal_uInt16 nLangWhichId = 0;
bool bIsSingleScriptType = true;
switch (nScriptType)
{
@@ -542,7 +540,7 @@ namespace SwLangHelper
// check if all script types are set to LANGUAGE_NONE and return
// that if this is the case. Otherwise, having multiple script types
// in use always means there are several languages in use...
- const USHORT aScriptTypes[3] =
+ const sal_uInt16 aScriptTypes[3] =
{
EE_CHAR_LANGUAGE,
EE_CHAR_LANGUAGE_CJK,
diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx
index abf89407e4..e9d341ac69 100644
--- a/sw/source/ui/shells/listsh.cxx
+++ b/sw/source/ui/shells/listsh.cxx
@@ -84,7 +84,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp )
if ( nActPos < USHRT_MAX && rSh.IsOutlineMovable( nActPos ) )
{
rSh.Push();
- rSh.MakeOutlineSel( nActPos, nActPos, TRUE );
+ rSh.MakeOutlineSel( nActPos, nActPos, sal_True );
if ( bMove )
{
@@ -148,7 +148,7 @@ void lcl_OutlineUpDownWithSubPoints( SwWrtShell& rSh, bool bMove, bool bUp )
void SwListShell::Execute(SfxRequest &rReq)
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
SwWrtShell& rSh = GetShell();
// #i35572#
@@ -165,8 +165,8 @@ void SwListShell::Execute(SfxRequest &rReq)
rReq.Done();
rSh.NumUpDown( ( nSlot == FN_NUM_BULLET_DOWN )
- ? TRUE
- : FALSE );
+ ? sal_True
+ : sal_False );
pFrame->GetBindings().Invalidate( SID_TABLE_CELL ); // StatusZeile updaten!
}
break;
@@ -185,7 +185,7 @@ void SwListShell::Execute(SfxRequest &rReq)
{
rReq.Ignore();
SfxRequest aReq( GetView().GetViewFrame(), FN_NUM_BULLET_ON );
- aReq.AppendItem( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aReq.AppendItem( SfxBoolItem( FN_PARAM_1, sal_False ) );
aReq.Done();
rSh.DelNumRules();
break;
@@ -195,7 +195,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, false, false );
else
- rSh.MoveNumParas(FALSE, FALSE);
+ rSh.MoveNumParas(sal_False, sal_False);
rReq.Done();
break;
@@ -203,7 +203,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, true, false );
else
- rSh.MoveNumParas(TRUE, FALSE);
+ rSh.MoveNumParas(sal_True, sal_False);
rReq.Done();
break;
@@ -211,7 +211,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, true, true );
else
- rSh.MoveNumParas(TRUE, TRUE);
+ rSh.MoveNumParas(sal_True, sal_True);
rReq.Done();
break;
@@ -219,7 +219,7 @@ void SwListShell::Execute(SfxRequest &rReq)
if ( bOutline )
lcl_OutlineUpDownWithSubPoints( rSh, false, true );
else
- rSh.MoveNumParas(FALSE, TRUE);
+ rSh.MoveNumParas(sal_False, sal_True);
rReq.Done();
break;
@@ -230,8 +230,8 @@ void SwListShell::Execute(SfxRequest &rReq)
case FN_NUM_OR_NONUM:
{
- BOOL bApi = rReq.IsAPI();
- BOOL bDelete = !rSh.IsNoNum(!bApi);
+ sal_Bool bApi = rReq.IsAPI();
+ sal_Bool bDelete = !rSh.IsNoNum(!bApi);
if(pArgs )
bDelete = ((SfxBoolItem &)pArgs->Get(rReq.GetSlot())).GetValue();
rSh.NumOrNoNum( bDelete, !bApi );
@@ -249,15 +249,15 @@ void SwListShell::Execute(SfxRequest &rReq)
void SwListShell::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SwWrtShell& rSh = GetShell();
- BYTE nCurrentNumLevel = rSh.GetNumLevel();
+ sal_uInt8 nCurrentNumLevel = rSh.GetNumLevel();
while ( nWhich )
{
switch( nWhich )
{
case FN_NUM_OR_NONUM:
- rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(FALSE)));
+ rSet.Put(SfxBoolItem(nWhich, GetShell().IsNoNum(sal_False)));
break;
case FN_NUM_BULLET_OUTLINE_UP:
case FN_NUM_BULLET_UP:
diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk
deleted file mode 100644
index 26990e7891..0000000000
--- a/sw/source/ui/shells/makefile.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=shells
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- shells.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/annotsh.obj \
- $(SLO)$/basesh.obj \
- $(SLO)$/beziersh.obj \
- $(SLO)$/drawdlg.obj \
- $(SLO)$/drawsh.obj \
- $(SLO)$/drformsh.obj \
- $(SLO)$/drwbassh.obj \
- $(SLO)$/drwtxtex.obj \
- $(SLO)$/drwtxtsh.obj \
- $(SLO)$/frmsh.obj \
- $(SLO)$/grfsh.obj \
- $(SLO)$/grfshex.obj \
- $(SLO)$/langhelper.obj \
- $(SLO)$/listsh.obj \
- $(SLO)$/navsh.obj \
- $(SLO)$/mediash.obj \
- $(SLO)$/olesh.obj \
- $(SLO)$/slotadd.obj \
- $(SLO)$/tabsh.obj \
- $(SLO)$/textdrw.obj \
- $(SLO)$/textfld.obj \
- $(SLO)$/textglos.obj \
- $(SLO)$/textidx.obj \
- $(SLO)$/textsh.obj \
- $(SLO)$/textsh1.obj \
- $(SLO)$/textsh2.obj \
- $(SLO)$/txtattr.obj \
- $(SLO)$/txtcrsr.obj \
- $(SLO)$/txtnum.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(SRS)$/shells.srs: $(SOLARINCDIR)$/svx$/globlmn.hrc
-
diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx
index c086fae370..897300ed18 100644
--- a/sw/source/ui/shells/mediash.cxx
+++ b/sw/source/ui/shells/mediash.cxx
@@ -95,10 +95,10 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
if( pSdrView )
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged( FALSE );
+ pSdrView->GetModel()->SetChanged( sal_False );
switch( nSlotId )
{
@@ -123,7 +123,7 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
{
const SfxPoolItem* pItem;
- if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) )
+ if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, sal_False, &pItem ) ) )
pItem = NULL;
if( pItem )
@@ -154,14 +154,14 @@ void SwMediaShell::ExecMedia(SfxRequest &rReq)
if( pSdrView->GetModel()->IsChanged() )
GetShell().SetModified();
else if( bChanged )
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
}
void SwMediaShell::GetMediaState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
diff --git a/sw/source/ui/shells/navsh.cxx b/sw/source/ui/shells/navsh.cxx
index 055f8165bc..7c0c338149 100644
--- a/sw/source/ui/shells/navsh.cxx
+++ b/sw/source/ui/shells/navsh.cxx
@@ -33,7 +33,7 @@
#include "cmdid.h"
#include <svx/svdview.hxx>
-#include <svx/srchitem.hxx>
+#include <svl/srchitem.hxx>
#include <svl/eitem.hxx>
#include <svl/whiter.hxx>
#include <svx/svdopath.hxx>
@@ -77,13 +77,13 @@ void SwNavigationShell::Execute(SfxRequest &rReq)
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
const SfxItemSet *pArgs = rReq.GetArgs();
- USHORT nSlotId = rReq.GetSlot();
- BOOL bChanged = pSdrView->GetModel()->IsChanged();
- pSdrView->GetModel()->SetChanged(FALSE);
+ sal_uInt16 nSlotId = rReq.GetSlot();
+ sal_Bool bChanged = pSdrView->GetModel()->IsChanged();
+ pSdrView->GetModel()->SetChanged(sal_False);
SwNavigationMgr& aSwNavigationMgr = pSh->GetNavigationMgr();
const SfxPoolItem* pItem;
if(pArgs)
- pArgs->GetItemState(nSlotId, FALSE, &pItem);
+ pArgs->GetItemState(nSlotId, sal_False, &pItem);
switch (nSlotId)
{
case FN_NAVIGATION_BACK:
@@ -99,7 +99,7 @@ void SwNavigationShell::Execute(SfxRequest &rReq)
if (pSdrView->GetModel()->IsChanged())
GetShell().SetModified();
else if (bChanged)
- pSdrView->GetModel()->SetChanged(TRUE);
+ pSdrView->GetModel()->SetChanged(sal_True);
}
/*--------------------------------------------------------------------
@@ -111,7 +111,7 @@ void SwNavigationShell::GetState(SfxItemSet &rSet)
{
SwWrtShell *pSh = &GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SwNavigationMgr& aNavigationMgr = pSh->GetNavigationMgr();
while( nWhich )
{
diff --git a/sw/source/ui/shells/shells.src b/sw/source/ui/shells/shells.src
index 9b95ae9853..bf2343c406 100644
--- a/sw/source/ui/shells/shells.src
+++ b/sw/source/ui/shells/shells.src
@@ -155,880 +155,46 @@ String RID_TEXT_TOOLBOX
Text [ en-US ] = "Text Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_TEXT_TOOLBOX
-{
- HelpID = HID_TEXT_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- HideWhenDeactivate = TRUE ;
- LineSpacing = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FONT
- MN_TEXT1(TRUE)
- MN_TEXT1_BLOCK
- MN_TEXT_LTR_RTL
- MN_TEXT_LINESPACE
- MN_TEXT2
- MN_TEXT_BACKGROUND
- MN_TEXT_DIALOGS(TRUE)
- };
- Scroll = TRUE ;
-};
String RID_TABLE_TOOLBOX
{
Text [ en-US ] = "Table Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_TABLE_TOOLBOX
-{
- HelpID = HID_TABLE_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- Scroll = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FONT
- ToolBoxItem
- {
- Identifier = FN_TABLE_AUTOSUM ;
- HelpID = FN_TABLE_AUTOSUM ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_MODE_FIX ;
- HelpID = FN_TABLE_MODE_FIX ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_MODE_FIX_PROP ;
- HelpID = FN_TABLE_MODE_FIX_PROP ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_MODE_VARIABLE ;
- HelpID = FN_TABLE_MODE_VARIABLE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_MERGE_CELLS ;
- HelpID = FN_TABLE_MERGE_CELLS ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_SPLIT_CELLS ;
- HelpID = FN_TABLE_SPLIT_CELLS ;
- };
- ToolBoxItem
- {
- DropDown = TRUE ;
- Identifier = FN_OPTIMIZE_TABLE ;
- HelpID = FN_OPTIMIZE_TABLE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_INSERT_ROW ;
- HelpID = FN_TABLE_INSERT_ROW ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_INSERT_COL ;
- HelpID = FN_TABLE_INSERT_COL ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_DELETE_ROW ;
- HelpID = FN_TABLE_DELETE_ROW ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_DELETE_COL ;
- HelpID = FN_TABLE_DELETE_COL ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_SELECT_ALL;
- HelpID = FN_TABLE_SELECT_ALL;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_SELECT_COL;
- HelpID = FN_TABLE_SELECT_COL;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_SELECT_ROW;
- HelpID = FN_TABLE_SELECT_ROW;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_VERT_NONE;
- HelpID = FN_TABLE_VERT_NONE;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_VERT_CENTER;
- HelpID = FN_TABLE_VERT_CENTER;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_TABLE_VERT_BOTTOM;
- HelpID = FN_TABLE_VERT_BOTTOM;
- RadioCheck = TRUE;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_BORDER
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_FRAME_LINESTYLE
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_FRAME_LINECOLOR
- Hide = TRUE;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_BACKGROUND_COLOR
- };
- };
-};
String RID_FRAME_TOOLBOX
{
Text [ en-US ] = "Frame Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_FRAME_TOOLBOX
-{
- HelpID = HID_FRAME_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- MenuStrings = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FRAME_WRAP
- MN_FRAME1
- MN_FRAME2
- MN_FRAME3
- MN_LINESTYLE
- MN_BACKGROUND_COLOR
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_ATTRIBUTES_FRAME
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_LAYER
- ToolBoxItem
- {
- Identifier = FN_TOOL_ANKER ;
- HelpID = FN_TOOL_ANKER ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_CHAIN ;
- HelpID = FN_FRAME_CHAIN ;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_UNCHAIN ;
- HelpID = FN_FRAME_UNCHAIN ;
- };
- };
- Scroll = TRUE ;
-};
String RID_GRAFIK_TOOLBOX
{
Text [ en-US ] = "Graphics Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_GRAFIK_TOOLBOX
-{
- HelpID = HID_GRAFIK_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- MenuStrings = TRUE ;
- Customize = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_GRFFILTER;
- HelpID = SID_GRFFILTER;
- DropDown = TRUE ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_MODE;
- HelpID = SID_ATTR_GRAF_MODE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_RED;
- HelpID = SID_ATTR_GRAF_RED;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GREEN;
- HelpID = SID_ATTR_GRAF_GREEN;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_BLUE;
- HelpID = SID_ATTR_GRAF_BLUE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_LUMINANCE;
- HelpID = SID_ATTR_GRAF_LUMINANCE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_CONTRAST;
- HelpID = SID_ATTR_GRAF_CONTRAST;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GAMMA;
- HelpID = SID_ATTR_GRAF_GAMMA;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_TRANSPARENCE;
- HelpID = SID_ATTR_GRAF_TRANSPARENCE;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- ToolBoxItem
- {
- Identifier = FN_FLIP_VERT_GRAFIC ;
- HelpID = FN_FLIP_VERT_GRAFIC ;
- };
- ToolBoxItem
- {
- Identifier = FN_FLIP_HORZ_GRAFIC ;
- HelpID = FN_FLIP_HORZ_GRAFIC ;
- };
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_ATTRIBUTES_GRAFIK
- };
- Scroll = TRUE ;
-};
String RID_OLE_TOOLBOX
{
Text [ en-US ] = "Object" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_OLE_TOOLBOX
-{
- HelpID = HID_OLE_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- Scroll = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FRAME_WRAP
- MN_CONTOUR
- MN_FRAME1
- MN_FRAME2
- MN_FRAME3
- MN_LINESTYLE
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_ATTRIBUTES_OLE
- ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
- MN_LAYER
- ToolBoxItem
- {
- Identifier = FN_TOOL_ANKER ;
- HelpID = FN_TOOL_ANKER ;
- DropDown = TRUE ;
- };
- };
-};
String RID_DRAW_TOOLBOX
{
Text [ en-US ] = "Draw Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_DRAW_TOOLBOX
-{
- HelpID = HID_DRAW_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_BEZIER_EDIT ;
- HelpID = SID_BEZIER_EDIT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_LINE ;
- HelpID = SID_ATTRIBUTES_LINE ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_LINEEND_STYLE
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_LINE_STYLE
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_LINE_WIDTH
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_LINE_COLOR
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_AREA ;
- HelpID = SID_ATTRIBUTES_AREA ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_FILL_STYLE
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_OBJECT_ROTATE
- };
- ToolBoxItem
- {
- Identifier = FN_TOOL_ANKER ;
- HelpID = FN_TOOL_ANKER ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_NOWRAP ;
- HelpID = FN_FRAME_NOWRAP ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP ;
- HelpID = FN_FRAME_WRAP ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP_IDEAL ;
- HelpID = FN_FRAME_WRAP_IDEAL ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP_LEFT ;
- HelpID = FN_FRAME_WRAP_LEFT ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP_RIGHT ;
- HelpID = FN_FRAME_WRAP_RIGHT ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAPTHRU ;
- HelpID = FN_FRAME_WRAPTHRU ;
- RadioCheck = TRUE ;
- Hide = TRUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_FRAME_WRAP_CONTOUR ;
- HelpID = FN_FRAME_WRAP_CONTOUR ;
- Hide = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HEAVEN ;
- HelpID = SID_OBJECT_HEAVEN ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_HELL ;
- HelpID = SID_OBJECT_HELL ;
- };
- MN_LAYER
- MN_GRID( HIDE=TRUE )
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_OBJECT_ALIGN ;
- HelpID = SID_OBJECT_ALIGN ;
- DropDown = TRUE ;
- };
- };
- Scroll = TRUE ;
-};
String RID_BEZIER_TOOLBOX
{
Text [ en-US ] = "Bézier Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_BEZIER_TOOLBOX
-{
- HelpID = HID_BEZIER_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_BEZIER_EDIT ;
- HelpID = SID_BEZIER_EDIT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_MOVE ;
- HelpID = SID_BEZIER_MOVE ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_INSERT ;
- HelpID = SID_BEZIER_INSERT ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_DELETE ;
- HelpID = SID_BEZIER_DELETE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_CUTLINE ;
- HelpID = SID_BEZIER_CUTLINE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_CONVERT ;
- HelpID = SID_BEZIER_CONVERT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_EDGE ;
- HelpID = SID_BEZIER_EDGE ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_SMOOTH ;
- HelpID = SID_BEZIER_SMOOTH ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_SYMMTR ;
- HelpID = SID_BEZIER_SYMMTR ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_CLOSE ;
- HelpID = SID_BEZIER_CLOSE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_ELIMINATE_POINTS ;
- HelpID = SID_BEZIER_ELIMINATE_POINTS ;
- };
- };
- Scroll = TRUE ;
-};
String RID_DRAW_TEXT_TOOLBOX
{
Text [ en-US ] = "Text Object Bar/Graphics" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_DRAW_TEXT_TOOLBOX
-{
- HelpID = HID_DRAW_TEXT_TOOLBOX ;
- Border = TRUE ;
- Customize = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- MN_FONT
- MN_TEXT1(FALSE)
- MN_TEXT1_BLOCK
- MN_TEXT_LINESPACE
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_CHAR_COLOR
- Hide = TRUE;
- };
- MN_TEXT_LTR_RTL
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
-
- MN_TEXT_DIALOGS(FALSE)
- };
- ItemList[ ar ] =
- {
- MN_FONT
- MN_TEXT1_RTL(FALSE)
- MN_TEXT1_BLOCK
- MN_TEXT_LINESPACE
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_CHAR_COLOR
- Hide = TRUE;
- };
- MN_TEXT_RTL_LTR
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
-
- MN_TEXT_DIALOGS(FALSE)
- };
- ItemList[ he ] =
- {
- MN_FONT
- MN_TEXT1_RTL(FALSE)
- MN_TEXT1_BLOCK
- MN_TEXT_LINESPACE
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- ITEM_TOOLBAR_ATTR_CHAR_COLOR
- Hide = TRUE;
- };
- MN_TEXT_RTL_LTR
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ;
- };
-
- MN_TEXT_DIALOGS(FALSE)
- };
- Scroll = TRUE ;
-};
String RID_NUM_TOOLBOX
{
Text [ en-US ] = "Numbering Object Bar" ;
Text [ x-comment ] = " ";
};
-ToolBox RID_NUM_TOOLBOX
-{
- HelpID = HID_NUM_TOOLBOX ;
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- LineSpacing = TRUE ;
- HideWhenDeactivate = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- MN_TEMPLATE
- MN_FONT
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OFF ;
- HelpID = FN_NUM_BULLET_OFF ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_UP ;
- HelpID = FN_NUM_BULLET_UP ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_DOWN ;
- HelpID = FN_NUM_BULLET_DOWN ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OUTLINE_UP ;
- HelpID = FN_NUM_BULLET_OUTLINE_UP ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OUTLINE_DOWN ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_NONUM ;
- HelpID = FN_NUM_BULLET_NONUM ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_MOVEUP ;
- HelpID = FN_NUM_BULLET_MOVEUP ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_MOVEDOWN ;
- HelpID = FN_NUM_BULLET_MOVEDOWN ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OUTLINE_MOVEUP ;
- HelpID = FN_NUM_BULLET_OUTLINE_MOVEUP ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUM_BULLET_OUTLINE_MOVEDOWN ;
- HelpID = FN_NUM_BULLET_OUTLINE_MOVEDOWN ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUMBER_NEWSTART ;
- HelpID = FN_NUMBER_NEWSTART ;
- };
- ToolBoxItem
- {
- Identifier = FN_NUMBER_BULLETS ;
- HelpID = FN_NUMBER_BULLETS ;
- };
- };
- Scroll = TRUE ;
-};
String STR_SHELLNAME_TEXT
{
Text [ en-US ] = "Text" ;
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 1012ad3fcf..fc5f138c6a 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -119,7 +119,7 @@ SFX_IMPL_INTERFACE(SwTableShell, SwBaseShell, SW_RES(STR_SHELLNAME_TABLE))
TYPEINIT1(SwTableShell,SwBaseShell)
-const USHORT aUITableAttrRange[] =
+const sal_uInt16 aUITableAttrRange[] =
{
FN_PARAM_TABLE_NAME, FN_PARAM_TABLE_NAME,
FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE,
@@ -146,7 +146,7 @@ const USHORT aUITableAttrRange[] =
0
};
-const USHORT* SwuiGetUITableAttrRange()
+const sal_uInt16* SwuiGetUITableAttrRange()
{
return aUITableAttrRange;
}
@@ -174,7 +174,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
SvxULSpaceItem aULSpace( pFmt->GetULSpace() );
rSet.Put( aULSpace );
- USHORT nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
+ sal_uInt16 nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
rSet.Put(SwBackgroundDestinationItem(SID_BACKGRND_DESTINATION, nBackgroundDestination ));
SvxBrushItem aBrush( RES_BACKGROUND );
if(rSh.GetRowBackground(aBrush))
@@ -189,12 +189,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
if(rSh.GetBoxDirection( aBoxDirection ))
rSet.Put(aBoxDirection, FN_TABLE_BOX_TEXTDIRECTION);
- BOOL bTableSel = rSh.IsTableMode();
+ sal_Bool bTableSel = rSh.IsTableMode();
if(!bTableSel)
{
rSh.StartAllAction();
rSh.Push();
- rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, FALSE );
+ rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_TABLE_SELECT_ALL, sal_False );
}
SvxBoxInfoItem aBoxInfo( SID_ATTR_BORDER_INNER );
@@ -203,7 +203,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
aBoxInfo.SetTable ((rSh.IsTableMode() && rSh.GetCrsrCnt() > 1) ||
!bTableSel);
// Abstandsfeld immer anzeigen
- aBoxInfo.SetDist ((BOOL) TRUE);
+ aBoxInfo.SetDist ((sal_Bool) sal_True);
// Minimalgroesse in Tabellen und Absaetzen setzen
aBoxInfo.SetMinDist( !bTableSel || rSh.IsTableMode() ||
rSh.GetSelectionType() &
@@ -228,7 +228,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
if(!bTableSel)
{
rSh.ClearMark();
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
rSh.EndAllAction();
}
@@ -241,12 +241,12 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
SwTableRep* pRep = new SwTableRep( aTabCols, rSh.IsTblComplex());
pRep->SetSpace(aCols.GetRightMax());
- USHORT nPercent = 0;
+ sal_uInt16 nPercent = 0;
long nWidth = ::GetTableWidth(pFmt, aCols, &nPercent, &rSh );
// Die Tabellenbreite ist fuer relative Angaben nicht korrekt
if(nPercent)
nWidth = pRep->GetSpace() * nPercent / 100;
- USHORT nAlign = pFmt->GetHoriOrient().GetHoriOrient();
+ sal_uInt16 nAlign = pFmt->GetHoriOrient().GetHoriOrient();
pRep->SetAlign(nAlign);
SvxLRSpaceItem aLRSpace( pFmt->GetLRSpace() );
SwTwips nLeft = aLRSpace.GetLeft();
@@ -291,24 +291,24 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
const SfxPoolItem* pItem = 0;
SwViewOption aUsrPref( *rSh.GetViewOptions() );
- USHORT nBackgroundDestination = aUsrPref.GetTblDest();
- if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, FALSE, &pItem))
+ sal_uInt16 nBackgroundDestination = aUsrPref.GetTblDest();
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_BACKGRND_DESTINATION, sal_False, &pItem))
{
nBackgroundDestination = ((SfxUInt16Item*)pItem)->GetValue();
- aUsrPref.SetTblDest((BYTE)nBackgroundDestination);
+ aUsrPref.SetTblDest((sal_uInt8)nBackgroundDestination);
SW_MOD()->ApplyUsrPref(aUsrPref, &rSh.GetView());
}
- BOOL bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
+ sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) ||
SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) );
pItem = 0;
- BOOL bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, FALSE, &pItem );
+ sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem );
const SfxPoolItem* pRowItem = 0, *pTableItem = 0;
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE, &pRowItem );
- bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE, &pTableItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_ROW, sal_False, &pRowItem );
+ bBackground |= SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BRUSH_TABLE, sal_False, &pTableItem );
const SfxPoolItem* pSplit = 0;
- BOOL bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, FALSE, &pSplit );
+ sal_Bool bRowSplit = SFX_ITEM_SET == rSet.GetItemState( RES_ROW_SPLIT, sal_False, &pSplit );
const SfxPoolItem* pBoxDirection = 0;
- BOOL bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, FALSE, &pBoxDirection );
+ sal_Bool bBoxDirection = SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_BOX_TEXTDIRECTION, sal_False, &pBoxDirection );
if( bBackground || bBorder || bRowSplit || bBoxDirection)
{
/*
@@ -317,7 +317,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
Der Hintergrund wird immer auf den aktuellen Zustand angewendet.
*/
- BOOL bTableSel = rSh.IsTableMode();
+ sal_Bool bTableSel = rSh.IsTableMode();
rSh.StartAllAction();
if(bBackground)
@@ -364,19 +364,19 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
{
rSh.ClearMark();
}
- rSh.Pop(FALSE);
+ rSh.Pop(sal_False);
}
rSh.EndAllAction();
}
SwTabCols aTabCols;
- BOOL bTabCols = FALSE;
- BOOL bSingleLine = FALSE;
+ sal_Bool bTabCols = sal_False;
+ sal_Bool bSingleLine = sal_False;
SwTableRep* pRep = 0;
SwFrmFmt *pFmt = rSh.GetTableFmt();
SfxItemSet aSet( rSh.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
- if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, FALSE, &pItem ))
+ if(SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_REP, sal_False, &pItem ))
{
pRep = (SwTableRep*)((const SwPtrItem*)pItem)->GetValue();
@@ -392,7 +392,7 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
SwFmtFrmSize aSz( ATT_VAR_SIZE, nWidth );
if(pRep->GetWidthPercent())
{
- aSz.SetWidthPercent( (BYTE)pRep->GetWidthPercent() );
+ aSz.SetWidthPercent( (sal_uInt8)pRep->GetWidthPercent() );
}
aSet.Put(aSz);
}
@@ -413,22 +413,22 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
if(pRep->HasColsChanged())
{
- bTabCols = TRUE;
+ bTabCols = sal_True;
}
}
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_HEADLINE, sal_False, &pItem))
rSh.SetRowsToRepeat( ((SfxUInt16Item*)pItem)->GetValue() );
- if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, FALSE, &pItem))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_TABLE_SET_VERT_ALIGN, sal_False, &pItem))
rSh.SetBoxAlign(((SfxUInt16Item*)(pItem))->GetValue());
- if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, sal_False, &pItem ))
rSh.SetTableName( *pFmt, ((const SfxStringItem*)pItem)->GetValue() );
// kopiere die ausgesuchten Attribute in den ItemSet
- static USHORT const aIds[] =
+ static sal_uInt16 aIds[] =
{
RES_PAGEDESC,
RES_BREAK,
@@ -442,8 +442,8 @@ void ItemSetToTableParam( const SfxItemSet& rSet,
// <-- collapsing borders
0
};
- for( const USHORT* pIds = aIds; *pIds; ++pIds )
- if( SFX_ITEM_SET == rSet.GetItemState( *pIds, FALSE, &pItem))
+ for( const sal_uInt16* pIds = aIds; *pIds; ++pIds )
+ if( SFX_ITEM_SET == rSet.GetItemState( *pIds, sal_False, &pItem))
aSet.Put( *pItem );
if( aSet.Count() )
@@ -476,17 +476,17 @@ static void lcl_TabGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLi
void SwTableShell::Execute(SfxRequest &rReq)
{
- BOOL bUseDialog = TRUE;
+ sal_Bool bUseDialog = sal_True;
const SfxItemSet* pArgs = rReq.GetArgs();
SwWrtShell &rSh = GetShell();
//Erstmal die Slots, die keinen FrmMgr benoetigen.
- BOOL bMore = FALSE;
+ sal_Bool bMore = sal_False;
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
- BOOL bCallDone = FALSE;
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
+ sal_Bool bCallDone = sal_False;
switch ( nSlot )
{
case SID_ATTR_BORDER:
@@ -505,29 +505,29 @@ void SwTableShell::Execute(SfxRequest &rReq)
const SvxBoxItem& rCoreBox = (const SvxBoxItem&)
aCoreSet.Get(RES_BOX);
const SfxPoolItem *pBoxItem = 0;
- if ( pArgs->GetItemState(RES_BOX, TRUE, &pBoxItem) == SFX_ITEM_SET )
+ if ( pArgs->GetItemState(RES_BOX, sal_True, &pBoxItem) == SFX_ITEM_SET )
{
aBox = *(SvxBoxItem*)pBoxItem;
if ( !rReq.IsAPI() )
- aBox.SetDistance( Max(rCoreBox.GetDistance(),USHORT(55)) );
+ aBox.SetDistance( Max(rCoreBox.GetDistance(),sal_uInt16(55)) );
else if ( aBox.GetDistance() < MIN_BORDER_DIST )
- aBox.SetDistance( Max(rCoreBox.GetDistance(),(USHORT)MIN_BORDER_DIST) );
+ aBox.SetDistance( Max(rCoreBox.GetDistance(),(sal_uInt16)MIN_BORDER_DIST) );
}
else
OSL_ENSURE( !this, "where is BoxItem?" );
//since the drawing layer also supports borders the which id might be a different one
SvxBoxInfoItem aInfo( SID_ATTR_BORDER_INNER );
- if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET)
+ if (pArgs->GetItemState(SID_ATTR_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET)
aInfo = *(SvxBoxInfoItem*)pBoxItem;
- else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, TRUE, &pBoxItem) == SFX_ITEM_SET )
+ else if( pArgs->GetItemState(SDRATTR_TABLE_BORDER_INNER, sal_True, &pBoxItem) == SFX_ITEM_SET )
{
aInfo = *(SvxBoxInfoItem*)pBoxItem;
aInfo.SetWhich(SID_ATTR_BORDER_INNER);
}
- aInfo.SetTable( TRUE );
- aInfo.SetValid( VALID_DISABLE, FALSE );
+ aInfo.SetTable( sal_True );
+ aInfo.SetValid( VALID_DISABLE, sal_False );
// Die Attribute aller Linien werden gelesen und das staerkste gewinnt
@@ -552,19 +552,19 @@ void SwTableShell::Execute(SfxRequest &rReq)
aBorderLine.SetOutWidth(DEF_LINE_WIDTH_0);
}
- BOOL bLine = FALSE;
+ sal_Bool bLine = sal_False;
if ( (pBorderLine = aBox.GetTop()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_TOP), bLine |= sal_True;
if ((pBorderLine = aBox.GetBottom()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_BOTTOM), bLine |= sal_True;
if ((pBorderLine = aBox.GetLeft()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_LEFT), bLine |= sal_True;
if ((pBorderLine = aBox.GetRight()) != NULL)
- aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= TRUE;
+ aBox.SetLine(&aBorderLine, BOX_LINE_RIGHT), bLine |= sal_True;
if ((pBorderLine = aInfo.GetHori()) != NULL)
- aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= TRUE;
+ aInfo.SetLine(&aBorderLine, BOXINFO_LINE_HORI), bLine |= sal_True;
if ((pBorderLine = aInfo.GetVert()) != NULL)
- aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= TRUE;
+ aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= sal_True;
aCoreSet.Put( aBox );
aCoreSet.Put( aInfo );
@@ -575,7 +575,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
// the SvxBoxItem
rReq.AppendItem( aBox );
rReq.AppendItem( aInfo );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
@@ -590,7 +590,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
SfxItemSet aCoreSet( GetPool(), aUITableAttrRange);
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SwTableRep* pTblRep = ::lcl_TableParamToItemSet( aCoreSet, rSh );
SfxAbstractTabDialog * pDlg = NULL;
if ( bUseDialog )
@@ -642,7 +642,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(pView)
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, pView));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
SfxItemSet aCoreSet( GetPool(),
SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_VALUE,
@@ -690,13 +690,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)
pNumberFormatItem)->GetDelArray();
- for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ )
+ for ( sal_uInt16 i = 0; i < ((SvxNumberInfoItem*)pNumberFormatItem)->GetDelCount(); i++ )
((SvxNumberInfoItem*)pNumberFormatItem)->
GetNumberFormatter()->DeleteEntry( pDelArr[i] );
}
if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState(
- SID_ATTR_NUMBERFORMAT_VALUE, FALSE, &pNumberFormatItem ))
+ SID_ATTR_NUMBERFORMAT_VALUE, sal_False, &pNumberFormatItem ))
{
SfxItemSet aBoxFormatSet( *aCoreSet.GetPool(),
RES_BOXATR_FORMAT, RES_BOXATR_FORMAT );
@@ -712,53 +712,53 @@ void SwTableShell::Execute(SfxRequest &rReq)
break;
case FN_CALC_TABLE:
rSh.UpdateTable();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_OPTIMAL_HEIGHT:
{
const SwFmtFrmSize aSz;
rSh.SetRowHeight( aSz );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_DELETE_COL:
if ( rSh.DeleteCol() && rSh.HasSelection() )
rSh.EnterStdMode();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_END_TABLE:
rSh.MoveTable( fnTableCurr, fnTableEnd );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_START_TABLE:
rSh.MoveTable( fnTableCurr, fnTableStart );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_GOTO_NEXT_CELL:
{
- BOOL bAppendLine = TRUE;
+ sal_Bool bAppendLine = sal_True;
if( pItem )
bAppendLine = ((SfxBoolItem*)pItem)->GetValue();
rReq.SetReturnValue( SfxBoolItem( nSlot,
rSh.GoNextCell( bAppendLine ) ) );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_GOTO_PREV_CELL:
rReq.SetReturnValue( SfxBoolItem( nSlot, rSh.GoPrevCell() ) );
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_DELETE_ROW:
if ( rSh.DeleteRow() && rSh.HasSelection() )
rSh.EnterStdMode();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_MERGE_CELLS:
if ( rSh.IsTableMode() )
switch ( rSh.MergeTab() )
{
case TBLMERGE_OK:
- bCallDone = TRUE;
+ bCallDone = sal_True;
//no break;
case TBLMERGE_NOSELECTION: break;
case TBLMERGE_TOOCOMPLEX:
@@ -774,7 +774,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_ADJUST_CELLS:
case FN_TABLE_BALANCE_CELLS:
{
- BOOL bBalance = (FN_TABLE_BALANCE_CELLS == nSlot);
+ sal_Bool bBalance = (FN_TABLE_BALANCE_CELLS == nSlot);
if ( rSh.IsAdjustCellWidthAllowed(bBalance) )
{
{
@@ -783,13 +783,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
}
rSh.AdjustCellWidth(bBalance);
}
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_BALANCE_ROWS:
- if ( rSh.BalanceRowHeight(TRUE) )
- rSh.BalanceRowHeight(FALSE);
- bCallDone = TRUE;
+ if ( rSh.BalanceRowHeight(sal_True) )
+ rSh.BalanceRowHeight(sal_False);
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_ALL:
rSh.EnterStdMode();
@@ -797,26 +797,26 @@ void SwTableShell::Execute(SfxRequest &rReq)
rSh.SttSelect();
rSh.MoveTable( fnTableCurr, fnTableEnd );
rSh.EndSelect();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_COL:
rSh.EnterStdMode();
rSh.SelectTableCol();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SELECT_ROW:
rSh.EnterStdMode();
rSh.SelectTableRow();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case FN_TABLE_SET_READ_ONLY_CELLS:
rSh.ProtectCells();
- rSh.ResetSelect( 0, FALSE );
- bCallDone = TRUE;
+ rSh.ResetSelect( 0, sal_False );
+ bCallDone = sal_True;
break;
case FN_TABLE_UNSET_READ_ONLY_CELLS:
rSh.UnProtectCells();
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
case SID_AUTOFORMAT:
{
@@ -848,13 +848,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_INSERT_COL:
case FN_TABLE_INSERT_ROW:
{
- BOOL bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
- USHORT nCount = 0;
- BOOL bAfter = TRUE;
+ sal_Bool bColumn = rReq.GetSlot() == FN_TABLE_INSERT_COL;
+ sal_uInt16 nCount = 0;
+ sal_Bool bAfter = sal_True;
if (pItem)
{
nCount = ((const SfxInt16Item* )pItem)->GetValue();
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_INSERT_AFTER, sal_True, &pItem))
bAfter = ((const SfxBoolItem* )pItem)->GetValue();
}
else if( !rReq.IsAPI() )
@@ -898,7 +898,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
}
// <--
- bCallDone = TRUE;
+ bCallDone = sal_True;
break;
}
@@ -908,15 +908,16 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_INSERT_COL_DLG:
case FN_TABLE_INSERT_ROW_DLG:
{
+ const SfxSlot* pSlot = GetStaticInterface()->GetSlot(nSlot);
if ( FN_TABLE_INSERT_ROW_DLG != nSlot || !rSh.IsInRepeatedHeadline())
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, nSlot) : 0);
+ ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( GetView().GetWindow(), nSlot == FN_TABLE_INSERT_COL_DLG, pSlot->GetCommand() ) : 0);
if( pDlg.get() && (pDlg->Execute() == 1) )
{
- USHORT nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW;
- SfxUInt16Item aCountItem( nDispatchSlot, static_cast< UINT16 >(pDlg->getInsertCount()) );
+ sal_uInt16 nDispatchSlot = (nSlot == FN_TABLE_INSERT_COL_DLG) ? FN_TABLE_INSERT_COL : FN_TABLE_INSERT_ROW;
+ SfxUInt16Item aCountItem( nDispatchSlot, static_cast< sal_uInt16 >(pDlg->getInsertCount()) );
SfxBoolItem aAfter( FN_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if( pVFrame )
@@ -928,8 +929,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_SPLIT_CELLS:
{
long nCount=0;
- BOOL bHorizontal=TRUE;
- BOOL bProportional = FALSE;
+ sal_Bool bHorizontal=sal_True;
+ sal_Bool bProportional = sal_False;
SFX_REQUEST_ARG( rReq, pSplit, SfxInt32Item, FN_TABLE_SPLIT_CELLS, sal_False );
SFX_REQUEST_ARG( rReq, pHor, SfxBoolItem, FN_PARAM_1, sal_False );
SFX_REQUEST_ARG( rReq, pProp, SfxBoolItem, FN_PARAM_2, sal_False );
@@ -963,8 +964,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ( nCount>1 )
{
- rSh.SplitTab(!bHorizontal, static_cast< USHORT >( nCount-1 ), bProportional );
- bCallDone = TRUE;
+ rSh.SplitTab(!bHorizontal, static_cast< sal_uInt16 >( nCount-1 ), bProportional );
+ bCallDone = sal_True;
}
else
rReq.Ignore();
@@ -1004,8 +1005,8 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_MERGE_TABLE:
{
- BOOL bPrev = rSh.CanMergeTable( TRUE );
- BOOL bNext = rSh.CanMergeTable( FALSE );
+ sal_Bool bPrev = rSh.CanMergeTable( sal_True );
+ sal_Bool bNext = rSh.CanMergeTable( sal_False );
if( bPrev && bNext )
{
@@ -1014,7 +1015,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
VclAbstractDialog* pDlg = pFact->CreateSwVclDialog( DLG_MERGE_TABLE, GetView().GetWindow(), bPrev );
OSL_ENSURE(pDlg, "dialogdiet pDlg fail!");
if( RET_OK != pDlg->Execute())
- bPrev = bNext = FALSE;
+ bPrev = bNext = sal_False;
delete pDlg;
}
@@ -1033,21 +1034,21 @@ void SwTableShell::Execute(SfxRequest &rReq)
: TBLVAR_CHGABS ) );
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
- static USHORT const aInva[] =
+ static sal_uInt16 aInva[] =
{ FN_TABLE_MODE_FIX,
FN_TABLE_MODE_FIX_PROP,
FN_TABLE_MODE_VARIABLE,
0
};
rBind.Invalidate( aInva );
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
case FN_TABLE_AUTOSUM:
{
SfxViewFrame* pVFrame = GetView().GetViewFrame();
pVFrame->GetDispatcher()->Execute(FN_EDIT_FORMULA, SFX_CALLMODE_SYNCHRON);
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SwInputChild* pChildWin = (SwInputChild*)pVFrame->
GetChildWindow( nId );
String sSum;
@@ -1079,7 +1080,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
return;
//break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if ( !bMore )
@@ -1089,7 +1090,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
return;
}
else
- bMore = FALSE;
+ bMore = sal_False;
//Jetzt die Slots, die direkt auf dem TableFmt arbeiten.
SwFrmFmt *pFmt = rSh.GetTableFmt();
switch ( nSlot )
@@ -1124,7 +1125,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
// der letzte case-Zweig der noch einen TabellenManager braucht!!
case FN_TABLE_SET_COL_WIDTH:
{
- SwTableFUNC aMgr( &rSh, FALSE);
+ SwTableFUNC aMgr( &rSh, sal_False);
aMgr.ColWidthDlg(GetView().GetWindow());
}
break;
@@ -1132,12 +1133,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_VERT_CENTER:
case FN_TABLE_VERT_BOTTOM:
{
- USHORT nAlign = nSlot == FN_TABLE_VERT_NONE ?
+ sal_uInt16 nAlign = nSlot == FN_TABLE_VERT_NONE ?
text::VertOrientation::NONE :
nSlot == FN_TABLE_VERT_CENTER ?
text::VertOrientation::CENTER : text::VertOrientation::BOTTOM;
rSh.SetBoxAlign(nAlign);
- bCallDone = TRUE;
+ bCallDone = sal_True;
}
break;
@@ -1171,7 +1172,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(pSplit)
pSplit->SetValue(!pSplit->GetValue());
else
- pSplit = new SwFmtRowSplit(TRUE);
+ pSplit = new SwFmtRowSplit(sal_True);
}
else
{
@@ -1198,7 +1199,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
// os #124829# crash report: in case of an invalid shell selection return immediately
if(!pFmt)
return;
- USHORT nSlot = aIter.FirstWhich();
+ sal_uInt16 nSlot = aIter.FirstWhich();
while ( nSlot )
{
switch ( nSlot )
@@ -1213,19 +1214,19 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_TABLE_BALANCE_CELLS:
- if ( !rSh.IsAdjustCellWidthAllowed(TRUE) )
+ if ( !rSh.IsAdjustCellWidthAllowed(sal_True) )
rSet.DisableItem(FN_TABLE_BALANCE_CELLS);
break;
case FN_TABLE_BALANCE_ROWS:
- if ( !rSh.BalanceRowHeight(TRUE) )
+ if ( !rSh.BalanceRowHeight(sal_True) )
rSet.DisableItem(FN_TABLE_BALANCE_ROWS);
break;
case FN_OPTIMIZE_TABLE:
if ( !rSh.IsTableMode() &&
!rSh.IsAdjustCellWidthAllowed() &&
- !rSh.IsAdjustCellWidthAllowed(TRUE) &&
- !rSh.BalanceRowHeight(TRUE) )
+ !rSh.IsAdjustCellWidthAllowed(sal_True) &&
+ !rSh.BalanceRowHeight(sal_True) )
rSet.DisableItem(FN_OPTIMIZE_TABLE);
break;
case SID_INSERT_DIAGRAM:
@@ -1271,8 +1272,8 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_VERT_CENTER:
case FN_TABLE_VERT_BOTTOM:
{
- USHORT nAlign = rSh.GetBoxAlign();
- BOOL bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
+ sal_uInt16 nAlign = rSh.GetBoxAlign();
+ sal_Bool bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
(nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) ||
(nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM);
rSet.Put(SfxBoolItem(nSlot, bSet));
@@ -1284,9 +1285,9 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_TABLE_MODE_VARIABLE :
{
TblChgMode nMode = rSh.GetTblChgMode();
- BOOL bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) ||
- (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) ||
- (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS);
+ sal_Bool bSet = (nSlot == FN_TABLE_MODE_FIX && nMode == TBLFIX_CHGABS) ||
+ (nSlot == FN_TABLE_MODE_FIX_PROP && nMode == TBLFIX_CHGPROP) ||
+ (nSlot == FN_TABLE_MODE_VARIABLE && nMode == TBLVAR_CHGABS);
rSet.Put(SfxBoolItem(nSlot, bSet));
}
break;
@@ -1306,8 +1307,8 @@ void SwTableShell::GetState(SfxItemSet &rSet)
break;
case FN_TABLE_MERGE_TABLE:
{
- BOOL bAsk;
- if( !rSh.CanMergeTable( TRUE, &bAsk ))
+ sal_Bool bAsk;
+ if( !rSh.CanMergeTable( sal_True, &bAsk ))
rSet.DisableItem( nSlot );
}
break;
@@ -1403,7 +1404,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
const SvxLineItem &rLineItem = (const SvxLineItem&)pArgs->
Get( SID_FRAME_LINESTYLE );
const SvxBorderLine* pBorderLine = rLineItem.GetLine();
- rSh.SetTabLineStyle( 0, TRUE, pBorderLine);
+ rSh.SetTabLineStyle( 0, sal_True, pBorderLine);
}
else
{
@@ -1444,15 +1445,15 @@ void SwTableShell::ExecNumberFormat(SfxRequest& rReq)
//Erstmal die Slots, die keinen FrmMgr benoetigen.
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
// Sprache immer von Cursorposition besorgen
LanguageType eLang = rSh.GetCurLang();
SvNumberFormatter* pFormatter = rSh.GetNumberFormatter();
sal_uInt32 nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
- USHORT nFmtType = 0, nOffset = 0;
+ sal_uInt16 nFmtType = 0, nOffset = 0;
switch ( nSlot )
{
diff --git a/sw/source/ui/shells/textdrw.cxx b/sw/source/ui/shells/textdrw.cxx
index 9aba16d9b3..16e47464ad 100644
--- a/sw/source/ui/shells/textdrw.cxx
+++ b/sw/source/ui/shells/textdrw.cxx
@@ -64,7 +64,7 @@ void SwBaseShell::InsertURLButton(const String& rURL, const String& rTarget, con
SdrView *pSdrView = rSh.GetDrawView();
// OBJ_FM_BUTTON
- pSdrView->SetDesignMode(TRUE);
+ pSdrView->SetDesignMode(sal_True);
pSdrView->SetCurrentObj(OBJ_FM_BUTTON);
pSdrView->SetEditMode(sal_False);
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 7143affb3e..3150d22447 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -83,11 +83,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;
@@ -107,17 +107,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)
{
@@ -135,7 +135,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();
@@ -165,7 +165,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 );
@@ -178,14 +178,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 ));
@@ -193,7 +193,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
default:
- bMore = TRUE;
+ bMore = sal_True;
}
if(bMore)
{
@@ -203,40 +203,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();
OSL_FAIL("Command is not yet used");
sal_Unicode cSeparator = ' ';
@@ -249,30 +249,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())
@@ -303,14 +303,14 @@ 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();
rReq.Ignore();
}
break;
- case FN_DELETE_NOTE:
+ case FN_DELETE_COMMENT:
if ( GetView().GetPostItMgr() &&
GetView().GetPostItMgr()->HasActiveSidebarWin() )
{
@@ -323,7 +323,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() );
}
@@ -341,7 +341,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() );
}
@@ -349,7 +349,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;
@@ -366,9 +366,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)
@@ -413,7 +413,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
sComment = pRedline->GetComment();
- BOOL bTravel = FALSE;
+ sal_Bool bTravel = sal_False;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
@@ -440,8 +440,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();
@@ -450,8 +450,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();
@@ -462,7 +462,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SvxAbstractDialogFactory* pFact2 = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact2, "Dialogdiet fail!");
- AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, TRUE );
+ AbstractSvxPostItDialog* pDlg = pFact2->CreateSvxPostItDialog( pMDI, aSet, bTravel, sal_True );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
pDlg->HideAuthor();
@@ -479,7 +479,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
}
rSh.SetCareWin(pDlg->GetWindow());
- bNoInterrupt = TRUE;
+ bNoInterrupt = sal_True;
if ( pDlg->Execute() == RET_OK )
{
@@ -492,7 +492,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
delete pDlg;
rSh.SetCareWin(NULL);
- bNoInterrupt = FALSE;
+ bNoInterrupt = sal_False;
rSh.ClearMark();
GetView().AttrChangedNotify(GetShellPtr());
}
@@ -502,8 +502,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 )
{
@@ -560,21 +560,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 :
@@ -612,14 +612,14 @@ 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)
{
switch (nWhich)
{
- case FN_DELETE_NOTE:
+ case FN_DELETE_COMMENT:
case FN_DELETE_NOTE_AUTHOR:
case FN_DELETE_ALL_NOTES:
case FN_HIDE_NOTE:
@@ -631,7 +631,7 @@ void SwTextShell::StateField( SfxItemSet &rSet )
rSet.InvalidateItem( nWhich );
else if ( !pPostItMgr->HasActiveSidebarWin() )
{
- rSet.InvalidateItem( FN_DELETE_NOTE );
+ rSet.InvalidateItem( FN_DELETE_COMMENT );
rSet.InvalidateItem( FN_HIDE_NOTE );
}
}
@@ -642,10 +642,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 ||
@@ -664,7 +664,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);
@@ -698,7 +698,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;
@@ -718,7 +718,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();
@@ -731,10 +731,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)
{
@@ -756,13 +756,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 );
@@ -795,18 +795,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();
@@ -847,18 +847,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();
diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx
index c61a750e84..1ebf00464e 100644
--- a/sw/source/ui/shells/textglos.cxx
+++ b/sw/source/ui/shells/textglos.cxx
@@ -47,28 +47,28 @@
// STATIC DATA -----------------------------------------------------------
void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
::GetGlossaries()->UpdateGlosPath(!rReq.IsAPI() ||
FN_GLOSSARY_DLG == nSlot );
SwGlossaryHdl* pGlosHdl = GetView().GetGlosHdl();
// SwGlossaryList updaten?
- BOOL bUpdateList = FALSE;
+ sal_Bool bUpdateList = sal_False;
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
switch( nSlot )
{
case FN_GLOSSARY_DLG:
pGlosHdl->GlossaryDlg();
- bUpdateList = TRUE;
+ bUpdateList = sal_True;
rReq.Ignore();
break;
case FN_EXPAND_GLOSSARY:
{
- BOOL bReturn;
+ sal_Bool bReturn;
bReturn = pGlosHdl->ExpandGlossary();
rReq.SetReturnValue( SfxBoolItem( nSlot, bReturn ) );
rReq.Done();
@@ -79,10 +79,10 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
String aName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem ))
aName = (( const SfxStringItem *)pItem)->GetValue();
String aShortName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem ))
aShortName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -90,12 +90,12 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
- pGlosHdl->SetCurGroup(aGroup, TRUE);
+ pGlosHdl->SetCurGroup(aGroup, sal_True);
//eingestellte Gruppe muss in NewGlossary ggf. erzeugt werden!
- pGlosHdl->NewGlossary( aName, aShortName, TRUE );
+ pGlosHdl->NewGlossary( aName, aShortName, sal_True );
rReq.Done();
}
- bUpdateList = TRUE;
+ bUpdateList = sal_True;
break;
case FN_SET_ACT_GLOSSARY:
if(pItem)
@@ -115,14 +115,14 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
{
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
String aName;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem ))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem ))
aName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
- pGlosHdl->SetCurGroup(aGroup, TRUE);
+ pGlosHdl->SetCurGroup(aGroup, sal_True);
rReq.SetReturnValue(SfxBoolItem(nSlot, pGlosHdl->InsertGlossary( aName )));
rReq.Done();
}
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 7f307e9f82..123059e4e1 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -57,9 +57,9 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
SfxViewFrame* pVFrame = GetView().GetViewFrame();
Window *pMDI = &pVFrame->GetWindow();
@@ -92,7 +92,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
case FN_EDIT_IDX_ENTRY_DLG:
{
SwTOXMgr aMgr(GetShellPtr());
- USHORT nRet = RET_OK;
+ sal_uInt16 nRet = RET_OK;
if(aMgr.GetTOXMarkCount() > 1)
{ // Mehrere Marken, welche solls denn sein ?
//
@@ -139,11 +139,11 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
// Hoehe=Breite fuer konsistentere Vorschau (analog zu Bereich bearbeiten)
aSet.Put(SvxSizeItem(SID_ATTR_PAGE_SIZE, Size(nWidth, nWidth)));
const SwTOXBase* pCurTOX = 0;
- BOOL bGlobal = FALSE;
+ sal_Bool bGlobal = sal_False;
if(pItem)
{
pCurTOX = (const SwTOXBase* )((SwPtrItem*)pItem)->GetValue();
- bGlobal = TRUE;
+ bGlobal = sal_True;
}
else
pCurTOX = rSh.GetCurTOX();
@@ -169,7 +169,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq)
const SwTOXBase* pBase = rSh.GetCurTOX();
OSL_ENSURE(pBase, "no TOXBase to remove");
if( pBase )
- rSh.DeleteTOX(*pBase, TRUE);
+ rSh.DeleteTOX(*pBase, sal_True);
}
break;
default:
@@ -187,7 +187,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
SfxChildWindow* pAuthMark = pVFrame->GetChildWindow(FN_INSERT_AUTH_ENTRY_DLG);
- const BOOL bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
+ const sal_Bool bHtmlMode = 0 != ::GetHtmlMode( GetView().GetDocShell() );
const SwTOXBase* pBase = 0;
if( bHtmlMode || 0 != ( pBase = rSh.GetCurTOX()) )
{
@@ -205,27 +205,27 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
if(!pIdxMrk)
rSet.DisableItem( FN_INSERT_IDX_ENTRY_DLG );
else
- rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, TRUE));
+ rSet.Put(SfxBoolItem(FN_INSERT_IDX_ENTRY_DLG, sal_True));
if(!pAuthMark)
rSet.DisableItem( FN_INSERT_AUTH_ENTRY_DLG );
else
- rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, TRUE));
+ rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, sal_True));
}
else
{
- BOOL bEnableEdit = TRUE;
- BOOL bInReadonly = rSh.HasReadonlySel();
+ sal_Bool bEnableEdit = sal_True;
+ sal_Bool bInReadonly = rSh.HasReadonlySel();
if( rSh.HasSelection() || bInReadonly)
- bEnableEdit = FALSE;
+ bEnableEdit = sal_False;
else
{
SwTOXMarks aArr;
rSh.GetCurTOXMarks( aArr );
if( !aArr.Count())
- bEnableEdit = FALSE;
+ bEnableEdit = sal_False;
}
if(!bEnableEdit)
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index d768df8166..93c297dd8d 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -115,7 +115,6 @@
#include <sfx2/msg.hxx>
#include <swslots.hxx>
#include <SwRewriter.hxx>
-#include <undobj.hxx>
#include <comcore.hrc>
using namespace ::com::sun::star;
@@ -151,9 +150,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(nSlot, FALSE, &pItem );
+ pArgs->GetItemState(nSlot, sal_False, &pItem );
switch( nSlot )
{
@@ -162,8 +161,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue());
break;
case FN_INSERT_SOFT_HYPHEN:
- if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, 0 ) &&
- CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( TRUE, -1 ))
+ if( CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, 0 ) &&
+ CHAR_SOFTHYPHEN != rSh.SwCrsrShell::GetChar( sal_True, -1 ))
rSh.Insert( String( CHAR_SOFTHYPHEN ) );
break;
@@ -258,14 +257,13 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
}
- rSh.InsertObject( xObj, 0, TRUE, nSlot);
+ rSh.InsertObject( xObj, 0, sal_True, nSlot);
}
}
}
break;
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
- case SID_INSERT_APPLET:
{
SFX_REQUEST_ARG( rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT, sal_False );
SvGlobalName *pName = NULL;
@@ -276,58 +274,23 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
pName = &aName;
}
- SFX_REQUEST_ARG( rReq, pClassItem, SfxStringItem, FN_PARAM_1, sal_False );
SFX_REQUEST_ARG( rReq, pClassLocationItem, SfxStringItem, FN_PARAM_2, sal_False );
SFX_REQUEST_ARG( rReq, pCommandsItem, SfxStringItem, FN_PARAM_3, sal_False );
//TODO/LATER: recording currently not working, need code for Commandlist
svt::EmbeddedObjectRef xObj;
- if((SID_INSERT_APPLET == nSlot || SID_INSERT_PLUGIN)
- && (pClassItem || pClassLocationItem || pCommandsItem))
+ if( nSlot == SID_INSERT_PLUGIN && ( pClassLocationItem || pCommandsItem ) )
{
- String sClass;
String sClassLocation;
- if(pClassItem)
- sClass = pClassItem->GetValue();
if(pClassLocationItem)
sClassLocation = pClassLocationItem->GetValue();
SvCommandList aCommandList;
if(pCommandsItem)
{
- USHORT nTemp;
+ sal_uInt16 nTemp;
aCommandList.AppendCommands( pCommandsItem->GetValue(), &nTemp );
}
- if(SID_INSERT_APPLET == nSlot)
- {
- SwApplet_Impl aApplImpl( rSh.GetAttrPool(),
- RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
- String sBaseURL;
- SfxMedium* pMedium = GetView().GetDocShell()->GetMedium();
- if(pMedium)
- sBaseURL = pMedium->GetURLObject().GetMainURL(INetURLObject::NO_DECODE);
-
- aApplImpl.CreateApplet(sClass, aEmptyStr, FALSE, sClassLocation, sBaseURL );
- aApplImpl.FinishApplet();
- xObj.Assign( aApplImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT );
- if( aCommandList.Count() )
- {
- uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
- if ( xSet.is() )
- {
- uno::Sequence < beans::PropertyValue > aSeq;
- aCommandList.FillSequence( aSeq );
- try
- {
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AppletCommands")), uno::makeAny( aSeq ) );
- }
- catch ( uno::Exception& )
- {
- }
- }
- }
- }
- else
{
comphelper::EmbeddedObjectContainer aCnt;
::rtl::OUString sName;
@@ -365,7 +328,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
else
{
OSL_ENSURE( !pNameItem || nSlot == SID_INSERT_OBJECT, "Superfluous argument!" );
- rSh.InsertObject( xObj, pName, TRUE, nSlot);
+ rSh.InsertObject( xObj, pName, sal_True, nSlot);
rReq.Done();
}
break;
@@ -433,7 +396,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- rSh.InsertObject( xObj, 0, TRUE, nSlot);
+ rSh.InsertObject( xObj, 0, sal_True, nSlot);
rReq.Done();
}
}
@@ -467,7 +430,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
else
bFillWithData = sal_False; // will create chart with only it's default image
- SwTableFUNC( &rSh, FALSE ).InsertChart( xDataProvider, bFillWithData, aRangeString );
+ SwTableFUNC( &rSh, sal_False ).InsertChart( xDataProvider, bFillWithData, aRangeString );
rSh.LaunchOLEObj();
svt::EmbeddedObjectRef& xObj = rSh.GetOLEObject();
@@ -495,7 +458,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
// the suggestion has to be removed before
GetView().GetEditWin().StopQuickHelp();
SvGlobalName aGlobalName( SO3_SM_CLASSID );
- rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, TRUE, 0 );
+ rSh.InsertObject( svt::EmbeddedObjectRef(), &aGlobalName, sal_True, 0 );
}
break;
@@ -506,14 +469,14 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_FRAME_INTERACT_NOCOL:
case FN_INSERT_FRAME_INTERACT:
{
- USHORT nCols = 1;
- BOOL bModifier1 = rReq.GetModifier() == KEY_MOD1;
+ sal_uInt16 nCols = 1;
+ sal_Bool bModifier1 = rReq.GetModifier() == KEY_MOD1;
if(pArgs)
{
if(FN_INSERT_FRAME_INTERACT_NOCOL != nSlot &&
- pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
nCols = ((SfxUInt16Item *)pItem)->GetValue();
- if(pArgs->GetItemState(SID_MODIFIER, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(SID_MODIFIER, sal_False, &pItem) == SFX_ITEM_SET)
bModifier1 |= KEY_MOD1 == ((SfxUInt16Item *)pItem)->GetValue();
}
if(bModifier1 )
@@ -527,7 +490,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
Size aSize(16 * MM50, 8 * MM50);
GetShell().LockPaint();
GetShell().StartAllAction();
- SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT );
if(nCols > 1)
{
SwFmtCol aCol;
@@ -547,37 +510,37 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
break;
case FN_INSERT_FRAME:
{
- BOOL bSingleCol = FALSE;
+ sal_Bool bSingleCol = sal_False;
if( 0!= dynamic_cast< SwWebDocShell*>( GetView().GetDocShell()) )
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- USHORT nExport = pHtmlOpt->GetExportMode();
+ sal_uInt16 nExport = pHtmlOpt->GetExportMode();
if( HTML_CFG_MSIE == nExport ||
HTML_CFG_HTML32 == nExport ||
HTML_CFG_MSIE_40 == nExport ||
HTML_CFG_HTML32 == nExport )
{
- bSingleCol = TRUE;
+ bSingleCol = sal_True;
}
}
// Rahmen neu anlegen
- SwFlyFrmAttrMgr aMgr( TRUE, GetShellPtr(), FRMMGR_TYPE_TEXT );
+ SwFlyFrmAttrMgr aMgr( sal_True, GetShellPtr(), FRMMGR_TYPE_TEXT );
if(pArgs)
{
Size aSize(aMgr.GetSize());
aSize.Width() = GetShell().GetAnyCurRect(RECT_PAGE_PRT).Width();
Point aPos = aMgr.GetPos();
RndStdIds eAnchor = FLY_AT_PARA;
- if(pArgs->GetItemState(nSlot, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(nSlot, sal_False, &pItem) == SFX_ITEM_SET)
eAnchor = (RndStdIds)((SfxUInt16Item *)pItem)->GetValue();
- if(pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem) == SFX_ITEM_SET)
aPos = ((SfxPointItem *)pItem)->GetValue();
- if(pArgs->GetItemState(FN_PARAM_2, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(FN_PARAM_2, sal_False, &pItem) == SFX_ITEM_SET)
aSize = ((SvxSizeItem *)pItem)->GetSize();
- if(pArgs->GetItemState(SID_ATTR_COLUMNS, FALSE, &pItem) == SFX_ITEM_SET)
+ if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
{
- USHORT nCols = ((SfxUInt16Item *)pItem)->GetValue();
+ sal_uInt16 nCols = ((SfxUInt16Item *)pItem)->GetValue();
if( !bSingleCol && 1 < nCols )
{
SwFmtCol aFmtCol;
@@ -597,7 +560,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
}
else
{
- static USHORT const aFrmAttrRange[] =
+ static sal_uInt16 aFrmAttrRange[] =
{
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
@@ -626,29 +589,31 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
// Minimalgroesse in Spalten loeschen
SvxBoxInfoItem aBoxInfo((SvxBoxInfoItem &)aSet.Get(SID_ATTR_BORDER_INNER));
const SvxBoxItem& rBox = (const SvxBoxItem&)aSet.Get(RES_BOX);
- aBoxInfo.SetMinDist(FALSE);
+ aBoxInfo.SetMinDist(sal_False);
aBoxInfo.SetDefDist(rBox.GetDistance(BOX_LINE_LEFT));
aSet.Put(aBoxInfo);
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebDocShell, GetView().GetDocShell()));
- 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();
OSL_ENSURE(pFact, "Dialogdiet fail!");
SfxAbstractTabDialog* pDlg = pFact->CreateFrmTabDialog( DLG_FRM_STD,
- GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, TRUE);
+ GetView().GetViewFrame(), &GetView().GetViewFrame()->GetWindow(), aSet, sal_True);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if(pDlg->Execute() && pDlg->GetOutputItemSet())
{
- GetShell().LockPaint();
- GetShell().StartAllAction();
- GetShell().StartUndo(UNDO_INSERT);
+ //local variable necessary at least after call of .AutoCaption() because this could be deleted at this point
+ SwWrtShell& rShell = GetShell();
+ rShell.LockPaint();
+ rShell.StartAllAction();
+ rShell.StartUndo(UNDO_INSERT);
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
aMgr.SetAttrSet(*pOutSet);
// beim ClickToEditFeld erst die Selektion loeschen
- if( GetShell().IsInClickToEdit() )
- GetShell().DelRight();
+ if( rShell.IsInClickToEdit() )
+ rShell.DelRight();
aMgr.InsertFlyFrm();
@@ -657,10 +622,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if ( xRecorder.is() )
{
//FN_INSERT_FRAME
- USHORT nAnchor = (USHORT)aMgr.GetAnchor();
+ sal_uInt16 nAnchor = (sal_uInt16)aMgr.GetAnchor();
rReq.AppendItem(SfxUInt16Item(nSlot, nAnchor));
- rReq.AppendItem(SfxPointItem(FN_PARAM_1, GetShell().GetObjAbsPos()));
- rReq.AppendItem(SvxSizeItem(FN_PARAM_2, GetShell().GetObjSize()));
+ rReq.AppendItem(SfxPointItem(FN_PARAM_1, rShell.GetObjAbsPos()));
+ rReq.AppendItem(SvxSizeItem(FN_PARAM_2, rShell.GetObjSize()));
rReq.Done();
}
@@ -671,10 +636,10 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME));
- GetShell().EndUndo(UNDO_INSERT, &aRewriter);
+ rShell.EndUndo(UNDO_INSERT, &aRewriter);
}
- GetShell().EndAllAction();
- GetShell().UnlockPaint();
+ rShell.EndAllAction();
+ rShell.UnlockPaint();
}
DELETEZ(pDlg);
@@ -684,8 +649,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case FN_INSERT_HRULER:
{
String sPath;
- BOOL bSimpleLine = FALSE;
- BOOL bRet = FALSE;
+ sal_Bool bSimpleLine = sal_False;
+ sal_Bool bRet = sal_False;
Window* pParent = GetView().GetWindow();
if ( pItem )
{
@@ -720,28 +685,28 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
if(bSimpleLine)
{
if(!(rSh.IsSttOfPara() && rSh.IsEndOfPara())) // kein leerer Absatz?
- rSh.SplitNode( FALSE, FALSE ); // dann Platz schaffen
- rSh.SplitNode( FALSE, FALSE );
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.SplitNode( sal_False, sal_False ); // dann Platz schaffen
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_HTML_HR ));
- rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
- bRet = TRUE;
+ rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
+ bRet = sal_True;
}
else if(sPath.Len())
{
- SwFlyFrmAttrMgr aFrmMgr( TRUE, &rSh, FRMMGR_TYPE_GRF );
+ SwFlyFrmAttrMgr aFrmMgr( sal_True, &rSh, FRMMGR_TYPE_GRF );
// am FrmMgr muessen die richtigen Parameter eingestellt werden
aFrmMgr.SetAnchor(FLY_AS_CHAR);
- rSh.SplitNode( FALSE, FALSE );
- rSh.SplitNode( FALSE, FALSE );
- rSh.Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.SplitNode( sal_False, sal_False );
+ rSh.Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
rSh.SetAttr(SvxAdjustItem(SVX_ADJUST_CENTER,RES_PARATR_ADJUST ));
- if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, TRUE, 0, 0 ))
- bRet = TRUE;
+ if(GRFILTER_OK == GetView().InsertGraphic(sPath, aEmptyStr, sal_True, 0, 0 ))
+ bRet = sal_True;
rSh.EnterStdMode();
- rSh.Right(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
+ rSh.Right(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
}
rSh.EndAllAction();
rSh.EndUndo(UNDO_UI_INSERT_RULER);
@@ -776,18 +741,18 @@ bool lcl_IsMarkInSameSection( SwWrtShell& rWrtSh, const SwSection* pSect )
void SwTextShell::StateInsert( SfxItemSet &rSet )
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
SfxWhichIter aIter( rSet );
SwWrtShell &rSh = GetShell();
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SvtModuleOptions aMOpt;
SfxObjectCreateMode eCreateMode =
GetView().GetDocShell()->GetCreateMode();
rSh.Push();
- const BOOL bCrsrInHidden = rSh.SelectHiddenRange();
+ const sal_Bool bCrsrInHidden = rSh.SelectHiddenRange();
// --> OD 2009-08-05 #i103839#, #b6855246#
- // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <FALSE>
+ // Do not call method <SwCrsrShell::Pop(..)> with 1st parameter = <sal_False>
// in order to avoid that the view jumps to the visible cursor.
rSh.Pop();
// <--
@@ -826,13 +791,8 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
case SID_INSERT_FLOATINGFRAME:
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
- case SID_INSERT_APPLET:
{
- if(
-#ifndef SOLAR_JAVA
- nWhich == SID_INSERT_APPLET ||
-#endif
- eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
+ if( eCreateMode == SFX_CREATE_MODE_EMBEDDED || bCrsrInHidden )
{
rSet.DisableItem( nWhich );
}
@@ -841,7 +801,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
else if(SID_INSERT_FLOATINGFRAME == nWhich && nHtmlMode&HTMLMODE_ON)
{
SvxHtmlOptions* pHtmlOpt = SvxHtmlOptions::Get();
- USHORT nExport = pHtmlOpt->GetExportMode();
+ sal_uInt16 nExport = pHtmlOpt->GetExportMode();
if(HTML_CFG_MSIE_40 != nExport && HTML_CFG_WRITER != nExport )
rSet.DisableItem(nWhich);
}
@@ -862,7 +822,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
SvxHyperlinkItem aHLinkItem;
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))
{
const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
aHLinkItem.SetURL(pINetFmt->GetValue());
@@ -883,7 +843,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
// Text des Links besorgen
rSh.StartAction();
rSh.CreateCrsr();
- rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,TRUE);
+ rSh.SwCrsrShell::SelectTxtAttr(RES_TXTATR_INETFMT,sal_True);
String sLinkName = rSh.GetSelTxt();
aHLinkItem.SetName(sLinkName);
aHLinkItem.SetInsertMode(HLINK_FIELD);
@@ -928,7 +888,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
if( bDisable )
{
const SwSection* pCurrSection = rSh.GetCurrSection();
- USHORT nFullSectCnt = rSh.GetFullSelectedSectionCount();
+ sal_uInt16 nFullSectCnt = rSh.GetFullSelectedSectionCount();
if( pCurrSection && ( !rSh.HasSelection() || 0 != nFullSectCnt ))
bDisable = false;
else if(
@@ -1054,14 +1014,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String aChars, aFontName;
if ( pItem )
{
aChars = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
aFontName = pFontItem->GetValue();
@@ -1073,19 +1033,19 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT,
0 );
rSh.GetCurAttr( aSet );
- USHORT nScript = rSh.GetScriptType();
+ sal_uInt16 nScript = rSh.GetScriptType();
SvxFontItem aFont( RES_CHRATR_FONT );
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aFont = *(SvxFontItem*)pI;
else
aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
RES_CHRATR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
if (!aFontName.Len())
aFontName = aFont.GetFamilyName();
}
@@ -1095,7 +1055,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
{
// Eingestellten Font als Default
SfxAllItemSet aAllSet( rSh.GetAttrPool() );
- aAllSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aAllSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SwViewOption aOpt(*GetShell().GetViewOptions());
String sSymbolFont = aOpt.GetSymbolFont();
@@ -1109,8 +1069,8 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
GetView().GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
if( RET_OK == pDlg->Execute() )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFontItem )
{
aNewFont.SetName( pFontItem->GetFamilyName() );
@@ -1146,14 +1106,14 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
rSh.GetCurAttr( aSet );
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONT, *aSet.GetPool() );
- aSetItem.GetItemSet().Put( aSet, FALSE );
+ aSetItem.GetItemSet().Put( aSet, sal_False );
const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScript );
if( pI )
aFont = *(SvxFontItem*)pI;
else
aFont = (SvxFontItem&)aSet.Get( GetWhichOfScript(
RES_CHRATR_FONT,
- GetI18NScriptTypeOfLanguage( (USHORT)GetAppLanguage() ) ));
+ GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() ) ));
}
// Zeichen einfuegen
@@ -1175,22 +1135,22 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
nScript = pBreakIt->GetAllScriptsOfText( aChars );
if( SCRIPTTYPE_LATIN & nScript )
{
- aRestoreSet.Put( aSet.Get( RES_CHRATR_FONT, TRUE ) );
+ aRestoreSet.Put( aSet.Get( RES_CHRATR_FONT, sal_True ) );
aSet.Put( aNewFontItem, RES_CHRATR_FONT);
}
if( SCRIPTTYPE_ASIAN & nScript )
{
- aRestoreSet.Put( aSet.Get( RES_CHRATR_CJK_FONT, TRUE ) );
+ aRestoreSet.Put( aSet.Get( RES_CHRATR_CJK_FONT, sal_True ) );
aSet.Put( aNewFontItem, RES_CHRATR_CJK_FONT );
}
if( SCRIPTTYPE_COMPLEX & nScript )
{
- aRestoreSet.Put( aSet.Get( RES_CHRATR_CTL_FONT, TRUE ) );
+ aRestoreSet.Put( aSet.Get( RES_CHRATR_CTL_FONT, sal_True ) );
aSet.Put( aNewFontItem, RES_CHRATR_CTL_FONT );
}
rSh.SetMark();
- rSh.ExtendSelection( FALSE, aChars.Len() );
+ rSh.ExtendSelection( sal_False, aChars.Len() );
rSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND | nsSetAttrMode::SETATTR_NOFORMATATTR );
if( !rSh.IsCrsrPtAtEnd() )
rSh.SwapPam();
@@ -1210,7 +1170,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
}
rSh.EndAllAction();
- rSh.EndUndo( UNDO_INSERT );
+ rSh.EndUndo();
if ( aChars.Len() )
{
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index a968114c12..a1cce6c575 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -126,15 +126,15 @@
#include <view.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
-
+#include <sfx2/objface.hxx>
#include <langhelper.hxx>
using namespace ::com::sun::star;
-void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
+void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &rWrtSh.GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
SfxItemSet aCoreSet( rWrtSh.GetView().GetPool(),
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
@@ -144,8 +144,8 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
0 );
rWrtSh.GetCurAttr( aCoreSet );
- BOOL bSel = rWrtSh.HasSelection();
- BOOL bSelectionPut = FALSE;
+ sal_Bool bSel = rWrtSh.HasSelection();
+ sal_Bool bSelectionPut = sal_False;
if(bSel || rWrtSh.IsInWord())
{
if(!bSel)
@@ -156,10 +156,10 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
rWrtSh.SelWrd();
}
aCoreSet.Put(SfxStringItem(FN_PARAM_SELECTION, rWrtSh.GetSelTxt()));
- bSelectionPut = TRUE;
+ bSelectionPut = sal_True;
if(!bSel)
{
- rWrtSh.Pop(FALSE);
+ rWrtSh.Pop(sal_False);
rWrtSh.EndAction();
}
}
@@ -168,7 +168,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
// Das CHRATR_BACKGROUND-Attribut wird fuer den Dialog in
// ein RES_BACKGROUND verwandelt und wieder zurueck ...
const SfxPoolItem *pTmpBrush;
- if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, TRUE, &pTmpBrush ) )
+ if( SFX_ITEM_SET == aCoreSet.GetItemState( RES_CHRATR_BACKGROUND, sal_True, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_BACKGROUND );
@@ -199,7 +199,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
if ( pSet)
{
SfxItemSet aTmpSet( *pSet );
- if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, FALSE, &pTmpBrush ) )
+ if( SFX_ITEM_SET == aTmpSet.GetItemState( RES_BACKGROUND, sal_False, &pTmpBrush ) )
{
SvxBrushItem aTmpBrush( *((SvxBrushItem*)pTmpBrush) );
aTmpBrush.SetWhich( RES_CHRATR_BACKGROUND );
@@ -209,11 +209,11 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
aTmpSet.ClearItem( RES_BACKGROUND );
const SfxPoolItem* pSelectionItem;
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
xub_StrLen nInsert = 0;
// aus ungeklaerter Ursache ist das alte Item wieder im Set
- if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, FALSE, &pSelectionItem) )
+ if( !bSelectionPut && SFX_ITEM_SET == aTmpSet.GetItemState(FN_PARAM_SELECTION, sal_False, &pSelectionItem) )
{
String sInsert = ((const SfxStringItem*)pSelectionItem)->GetValue();
bInsert = sInsert.Len() != 0;
@@ -223,13 +223,13 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
rWrtSh.StartAction();
rWrtSh.Insert( sInsert );
rWrtSh.SetMark();
- rWrtSh.ExtendSelection(FALSE, sInsert.Len());
+ rWrtSh.ExtendSelection(sal_False, sInsert.Len());
SfxRequest aReq( rWrtSh.GetView().GetViewFrame(), FN_INSERT_STRING );
aReq.AppendItem( SfxStringItem( FN_INSERT_STRING, sInsert ) );
aReq.Done();
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_LEFT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
- aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, TRUE) );
+ aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_True) );
aReq1.Done();
}
}
@@ -248,7 +248,7 @@ void lcl_CharDialog( SwWrtShell &rWrtSh, BOOL bUseDialog, USHORT nSlot,const Sfx
{
SfxRequest aReq1( rWrtSh.GetView().GetViewFrame(), FN_CHAR_RIGHT );
aReq1.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nInsert) );
- aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, FALSE) );
+ aReq1.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, sal_False) );
aReq1.Done();
rWrtSh.SwapPam();
rWrtSh.ClearMark();
@@ -266,7 +266,7 @@ short lcl_AskRedlineMode(Window *pWin)
String( SW_RES( STR_REDLINE_TITLE ) ),
String( SW_RES( STR_REDLINE_MSG ) ) );
aQBox.SetImage( QueryBox::GetStandardImage() );
- USHORT nBtnFlags = BUTTONDIALOG_DEFBUTTON |
+ sal_uInt16 nBtnFlags = BUTTONDIALOG_DEFBUTTON |
BUTTONDIALOG_OKBUTTON |
BUTTONDIALOG_FOCUSBUTTON;
@@ -283,13 +283,13 @@ short lcl_AskRedlineMode(Window *pWin)
void SwTextShell::Execute(SfxRequest &rReq)
{
- BOOL bUseDialog = TRUE;
+ sal_Bool bUseDialog = sal_True;
const SfxItemSet *pArgs = rReq.GetArgs();
SwWrtShell& rWrtSh = GetShell();
const SfxPoolItem* pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
switch( nSlot )
{
case SID_LANGUAGE_STATUS:
@@ -324,7 +324,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
//!! due to the selection changes coming below.
rWrtSh.StartAction();
// prevent view from jumping because of (temporary) selection changes
- rWrtSh.LockView( TRUE );
+ rWrtSh.LockView( sal_True );
// save selection for later restoration
rWrtSh.Push();
@@ -383,9 +383,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
// restore selection...
- rWrtSh.Pop( FALSE );
+ rWrtSh.Pop( sal_False );
- rWrtSh.LockView( FALSE );
+ rWrtSh.LockView( sal_False );
rWrtSh.EndAction();
}
@@ -426,19 +426,19 @@ void SwTextShell::Execute(SfxRequest &rReq)
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False );
if ( pNameItem )
aStr = pNameItem->GetValue();
- BOOL bFont = pFont && pFont->GetValue().Len();
+ sal_Bool bFont = pFont && pFont->GetValue().Len();
rWrtSh.StartUndo( UNDO_UI_INSERT_FOOTNOTE );
rWrtSh.InsertFootnote( aStr, nSlot == FN_INSERT_ENDNOTE, !bFont );
if ( bFont )
{
- rWrtSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
+ rWrtSh.Left( CRSR_SKIP_CHARS, sal_True, 1, sal_False );
SfxItemSet aSet( rWrtSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT );
rWrtSh.GetCurAttr( aSet );
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
- rWrtSh.ResetSelect(0, FALSE);
+ rWrtSh.ResetSelect(0, sal_False);
rWrtSh.EndSelect();
rWrtSh.GotoFtnTxt();
}
@@ -451,12 +451,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
AbstractInsFootNoteDlg* pDlg = pFact->CreateInsFootNoteDlg( DLG_INS_FOOTNOTE,
- GetView().GetWindow(), rWrtSh, FALSE );
+ GetView().GetWindow(), rWrtSh, sal_False );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- pDlg->SetHelpId(nSlot);
+ pDlg->SetHelpId(GetStaticInterface()->GetSlot(nSlot)->GetCommand());
if ( pDlg->Execute() == RET_OK )
{
- USHORT nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
+ sal_uInt16 nId = pDlg->IsEndNote() ? FN_INSERT_ENDNOTE : FN_INSERT_FOOTNOTE;
SfxRequest aReq( GetView().GetViewFrame(), nId );
if ( pDlg->GetStr().Len() )
aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) );
@@ -492,7 +492,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
// remove the languages from that)
SvUShortsSort aAttribs;
- USHORT aResetableSetRange[] = {
+ sal_uInt16 aResetableSetRange[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_LANGUAGE - 1,
RES_CHRATR_LANGUAGE + 1, RES_CHRATR_CJK_LANGUAGE - 1,
@@ -504,12 +504,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
0
};
- USHORT *pUShorts = aResetableSetRange;
+ sal_uInt16 *pUShorts = aResetableSetRange;
while (*pUShorts)
{
- USHORT nL = pUShorts[1] - pUShorts[0] + 1;
- USHORT nE = pUShorts[0];
- for (USHORT i = 0; i < nL; ++i)
+ sal_uInt16 nL = pUShorts[1] - pUShorts[0] + 1;
+ sal_uInt16 nE = pUShorts[0];
+ for (sal_uInt16 i = 0; i < nL; ++i)
aAttribs.Insert( nE++ );
pUShorts += 2;
}
@@ -520,7 +520,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case FN_INSERT_BREAK_DLG:
{
- USHORT nKind=0, nPageNumber=0;
+ sal_uInt16 nKind=0, nPageNumber=0;
String aTemplateName;
if ( pItem )
{
@@ -605,11 +605,11 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_REDLINE_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
- // das muss fuer die Nachbearbeitung immer FALSE sein
- aFlags.bAFmtByInput = FALSE;
- aFlags.bWithRedlining = TRUE;
+ // das muss fuer die Nachbearbeitung immer sal_False sein
+ aFlags.bAFmtByInput = sal_False;
+ aFlags.bWithRedlining = sal_True;
rWrtSh.AutoFormat( &aFlags );
- aFlags.bWithRedlining = FALSE;
+ aFlags.bWithRedlining = sal_False;
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if (pVFrame->HasChildWindow(FN_REDLINE_ACCEPT))
@@ -625,7 +625,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
case RET_OK:
{
- pDlg->AcceptAll(TRUE);
+ pDlg->AcceptAll(sal_True);
SfxRequest aReq( pVFrame, FN_AUTOFORMAT_APPLY );
aReq.Done();
rReq.Ignore();
@@ -633,7 +633,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
case RET_CANCEL:
- pDlg->AcceptAll(FALSE);
+ pDlg->AcceptAll(sal_False);
rReq.Ignore();
break;
@@ -649,8 +649,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_APPLY:
{
SvxSwAutoFmtFlags aFlags(SvxAutoCorrCfg::Get()->GetAutoCorrect()->GetSwFlags());
- // das muss fuer die Nachbearbeitung immer FALSE sein
- aFlags.bAFmtByInput = FALSE;
+ // das muss fuer die Nachbearbeitung immer sal_False sein
+ aFlags.bAFmtByInput = sal_False;
rWrtSh.AutoFormat( &aFlags );
rReq.Done();
}
@@ -658,7 +658,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_AUTOFORMAT_AUTO:
{
SvxAutoCorrCfg* pACfg = SvxAutoCorrCfg::Get();
- BOOL bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
+ sal_Bool bSet = pItem ? ((const SfxBoolItem*)pItem)->GetValue() : !pACfg->IsAutoFmtByInput();
if( bSet != pACfg->IsAutoFmtByInput() )
{
pACfg->SetAutoFmtByInput( bSet );
@@ -729,7 +729,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_EDIT_FORMULA:
{
- const USHORT nId = SwInputChild::GetChildWindowId();
+ const sal_uInt16 nId = SwInputChild::GetChildWindowId();
SfxViewFrame* pVFrame = GetView().GetViewFrame();
if(pItem)
{
@@ -737,13 +737,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( pVFrame->HasChildWindow( nId ) )
{
pVFrame->ToggleChildWindow( nId );
- pVFrame->GetBindings().InvalidateAll( TRUE );
+ pVFrame->GetBindings().InvalidateAll( sal_True );
}
String sFormula(((const SfxStringItem*)pItem)->GetValue());
SwFldMgr aFldMgr;
rWrtSh.StartAllAction();
- BOOL bDelSel;
+ sal_Bool bDelSel;
if( 0 != (bDelSel = rWrtSh.HasSelection()) )
{
rWrtSh.StartUndo( UNDO_START );
@@ -768,7 +768,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
else
{
SvNumberFormatter* pFormatter = rWrtSh.GetNumberFormatter();
- ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
+ sal_uLong nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_STANDARD, LANGUAGE_SYSTEM);
SwInsertFld_Data aData(TYP_FORMELFLD, nsSwGetSetExpType::GSE_FORMULA, aEmptyStr, sFormula, nSysNumFmt);
aFldMgr.InsertFld(aData);
}
@@ -784,7 +784,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.EndAllTblBoxEdit();
pVFrame->ToggleChildWindow( nId );
if( !pVFrame->HasChildWindow( nId ) )
- pVFrame->GetBindings().InvalidateAll( TRUE );
+ pVFrame->GetBindings().InvalidateAll( sal_True );
rReq.Ignore();
}
}
@@ -800,7 +800,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
break;
case FN_REMOVE_HYPERLINK:
{
- BOOL bSel = rWrtSh.HasSelection();
+ sal_Bool bSel = rWrtSh.HasSelection();
if(!bSel)
{
rWrtSh.StartAction();
@@ -814,7 +814,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.ResetAttr( &aAttribs );
if(!bSel)
{
- rWrtSh.Pop(FALSE);
+ rWrtSh.Pop(sal_False);
rWrtSh.EndAction();
}
}
@@ -825,9 +825,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_TXTATR_INET :
case FN_INSERT_HYPERLINK:
{
- USHORT nWhich = GetPool().GetWhich( nSlot );
+ sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
- bUseDialog = FALSE;
+ bUseDialog = sal_False;
// intentionally no break
}
case SID_CHAR_DLG:
@@ -840,7 +840,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
rWrtSh.Push(); //save current cursor
SwLangHelper::SelectCurrentPara( rWrtSh );
lcl_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
- rWrtSh.Pop( FALSE ); //restore old cursor
+ rWrtSh.Pop( sal_False ); //restore old cursor
}
break;
case SID_ATTR_LRSPACE :
@@ -856,18 +856,18 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_FORMAT_DROPCAPS :
case FN_DROP_TEXT:
{
- USHORT nWhich = GetPool().GetWhich( nSlot );
+ sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
- bUseDialog = FALSE;
+ bUseDialog = sal_False;
// intentionally no break
}
case SID_PARA_DLG:
{
FieldUnit eMetric = ::GetDfltMetric(0 != PTR_CAST(SwWebView, &GetView()));
- SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< UINT16 >(eMetric)));
+ SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)));
- BOOL bApplyCharUnit = ::HasCharUnit(0 != PTR_CAST(SwWebView, &GetView()));
+ sal_Bool bApplyCharUnit = ::HasCharUnit(0 != PTR_CAST(SwWebView, &GetView()));
SW_MOD()->PutItem(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bApplyCharUnit));
SfxItemSet aCoreSet( GetPool(),
@@ -894,7 +894,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
const SvxTabStopItem& rDefTabs = (const SvxTabStopItem&)
GetPool().GetDefaultItem(RES_PARATR_TABSTOP);
- USHORT nDefDist = ::GetTabDist( rDefTabs );
+ sal_uInt16 nDefDist = ::GetTabDist( rDefTabs );
SfxUInt16Item aDefDistItem( SID_ATTR_TABSTOP_DEFAULTS, nDefDist );
aCoreSet.Put( aDefDistItem );
@@ -915,7 +915,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
//aktuelles Seitenformat
::SwToSfxPageDescAttr( aCoreSet );
- UINT16 nDefPage = 0;
+ sal_uInt16 nDefPage = 0;
if( pItem )
nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
@@ -935,7 +935,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, FALSE, nDefPage );
+ pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, sal_False, nDefPage );
OSL_ENSURE(pDlg, "Dialogdiet fail!");
}
SfxItemSet* pSet = NULL;
@@ -948,8 +948,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
// Defaults evtl umsetzen
pSet = (SfxItemSet*)pDlg->GetOutputItemSet();
- USHORT nNewDist;
- if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, FALSE, &pItem ) &&
+ sal_uInt16 nNewDist;
+ if( SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_TABSTOP_DEFAULTS, sal_False, &pItem ) &&
nDefDist != (nNewDist = ((SfxUInt16Item*)pItem)->GetValue()) )
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
@@ -958,13 +958,13 @@ void SwTextShell::Execute(SfxRequest &rReq)
pSet->ClearItem( SID_ATTR_TABSTOP_DEFAULTS );
}
- if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,FALSE,&pItem) )
+ if ( SFX_ITEM_SET == pSet->GetItemState(FN_PARAM_1,sal_False,&pItem) )
{
pSet->Put(SfxStringItem(FN_DROP_TEXT, ((const SfxStringItem*)pItem)->GetValue()));
pSet->ClearItem(FN_PARAM_1);
}
- if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_PARATR_DROP, sal_False, &pItem ))
{
String sCharStyleName;
if(((const SwFmtDrop*)pItem)->GetCharFmt())
@@ -991,7 +991,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( pSet->Count() )
{
rWrtSh.StartAction();
- if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, FALSE, &pItem) )
+ if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, sal_False, &pItem) )
{
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
@@ -1007,17 +1007,17 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART) )
{
- //SetNumRuleStart(TRUE) restarts the numbering at the value
+ //SetNumRuleStart(sal_True) restarts the numbering at the value
//that is defined at the starting point of the numbering level
//otherwise the SetNodeNumStart() value determines the start
//if it's set to something different than USHRT_MAX
- BOOL bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
+ sal_Bool bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
// --> OD 2007-06-11 #b6560525#
// Default value for restart value has to be USHRT_MAX
// in order to indicate that the restart value of the list
// style has to be used on restart.
- USHORT nNumStart = USHRT_MAX;
+ sal_uInt16 nNumStart = USHRT_MAX;
// <--
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
@@ -1028,9 +1028,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
}
else if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
- USHORT nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ sal_uInt16 nNumStart = ((SfxUInt16Item&)pSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
rWrtSh.SetNodeNumStart(nNumStart);
- rWrtSh.SetNumRuleStart(FALSE);
+ rWrtSh.SetNumRuleStart(sal_False);
}
// --> OD 2006-12-06 #i56253#
if ( bUndoNeeded )
@@ -1064,10 +1064,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SELECT_PARA:
{
if(!rWrtSh.IsSttOfPara())
- rWrtSh.SttPara(FALSE);
+ rWrtSh.SttPara(sal_False);
else
rWrtSh.EnterStdMode();
- rWrtSh.EndPara(TRUE);
+ rWrtSh.EndPara(sal_True);
}
break;
@@ -1139,7 +1139,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwEditWin& rEdtWin = GetView().GetEditWin();
SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate();
SwApplyTemplate aTempl;
- BOOL bSelection = rWrtSh.HasSelection();
+ sal_Bool bSelection = rWrtSh.HasSelection();
if(bSelection)
{
@@ -1189,8 +1189,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
String sStyleName;
if(pItem)
sStyleName = ((const SfxStringItem*)pItem)->GetValue();
- BOOL bOn = TRUE;
- if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, FALSE, &pItem))
+ sal_Bool bOn = sal_True;
+ if( SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_1, sal_False, &pItem))
bOn = ((const SfxBoolItem*)pItem)->GetValue();
ChangeHeaderOrFooter(sStyleName, FN_INSERT_PAGEHEADER == nSlot, bOn, !rReq.IsAPI());
rReq.Done();
@@ -1208,7 +1208,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_SELECTION_MODE_BLOCK :
{
bool bSetBlockMode = !rWrtSh.IsBlockMode();
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem))
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState(nSlot, sal_False, &pItem))
bSetBlockMode = ((const SfxBoolItem*)pItem)->GetValue();
if( ( nSlot == FN_SELECTION_MODE_DEFAULT ) ^ bSetBlockMode )
rWrtSh.EnterBlockMode();
@@ -1226,9 +1226,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rWrtSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ))
+ if(SFX_ITEM_SET <= aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ))
{
- const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, TRUE) );
+ const SwFmtINetFmt& rINetFmt = dynamic_cast<const SwFmtINetFmt&>( aSet.Get(RES_TXTATR_INETFMT, sal_True) );
if( nSlot == FN_COPY_HYPERLINK_LOCATION )
{
::uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetView().GetEditWin().GetClipboard();
@@ -1283,7 +1283,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
SwDocStat aCurr;
SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
{
- SwWait aWait( *GetView().GetDocShell(), TRUE );
+ SwWait aWait( *GetView().GetDocShell(), sal_True );
rSh.StartAction();
rSh.CountWords( aCurr );
rSh.UpdateDocStat( aDocStat );
@@ -1308,7 +1308,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{
SwWrtShell &rSh = GetShell();
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
switch ( nWhich )
@@ -1403,15 +1403,15 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_INSERT_FOOTNOTE:
case FN_INSERT_FOOTNOTE_DLG:
{
- const USHORT nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
+ const sal_uInt16 nNoType = FRMTYPE_FLY_ANY | FRMTYPE_HEADER |
FRMTYPE_FOOTER | FRMTYPE_FOOTNOTE;
- if ( (rSh.GetFrmType(0,TRUE) & nNoType) )
+ if ( (rSh.GetFrmType(0,sal_True) & nNoType) )
rSet.DisableItem(nWhich);
}
break;
case FN_INSERT_TABLE:
if ( rSh.GetTableFmt() ||
- (rSh.GetFrmType(0,TRUE) & FRMTYPE_FOOTNOTE) )
+ (rSh.GetFrmType(0,sal_True) & FRMTYPE_FOOTNOTE) )
rSet.DisableItem( nWhich );
break;
@@ -1433,17 +1433,17 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case FN_GLOSSARY_DLG:
{
- rSet.Put(SfxBoolItem(nWhich), TRUE);
+ rSet.Put(SfxBoolItem(nWhich), sal_True);
}
break;
case SID_DEC_INDENT:
case SID_INC_INDENT:
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
- SID_INC_INDENT == nWhich, TRUE ))
+ SID_INC_INDENT == nWhich, sal_True ))
rSet.DisableItem( nWhich );
}
break;
@@ -1451,11 +1451,11 @@ void SwTextShell::GetState( SfxItemSet &rSet )
case FN_DEC_INDENT_OFFSET:
case FN_INC_INDENT_OFFSET:
{
- USHORT nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
if( (nHtmlMode == HTMLMODE_ON) ||
!rSh.IsMoveLeftMargin( FN_INC_INDENT_OFFSET == nWhich,
- FALSE ))
+ sal_False ))
rSet.DisableItem( nWhich );
}
break;
@@ -1493,8 +1493,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSet.Put( SfxObjectShellItem( nWhich, GetView().GetDocShell() ));
#else
// Seitenvorlagen besorgen
- BOOL bFound = FALSE;
- USHORT n, nCnt = rSh.GetPageDescCnt();
+ sal_Bool bFound = sal_False;
+ sal_uInt16 n, nCnt = rSh.GetPageDescCnt();
for( n = 0; n < nCnt; ++n )
{
const SwPageDesc& rDesc = rSh.GetPageDesc( n );
@@ -1502,7 +1502,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
? !rDesc.GetMaster().GetHeader().IsActive()
: !rDesc.GetMaster().GetFooter().IsActive() )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -1549,7 +1549,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, TRUE ) || rSh.HasReadonlySel())
+ if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_True ) || rSh.HasReadonlySel())
{
rSet.DisableItem(nWhich);
}
@@ -1563,7 +1563,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
rSh.GetCurAttr(aSet);
// If a hyperlink is selected, either alone or along with other text...
- if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, TRUE )) == 0) || rSh.HasReadonlySel())
+ if( ((SFX_ITEM_DONTCARE & aSet.GetItemState( RES_TXTATR_INETFMT, sal_True )) == 0) || rSh.HasReadonlySel())
{
rSet.DisableItem(nWhich);
}
@@ -1602,7 +1602,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
RES_TXTATR_INETFMT,
RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
- if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, FALSE ))
+ if(SFX_ITEM_SET > aSet.GetItemState( RES_TXTATR_INETFMT, sal_False ))
rSet.DisableItem(nWhich);
}
break;
@@ -1685,18 +1685,18 @@ void SwTextShell::GetState( SfxItemSet &rSet )
given all styles are changed
---------------------------------------------------------------------------*/
void SwTextShell::ChangeHeaderOrFooter(
- const String& rStyleName, BOOL bHeader, BOOL bOn, BOOL bShowWarning)
+ const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning)
{
SwWrtShell& rSh = GetShell();
rSh.addCurrentPosition();
rSh.StartAllAction();
rSh.StartUndo( UNDO_HEADER_FOOTER ); // #i7983#
- BOOL bExecute = TRUE;
- BOOL bCrsrSet = FALSE;
- for( USHORT nFrom = 0, nTo = rSh.GetPageDescCnt();
+ sal_Bool bExecute = sal_True;
+ sal_Bool bCrsrSet = sal_False;
+ for( sal_uInt16 nFrom = 0, nTo = rSh.GetPageDescCnt();
nFrom < nTo; ++nFrom )
{
- int bChgd = FALSE;
+ int bChgd = sal_False;
SwPageDesc aDesc( rSh.GetPageDesc( nFrom ));
String sTmp(aDesc.GetName());
if( !rStyleName.Len() || rStyleName == sTmp )
@@ -1705,19 +1705,19 @@ void SwTextShell::ChangeHeaderOrFooter(
(bHeader && aDesc.GetMaster().GetHeader().IsActive())) ||
(!bHeader && aDesc.GetMaster().GetFooter().IsActive()))
{
- bShowWarning = FALSE;
+ bShowWarning = sal_False;
//Actions have to be closed while the dialog is showing
rSh.EndAllAction();
Window* pParent = &GetView().GetViewFrame()->GetWindow();
- BOOL bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT,
+ sal_Bool bRet = RET_YES == QueryBox( pParent, ResId( RID_SVXQBX_DELETE_HEADFOOT,
DIALOG_MGR() ) ).Execute();
bExecute = bRet;
rSh.StartAllAction();
}
if( bExecute )
{
- bChgd = TRUE;
+ bChgd = sal_True;
SwFrmFmt &rMaster = aDesc.GetMaster();
if(bHeader)
rMaster.SetFmtAttr( SwFmtHeader( bOn ));
diff --git a/sw/source/ui/shells/textsh2.cxx b/sw/source/ui/shells/textsh2.cxx
index fb26410025..c7b6821b07 100644
--- a/sw/source/ui/shells/textsh2.cxx
+++ b/sw/source/ui/shells/textsh2.cxx
@@ -101,7 +101,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
{
const SfxItemSet *pArgs = rReq.GetArgs();
SwNewDBMgr* pNewDBMgr = GetShell().GetNewDBMgr();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
::rtl::OUString sSourceArg, sCommandArg;
sal_Int32 nCommandTypeArg = 0;
@@ -113,29 +113,29 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
const SfxPoolItem* pSelectionItem = 0;
// first get the selection of rows to be inserted
- pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, FALSE, &pSelectionItem);
+ pArgs->GetItemState(FN_DB_DATA_SELECTION_ANY, sal_False, &pSelectionItem);
Sequence<Any> aSelection;
if(pSelectionItem)
((SfxUsrAnyItem*)pSelectionItem)->GetValue() >>= aSelection;
// get the data source name
- pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, FALSE, &pSourceItem);
+ pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, sal_False, &pSourceItem);
if(pSourceItem)
((const SfxUsrAnyItem*)pSourceItem)->GetValue() >>= sSourceArg;
// get the command
- pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, FALSE, &pCommandItem);
+ pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, sal_False, &pCommandItem);
if(pCommandItem)
((const SfxUsrAnyItem*)pCommandItem)->GetValue() >>= sCommandArg;
// get the command type
- pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, FALSE, &pCommandTypeItem);
+ pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, sal_False, &pCommandTypeItem);
if(pCommandTypeItem)
((const SfxUsrAnyItem*)pCommandTypeItem)->GetValue() >>= nCommandTypeArg;
Reference<XConnection> xConnection;
- pArgs->GetItemState(FN_DB_CONNECTION_ANY, FALSE, &pConnectionItem);
+ pArgs->GetItemState(FN_DB_CONNECTION_ANY, sal_False, &pConnectionItem);
if ( pConnectionItem )
((const SfxUsrAnyItem*)pConnectionItem)->GetValue() >>= xConnection;
// may be we even get no connection
@@ -149,7 +149,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
// get the cursor, we use to travel, may be NULL
Reference<XResultSet> xCursor;
- pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, FALSE, &pCursorItem);
+ pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, sal_False, &pCursorItem);
if ( pCursorItem )
((const SfxUsrAnyItem*)pCursorItem)->GetValue() >>= xCursor;
@@ -179,7 +179,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
case FN_QRY_MERGE_FIELD:
{
// we don't get any cursor, so we must create our own
- BOOL bDisposeResultSet = FALSE;
+ sal_Bool bDisposeResultSet = sal_False;
if ( !xCursor.is() )
{
xCursor = SwNewDBMgr::createCursor(sSourceArg,sCommandArg,nCommandTypeArg,xConnection);
@@ -206,8 +206,8 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
const SfxPoolItem* pColumnItem = 0;
const SfxPoolItem* pColumnNameItem = 0;
- pArgs->GetItemState(FN_DB_COLUMN_ANY, FALSE, &pColumnItem);
- pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, FALSE, &pColumnNameItem);
+ pArgs->GetItemState(FN_DB_COLUMN_ANY, sal_False, &pColumnItem);
+ pArgs->GetItemState(FN_DB_DATA_COLUMN_NAME_ANY, sal_False, &pColumnNameItem);
::rtl::OUString sColumnName;
if(pColumnNameItem)
@@ -221,7 +221,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
sDBName += (String)sColumnName;
SwFldMgr aFldMgr(GetShellPtr());
- SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, FALSE, TRUE);
+ SwInsertFld_Data aData(TYP_DBFLD, 0, sDBName, aEmptyStr, 0, sal_False, sal_True);
if(pConnectionItem)
aData.aDBConnection = ((SfxUsrAnyItem*)pConnectionItem)->GetValue();
if(pColumnItem)
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 92af610dec..85521360d3 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -78,12 +78,12 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
const SfxItemSet *pArgs = rReq.GetArgs();
int eState = STATE_TOGGLE;
- USHORT nWhich = rReq.GetSlot();
+ sal_uInt16 nWhich = rReq.GetSlot();
if(pArgs )
{
const SfxPoolItem* pItem;
- pArgs->GetItemState(nWhich, FALSE, &pItem);
+ pArgs->GetItemState(nWhich, sal_False, &pItem);
eState = ((const SfxBoolItem &) pArgs->
Get( nWhich )).GetValue() ? STATE_ON : STATE_OFF;
}
@@ -115,10 +115,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
SfxBindings& rBind = GetView().GetViewFrame()->GetBindings();
if( nWhich == FN_SET_SUB_SCRIPT )
rBind.SetState( SfxBoolItem( FN_SET_SUPER_SCRIPT,
- FALSE ) );
+ sal_False ) );
else
rBind.SetState( SfxBoolItem( FN_SET_SUB_SCRIPT,
- FALSE ) );
+ sal_False ) );
}
break;
@@ -188,10 +188,10 @@ void SwTextShell::ExecCharAttr(SfxRequest &rReq)
void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
const SfxItemSet* pArgs = rReq.GetArgs();
- BOOL bArgs = pArgs != 0 && pArgs->Count() > 0;
- int bGrow = FALSE;
+ sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0;
+ int bGrow = sal_False;
SwWrtShell& rWrtSh = GetShell();
SwTxtFmtColl* pColl = 0;
@@ -203,7 +203,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
pColl = 0;
}
SfxItemPool& rPool = GetPool();
- USHORT nWhich = rPool.GetWhich(nSlot);
+ sal_uInt16 nWhich = rPool.GetWhich(nSlot);
switch ( nSlot )
{
case FN_TXTATR_INET:
@@ -232,7 +232,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
break;
case FN_GROW_FONT_SIZE:
- bGrow = TRUE;
+ bGrow = sal_True;
// kein break !!
case FN_SHRINK_FONT_SIZE:
{
@@ -241,10 +241,10 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
SfxItemSet aAttrSet( rPool, aSetItem.GetItemSet().GetRanges() );
const SfxPoolItem* pI;
- static const USHORT aScrTypes[] = {
+ static const sal_uInt16 aScrTypes[] = {
SCRIPTTYPE_LATIN, SCRIPTTYPE_ASIAN, SCRIPTTYPE_COMPLEX, 0 };
- USHORT nScriptType = rWrtSh.GetScriptType();
- for( const USHORT* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp )
+ sal_uInt16 nScriptType = rWrtSh.GetScriptType();
+ for( const sal_uInt16* pScrpTyp = aScrTypes; *pScrpTyp; ++pScrpTyp )
if( ( nScriptType & *pScrpTyp ) &&
0 != ( pI = aSetItem.GetItemOfScript( *pScrpTyp )))
{
@@ -288,7 +288,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
void SwTextShell::ExecParaAttr(SfxRequest &rReq)
{
SvxAdjust eAdjst;
- BYTE ePropL;
+ sal_uInt8 ePropL;
const SfxItemSet* pArgs = rReq.GetArgs();
// gleich beide Attribute holen, ist nicht teuerer !!
@@ -297,7 +297,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
RES_FRAMEDIR, RES_FRAMEDIR,
0 );
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
case SID_ATTR_PARA_ADJUST:
@@ -323,7 +323,7 @@ void SwTextShell::ExecParaAttr(SfxRequest &rReq)
SET_ADJUST:
{
aSet.Put(SvxAdjustItem(eAdjst,RES_PARATR_ADJUST));
- rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), TRUE ) );
+ rReq.AppendItem( SfxBoolItem( GetPool().GetWhich(nSlot), sal_True ) );
}
break;
@@ -358,8 +358,8 @@ SET_LINESPACE:
SfxItemSet aAdjustSet( GetPool(),
RES_PARATR_ADJUST, RES_PARATR_ADJUST );
GetShell().GetCurAttr(aAdjustSet);
- BOOL bChgAdjust = FALSE;
- SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, FALSE);
+ sal_Bool bChgAdjust = sal_False;
+ SfxItemState eAdjustState = aAdjustSet.GetItemState(RES_PARATR_ADJUST, sal_False);
if(eAdjustState >= SFX_ITEM_DEFAULT)
{
int eAdjust = (int)(( const SvxAdjustItem& )
@@ -368,7 +368,7 @@ SET_LINESPACE:
(SVX_ADJUST_RIGHT == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
}
else
- bChgAdjust = TRUE;
+ bChgAdjust = sal_True;
SvxFrameDirection eFrmDirection =
(SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot) ?
@@ -389,7 +389,7 @@ SET_LINESPACE:
{
SvxNumRule aRule = pCurRule->MakeSvxNumRule();
- for(USHORT i = 0; i < aRule.GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++)
{
SvxNumberFormat aFmt(aRule.GetLevel(i));
if(SVX_ADJUST_LEFT == aFmt.GetNumAdjust())
@@ -403,7 +403,7 @@ SET_LINESPACE:
SwNumRule aSetRule( pCurRule->GetName(),
pCurRule->Get( 0 ).GetPositionAndSpaceMode() );
aSetRule.SetSvxRule( aRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// no start or continuation of a list - list style is only changed
GetShell().SetCurNumRule( aSetRule, false );
}
@@ -432,9 +432,9 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem *pItem = 0;
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
if(pArgs)
- pArgs->GetItemState(GetPool().GetWhich(nSlot), FALSE, &pItem);
+ pArgs->GetItemState(GetPool().GetWhich(nSlot), sal_False, &pItem);
switch ( nSlot )
{
case FN_DROP_CHAR_STYLE_NAME:
@@ -474,7 +474,7 @@ void SwTextShell::ExecParaAttrArgs(SfxRequest &rReq)
{
rSh.StartAction();
rSh.StartUndo( UNDO_START );
- if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,FALSE,&pItem) )
+ if ( SFX_ITEM_SET == aSet.GetItemState(HINT_END,sal_False,&pItem) )
{
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
@@ -526,12 +526,12 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
rSh.GetCurAttr(aCoreSet); // *alle* Textattribute von der Core erfragen
SfxWhichIter aIter(rSet);
- USHORT nSlot = aIter.FirstWhich();
+ sal_uInt16 nSlot = aIter.FirstWhich();
sal_Bool bFlag = sal_False;
SfxBoolItem aFlagItem;
const SfxPoolItem* pItem = 0;
int eAdjust = -1; // Illegaler Wert, um DONTCARE zu erkennen
- SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, FALSE, &pItem);
+ SfxItemState eState = aCoreSet.GetItemState(RES_PARATR_ADJUST, sal_False, &pItem);
if( SFX_ITEM_DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_PARATR_ADJUST);
@@ -539,14 +539,14 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
eAdjust = (int)(( SvxAdjustItem* ) pItem)->GetAdjust();
short nEsc = 0;
- eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, FALSE, &pItem);
+ eState = aCoreSet.GetItemState(RES_CHRATR_ESCAPEMENT, sal_False, &pItem);
if( SFX_ITEM_DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_CHRATR_ESCAPEMENT);
if( eState >= SFX_ITEM_DEFAULT )
nEsc = ((SvxEscapementItem* )pItem)->GetEsc();
- USHORT nLineSpace = 0;
- eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, FALSE, &pItem);
+ sal_uInt16 nLineSpace = 0;
+ eState = aCoreSet.GetItemState(RES_PARATR_LINESPACING, sal_False, &pItem);
if( SFX_ITEM_DEFAULT == eState )
pItem = &rPool.GetDefaultItem(RES_PARATR_LINESPACING);
if( SFX_ITEM_DEFAULT <= eState &&
@@ -606,7 +606,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
else
{
bFlag = SVX_ADJUST_BLOCK == eAdjust;
- USHORT nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & (HTMLMODE_FULL_STYLES|HTMLMODE_FIRSTLINE) ))
{
rSet.DisableItem( nSlot );
@@ -629,7 +629,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
{
SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONTHEIGHT,
*rSet.GetPool() );
- aSetItem.GetItemSet().Put( aCoreSet, FALSE );
+ aSetItem.GetItemSet().Put( aCoreSet, sal_False );
if( !aSetItem.GetItemOfScript( rSh.GetScriptType() ))
rSet.DisableItem( nSlot );
nSlot = 0;
@@ -668,9 +668,9 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
else
{
// is the item set?
- USHORT nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
+ sal_uInt16 nHtmlMode = GetHtmlMode(rSh.GetView().GetDocShell());
if((!(nHtmlMode & HTMLMODE_ON) || (0 != (nHtmlMode & HTMLMODE_SOME_STYLES))) &&
- aCoreSet.GetItemState( RES_FRAMEDIR, FALSE ) >= SFX_ITEM_DEFAULT)
+ aCoreSet.GetItemState( RES_FRAMEDIR, sal_False ) >= SFX_ITEM_DEFAULT)
{
SvxFrameDirection eFrmDir = (SvxFrameDirection)
((const SvxFrameDirectionItem& )aCoreSet.Get(RES_FRAMEDIR)).GetValue();
@@ -698,10 +698,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
case RES_PARATR_DROP:
{
#if OSL_DEBUG_LEVEL > 1
- const SfxPoolItem& rItem = aCoreSet.Get(GetPool().GetWhich(nSlot), TRUE);
+ const SfxPoolItem& rItem = aCoreSet.Get(GetPool().GetWhich(nSlot), sal_True);
rSet.Put(rItem);
#else
- rSet.Put(aCoreSet.Get( GetPool().GetWhich(nSlot), TRUE));
+ rSet.Put(aCoreSet.Get( GetPool().GetWhich(nSlot), sal_True));
#endif
nSlot = 0;
}
@@ -723,10 +723,10 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
SfxItemSet aSet(GetPool(), RES_TXTATR_INETFMT, RES_TXTATR_INETFMT);
rSh.GetCurAttr(aSet);
#if OSL_DEBUG_LEVEL > 1
- const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, TRUE);
+ const SfxPoolItem& rItem = aSet.Get(RES_TXTATR_INETFMT, sal_True);
rSet.Put(rItem);
#else
- rSet.Put(aSet.Get( RES_TXTATR_INETFMT, TRUE));
+ rSet.Put(aSet.Get( RES_TXTATR_INETFMT, sal_True));
#endif
nSlot = 0;
}
@@ -747,7 +747,7 @@ void SwTextShell::GetAttrState(SfxItemSet &rSet)
nSlot = aIter.NextWhich();
}
- rSet.Put(aCoreSet,FALSE);
+ rSet.Put(aCoreSet,sal_False);
}
diff --git a/sw/source/ui/shells/txtcrsr.cxx b/sw/source/ui/shells/txtcrsr.cxx
index 755ca4d5a4..9aed3f8abe 100644
--- a/sw/source/ui/shells/txtcrsr.cxx
+++ b/sw/source/ui/shells/txtcrsr.cxx
@@ -60,22 +60,22 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
const SfxItemSet *pArgs = rReq.GetArgs();
- BOOL bSelect = FALSE;
- USHORT nCount = 1;
+ sal_Bool bSelect = sal_False;
+ sal_uInt16 nCount = 1;
if(pArgs)
{
const SfxPoolItem *pItem;
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, sal_True, &pItem))
nCount = ((const SfxInt16Item *)pItem)->GetValue();
- if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, TRUE, &pItem))
+ if(SFX_ITEM_SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, sal_True, &pItem))
bSelect = ((const SfxBoolItem *)pItem)->GetValue();
}
switch(rReq.GetSlot())
{
- case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = TRUE; break;
- case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = TRUE; break;
- case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = TRUE; break;
- case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = TRUE; break;
+ case FN_CHAR_LEFT_SEL: rReq.SetSlot( FN_CHAR_LEFT ); bSelect = sal_True; break;
+ case FN_CHAR_RIGHT_SEL: rReq.SetSlot( FN_CHAR_RIGHT ); bSelect = sal_True; break;
+ case FN_LINE_UP_SEL: rReq.SetSlot( FN_LINE_UP ); bSelect = sal_True; break;
+ case FN_LINE_DOWN_SEL: rReq.SetSlot( FN_LINE_DOWN ); bSelect = sal_True; break;
}
uno::Reference< frame::XDispatchRecorder > xRecorder =
@@ -85,16 +85,16 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
rReq.AppendItem( SfxInt16Item(FN_PARAM_MOVE_COUNT, nCount) );
rReq.AppendItem( SfxBoolItem(FN_PARAM_MOVE_SELECTION, bSelect) );
}
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
rReq.Done();
// Get EditWin before calling the move functions (shell change may occur!)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
switch(nSlot)
{
- case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break;
- case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, FALSE, TRUE ); break;
+ case FN_CHAR_LEFT: rSh.Left( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
+ case FN_CHAR_RIGHT: rSh.Right( CRSR_SKIP_CELLS, bSelect, 1, sal_False, sal_True ); break;
case FN_LINE_UP: rSh.Up ( bSelect, 1 ); break;
case FN_LINE_DOWN: rSh.Down ( bSelect, 1 ); break;
default: OSL_FAIL("wrong Dispatcher"); return;
@@ -111,16 +111,16 @@ void SwTextShell::ExecMove(SfxRequest &rReq)
SwEditWin& rTmpEditWin = GetView().GetEditWin();
rTmpEditWin.FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
- BOOL bRet = FALSE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bRet = sal_False;
switch ( nSlot )
{
case FN_START_OF_LINE_SEL:
- case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, FALSE );
+ case FN_START_OF_LINE: bRet = rSh.LeftMargin ( FN_START_OF_LINE_SEL == nSlot, sal_False );
break;
case FN_END_OF_LINE_SEL:
- case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, FALSE );
+ case FN_END_OF_LINE: bRet = rSh.RightMargin( FN_END_OF_LINE_SEL == nSlot, sal_False );
break;
case FN_START_OF_DOCUMENT_SEL:
@@ -151,7 +151,7 @@ void SwTextShell::ExecMovePage(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case FN_START_OF_NEXT_PAGE_SEL :
@@ -182,12 +182,12 @@ void SwTextShell::ExecMoveCol(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
switch ( rReq.GetSlot() )
{
- case FN_START_OF_COLUMN: rSh.StartOfColumn ( FALSE ); break;
- case FN_END_OF_COLUMN: rSh.EndOfColumn ( FALSE ); break;
- case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( FALSE ) ; break;
- case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( FALSE ); break;
- case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( FALSE ); break;
- case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( FALSE ); break;
+ case FN_START_OF_COLUMN: rSh.StartOfColumn ( sal_False ); break;
+ case FN_END_OF_COLUMN: rSh.EndOfColumn ( sal_False ); break;
+ case FN_START_OF_NEXT_COLUMN: rSh.StartOfNextColumn( sal_False ) ; break;
+ case FN_END_OF_NEXT_COLUMN: rSh.EndOfNextColumn ( sal_False ); break;
+ case FN_START_OF_PREV_COLUMN: rSh.StartOfPrevColumn( sal_False ); break;
+ case FN_END_OF_PREV_COLUMN: rSh.EndOfPrevColumn ( sal_False ); break;
default: OSL_FAIL("wrong dispatcher"); return;
}
rReq.Done();
@@ -198,7 +198,7 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
SwWrtShell &rSh = GetShell();
GetView().GetEditWin().FlushInBuffer();
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case FN_NEXT_WORD_SEL:
@@ -225,10 +225,10 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
case FN_PREV_SENT: rSh.BwdSentence( FN_PREV_SENT_SEL == nSlot );
break;
- case FN_NEXT_PARA: rSh.FwdPara ( FALSE );
+ case FN_NEXT_PARA: rSh.FwdPara ( sal_False );
break;
- case FN_PREV_PARA: rSh.BwdPara ( FALSE );
+ case FN_PREV_PARA: rSh.BwdPara ( sal_False );
break;
default: OSL_FAIL("wrong dispatcher"); return;
}
@@ -238,8 +238,8 @@ void SwTextShell::ExecMoveLingu(SfxRequest &rReq)
void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
{
SwWrtShell &rSh = GetShell();
- USHORT nSlot = rReq.GetSlot();
- BOOL bSetRetVal = TRUE, bRet = TRUE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bSetRetVal = sal_True, bRet = sal_True;
switch ( nSlot )
{
case SID_FM_TOGGLECONTROLFOCUS:
@@ -260,7 +260,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
if ( !pFilter.get() )
break;
- const SdrObject* pNearestControl = rSh.GetBestObject( TRUE, GOTOOBJ_DRAW_CONTROL, FALSE, pFilter.get() );
+ const SdrObject* pNearestControl = rSh.GetBestObject( sal_True, GOTOOBJ_DRAW_CONTROL, sal_False, pFilter.get() );
if ( !pNearestControl )
break;
@@ -273,7 +273,7 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
}
break;
case FN_CNTNT_TO_NEXT_FRAME:
- bRet = rSh.GotoObj(TRUE, GOTOOBJ_GOTO_ANY);
+ bRet = rSh.GotoObj(sal_True, GOTOOBJ_GOTO_ANY);
if(bRet)
{
rSh.HideCrsr();
@@ -290,27 +290,27 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_TO_HEADER:
rSh.MoveCrsr();
- if ( FRMTYPE_HEADER & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_HEADER & rSh.GetFrmType(0,sal_False) )
rSh.SttPg();
else
rSh.GotoHeaderTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_TO_FOOTER:
rSh.MoveCrsr();
- if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_FOOTER & rSh.GetFrmType(0,sal_False) )
rSh.EndPg();
else
rSh.GotoFooterTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_FOOTNOTE_TO_ANCHOR:
rSh.MoveCrsr();
- if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,FALSE) )
+ if ( FRMTYPE_FOOTNOTE & rSh.GetFrmType(0,sal_False) )
rSh.GotoFtnAnchor();
else
rSh.GotoFtnTxt();
- bSetRetVal = FALSE;
+ bSetRetVal = sal_False;
break;
case FN_TO_FOOTNOTE_AREA :
rSh.GotoFtnTxt();
@@ -329,22 +329,22 @@ void SwTextShell::ExecMoveMisc(SfxRequest &rReq)
break;
case FN_NEXT_TOXMARK:
- bRet = rSh.GotoNxtPrvTOXMark( TRUE );
+ bRet = rSh.GotoNxtPrvTOXMark( sal_True );
break;
case FN_PREV_TOXMARK:
- bRet = rSh.GotoNxtPrvTOXMark( FALSE );
+ bRet = rSh.GotoNxtPrvTOXMark( sal_False );
break;
case FN_NEXT_TBLFML:
- bRet = rSh.GotoNxtPrvTblFormula( TRUE, FALSE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_False );
break;
case FN_PREV_TBLFML:
- bRet = rSh.GotoNxtPrvTblFormula( FALSE, FALSE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_False );
break;
case FN_NEXT_TBLFML_ERR:
- bRet = rSh.GotoNxtPrvTblFormula( TRUE, TRUE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_True, sal_True );
break;
case FN_PREV_TBLFML_ERR:
- bRet = rSh.GotoNxtPrvTblFormula( FALSE, TRUE );
+ bRet = rSh.GotoNxtPrvTblFormula( sal_False, sal_True );
break;
default:
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index b24942de12..b69efbf4f2 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -58,7 +58,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_NUMBERING_ON:
{
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- BOOL bMode = !GetShell().HasNumber(); // #i29560#
+ sal_Bool bMode = !GetShell().HasNumber(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
else
@@ -77,7 +77,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_BULLET_ON:
{
SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- BOOL bMode = !GetShell().HasBullet(); // #i29560#
+ sal_Bool bMode = !GetShell().HasBullet(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
else
@@ -100,14 +100,14 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
0 );
SwDocShell* pDocSh = GetView().GetDocShell();
- BOOL bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
+ sal_Bool bHtml = 0 != PTR_CAST(SwWebDocShell, pDocSh);
const SwNumRule* pCurRule = GetShell().GetCurNumRule();
if( pCurRule )
{
SvxNumRule aRule = pCurRule->MakeSvxNumRule();
//convert type of linked bitmaps from SVX_NUM_BITMAP to (SVX_NUM_BITMAP|LINK_TOKEN)
- for(USHORT i = 0; i < aRule.GetLevelCount(); i++)
+ for(sal_uInt16 i = 0; i < aRule.GetLevelCount(); i++)
{
SvxNumberFormat aFmt(aRule.GetLevel(i));
if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
@@ -122,12 +122,12 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
}
if(bHtml)
- aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE);
+ aRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
aSet.Put(SvxNumBulletItem(aRule));
OSL_ENSURE( GetShell().GetNumLevel() < MAXLEVEL,
"<SwTextShell::ExecEnterNum()> - numbered node without valid list level. Serious defect -> please inform OD." );
- USHORT nLevel = GetShell().GetNumLevel();
+ sal_uInt16 nLevel = GetShell().GetNumLevel();
if( nLevel < MAXLEVEL )
{
nLevel = 1<<nLevel;
@@ -145,7 +145,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
if( bHtml || bRightToLeft )
{
- for( BYTE n = 0; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
SvxNumberFormat aFmt( aSvxRule.GetLevel( n ) );
if ( n && bHtml )
@@ -161,14 +161,14 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
aFmt.SetNumAdjust( SVX_ADJUST_RIGHT );
}
// <--
- aSvxRule.SetLevel( n, aFmt, FALSE );
+ aSvxRule.SetLevel( n, aFmt, sal_False );
}
- aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, FALSE);
+ aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
}
aSet.Put(SvxNumBulletItem(aSvxRule));
}
- aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,FALSE ));
+ aSet.Put( SfxBoolItem( SID_PARAM_NUM_PRESET,sal_False ));
// vor dem Dialog wird der HtmlMode an der DocShell versenkt
pDocSh->PutItem(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(pDocSh)));
@@ -178,11 +178,11 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
SfxAbstractTabDialog* pDlg = pFact->CreateSwTabDialog( DLG_SVXTEST_NUM_BULLET,
GetView().GetWindow(), &aSet, GetShell());
OSL_ENSURE(pDlg, "Dialogdiet fail!");
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
const SfxPoolItem* pItem;
if( RET_OK == nRet )
{
- if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pDlg->GetOutputItemSet()->GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
rReq.AppendItem(*pItem);
rReq.Done();
@@ -195,7 +195,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
aSetRule.SetSvxRule( *pSetRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// No start of new list, if an existing list style is edited.
// Otherwise start a new list.
const bool bCreateList = (pCurRule == 0);
@@ -204,7 +204,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
// wenn der Dialog mit OK verlassen wurde, aber nichts ausgewaehlt
// wurde dann muss die Numerierung zumindest eingeschaltet werden,
// wenn sie das noch nicht ist
- else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, FALSE, &pItem ))
+ else if( !pCurRule && SFX_ITEM_SET == aSet.GetItemState( SID_ATTR_NUMBERING_RULE, sal_False, &pItem ))
{
rReq.AppendItem( *pItem );
rReq.Done();
@@ -214,7 +214,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
numfunc::GetDefaultPositionAndSpaceMode() );
// <--
aSetRule.SetSvxRule(*pSetRule, GetShell().GetDoc());
- aSetRule.SetAutoRule( TRUE );
+ aSetRule.SetAutoRule( sal_True );
// start new list
GetShell().SetCurNumRule( aSetRule, true );
}