diff options
Diffstat (limited to 'sc/source/ui/app/inputwin.cxx')
-rwxr-xr-x[-rw-r--r--] | sc/source/ui/app/inputwin.cxx | 165 |
1 files changed, 85 insertions, 80 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index eaf5544d41e5..6a93fc130e02 100644..100755 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -101,7 +101,7 @@ enum ScNameInputType SFX_IMPL_CHILDWINDOW(ScInputWindowWrapper,FID_INPUTLINE_STATUS) ScInputWindowWrapper::ScInputWindowWrapper( Window* pParentP, - USHORT nId, + sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* /* pInfo */ ) : SfxChildWindow( pParentP, nId ) @@ -149,7 +149,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : aTextCancel ( ScResId( SCSTR_QHELP_BTNCANCEL ) ), aTextSum ( ScResId( SCSTR_QHELP_BTNSUM ) ), aTextEqual ( ScResId( SCSTR_QHELP_BTNEQUAL ) ), - bIsOkCancelMode ( FALSE ) + bIsOkCancelMode ( false ) { ScModule* pScMod = SC_MOD(); SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); @@ -196,7 +196,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : aWndPos .Show(); aTextWindow .Show(); - pInputHdl = SC_MOD()->GetInputHdl( pViewSh, FALSE ); // use own handler even if ref-handler is set + pInputHdl = SC_MOD()->GetInputHdl( pViewSh, false ); // use own handler even if ref-handler is set if (pInputHdl) pInputHdl->SetInputWindow( this ); @@ -219,14 +219,15 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : pInputHdl->SetMode( SC_INPUT_TABLE ); // Focus kommt eh nach unten } else if ( pViewSh ) - pViewSh->UpdateInputHandler( TRUE ); // unbedingtes Update + pViewSh->UpdateInputHandler( sal_True ); // unbedingtes Update pImgMgr->RegisterToolBox( this ); + SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA)); } ScInputWindow::~ScInputWindow() { - BOOL bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear? + sal_Bool bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear? // if any view's input handler has a pointer to this input window, reset it // (may be several ones, #74522#) @@ -242,7 +243,7 @@ ScInputWindow::~ScInputWindow() if ( pHdl && pHdl->GetInputWindow() == this ) { pHdl->SetInputWindow( NULL ); - pHdl->StopInputWinEngine( FALSE ); // reset pTopView pointer + pHdl->StopInputWinEngine( false ); // reset pTopView pointer } pSh = SfxViewShell::GetNext( *pSh, &aScType ); } @@ -268,7 +269,7 @@ void ScInputWindow::SetInputHandler( ScInputHandler* pNew ) sal_Bool ScInputWindow::UseSubTotal(ScRangeList* pRangeList) const { - sal_Bool bSubTotal(sal_False); + sal_Bool bSubTotal(false); ScTabViewShell* pViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); if ( pViewSh ) { @@ -370,7 +371,7 @@ void ScInputWindow::Select() if ( rMark.IsMarked() || rMark.IsMultiMarked() ) { ScRangeList aMarkRangeList; - rMark.FillRangeListWithMarks( &aMarkRangeList, FALSE ); + rMark.FillRangeListWithMarks( &aMarkRangeList, false ); ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); // check if one of the marked ranges is empty @@ -391,7 +392,7 @@ void ScInputWindow::Select() if ( bEmpty ) { ScRangeList aRangeList; - const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList ); + const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList ); if ( bDataFound ) { ScAddress aAddr = aRangeList.back()->aEnd; @@ -410,7 +411,7 @@ void ScInputWindow::Select() const bool bContinue = ( i != 0 ? true : false ); if ( !pViewSh->AutoSum( aRange, bSubTotal, bSetCursor, bContinue ) ) { - pViewSh->MarkRange( aRange, FALSE, FALSE ); + pViewSh->MarkRange( aRange, false, false ); pViewSh->SetCursor( aRange.aEnd.Col(), aRange.aEnd.Row() ); const ScRangeList aRangeList; ScAddress aAddr = aRange.aEnd; @@ -426,7 +427,7 @@ void ScInputWindow::Select() else // nur in Eingabezeile einfuegen { ScRangeList aRangeList; - const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList ); + const sal_Bool bDataFound = pViewSh->GetAutoSumArea( aRangeList ); const sal_Bool bSubTotal( UseSubTotal( &aRangeList ) ); ScAddress aAddr = pViewSh->GetViewData()->GetCurPos(); const String aFormula = pViewSh->GetAutoSumFormula( aRangeList, bSubTotal, aAddr ); @@ -477,7 +478,7 @@ void ScInputWindow::Select() pView->SetSelection( ESelection(0,1, 0,1) ); pScMod->InputChanged(pView); SetOkCancelMode(); - pView->SetEditEngineUpdateMode(TRUE); + pView->SetEditEngineUpdateMode(sal_True); } } break; @@ -498,7 +499,7 @@ void ScInputWindow::Resize() aTextWindow.Invalidate(); } -void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit ) +void ScInputWindow::SetFuncString( const String& rString, sal_Bool bDoEdit ) { //! new method at ScModule to query if function autopilot is open SfxViewFrame* pViewFrm = SfxViewFrame::Current(); @@ -526,7 +527,7 @@ void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit ) if ( bDoEdit ) SetOkCancelMode(); // nicht, wenn gleich hinterher Enter/Cancel - pView->SetEditEngineUpdateMode(TRUE); + pView->SetEditEngineUpdateMode(sal_True); } } } @@ -566,7 +567,7 @@ void ScInputWindow::SetOkCancelMode() SetHelpId ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL ); SetItemText ( SID_INPUT_OK, aTextOk ); SetHelpId ( SID_INPUT_OK, HID_INSWIN_OK ); - bIsOkCancelMode = TRUE; + bIsOkCancelMode = sal_True; } } @@ -589,13 +590,13 @@ void ScInputWindow::SetSumAssignMode() SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME ); SetItemText ( SID_INPUT_EQUAL, aTextEqual ); SetHelpId ( SID_INPUT_EQUAL, HID_INSWIN_FUNC ); - bIsOkCancelMode = FALSE; + bIsOkCancelMode = false; - SetFormulaMode(FALSE); // kein editieren -> keine Formel + SetFormulaMode(false); // kein editieren -> keine Formel } } -void ScInputWindow::SetFormulaMode( BOOL bSet ) +void ScInputWindow::SetFormulaMode( sal_Bool bSet ) { aWndPos.SetFormulaMode(bSet); aTextWindow.SetFormulaMode(bSet); @@ -611,7 +612,7 @@ String ScInputWindow::GetText() const return ToolBox::GetText(); } -BOOL ScInputWindow::IsInputActive() +sal_Bool ScInputWindow::IsInputActive() { return aTextWindow.IsInputActive(); } @@ -626,7 +627,7 @@ void ScInputWindow::MakeDialogEditView() aTextWindow.MakeDialogEditView(); } -void ScInputWindow::StopEditEngine( BOOL bAll ) +void ScInputWindow::StopEditEngine( sal_Bool bAll ) { aTextWindow.StopEditEngine( bAll ); } @@ -664,7 +665,7 @@ void ScInputWindow::PosGrabFocus() aWndPos.GrabFocus(); } -void ScInputWindow::EnableButtons( BOOL bEnable ) +void ScInputWindow::EnableButtons( sal_Bool bEnable ) { // when enabling buttons, always also enable the input window itself if ( bEnable && !IsEnabled() ) @@ -717,11 +718,11 @@ ScTextWnd::ScTextWnd( Window* pParent ) DragSourceHelper( this ), pEditEngine ( NULL ), pEditView ( NULL ), - bIsInsertMode( TRUE ), - bFormulaMode ( FALSE ), - bInputMode ( FALSE ) + bIsInsertMode( sal_True ), + bFormulaMode ( false ), + bInputMode ( false ) { - EnableRTL( FALSE ); // EditEngine can't be used with VCL EnableRTL + EnableRTL( false ); // EditEngine can't be used with VCL EnableRTL bIsRTL = GetSettings().GetLayoutRTL(); @@ -735,13 +736,17 @@ ScTextWnd::ScTextWnd( Window* pParent ) Color aBgColor= rStyleSettings.GetWindowColor(); Color aTxtColor= rStyleSettings.GetWindowTextColor(); - aTextFont.SetTransparent ( TRUE ); + aTextFont.SetTransparent ( sal_True ); aTextFont.SetFillColor ( aBgColor ); //aTextFont.SetColor ( COL_FIELDTEXT ); aTextFont.SetColor (aTxtColor); aTextFont.SetWeight ( WEIGHT_NORMAL ); - SetSizePixel ( Size(1,TBX_WINDOW_HEIGHT) ); + Size aSize(1,TBX_WINDOW_HEIGHT); + Size aMinEditSize( Edit::GetMinimumEditSize() ); + if( aMinEditSize.Height() > aSize.Height() ) + aSize.Height() = aMinEditSize.Height(); + SetSizePixel ( aSize ); SetBackground ( aBgColor ); SetLineColor ( COL_BLACK ); SetMapMode ( MAP_TWIP ); @@ -816,7 +821,7 @@ void ScTextWnd::MouseButtonDown( const MouseEvent& rMEvt ) if (pEditView) { - pEditView->SetEditEngineUpdateMode( TRUE ); + pEditView->SetEditEngineUpdateMode( sal_True ); pEditView->MouseButtonDown( rMEvt ); } } @@ -839,8 +844,8 @@ void ScTextWnd::MouseButtonUp( const MouseEvent& rMEvt ) void ScTextWnd::Command( const CommandEvent& rCEvt ) { - bInputMode = TRUE; - USHORT nCommand = rCEvt.GetCommand(); + bInputMode = sal_True; + sal_uInt16 nCommand = rCEvt.GetCommand(); if ( pEditView /* && ( nCommand == COMMAND_STARTDRAG || nCommand == COMMAND_VOICE ) */ ) { ScModule* pScMod = SC_MOD(); @@ -850,9 +855,9 @@ void ScTextWnd::Command( const CommandEvent& rCEvt ) // already set in StartEditEngine when the EditEngine is created // verhindern, dass die EditView beim View-Umschalten wegkommt - pScMod->SetInEditCommand( TRUE ); + pScMod->SetInEditCommand( true ); pEditView->Command( rCEvt ); - pScMod->SetInEditCommand( FALSE ); + pScMod->SetInEditCommand( false ); // COMMAND_STARTDRAG heiss noch lange nicht, dass der Inhalt geaendert wurde // darum in dem Fall kein InputChanged @@ -896,14 +901,14 @@ void ScTextWnd::Command( const CommandEvent& rCEvt ) else Window::Command(rCEvt); // sonst soll sich die Basisklasse drum kuemmern... - bInputMode = FALSE; + bInputMode = false; } void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) { if ( pEditView ) { - CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE ); + CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True ); pEditView->Command( aDragEvent ); // handling of d&d to different view (CancelHandler) can't be done here, @@ -913,24 +918,24 @@ void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) void ScTextWnd::KeyInput(const KeyEvent& rKEvt) { - bInputMode = TRUE; + bInputMode = sal_True; if (!SC_MOD()->InputKeyEvent( rKEvt )) { - BOOL bUsed = FALSE; + sal_Bool bUsed = false; ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) bUsed = pViewSh->SfxKeyInput(rKEvt); // nur Acceleratoren, keine Eingabe if (!bUsed) Window::KeyInput( rKEvt ); } - bInputMode = FALSE; + bInputMode = false; } void ScTextWnd::GetFocus() { ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) - pViewSh->SetFormShellAtTop( FALSE ); // focus in input line -> FormShell no longer on top + pViewSh->SetFormShellAtTop( false ); // focus in input line -> FormShell no longer on top } void ScTextWnd::LoseFocus() @@ -947,7 +952,7 @@ String ScTextWnd::GetText() const return GetTextString(); } -void ScTextWnd::SetFormulaMode( BOOL bSet ) +void ScTextWnd::SetFormulaMode( sal_Bool bSet ) { if ( bSet != bFormulaMode ) { @@ -960,8 +965,8 @@ void ScTextWnd::UpdateAutoCorrFlag() { if ( pEditEngine ) { - ULONG nControl = pEditEngine->GetControlWord(); - ULONG nOld = nControl; + sal_uLong nControl = pEditEngine->GetControlWord(); + sal_uLong nOld = nControl; if ( bFormulaMode ) nControl &= ~EE_CNTRL_AUTOCORRECT; // keine Autokorrektur in Formeln else @@ -998,7 +1003,7 @@ void lcl_ModifyRTLDefaults( SfxItemSet& rSet ) //rSet.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) ); // PaperSize width is limited to USHRT_MAX in RTL mode (because of EditEngine's - // USHORT values in EditLine), so the text may be wrapped and line spacing must be + // sal_uInt16 values in EditLine), so the text may be wrapped and line spacing must be // increased to not see the beginning of the next line. SvxLineSpacingItem aItem( SVX_LINESPACE_TWO_LINES, EE_PARA_SBL ); aItem.SetPropLineSpace( 200 ); @@ -1032,11 +1037,11 @@ void ScTextWnd::StartEditEngine() pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); } else - pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE ); - pNew->SetExecuteURL( FALSE ); + pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True ); + pNew->SetExecuteURL( false ); pEditEngine = pNew; - pEditEngine->SetUpdateMode( FALSE ); + pEditEngine->SetUpdateMode( false ); pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) ); pEditEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEditEngine->GetWordDelimiters() ) ); @@ -1048,7 +1053,7 @@ void ScTextWnd::StartEditEngine() pEditEngine->SetFontInfoInItemSet( *pSet, aTextFont ); lcl_ExtendEditFontAttribs( *pSet ); // turn off script spacing to match DrawText output - pSet->Put( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) ); + pSet->Put( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) ); if ( bIsRTL ) lcl_ModifyRTLDefaults( *pSet ); pEditEngine->SetDefaults( pSet ); @@ -1057,12 +1062,12 @@ void ScTextWnd::StartEditEngine() // Wenn in der Zelle URL-Felder enthalten sind, muessen die auch in // die Eingabezeile uebernommen werden, weil sonst die Positionen nicht stimmen. - BOOL bFilled = FALSE; + sal_Bool bFilled = false; ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); if ( pHdl ) //! Testen, ob's der richtige InputHdl ist? bFilled = pHdl->GetTextAndFields( *pEditEngine ); - pEditEngine->SetUpdateMode( TRUE ); + pEditEngine->SetUpdateMode( sal_True ); // aString ist die Wahrheit... if ( bFilled && pEditEngine->GetText() == aString ) @@ -1074,7 +1079,7 @@ void ScTextWnd::StartEditEngine() pEditView->SetInsertMode(bIsInsertMode); // Text aus Clipboard wird als ASCII einzeilig uebernommen - ULONG n = pEditView->GetControlWord(); + sal_uLong n = pEditView->GetControlWord(); pEditView->SetControlWord( n | EV_CNTRL_SINGLELINEPASTE ); pEditEngine->InsertView( pEditView, EE_APPEND ); @@ -1095,7 +1100,7 @@ void ScTextWnd::StartEditEngine() if ( pObjSh && pObjSh->ISA(ScDocShell) ) { ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument(); // any document - BYTE nScript = pDoc->GetStringScriptType( aString ); + sal_uInt8 nScript = pDoc->GetStringScriptType( aString ); if ( nScript & SCRIPTTYPE_COMPLEX ) Invalidate(); } @@ -1118,13 +1123,13 @@ IMPL_LINK(ScTextWnd, NotifyHdl, EENotify*, EMPTYARG) // while an InputHandler method is modifying the EditEngine content if ( pHdl && !pHdl->IsInOwnChange() ) - pHdl->InputChanged( pEditView, TRUE ); // #i20282# InputChanged must know if called from modify handler + pHdl->InputChanged( pEditView, sal_True ); // #i20282# InputChanged must know if called from modify handler } return 0; } -void ScTextWnd::StopEditEngine( BOOL bAll ) +void ScTextWnd::StopEditEngine( sal_Bool bAll ) { if (pEditView) { @@ -1137,7 +1142,7 @@ void ScTextWnd::StopEditEngine( BOOL bAll ) pScMod->InputSelection( pEditView ); aString = pEditEngine->GetText(); bIsInsertMode = pEditView->IsInsertMode(); - BOOL bSelection = pEditView->HasSelection(); + sal_Bool bSelection = pEditView->HasSelection(); pEditEngine->SetModifyHdl(Link()); DELETEZ(pEditView); DELETEZ(pEditEngine); @@ -1158,20 +1163,20 @@ void ScTextWnd::SetTextString( const String& rNewString ) { if ( rNewString != aString ) { - bInputMode = TRUE; + bInputMode = sal_True; // Position der Aenderung suchen, nur Rest painten if (!pEditEngine) { - BOOL bPaintAll; + sal_Bool bPaintAll; if ( bIsRTL ) - bPaintAll = TRUE; + bPaintAll = sal_True; else { // test if CTL script type is involved - BYTE nOldScript = 0; - BYTE nNewScript = 0; + sal_uInt8 nOldScript = 0; + sal_uInt8 nNewScript = 0; SfxObjectShell* pObjSh = SfxObjectShell::Current(); if ( pObjSh && pObjSh->ISA(ScDocShell) ) { @@ -1214,7 +1219,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) if (nDifPos) nInvPos += GetTextWidth(aString,0,nDifPos); - USHORT nFlags = 0; + sal_uInt16 nFlags = 0; if ( nDifPos == aString.Len() ) // only new characters appended nFlags = INVALIDATE_NOERASE; // then background is already clear @@ -1233,7 +1238,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) if (!maAccTextDatas.empty()) maAccTextDatas.back()->TextChanged(); - bInputMode = FALSE; + bInputMode = false; } } @@ -1242,7 +1247,7 @@ const String& ScTextWnd::GetTextString() const return aString; } -BOOL ScTextWnd::IsInputActive() +sal_Bool ScTextWnd::IsInputActive() { return HasFocus(); } @@ -1264,11 +1269,11 @@ void ScTextWnd::MakeDialogEditView() pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); } else - pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE ); - pNew->SetExecuteURL( FALSE ); + pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True ); + pNew->SetExecuteURL( false ); pEditEngine = pNew; - pEditEngine->SetUpdateMode( FALSE ); + pEditEngine->SetUpdateMode( false ); pEditEngine->SetWordDelimiters( pEditEngine->GetWordDelimiters() += '=' ); pEditEngine->SetPaperSize( Size( bIsRTL ? USHRT_MAX : THESIZE, 300 ) ); @@ -1278,7 +1283,7 @@ void ScTextWnd::MakeDialogEditView() if ( bIsRTL ) lcl_ModifyRTLDefaults( *pSet ); pEditEngine->SetDefaults( pSet ); - pEditEngine->SetUpdateMode( TRUE ); + pEditEngine->SetUpdateMode( sal_True ); pEditView = new EditView( pEditEngine, this ); pEditEngine->InsertView( pEditView, EE_APPEND ); @@ -1353,7 +1358,7 @@ ScPosWnd::ScPosWnd( Window* pParent ) : ComboBox ( pParent, WinBits(WB_HIDE | WB_DROPDOWN) ), pAccel ( NULL ), nTipVisible ( 0 ), - bFormulaMode( FALSE ) + bFormulaMode( false ) { Size aSize( GetTextWidth( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("GW99999:GW99999")) ), GetTextHeight() ); @@ -1375,7 +1380,7 @@ ScPosWnd::~ScPosWnd() delete pAccel; } -void ScPosWnd::SetFormulaMode( BOOL bSet ) +void ScPosWnd::SetFormulaMode( sal_Bool bSet ) { if ( bSet != bFormulaMode ) { @@ -1446,16 +1451,16 @@ void ScPosWnd::FillFunctions() String aFirstName; const ScAppOptions& rOpt = SC_MOD()->GetAppOptions(); - USHORT nMRUCount = rOpt.GetLRUFuncListCount(); - const USHORT* pMRUList = rOpt.GetLRUFuncList(); + sal_uInt16 nMRUCount = rOpt.GetLRUFuncListCount(); + const sal_uInt16* pMRUList = rOpt.GetLRUFuncList(); if (pMRUList) { const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); - ULONG nListCount = pFuncList->GetCount(); - for (USHORT i=0; i<nMRUCount; i++) + sal_uLong nListCount = pFuncList->GetCount(); + for (sal_uInt16 i=0; i<nMRUCount; i++) { - USHORT nId = pMRUList[i]; - for (ULONG j=0; j<nListCount; j++) + sal_uInt16 nId = pMRUList[i]; + for (sal_uLong j=0; j<nListCount; j++) { const ScFuncDesc* pDesc = pFuncList->GetFunction( j ); if ( pDesc->nFIndex == nId && pDesc->pFuncName ) @@ -1485,13 +1490,13 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( rHint.ISA(SfxSimpleHint) ) { - ULONG nHintId = ((SfxSimpleHint&)rHint).GetId(); + sal_uLong nHintId = ((SfxSimpleHint&)rHint).GetId(); if ( nHintId == SC_HINT_AREAS_CHANGED || nHintId == SC_HINT_NAVIGATOR_UPDATEALL) FillRangeNames(); } else if ( rHint.ISA(SfxEventHint) ) { - ULONG nEventId = ((SfxEventHint&)rHint).GetEventId(); + sal_uLong nEventId = ((SfxEventHint&)rHint).GetEventId(); if ( nEventId == SFX_EVENT_ACTIVATEDOC ) FillRangeNames(); } @@ -1565,7 +1570,7 @@ void ScPosWnd::Modify() // determine the action that would be taken for the current input ScNameInputType eType = lcl_GetInputType( GetText() ); // uses current view - USHORT nStrId = 0; + sal_uInt16 nStrId = 0; switch ( eType ) { case SC_NAME_INPUT_CELL: @@ -1607,7 +1612,7 @@ void ScPosWnd::Modify() Rectangle aRect( aPos, aPos ); String aText = ScGlobal::GetRscString( nStrId ); - USHORT nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM; + sal_uInt16 nAlign = QUICKHELP_LEFT|QUICKHELP_BOTTOM; nTipVisible = Help::ShowTip(pWin, aRect, aText, nAlign); } } @@ -1660,7 +1665,7 @@ void ScPosWnd::DoEnter() ScNameInputType eType = lcl_GetInputType( aText ); if ( eType == SC_NAME_INPUT_BAD_NAME || eType == SC_NAME_INPUT_BAD_SELECTION ) { - USHORT nId = ( eType == SC_NAME_INPUT_BAD_NAME ) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION; + sal_uInt16 nId = ( eType == SC_NAME_INPUT_BAD_NAME ) ? STR_NAME_ERROR_NAME : STR_NAME_ERROR_SELECTION; pViewSh->ErrorMessage( nId ); } else if ( eType == SC_NAME_INPUT_DEFINE ) @@ -1682,7 +1687,7 @@ void ScPosWnd::DoEnter() { ScDocFunc aFunc(*pDocShell); aFunc.ModifyRangeNames( aNewRanges ); - pViewSh->UpdateInputHandler(TRUE); + pViewSh->UpdateInputHandler(true); } else delete pNew; // shouldn't happen @@ -1693,7 +1698,7 @@ void ScPosWnd::DoEnter() // for all selection types, excecute the SID_CURRENTCELL slot SfxStringItem aPosItem( SID_CURRENTCELL, aText ); - SfxBoolItem aUnmarkItem( FN_PARAM_1, TRUE ); // remove existing selection + SfxBoolItem aUnmarkItem( FN_PARAM_1, sal_True ); // remove existing selection pViewSh->GetViewData()->GetDispatcher().Execute( SID_CURRENTCELL, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, |