summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/inputhdl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/app/inputhdl.cxx')
-rw-r--r--sc/source/ui/app/inputhdl.cxx708
1 files changed, 354 insertions, 354 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 55aa0986d2ec..685ea397858e 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -82,31 +82,31 @@
#include "userlist.hxx"
#include "rfindlst.hxx"
#include "inputopt.hxx"
-#include "cell.hxx" // fuer Formel-Preview
-#include "compiler.hxx" // fuer Formel-Preview
+#include "cell.hxx" // fuer Formel-Preview
+#include "compiler.hxx" // fuer Formel-Preview
#include "editable.hxx"
#include "funcdesc.hxx"
#define _INPUTHDL_CXX
#include "inputhdl.hxx"
-// max. Ranges im RangeFinder
-#define RANGEFIND_MAX 32
+// max. Ranges im RangeFinder
+#define RANGEFIND_MAX 32
using namespace formula;
// STATIC DATA -----------------------------------------------------------
-BOOL ScInputHandler::bOptLoaded = FALSE; // App-Optionen ausgewertet
-BOOL ScInputHandler::bAutoComplete = FALSE; // wird in KeyInput gesetzt
+BOOL ScInputHandler::bOptLoaded = FALSE; // App-Optionen ausgewertet
+BOOL ScInputHandler::bAutoComplete = FALSE; // wird in KeyInput gesetzt
-// delimiters (in addition to ScEditUtil) needed for range finder:
-// only characters that are allowed in formulas next to references
-// and the quotation mark (so string constants can be skipped)
+// delimiters (in addition to ScEditUtil) needed for range finder:
+// only characters that are allowed in formulas next to references
+// and the quotation mark (so string constants can be skipped)
static const sal_Char __FAR_DATA pMinDelimiters[] = " !\"";
-extern USHORT nEditAdjust; //! Member an ViewData
+extern USHORT nEditAdjust; //! Member an ViewData
//==================================================================
@@ -127,16 +127,16 @@ void ScInputHandler::InitRangeFinder( const String& rFormula )
if ( !pActiveViewSh || !SC_MOD()->GetInputOptions().GetRangeFinder() )
return;
-// String aDelimiters = pEngine->GetWordDelimiters();
+// String aDelimiters = pEngine->GetWordDelimiters();
String aDelimiters = ScEditUtil::ModifyDelimiters(
String::CreateFromAscii( pMinDelimiters ) );
xub_StrLen nColon = aDelimiters.Search(':');
if ( nColon != STRING_NOTFOUND )
- aDelimiters.Erase( nColon, 1 ); // Delimiter ohne Doppelpunkt
+ aDelimiters.Erase( nColon, 1 ); // Delimiter ohne Doppelpunkt
xub_StrLen nDot = aDelimiters.Search(cSheetSep);
if ( nDot != STRING_NOTFOUND )
- aDelimiters.Erase( nDot, 1 ); // Delimiter ohne Punkt
+ aDelimiters.Erase( nDot, 1 ); // Delimiter ohne Punkt
const sal_Unicode* pChar = rFormula.GetBuffer();
xub_StrLen nLen = rFormula.Len();
@@ -146,19 +146,19 @@ void ScInputHandler::InitRangeFinder( const String& rFormula )
ScRange aRange;
while ( nPos < nLen && nCount < RANGEFIND_MAX )
{
- // Trenner ueberlesen
+ // Trenner ueberlesen
while ( nPos<nLen && ScGlobal::UnicodeStrChr( aDelimiters.GetBuffer(), pChar[nPos] ) )
{
- if ( pChar[nPos] == '"' ) // String
+ if ( pChar[nPos] == '"' ) // String
{
++nPos;
- while (nPos<nLen && pChar[nPos] != '"') // bis zum Ende ueberlesen
+ while (nPos<nLen && pChar[nPos] != '"') // bis zum Ende ueberlesen
++nPos;
}
- ++nPos; // Trennzeichen oder schliessender Quote
+ ++nPos; // Trennzeichen oder schliessender Quote
}
- // Text zwischen Trennern
+ // Text zwischen Trennern
nStart = nPos;
handle_r1c1:
while ( nPos<nLen && !ScGlobal::UnicodeStrChr( aDelimiters.GetBuffer(), pChar[nPos] ) )
@@ -183,7 +183,7 @@ handle_r1c1:
USHORT nFlags = aRange.ParseAny( aTest, pDoc, aAddrDetails );
if ( nFlags & SCA_VALID )
{
- // Tabelle setzen, wenn nicht angegeben
+ // Tabelle setzen, wenn nicht angegeben
if ( (nFlags & SCA_TAB_3D) == 0 )
aRange.aStart.SetTab( pActiveViewSh->GetViewData()->GetTabNo() );
if ( (nFlags & SCA_TAB2_3D) == 0 )
@@ -215,7 +215,7 @@ handle_r1c1:
}
}
- // letzten Trenner nicht ueberlesen, koennte ja ein Quote sein (?)
+ // letzten Trenner nicht ueberlesen, koennte ja ein Quote sein (?)
}
if (nCount)
@@ -238,13 +238,13 @@ void lcl_Replace( EditView* pView, const String& rNewStr, const ESelection& rOld
EditEngine* pEngine = pView->GetEditEngine();
pEngine->QuickInsertText( rNewStr, rOldSel );
- // Dummy-InsertText fuer Update und Paint
- // dafuer muss oben die Selektion aufgehoben werden (vor QuickInsertText)
+ // Dummy-InsertText fuer Update und Paint
+ // dafuer muss oben die Selektion aufgehoben werden (vor QuickInsertText)
pView->InsertText( EMPTY_STRING, FALSE );
xub_StrLen nLen = pEngine->GetTextLen(0);
ESelection aSel( 0, nLen, 0, nLen );
- pView->SetSelection( aSel ); // Cursor ans Ende
+ pView->SetSelection( aSel ); // Cursor ans Ende
}
}
@@ -258,7 +258,7 @@ void ScInputHandler::UpdateRange( USHORT nIndex, const ScRange& rNew )
xub_StrLen nOldEnd = pData->nSelEnd;
ScRange aJustified = rNew;
- aJustified.Justify(); // Ref in der Formel immer richtigherum anzeigen
+ aJustified.Justify(); // Ref in der Formel immer richtigherum anzeigen
String aNewStr;
ScDocument* pDoc = pDocView->GetViewData()->GetDocument();
const ScAddress::Details aAddrDetails( pDoc, aCursorPos );
@@ -300,7 +300,7 @@ void ScInputHandler::DeleteRangeFinder()
{
ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
pRangeFindList->SetHidden(TRUE);
- pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) ); // wegnehmen
+ pDocSh->Broadcast( SfxSimpleHint( SC_HINT_SHOWRANGEFINDER ) ); // wegnehmen
DELETEZ(pRangeFindList);
}
}
@@ -404,7 +404,7 @@ xub_StrLen lcl_MatchParenthesis( const String& rStr, xub_StrLen nPos )
{
bInString = !bInString;
if ( bLookInString && !bInString )
- p = p1; //That's it then
+ p = p1; //That's it then
}
else if ( bInString == bLookInString )
{
@@ -463,20 +463,20 @@ ScInputHandler::ScInputHandler()
pDelayTimer( NULL ),
pRangeFindList( NULL )
{
- // The InputHandler is constructed with the view, so SfxViewShell::Current
- // doesn't have the right view yet. pActiveViewSh is updated in NotifyChange.
+ // The InputHandler is constructed with the view, so SfxViewShell::Current
+ // doesn't have the right view yet. pActiveViewSh is updated in NotifyChange.
pActiveViewSh = NULL;
- // Bindings (nur noch fuer Invalidate benutzt) werden bei Bedarf aktuell geholt
+ // Bindings (nur noch fuer Invalidate benutzt) werden bei Bedarf aktuell geholt
}
__EXPORT ScInputHandler::~ScInputHandler()
{
- // Wenn dies der Applikations-InputHandler ist, wird der dtor erst nach SfxApplication::Main
- // gerufen, darf sich also auf keine Sfx-Funktionen mehr verlassen
+ // Wenn dies der Applikations-InputHandler ist, wird der dtor erst nach SfxApplication::Main
+ // gerufen, darf sich also auf keine Sfx-Funktionen mehr verlassen
- if ( !SFX_APP()->IsDowning() ) // inplace
- EnterHandler(); // Eingabe noch abschliessen
+ if ( !SFX_APP()->IsDowning() ) // inplace
+ EnterHandler(); // Eingabe noch abschliessen
if (SC_MOD()->GetRefInputHdl()==this)
SC_MOD()->SetRefInputHdl(NULL);
@@ -522,8 +522,8 @@ void ScInputHandler::UpdateRefDevice()
MapMode aMode( MAP_100TH_MM, Point(), aScaleX, aScaleY );
pEngine->SetRefMapMode( aMode );
- // SetRefDevice(NULL) uses VirtualDevice, SetRefMapMode forces creation of a local VDev,
- // so the DigitLanguage can be safely modified (might use an own VDev instead of NULL).
+ // SetRefDevice(NULL) uses VirtualDevice, SetRefMapMode forces creation of a local VDev,
+ // so the DigitLanguage can be safely modified (might use an own VDev instead of NULL).
if ( !( bTextWysiwyg && pActiveViewSh ) )
{
pEngine->GetRefDevice()->SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
@@ -542,7 +542,7 @@ void ScInputHandler::ImplCreateEditEngine()
else
pEngine = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE );
pEngine->SetWordDelimiters( ScEditUtil::ModifyDelimiters( pEngine->GetWordDelimiters() ) );
- UpdateRefDevice(); // also sets MapMode
+ UpdateRefDevice(); // also sets MapMode
pEngine->SetPaperSize( Size( 1000000, 1000000 ) );
pEditDefaults = new SfxItemSet( pEngine->GetEmptyItemSet() );
@@ -556,7 +556,7 @@ void ScInputHandler::UpdateAutoCorrFlag()
ULONG nCntrl = pEngine->GetControlWord();
ULONG nOld = nCntrl;
- // don't use pLastPattern here (may be invalid because of AutoStyle)
+ // don't use pLastPattern here (may be invalid because of AutoStyle)
BOOL bDisable = bLastIsSymbol || bFormulaMode;
if ( bDisable )
@@ -575,14 +575,14 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
ScViewData* pViewData = pActiveViewSh->GetViewData();
BOOL bOnlineSpell = pViewData->GetDocument()->GetDocOptions().IsAutoSpell();
- // SetDefaultLanguage is independent of the language attributes,
- // ScGlobal::GetEditDefaultLanguage is always used.
- // It must be set every time in case the office language was changed.
+ // SetDefaultLanguage is independent of the language attributes,
+ // ScGlobal::GetEditDefaultLanguage is always used.
+ // It must be set every time in case the office language was changed.
pEngine->SetDefaultLanguage( ScGlobal::GetEditDefaultLanguage() );
- // if called for changed options, update flags only if already editing
- // if called from StartTable, always update flags
+ // if called for changed options, update flags only if already editing
+ // if called from StartTable, always update flags
if ( bFromStartTab || eMode != SC_INPUT_NONE )
{
@@ -609,8 +609,8 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
pEngine->SetFirstWordCapitalization( FALSE );
}
- // language is set separately, so the speller is needed only if online
- // spelling is active
+ // language is set separately, so the speller is needed only if online
+ // spelling is active
if ( bOnlineSpell ) {
com::sun::star::uno::Reference<com::sun::star::linguistic2::XSpellChecker1> xXSpellChecker1( LinguMgr::GetSpellChecker() );
@@ -626,11 +626,11 @@ void ScInputHandler::UpdateSpellSettings( BOOL bFromStartTab )
}
//
-// Funktionen/Bereichsnamen etc. als Tip-Hilfe
+// Funktionen/Bereichsnamen etc. als Tip-Hilfe
//
-#define SC_STRTYPE_FUNCTIONS 1
-// die anderen Typen sind in ScDocument::GetFormulaEntries festgelegt
+#define SC_STRTYPE_FUNCTIONS 1
+// die anderen Typen sind in ScDocument::GetFormulaEntries festgelegt
void ScInputHandler::GetFormulaData()
{
@@ -648,9 +648,9 @@ void ScInputHandler::GetFormulaData()
else
pFormulaDataPara = new TypedScStrCollection;
- // MRU-Funktionen aus dem Funktions-Autopiloten
- // wie in ScPosWnd::FillFunctions (inputwin.cxx)
-
+ // MRU-Funktionen aus dem Funktions-Autopiloten
+ // wie in ScPosWnd::FillFunctions (inputwin.cxx)
+
const ScAppOptions& rOpt = SC_MOD()->GetAppOptions();
USHORT nMRUCount = rOpt.GetLRUFuncListCount();
const USHORT* pMRUList = rOpt.GetLRUFuncList();
@@ -758,7 +758,7 @@ void ScInputHandler::ShowTipCursor()
xub_StrLen nArgPos = 0;
const IFunctionDescription* ppFDesc;
::std::vector< ::rtl::OUString> aArgs;
- USHORT nArgs;
+ USHORT nArgs;
BOOL bFound = FALSE;
FormulaHelper aHelper(ScGlobal::GetStarCalcFunctionMgr());
@@ -897,7 +897,7 @@ void ScInputHandler::ShowTipCursor()
ShowTipBelow( aNew );
bFound = TRUE;
}
- else
+ else
break;
}
else
@@ -912,7 +912,7 @@ void ScInputHandler::ShowTipCursor()
void ScInputHandler::ShowTip( const String& rText )
{
- // aManualTip muss hinterher von aussen gesetzt werden
+ // aManualTip muss hinterher von aussen gesetzt werden
HideTip();
EditView* pActiveView = pTopView ? pTopView : pTableView;
@@ -963,21 +963,21 @@ void ScInputHandler::UseFormulaData()
const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
const sal_Unicode cSheetSep = lcl_getSheetSeparator(pDocSh->GetDocument());
- // Formeln duerfen nur 1 Absatz haben
+ // Formeln duerfen nur 1 Absatz haben
if ( pActiveView && pFormulaData && pEngine->GetParagraphCount() == 1 )
{
String aTotal = pEngine->GetText( (USHORT) 0 );
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
- // #59348# Durch Differenzen zwischen Tabelle und Eingabezeile
- // (z.B. Clipboard mit Zeilenumbruechen) kann es sein, dass die Selektion
- // nicht mehr zur EditEngine passt. Dann halt kommentarlos abbrechen:
+ // #59348# Durch Differenzen zwischen Tabelle und Eingabezeile
+ // (z.B. Clipboard mit Zeilenumbruechen) kann es sein, dass die Selektion
+ // nicht mehr zur EditEngine passt. Dann halt kommentarlos abbrechen:
if ( aSel.nEndPos > aTotal.Len() )
return;
- // steht der Cursor am Ende eines Wortes?
+ // steht der Cursor am Ende eines Wortes?
if ( aSel.nEndPos > 0 )
{
@@ -989,7 +989,7 @@ void ScInputHandler::UseFormulaData()
xub_StrLen nArgPos = 0;
const IFunctionDescription* ppFDesc;
::std::vector< ::rtl::OUString> aArgs;
- USHORT nArgs;
+ USHORT nArgs;
BOOL bFound = FALSE;
String aText = pEngine->GetWord( 0, aSel.nEndPos-1 );
@@ -1049,7 +1049,7 @@ void ScInputHandler::UseFormulaData()
{
nCountSemicolon = aNew.GetTokenCount(cSep)-1;
nCountDot = aNew.GetTokenCount(cSheetSep)-1;
-
+
if( !nCountSemicolon )
{
for( USHORT i = 0; i < aNew.Len(); i++ )
@@ -1135,10 +1135,10 @@ void ScInputHandler::NextFormulaEntry( BOOL bBack )
{
String aNew;
if ( pFormulaData->FindText( aAutoSearch, aNew, nAutoPos, bBack ) )
- ShowTip( aNew ); // als QuickHelp anzeigen
+ ShowTip( aNew ); // als QuickHelp anzeigen
}
- // bei Tab wird vorher immer HideCursor gerufen
+ // bei Tab wird vorher immer HideCursor gerufen
if (pActiveView)
pActiveView->ShowCursor();
@@ -1160,9 +1160,9 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns
&& aInsStr.GetChar(nInsLen-1) == ')' );
if ( bDoParen )
{
- // Klammern hinter Funktionsnamen nicht einfuegen, wenn direkt dahinter
- // schon eine Klammer steht (z.B. wenn der Funktionsname geaendert wurde,
- // #39393#).
+ // Klammern hinter Funktionsnamen nicht einfuegen, wenn direkt dahinter
+ // schon eine Klammer steht (z.B. wenn der Funktionsname geaendert wurde,
+ // #39393#).
ESelection aWordSel = pView->GetSelection();
String aOld = pView->GetEditEngine()->GetText((USHORT)0);
@@ -1170,13 +1170,13 @@ void lcl_CompleteFunction( EditView* pView, const String& rInsert, BOOL& rParIns
if ( cNext == '(' )
{
bDoParen = FALSE;
- aInsStr.Erase( nInsLen - 2 ); // Klammern weglassen
+ aInsStr.Erase( nInsLen - 2 ); // Klammern weglassen
}
}
pView->InsertText( aInsStr, FALSE );
- if ( bDoParen ) // Cursor zwischen die Klammern setzen
+ if ( bDoParen ) // Cursor zwischen die Klammern setzen
{
aSel = pView->GetSelection();
--aSel.nStartPos;
@@ -1198,7 +1198,7 @@ void ScInputHandler::PasteFunctionData()
String aInsert = pData->GetString();
BOOL bParInserted = FALSE;
- DataChanging(); // kann nicht neu sein
+ DataChanging(); // kann nicht neu sein
lcl_CompleteFunction( pTopView, aInsert, bParInserted );
lcl_CompleteFunction( pTableView, aInsert, bParInserted );
DataChanged();
@@ -1217,13 +1217,13 @@ void ScInputHandler::PasteFunctionData()
}
//
-// Selektion berechnen und als Tip-Hilfe anzeigen
+// Selektion berechnen und als Tip-Hilfe anzeigen
//
String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress &rPos )
{
- //! mit ScFormulaDlg::CalcValue zusammenfassen und ans Dokument verschieben !!!!
- //! (Anfuehrungszeichen bei Strings werden nur hier eingefuegt)
+ //! mit ScFormulaDlg::CalcValue zusammenfassen und ans Dokument verschieben !!!!
+ //! (Anfuehrungszeichen bei Strings werden nur hier eingefuegt)
String aValue;
@@ -1240,7 +1240,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
{
// ColRowName im RPN-Code?
if ( pCell->GetCode()->GetCodeLen() <= 1 )
- { // ==1: einzelner ist als Parameter immer Bereich
+ { // ==1: einzelner ist als Parameter immer Bereich
// ==0: es waere vielleicht einer, wenn..
String aBraced( '(' );
aBraced += rFormula;
@@ -1263,7 +1263,7 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
ULONG nFormat = aFormatter.GetStandardFormat( n, 0,
pCell->GetFormatType(), ScGlobal::eLnge );
aFormatter.GetInputLineString( n, nFormat, aValue );
- //! display OutputString but insert InputLineString
+ //! display OutputString but insert InputLineString
}
else
{
@@ -1275,14 +1275,14 @@ String lcl_Calculate( const String& rFormula, ScDocument* pDoc, const ScAddress
aFormatter.GetOutputString( aStr, nFormat,
aValue, &pColor );
- aValue.Insert('"',0); // in Anfuehrungszeichen
+ aValue.Insert('"',0); // in Anfuehrungszeichen
aValue+='"';
- //! Anfuehrungszeichen im String escapen ????
+ //! Anfuehrungszeichen im String escapen ????
}
ScRange aTestRange;
if ( bColRowName || (aTestRange.Parse(rFormula) & SCA_VALID) )
- aValue.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " ..." )); // Bereich
+ aValue.AppendAscii(RTL_CONSTASCII_STRINGPARAM( " ..." )); // Bereich
}
else
aValue = ScGlobal::GetErrorString(nErrCode);
@@ -1307,27 +1307,27 @@ void ScInputHandler::FormulaPreview()
if (aValue.Len())
{
- ShowTip( aValue ); // als QuickHelp anzeigen
- aManualTip = aValue; // nach ShowTip setzen
- nAutoPos = SCPOS_INVALID; // Formel-Autocomplete aufheben
+ ShowTip( aValue ); // als QuickHelp anzeigen
+ aManualTip = aValue; // nach ShowTip setzen
+ nAutoPos = SCPOS_INVALID; // Formel-Autocomplete aufheben
}
}
void ScInputHandler::PasteManualTip()
{
- // drei Punkte am Ende -> Bereichsreferenz -> nicht einfuegen
- // (wenn wir mal Matrix-Konstanten haben, kann das geaendert werden)
+ // 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("...") ) )
{
- DataChanging(); // kann nicht neu sein
+ DataChanging(); // kann nicht neu sein
String aInsert = aManualTip;
EditView* pActiveView = pTopView ? pTopView : pTableView;
if (!pActiveView->HasSelection())
{
- // nichts selektiert -> alles selektieren
+ // nichts selektiert -> alles selektieren
xub_StrLen nOldLen = pEngine->GetTextLen(0);
ESelection aAllSel( 0, 0, 0, nOldLen );
if ( pTopView )
@@ -1339,11 +1339,11 @@ void ScInputHandler::PasteManualTip()
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
DBG_ASSERT( !aSel.nStartPara && !aSel.nEndPara, "Zuviele Absaetze in Formel" );
- if ( !aSel.nStartPos ) // Selektion ab Anfang?
+ if ( !aSel.nStartPos ) // Selektion ab Anfang?
{
if ( aSel.nEndPos == pEngine->GetTextLen(0) )
{
- // alles selektiert -> Anfuehrungszeichen weglassen
+ // alles selektiert -> Anfuehrungszeichen weglassen
if ( aInsert.GetChar(0) == '"' )
aInsert.Erase(0,1);
xub_StrLen nInsLen = aInsert.Len();
@@ -1352,8 +1352,8 @@ void ScInputHandler::PasteManualTip()
}
else if ( aSel.nEndPos )
{
- // nicht alles selektiert -> Gleichheitszeichen nicht ueberschreiben
- //! doppelte Gleichheitszeichen auch ???
+ // nicht alles selektiert -> Gleichheitszeichen nicht ueberschreiben
+ //! doppelte Gleichheitszeichen auch ???
aSel.nStartPos = 1;
if ( pTopView )
@@ -1380,14 +1380,14 @@ void ScInputHandler::ResetAutoPar()
void ScInputHandler::AutoParAdded()
{
- ++nAutoPar; // closing parenthesis can be overwritten
+ ++nAutoPar; // closing parenthesis can be overwritten
}
BOOL ScInputHandler::CursorAtClosingPar()
{
- // test if the cursor is before a closing parenthesis
+ // test if the cursor is before a closing parenthesis
- // selection from SetReference has been removed before
+ // selection from SetReference has been removed before
EditView* pActiveView = pTopView ? pTopView : pTableView;
if ( pActiveView && !pActiveView->HasSelection() && bFormulaMode )
{
@@ -1402,8 +1402,8 @@ BOOL ScInputHandler::CursorAtClosingPar()
void ScInputHandler::SkipClosingPar()
{
- // this is called when a ')' is typed and the cursor is before a ')'
- // that can be overwritten -> just set the cursor behind the ')'
+ // this is called when a ')' is typed and the cursor is before a ')'
+ // that can be overwritten -> just set the cursor behind the ')'
EditView* pActiveView = pTopView ? pTopView : pTableView;
if (pActiveView)
@@ -1412,8 +1412,8 @@ void ScInputHandler::SkipClosingPar()
++aSel.nStartPos;
++aSel.nEndPos;
- // this is in a formula (only one paragraph), so the selection
- // can be used directly for the TopView
+ // this is in a formula (only one paragraph), so the selection
+ // can be used directly for the TopView
if ( pTopView )
pTopView->SetSelection( aSel );
@@ -1426,7 +1426,7 @@ void ScInputHandler::SkipClosingPar()
}
//
-// Auto-Eingabe
+// Auto-Eingabe
//
void ScInputHandler::GetColData()
@@ -1440,7 +1440,7 @@ void ScInputHandler::GetColData()
else
{
pColumnData = new TypedScStrCollection;
- pColumnData->SetCaseSensitive( TRUE ); // equal strings are handled in FindText
+ pColumnData->SetCaseSensitive( TRUE ); // equal strings are handled in FindText
}
pDoc->GetDataEntries( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
@@ -1448,12 +1448,12 @@ void ScInputHandler::GetColData()
}
}
-void ScInputHandler::UseColData() // beim Tippen
+void ScInputHandler::UseColData() // beim Tippen
{
EditView* pActiveView = pTopView ? pTopView : pTableView;
if ( pActiveView && pColumnData )
{
- // nur anpassen, wenn Cursor am Ende steht
+ // nur anpassen, wenn Cursor am Ende steht
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
@@ -1468,27 +1468,27 @@ void ScInputHandler::UseColData() // beim Tippen
if (aText.Len())
{
String aNew;
- nAutoPos = SCPOS_INVALID; // nix
+ nAutoPos = SCPOS_INVALID; // nix
if ( pColumnData->FindText( aText, aNew, nAutoPos, FALSE ) )
{
- // #45434# durch dBase Import etc. koennen Umbrueche im String sein,
- // das wuerde hier mehrere Absaetze ergeben -> nicht gut
- //! GetExactMatch funktioniert dann auch nicht
+ // #45434# durch dBase Import etc. koennen Umbrueche im String sein,
+ // das wuerde hier mehrere Absaetze ergeben -> nicht gut
+ //! GetExactMatch funktioniert dann auch nicht
lcl_RemoveLineEnd( aNew );
// Absaetze beibehalten, nur den Rest anfuegen
- //! genaue Ersetzung im EnterHandler !!!
+ //! genaue Ersetzung im EnterHandler !!!
// ein Space zwischen Absaetzen:
ULONG nEdLen = pEngine->GetTextLen() + nParCnt - 1;
String aIns = aNew.Copy( (xub_StrLen)nEdLen );
- // selection must be "backwards", so the cursor stays behind the last
- // typed character
+ // selection must be "backwards", so the cursor stays behind the last
+ // typed character
ESelection aSelection( aSel.nEndPara, aSel.nEndPos + aIns.Len(),
aSel.nEndPara, aSel.nEndPos );
- // when editing in input line, apply to both edit views
+ // when editing in input line, apply to both edit views
if ( pTableView )
{
pTableView->InsertText( aIns, FALSE );
@@ -1500,12 +1500,12 @@ void ScInputHandler::UseColData() // beim Tippen
pTopView->SetSelection( aSelection );
}
- aAutoSearch = aText; // zum Weitersuchen - nAutoPos ist gesetzt
+ aAutoSearch = aText; // zum Weitersuchen - nAutoPos ist gesetzt
if ( aText.Len() == aNew.Len() )
{
- // Wenn der eingegebene Text gefunden wurde, TAB nur dann
- // verschlucken, wenn noch etwas kommt
+ // Wenn der eingegebene Text gefunden wurde, TAB nur dann
+ // verschlucken, wenn noch etwas kommt
String aDummy;
USHORT nNextPos = nAutoPos;
@@ -1527,7 +1527,7 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
{
if ( nAutoPos != SCPOS_INVALID && aAutoSearch.Len() )
{
- // stimmt die Selektion noch? (kann per Maus geaendert sein)
+ // stimmt die Selektion noch? (kann per Maus geaendert sein)
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
@@ -1542,12 +1542,12 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
String aNew;
if ( pColumnData->FindText( aAutoSearch, aNew, nAutoPos, bBack ) )
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = TRUE; // disable ModifyHdl (reset below)
lcl_RemoveLineEnd( aNew );
String aIns = aNew.Copy( aAutoSearch.Len() );
- // when editing in input line, apply to both edit views
+ // when editing in input line, apply to both edit views
if ( pTableView )
{
pTableView->DeleteSelected();
@@ -1578,31 +1578,31 @@ void ScInputHandler::NextAutoEntry( BOOL bBack )
}
}
- // bei Tab wird vorher immer HideCursor gerufen
+ // bei Tab wird vorher immer HideCursor gerufen
if (pActiveView)
pActiveView->ShowCursor();
}
//
-// Klammern hervorheben
+// Klammern hervorheben
//
void ScInputHandler::UpdateParenthesis()
{
- // Klammern suchen
+ // Klammern suchen
- //! Klammer-Hervorhebung einzeln abschaltbar ????
+ //! Klammer-Hervorhebung einzeln abschaltbar ????
BOOL bFound = FALSE;
if ( bFormulaMode && eMode != SC_INPUT_TOP )
{
- if ( pTableView && !pTableView->HasSelection() ) // Selektion ist immer unten
+ if ( pTableView && !pTableView->HasSelection() ) // Selektion ist immer unten
{
ESelection aSel = pTableView->GetSelection();
if (aSel.nStartPos)
{
- // Das Zeichen links vom Cursor wird angeschaut
+ // Das Zeichen links vom Cursor wird angeschaut
xub_StrLen nPos = aSel.nStartPos - 1;
String aFormula = pEngine->GetText((USHORT)0);
@@ -1614,11 +1614,11 @@ void ScInputHandler::UpdateParenthesis()
{
SfxItemSet aSet( pEngine->GetEmptyItemSet() );
aSet.Put( SvxWeightItem( WEIGHT_BOLD, EE_CHAR_WEIGHT ) );
- //! Unterscheidung, wenn die Zelle schon fett ist !!!!
+ //! Unterscheidung, wenn die Zelle schon fett ist !!!!
if (bParenthesisShown)
{
- // alte Hervorhebung wegnehmen
+ // alte Hervorhebung wegnehmen
USHORT nCount = pEngine->GetParagraphCount();
for (USHORT i=0; i<nCount; i++)
pEngine->QuickRemoveCharAttribs( i, EE_CHAR_WEIGHT );
@@ -1629,7 +1629,7 @@ void ScInputHandler::UpdateParenthesis()
ESelection aSelOther( 0,nOther, 0,nOther+1 );
pEngine->QuickSetAttribs( aSet, aSelOther );
- // Dummy-InsertText fuer Update und Paint (Selektion ist leer)
+ // Dummy-InsertText fuer Update und Paint (Selektion ist leer)
pTableView->InsertText( EMPTY_STRING, FALSE );
bFound = TRUE;
@@ -1637,12 +1637,12 @@ void ScInputHandler::UpdateParenthesis()
}
}
- // mark parenthesis right of cursor if it will be overwritten (nAutoPar)
- // with different color (COL_LIGHTBLUE) ??
+ // mark parenthesis right of cursor if it will be overwritten (nAutoPar)
+ // with different color (COL_LIGHTBLUE) ??
}
}
- // alte Hervorhebung wegnehmen, wenn keine neue gesetzt
+ // alte Hervorhebung wegnehmen, wenn keine neue gesetzt
if ( bParenthesisShown && !bFound && pTableView )
{
@@ -1654,7 +1654,7 @@ void ScInputHandler::UpdateParenthesis()
bParenthesisShown = bFound;
}
-void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // wird synchron aufgerufen!
+void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // wird synchron aufgerufen!
{
if ( pViewSh == pActiveViewSh )
{
@@ -1666,7 +1666,7 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // wird synchron
if ( pViewSh == pRefViewSh )
{
//! Die Eingabe kommt aus dem EnterHandler nicht mehr an
- // Trotzdem wird immerhin der Editmodus beendet
+ // Trotzdem wird immerhin der Editmodus beendet
EnterHandler();
bFormulaMode = FALSE;
@@ -1687,7 +1687,7 @@ void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // wird synchron
}
if ( SC_MOD()->GetInputOptions().GetTextWysiwyg() )
- UpdateRefDevice(); // don't keep old document's printer as RefDevice
+ UpdateRefDevice(); // don't keep old document's printer as RefDevice
}
void ScInputHandler::UpdateActiveView()
@@ -1729,7 +1729,7 @@ void ScInputHandler::StopInputWinEngine( BOOL bAll )
if (pInputWin)
pInputWin->StopEditEngine( bAll );
- pTopView = NULL; // invalid now
+ pTopView = NULL; // invalid now
}
EditView* ScInputHandler::GetActiveView()
@@ -1742,7 +1742,7 @@ void ScInputHandler::ForgetLastPattern()
{
pLastPattern = NULL;
if ( !pLastState && pActiveViewSh )
- pActiveViewSh->UpdateInputHandler( TRUE ); // Status neu holen
+ pActiveViewSh->UpdateInputHandler( TRUE ); // Status neu holen
else
NotifyChange( pLastState, TRUE );
}
@@ -1755,8 +1755,8 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
case SVX_HOR_JUSTIFY_STANDARD:
{
BOOL bNumber = FALSE;
- if (cTyped) // neu angefangen
- bNumber = (cTyped>='0' && cTyped<='9'); // nur Ziffern sind Zahlen
+ if (cTyped) // neu angefangen
+ bNumber = (cTyped>='0' && cTyped<='9'); // nur Ziffern sind Zahlen
else if ( pActiveViewSh )
{
ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocShell()->GetDocument();
@@ -1774,7 +1774,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
case SVX_HOR_JUSTIFY_RIGHT:
eSvxAdjust = SVX_ADJUST_RIGHT;
break;
- default: // SVX_HOR_JUSTIFY_LEFT
+ default: // SVX_HOR_JUSTIFY_LEFT
eSvxAdjust = SVX_ADJUST_LEFT;
break;
}
@@ -1784,7 +1784,7 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
((const SfxBoolItem&)pLastPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
if ( bAsianVertical )
{
- // always edit at top of cell -> LEFT when editing vertically
+ // always edit at top of cell -> LEFT when editing vertically
eSvxAdjust = SVX_ADJUST_LEFT;
}
@@ -1798,13 +1798,13 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
void ScInputHandler::RemoveAdjust()
{
- // harte Ausrichtungs-Attribute loeschen
+ // harte Ausrichtungs-Attribute loeschen
BOOL bUndo = pEngine->IsUndoEnabled();
if ( bUndo )
pEngine->EnableUndo( FALSE );
- // RemoveParaAttribs removes all paragraph attributes, including EE_PARA_JUST
+ // RemoveParaAttribs removes all paragraph attributes, including EE_PARA_JUST
#if 0
BOOL bChange = FALSE;
USHORT nCount = pEngine->GetParagraphCount();
@@ -1821,8 +1821,8 @@ void ScInputHandler::RemoveAdjust()
}
#endif
- // #89403# non-default paragraph attributes (e.g. from clipboard)
- // must be turned into character attributes
+ // #89403# non-default paragraph attributes (e.g. from clipboard)
+ // must be turned into character attributes
pEngine->RemoveParaAttribs();
if ( bUndo )
@@ -1840,10 +1840,10 @@ void ScInputHandler::RemoveAdjust()
void ScInputHandler::RemoveRangeFinder()
{
- // pRangeFindList und Farben loeschen
+ // pRangeFindList und Farben loeschen
pEngine->SetUpdateMode(FALSE);
- USHORT nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein
+ USHORT nCount = pEngine->GetParagraphCount(); // koennte gerade neu eingefuegt worden sein
for (USHORT i=0; i<nCount; i++)
pEngine->QuickRemoveCharAttribs( i, EE_CHAR_COLOR );
pEngine->SetUpdateMode(TRUE);
@@ -1851,7 +1851,7 @@ void ScInputHandler::RemoveRangeFinder()
EditView* pActiveView = pTopView ? pTopView : pTableView;
pActiveView->ShowCursor( FALSE, TRUE );
- DeleteRangeFinder(); // loescht die Liste und die Markierungen auf der Tabelle
+ DeleteRangeFinder(); // loescht die Liste und die Markierungen auf der Tabelle
}
BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand )
@@ -1882,14 +1882,14 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand )
// UpdateMode is enabled again in ScViewData::SetEditEngine (and not needed otherwise)
pEngine->SetUpdateMode( FALSE );
- // Attribute in EditEngine uebernehmen
+ // Attribute in EditEngine uebernehmen
const ScPatternAttr* pPattern = pDoc->GetPattern( aCursorPos.Col(),
aCursorPos.Row(),
aCursorPos.Tab() );
if (pPattern != pLastPattern)
{
- // Prozent-Format?
+ // Prozent-Format?
const SfxItemSet& rAttrSet = pPattern->GetItemSet();
const SfxPoolItem* pItem;
@@ -1903,18 +1903,18 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand )
else
bCellHasPercentFormat = FALSE; // Default: kein Prozent
- // Gueltigkeit angegeben?
+ // Gueltigkeit angegeben?
if ( SFX_ITEM_SET == rAttrSet.GetItemState( ATTR_VALIDDATA, TRUE, &pItem ) )
nValidation = ((const SfxUInt32Item*)pItem)->GetValue();
else
nValidation = 0;
- // EditEngine Defaults
+ // EditEngine Defaults
- // Hier auf keinen Fall SetParaAttribs, weil die EditEngine evtl.
- // schon gefuellt ist (bei Edit-Zellen).
- // SetParaAttribs wuerde dann den Inhalt aendern
+ // Hier auf keinen Fall SetParaAttribs, weil die EditEngine evtl.
+ // schon gefuellt ist (bei Edit-Zellen).
+ // SetParaAttribs wuerde dann den Inhalt aendern
//! ER 30.08.00 The SetDefaults is now (since MUST/src602
//! EditEngine changes) implemented as a SetParaAttribs.
@@ -1925,19 +1925,19 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand )
pLastPattern = pPattern;
bLastIsSymbol = pPattern->IsSymbolFont();
- // Background color must be known for automatic font color.
- // For transparent cell background, the document background color must be used.
+ // Background color must be known for automatic font color.
+ // For transparent cell background, the document background color must be used.
Color aBackCol = ((const SvxBrushItem&)
pPattern->GetItem( ATTR_BACKGROUND )).GetColor();
ScModule* pScMod = SC_MOD();
- // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
+ // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE)
if ( aBackCol.GetTransparency() > 0 ||
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
aBackCol.SetColor( pScMod->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor );
pEngine->SetBackgroundColor( aBackCol );
- // Ausrichtung
+ // Ausrichtung
eAttrAdjust = (SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern->
GetItem(ATTR_HOR_JUSTIFY)).GetValue();
@@ -1949,12 +1949,12 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand )
}
}
- // UpdateSpellSettings enables online spelling if needed
- // -> also call if attributes are unchanged
+ // UpdateSpellSettings enables online spelling if needed
+ // -> also call if attributes are unchanged
- UpdateSpellSettings( TRUE ); // uses pLastPattern
+ UpdateSpellSettings( TRUE ); // uses pLastPattern
- // Edit-Engine fuellen
+ // Edit-Engine fuellen
String aStr;
if (bTextValid)
@@ -1967,7 +1967,7 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand )
else
aStr = GetEditText(pEngine);
- if (aStr.Len() > 3 && // Matrix-Formel ?
+ if (aStr.Len() > 3 && // Matrix-Formel ?
aStr.GetChar(0) == '{' &&
aStr.GetChar(1) == '=' &&
aStr.GetChar(aStr.Len()-1) == '}')
@@ -1986,9 +1986,9 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand )
if ( ( aStr.GetChar(0) == '=' || aStr.GetChar(0) == '+' || aStr.GetChar(0) == '-' ) &&
!cTyped && !bCreatingFuncView )
- InitRangeFinder(aStr); // Formel wird editiert -> RangeFinder
+ InitRangeFinder(aStr); // Formel wird editiert -> RangeFinder
- bNewTable = TRUE; // -> PostEditView-Aufruf
+ bNewTable = TRUE; // -> PostEditView-Aufruf
}
else
{
@@ -1998,10 +1998,10 @@ BOOL ScInputHandler::StartTable( sal_Unicode cTyped, BOOL bFromCommand )
UpdateFormulaMode();
if ( pActiveViewSh && ( !bFromCommand || !bCommandErrorShown ) )
{
- // #97673# Prevent repeated error messages for the same cell from command events
- // (for keyboard events, multiple messages are wanted).
- // Set the flag before showing the error message because the command handler
- // for the next IME command may be called when showing the dialog.
+ // #97673# Prevent repeated error messages for the same cell from command events
+ // (for keyboard events, multiple messages are wanted).
+ // Set the flag before showing the error message because the command handler
+ // for the next IME command may be called when showing the dialog.
if ( bFromCommand )
bCommandErrorShown = TRUE;
@@ -2029,14 +2029,14 @@ void lcl_SetTopSelection( EditView* pEditView, ESelection& rSel )
xub_StrLen nParLen = pEngine->GetTextLen(rSel.nStartPara);
while (rSel.nStartPos > nParLen && rSel.nStartPara+1 < nCount)
{
- rSel.nStartPos -= nParLen + 1; // incl. Leerzeichen vom Umbruch
+ rSel.nStartPos -= nParLen + 1; // incl. Leerzeichen vom Umbruch
nParLen = pEngine->GetTextLen(++rSel.nStartPara);
}
nParLen = pEngine->GetTextLen(rSel.nEndPara);
while (rSel.nEndPos > nParLen && rSel.nEndPara+1 < nCount)
{
- rSel.nEndPos -= nParLen + 1; // incl. Leerzeichen vom Umbruch
+ rSel.nEndPos -= nParLen + 1; // incl. Leerzeichen vom Umbruch
nParLen = pEngine->GetTextLen(++rSel.nEndPara);
}
}
@@ -2072,8 +2072,8 @@ IMPL_LINK( ScInputHandler, ModifyHdl, void *, EMPTYARG )
if ( !bInOwnChange && ( eMode==SC_INPUT_TYPE || eMode==SC_INPUT_TABLE ) &&
pEngine && pEngine->GetUpdateMode() && pInputWin )
{
- // #102745# update input line from ModifyHdl for changes that are not
- // wrapped by DataChanging/DataChanged calls (like Drag&Drop)
+ // #102745# update input line from ModifyHdl for changes that are not
+ // wrapped by DataChanging/DataChanged calls (like Drag&Drop)
String aText = GetEditText(pEngine);
lcl_RemoveTabs(aText);
@@ -2082,9 +2082,9 @@ IMPL_LINK( ScInputHandler, ModifyHdl, void *, EMPTYARG )
return 0;
}
-BOOL ScInputHandler::DataChanging( sal_Unicode cTyped, BOOL bFromCommand ) // return TRUE = new view created
+BOOL ScInputHandler::DataChanging( sal_Unicode cTyped, BOOL bFromCommand ) // return TRUE = new view created
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset in DataChanged)
+ bInOwnChange = TRUE; // disable ModifyHdl (reset in DataChanged)
if ( eMode == SC_INPUT_NONE )
return StartTable( cTyped, bFromCommand );
@@ -2101,13 +2101,13 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
if ( eMode == SC_INPUT_TOP && pTopView && !bFromTopNotify )
{
- // table EditEngine is formatted below, input line needs formatting after paste
- // #i20282# not when called from the input line's modify handler
+ // 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( 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
- // shown again here.
+ // #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
+ // shown again here.
pTopView->ShowCursor();
}
@@ -2115,12 +2115,12 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
bSelIsRef = FALSE;
if ( pRangeFindList && !bInRangeUpdate )
- RemoveRangeFinder(); // Attribute und Markierung loeschen
+ RemoveRangeFinder(); // Attribute und Markierung loeschen
- UpdateParenthesis(); // Hervorhebung der Klammern neu
+ UpdateParenthesis(); // Hervorhebung der Klammern neu
// ER 31.08.00 New SetDefaults sets ParaAttribs, don't clear them away ...
-// RemoveAdjust(); // #40255# harte Ausrichtungs-Attribute loeschen
+// RemoveAdjust(); // #40255# harte Ausrichtungs-Attribute loeschen
if (eMode==SC_INPUT_TYPE || eMode==SC_INPUT_TABLE)
{
@@ -2131,12 +2131,12 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
pInputWin->SetTextString(aText);
}
- // wenn der Cursor vor dem Absatzende steht, werden Teile rechts rausgeschoben
- // (unabhaengig von eMode) -> View anpassen!
- // wenn der Cursor am Ende steht, reicht der Status-Handler an der ViewData
+ // wenn der Cursor vor dem Absatzende steht, werden Teile rechts rausgeschoben
+ // (unabhaengig von eMode) -> View anpassen!
+ // wenn der Cursor am Ende steht, reicht der Status-Handler an der ViewData
- // #93767# first make sure the status handler is called now if the cursor
- // is outside the visible area
+ // #93767# first make sure the status handler is called now if the cursor
+ // is outside the visible area
pEngine->QuickFormatDoc();
EditView* pActiveView = pTopView ? pTopView : pTableView;
@@ -2144,10 +2144,10 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
{
ScViewData* pViewData = pActiveViewSh->GetViewData();
- BOOL bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT ); // rechtsbuendig immer
+ BOOL bNeedGrow = ( nEditAdjust != SVX_ADJUST_LEFT ); // rechtsbuendig immer
if (!bNeedGrow)
{
- // Cursor vor dem Ende?
+ // Cursor vor dem Ende?
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
bNeedGrow = ( aSel.nEndPos != pEngine->GetTextLen(aSel.nEndPara) );
@@ -2165,7 +2165,7 @@ void ScInputHandler::DataChanged( BOOL bFromTopNotify )
}
UpdateFormulaMode();
- bTextValid = FALSE; // Aenderungen sind nur in der Edit-Engine
+ bTextValid = FALSE; // Aenderungen sind nur in der Edit-Engine
bInOwnChange = FALSE;
}
@@ -2195,7 +2195,7 @@ void ScInputHandler::UpdateFormulaMode()
UpdateAutoCorrFlag();
}
}
- else // ausschalten
+ else // ausschalten
{
if (bFormulaMode)
{
@@ -2231,12 +2231,12 @@ void ScInputHandler::ShowRefFrame()
if (bFound)
{
- // Hier wird sich darauf verlassen, dass Activate synchron funktioniert
- // (dabei wird pActiveViewSh umgesetzt)
+ // Hier wird sich darauf verlassen, dass Activate synchron funktioniert
+ // (dabei wird pActiveViewSh umgesetzt)
- pRefViewSh->SetActive(); // Appear und SetViewFrame
+ pRefViewSh->SetActive(); // Appear und SetViewFrame
- // pLastState wird im NotifyChange aus dem Activate richtig gesetzt
+ // pLastState wird im NotifyChange aus dem Activate richtig gesetzt
}
else
{
@@ -2285,7 +2285,7 @@ void ScInputHandler::InvalidateAttribs()
//
-// --------------- public Methoden --------------------------------------------
+// --------------- public Methoden --------------------------------------------
//
void ScInputHandler::SetMode( ScInputMode eNewMode )
@@ -2304,7 +2304,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
return;
}
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = TRUE; // disable ModifyHdl (reset below)
ScInputMode eOldMode = eMode;
eMode = eNewMode;
@@ -2313,9 +2313,9 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
if (eMode==SC_INPUT_TOP || eMode==SC_INPUT_TABLE)
{
- if (eOldMode == SC_INPUT_NONE) // not when switching between modes
+ if (eOldMode == SC_INPUT_NONE) // not when switching between modes
{
- if (StartTable(0, FALSE)) // 0 = look at existing document content for text or number
+ if (StartTable(0, FALSE)) // 0 = look at existing document content for text or number
{
if (pActiveViewSh)
pActiveViewSh->GetViewData()->GetDocShell()->PostEditView( pEngine, aCursorPos );
@@ -2330,7 +2330,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
{
if ( eMode == SC_INPUT_TABLE && eOldMode == SC_INPUT_TOP )
{
- // Selektion bleibt
+ // Selektion bleibt
}
else
{
@@ -2361,7 +2361,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
//----------------------------------------------------------------------------------------
-// lcl_IsNumber - TRUE, wenn nur Ziffern (dann keine Autokorrektur)
+// lcl_IsNumber - TRUE, wenn nur Ziffern (dann keine Autokorrektur)
BOOL lcl_IsNumber(const String& rString)
{
@@ -2390,22 +2390,22 @@ void lcl_SelectionToEnd( EditView* pView )
void ScInputHandler::EnterHandler( BYTE nBlockMode )
{
- // #62806# Bei Makro-Aufrufen fuer Gueltigkeit kann Tod und Teufel passieren,
- // darum dafuer sorgen, dass EnterHandler nicht verschachtelt gerufen wird:
+ // #62806# Bei Makro-Aufrufen fuer Gueltigkeit kann Tod und Teufel passieren,
+ // darum dafuer sorgen, dass EnterHandler nicht verschachtelt gerufen wird:
if (bInEnterHandler) return;
bInEnterHandler = TRUE;
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = TRUE; // disable ModifyHdl (reset below)
ImplCreateEditEngine();
BOOL bMatrix = ( nBlockMode == SC_ENTER_MATRIX );
- SfxApplication* pSfxApp = SFX_APP();
- EditTextObject* pObject = NULL;
- ScPatternAttr* pCellAttrs = NULL;
- BOOL bAttrib = FALSE; // Formatierung vorhanden ?
- BOOL bForget = FALSE; // wegen Gueltigkeit streichen ?
+ SfxApplication* pSfxApp = SFX_APP();
+ EditTextObject* pObject = NULL;
+ ScPatternAttr* pCellAttrs = NULL;
+ BOOL bAttrib = FALSE; // Formatierung vorhanden ?
+ BOOL bForget = FALSE; // wegen Gueltigkeit streichen ?
String aString = GetEditText(pEngine);
EditView* pActiveView = pTopView ? pTopView : pTableView;
@@ -2421,19 +2421,19 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
}
if (pTopView)
- pTopView->CompleteAutoCorrect(); // #59759# CompleteAutoCorrect fuer beide Views
+ pTopView->CompleteAutoCorrect(); // #59759# CompleteAutoCorrect fuer beide Views
if (pTableView)
pTableView->CompleteAutoCorrect();
aString = GetEditText(pEngine);
}
lcl_RemoveTabs(aString);
- // Test, ob zulaessig (immer mit einfachem String)
+ // Test, ob zulaessig (immer mit einfachem String)
if ( bModified && nValidation && pActiveViewSh )
{
ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocument();
- const ScValidationData* pData = pDoc->GetValidationEntry( nValidation );
+ const ScValidationData* pData = pDoc->GetValidationEntry( nValidation );
if (pData && pData->HasErrMsg())
{
// #i67990# don't use pLastPattern in EnterHandler
@@ -2442,15 +2442,15 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
if (!bOk)
{
- if ( pActiveViewSh ) // falls aus MouseButtonDown gekommen
- pActiveViewSh->StopMarking(); // (die InfoBox verschluckt das MouseButtonUp)
+ if ( pActiveViewSh ) // falls aus MouseButtonDown gekommen
+ pActiveViewSh->StopMarking(); // (die InfoBox verschluckt das MouseButtonUp)
- //! es gibt noch Probleme, wenn die Eingabe durch Aktivieren einer
- //! anderen View ausgeloest wurde
+ //! es gibt noch Probleme, wenn die Eingabe durch Aktivieren einer
+ //! anderen View ausgeloest wurde
Window* pParent = Application::GetDefDialogParent();
if ( pData->DoError( pParent, aString, aCursorPos ) )
- bForget = TRUE; // Eingabe nicht uebernehmen
+ bForget = TRUE; // Eingabe nicht uebernehmen
}
}
}
@@ -2475,8 +2475,8 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
BOOL bSpellErrors = !bFormulaMode && pEngine->HasOnlineSpellErrors();
if ( bSpellErrors )
{
- // #i3820# If the spell checker flags numerical input as error,
- // it still has to be treated as number, not EditEngine object.
+ // #i3820# If the spell checker flags numerical input as error,
+ // it still has to be treated as number, not EditEngine object.
if ( pActiveViewSh )
{
@@ -2489,17 +2489,17 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
double nVal;
if ( pFormatter->IsNumberFormat( aString, nFormat, nVal ) )
{
- bSpellErrors = FALSE; // ignore the spelling errors
+ bSpellErrors = FALSE; // ignore the spelling errors
}
}
}
- // After RemoveAdjust, the EditView must not be repainted (has wrong font size etc).
- // SetUpdateMode must come after CompleteOnlineSpelling.
- // The view is hidden in any case below (Broadcast).
+ // After RemoveAdjust, the EditView must not be repainted (has wrong font size etc).
+ // SetUpdateMode must come after CompleteOnlineSpelling.
+ // The view is hidden in any case below (Broadcast).
pEngine->SetUpdateMode( FALSE );
- if ( bModified && !bForget ) // was wird eingeben (Text/Objekt) ?
+ if ( bModified && !bForget ) // was wird eingeben (Text/Objekt) ?
{
USHORT nParCnt = pEngine->GetParagraphCount();
if ( nParCnt == 0 )
@@ -2508,7 +2508,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
SfxItemSet aOldAttribs = pEngine->GetAttribs( aSel );
const SfxPoolItem* pItem = NULL;
- // find common (cell) attributes before RemoveAdjust
+ // find common (cell) attributes before RemoveAdjust
if ( pActiveViewSh )
{
@@ -2536,11 +2536,11 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
}
}
- // clear ParaAttribs (including adjustment)
+ // clear ParaAttribs (including adjustment)
RemoveAdjust();
- // check if EditObject is needed
+ // check if EditObject is needed
if ( bSpellErrors || nParCnt > 1 )
bAttrib = TRUE;
@@ -2553,7 +2553,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
bAttrib = TRUE;
else if (eState == SFX_ITEM_SET)
{
- // keep same items in EditEngine as in ScEditAttrTester
+ // keep same items in EditEngine as in ScEditAttrTester
if ( nId == EE_CHAR_ESCAPEMENT || nId == EE_CHAR_PAIRKERNING ||
nId == EE_CHAR_KERNING || nId == EE_CHAR_XMLATTRIBS )
{
@@ -2563,20 +2563,20 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
}
}
- // Feldbefehle enthalten?
+ // Feldbefehle enthalten?
SfxItemState eFieldState = aOldAttribs.GetItemState( EE_FEATURE_FIELD, FALSE );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
bAttrib = TRUE;
- // not converted characters?
+ // not converted characters?
SfxItemState eConvState = aOldAttribs.GetItemState( EE_FEATURE_NOTCONV, FALSE );
if ( eConvState == SFX_ITEM_DONTCARE || eConvState == SFX_ITEM_SET )
bAttrib = TRUE;
- // Formeln immer als Formeln erkennen (#38309#)
- // (der Test vorher ist trotzdem noetig wegen Zell-Attributen)
+ // Formeln immer als Formeln erkennen (#38309#)
+ // (der Test vorher ist trotzdem noetig wegen Zell-Attributen)
}
if (bMatrix)
@@ -2590,12 +2590,12 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
pEngine->SetControlWord( (nCtrl & ~EE_CNTRL_ALLOWBIGOBJS) | nWantBig );
pObject = pEngine->CreateTextObject();
}
- else if (bAutoComplete) // Gross-/Kleinschreibung anpassen
+ else if (bAutoComplete) // Gross-/Kleinschreibung anpassen
{
if (pColumnData)
pColumnData->GetExactMatch( aString );
- //! effizienter in der Liste suchen (ScUserList, nur einmal ToUpper)
+ //! effizienter in der Liste suchen (ScUserList, nur einmal ToUpper)
USHORT nIndex;
ScUserListData* pData = ScGlobal::GetUserList()->GetData(aString);
@@ -2604,9 +2604,9 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
}
}
- // don't rely on ShowRefFrame switching the active view synchronously
- // execute the function directly on the correct view's bindings instead
- // pRefViewSh is reset in ShowRefFrame - get pointer before ShowRefFrame call
+ // don't rely on ShowRefFrame switching the active view synchronously
+ // execute the function directly on the correct view's bindings instead
+ // pRefViewSh is reset in ShowRefFrame - get pointer before ShowRefFrame call
ScTabViewShell* pExecuteSh = pRefViewSh ? pRefViewSh : pActiveViewSh;
if (bFormulaMode)
@@ -2626,7 +2626,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
pInputWin->SetFormulaMode(FALSE);
UpdateAutoCorrFlag();
}
- pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP
+ pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP
DeleteRangeFinder();
ResetAutoPar();
@@ -2634,7 +2634,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
bModified = FALSE;
bSelIsRef = FALSE;
- eMode = SC_INPUT_NONE;
+ eMode = SC_INPUT_NONE;
StopInputWinEngine( TRUE );
// #123344# Text input (through number formats) or ApplySelectionPattern modify
@@ -2643,7 +2643,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
if (bOldMod && !bProtected && !bForget)
{
- // keine typographische Anfuehrungszeichen in Formeln
+ // keine typographische Anfuehrungszeichen in Formeln
if ( aString.GetChar(0) == '=' )
{
@@ -2697,7 +2697,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
rBindings.Execute( nId, aArgs );
}
- delete pLastState; // pLastState enthaelt noch den alten Text
+ delete pLastState; // pLastState enthaelt noch den alten Text
pLastState = NULL;
}
else
@@ -2705,7 +2705,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
{
- // mit Eingabe zusammenfassen ?
+ // mit Eingabe zusammenfassen ?
pExecuteSh->ApplySelectionPattern( *pCellAttrs, TRUE, TRUE );
pExecuteSh->AdjustBlockHeight();
}
@@ -2725,15 +2725,15 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
void ScInputHandler::CancelHandler()
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = TRUE; // disable ModifyHdl (reset below)
ImplCreateEditEngine();
bModified = FALSE;
- // don't rely on ShowRefFrame switching the active view synchronously
- // execute the function directly on the correct view's bindings instead
- // pRefViewSh is reset in ShowRefFrame - get pointer before ShowRefFrame call
+ // don't rely on ShowRefFrame switching the active view synchronously
+ // execute the function directly on the correct view's bindings instead
+ // pRefViewSh is reset in ShowRefFrame - get pointer before ShowRefFrame call
ScTabViewShell* pExecuteSh = pRefViewSh ? pRefViewSh : pActiveViewSh;
if (bFormulaMode)
@@ -2751,7 +2751,7 @@ void ScInputHandler::CancelHandler()
pInputWin->SetFormulaMode(FALSE);
UpdateAutoCorrFlag();
}
- pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP
+ pRefViewSh = NULL; // auch ohne FormulaMode wegen Funktions-AP
DeleteRangeFinder();
ResetAutoPar();
@@ -2760,11 +2760,11 @@ void ScInputHandler::CancelHandler()
if (pExecuteSh)
pExecuteSh->StopEditShell();
- aCursorPos.Set(MAXCOL+1,0,0); // Flag, dass ungueltig
+ aCursorPos.Set(MAXCOL+1,0,0); // Flag, dass ungueltig
pEngine->SetText(String());
if ( !pLastState && pExecuteSh )
- pExecuteSh->UpdateInputHandler( TRUE ); // Status neu holen
+ pExecuteSh->UpdateInputHandler( TRUE ); // Status neu holen
else
NotifyChange( pLastState, TRUE );
@@ -2776,7 +2776,7 @@ void ScInputHandler::CancelHandler()
BOOL ScInputHandler::IsModalMode( SfxObjectShell* pDocSh )
{
- // Referenzen auf unbenanntes Dokument gehen nicht
+ // Referenzen auf unbenanntes Dokument gehen nicht
return bFormulaMode && pRefViewSh
&& pRefViewSh->GetViewData()->GetDocument()->GetDocumentShell() != pDocSh
@@ -2788,9 +2788,9 @@ void ScInputHandler::AddRefEntry()
const sal_Unicode cSep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0);
UpdateActiveView();
if (!pTableView && !pTopView)
- return; // z.B. FillMode
+ return; // z.B. FillMode
- DataChanging(); // kann nicht neu sein
+ DataChanging(); // kann nicht neu sein
RemoveSelection();
if (pTableView)
@@ -2810,26 +2810,26 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
if (bOtherDoc)
if (!pDoc->GetDocumentShell()->HasName())
{
- // Referenzen auf unbenanntes Dokument gehen nicht
- // (SetReference sollte dann auch nicht gerufen werden)
+ // Referenzen auf unbenanntes Dokument gehen nicht
+ // (SetReference sollte dann auch nicht gerufen werden)
return;
}
UpdateActiveView();
if (!pTableView && !pTopView)
- return; // z.B. FillMode
+ return; // z.B. FillMode
- // nie das "=" ueberschreiben!
+ // nie das "=" ueberschreiben!
EditView* pActiveView = pTopView ? pTopView : pTableView;
ESelection aSel = pActiveView->GetSelection();
aSel.Adjust();
if ( aSel.nStartPara == 0 && aSel.nStartPos == 0 )
return;
- DataChanging(); // kann nicht neu sein
+ DataChanging(); // kann nicht neu sein
- // Selektion umdrehen, falls rueckwaerts (noetig ???)
+ // Selektion umdrehen, falls rueckwaerts (noetig ???)
if (pTableView)
{
@@ -2850,18 +2850,18 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
}
}
- // String aus Referenz erzeugen
+ // String aus Referenz erzeugen
String aRefStr;
const ScAddress::Details aAddrDetails( pDoc, aCursorPos );
if (bOtherDoc)
{
- // Referenz auf anderes Dokument
+ // Referenz auf anderes Dokument
DBG_ASSERT(rRef.aStart.Tab()==rRef.aEnd.Tab(), "nStartTab!=nEndTab");
String aTmp;
- rRef.Format( aTmp, SCA_VALID|SCA_TAB_3D, pDoc, aAddrDetails ); // immer 3d
+ rRef.Format( aTmp, SCA_VALID|SCA_TAB_3D, pDoc, aAddrDetails ); // immer 3d
SfxObjectShell* pObjSh = pDoc->GetDocumentShell();
// #i75893# convert escaped URL of the document to something user friendly
@@ -2905,9 +2905,9 @@ void ScInputHandler::InsertFunction( const String& rFuncName, BOOL bAddPar )
UpdateActiveView();
if (!pTableView && !pTopView)
- return; // z.B. FillMode
+ return; // z.B. FillMode
- DataChanging(); // kann nicht neu sein
+ DataChanging(); // kann nicht neu sein
String aText = rFuncName;
if (bAddPar)
@@ -2952,9 +2952,9 @@ void ScInputHandler::ClearText()
UpdateActiveView();
if (!pTableView && !pTopView)
- return; // z.B. FillMode
+ return; // z.B. FillMode
- DataChanging(); // darf nicht neu sein
+ DataChanging(); // darf nicht neu sein
String aEmpty;
if (pTableView)
@@ -2983,11 +2983,11 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
USHORT nModi = aCode.GetModifier();
BOOL bShift = aCode.IsShift();
BOOL bControl = aCode.IsMod1();
- BOOL bAlt = aCode.IsMod2();
+ BOOL bAlt = aCode.IsMod2();
USHORT nCode = aCode.GetCode();
sal_Unicode nChar = rKEvt.GetCharCode();
- // Alt-Return is accepted, everything else with ALT, or CTRL-TAB are not:
+ // Alt-Return is accepted, everything else with ALT, or CTRL-TAB are not:
if (( bAlt && !bControl && nCode != KEY_RETURN ) ||
( bControl && aCode.GetCode() == KEY_TAB ))
return FALSE;
@@ -3033,13 +3033,13 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
{
if ( pFormulaData && nTipVisible && nAutoPos != SCPOS_INVALID )
{
- // blaettern
+ // blaettern
NextFormulaEntry( bShift );
}
else if ( pColumnData && bUseTab && nAutoPos != SCPOS_INVALID )
{
- // in den Eintraegen der AutoEingabe blaettern
+ // in den Eintraegen der AutoEingabe blaettern
NextAutoEntry( bShift );
}
@@ -3047,8 +3047,8 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
{
EnterHandler();
- // TabKeyInput gibt auf manchen Rechnern unter W95 Stackueberlaeufe,
- // darum direkter Aufruf:
+ // TabKeyInput gibt auf manchen Rechnern unter W95 Stackueberlaeufe,
+ // darum direkter Aufruf:
if (pActiveViewSh)
pActiveViewSh->FindNextUnprot( bShift );
}
@@ -3083,11 +3083,11 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
break;
}
- // Cursortasten nur ausfuehren, wenn schon im Edit-Modus
- // z.B. wegen Shift-Ctrl-PageDn (ist nicht als Accelerator definiert)
+ // Cursortasten nur ausfuehren, wenn schon im Edit-Modus
+ // z.B. wegen Shift-Ctrl-PageDn (ist nicht als Accelerator definiert)
BOOL bCursorKey = EditEngine::DoesKeyMoveCursor(rKEvt);
- BOOL bInsKey = ( nCode == KEY_INSERT && !nModi ); // Insert wie Cursortasten behandeln
+ BOOL bInsKey = ( nCode == KEY_INSERT && !nModi ); // Insert wie Cursortasten behandeln
if ( !bUsed && !bSkip && ( bDoEnter || EditEngine::DoesKeyChangeText(rKEvt) ||
( eMode != SC_INPUT_NONE && ( bCursorKey || bInsKey ) ) ) )
{
@@ -3103,11 +3103,11 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
UpdateActiveView();
BOOL bNewView = DataChanging( nChar );
- if (bProtected) // Zelle geschuetzt?
- bUsed = TRUE; // Key-Event nicht weiterleiten
- else // Aenderungen erlaubt
+ if (bProtected) // Zelle geschuetzt?
+ bUsed = TRUE; // Key-Event nicht weiterleiten
+ else // Aenderungen erlaubt
{
- if (bNewView ) // neu anlegen
+ if (bNewView ) // neu anlegen
{
if (pActiveViewSh)
pActiveViewSh->GetViewData()->GetDocShell()->PostEditView( pEngine, aCursorPos );
@@ -3124,7 +3124,7 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
{
pTableView->GetEditEngine()->SetText( aStrLoP );
if ( aStrLoP.Len() )
- pTableView->SetSelection( ESelection(0,0, 0,0) ); // before the '%'
+ pTableView->SetSelection( ESelection(0,0, 0,0) ); // before the '%'
// don't call SetSelection if the string is empty anyway,
// to avoid breaking the bInitial handling in ScViewData::EditGrowY
@@ -3133,7 +3133,7 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
{
pTopView->GetEditEngine()->SetText( aStrLoP );
if ( aStrLoP.Len() )
- pTopView->SetSelection( ESelection(0,0, 0,0) ); // before the '%'
+ pTopView->SetSelection( ESelection(0,0, 0,0) ); // before the '%'
}
}
SyncViews();
@@ -3141,7 +3141,7 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
if (pTableView || pTopView)
{
-// pActiveView->SetEditEngineUpdateMode(TRUE); //! gibt Muell !!!!
+// pActiveView->SetEditEngineUpdateMode(TRUE); //! gibt Muell !!!!
if (bDoEnter)
{
@@ -3167,16 +3167,16 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
bUsed = TRUE;
}
- // Auto-Eingabe:
+ // Auto-Eingabe:
if ( bUsed && bAutoComplete )
{
bUseTab = FALSE;
- nAutoPos = SCPOS_INVALID; // do not search further
+ nAutoPos = SCPOS_INVALID; // do not search further
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
- if ( nChar && nChar != 8 && nChar != 127 && // no 'backspace', no 'delete'
- KEYFUNC_CUT != eFunc) // and no 'CTRL-X'
+ if ( nChar && nChar != 8 && nChar != 127 && // no 'backspace', no 'delete'
+ KEYFUNC_CUT != eFunc) // and no 'CTRL-X'
{
if (bFormulaMode)
UseFormulaData();
@@ -3185,8 +3185,8 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
}
}
- // when the selection is changed manually or an opening parenthesis
- // is typed, stop overwriting parentheses
+ // when the selection is changed manually or an opening parenthesis
+ // is typed, stop overwriting parentheses
if ( bUsed && nChar == '(' )
ResetAutoPar();
@@ -3202,8 +3202,8 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
}
}
- DataChanged(); // ruft auch UpdateParenthesis()
- InvalidateAttribs(); //! in DataChanged ?
+ DataChanged(); // ruft auch UpdateParenthesis()
+ InvalidateAttribs(); //! in DataChanged ?
}
}
@@ -3219,8 +3219,8 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
if ( rCEvt.GetCommand() == COMMAND_CURSORPOS )
{
- // #90346# for COMMAND_CURSORPOS, do as little as possible, because
- // with remote VCL, even a ShowCursor will generate another event.
+ // #90346# for COMMAND_CURSORPOS, do as little as possible, because
+ // with remote VCL, even a ShowCursor will generate another event.
if ( eMode != SC_INPUT_NONE )
{
UpdateActiveView();
@@ -3228,7 +3228,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
{
if (pTableView)
pTableView->Command( rCEvt );
- else if (pTopView) // call only once
+ else if (pTopView) // call only once
pTopView->Command( rCEvt );
bUsed = TRUE;
}
@@ -3256,11 +3256,11 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
UpdateActiveView();
BOOL bNewView = DataChanging( 0, TRUE );
- if (bProtected) // cell protected
- bUsed = TRUE; // event is used
- else // changes allowed
+ if (bProtected) // cell protected
+ bUsed = TRUE; // event is used
+ else // changes allowed
{
- if (bNewView) // create new edit view
+ if (bNewView) // create new edit view
{
if (pActiveViewSh)
pActiveViewSh->GetViewData()->GetDocShell()->PostEditView( pEngine, aCursorPos );
@@ -3294,7 +3294,7 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT )
{
- // AutoInput after ext text input
+ // AutoInput after ext text input
nAutoPos = SCPOS_INVALID;
if (bFormulaMode)
@@ -3304,8 +3304,8 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
}
}
- DataChanged(); // calls UpdateParenthesis()
- InvalidateAttribs(); //! in DataChanged ?
+ DataChanged(); // calls UpdateParenthesis()
+ InvalidateAttribs(); //! in DataChanged ?
}
}
@@ -3320,8 +3320,8 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
BOOL bForce, ScTabViewShell* pSourceSh,
BOOL bStopEditing)
{
- // #62806# Wenn der Aufruf aus einem Makro-Aufruf im EnterHandler kommt,
- // gleich abbrechen und nicht den Status durcheinander bringen
+ // #62806# Wenn der Aufruf aus einem Makro-Aufruf im EnterHandler kommt,
+ // gleich abbrechen und nicht den Status durcheinander bringen
if (bInEnterHandler)
return;
@@ -3331,9 +3331,9 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
if (bRepeat && !bForce)
return;
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = TRUE; // disable ModifyHdl (reset below)
- if ( pState && !pLastState ) // wieder enablen
+ if ( pState && !pLastState ) // wieder enablen
bForce = TRUE;
BOOL bHadObject = pLastState && pLastState->GetEditData();
@@ -3360,8 +3360,8 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
{
BOOL bIgnore = FALSE;
- // hier auch fremde Referenzeingabe beruecksichtigen (z.B. Funktions-AP),
- // FormEditData falls gerade von der Hilfe auf Calc umgeschaltet wird:
+ // hier auch fremde Referenzeingabe beruecksichtigen (z.B. Funktions-AP),
+ // FormEditData falls gerade von der Hilfe auf Calc umgeschaltet wird:
if ( !bFormulaMode && !pScMod->IsFormulaMode() && !pScMod->GetFormEditData() )
{
@@ -3378,15 +3378,15 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
if ( !bIgnore /* || bRepeat */ )
{
- const ScAddress& rSPos = pState->GetStartPos();
- const ScAddress& rEPos = pState->GetEndPos();
- const EditTextObject* pData = pState->GetEditData();
- String aString = pState->GetString();
- BOOL bTxtMod = FALSE;
+ const ScAddress& rSPos = pState->GetStartPos();
+ const ScAddress& rEPos = pState->GetEndPos();
+ const EditTextObject* pData = pState->GetEditData();
+ String aString = pState->GetString();
+ BOOL bTxtMod = FALSE;
ScDocShell* pDocSh = pActiveViewSh->GetViewData()->GetDocShell();
ScDocument* pDoc = pDocSh->GetDocument();
- aCursorPos = pState->GetPos();
+ aCursorPos = pState->GetPos();
if ( pData /* || bRepeat */ )
bTxtMod = TRUE;
@@ -3410,26 +3410,26 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
else
{
aCurrentText = aString;
- bTextValid = TRUE; //! erst nur als String merken
+ bTextValid = TRUE; //! erst nur als String merken
}
if ( pInputWin )
pInputWin->SetTextString(aString);
}
- if ( pInputWin ) // Bereichsanzeige
+ if ( pInputWin ) // Bereichsanzeige
{
String aPosStr;
const ScAddress::Details aAddrDetails( pDoc, aCursorPos );
- // Ist der Bereich ein Name?
- //! per Timer suchen ???
+ // Ist der Bereich ein Name?
+ //! per Timer suchen ???
if ( pActiveViewSh )
pActiveViewSh->GetViewData()->GetDocument()->
GetRangeAtBlock( ScRange( rSPos, rEPos ), &aPosStr );
- if ( !aPosStr.Len() ) // kein Name -> formatieren
+ if ( !aPosStr.Len() ) // kein Name -> formatieren
{
USHORT nFlags = 0;
if( aAddrDetails.eConv == formula::FormulaGrammar::CONV_XL_R1C1 )
@@ -3451,9 +3451,9 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
if (bStopEditing)
SFX_APP()->Broadcast( SfxSimpleHint( FID_KILLEDITVIEW ) );
- // As long as the content is not edited, turn off online spelling.
- // Online spelling is turned back on in StartTable, after setting
- // the right language from cell attributes.
+ // As long as the content is not edited, turn off online spelling.
+ // Online spelling is turned back on in StartTable, after setting
+ // the right language from cell attributes.
ULONG nCntrl = pEngine->GetControlWord();
if ( nCntrl & EE_CNTRL_ONLINESPELLING )
@@ -3467,12 +3467,12 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
}
}
-// bProtected = FALSE;
+// bProtected = FALSE;
if ( pInputWin)
{
- if(!pScMod->IsFormulaMode()&& !pScMod->IsRefDialogOpen()) //BugID 54702
- { //Wenn RefDialog offen, dann nicht enablen
+ if(!pScMod->IsFormulaMode()&& !pScMod->IsRefDialogOpen()) //BugID 54702
+ { //Wenn RefDialog offen, dann nicht enablen
if ( !pInputWin->IsEnabled())
{
pInputWin->Enable();
@@ -3483,9 +3483,9 @@ void ScInputHandler::NotifyChange( const ScInputHdlState* pState,
}
}
else if(pScMod->IsRefDialogOpen())
- { // Da jedes Dokument eigenes InputWin hat, sollte
- if ( !pDelayTimer ) // nochmals Timer gestartet werden, da sonst Ein-
- { // gabezeile evt. noch aktiv ist.
+ { // Da jedes Dokument eigenes InputWin hat, sollte
+ if ( !pDelayTimer ) // nochmals Timer gestartet werden, da sonst Ein-
+ { // gabezeile evt. noch aktiv ist.
pDelayTimer = new Timer;
pDelayTimer->SetTimeout( 500 ); // 100ms Verzoegerung
pDelayTimer->SetTimeoutHdl( LINK( this, ScInputHandler, DelayTimer ) );
@@ -3537,7 +3537,7 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer )
if ( NULL == pLastState || SC_MOD()->IsFormulaMode() || SC_MOD()->IsRefDialogOpen())
{
- //! new method at ScModule to query if function autopilot is open
+ //! new method at ScModule to query if function autopilot is open
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if ( pViewFrm && pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) )
@@ -3548,9 +3548,9 @@ IMPL_LINK( ScInputHandler, DelayTimer, Timer*, pTimer )
pInputWin->Disable();
}
}
- else if ( !bFormulaMode ) // #39210# Formel auch z.B. bei Hilfe behalten
+ else if ( !bFormulaMode ) // #39210# Formel auch z.B. bei Hilfe behalten
{
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = TRUE; // disable ModifyHdl (reset below)
pActiveViewSh = NULL;
pEngine->SetText( EMPTY_STRING );
@@ -3572,9 +3572,9 @@ void ScInputHandler::InputSelection( EditView* pView )
{
SyncViews( pView );
ShowTipCursor();
- UpdateParenthesis(); // Selektion geaendert -> Klammer-Hervorhebung neu
+ UpdateParenthesis(); // Selektion geaendert -> Klammer-Hervorhebung neu
- // when the selection is changed manually, stop overwriting parentheses
+ // when the selection is changed manually, stop overwriting parentheses
ResetAutoPar();
}
@@ -3587,11 +3587,11 @@ void ScInputHandler::InputChanged( EditView* pView, BOOL bFromNotify )
// #i20282# DataChanged needs to know if this is from the input line's modify handler
BOOL bFromTopNotify = ( bFromNotify && pView == pTopView );
- BOOL bNewView = DataChanging(); //! kann das hier ueberhaupt sein?
- aCurrentText = pView->GetEditEngine()->GetText(); // auch den String merken
+ BOOL bNewView = DataChanging(); //! kann das hier ueberhaupt sein?
+ aCurrentText = pView->GetEditEngine()->GetText(); // auch den String merken
pEngine->SetText( aCurrentText );
DataChanged( bFromTopNotify );
- bTextValid = TRUE; // wird in DataChanged auf FALSE gesetzt
+ bTextValid = TRUE; // wird in DataChanged auf FALSE gesetzt
if ( pActiveViewSh )
{
@@ -3610,7 +3610,7 @@ const String& ScInputHandler::GetEditString()
{
if (pEngine)
{
- aCurrentText = pEngine->GetText(); // immer neu aus Engine
+ aCurrentText = pEngine->GetText(); // immer neu aus Engine
bTextValid = TRUE;
}
@@ -3631,31 +3631,31 @@ BOOL ScInputHandler::GetTextAndFields( ScEditEngineDefaulter& rDestEngine )
BOOL bRet = FALSE;
if (pEngine)
{
- // Feldbefehle enthalten?
+ // Feldbefehle enthalten?
USHORT nParCnt = pEngine->GetParagraphCount();
SfxItemSet aSet = pEngine->GetAttribs( ESelection(0,0,nParCnt,0) );
SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, FALSE );
if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET )
{
- // Inhalt kopieren
+ // Inhalt kopieren
EditTextObject* pObj = pEngine->CreateTextObject();
rDestEngine.SetText(*pObj);
delete pObj;
- // Attribute loeschen
+ // Attribute loeschen
for (USHORT i=0; i<nParCnt; i++)
rDestEngine.QuickRemoveCharAttribs( i );
- // Absaetze zusammenfassen
+ // Absaetze zusammenfassen
while ( nParCnt > 1 )
{
xub_StrLen nLen = rDestEngine.GetTextLen( (USHORT)0 );
ESelection aSel( 0,nLen, 1,0 );
- rDestEngine.QuickInsertText( ' ', aSel ); // Umbruch durch Space ersetzen
+ rDestEngine.QuickInsertText( ' ', aSel ); // Umbruch durch Space ersetzen
--nParCnt;
}
@@ -3681,7 +3681,7 @@ void ScInputHandler::InputGetSelection( xub_StrLen& rStart, xub_StrLen& rEnd )
EditView* ScInputHandler::GetFuncEditView()
{
- UpdateActiveView(); // wegen pTableView
+ UpdateActiveView(); // wegen pTableView
EditView* pView = NULL;
if ( pInputWin )
@@ -3693,7 +3693,7 @@ EditView* ScInputHandler::GetFuncEditView()
{
if ( eMode != SC_INPUT_TABLE )
{
- bCreatingFuncView = TRUE; // RangeFinder nicht anzeigen
+ bCreatingFuncView = TRUE; // RangeFinder nicht anzeigen
SetMode( SC_INPUT_TABLE );
bCreatingFuncView = FALSE;
if ( pTableView )
@@ -3748,7 +3748,7 @@ void ScInputHandler::InputReplaceSelection( const String& rStr )
if (pView)
{
pView->SetEditEngineUpdateMode( FALSE );
-// pView->InsertText( rStr, TRUE );
+// pView->InsertText( rStr, TRUE );
pView->GetEditEngine()->SetText( aFormText );
pView->SetSelection( ESelection(0,nFormSelStart, 0,nFormSelEnd) );
pView->SetEditEngineUpdateMode( TRUE );
@@ -3760,11 +3760,11 @@ void ScInputHandler::InputReplaceSelection( const String& rStr )
String ScInputHandler::InputGetFormulaStr()
{
- return aFormText; //! eigene Membervariable?
+ return aFormText; //! eigene Membervariable?
}
//========================================================================
-// ScInputHdlState
+// ScInputHdlState
//========================================================================
ScInputHdlState::ScInputHdlState( const ScAddress& rCurPos,
@@ -3772,18 +3772,18 @@ ScInputHdlState::ScInputHdlState( const ScAddress& rCurPos,
const ScAddress& rEndPos,
const String& rString,
const EditTextObject* pData )
- : aCursorPos ( rCurPos ),
- aStartPos ( rStartPos ),
- aEndPos ( rEndPos ),
- aString ( rString ),
- pEditData ( pData ? pData->Clone() : NULL )
+ : aCursorPos ( rCurPos ),
+ aStartPos ( rStartPos ),
+ aEndPos ( rEndPos ),
+ aString ( rString ),
+ pEditData ( pData ? pData->Clone() : NULL )
{
}
//------------------------------------------------------------------------
ScInputHdlState::ScInputHdlState( const ScInputHdlState& rCpy )
- : pEditData ( NULL )
+ : pEditData ( NULL )
{
*this = rCpy;
}
@@ -3799,10 +3799,10 @@ ScInputHdlState::~ScInputHdlState()
int ScInputHdlState::operator==( const ScInputHdlState& r ) const
{
- return ( (aStartPos == r.aStartPos)
- && (aEndPos == r.aEndPos)
- && (aCursorPos == r.aCursorPos)
- && (aString == r.aString)
+ return ( (aStartPos == r.aStartPos)
+ && (aEndPos == r.aEndPos)
+ && (aCursorPos == r.aCursorPos)
+ && (aString == r.aString)
&& ScGlobal::EETextObjEqual( pEditData, r.pEditData ) );
}
@@ -3812,11 +3812,11 @@ ScInputHdlState& ScInputHdlState::operator=( const ScInputHdlState& r )
{
delete pEditData;
- aCursorPos = r.aCursorPos;
- aStartPos = r.aStartPos;
- aEndPos = r.aEndPos;
- aString = r.aString;
- pEditData = r.pEditData ? r.pEditData->Clone() : NULL;
+ aCursorPos = r.aCursorPos;
+ aStartPos = r.aStartPos;
+ aEndPos = r.aEndPos;
+ aString = r.aString;
+ pEditData = r.pEditData ? r.pEditData->Clone() : NULL;
return *this;
}