diff options
author | Carsten Driesner <cd@openoffice.org> | 2011-01-17 15:06:54 +0100 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2011-01-17 15:06:54 +0100 |
commit | 7f33ed417b2e29e5470724ea76967f64699a2662 (patch) | |
tree | abfa1432c5ffffe4c7502d4ddcaee918c584c69c /sw/source/ui/shells/frmsh.cxx | |
parent | 80731dbfcb48a2ffec30a4b2abe1ba8ada8f0169 (diff) |
removetooltypes01: #i112600# Remove tools types from sw
Diffstat (limited to 'sw/source/ui/shells/frmsh.cxx')
-rw-r--r-- | sw/source/ui/shells/frmsh.cxx | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index 1bb2ae01ba6e..07d88ea5ac5d 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -122,10 +122,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 ) { @@ -146,11 +146,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) @@ -165,15 +165,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()); @@ -197,7 +197,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(); @@ -212,7 +212,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; @@ -221,7 +221,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) } rSh.SetFlyName(sName); } - aURL.SetURL( rURL, FALSE ); + aURL.SetURL( rURL, sal_False ); aURL.SetTargetFrameName(rTarget); aSet.Put( aURL ); @@ -283,7 +283,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 ); @@ -298,7 +298,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) delete pDialog; } break; - default: bMore = TRUE; + default: bMore = sal_True; } if ( !bMore ) @@ -306,9 +306,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: @@ -371,18 +371,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; @@ -392,7 +392,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 { @@ -452,23 +452,23 @@ void SwFrameShell::Execute(SfxRequest &rReq) const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() ); aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) ); - UINT16 nDefPage = 0; - if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, FALSE, &pItem) == SFX_ITEM_SET) + 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(); DBG_ASSERT(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); DBG_ASSERT(pDlg, "Dialogdiet fail!"); @@ -479,13 +479,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)) { // --> OD 2009-07-13 #i73249# // rSh.SetAlternateText(((const SfxStringItem*)pItem)->GetValue()); @@ -499,7 +499,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, @@ -508,7 +508,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 @@ -517,7 +517,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(); @@ -551,7 +551,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(); @@ -588,7 +588,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) } } else - bUpdateMgr = FALSE; + bUpdateMgr = sal_False; delete pDlg; } } @@ -596,19 +596,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 ) @@ -664,7 +664,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(), @@ -675,16 +675,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 ) @@ -706,7 +706,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 : @@ -742,7 +742,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) rSet.DisableItem( nWhich ); else { - USHORT nId = 0; + sal_uInt16 nId = 0; if (eFrmType & FRMTYPE_FLY_INCNT) { switch (nWhich) @@ -807,7 +807,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()); @@ -837,7 +837,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 ) ); } } @@ -928,7 +928,7 @@ SwFrameShell::~SwFrameShell() void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) { SwWrtShell &rSh = GetShell(); - BOOL bDefault = FALSE; + sal_Bool bDefault = sal_False; if (!rSh.IsFrmSelected()) return; @@ -943,7 +943,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); @@ -956,7 +956,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; @@ -1000,7 +1000,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; @@ -1054,7 +1054,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(); @@ -1121,7 +1121,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) { |