[Libreoffice-commits] .: 2 commits - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed Feb 8 20:01:31 PST 2012


 sc/source/ui/app/inputhdl.cxx |  324 ++++++++++++++++++++----------------------
 sc/source/ui/app/inputwin.cxx |    2 
 sc/source/ui/app/scmod.cxx    |    2 
 sc/source/ui/inc/inputhdl.hxx |  101 ++++++-------
 4 files changed, 214 insertions(+), 215 deletions(-)

New commits:
commit ec84bbb208d59d042f8f0522fa96ed2ad94f2ca7
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Wed Feb 8 23:00:59 2012 -0500

    String to rtl::OUString.

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index c5018eb..fa102dd 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -794,7 +794,7 @@ void ScInputHandler::HideTip()
         nTipVisible = 0;
         pTipVisibleParent = NULL;
     }
-    aManualTip.Erase();
+    aManualTip = rtl::OUString();
 }
 void ScInputHandler::HideTipBelow()
 {
@@ -806,7 +806,7 @@ void ScInputHandler::HideTipBelow()
         nTipVisibleSec = 0;
         pTipVisibleSecParent = NULL;
     }
-    aManualTip.Erase();
+    aManualTip = rtl::OUString();
 }
 
 void ScInputHandler::ShowTipCursor()
@@ -1377,7 +1377,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
 
 void ScInputHandler::FormulaPreview()
 {
-    String aValue;
+    rtl::OUString aValue;
     EditView* pActiveView = pTopView ? pTopView : pTableView;
     if ( pActiveView && pActiveViewSh )
     {
@@ -1388,7 +1388,7 @@ void ScInputHandler::FormulaPreview()
         aValue = lcl_Calculate( aPart, pDoc, aCursorPos );
     }
 
-    if (aValue.Len())
+    if (!aValue.isEmpty())
     {
         ShowTip( aValue );          //  als QuickHelp anzeigen
         aManualTip = aValue;        //  nach ShowTip setzen
@@ -1404,8 +1404,8 @@ void ScInputHandler::PasteManualTip()
     //  drei Punkte am Ende -> Bereichsreferenz -> nicht einfuegen
     //  (wenn wir mal Matrix-Konstanten haben, kann das geaendert werden)
 
-    xub_StrLen nTipLen = aManualTip.Len();
-    if ( nTipLen && ( nTipLen < 3 || !aManualTip.Copy( nTipLen-3 ).EqualsAscii("...") ) )
+    sal_Int32 nTipLen = aManualTip.getLength();
+    if ( nTipLen && ( nTipLen < 3 || !aManualTip.copy( nTipLen-3 ).equalsAscii("...") ) )
     {
         DataChanging();                                     // kann nicht neu sein
 
@@ -2817,7 +2817,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
     HideTipBelow();
 
     nFormSelStart = nFormSelEnd = 0;
-    aFormText.Erase();
+    aFormText = rtl::OUString();
 
     bInOwnChange = false;
     bInEnterHandler = false;
@@ -2869,7 +2869,7 @@ void ScInputHandler::CancelHandler()
         NotifyChange( pLastState, true );
 
     nFormSelStart = nFormSelEnd = 0;
-    aFormText.Erase();
+    aFormText = rtl::OUString();
 
     bInOwnChange = false;
 }
@@ -3116,7 +3116,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false
                 PasteFunctionData();
                 bUsed = true;
             }
-            else if ( nModi == 0 && nTipVisible && aManualTip.Len() )
+            else if ( nModi == 0 && nTipVisible && !aManualTip.isEmpty() )
             {
                 PasteManualTip();
                 bUsed = true;
@@ -3840,19 +3840,24 @@ void ScInputHandler::InputSetSelection( xub_StrLen nStart, xub_StrLen nEnd )
 
 //------------------------------------------------------------------------
 
-void ScInputHandler::InputReplaceSelection( const String& rStr )
+void ScInputHandler::InputReplaceSelection( const rtl::OUString& rStr )
 {
     if (!pRefViewSh)
         pRefViewSh = pActiveViewSh;
 
     OSL_ENSURE(nFormSelEnd>=nFormSelStart,"Selektion kaputt...");
 
-    xub_StrLen nOldLen = nFormSelEnd-nFormSelStart;
-    xub_StrLen nNewLen = rStr.Len();
+    sal_Int32 nOldLen = nFormSelEnd - nFormSelStart;
+    sal_Int32 nNewLen = rStr.getLength();
+
+    rtl::OUStringBuffer aBuf(aFormText);
     if (nOldLen)
-        aFormText.Erase( nFormSelStart, nOldLen );
+        aBuf.remove(nFormSelStart, nOldLen);
     if (nNewLen)
-        aFormText.Insert( rStr, nFormSelStart );
+        aBuf.insert(nFormSelStart, rStr);
+
+    aFormText = aBuf.makeStringAndClear();
+
     nFormSelEnd = nFormSelStart + nNewLen;
 
     EditView* pView = GetFuncEditView();
@@ -3866,13 +3871,6 @@ void ScInputHandler::InputReplaceSelection( const String& rStr )
     bModified = true;
 }
 
-//------------------------------------------------------------------------
-
-String ScInputHandler::InputGetFormulaStr()
-{
-    return aFormText;   //! eigene Membervariable?
-}
-
 //========================================================================
 //  ScInputHdlState
 //========================================================================
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index ebdea66..ccfde48 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -242,7 +242,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) :
     if (pInputHdl)
         pInputHdl->SetInputWindow( this );
 
-    if ( pInputHdl && pInputHdl->GetFormString().Len() )
+    if (pInputHdl && !pInputHdl->GetFormString().isEmpty())
     {
         //  Umschalten waehrend der Funktionsautopilot aktiv ist
         //  -> Inhalt des Funktionsautopiloten wieder anzeigen
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 2b84ace..d34847f 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1482,7 +1482,7 @@ String ScModule::InputGetFormulaStr()
     ScInputHandler* pHdl = GetInputHdl();
     String aStr;
     if ( pHdl )
-        aStr = pHdl->InputGetFormulaStr();
+        aStr = pHdl->GetFormString();
     return aStr;
 }
 
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index 53c7d33..18cceb8 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -80,12 +80,12 @@ private:
     sal_uLong                   nTipVisible;
     Window*                 pTipVisibleSecParent;
     sal_uLong                   nTipVisibleSec;
-    String                  aManualTip;
+    rtl::OUString           aManualTip;
     rtl::OUString           aAutoSearch;
 
     rtl::OUString           aCurrentText;
 
-    String                  aFormText;                  // fuer Funktions-Autopilot
+    rtl::OUString           aFormText;                  // fuer Funktions-Autopilot
     xub_StrLen              nFormSelStart;              // Selektion fuer Funktions-Autopilot
     xub_StrLen              nFormSelEnd;
 
@@ -180,7 +180,7 @@ public:
     bool            IsTopMode() const   { return (eMode == SC_INPUT_TOP);  }
 
     const rtl::OUString& GetEditString();
-    const String&   GetFormString() const   { return aFormText; }
+    const rtl::OUString& GetFormString() const { return aFormText; }
 
     const ScAddress& GetCursorPos() const   { return aCursorPos; }
 
@@ -242,8 +242,7 @@ public:
     // Kommunikation mit Funktionsautopilot
     void            InputGetSelection       ( xub_StrLen& rStart, xub_StrLen& rEnd );
     void            InputSetSelection       ( xub_StrLen nStart, xub_StrLen nEnd );
-    void            InputReplaceSelection   ( const String& rStr );
-    String          InputGetFormulaStr      ();
+    void            InputReplaceSelection   ( const rtl::OUString& rStr );
 
     bool            IsFormulaMode() const                   { return bFormulaMode; }
     ScInputWindow*  GetInputWindow()                        { return pInputWin; }
commit 57fce1ee55293f61ccbe56679f11cc8f90ab8dc2
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Wed Feb 8 22:16:12 2012 -0500

    bool cleanups.

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index b1329e2..c5018eb 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -98,8 +98,8 @@ using namespace formula;
 
 // STATIC DATA -----------------------------------------------------------
 
-sal_Bool ScInputHandler::bOptLoaded = false;            // App-Optionen ausgewertet
-sal_Bool ScInputHandler::bAutoComplete = false;         // wird in KeyInput gesetzt
+bool ScInputHandler::bOptLoaded = false;            // App-Optionen ausgewertet
+bool ScInputHandler::bAutoComplete = false;         // wird in KeyInput gesetzt
 
 extern sal_uInt16 nEditAdjust;      //! Member an ViewData
 
@@ -302,7 +302,7 @@ handle_r1c1:
 
     if (nCount)
     {
-        pEngine->SetUpdateMode( sal_True );
+        pEngine->SetUpdateMode( true );
 
         pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) );
     }
@@ -352,7 +352,7 @@ void ScInputHandler::UpdateRange( sal_uInt16 nIndex, const ScRange& rNew )
         lcl_Replace( pTopView, aNewStr, aOldSel );
         lcl_Replace( pTableView, aNewStr, aOldSel );
 
-        bInRangeUpdate = sal_True;
+        bInRangeUpdate = true;
         DataChanged();
         bInRangeUpdate = false;
 
@@ -381,7 +381,7 @@ void ScInputHandler::DeleteRangeFinder()
     if ( pRangeFindList && pPaintView )
     {
         ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
-        pRangeFindList->SetHidden(sal_True);
+        pRangeFindList->SetHidden(true);
         pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) );  // wegnehmen
         DELETEZ(pRangeFindList);
     }
@@ -470,8 +470,8 @@ xub_StrLen lcl_MatchParenthesis( const String& rStr, xub_StrLen nPos )
             nQuotes++;
     }
     // Odd number of quotes that we find ourselves in a string
-    sal_Bool bLookInString = ((nQuotes % 2) != 0);
-    sal_Bool bInString = bLookInString;
+    bool bLookInString = ((nQuotes % 2) != 0);
+    bool bInString = bLookInString;
     p = p0 + nPos;
     p1 = (nDir < 0 ? p0 : p0 + nLen) ;
     sal_uInt16 nLevel = 1;
@@ -511,12 +511,12 @@ ScInputHandler::ScInputHandler()
         nTipVisible( 0 ),
         pTipVisibleSecParent( NULL ),
         nTipVisibleSec( 0 ),
-        bUseTab( false ),
-        bTextValid( sal_True ),
         nFormSelStart( 0 ),
         nFormSelEnd( 0 ),
         nAutoPar( 0 ),
         eMode( SC_INPUT_NONE ),
+        bUseTab( false ),
+        bTextValid( true ),
         bModified( false ),
         bSelIsRef( false ),
         bFormulaMode( false ),
@@ -528,6 +528,7 @@ ScInputHandler::ScInputHandler()
         bInOwnChange( false ),
         bProtected( false ),
         bCellHasPercentFormat( false ),
+        bLastIsSymbol( false ),
         nValidation( 0 ),
         eAttrAdjust( SVX_HOR_JUSTIFY_STANDARD ),
         aScaleX( 1,1 ),
@@ -535,7 +536,6 @@ ScInputHandler::ScInputHandler()
         pRefViewSh( NULL ),
         pLastPattern( NULL ),
         pEditDefaults( NULL ),
-        bLastIsSymbol( false ),
         pLastState( NULL ),
         pDelayTimer( NULL ),
         pRangeFindList( NULL )
@@ -590,7 +590,7 @@ void ScInputHandler::UpdateRefDevice()
     if (!pEngine)
         return;
 
-    sal_Bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
+    bool bTextWysiwyg = SC_MOD()->GetInputOptions().GetTextWysiwyg();
     bool bInPlace = pActiveViewSh && pActiveViewSh->GetViewFrame()->GetFrame().IsInPlace();
     sal_uLong nCtrl = pEngine->GetControlWord();
     if ( bTextWysiwyg || bInPlace )
@@ -624,7 +624,7 @@ void ScInputHandler::ImplCreateEditEngine()
             pEngine = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() );
         }
         else
-            pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True );
+            pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, true );
         pEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEngine->GetWordDelimiters() ) );
         UpdateRefDevice();      // also sets MapMode
         pEngine->SetPaperSize( Size( 1000000, 1000000 ) );
@@ -642,7 +642,7 @@ void ScInputHandler::UpdateAutoCorrFlag()
 
     //  don't use pLastPattern here (may be invalid because of AutoStyle)
 
-    sal_Bool bDisable = bLastIsSymbol || bFormulaMode;
+    bool bDisable = bLastIsSymbol || bFormulaMode;
     if ( bDisable )
         nCntrl &= ~EE_CNTRL_AUTOCORRECT;
     else
@@ -652,12 +652,12 @@ void ScInputHandler::UpdateAutoCorrFlag()
         pEngine->SetControlWord(nCntrl);
 }
 
-void ScInputHandler::UpdateSpellSettings( sal_Bool bFromStartTab )
+void ScInputHandler::UpdateSpellSettings( bool bFromStartTab )
 {
     if ( pActiveViewSh )
     {
         ScViewData* pViewData = pActiveViewSh->GetViewData();
-        sal_Bool bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell();
+        bool bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell();
 
         //  SetDefaultLanguage is independent of the language attributes,
         //  ScGlobal::GetEditDefaultLanguage is always used.
@@ -699,7 +699,7 @@ void ScInputHandler::UpdateSpellSettings( sal_Bool bFromStartTab )
             pEngine->SetSpeller( xXSpellChecker1 );
         }
 
-        sal_Bool bHyphen = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue();
+        bool bHyphen = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue();
         if ( bHyphen ) {
             com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
             pEngine->SetHyphenator( xXHyphenator );
@@ -835,7 +835,7 @@ void ScInputHandler::ShowTipCursor()
             const IFunctionDescription* ppFDesc;
             ::std::vector< ::rtl::OUString> aArgs;
             sal_uInt16      nArgs;
-            sal_Bool  bFound = false;
+            bool bFound = false;
             FormulaHelper aHelper(ScGlobal::GetStarCalcFunctionMgr());
 
             while( !bFound )
@@ -847,7 +847,7 @@ void ScInputHandler::ShowTipCursor()
                     sal_Unicode c = ( nLeftParentPos > 0 ) ? aSelText.GetChar( nLeftParentPos-1 ) : 0;
                     if( !(comphelper::string::isalphaAscii(c)) )
                         continue;
-                    nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, sal_True);
+                    nNextFStart = aHelper.GetFunctionStart( aSelText, nLeftParentPos, true);
                     if( aHelper.GetNextFunc( aSelText, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
                     {
                         if( !ppFDesc->getFunctionName().isEmpty() )
@@ -868,7 +868,7 @@ void ScInputHandler::ShowTipCursor()
                                     if( nArgPos <= aSelText.Len()-1 )
                                     {
                                         nActive = i+1;
-                                        bFlag = sal_True;
+                                        bFlag = true;
                                     }
                                     nArgPos+=nLength+1;
                                 }
@@ -947,13 +947,13 @@ void ScInputHandler::ShowTipCursor()
                                         aBuf.append(aNew.copy(nStartPosition));
                                         aNew = aBuf.makeStringAndClear();
                                         ShowTipBelow( aNew );
-                                        bFound = sal_True;
+                                        bFound = true;
                                     }
                                 }
                                 else
                                 {
                                     ShowTipBelow( aNew );
-                                    bFound = sal_True;
+                                    bFound = true;
                                 }
                             }
                         }
@@ -976,7 +976,7 @@ void ScInputHandler::ShowTipCursor()
                         if( aFormula.GetChar( nPosition ) =='(' )
                         {
                             ShowTipBelow( aNew );
-                            bFound = sal_True;
+                            bFound = true;
                         }
                         else
                             break;
@@ -1071,7 +1071,7 @@ void ScInputHandler::UseFormulaData()
             const IFunctionDescription* ppFDesc;
             ::std::vector< ::rtl::OUString> aArgs;
             sal_uInt16      nArgs;
-            sal_Bool  bFound = false;
+            bool bFound = false;
 
             rtl::OUString aText = pEngine->GetWord( 0, aSel.nEndPos-1 );
             if (!aText.isEmpty())
@@ -1098,7 +1098,7 @@ void ScInputHandler::UseFormulaData()
                 sal_Unicode c = ( nLeftParentPos > 0 ) ? aFormula.GetChar( nLeftParentPos-1 ) : 0;
                 if( !(comphelper::string::isalphaAscii(c)) )
                     continue;
-                nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, sal_True);
+                nNextFStart = aHelper.GetFunctionStart( aFormula, nLeftParentPos, true);
                 if( aHelper.GetNextFunc( aFormula, false, nNextFStart, &nNextFEnd, &ppFDesc, &aArgs ) )
                 {
                     if( !ppFDesc->getFunctionName().isEmpty() )
@@ -1119,7 +1119,7 @@ void ScInputHandler::UseFormulaData()
                                 if( nArgPos <= aFormula.Len()-1 )
                                 {
                                     nActive = i+1;
-                                    bFlag = sal_True;
+                                    bFlag = true;
                                 }
                                 nArgPos+=nLength+1;
                             }
@@ -1198,13 +1198,13 @@ void ScInputHandler::UseFormulaData()
                                     aBuf.append(aNew.copy(nStartPosition));
                                     aNew = aBuf.makeStringAndClear();
                                     ShowTipBelow( aNew );
-                                    bFound = sal_True;
+                                    bFound = true;
                                 }
                             }
                             else
                             {
                                 ShowTipBelow( aNew );
-                                bFound = sal_True;
+                                bFound = true;
                             }
                         }
                     }
@@ -1214,7 +1214,7 @@ void ScInputHandler::UseFormulaData()
     }
 }
 
-void ScInputHandler::NextFormulaEntry( sal_Bool bBack )
+void ScInputHandler::NextFormulaEntry( bool bBack )
 {
     EditView* pActiveView = pTopView ? pTopView : pTableView;
     if ( pActiveView && pFormulaData )
@@ -1243,7 +1243,7 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, bool& rParIns
 
         String aInsStr = rInsert;
         xub_StrLen nInsLen = aInsStr.Len();
-        sal_Bool bDoParen = ( nInsLen > 1 && aInsStr.GetChar(nInsLen-2) == '('
+        bool bDoParen = ( nInsLen > 1 && aInsStr.GetChar(nInsLen-2) == '('
                                       && aInsStr.GetChar(nInsLen-1) == ')' );
         if ( bDoParen )
         {
@@ -1269,7 +1269,7 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, bool& rParIns
             --aSel.nEndPos;
             pView->SetSelection(aSel);
 
-            rParInserted = sal_True;
+            rParInserted = true;
         }
     }
 }
@@ -1318,7 +1318,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
         // wenn ein Name eigentlich als Bereich in die Gesamt-Formel
         // eingefuegt wird, bei der Einzeldarstellung aber als
         // single-Zellbezug interpretiert wird
-        sal_Bool bColRowName = pCell->HasColRowName();
+        bool bColRowName = pCell->HasColRowName();
         if ( bColRowName )
         {
             // ColRowName im RPN-Code?
@@ -1449,9 +1449,9 @@ void ScInputHandler::PasteManualTip()
             }
         }
         if ( pTopView )
-            pTopView->InsertText( aInsert, sal_True );
+            pTopView->InsertText( aInsert, true );
         if ( pTableView )
-            pTableView->InsertText( aInsert, sal_True );
+            pTableView->InsertText( aInsert, true );
 
         DataChanged();
     }
@@ -1469,7 +1469,7 @@ void ScInputHandler::AutoParAdded()
     ++nAutoPar;     //  closing parenthesis can be overwritten
 }
 
-sal_Bool ScInputHandler::CursorAtClosingPar()
+bool ScInputHandler::CursorAtClosingPar()
 {
     //  test if the cursor is before a closing parenthesis
 
@@ -1481,7 +1481,7 @@ sal_Bool ScInputHandler::CursorAtClosingPar()
         xub_StrLen nPos = aSel.nStartPos;
         String aFormula = pEngine->GetText((sal_uInt16)0);
         if ( nPos < aFormula.Len() && aFormula.GetChar(nPos) == ')' )
-            return sal_True;
+            return true;
     }
     return false;
 }
@@ -1610,7 +1610,7 @@ void ScInputHandler::UseColData()           // beim Tippen
     }
 }
 
-void ScInputHandler::NextAutoEntry( sal_Bool bBack )
+void ScInputHandler::NextAutoEntry( bool bBack )
 {
     EditView* pActiveView = pTopView ? pTopView : pTableView;
     if ( pActiveView && pColumnData )
@@ -1685,7 +1685,7 @@ void ScInputHandler::UpdateParenthesis()
 
     //! Klammer-Hervorhebung einzeln abschaltbar ????
 
-    sal_Bool bFound = false;
+    bool bFound = false;
     if ( bFormulaMode && eMode != SC_INPUT_TOP )
     {
         if ( pTableView && !pTableView->HasSelection() )        // Selektion ist immer unten
@@ -1723,7 +1723,7 @@ void ScInputHandler::UpdateParenthesis()
                         //  Dummy-InsertText fuer Update und Paint (Selektion ist leer)
                         pTableView->InsertText( EMPTY_STRING, false );
 
-                        bFound = sal_True;
+                        bFound = true;
                     }
                 }
             }
@@ -1815,7 +1815,7 @@ void ScInputHandler::UpdateActiveView()
         pTopView = NULL;
 }
 
-void ScInputHandler::StopInputWinEngine( sal_Bool bAll )
+void ScInputHandler::StopInputWinEngine( bool bAll )
 {
     if (pInputWin)
         pInputWin->StopEditEngine( bAll );
@@ -1833,9 +1833,9 @@ void ScInputHandler::ForgetLastPattern()
 {
     pLastPattern = NULL;
     if ( !pLastState && pActiveViewSh )
-        pActiveViewSh->UpdateInputHandler( sal_True );      // Status neu holen
+        pActiveViewSh->UpdateInputHandler( true );      // Status neu holen
     else
-        NotifyChange( pLastState, sal_True );
+        NotifyChange( pLastState, true );
 }
 
 void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
@@ -1845,7 +1845,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
     {
         case SVX_HOR_JUSTIFY_STANDARD:
             {
-                sal_Bool bNumber = false;
+                bool bNumber = false;
                 if (cTyped)                                     // neu angefangen
                     bNumber = (cTyped>='0' && cTyped<='9');     // nur Ziffern sind Zahlen
                 else if ( pActiveViewSh )
@@ -1870,7 +1870,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
             break;
     }
 
-    sal_Bool bAsianVertical = pLastPattern &&
+    bool bAsianVertical = pLastPattern &&
         ((const SfxBoolItem&)pLastPattern->GetItem( ATTR_STACKED )).GetValue() &&
         ((const SfxBoolItem&)pLastPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
     if ( bAsianVertical )
@@ -1891,7 +1891,7 @@ void ScInputHandler::RemoveAdjust()
 {
     //  harte Ausrichtungs-Attribute loeschen
 
-    sal_Bool bUndo = pEngine->IsUndoEnabled();
+    bool bUndo = pEngine->IsUndoEnabled();
     if ( bUndo )
         pEngine->EnableUndo( false );
 
@@ -1900,7 +1900,7 @@ void ScInputHandler::RemoveAdjust()
     pEngine->RemoveParaAttribs();
 
     if ( bUndo )
-        pEngine->EnableUndo( sal_True );
+        pEngine->EnableUndo( true );
 
 }
 
@@ -1912,10 +1912,10 @@ void ScInputHandler::RemoveRangeFinder()
     sal_uInt16 nCount = pEngine->GetParagraphCount();   // koennte gerade neu eingefuegt worden sein
     for (sal_uInt16 i=0; i<nCount; i++)
         pEngine->QuickRemoveCharAttribs( i, EE_CHAR_COLOR );
-    pEngine->SetUpdateMode(sal_True);
+    pEngine->SetUpdateMode(true);
 
     EditView* pActiveView = pTopView ? pTopView : pTableView;
-    pActiveView->ShowCursor( false, sal_True );
+    pActiveView->ShowCursor( false, true );
 
     DeleteRangeFinder();        // loescht die Liste und die Markierungen auf der Tabelle
 }
@@ -2163,7 +2163,7 @@ IMPL_LINK( ScInputHandler, ModifyHdl, void *, EMPTYARG )
     return 0;
 }
 
-sal_Bool ScInputHandler::DataChanging( sal_Unicode cTyped, sal_Bool bFromCommand )      // return sal_True = new view created
+bool ScInputHandler::DataChanging( sal_Unicode cTyped, bool bFromCommand )      // return true = new view created
 {
     if (pActiveViewSh)
         pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
@@ -2175,7 +2175,7 @@ sal_Bool ScInputHandler::DataChanging( sal_Unicode cTyped, sal_Bool bFromCommand
         return false;
 }
 
-void ScInputHandler::DataChanged( sal_Bool bFromTopNotify )
+void ScInputHandler::DataChanged( bool bFromTopNotify )
 {
     ImplCreateEditEngine();
 
@@ -2186,7 +2186,7 @@ void ScInputHandler::DataChanged( sal_Bool bFromTopNotify )
     {
         //  table EditEngine is formatted below, input line needs formatting after paste
         //  #i20282# not when called from the input line's modify handler
-        pTopView->GetEditEngine()->QuickFormatDoc( sal_True );
+        pTopView->GetEditEngine()->QuickFormatDoc( true );
 
         //  #i23720# QuickFormatDoc hides the cursor, but can't show it again because it
         //  can't safely access the EditEngine's current view, so the cursor has to be
@@ -2228,7 +2228,7 @@ void ScInputHandler::DataChanged( sal_Bool bFromTopNotify )
     {
         ScViewData* pViewData = pActiveViewSh->GetViewData();
 
-        sal_Bool bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT );        // rechtsbuendig immer
+        bool bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT );        // rechtsbuendig immer
         if (!bNeedGrow)
         {
                 //  Cursor vor dem Ende?
@@ -2265,12 +2265,12 @@ void ScInputHandler::UpdateFormulaMode()
     {
         if (!bFormulaMode)
         {
-            bFormulaMode = sal_True;
+            bFormulaMode = true;
             pRefViewSh = pActiveViewSh;
             pSfxApp->Broadcast( SfxSimpleHint( FID_REFMODECHANGED ) );
             SC_MOD()->SetRefInputHdl(this);
             if (pInputWin)
-                pInputWin->SetFormulaMode(sal_True);
+                pInputWin->SetFormulaMode(true);
 
             if ( bAutoComplete )
                 GetFormulaData();
@@ -2303,13 +2303,13 @@ void ScInputHandler::ShowRefFrame()
     ScTabViewShell* pVisibleSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current() );
     if ( pRefViewSh && pRefViewSh != pVisibleSh )
     {
-        sal_Bool bFound = false;
+        bool bFound = false;
         SfxViewFrame* pRefFrame = pRefViewSh->GetViewFrame();
         SfxViewFrame* pOneFrame = SfxViewFrame::GetFirst();
         while ( pOneFrame && !bFound )
         {
             if ( pOneFrame == pRefFrame )
-                bFound = sal_True;
+                bFound = true;
             pOneFrame = SfxViewFrame::GetNext( *pOneFrame );
         }
 
@@ -2381,7 +2381,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
     if (bProtected)
     {
         eMode = SC_INPUT_NONE;
-        StopInputWinEngine( sal_True );
+        StopInputWinEngine( true );
         if (pActiveViewSh)
             pActiveViewSh->GetActiveWin()->GrabFocus();
         return;
@@ -2432,12 +2432,12 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
     if (eMode==SC_INPUT_TABLE || eMode==SC_INPUT_TYPE)
     {
         if (pTableView)
-            pTableView->SetEditEngineUpdateMode(sal_True);
+            pTableView->SetEditEngineUpdateMode(true);
     }
     else
     {
         if (pTopView)
-            pTopView->SetEditEngineUpdateMode(sal_True);
+            pTopView->SetEditEngineUpdateMode(true);
     }
 
     if (eNewMode != eOldMode)
@@ -2448,9 +2448,9 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
 
 //----------------------------------------------------------------------------------------
 
-//  lcl_IsNumber - sal_True, wenn nur Ziffern (dann keine Autokorrektur)
+//  lcl_IsNumber - true, wenn nur Ziffern (dann keine Autokorrektur)
 
-sal_Bool lcl_IsNumber(const String& rString)
+bool lcl_IsNumber(const String& rString)
 {
     xub_StrLen nLen = rString.Len();
     for (xub_StrLen i=0; i<nLen; i++)
@@ -2459,7 +2459,7 @@ sal_Bool lcl_IsNumber(const String& rString)
         if ( c < '0' || c > '9' )
             return false;
     }
-    return sal_True;
+    return true;
 }
 
 void lcl_SelectionToEnd( EditView* pView )
@@ -2481,18 +2481,18 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
     //  darum dafuer sorgen, dass EnterHandler nicht verschachtelt gerufen wird:
 
     if (bInEnterHandler) return;
-    bInEnterHandler = sal_True;
-    bInOwnChange = sal_True;                // disable ModifyHdl (reset below)
+    bInEnterHandler = true;
+    bInOwnChange = true;                // disable ModifyHdl (reset below)
 
     ImplCreateEditEngine();
 
-    sal_Bool bMatrix = ( nBlockMode == SC_ENTER_MATRIX );
+    bool bMatrix = ( nBlockMode == SC_ENTER_MATRIX );
 
     SfxApplication* pSfxApp     = SFX_APP();
     EditTextObject* pObject     = NULL;
     ScPatternAttr*  pCellAttrs  = NULL;
-    sal_Bool            bAttrib     = false;    // Formatierung vorhanden ?
-    sal_Bool            bForget     = false;    // wegen Gueltigkeit streichen ?
+    bool            bAttrib     = false;    // Formatierung vorhanden ?
+    bool            bForget     = false;    // wegen Gueltigkeit streichen ?
 
     rtl::OUString aString = GetEditText(pEngine);
     EditView* pActiveView = pTopView ? pTopView : pTableView;
@@ -2527,7 +2527,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
         {
             // #i67990# don't use pLastPattern in EnterHandler
             const ScPatternAttr* pPattern = pDoc->GetPattern( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab() );
-            sal_Bool bOk = pData->IsDataValid( aString, *pPattern, aCursorPos );
+            bool bOk = pData->IsDataValid( aString, *pPattern, aCursorPos );
 
             if (!bOk)
             {
@@ -2539,7 +2539,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
 
                 Window* pParent = Application::GetDefDialogParent();
                 if ( pData->DoError( pParent, aString, aCursorPos ) )
-                    bForget = sal_True;                 // Eingabe nicht uebernehmen
+                    bForget = true;                 // Eingabe nicht uebernehmen
             }
         }
     }
@@ -2556,12 +2556,12 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
             // or an invalid action - normal cell input is always aborted
 
             pActiveViewSh->DataPilotInput( aCursorPos, aString );
-            bForget = sal_True;
+            bForget = true;
         }
     }
 
     pEngine->CompleteOnlineSpelling();
-    sal_Bool bSpellErrors = !bFormulaMode && pEngine->HasOnlineSpellErrors();
+    bool bSpellErrors = !bFormulaMode && pEngine->HasOnlineSpellErrors();
     if ( bSpellErrors )
     {
         //  #i3820# If the spell checker flags numerical input as error,
@@ -2649,14 +2649,14 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
         //  check if EditObject is needed
 
         if ( bSpellErrors || nParCnt > 1 )
-            bAttrib = sal_True;
+            bAttrib = true;
         else
         {
             for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && !bAttrib; nId++)
             {
                 SfxItemState eState = aOldAttribs.GetItemState( nId, false, &pItem );
                 if (eState == SFX_ITEM_DONTCARE)
-                    bAttrib = sal_True;
+                    bAttrib = true;
                 else if (eState == SFX_ITEM_SET)
                 {
                     //  keep same items in EditEngine as in ScEditAttrTester
@@ -2664,7 +2664,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
                          nId == EE_CHAR_KERNING || nId == EE_CHAR_XMLATTRIBS )
                     {
                         if ( *pItem != pEditDefaults->Get(nId) )
-                            bAttrib = sal_True;
+                            bAttrib = true;
                     }
                 }
             }
@@ -2673,13 +2673,13 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
 
             SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, false );
             if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
-                bAttrib = sal_True;
+                bAttrib = true;
 
             //  not converted characters?
 
             SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, false );
             if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET )
-                bAttrib = sal_True;
+                bAttrib = true;
 
             //  Formeln immer als Formeln erkennen (#38309#)
             //  (der Test vorher ist trotzdem noetig wegen Zell-Attributen)
@@ -2806,7 +2806,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
     if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
     {
         //  mit Eingabe zusammenfassen ?
-        pExecuteSh->ApplySelectionPattern( *pCellAttrs, sal_True, sal_True );
+        pExecuteSh->ApplySelectionPattern( *pCellAttrs, true, true );
         pExecuteSh->AdjustBlockHeight();
     }
 
@@ -2825,7 +2825,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
 
 void ScInputHandler::CancelHandler()
 {
-    bInOwnChange = sal_True;                // disable ModifyHdl (reset below)
+    bInOwnChange = true;                // disable ModifyHdl (reset below)
 
     ImplCreateEditEngine();
 
@@ -2856,7 +2856,7 @@ void ScInputHandler::CancelHandler()
     ResetAutoPar();
 
     eMode = SC_INPUT_NONE;
-    StopInputWinEngine( sal_True );
+    StopInputWinEngine( true );
     if (pExecuteSh)
         pExecuteSh->StopEditShell();
 
@@ -2864,9 +2864,9 @@ void ScInputHandler::CancelHandler()
     pEngine->SetText(String());
 
     if ( !pLastState && pExecuteSh )
-        pExecuteSh->UpdateInputHandler( sal_True );     // Status neu holen
+        pExecuteSh->UpdateInputHandler( true );     // Status neu holen
     else
-        NotifyChange( pLastState, sal_True );
+        NotifyChange( pLastState, true );
 
     nFormSelStart = nFormSelEnd = 0;
     aFormText.Erase();
@@ -2874,7 +2874,7 @@ void ScInputHandler::CancelHandler()
     bInOwnChange = false;
 }
 
-sal_Bool ScInputHandler::IsModalMode( SfxObjectShell* pDocSh )
+bool ScInputHandler::IsModalMode( SfxObjectShell* pDocSh )
 {
     //  Referenzen auf unbenanntes Dokument gehen nicht
 
@@ -2905,7 +2905,7 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
 {
     HideTip();
 
-    sal_Bool bOtherDoc = ( pRefViewSh &&
+    bool bOtherDoc = ( pRefViewSh &&
                         pRefViewSh->GetViewData()->GetDocument() != pDoc );
     if (bOtherDoc)
         if (!pDoc->GetDocumentShell()->HasName())
@@ -2984,17 +2984,17 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
     if (pTableView || pTopView)
     {
         if (pTableView)
-            pTableView->InsertText( aRefStr, sal_True );
+            pTableView->InsertText( aRefStr, true );
         if (pTopView)
-            pTopView->InsertText( aRefStr, sal_True );
+            pTopView->InsertText( aRefStr, true );
 
         DataChanged();
     }
 
-    bSelIsRef = sal_True;
+    bSelIsRef = true;
 }
 
-void ScInputHandler::InsertFunction( const String& rFuncName, sal_Bool bAddPar )
+void ScInputHandler::InsertFunction( const String& rFuncName, bool bAddPar )
 {
     if ( eMode == SC_INPUT_NONE )
     {
@@ -3070,19 +3070,19 @@ void ScInputHandler::ClearText()
     DataChanged();
 }
 
-sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /* = sal_False */ )
+bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false */ )
 {
     if (!bOptLoaded)
     {
         bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete();
-        bOptLoaded = sal_True;
+        bOptLoaded = true;
     }
 
     KeyCode aCode = rKEvt.GetKeyCode();
     sal_uInt16 nModi  = aCode.GetModifier();
-    sal_Bool bShift   = aCode.IsShift();
-    sal_Bool bControl = aCode.IsMod1();
-    sal_Bool bAlt     = aCode.IsMod2();
+    bool bShift   = aCode.IsShift();
+    bool bControl = aCode.IsMod1();
+    bool bAlt     = aCode.IsMod2();
     sal_uInt16 nCode  = aCode.GetCode();
     sal_Unicode nChar = rKEvt.GetCharCode();
 
@@ -3100,26 +3100,26 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /*
         return true;
     }
 
-    sal_Bool bInputLine = ( eMode==SC_INPUT_TOP );
+    bool bInputLine = ( eMode==SC_INPUT_TOP );
 
-    sal_Bool bUsed = false;
-    sal_Bool bSkip = false;
-    sal_Bool bDoEnter = false;
+    bool bUsed = false;
+    bool bSkip = false;
+    bool bDoEnter = false;
 
     switch ( nCode )
     {
         case KEY_RETURN:
             if (bControl && !bShift && ( !bInputLine || ( pInputWin && pInputWin->IsMultiLineInput() ) ) )
-                bDoEnter = sal_True;
+                bDoEnter = true;
             else if (nModi == 0 && nTipVisible && pFormulaData && miAutoPos != pFormulaData->end())
             {
                 PasteFunctionData();
-                bUsed = sal_True;
+                bUsed = true;
             }
             else if ( nModi == 0 && nTipVisible && aManualTip.Len() )
             {
                 PasteManualTip();
-                bUsed = sal_True;
+                bUsed = true;
             }
             else
             {
@@ -3133,7 +3133,7 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /*
                 if (pActiveViewSh)
                     pActiveViewSh->MoveCursorEnter( bShift && !bControl );
 
-                bUsed = sal_True;
+                bUsed = true;
             }
             break;
         case KEY_TAB:
@@ -3159,26 +3159,26 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /*
             if ( nTipVisible )
             {
                 HideTip();
-                bUsed = sal_True;
+                bUsed = true;
             }
             else if( nTipVisibleSec )
             {
                 HideTipBelow();
-                bUsed = sal_True;
+                bUsed = true;
             }
             else if (eMode != SC_INPUT_NONE)
             {
                 CancelHandler();
-                bUsed = sal_True;
+                bUsed = true;
             }
             else
-                bSkip = sal_True;
+                bSkip = true;
             break;
         case KEY_F2:
             if ( !bShift && !bControl && !bAlt && eMode == SC_INPUT_TABLE )
             {
                 eMode = SC_INPUT_TYPE;
-                bUsed = sal_True;
+                bUsed = true;
             }
             break;
     }
@@ -3186,8 +3186,8 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /*
     //  Cursortasten nur ausfuehren, wenn schon im Edit-Modus
     //  z.B. wegen Shift-Ctrl-PageDn (ist nicht als Accelerator definiert)
 
-    sal_Bool bCursorKey = EditEngine::DoesKeyMoveCursor(rKEvt);
-    sal_Bool bInsKey = ( nCode == KEY_INSERT && !nModi );   // Insert wie Cursortasten behandeln
+    bool bCursorKey = EditEngine::DoesKeyMoveCursor(rKEvt);
+    bool bInsKey = ( nCode == KEY_INSERT && !nModi );   // Insert wie Cursortasten behandeln
     if ( !bUsed && !bSkip && ( bDoEnter || EditEngine::DoesKeyChangeText(rKEvt) ||
                     ( eMode != SC_INPUT_NONE && ( bCursorKey || bInsKey ) ) ) )
     {
@@ -3201,10 +3201,10 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /*
         }
 
         UpdateActiveView();
-        sal_Bool bNewView = DataChanging( nChar );
+        bool bNewView = DataChanging( nChar );
 
         if (bProtected)                             // Zelle geschuetzt?
-            bUsed = sal_True;                           // Key-Event nicht weiterleiten
+            bUsed = true;                           // Key-Event nicht weiterleiten
         else                                        // Aenderungen erlaubt
         {
             if (bNewView )                          // neu anlegen
@@ -3245,15 +3245,15 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /*
                 {
                     if (pTableView)
                         if( pTableView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) )
-                            bUsed = sal_True;
+                            bUsed = true;
                     if (pTopView)
                         if( pTopView->PostKeyEvent( KeyEvent( CHAR_CR, KeyCode(KEY_RETURN) ) ) )
-                            bUsed = sal_True;
+                            bUsed = true;
                 }
                 else if ( nAutoPar && nChar == ')' && CursorAtClosingPar() )
                 {
                     SkipClosingPar();
-                    bUsed = sal_True;
+                    bUsed = true;
                 }
                 else
                 {
@@ -3265,7 +3265,7 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /*
                     }
                     if (pTopView)
                         if ( pTopView->PostKeyEvent( rKEvt ) )
-                            bUsed = sal_True;
+                            bUsed = true;
                 }
 
                 //  Auto-Eingabe:
@@ -3317,9 +3317,9 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /*
     return bUsed;
 }
 
-sal_Bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, sal_Bool bForce )
+bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce )
 {
-    sal_Bool bUsed = false;
+    bool bUsed = false;
 
     if ( rCEvt.GetCommand() == COMMAND_CURSORPOS )
     {
@@ -3334,7 +3334,7 @@ sal_Bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, sal_Bool bForc
                     pTableView->Command( rCEvt );
                 else if (pTopView)                      // call only once
                     pTopView->Command( rCEvt );
-                bUsed = sal_True;
+                bUsed = true;
             }
         }
     }
@@ -3345,7 +3345,7 @@ sal_Bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, sal_Bool bForc
             if (!bOptLoaded)
             {
                 bAutoComplete = SC_MOD()->GetAppOptions().GetAutoComplete();
-                bOptLoaded = sal_True;
+                bOptLoaded = true;
             }
 
             HideTip();
@@ -3358,10 +3358,10 @@ sal_Bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, sal_Bool bForc
             }
 
             UpdateActiveView();
-            sal_Bool bNewView = DataChanging( 0, sal_True );
+            bool bNewView = DataChanging( 0, true );
 
             if (bProtected)                             // cell protected
-                bUsed = sal_True;                           // event is used
+                bUsed = true;                           // event is used
             else                                        // changes allowed
             {
                 if (bNewView)                           // create new edit view
@@ -3394,7 +3394,7 @@ sal_Bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, sal_Bool bForc
                     if (pTopView)
                         pTopView->Command( rCEvt );
 
-                    bUsed = sal_True;
+                    bUsed = true;
 
                     if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
                     {
@@ -3425,26 +3425,26 @@ sal_Bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, sal_Bool bForc
 }
 
 void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
-                                   sal_Bool bForce, ScTabViewShell* pSourceSh,
-                                   sal_Bool bStopEditing)
+                                   bool bForce, ScTabViewShell* pSourceSh,
+                                   bool bStopEditing)
 {
     //  Wenn der Aufruf aus einem Makro-Aufruf im EnterHandler kommt,
     //  gleich abbrechen und nicht den Status durcheinander bringen
     if (bInEnterHandler)
         return;
 
-    sal_Bool bRepeat = (pState == pLastState);
+    bool bRepeat = (pState == pLastState);
     if (!bRepeat && pState && pLastState)
-        bRepeat = sal::static_int_cast<sal_Bool>(*pState == *pLastState);
+        bRepeat = (*pState == *pLastState);
     if (bRepeat && !bForce)
         return;
 
-    bInOwnChange = sal_True;                // disable ModifyHdl (reset below)
+    bInOwnChange = true;                // disable ModifyHdl (reset below)
 
     if ( pState && !pLastState )        // wieder enablen
-        bForce = sal_True;
+        bForce = true;
 
-    sal_Bool bHadObject = pLastState && pLastState->GetEditData();
+    bool bHadObject = pLastState && pLastState->GetEditData();
 
     //! Before EditEngine gets eventually created (so it gets the right pools)
     if ( pSourceSh )
@@ -3466,7 +3466,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
 
         if ( pState )
         {
-            sal_Bool bIgnore = false;
+            bool bIgnore = false;
 
             //  hier auch fremde Referenzeingabe beruecksichtigen (z.B. Funktions-AP),
             //  FormEditData falls gerade von der Hilfe auf Calc umgeschaltet wird:
@@ -3481,7 +3481,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
                             EnterHandler();
                     }
                     else
-                        bIgnore = sal_True;
+                        bIgnore = true;
                 }
 
                 if ( !bIgnore )
@@ -3490,7 +3490,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
                     const ScAddress&        rEPos   = pState->GetEndPos();
                     const EditTextObject*   pData   = pState->GetEditData();
                     rtl::OUString aString = pState->GetString();
-                    sal_Bool                    bTxtMod = false;
+                    bool bTxtMod = false;
                     ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
                     ScDocument* pDoc = pDocSh->GetDocument();
 
@@ -3499,7 +3499,7 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
                     if ( pData )
                         bTxtMod = true;
                     else if ( bHadObject )
-                        bTxtMod = sal_True;
+                        bTxtMod = true;
                     else if ( bTextValid )
                         bTxtMod = ( !aString.equals(aCurrentText) );
                     else
@@ -3556,8 +3556,8 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
                         }
                         //IAccessibility2 Implementation 2009-----
                         // Disable the accessible VALUE_CHANGE event
-                        sal_Bool bIsSuppressed = pInputWin->IsAccessibilityEventsSuppressed(false);
-                        pInputWin->SetAccessibilityEventsSuppressed(sal_True);
+                        bool bIsSuppressed = pInputWin->IsAccessibilityEventsSuppressed(false);
+                        pInputWin->SetAccessibilityEventsSuppressed(true);
                         pInputWin->SetPosString(aPosStr);
                         pInputWin->SetAccessibilityEventsSuppressed(bIsSuppressed);
                         //-----IAccessibility2 Implementation 2009
@@ -3664,7 +3664,7 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer )
             }
             else if ( !bFormulaMode )   // Formel auch z.B. bei Hilfe behalten
             {
-                bInOwnChange = sal_True;    // disable ModifyHdl (reset below)
+                bInOwnChange = true;    // disable ModifyHdl (reset below)
 
                 pActiveViewSh = NULL;
                 pEngine->SetText( EMPTY_STRING );
@@ -3692,18 +3692,18 @@ void ScInputHandler::InputSelection( EditView* pView )
     ResetAutoPar();
 }
 
-void ScInputHandler::InputChanged( EditView* pView, sal_Bool bFromNotify )
+void ScInputHandler::InputChanged( EditView* pView, bool bFromNotify )
 {
     UpdateActiveView();
 
     // #i20282# DataChanged needs to know if this is from the input line's modify handler
-    sal_Bool bFromTopNotify = ( bFromNotify && pView == pTopView );
+    bool bFromTopNotify = ( bFromNotify && pView == pTopView );
 
-    sal_Bool bNewView = DataChanging();                     //! kann das hier ueberhaupt sein?
+    bool bNewView = DataChanging();                     //! kann das hier ueberhaupt sein?
     aCurrentText = pView->GetEditEngine()->GetText();   // auch den String merken
     pEngine->SetText( aCurrentText );
     DataChanged( bFromTopNotify );
-    bTextValid = sal_True;      // wird in DataChanged auf sal_False gesetzt
+    bTextValid = true;      // wird in DataChanged auf false gesetzt
 
     if ( pActiveViewSh )
     {
@@ -3738,9 +3738,9 @@ Size ScInputHandler::GetTextSize()
     return aSize;
 }
 
-sal_Bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
+bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
 {
-    sal_Bool bRet = false;
+    bool bRet = false;
     if (pEngine)
     {
         //  Feldbefehle enthalten?
@@ -3771,7 +3771,7 @@ sal_Bool ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
                 --nParCnt;
             }
 
-            bRet = sal_True;
+            bRet = true;
         }
     }
     return bRet;
@@ -3804,7 +3804,7 @@ EditView* ScInputHandler::GetFuncEditView()
     {
         if ( eMode != SC_INPUT_TABLE )
         {
-            bCreatingFuncView = sal_True;       // RangeFinder nicht anzeigen
+            bCreatingFuncView = true;       // RangeFinder nicht anzeigen
             SetMode( SC_INPUT_TABLE );
             bCreatingFuncView = false;
             if ( pTableView )
@@ -3861,7 +3861,7 @@ void ScInputHandler::InputReplaceSelection( const String& rStr )
         pView->SetEditEngineUpdateMode( false );
         pView->GetEditEngine()->SetText( aFormText );
         pView->SetSelection( ESelection(0,nFormSelStart, 0,nFormSelEnd) );
-        pView->SetEditEngineUpdateMode( sal_True );
+        pView->SetEditEngineUpdateMode( true );
     }
     bModified = true;
 }
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index a0b6e85..53c7d33 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -39,6 +39,8 @@
 
 #include <set>
 
+#include <boost/noncopyable.hpp>
+
 class ScDocument;
 class ScTabView;
 class ScTabViewShell;
@@ -60,7 +62,7 @@ struct ESelection;
 //  ScInputHandler
 //========================================================================
 
-class ScInputHandler
+class ScInputHandler : boost::noncopyable
 {
 private:
     ScInputWindow*          pInputWin;
@@ -80,9 +82,7 @@ private:
     sal_uLong                   nTipVisibleSec;
     String                  aManualTip;
     rtl::OUString           aAutoSearch;
-    sal_Bool                    bUseTab;                    // Blaettern moeglich
 
-    sal_Bool                    bTextValid;                 // Text noch nicht in Edit-Engine
     rtl::OUString           aCurrentText;
 
     String                  aFormText;                  // fuer Funktions-Autopilot
@@ -93,18 +93,21 @@ private:
 
     ScAddress               aCursorPos;
     ScInputMode             eMode;
-    sal_Bool                    bModified;
-    sal_Bool                    bSelIsRef;
-    sal_Bool                    bFormulaMode;
-    sal_Bool                    bInRangeUpdate;
-    sal_Bool                    bParenthesisShown;
-    sal_Bool                    bCreatingFuncView;
-    sal_Bool                    bInEnterHandler;
-    sal_Bool                    bCommandErrorShown;
-    sal_Bool                    bInOwnChange;
-
-    sal_Bool                    bProtected;
-    sal_Bool                    bCellHasPercentFormat;
+    bool                    bUseTab:1;                    // Blaettern moeglich
+    bool                    bTextValid:1;                 // Text noch nicht in Edit-Engine
+    bool                    bModified:1;
+    bool                    bSelIsRef:1;
+    bool                    bFormulaMode:1;
+    bool                    bInRangeUpdate:1;
+    bool                    bParenthesisShown:1;
+    bool                    bCreatingFuncView:1;
+    bool                    bInEnterHandler:1;
+    bool                    bCommandErrorShown:1;
+    bool                    bInOwnChange:1;
+
+    bool                    bProtected:1;
+    bool                    bCellHasPercentFormat:1;
+    bool                    bLastIsSymbol:1;
     sal_uLong                   nValidation;
     SvxCellHorJustify       eAttrAdjust;
 
@@ -116,15 +119,14 @@ private:
 
     const ScPatternAttr*    pLastPattern;
     SfxItemSet*             pEditDefaults;
-    sal_Bool                    bLastIsSymbol;
 
     ScInputHdlState*        pLastState;
     Timer*                  pDelayTimer;
 
     ScRangeFindList*        pRangeFindList;
 
-    static sal_Bool             bAutoComplete;              // aus App-Optionen
-    static sal_Bool             bOptLoaded;
+    static bool             bAutoComplete;              // aus App-Optionen
+    static bool             bOptLoaded;
 
 #ifdef _INPUTHDL_CXX
 private:
@@ -145,11 +147,11 @@ private:
     DECL_LINK(      DelayTimer, Timer* );
     void            GetColData();
     void            UseColData();
-    void            NextAutoEntry( sal_Bool bBack );
+    void            NextAutoEntry( bool bBack );
     void            UpdateAdjust( sal_Unicode cTyped );
     void            GetFormulaData();
     void            UseFormulaData();
-    void            NextFormulaEntry( sal_Bool bBack );
+    void            NextFormulaEntry( bool bBack );
     void            PasteFunctionData();
     void            PasteManualTip();
     EditView*       GetFuncEditView();
@@ -160,7 +162,7 @@ private:
     void            UpdateAutoCorrFlag();
     void            ResetAutoPar();
     void            AutoParAdded();
-    sal_Bool            CursorAtClosingPar();
+    bool            CursorAtClosingPar();
     void            SkipClosingPar();
     DECL_LINK( ModifyHdl, void* );
     DECL_LINK( ShowHideTipVisibleParentListener, VclWindowEvent* );
@@ -172,38 +174,38 @@ public:
     virtual         ~ScInputHandler();
 
     void            SetMode( ScInputMode eNewMode );
-    sal_Bool            IsInputMode() const { return (eMode != SC_INPUT_NONE); }
-    sal_Bool            IsEditMode() const  { return (eMode != SC_INPUT_NONE &&
+    bool            IsInputMode() const { return (eMode != SC_INPUT_NONE); }
+    bool            IsEditMode() const  { return (eMode != SC_INPUT_NONE &&
                                                   eMode != SC_INPUT_TYPE); }
-    sal_Bool            IsTopMode() const   { return (eMode == SC_INPUT_TOP);  }
+    bool            IsTopMode() const   { return (eMode == SC_INPUT_TOP);  }
 
     const rtl::OUString& GetEditString();
     const String&   GetFormString() const   { return aFormText; }
 
     const ScAddress& GetCursorPos() const   { return aCursorPos; }
 
-    sal_Bool            GetTextAndFields( ScEditEngineDefaulter& rDestEngine );
+    bool            GetTextAndFields( ScEditEngineDefaulter& rDestEngine );
 
-    sal_Bool            KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit = false );
+    bool            KeyInput( const KeyEvent& rKEvt, bool bStartEdit = false );
     void            EnterHandler( sal_uInt8 nBlockMode = 0 );
     void            CancelHandler();
     void            SetReference( const ScRange& rRef, ScDocument* pDoc );
     void            AddRefEntry();
 
-    sal_Bool            InputCommand( const CommandEvent& rCEvt, sal_Bool bForce );
+    bool            InputCommand( const CommandEvent& rCEvt, bool bForce );
 
-    void            InsertFunction( const String& rFuncName, sal_Bool bAddPar = sal_True );
+    void            InsertFunction( const String& rFuncName, bool bAddPar = true );
     void            ClearText();
 
     void            InputSelection( EditView* pView );
-    void            InputChanged( EditView* pView, sal_Bool bFromNotify = false );
+    void            InputChanged( EditView* pView, bool bFromNotify = false );
 
     void            ViewShellGone(ScTabViewShell* pViewSh);
     void            SetRefViewShell(ScTabViewShell* pRefVsh) {pRefViewSh=pRefVsh;}
 
-    void            NotifyChange( const ScInputHdlState* pState, sal_Bool bForce = false,
-                                    ScTabViewShell* pSourceSh = NULL,
-                                    sal_Bool bStopEditing = sal_True);
+    void            NotifyChange( const ScInputHdlState* pState, bool bForce = false,
+                                  ScTabViewShell* pSourceSh = NULL,
+                                  bool bStopEditing = true);
     void            UpdateCellAdjust( SvxCellHorJustify eJust );
 
     void            ResetDelayTimer(); //BugId 54702
@@ -221,15 +223,15 @@ public:
     EditView*       GetTableView()      { return pTableView; }
     EditView*       GetTopView()        { return pTopView; }
 
-    sal_Bool            DataChanging( sal_Unicode cTyped = 0, sal_Bool bFromCommand = false );
-    void            DataChanged( sal_Bool bFromTopNotify = false );
+    bool            DataChanging( sal_Unicode cTyped = 0, bool bFromCommand = false );
+    void            DataChanged( bool bFromTopNotify = false );
 
-    sal_Bool            TakesReturn() const     { return ( nTipVisible != 0 ); }
+    bool            TakesReturn() const     { return ( nTipVisible != 0 ); }
 
-    void            SetModified()       { bModified = sal_True; }
+    void            SetModified()       { bModified = true; }
 
-    sal_Bool            GetSelIsRef() const     { return bSelIsRef; }
-    void            SetSelIsRef(sal_Bool bSet)  { bSelIsRef = bSet; }
+    bool            GetSelIsRef() const     { return bSelIsRef; }
+    void            SetSelIsRef(bool bSet)  { bSelIsRef = bSet; }
 
     void            ShowRefFrame();
 
@@ -243,19 +245,19 @@ public:
     void            InputReplaceSelection   ( const String& rStr );
     String          InputGetFormulaStr      ();
 
-    sal_Bool            IsFormulaMode() const                   { return bFormulaMode; }
+    bool            IsFormulaMode() const                   { return bFormulaMode; }
     ScInputWindow*  GetInputWindow()                        { return pInputWin; }
     void            SetInputWindow( ScInputWindow* pNew )   { pInputWin = pNew; }
-    void            StopInputWinEngine( sal_Bool bAll );
+    void            StopInputWinEngine( bool bAll );
 
-    sal_Bool            IsInEnterHandler() const                { return bInEnterHandler; }
-    sal_Bool            IsInOwnChange() const                   { return bInOwnChange; }
+    bool            IsInEnterHandler() const                { return bInEnterHandler; }
+    bool            IsInOwnChange() const                   { return bInOwnChange; }
 
-    sal_Bool            IsModalMode( SfxObjectShell* pDocSh );
+    bool            IsModalMode( SfxObjectShell* pDocSh );
 
     void            ForgetLastPattern();
 
-    void            UpdateSpellSettings( sal_Bool bFromStartTab = false );
+    void            UpdateSpellSettings( bool bFromStartTab = false );
 
     void            FormulaPreview();
 
@@ -264,7 +266,7 @@ public:
                     // eigentlich private, fuer SID_INPUT_SUM public
     void            InitRangeFinder( const String& rFormula );
 
-    static void     SetAutoComplete(sal_Bool bSet)  { bAutoComplete = bSet; }
+    static void     SetAutoComplete(bool bSet)  { bAutoComplete = bSet; }
 };
 
 //========================================================================


More information about the Libreoffice-commits mailing list