summaryrefslogtreecommitdiff
path: root/sw/source/ui/shells/drwtxtsh.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/shells/drwtxtsh.cxx')
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx84
1 files changed, 42 insertions, 42 deletions
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 22d9de6afc3a..6efdd202ed6e 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();