summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/inputhdl.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:04:32 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:04:32 +0200
commitc9ac7489ec5fd4652f0cff09722561ba5a27bcda (patch)
treee9fb41b01f699d5a4202e719d5dc7e087fa701c1 /sc/source/ui/app/inputhdl.cxx
parent69bb367315288b644439dc46d34743a2575a3527 (diff)
recreated tag libreoffice-3.3.0.4 which had these commits:
commit 5e369f0d3b306be13606c1558ecf7d0aac0048f4 (tag: refs/tags/libreoffice-3.3.0.4) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 18 19:01:15 2011 +0100 Version 3.3.0.4, tag libreoffice-3.3.0.4 (3.3-rc4) commit 2df81fdef39f29be15dc0a6e12031916de963f08 Author: Kohei Yoshida <kyoshida@novell.com> Date: Thu Jan 13 11:18:07 2011 -0500 Reverting the merge commit 0fe55349b05fae496a86a3fa958d184f0453916c. I created a patch between before and after the merge commit, and reverse-applied it. This is because if you revert a merge commit in git you are denying all future merges from that branch. I wasn't sure if we really wanted that. Signed-off-by: Petr Mladek <pmladek@suse.cz> sc/inc/document.hxx | 22 +------ sc/inc/drwlayer.hxx | 2 +- sc/inc/table.hxx | 16 +----- sc/source/core/data/document.cxx | 7 +-- sc/source/core/data/drwlayer.cxx | 6 +- sc/source/core/data/table1.cxx | 38 ++++-------- sc/source/core/data/table2.cxx | 91 ++++++------------------------ sc/source/core/data/table3.cxx | 71 +---------------------- sc/source/filter/xml/xmlrowi.cxx | 17 +---- sc/source/ui/docshell/externalrefmgr.cxx | 7 +- sc/source/ui/view/dbfunc.cxx | 5 +- sc/source/ui/view/tabvwshe.cxx | 4 +- 12 files changed, 52 insertions(+), 234 deletions(-) commit 9ce94f52e8c404a5e19154d38c18a44281d961f0 Author: Kohei Yoshida <kyoshida@novell.com> Date: Thu Jan 13 11:04:14 2011 -0500 Revert "This is also part of the merge." This reverts commit 0fe55349b05fae496a86a3fa958d184f0453916c. Signed-off-by: Petr Mladek <pmladek@suse.cz> sc/source/core/data/table3.cxx | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 1e03f54cc4f8939867869a3570f56d0645b515f5 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:59:36 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
Notes: split repo tag: calc_libreoffice-3.3.0.4
Diffstat (limited to 'sc/source/ui/app/inputhdl.cxx')
-rw-r--r--sc/source/ui/app/inputhdl.cxx644
1 files changed, 322 insertions, 322 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 697f573cf630..d50a5818f193 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -84,31 +84,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
//==================================================================
@@ -129,16 +129,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();
@@ -148,19 +148,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] ) )
@@ -185,7 +185,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 )
@@ -217,7 +217,7 @@ handle_r1c1:
}
}
- // letzten Trenner nicht ueberlesen, koennte ja ein Quote sein (?)
+ // letzten Trenner nicht ueberlesen, koennte ja ein Quote sein (?)
}
if (nCount)
@@ -240,13 +240,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
}
}
@@ -260,7 +260,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 );
@@ -302,7 +302,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);
}
}
@@ -406,7 +406,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 )
{
@@ -465,20 +465,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);
@@ -524,8 +524,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() );
@@ -544,7 +544,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() );
@@ -558,7 +558,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 )
@@ -577,14 +577,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 )
{
@@ -611,8 +611,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() );
@@ -628,11 +628,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()
{
@@ -650,8 +650,8 @@ 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();
@@ -760,7 +760,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());
@@ -914,7 +914,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;
@@ -965,21 +965,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 )
{
@@ -991,7 +991,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 );
@@ -1137,10 +1137,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();
@@ -1162,9 +1162,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);
@@ -1172,13 +1172,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;
@@ -1200,7 +1200,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();
@@ -1219,13 +1219,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;
@@ -1242,7 +1242,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;
@@ -1265,7 +1265,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
{
@@ -1277,14 +1277,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);
@@ -1309,27 +1309,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 )
@@ -1341,11 +1341,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();
@@ -1354,8 +1354,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 )
@@ -1382,14 +1382,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 )
{
@@ -1404,8 +1404,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)
@@ -1414,8 +1414,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 );
@@ -1428,7 +1428,7 @@ void ScInputHandler::SkipClosingPar()
}
//
-// Auto-Eingabe
+// Auto-Eingabe
//
void ScInputHandler::GetColData()
@@ -1442,7 +1442,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(),
@@ -1450,12 +1450,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();
@@ -1470,27 +1470,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 );
@@ -1502,12 +1502,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;
@@ -1529,7 +1529,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();
@@ -1544,12 +1544,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();
@@ -1580,31 +1580,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);
@@ -1616,11 +1616,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 );
@@ -1631,7 +1631,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;
@@ -1639,12 +1639,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 )
{
@@ -1656,7 +1656,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 )
{
@@ -1668,7 +1668,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;
@@ -1689,7 +1689,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()
@@ -1731,7 +1731,7 @@ void ScInputHandler::StopInputWinEngine( BOOL bAll )
if (pInputWin)
pInputWin->StopEditEngine( bAll );
- pTopView = NULL; // invalid now
+ pTopView = NULL; // invalid now
}
EditView* ScInputHandler::GetActiveView()
@@ -1744,7 +1744,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 );
}
@@ -1757,8 +1757,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();
@@ -1776,7 +1776,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;
}
@@ -1786,7 +1786,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;
}
@@ -1800,14 +1800,14 @@ 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 );
- // #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 )
@@ -1817,10 +1817,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);
@@ -1828,7 +1828,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, bool bInputActivated )
@@ -2016,14 +2016,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);
}
}
@@ -2059,8 +2059,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);
@@ -2069,10 +2069,10 @@ 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
{
pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
- bInOwnChange = TRUE; // disable ModifyHdl (reset in DataChanged)
+ bInOwnChange = TRUE; // disable ModifyHdl (reset in DataChanged)
if ( eMode == SC_INPUT_NONE )
return StartTable( cTyped, bFromCommand, false );
@@ -2089,13 +2089,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();
}
@@ -2103,12 +2103,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)
{
@@ -2119,12 +2119,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;
@@ -2132,10 +2132,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) );
@@ -2153,7 +2153,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;
}
@@ -2183,7 +2183,7 @@ void ScInputHandler::UpdateFormulaMode()
UpdateAutoCorrFlag();
}
}
- else // ausschalten
+ else // ausschalten
{
if (bFormulaMode)
{
@@ -2219,12 +2219,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
{
@@ -2272,7 +2272,7 @@ void ScInputHandler::InvalidateAttribs()
}
//
-// --------------- public Methoden --------------------------------------------
+// --------------- public Methoden --------------------------------------------
//
void ScInputHandler::SetMode( ScInputMode eNewMode )
@@ -2295,7 +2295,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
// Disable paste mode when edit mode starts.
pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE );
- bInOwnChange = TRUE; // disable ModifyHdl (reset below)
+ bInOwnChange = TRUE; // disable ModifyHdl (reset below)
ScInputMode eOldMode = eMode;
eMode = eNewMode;
@@ -2304,7 +2304,7 @@ 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, eMode == SC_INPUT_TABLE))
{
@@ -2321,7 +2321,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
{
if ( eMode == SC_INPUT_TABLE && eOldMode == SC_INPUT_TOP )
{
- // Selektion bleibt
+ // Selektion bleibt
}
else
{
@@ -2352,7 +2352,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)
{
@@ -2381,22 +2381,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;
@@ -2414,19 +2414,19 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
Window* pFrameWin = pActiveViewSh ? pActiveViewSh->GetFrameWin() : NULL;
if (pTopView)
- pTopView->CompleteAutoCorrect(); // #59759# CompleteAutoCorrect fuer beide Views
+ pTopView->CompleteAutoCorrect(); // #59759# CompleteAutoCorrect fuer beide Views
if (pTableView)
pTableView->CompleteAutoCorrect(pFrameWin);
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
@@ -2435,15 +2435,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
}
}
}
@@ -2468,8 +2468,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 )
{
@@ -2482,17 +2482,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 )
@@ -2515,7 +2515,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 && bUniformAttribs )
{
@@ -2543,11 +2543,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;
@@ -2560,7 +2560,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 )
{
@@ -2570,20 +2570,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)
@@ -2597,7 +2597,7 @@ 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
{
// Perform case-matching only when the typed text is partial.
if (pColumnData && aAutoSearch.Len() < aString.Len())
@@ -2605,9 +2605,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)
@@ -2627,7 +2627,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();
@@ -2635,7 +2635,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
@@ -2644,7 +2644,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
if (bOldMod && !bProtected && !bForget)
{
- // keine typographische Anfuehrungszeichen in Formeln
+ // keine typographische Anfuehrungszeichen in Formeln
if ( aString.GetChar(0) == '=' )
{
@@ -2698,7 +2698,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
@@ -2706,7 +2706,7 @@ void ScInputHandler::EnterHandler( BYTE nBlockMode )
if ( bOldMod && pExecuteSh && pCellAttrs && !bForget )
{
- // mit Eingabe zusammenfassen ?
+ // mit Eingabe zusammenfassen ?
pExecuteSh->ApplySelectionPattern( *pCellAttrs, TRUE, TRUE );
pExecuteSh->AdjustBlockHeight();
}
@@ -2726,15 +2726,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)
@@ -2752,7 +2752,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();
@@ -2761,11 +2761,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 );
@@ -2777,7 +2777,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
@@ -2789,9 +2789,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)
@@ -2811,26 +2811,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)
{
@@ -2851,18 +2851,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
@@ -2906,9 +2906,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)
@@ -2953,9 +2953,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)
@@ -2984,7 +2984,7 @@ 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();
@@ -3043,14 +3043,14 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
{
if ( pFormulaData && nTipVisible && nAutoPos != SCPOS_INVALID )
{
- // blaettern
+ // blaettern
NextFormulaEntry( bShift );
bUsed = true;
}
else if ( pColumnData && bUseTab && nAutoPos != SCPOS_INVALID )
{
- // in den Eintraegen der AutoEingabe blaettern
+ // in den Eintraegen der AutoEingabe blaettern
NextAutoEntry( bShift );
bUsed = true;
@@ -3085,11 +3085,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 ) ) ) )
{
@@ -3105,11 +3105,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 );
@@ -3126,7 +3126,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
@@ -3135,7 +3135,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();
@@ -3143,7 +3143,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)
{
@@ -3172,16 +3172,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();
@@ -3190,8 +3190,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();
@@ -3207,8 +3207,8 @@ BOOL ScInputHandler::KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit /* = FALSE
}
}
- DataChanged(); // ruft auch UpdateParenthesis()
- InvalidateAttribs(); //! in DataChanged ?
+ DataChanged(); // ruft auch UpdateParenthesis()
+ InvalidateAttribs(); //! in DataChanged ?
}
}
@@ -3224,8 +3224,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();
@@ -3233,7 +3233,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;
}
@@ -3261,11 +3261,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 );
@@ -3299,7 +3299,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)
@@ -3309,8 +3309,8 @@ BOOL ScInputHandler::InputCommand( const CommandEvent& rCEvt, BOOL bForce )
}
}
- DataChanged(); // calls UpdateParenthesis()
- InvalidateAttribs(); //! in DataChanged ?
+ DataChanged(); // calls UpdateParenthesis()
+ InvalidateAttribs(); //! in DataChanged ?
}
}
@@ -3325,8 +3325,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;
@@ -3336,9 +3336,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();
@@ -3365,8 +3365,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() )
{
@@ -3383,15 +3383,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;
@@ -3415,26 +3415,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 )
@@ -3456,9 +3456,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 )
@@ -3472,12 +3472,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();
@@ -3488,9 +3488,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 ) );
@@ -3542,7 +3542,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 ) )
@@ -3553,9 +3553,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 );
@@ -3577,9 +3577,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();
}
@@ -3592,11 +3592,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 )
{
@@ -3615,7 +3615,7 @@ const String& ScInputHandler::GetEditString()
{
if (pEngine)
{
- aCurrentText = pEngine->GetText(); // immer neu aus Engine
+ aCurrentText = pEngine->GetText(); // immer neu aus Engine
bTextValid = TRUE;
}
@@ -3636,31 +3636,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;
}
@@ -3685,7 +3685,7 @@ void ScInputHandler::InputGetSelection( xub_StrLen& rStart, xub_StrLen& rEnd )
EditView* ScInputHandler::GetFuncEditView()
{
- UpdateActiveView(); // wegen pTableView
+ UpdateActiveView(); // wegen pTableView
EditView* pView = NULL;
if ( pInputWin )
@@ -3697,7 +3697,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 )
@@ -3752,7 +3752,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 );
@@ -3764,11 +3764,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,
@@ -3776,18 +3776,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;
}
@@ -3803,10 +3803,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 ) );
}
@@ -3816,11 +3816,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;
}