diff options
Diffstat (limited to 'sw/source/ui/ribbar/inputwin.cxx')
-rwxr-xr-x | sw/source/ui/ribbar/inputwin.cxx | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index e6d7bf26db80..f6429dbdfc9f 100755 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -75,8 +75,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) pBindings(pBind), aAktTableName(aEmptyStr) { - bFirst = bDoesUndo = TRUE; - bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = FALSE; + bFirst = bDoesUndo = sal_True; + bActive = bIsTable = bDelSel = bResetUndo = bCallUndo = sal_False; FreeResource(); @@ -94,7 +94,7 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) InsertWindow( ED_FORMULA, &aEdit); SetHelpId(ED_FORMULA, HID_EDIT_FORMULA); - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC, bHC )); SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL, bHC )); SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY, bHC )); @@ -135,8 +135,8 @@ __EXPORT SwInputWindow::~SwInputWindow() //Lineale aufwecken if(pView) { - pView->GetHLineal().SetActive( TRUE ); - pView->GetVLineal().SetActive( TRUE ); + pView->GetHLineal().SetActive( sal_True ); + pView->GetVLineal().SetActive( sal_True ); } if ( pMgr ) delete pMgr; @@ -162,7 +162,7 @@ void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) // update item images SwModule *pMod = SW_MOD(); SfxImageManager *pImgMgr = SfxImageManager::GetImageManager( pMod ); - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC, bHC )); SetItemImage( FN_FORMULA_CANCEL, pImgMgr->GetImage(FN_FORMULA_CANCEL, bHC )); @@ -191,16 +191,16 @@ void __EXPORT SwInputWindow::Resize() void SwInputWindow::ShowWin() { - bIsTable = FALSE; + bIsTable = sal_False; //Lineale anhalten if(pView) { - pView->GetHLineal().SetActive( FALSE ); - pView->GetVLineal().SetActive( FALSE ); + pView->GetHLineal().SetActive( sal_False ); + pView->GetVLineal().SetActive( sal_False ); DBG_ASSERT(pWrtShell, "Keine WrtShell!"); // Cursor in Tabelle - bIsTable = pWrtShell->IsCrsrInTbl() ? TRUE : FALSE; + bIsTable = pWrtShell->IsCrsrInTbl() ? sal_True : sal_False; if( bFirst ) pWrtShell->SelTblCells( LINK( this, SwInputWindow, @@ -208,7 +208,7 @@ void SwInputWindow::ShowWin() if( bIsTable ) { const String& rPos = pWrtShell->GetBoxNms(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; short nSrch = -1; while( (nPos = rPos.Search( ':',nPos + 1 ) ) != STRING_NOTFOUND ) nSrch = (short) nPos; @@ -233,13 +233,13 @@ void SwInputWindow::ShowWin() { if( bIsTable ) { - bResetUndo = TRUE; + bResetUndo = sal_True; nActionCnt = SwEditShell::GetUndoActionCount(); SwEditShell::SetUndoActionCount( nActionCnt + 1 ); bDoesUndo = pWrtShell->DoesUndo(); if( !bDoesUndo ) - pWrtShell->DoUndo( TRUE ); + pWrtShell->DoUndo( sal_True ); if( !pWrtShell->SwCrsrShell::HasSelection() ) { @@ -252,9 +252,9 @@ void SwInputWindow::ShowWin() pWrtShell->StartUndo( UNDO_DELETE ); pWrtShell->Delete(); if( 0 != pWrtShell->EndUndo( UNDO_DELETE )) - bCallUndo = TRUE; + bCallUndo = sal_True; } - pWrtShell->DoUndo( FALSE ); + pWrtShell->DoUndo( sal_False ); SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); if( pWrtShell->GetTblBoxFormulaAttrs( aSet )) @@ -269,7 +269,7 @@ void SwInputWindow::ShowWin() pWrtShell->EndSelect(); } - bFirst = FALSE; + bFirst = sal_False; aEdit.SetModifyHdl( LINK( this, SwInputWindow, ModifyHdl )); @@ -282,8 +282,8 @@ void SwInputWindow::ShowWin() aEdit.GrabFocus(); // UserInterface fuer die Eingabe abklemmen - pView->GetEditWin().LockKeyInput(TRUE); - pView->GetViewFrame()->GetDispatcher()->Lock(TRUE); + pView->GetEditWin().LockKeyInput(sal_True); + pView->GetViewFrame()->GetDispatcher()->Lock(sal_True); pWrtShell->Push(); } ToolBox::Show(); @@ -320,7 +320,7 @@ static const char * __READONLY_DATA aStrArr[] = { sCalc_Round }; - USHORT nId = pMenu->GetCurItemId(); + sal_uInt16 nId = pMenu->GetCurItemId(); if ( nId <= MN_CALC_ROUND ) { String aTmp( String::CreateFromAscii(aStrArr[nId - 1]) ); @@ -332,7 +332,7 @@ static const char * __READONLY_DATA aStrArr[] = { IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) { - USHORT nCurID = GetCurItemId(); + sal_uInt16 nCurID = GetCurItemId(); EndSelection(); // setzt CurItemId zurueck ! switch ( nCurID ) { @@ -345,7 +345,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) } } - return TRUE; + return sal_True; } //================================================================== @@ -353,7 +353,7 @@ IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) void __EXPORT SwInputWindow::Click( ) { - USHORT nCurID = GetCurItemId(); + sal_uInt16 nCurID = GetCurItemId(); EndSelection(); // setzt CurItemId zurueck ! switch ( nCurID ) { @@ -374,8 +374,8 @@ void __EXPORT SwInputWindow::Click( ) void SwInputWindow::ApplyFormula() { - pView->GetViewFrame()->GetDispatcher()->Lock(FALSE); - pView->GetEditWin().LockKeyInput(FALSE); + pView->GetViewFrame()->GetDispatcher()->Lock(sal_False); + pView->GetEditWin().LockKeyInput(sal_False); if( bResetUndo ) { DelBoxCntnt(); @@ -383,9 +383,9 @@ void SwInputWindow::ApplyFormula() SwEditShell::SetUndoActionCount( nActionCnt ); if( bCallUndo ) pWrtShell->Undo(); - bResetUndo = FALSE; + bResetUndo = sal_False; } - pWrtShell->Pop( FALSE ); + pWrtShell->Pop( sal_False ); // JP 13.01.97: Formel soll immer mit einem "=" beginnen, hier // also wieder entfernen @@ -409,8 +409,8 @@ void SwInputWindow::CancelFormula() { if(pView) { - pView->GetViewFrame()->GetDispatcher()->Lock( FALSE ); - pView->GetEditWin().LockKeyInput(FALSE); + pView->GetViewFrame()->GetDispatcher()->Lock( sal_False ); + pView->GetEditWin().LockKeyInput(sal_False); if( bResetUndo ) { DelBoxCntnt(); @@ -418,9 +418,9 @@ void SwInputWindow::CancelFormula() SwEditShell::SetUndoActionCount( nActionCnt ); if( bCallUndo ) pWrtShell->Undo(); - bResetUndo = FALSE; + bResetUndo = sal_False; } - pWrtShell->Pop( FALSE ); + pWrtShell->Pop( sal_False ); if( bDelSel ) pWrtShell->EnterStdMode(); @@ -478,7 +478,7 @@ IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller ) } -void SwInputWindow::SetFormula( const String& rFormula, BOOL bDelFlag ) +void SwInputWindow::SetFormula( const String& rFormula, sal_Bool bDelFlag ) { String sEdit( '=' ); if( rFormula.Len() ) @@ -518,7 +518,7 @@ void SwInputWindow::DelBoxCntnt() { pWrtShell->StartAllAction(); pWrtShell->ClearMark(); - pWrtShell->Pop( FALSE ); + pWrtShell->Pop( sal_False ); pWrtShell->Push(); pWrtShell->MoveSection( fnSectionCurr, fnSectionStart ); pWrtShell->SetMark(); @@ -559,32 +559,32 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes, String aBoxes = aPrefix; aBoxes += rBoxes; Selection aSelection(GetSelection()); - USHORT nSel = (USHORT) aSelection.Len(); + sal_uInt16 nSel = (sal_uInt16) aSelection.Len(); //OS: mit dem folgenden Ausdruck wird sichergestellt, dass im overwrite-Modus //die selektierte schliessende Klammer nicht geloescht wird if( nSel && ( nSel > 1 || - GetText().GetChar( (USHORT)aSelection.Min() ) != cClose ) ) + GetText().GetChar( (sal_uInt16)aSelection.Min() ) != cClose ) ) Cut(); else aSelection.Max() = aSelection.Min(); String aActText(GetText()); - const USHORT nLen = aActText.Len(); + const sal_uInt16 nLen = aActText.Len(); if( !nLen ) { String aStr(cOpen); aStr += aBoxes; aStr += cClose; SetText(aStr); - USHORT nPos = aStr.Search( cClose ); + sal_uInt16 nPos = aStr.Search( cClose ); ASSERT(nPos < aStr.Len(), Delimiter nicht gefunden.); ++nPos; SetSelection( Selection( nPos, nPos )); } else { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; sal_Unicode cCh; - USHORT nPos, nEndPos = 0, nStartPos = (USHORT) aSelection.Min(); + sal_uInt16 nPos, nEndPos = 0, nStartPos = (sal_uInt16) aSelection.Min(); if( nStartPos-- ) { do { @@ -598,22 +598,22 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes, } if( bFound ) { - bFound = FALSE; + bFound = sal_False; nEndPos = nStartPos; while( nEndPos < nLen ) { if( cClose == (cCh = aActText.GetChar( nEndPos )) /*|| cCh == cCloseBracket*/ ) { - bFound = TRUE; + bFound = sal_True; break; } ++nEndPos; } // nur wenn akt. Pos im Breich oder direkt dahinter liegt - if( bFound && !( nStartPos < (USHORT)aSelection.Max() && - (USHORT)aSelection.Max() <= nEndPos + 1 )) - bFound = FALSE; + if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() && + (sal_uInt16)aSelection.Max() <= nEndPos + 1 )) + bFound = sal_False; } if( bFound ) { @@ -627,7 +627,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes, String aTmp( (char)cOpen ); aTmp += aBoxes; aTmp += (char)cClose; - nPos = (USHORT)aSelection.Min(); + nPos = (sal_uInt16)aSelection.Min(); aActText.Insert( aTmp, nPos ); nPos = nPos + aTmp.Len(); } @@ -645,7 +645,7 @@ void __EXPORT InputEdit::UpdateRange(const String& rBoxes, SwInputChild::SwInputChild(Window* _pParent, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* ) : SfxChildWindow( _pParent, nId ) @@ -660,7 +660,7 @@ SwInputChild::SwInputChild(Window* _pParent, __EXPORT SwInputChild::~SwInputChild() { if(pDispatch) - pDispatch->Lock(FALSE); + pDispatch->Lock(sal_False); } |