diff options
Diffstat (limited to 'sw/source/ui/shells/drwtxtsh.cxx')
-rw-r--r-- | sw/source/ui/shells/drwtxtsh.cxx | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 78a9b05ce70b..8e4dfd362c15 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -127,7 +127,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()); @@ -160,7 +160,7 @@ SwDrawTextShell::SwDrawTextShell(SwView &rV) : Init(); - rSh.NoEdit(TRUE); + rSh.NoEdit(sal_True); SetName(String::CreateFromAscii("ObjectText")); SetHelpId(SW_DRWTXTSHELL); } @@ -202,7 +202,7 @@ SwWrtShell& SwDrawTextShell::GetShell() void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while (nWhich) { @@ -239,7 +239,7 @@ void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr) -BOOL SwDrawTextShell::IsTextEdit() +sal_Bool SwDrawTextShell::IsTextEdit() { return pSdrView->IsTextEdit(); } @@ -254,7 +254,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() ) { @@ -276,7 +276,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))); } @@ -312,12 +312,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()); @@ -348,7 +348,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) ) @@ -361,13 +361,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 @@ -524,7 +524,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; @@ -535,9 +535,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; @@ -545,7 +545,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; @@ -572,7 +572,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) { @@ -593,7 +593,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(); @@ -609,31 +609,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; @@ -660,7 +660,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 ) @@ -668,27 +668,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 ); @@ -772,7 +772,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; @@ -780,25 +780,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(); } @@ -807,7 +807,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(); @@ -820,11 +820,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() ); @@ -849,7 +849,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(), @@ -887,7 +887,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 ) ); @@ -899,7 +899,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) /*-- 22.10.2003 14:26:32--------------------------------------------------- -----------------------------------------------------------------------*/ -SfxUndoManager* SwDrawTextShell::GetUndoManager() +::svl::IUndoManager* SwDrawTextShell::GetUndoManager() { SwWrtShell &rSh = GetShell(); pSdrView = rSh.GetDrawView(); |