diff options
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r-- | sc/source/ui/app/client.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/app/drwtrans.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 644 | ||||
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 314 | ||||
-rw-r--r-- | sc/source/ui/app/lnktrans.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/app/msgpool.cxx | 68 | ||||
-rw-r--r-- | sc/source/ui/app/rfindlst.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/app/scdll.cxx | 210 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 346 | ||||
-rw-r--r-- | sc/source/ui/app/scmod2.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/app/seltrans.cxx | 58 | ||||
-rw-r--r-- | sc/source/ui/app/template.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/transobj.cxx | 124 | ||||
-rw-r--r-- | sc/source/ui/app/typemap.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/app/uiitems.cxx | 114 | ||||
-rw-r--r-- | sc/source/ui/app/wtcdummy.cxx | 2 |
16 files changed, 962 insertions, 962 deletions
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx index 1553f37cc05c..68cefe7825a1 100644 --- a/sc/source/ui/app/client.cxx +++ b/sc/source/ui/app/client.cxx @@ -2,7 +2,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 @@ -123,8 +123,8 @@ void __EXPORT ScClient::RequestNewObjectArea( Rectangle& aLogicRect ) Size aSize = pPage->GetSize(); if ( aSize.Width() < 0 ) { - aPos.X() = aSize.Width() + 1; // negative - aSize.Width() = -aSize.Width(); // positive + aPos.X() = aSize.Width() + 1; // negative + aSize.Width() = -aSize.Width(); // positive } Rectangle aPageRect( aPos, aSize ); @@ -166,7 +166,7 @@ void __EXPORT ScClient::ObjectAreaChanged() return; } - // Position und Groesse ins Dokument uebernehmen + // Position und Groesse ins Dokument uebernehmen SdrOle2Obj* pDrawObj = GetDrawObj(); if (pDrawObj) { @@ -209,7 +209,7 @@ void __EXPORT ScClient::ViewChanged() MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( GetAspect() ) ); Size aVisSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aMapUnit, MAP_100TH_MM ); - // Groesse ins Dokument uebernehmen + // Groesse ins Dokument uebernehmen SdrOle2Obj* pDrawObj = GetDrawObj(); if (pDrawObj) { @@ -236,7 +236,7 @@ void __EXPORT ScClient::ViewChanged() aLogicRect.SetSize( aVisSize ); pDrawObj->SetLogicRect( aLogicRect ); - // set document modified (SdrModel::SetChanged is not used) + // set document modified (SdrModel::SetChanged is not used) pViewSh->GetViewData()->GetDocShell()->SetDrawModified(); } } diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index cba682688f1f..c41bd8762d76 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -2,7 +2,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 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; } diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index c49345f3672b..ae77794ff999 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -2,7 +2,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 @@ -45,7 +45,7 @@ #include <sfx2/dispatch.hxx> #include <sfx2/event.hxx> #include <sfx2/imgmgr.hxx> -#include <stdlib.h> // qsort +#include <stdlib.h> // qsort #include <editeng/scriptspaceitem.hxx> #include <editeng/scripttypeitem.hxx> #include <vcl/cursor.hxx> @@ -76,9 +76,9 @@ #include "AccessibleEditObject.hxx" #include "AccessibleText.hxx" -#define TEXT_STARTPOS 3 -#define THESIZE 1000000 //!!! langt... :-) -#define TBX_WINDOW_HEIGHT 22 // in Pixeln - fuer alle Systeme gleich? +#define TEXT_STARTPOS 3 +#define THESIZE 1000000 //!!! langt... :-) +#define TBX_WINDOW_HEIGHT 22 // in Pixeln - fuer alle Systeme gleich? enum ScNameInputType { @@ -95,14 +95,14 @@ enum ScNameInputType //================================================================== -// class ScInputWindowWrapper +// class ScInputWindowWrapper //================================================================== SFX_IMPL_CHILDWINDOW(ScInputWindowWrapper,FID_INPUTLINE_STATUS) ScInputWindowWrapper::ScInputWindowWrapper( Window* pParentP, - USHORT nId, - SfxBindings* pBindings, + USHORT nId, + SfxBindings* pBindings, SfxChildWinInfo* /* pInfo */ ) : SfxChildWindow( pParentP, nId ) { @@ -117,7 +117,7 @@ ScInputWindowWrapper::ScInputWindowWrapper( Window* pParentP, pBindings->Invalidate( FID_TOGGLEINPUTLINE ); } -// GetInfo fliegt wieder raus, wenn es ein SFX_IMPL_TOOLBOX gibt !!!! +// GetInfo fliegt wieder raus, wenn es ein SFX_IMPL_TOOLBOX gibt !!!! SfxChildWinInfo __EXPORT ScInputWindowWrapper::GetInfo() const { @@ -130,7 +130,7 @@ SfxChildWinInfo __EXPORT ScInputWindowWrapper::GetInfo() const #define IMAGE(id) pImgMgr->SeekImage(id, bHC) //================================================================== -// class ScInputWindow +// class ScInputWindow //================================================================== ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : @@ -143,15 +143,15 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : #endif aWndPos ( this ), aTextWindow ( this ), - pInputHdl ( NULL ), + pInputHdl ( NULL ), pBindings ( pBind ), - aTextOk ( ScResId( SCSTR_QHELP_BTNOK ) ), // nicht immer neu aus Resource - aTextCancel ( ScResId( SCSTR_QHELP_BTNCANCEL ) ), - aTextSum ( ScResId( SCSTR_QHELP_BTNSUM ) ), - aTextEqual ( ScResId( SCSTR_QHELP_BTNEQUAL ) ), + aTextOk ( ScResId( SCSTR_QHELP_BTNOK ) ), // nicht immer neu aus Resource + aTextCancel ( ScResId( SCSTR_QHELP_BTNCANCEL ) ), + aTextSum ( ScResId( SCSTR_QHELP_BTNSUM ) ), + aTextEqual ( ScResId( SCSTR_QHELP_BTNEQUAL ) ), bIsOkCancelMode ( FALSE ) { - ScModule* pScMod = SC_MOD(); + ScModule* pScMod = SC_MOD(); SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); // #i73615# don't rely on SfxViewShell::Current while constructing the input line @@ -169,34 +169,34 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // Positionsfenster, 3 Buttons, Eingabefenster - InsertWindow ( 1, &aWndPos, 0, 0 ); - InsertSeparator ( 1 ); + InsertWindow ( 1, &aWndPos, 0, 0 ); + InsertSeparator ( 1 ); InsertItem ( SID_INPUT_FUNCTION, IMAGE( SID_INPUT_FUNCTION ), 0, 2 ); - InsertItem ( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), 0, 3 ); - InsertItem ( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), 0, 4 ); - InsertSeparator ( 5 ); + InsertItem ( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), 0, 3 ); + InsertItem ( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), 0, 4 ); + InsertSeparator ( 5 ); InsertWindow ( 7, &aTextWindow, 0, 6 ); - aWndPos .SetQuickHelpText( ScResId( SCSTR_QHELP_POSWND ) ); - aWndPos .SetHelpId ( HID_INSWIN_POS ); + aWndPos .SetQuickHelpText( ScResId( SCSTR_QHELP_POSWND ) ); + aWndPos .SetHelpId ( HID_INSWIN_POS ); aTextWindow.SetQuickHelpText( ScResId( SCSTR_QHELP_INPUTWND ) ); - aTextWindow.SetHelpId ( HID_INSWIN_INPUT ); + aTextWindow.SetHelpId ( HID_INSWIN_INPUT ); - // kein SetHelpText, die Hilfetexte kommen aus der Hilfe + // kein SetHelpText, die Hilfetexte kommen aus der Hilfe SetItemText ( SID_INPUT_FUNCTION, ScResId( SCSTR_QHELP_BTNCALC ) ); - SetHelpId ( SID_INPUT_FUNCTION, HID_INSWIN_CALC ); + SetHelpId ( SID_INPUT_FUNCTION, HID_INSWIN_CALC ); SetItemText ( SID_INPUT_SUM, aTextSum ); - SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME ); + SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME ); SetItemText ( SID_INPUT_EQUAL, aTextEqual ); - SetHelpId ( SID_INPUT_EQUAL, HID_INSWIN_FUNC ); + SetHelpId ( SID_INPUT_EQUAL, HID_INSWIN_FUNC ); - SetHelpId( HID_SC_INPUTWIN ); // fuer die ganze Eingabezeile + SetHelpId( HID_SC_INPUTWIN ); // fuer die ganze Eingabezeile - aWndPos .Show(); - aTextWindow .Show(); + aWndPos .Show(); + aTextWindow .Show(); pInputHdl = SC_MOD()->GetInputHdl( pViewSh, FALSE ); // use own handler even if ref-handler is set if (pInputHdl) @@ -204,21 +204,21 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : if ( pInputHdl && pInputHdl->GetFormString().Len() ) { - // Umschalten waehrend der Funktionsautopilot aktiv ist - // -> Inhalt des Funktionsautopiloten wieder anzeigen - //! auch Selektion (am InputHdl gemerkt) wieder anzeigen + // Umschalten waehrend der Funktionsautopilot aktiv ist + // -> Inhalt des Funktionsautopiloten wieder anzeigen + //! auch Selektion (am InputHdl gemerkt) wieder anzeigen aTextWindow.SetTextString( pInputHdl->GetFormString() ); } else if ( pInputHdl && pInputHdl->IsInputMode() ) { - // wenn waehrend des Editierens die Eingabezeile weg war - // (Editieren einer Formel, dann umschalten zu fremdem Dokument/Hilfe), - // wieder den gerade editierten Text aus dem InputHandler anzeigen + // wenn waehrend des Editierens die Eingabezeile weg war + // (Editieren einer Formel, dann umschalten zu fremdem Dokument/Hilfe), + // wieder den gerade editierten Text aus dem InputHandler anzeigen - aTextWindow.SetTextString( pInputHdl->GetEditString() ); // Text anzeigen + aTextWindow.SetTextString( pInputHdl->GetEditString() ); // Text anzeigen if ( pInputHdl->IsTopMode() ) - pInputHdl->SetMode( SC_INPUT_TABLE ); // Focus kommt eh nach unten + pInputHdl->SetMode( SC_INPUT_TABLE ); // Focus kommt eh nach unten } else if ( pViewSh ) pViewSh->UpdateInputHandler( TRUE ); // unbedingtes Update @@ -230,9 +230,9 @@ __EXPORT ScInputWindow::~ScInputWindow() { BOOL bDown = ( ScGlobal::pSysLocale == NULL ); // after Clear? - // if any view's input handler has a pointer to this input window, reset it - // (may be several ones, #74522#) - // member pInputHdl is not used here + // if any view's input handler has a pointer to this input window, reset it + // (may be several ones, #74522#) + // member pInputHdl is not used here if ( !bDown ) { @@ -255,12 +255,12 @@ __EXPORT ScInputWindow::~ScInputWindow() void ScInputWindow::SetInputHandler( ScInputHandler* pNew ) { - // wird im Activate der View gerufen... + // wird im Activate der View gerufen... if ( pNew != pInputHdl ) { - // Bei Reload (letzte Version) ist pInputHdl der Input-Handler der alten, - // geloeschten ViewShell, darum hier auf keinen Fall anfassen! + // Bei Reload (letzte Version) ist pInputHdl der Input-Handler der alten, + // geloeschten ViewShell, darum hier auf keinen Fall anfassen! pInputHdl = pNew; if (pInputHdl) @@ -338,16 +338,16 @@ void __EXPORT ScInputWindow::Select() { case SID_INPUT_FUNCTION: { - //! 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 ) ) { pViewFrm->GetDispatcher()->Execute( SID_OPENDLG_FUNCTION, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD ); - // die Toolbox wird sowieso disabled, also braucht auch nicht umgeschaltet - // zu werden, egal ob's geklappt hat oder nicht -// SetOkCancelMode(); + // die Toolbox wird sowieso disabled, also braucht auch nicht umgeschaltet + // zu werden, egal ob's geklappt hat oder nicht +// SetOkCancelMode(); } } break; @@ -360,7 +360,7 @@ void __EXPORT ScInputWindow::Select() case SID_INPUT_OK: pScMod->InputEnterHandler(); SetSumAssignMode(); - aTextWindow.Invalidate(); // sonst bleibt Selektion stehen + aTextWindow.Invalidate(); // sonst bleibt Selektion stehen break; case SID_INPUT_SUM: @@ -425,7 +425,7 @@ void __EXPORT ScInputWindow::Select() } } } - else // nur in Eingabezeile einfuegen + else // nur in Eingabezeile einfuegen { ScRangeList aRangeList; const BOOL bDataFound = pViewSh->GetAutoSumArea( aRangeList ); @@ -441,8 +441,8 @@ void __EXPORT ScInputWindow::Select() { pHdl->InitRangeFinder( aFormula ); - //! SetSelection am InputHandler ??? - //! bSelIsRef setzen ??? + //! SetSelection am InputHandler ??? + //! bSelIsRef setzen ??? const xub_StrLen nOpen = aFormula.Search('('); const xub_StrLen nLen = aFormula.Len(); if ( nOpen != STRING_NOTFOUND && nLen > nOpen ) @@ -468,7 +468,7 @@ void __EXPORT ScInputWindow::Select() case SID_INPUT_EQUAL: { aTextWindow.StartEditEngine(); - if ( pScMod->IsEditMode() ) // nicht, wenn z.B. geschuetzt + if ( pScMod->IsEditMode() ) // nicht, wenn z.B. geschuetzt { aTextWindow.GrabFocus(); aTextWindow.SetTextString( '=' ); @@ -502,7 +502,7 @@ void __EXPORT ScInputWindow::Resize() void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit ) { - //! 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(); EnableButtons( pViewFrm && !pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) ); aTextWindow.StartEditEngine(); @@ -526,7 +526,7 @@ void ScInputWindow::SetFuncString( const String& rString, BOOL bDoEdit ) pScMod->InputChanged(pView); if ( bDoEdit ) - SetOkCancelMode(); // nicht, wenn gleich hinterher Enter/Cancel + SetOkCancelMode(); // nicht, wenn gleich hinterher Enter/Cancel pView->SetEditEngineUpdateMode(TRUE); } @@ -552,7 +552,7 @@ void ScInputWindow::SetTextString( const String& rString ) void ScInputWindow::SetOkCancelMode() { - //! 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(); EnableButtons( pViewFrm && !pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) ); @@ -565,18 +565,18 @@ void ScInputWindow::SetOkCancelMode() RemoveItem( 3 ); // SID_INPUT_SUM und SID_INPUT_EQUAL entfernen RemoveItem( 3 ); InsertItem( SID_INPUT_CANCEL, IMAGE( SID_INPUT_CANCEL ), 0, 3 ); - InsertItem( SID_INPUT_OK, IMAGE( SID_INPUT_OK ), 0, 4 ); - SetItemText ( SID_INPUT_CANCEL, aTextCancel ); - SetHelpId ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL ); - SetItemText ( SID_INPUT_OK, aTextOk ); - SetHelpId ( SID_INPUT_OK, HID_INSWIN_OK ); + InsertItem( SID_INPUT_OK, IMAGE( SID_INPUT_OK ), 0, 4 ); + SetItemText ( SID_INPUT_CANCEL, aTextCancel ); + SetHelpId ( SID_INPUT_CANCEL, HID_INSWIN_CANCEL ); + SetItemText ( SID_INPUT_OK, aTextOk ); + SetHelpId ( SID_INPUT_OK, HID_INSWIN_OK ); bIsOkCancelMode = TRUE; } } void ScInputWindow::SetSumAssignMode() { - //! 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(); EnableButtons( pViewFrm && !pViewFrm->GetChildWindow( SID_OPENDLG_FUNCTION ) ); @@ -589,15 +589,15 @@ void ScInputWindow::SetSumAssignMode() // SID_INPUT_CANCEL, und SID_INPUT_OK entfernen RemoveItem( 3 ); RemoveItem( 3 ); - InsertItem( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), 0, 3 ); - InsertItem( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), 0, 4 ); - SetItemText ( SID_INPUT_SUM, aTextSum ); - SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME ); - SetItemText ( SID_INPUT_EQUAL, aTextEqual ); - SetHelpId ( SID_INPUT_EQUAL, HID_INSWIN_FUNC ); + InsertItem( SID_INPUT_SUM, IMAGE( SID_INPUT_SUM ), 0, 3 ); + InsertItem( SID_INPUT_EQUAL, IMAGE( SID_INPUT_EQUAL ), 0, 4 ); + SetItemText ( SID_INPUT_SUM, aTextSum ); + SetHelpId ( SID_INPUT_SUM, HID_INSWIN_SUMME ); + SetItemText ( SID_INPUT_EQUAL, aTextEqual ); + SetHelpId ( SID_INPUT_EQUAL, HID_INSWIN_FUNC ); bIsOkCancelMode = FALSE; - SetFormulaMode(FALSE); // kein editieren -> keine Formel + SetFormulaMode(FALSE); // kein editieren -> keine Formel } } @@ -660,7 +660,7 @@ void ScInputWindow::SwitchToTextWin() { xub_StrLen nLen = pView->GetEditEngine()->GetTextLen(0); ESelection aSel( 0, nLen, 0, nLen ); - pView->SetSelection( aSel ); // set cursor to end of text + pView->SetSelection( aSel ); // set cursor to end of text } } } @@ -672,14 +672,14 @@ void ScInputWindow::PosGrabFocus() void ScInputWindow::EnableButtons( BOOL bEnable ) { - // when enabling buttons, always also enable the input window itself + // when enabling buttons, always also enable the input window itself if ( bEnable && !IsEnabled() ) Enable(); - EnableItem( SID_INPUT_FUNCTION, bEnable ); + EnableItem( SID_INPUT_FUNCTION, bEnable ); EnableItem( bIsOkCancelMode ? SID_INPUT_CANCEL : SID_INPUT_SUM, bEnable ); EnableItem( bIsOkCancelMode ? SID_INPUT_OK : SID_INPUT_EQUAL, bEnable ); -// Invalidate(); +// Invalidate(); } void ScInputWindow::StateChanged( StateChangedType nType ) @@ -693,9 +693,9 @@ void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) { if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - // update item images + // update item images - ScModule* pScMod = SC_MOD(); + ScModule* pScMod = SC_MOD(); SfxImageManager* pImgMgr = SfxImageManager::GetImageManager( pScMod ); BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); // IMAGE macro uses pScMod, pImgMgr, bHC @@ -717,26 +717,26 @@ void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) } //======================================================================== -// Eingabefenster +// Eingabefenster //======================================================================== ScTextWnd::ScTextWnd( Window* pParent ) - : Window ( pParent, WinBits(WB_HIDE | WB_BORDER) ), + : Window ( pParent, WinBits(WB_HIDE | WB_BORDER) ), DragSourceHelper( this ), - pEditEngine ( NULL ), - pEditView ( NULL ), + pEditEngine ( NULL ), + pEditView ( NULL ), bIsInsertMode( TRUE ), bFormulaMode ( FALSE ), bInputMode ( FALSE ) { - EnableRTL( FALSE ); // #106269# EditEngine can't be used with VCL EnableRTL + EnableRTL( FALSE ); // #106269# EditEngine can't be used with VCL EnableRTL bIsRTL = GetSettings().GetLayoutRTL(); - // #79096# always use application font, so a font with cjk chars can be installed + // #79096# always use application font, so a font with cjk chars can be installed Font aAppFont = GetFont(); aTextFont = aAppFont; - aTextFont.SetSize( PixelToLogic( aAppFont.GetSize(), MAP_TWIP ) ); // AppFont ist in Pixeln + aTextFont.SetSize( PixelToLogic( aAppFont.GetSize(), MAP_TWIP ) ); // AppFont ist in Pixeln const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); @@ -745,15 +745,15 @@ ScTextWnd::ScTextWnd( Window* pParent ) aTextFont.SetTransparent ( TRUE ); aTextFont.SetFillColor ( aBgColor ); - //aTextFont.SetColor ( COL_FIELDTEXT ); - aTextFont.SetColor (aTxtColor); - aTextFont.SetWeight ( WEIGHT_NORMAL ); + //aTextFont.SetColor ( COL_FIELDTEXT ); + aTextFont.SetColor (aTxtColor); + aTextFont.SetWeight ( WEIGHT_NORMAL ); - SetSizePixel ( Size(1,TBX_WINDOW_HEIGHT) ); - SetBackground ( aBgColor ); - SetLineColor ( COL_BLACK ); - SetMapMode ( MAP_TWIP ); - SetPointer ( POINTER_TEXT ); + SetSizePixel ( Size(1,TBX_WINDOW_HEIGHT) ); + SetBackground ( aBgColor ); + SetLineColor ( COL_BLACK ); + SetMapMode ( MAP_TWIP ); + SetPointer ( POINTER_TEXT ); } __EXPORT ScTextWnd::~ScTextWnd() @@ -775,16 +775,16 @@ void __EXPORT ScTextWnd::Paint( const Rectangle& rRec ) long nDiff = GetOutputSizePixel().Height() - LogicToPixel( Size( 0, GetTextHeight() ) ).Height(); -// if (nDiff<2) nDiff=2; // mind. 1 Pixel +// if (nDiff<2) nDiff=2; // mind. 1 Pixel long nStartPos = TEXT_STARTPOS; if ( bIsRTL ) { - // right-align + // right-align nStartPos += GetOutputSizePixel().Width() - 2*TEXT_STARTPOS - LogicToPixel( Size( GetTextWidth( aString ), 0 ) ).Width(); - // LayoutMode isn't changed as long as ModifyRTLDefaults doesn't include SvxFrameDirectionItem + // LayoutMode isn't changed as long as ModifyRTLDefaults doesn't include SvxFrameDirectionItem } DrawText( PixelToLogic( Point( nStartPos, nDiff/2 ) ), aString ); @@ -800,7 +800,7 @@ void __EXPORT ScTextWnd::Resize() - LogicToPixel( Size( 0, GetTextHeight() ) ).Height(); #ifdef OS2_DOCH_NICHT - nDiff-=2; // wird durch 2 geteilt + nDiff-=2; // wird durch 2 geteilt // passt sonst nicht zur normalen Textausgabe #endif @@ -842,7 +842,7 @@ void __EXPORT ScTextWnd::MouseButtonUp( const MouseEvent& rMEvt ) if ( rMEvt.IsMiddle() && GetSettings().GetMouseSettings().GetMiddleButtonAction() == MOUSE_MIDDLE_PASTESELECTION ) { - // EditView may have pasted from selection + // EditView may have pasted from selection SC_MOD()->InputChanged( pEditView ); } else @@ -867,13 +867,13 @@ void __EXPORT ScTextWnd::Command( const CommandEvent& rCEvt ) pEditView->Command( rCEvt ); pScMod->SetInEditCommand( FALSE ); - // #48929# COMMAND_STARTDRAG heiss noch lange nicht, dass der Inhalt geaendert wurde - // darum in dem Fall kein InputChanged - //! erkennen, ob mit Move gedraggt wurde, oder Drag&Move irgendwie verbieten + // #48929# COMMAND_STARTDRAG heiss noch lange nicht, dass der Inhalt geaendert wurde + // darum in dem Fall kein InputChanged + //! erkennen, ob mit Move gedraggt wurde, oder Drag&Move irgendwie verbieten if ( nCommand == COMMAND_STARTDRAG ) { - // ist auf eine andere View gedraggt worden? + // ist auf eine andere View gedraggt worden? ScTabViewShell* pEndViewSh = ScTabViewShell::GetActiveViewShell(); if ( pEndViewSh != pStartViewSh && pStartViewSh != NULL ) { @@ -882,13 +882,13 @@ void __EXPORT ScTextWnd::Command( const CommandEvent& rCEvt ) if ( pHdl && pViewData->HasEditView( pViewData->GetActivePart() ) ) { pHdl->CancelHandler(); - pViewData->GetView()->ShowCursor(); // fehlt bei KillEditView, weil nicht aktiv + pViewData->GetView()->ShowCursor(); // fehlt bei KillEditView, weil nicht aktiv } } } else if ( nCommand == COMMAND_CURSORPOS ) { - // don't call InputChanged for COMMAND_CURSORPOS + // don't call InputChanged for COMMAND_CURSORPOS } else if ( nCommand == COMMAND_INPUTLANGUAGECHANGE ) { @@ -907,7 +907,7 @@ void __EXPORT ScTextWnd::Command( const CommandEvent& rCEvt ) SC_MOD()->InputChanged( pEditView ); } else - Window::Command(rCEvt); // sonst soll sich die Basisklasse drum kuemmern... + Window::Command(rCEvt); // sonst soll sich die Basisklasse drum kuemmern... bInputMode = FALSE; } @@ -919,8 +919,8 @@ void ScTextWnd::StartDrag( sal_Int8 /* nAction */, const Point& rPosPixel ) CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE ); pEditView->Command( aDragEvent ); - // handling of d&d to different view (CancelHandler) can't be done here, - // because the call returns before d&d is complete. + // handling of d&d to different view (CancelHandler) can't be done here, + // because the call returns before d&d is complete. } } @@ -932,7 +932,7 @@ void __EXPORT ScTextWnd::KeyInput(const KeyEvent& rKEvt) BOOL bUsed = FALSE; ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if ( pViewSh ) - bUsed = pViewSh->SfxKeyInput(rKEvt); // nur Acceleratoren, keine Eingabe + bUsed = pViewSh->SfxKeyInput(rKEvt); // nur Acceleratoren, keine Eingabe if (!bUsed) Window::KeyInput( rKEvt ); } @@ -952,7 +952,7 @@ void __EXPORT ScTextWnd::LoseFocus() String __EXPORT ScTextWnd::GetText() const { - // ueberladen, um per Testtool an den Text heranzukommen + // ueberladen, um per Testtool an den Text heranzukommen if ( pEditEngine ) return pEditEngine->GetText(); @@ -976,9 +976,9 @@ void ScTextWnd::UpdateAutoCorrFlag() ULONG nControl = pEditEngine->GetControlWord(); ULONG nOld = nControl; if ( bFormulaMode ) - nControl &= ~EE_CNTRL_AUTOCORRECT; // keine Autokorrektur in Formeln + nControl &= ~EE_CNTRL_AUTOCORRECT; // keine Autokorrektur in Formeln else - nControl |= EE_CNTRL_AUTOCORRECT; // sonst schon + nControl |= EE_CNTRL_AUTOCORRECT; // sonst schon if ( nControl != nOld ) pEditEngine->SetControlWord( nControl ); } @@ -1007,12 +1007,12 @@ void lcl_ModifyRTLDefaults( SfxItemSet& rSet ) { rSet.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) ); - // always using rtl writing direction would break formulas + // always using rtl writing direction would break formulas //rSet.Put( SvxFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR ) ); - // PaperSize width is limited to USHRT_MAX in RTL mode (because of EditEngine's - // USHORT values in EditLine), so the text may be wrapped and line spacing must be - // increased to not see the beginning of the next line. + // PaperSize width is limited to USHRT_MAX in RTL mode (because of EditEngine's + // USHORT values in EditLine), so the text may be wrapped and line spacing must be + // increased to not see the beginning of the next line. SvxLineSpacingItem aItem( SVX_LINESPACE_TWO_LINES, EE_PARA_SBL ); aItem.SetPropLineSpace( 200 ); rSet.Put( aItem ); @@ -1030,7 +1030,7 @@ void lcl_ModifyRTLVisArea( EditView* pEditView ) void ScTextWnd::StartEditEngine() { - // #31147# Bei "eigener Modalitaet" (Doc-modale Dialoge) nicht aktivieren + // #31147# Bei "eigener Modalitaet" (Doc-modale Dialoge) nicht aktivieren SfxObjectShell* pObjSh = SfxObjectShell::Current(); if ( pObjSh && pObjSh->IsInModalMode() ) return; @@ -1045,7 +1045,7 @@ void ScTextWnd::StartEditEngine() pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); } else - pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE ); + pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE ); pNew->SetExecuteURL( FALSE ); pEditEngine = pNew; @@ -1067,28 +1067,28 @@ void ScTextWnd::StartEditEngine() pEditEngine->SetDefaults( pSet ); } - // #57254# Wenn in der Zelle URL-Felder enthalten sind, muessen die auch in - // die Eingabezeile uebernommen werden, weil sonst die Positionen nicht stimmen. + // #57254# Wenn in der Zelle URL-Felder enthalten sind, muessen die auch in + // die Eingabezeile uebernommen werden, weil sonst die Positionen nicht stimmen. BOOL bFilled = FALSE; ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); - if ( pHdl ) //! Testen, ob's der richtige InputHdl ist? + if ( pHdl ) //! Testen, ob's der richtige InputHdl ist? bFilled = pHdl->GetTextAndFields( *pEditEngine ); pEditEngine->SetUpdateMode( TRUE ); - // aString ist die Wahrheit... + // aString ist die Wahrheit... if ( bFilled && pEditEngine->GetText() == aString ) - Invalidate(); // Repaint fuer (hinterlegte) Felder + Invalidate(); // Repaint fuer (hinterlegte) Felder else - pEditEngine->SetText(aString); // dann wenigstens den richtigen Text + pEditEngine->SetText(aString); // dann wenigstens den richtigen Text pEditView = new EditView( pEditEngine, this ); pEditView->SetInsertMode(bIsInsertMode); // Text aus Clipboard wird als ASCII einzeilig uebernommen ULONG n = pEditView->GetControlWord(); - pEditView->SetControlWord( n | EV_CNTRL_SINGLELINEPASTE ); + pEditView->SetControlWord( n | EV_CNTRL_SINGLELINEPASTE ); pEditEngine->InsertView( pEditView, EE_APPEND ); @@ -1102,12 +1102,12 @@ void ScTextWnd::StartEditEngine() if (!maAccTextDatas.empty()) maAccTextDatas.back()->StartEdit(); - // as long as EditEngine and DrawText sometimes differ for CTL text, - // repaint now to have the EditEngine's version visible + // as long as EditEngine and DrawText sometimes differ for CTL text, + // repaint now to have the EditEngine's version visible // SfxObjectShell* pObjSh = SfxObjectShell::Current(); if ( pObjSh && pObjSh->ISA(ScDocShell) ) { - ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument(); // any document + ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument(); // any document BYTE nScript = pDoc->GetStringScriptType( aString ); if ( nScript & SCRIPTTYPE_COMPLEX ) Invalidate(); @@ -1127,11 +1127,11 @@ IMPL_LINK(ScTextWnd, NotifyHdl, EENotify*, EMPTYARG) { ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); - // #105354# Use the InputHandler's InOwnChange flag to prevent calling InputChanged - // while an InputHandler method is modifying the EditEngine content + // #105354# Use the InputHandler's InOwnChange flag to prevent calling InputChanged + // while an InputHandler method is modifying the EditEngine content if ( pHdl && !pHdl->IsInOwnChange() ) - pHdl->InputChanged( pEditView, TRUE ); // #i20282# InputChanged must know if called from modify handler + pHdl->InputChanged( pEditView, TRUE ); // #i20282# InputChanged must know if called from modify handler } return 0; @@ -1163,7 +1163,7 @@ void ScTextWnd::StopEditEngine( BOOL bAll ) pViewFrm->GetBindings().Invalidate( SID_ATTR_INSERT ); if (bSelection) - Invalidate(); // damit Selektion nicht stehenbleibt + Invalidate(); // damit Selektion nicht stehenbleibt } } @@ -1173,7 +1173,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) { bInputMode = TRUE; - // Position der Aenderung suchen, nur Rest painten + // Position der Aenderung suchen, nur Rest painten long nInvPos = 0; long nStartPos = 0; @@ -1186,13 +1186,13 @@ void ScTextWnd::SetTextString( const String& rNewString ) bPaintAll = TRUE; else { - // test if CTL script type is involved + // test if CTL script type is involved BYTE nOldScript = 0; BYTE nNewScript = 0; SfxObjectShell* pObjSh = SfxObjectShell::Current(); if ( pObjSh && pObjSh->ISA(ScDocShell) ) { - // any document can be used (used only for its break iterator) + // any document can be used (used only for its break iterator) ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument(); nOldScript = pDoc->GetStringScriptType( aString ); nNewScript = pDoc->GetStringScriptType( rNewString ); @@ -1218,7 +1218,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) if ( nSize1>0 && nSize2>0 ) nTextSize = Max( nSize1, nSize2 ); else - nTextSize = GetOutputSize().Width(); // Ueberlauf + nTextSize = GetOutputSize().Width(); // Ueberlauf if (nDifPos == STRING_MATCH) nDifPos = 0; @@ -1231,8 +1231,8 @@ void ScTextWnd::SetTextString( const String& rNewString ) nInvPos += GetTextWidth(aString,0,nDifPos); USHORT nFlags = 0; - if ( nDifPos == aString.Len() ) // only new characters appended - nFlags = INVALIDATE_NOERASE; // then background is already clear + if ( nDifPos == aString.Len() ) // only new characters appended + nFlags = INVALIDATE_NOERASE; // then background is already clear Invalidate( Rectangle( nInvPos, 0, nStartPos+nTextSize, GetOutputSize().Height()-1 ), @@ -1280,7 +1280,7 @@ void ScTextWnd::MakeDialogEditView() pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); } else - pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE ); + pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, TRUE ); pNew->SetExecuteURL( FALSE ); pEditEngine = pNew; @@ -1296,7 +1296,7 @@ void ScTextWnd::MakeDialogEditView() pEditEngine->SetDefaults( pSet ); pEditEngine->SetUpdateMode( TRUE ); - pEditView = new EditView( pEditEngine, this ); + pEditView = new EditView( pEditEngine, this ); pEditEngine->InsertView( pEditView, EE_APPEND ); Resize(); @@ -1318,8 +1318,8 @@ void ScTextWnd::ImplInitSettings() Color aTxtColor= rStyleSettings.GetWindowTextColor(); aTextFont.SetFillColor ( aBgColor ); - aTextFont.SetColor (aTxtColor); - SetBackground ( aBgColor ); + aTextFont.SetColor (aTxtColor); + SetBackground ( aBgColor ); Invalidate(); } @@ -1362,24 +1362,24 @@ void ScTextWnd::DataChanged( const DataChangedEvent& rDCEvt ) //======================================================================== -// Positionsfenster +// Positionsfenster //======================================================================== ScPosWnd::ScPosWnd( Window* pParent ) : - ComboBox ( pParent, WinBits(WB_HIDE | WB_DROPDOWN) ), - pAccel ( NULL ), + ComboBox ( pParent, WinBits(WB_HIDE | WB_DROPDOWN) ), + pAccel ( NULL ), nTipVisible ( 0 ), bFormulaMode( FALSE ) { Size aSize( GetTextWidth( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("GW99999:GW99999")) ), GetTextHeight() ); - aSize.Width() += 25; // ?? - aSize.Height() = CalcWindowSizePixel(11); // Funktionen: 10 MRU + "andere..." + aSize.Width() += 25; // ?? + aSize.Height() = CalcWindowSizePixel(11); // Funktionen: 10 MRU + "andere..." SetSizePixel( aSize ); FillRangeNames(); - StartListening( *SFX_APP() ); // fuer Navigator-Bereichsnamen-Updates + StartListening( *SFX_APP() ); // fuer Navigator-Bereichsnamen-Updates } __EXPORT ScPosWnd::~ScPosWnd() @@ -1424,7 +1424,7 @@ void ScPosWnd::FillRangeNames() { ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument(); - // per Hand sortieren, weil Funktionen nicht sortiert werden: + // per Hand sortieren, weil Funktionen nicht sortiert werden: ScRangeName* pRangeNames = pDoc->GetRangeName(); USHORT nCount = pRangeNames->GetCount(); @@ -1488,16 +1488,16 @@ void ScPosWnd::FillFunctions() InsertEntry( *pDesc->pFuncName ); if (!aFirstName.Len()) aFirstName = *pDesc->pFuncName; - break; // nicht weitersuchen + break; // nicht weitersuchen } } } } - //! Eintrag "Andere..." fuer Funktions-Autopilot wieder aufnehmen, - //! wenn der Funktions-Autopilot mit dem bisher eingegebenen Text arbeiten kann! + //! Eintrag "Andere..." fuer Funktions-Autopilot wieder aufnehmen, + //! wenn der Funktions-Autopilot mit dem bisher eingegebenen Text arbeiten kann! -// InsertEntry( ScGlobal::GetRscString(STR_FUNCTIONLIST_MORE) ); +// InsertEntry( ScGlobal::GetRscString(STR_FUNCTIONLIST_MORE) ); SetText(aFirstName); } @@ -1506,7 +1506,7 @@ void ScPosWnd::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( !bFormulaMode ) { - // muss die Liste der Bereichsnamen updgedated werden? + // muss die Liste der Bereichsnamen updgedated werden? if ( rHint.ISA(SfxSimpleHint) ) { @@ -1640,7 +1640,7 @@ void ScPosWnd::Modify() void __EXPORT ScPosWnd::Select() { - ComboBox::Select(); // in VCL gibt GetText() erst danach den ausgewaehlten Eintrag + ComboBox::Select(); // in VCL gibt GetText() erst danach den ausgewaehlten Eintrag HideTip(); @@ -1658,10 +1658,10 @@ void ScPosWnd::DoEnter() ScModule* pScMod = SC_MOD(); if ( aText == ScGlobal::GetRscString(STR_FUNCTIONLIST_MORE) ) { - // Funktions-Autopilot - //! mit dem bisher eingegebenen Text weiterarbeiten !!! + // Funktions-Autopilot + //! mit dem bisher eingegebenen Text weiterarbeiten !!! - //! 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 ) ) pViewFrm->GetDispatcher()->Execute( SID_OPENDLG_FUNCTION, @@ -1783,7 +1783,7 @@ void ScPosWnd::ReleaseFocus_Impl() ScInputHandler* pHdl = SC_MOD()->GetInputHdl( PTR_CAST( ScTabViewShell, pCurSh ) ); if ( pHdl && pHdl->IsTopMode() ) { - // Focus wieder in die Eingabezeile? + // Focus wieder in die Eingabezeile? ScInputWindow* pInputWin = pHdl->GetInputWindow(); if (pInputWin) @@ -1793,7 +1793,7 @@ void ScPosWnd::ReleaseFocus_Impl() } } - // Focus auf die aktive View + // Focus auf die aktive View if ( pCurSh ) { diff --git a/sc/source/ui/app/lnktrans.cxx b/sc/source/ui/app/lnktrans.cxx index 055f8da1a828..3e31b8d1814c 100644 --- a/sc/source/ui/app/lnktrans.cxx +++ b/sc/source/ui/app/lnktrans.cxx @@ -2,7 +2,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 @@ -60,7 +60,7 @@ void ScLinkTransferObj::AddSupportedFormats() { if ( aLinkURL.Len() ) { - // TransferableHelper::SetINetBookmark formats + // TransferableHelper::SetINetBookmark formats AddFormat( SOT_FORMATSTR_ID_SOLK ); AddFormat( SOT_FORMAT_STRING ); diff --git a/sc/source/ui/app/msgpool.cxx b/sc/source/ui/app/msgpool.cxx index 0de23989202f..9068594c2d53 100644 --- a/sc/source/ui/app/msgpool.cxx +++ b/sc/source/ui/app/msgpool.cxx @@ -2,7 +2,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 @@ -42,49 +42,49 @@ static SfxItemInfo __READONLY_DATA aMsgItemInfos[] = { - { 0, SFX_ITEM_POOLABLE }, // SCITEM_STRING - { 0, SFX_ITEM_POOLABLE }, // SCITEM_SEARCHDATA - nicht mehr benutzt !!! - { SID_SORT, SFX_ITEM_POOLABLE }, // SCITEM_SORTDATA - { SID_QUERY, SFX_ITEM_POOLABLE }, // SCITEM_QUERYDATA - { SID_SUBTOTALS, SFX_ITEM_POOLABLE }, // SCITEM_SUBTDATA - { SID_CONSOLIDATE, SFX_ITEM_POOLABLE }, // SCITEM_CONSOLIDATEDATA - { SID_PIVOT_TABLE, SFX_ITEM_POOLABLE }, // SCITEM_PIVOTDATA - { SID_SOLVE, SFX_ITEM_POOLABLE }, // SCITEM_SOLVEDATA - { SID_SCUSERLISTS, SFX_ITEM_POOLABLE }, // SCITEM_USERLIST - { SID_PRINTER_NOTFOUND_WARN, SFX_ITEM_POOLABLE } // SCITEM_PRINTWARN + { 0, SFX_ITEM_POOLABLE }, // SCITEM_STRING + { 0, SFX_ITEM_POOLABLE }, // SCITEM_SEARCHDATA - nicht mehr benutzt !!! + { SID_SORT, SFX_ITEM_POOLABLE }, // SCITEM_SORTDATA + { SID_QUERY, SFX_ITEM_POOLABLE }, // SCITEM_QUERYDATA + { SID_SUBTOTALS, SFX_ITEM_POOLABLE }, // SCITEM_SUBTDATA + { SID_CONSOLIDATE, SFX_ITEM_POOLABLE }, // SCITEM_CONSOLIDATEDATA + { SID_PIVOT_TABLE, SFX_ITEM_POOLABLE }, // SCITEM_PIVOTDATA + { SID_SOLVE, SFX_ITEM_POOLABLE }, // SCITEM_SOLVEDATA + { SID_SCUSERLISTS, SFX_ITEM_POOLABLE }, // SCITEM_USERLIST + { SID_PRINTER_NOTFOUND_WARN, SFX_ITEM_POOLABLE } // SCITEM_PRINTWARN }; //------------------------------------------------------------------------ ScMessagePool::ScMessagePool() - : SfxItemPool ( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScMessagePool")), + : SfxItemPool ( String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScMessagePool")), MSGPOOL_START, MSGPOOL_END, aMsgItemInfos, NULL ), // - aGlobalStringItem ( SfxStringItem ( SCITEM_STRING, String() ) ), - aGlobalSearchItem ( SvxSearchItem ( SCITEM_SEARCHDATA ) ), - aGlobalSortItem ( ScSortItem ( SCITEM_SORTDATA, NULL ) ), - aGlobalQueryItem ( ScQueryItem ( SCITEM_QUERYDATA, NULL, NULL ) ), - aGlobalSubTotalItem ( ScSubTotalItem ( SCITEM_SUBTDATA, NULL, NULL ) ), - aGlobalConsolidateItem ( ScConsolidateItem ( SCITEM_CONSOLIDATEDATA, NULL ) ), - aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, FALSE ) ), - aGlobalSolveItem ( ScSolveItem ( SCITEM_SOLVEDATA, NULL ) ), - aGlobalUserListItem ( ScUserListItem ( SCITEM_USERLIST ) ), + aGlobalStringItem ( SfxStringItem ( SCITEM_STRING, String() ) ), + aGlobalSearchItem ( SvxSearchItem ( SCITEM_SEARCHDATA ) ), + aGlobalSortItem ( ScSortItem ( SCITEM_SORTDATA, NULL ) ), + aGlobalQueryItem ( ScQueryItem ( SCITEM_QUERYDATA, NULL, NULL ) ), + aGlobalSubTotalItem ( ScSubTotalItem ( SCITEM_SUBTDATA, NULL, NULL ) ), + aGlobalConsolidateItem ( ScConsolidateItem ( SCITEM_CONSOLIDATEDATA, NULL ) ), + aGlobalPivotItem ( ScPivotItem ( SCITEM_PIVOTDATA, NULL, NULL, FALSE ) ), + aGlobalSolveItem ( ScSolveItem ( SCITEM_SOLVEDATA, NULL ) ), + aGlobalUserListItem ( ScUserListItem ( SCITEM_USERLIST ) ), // - aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, FALSE ) ) + aPrintWarnItem ( SfxBoolItem ( SCITEM_PRINTWARN, FALSE ) ) { ppPoolDefaults = new SfxPoolItem*[MSGPOOL_END - MSGPOOL_START + 1]; - ppPoolDefaults[SCITEM_STRING - MSGPOOL_START] = &aGlobalStringItem; - ppPoolDefaults[SCITEM_SEARCHDATA - MSGPOOL_START] = &aGlobalSearchItem; - ppPoolDefaults[SCITEM_SORTDATA - MSGPOOL_START] = &aGlobalSortItem; - ppPoolDefaults[SCITEM_QUERYDATA - MSGPOOL_START] = &aGlobalQueryItem; - ppPoolDefaults[SCITEM_SUBTDATA - MSGPOOL_START] = &aGlobalSubTotalItem; - ppPoolDefaults[SCITEM_CONSOLIDATEDATA - MSGPOOL_START] = &aGlobalConsolidateItem; - ppPoolDefaults[SCITEM_PIVOTDATA - MSGPOOL_START] = &aGlobalPivotItem; - ppPoolDefaults[SCITEM_SOLVEDATA - MSGPOOL_START] = &aGlobalSolveItem; - ppPoolDefaults[SCITEM_USERLIST - MSGPOOL_START] = &aGlobalUserListItem; - ppPoolDefaults[SCITEM_PRINTWARN - MSGPOOL_START] = &aPrintWarnItem; + ppPoolDefaults[SCITEM_STRING - MSGPOOL_START] = &aGlobalStringItem; + ppPoolDefaults[SCITEM_SEARCHDATA - MSGPOOL_START] = &aGlobalSearchItem; + ppPoolDefaults[SCITEM_SORTDATA - MSGPOOL_START] = &aGlobalSortItem; + ppPoolDefaults[SCITEM_QUERYDATA - MSGPOOL_START] = &aGlobalQueryItem; + ppPoolDefaults[SCITEM_SUBTDATA - MSGPOOL_START] = &aGlobalSubTotalItem; + ppPoolDefaults[SCITEM_CONSOLIDATEDATA - MSGPOOL_START] = &aGlobalConsolidateItem; + ppPoolDefaults[SCITEM_PIVOTDATA - MSGPOOL_START] = &aGlobalPivotItem; + ppPoolDefaults[SCITEM_SOLVEDATA - MSGPOOL_START] = &aGlobalSolveItem; + ppPoolDefaults[SCITEM_USERLIST - MSGPOOL_START] = &aGlobalUserListItem; + ppPoolDefaults[SCITEM_PRINTWARN - MSGPOOL_START] = &aPrintWarnItem; SetDefaults( ppPoolDefaults ); @@ -97,7 +97,7 @@ ScMessagePool::ScMessagePool() __EXPORT ScMessagePool::~ScMessagePool() { Delete(); - SetSecondaryPool( NULL ); // before deleting defaults (accesses defaults) + SetSecondaryPool( NULL ); // before deleting defaults (accesses defaults) for ( USHORT i=0; i <= MSGPOOL_END-MSGPOOL_START; i++ ) SetRefCount( *ppPoolDefaults[i], 0 ); @@ -110,7 +110,7 @@ __EXPORT ScMessagePool::~ScMessagePool() SfxMapUnit __EXPORT ScMessagePool::GetMetric( USHORT nWhich ) const { - // eigene Attribute: Twips, alles andere 1/100 mm + // eigene Attribute: Twips, alles andere 1/100 mm if ( nWhich >= ATTR_STARTINDEX && nWhich <= ATTR_ENDINDEX ) return SFX_MAPUNIT_TWIP; diff --git a/sc/source/ui/app/rfindlst.cxx b/sc/source/ui/app/rfindlst.cxx index 8f2526197787..9831a8b95b04 100644 --- a/sc/source/ui/app/rfindlst.cxx +++ b/sc/source/ui/app/rfindlst.cxx @@ -2,7 +2,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 @@ -35,7 +35,7 @@ // STATIC DATA ----------------------------------------------------------- -#define SC_RANGECOLORS 8 +#define SC_RANGECOLORS 8 static ColorData aColNames[SC_RANGECOLORS] = { COL_LIGHTBLUE, COL_LIGHTRED, COL_LIGHTMAGENTA, COL_GREEN, @@ -59,7 +59,7 @@ ScRangeFindList::~ScRangeFindList() } } -ColorData ScRangeFindList::GetColorName( USHORT nIndex ) // static +ColorData ScRangeFindList::GetColorName( USHORT nIndex ) // static { return aColNames[nIndex % SC_RANGECOLORS]; } diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 8cd7a4e74686..ca15f48364b9 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -2,7 +2,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 @@ -55,13 +55,13 @@ #include <sot/formats.hxx> #define SOT_FORMATSTR_ID_STARCALC_30 SOT_FORMATSTR_ID_STARCALC -#include "scitems.hxx" // fuer tbxctrls etc. +#include "scitems.hxx" // fuer tbxctrls etc. #include "scmod.hxx" #include "scresid.hxx" #include "sc.hrc" #include "cfgids.hxx" -//! die Registrierung wird wegen CLOOKs in ein eigenes File wandern muessen... +//! die Registrierung wird wegen CLOOKs in ein eigenes File wandern muessen... // Interface-Registrierung #include "docsh.hxx" @@ -121,7 +121,7 @@ #include <svx/imapdlg.hxx> #include "editutil.hxx" -#include <svx/svdfield.hxx> // SdrRegisterFieldClasses +#include <svx/svdfield.hxx> // SdrRegisterFieldClasses #include <rtl/logfile.hxx> #include "dwfunctr.hxx" @@ -147,86 +147,86 @@ void ScDLL::Init() if ( *ppShlPtr ) return; - ScDocumentPool::InitVersionMaps(); // wird im ScModule ctor gebraucht + ScDocumentPool::InitVersionMaps(); // wird im ScModule ctor gebraucht ScModule* pMod = new ScModule( &ScDocShell::Factory() ); (*ppShlPtr) = pMod; -//REMOVE ScDocShell::RegisterFactory( SDT_SC_DOCFACTPRIO ); +//REMOVE ScDocShell::RegisterFactory( SDT_SC_DOCFACTPRIO ); ScDocShell::Factory().SetDocumentServiceName( rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" ) ); - ScGlobal::Init(); // erst wenn der ResManager initialisiert ist - // erst nach ScGlobal::Init duerfen die App-Optionen - // initialisiert werden + ScGlobal::Init(); // erst wenn der ResManager initialisiert ist + // erst nach ScGlobal::Init duerfen die App-Optionen + // initialisiert werden // register your view-factories here - ScTabViewShell ::RegisterFactory(1); - ScPreviewShell ::RegisterFactory(2); + ScTabViewShell ::RegisterFactory(1); + ScPreviewShell ::RegisterFactory(2); // register your shell-interfaces here - ScModule ::RegisterInterface(pMod); - ScDocShell ::RegisterInterface(pMod); - ScTabViewShell ::RegisterInterface(pMod); - ScPreviewShell ::RegisterInterface(pMod); - ScDrawShell ::RegisterInterface(pMod); - ScDrawFormShell ::RegisterInterface(pMod); - ScDrawTextObjectBar ::RegisterInterface(pMod); - ScEditShell ::RegisterInterface(pMod); - ScPivotShell ::RegisterInterface(pMod); - ScAuditingShell ::RegisterInterface(pMod); - ScFormatShell ::RegisterInterface(pMod); - ScCellShell ::RegisterInterface(pMod); - ScOleObjectShell ::RegisterInterface(pMod); - ScChartShell ::RegisterInterface(pMod); - ScGraphicShell ::RegisterInterface(pMod); - ScMediaShell ::RegisterInterface(pMod); - ScPageBreakShell ::RegisterInterface(pMod); - - // eigene Controller - ScTbxInsertCtrl ::RegisterControl(SID_TBXCTL_INSERT, pMod); - ScTbxInsertCtrl ::RegisterControl(SID_TBXCTL_INSCELLS, pMod); - ScTbxInsertCtrl ::RegisterControl(SID_TBXCTL_INSOBJ, pMod); + ScModule ::RegisterInterface(pMod); + ScDocShell ::RegisterInterface(pMod); + ScTabViewShell ::RegisterInterface(pMod); + ScPreviewShell ::RegisterInterface(pMod); + ScDrawShell ::RegisterInterface(pMod); + ScDrawFormShell ::RegisterInterface(pMod); + ScDrawTextObjectBar ::RegisterInterface(pMod); + ScEditShell ::RegisterInterface(pMod); + ScPivotShell ::RegisterInterface(pMod); + ScAuditingShell ::RegisterInterface(pMod); + ScFormatShell ::RegisterInterface(pMod); + ScCellShell ::RegisterInterface(pMod); + ScOleObjectShell ::RegisterInterface(pMod); + ScChartShell ::RegisterInterface(pMod); + ScGraphicShell ::RegisterInterface(pMod); + ScMediaShell ::RegisterInterface(pMod); + ScPageBreakShell ::RegisterInterface(pMod); + + // eigene Controller + ScTbxInsertCtrl ::RegisterControl(SID_TBXCTL_INSERT, pMod); + ScTbxInsertCtrl ::RegisterControl(SID_TBXCTL_INSCELLS, pMod); + ScTbxInsertCtrl ::RegisterControl(SID_TBXCTL_INSOBJ, pMod); ScZoomSliderControl ::RegisterControl(SID_PREVIEW_SCALINGFACTOR, pMod); - // Svx-Toolbox-Controller + // Svx-Toolbox-Controller SvxTbxCtlDraw ::RegisterControl(SID_INSERT_DRAW, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_BASIC, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_SYMBOL, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_ARROW, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_FLOWCHART, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_CALLOUT, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_STAR, pMod); - SvxTbxCtlAlign ::RegisterControl(SID_OBJECT_ALIGN, pMod); - SvxFillToolBoxControl ::RegisterControl(0, pMod); - SvxLineStyleToolBoxControl ::RegisterControl(0, pMod); - SvxLineWidthToolBoxControl ::RegisterControl(0, pMod); - SvxLineColorToolBoxControl ::RegisterControl(0, pMod); - SvxLineEndToolBoxControl ::RegisterControl(SID_ATTR_LINEEND_STYLE, pMod); - SvxStyleToolBoxControl ::RegisterControl(SID_STYLE_APPLY, pMod); - SvxFontNameToolBoxControl ::RegisterControl(SID_ATTR_CHAR_FONT, pMod); -// SvxFontHeightToolBoxControl ::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod); - SvxFontColorToolBoxControl ::RegisterControl(SID_ATTR_CHAR_COLOR, pMod); - SvxColorToolBoxControl ::RegisterControl(SID_BACKGROUND_COLOR, pMod); - SvxFrameToolBoxControl ::RegisterControl(SID_ATTR_BORDER, pMod); - SvxFrameLineStyleToolBoxControl ::RegisterControl(SID_FRAME_LINESTYLE, pMod); - SvxFrameLineColorToolBoxControl ::RegisterControl(SID_FRAME_LINECOLOR, pMod); - SvxClipBoardControl ::RegisterControl(SID_PASTE, pMod ); - SvxUndoRedoControl ::RegisterControl(SID_UNDO, pMod ); - SvxUndoRedoControl ::RegisterControl(SID_REDO, pMod ); + SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_BASIC, pMod); + SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_SYMBOL, pMod); + SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_ARROW, pMod); + SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_FLOWCHART, pMod); + SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_CALLOUT, pMod); + SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_STAR, pMod); + SvxTbxCtlAlign ::RegisterControl(SID_OBJECT_ALIGN, pMod); + SvxFillToolBoxControl ::RegisterControl(0, pMod); + SvxLineStyleToolBoxControl ::RegisterControl(0, pMod); + SvxLineWidthToolBoxControl ::RegisterControl(0, pMod); + SvxLineColorToolBoxControl ::RegisterControl(0, pMod); + SvxLineEndToolBoxControl ::RegisterControl(SID_ATTR_LINEEND_STYLE, pMod); + SvxStyleToolBoxControl ::RegisterControl(SID_STYLE_APPLY, pMod); + SvxFontNameToolBoxControl ::RegisterControl(SID_ATTR_CHAR_FONT, pMod); +// SvxFontHeightToolBoxControl ::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod); + SvxFontColorToolBoxControl ::RegisterControl(SID_ATTR_CHAR_COLOR, pMod); + SvxColorToolBoxControl ::RegisterControl(SID_BACKGROUND_COLOR, pMod); + SvxFrameToolBoxControl ::RegisterControl(SID_ATTR_BORDER, pMod); + SvxFrameLineStyleToolBoxControl ::RegisterControl(SID_FRAME_LINESTYLE, pMod); + SvxFrameLineColorToolBoxControl ::RegisterControl(SID_FRAME_LINECOLOR, pMod); + SvxClipBoardControl ::RegisterControl(SID_PASTE, pMod ); + SvxUndoRedoControl ::RegisterControl(SID_UNDO, pMod ); + SvxUndoRedoControl ::RegisterControl(SID_REDO, pMod ); svx::FormatPaintBrushToolBoxControl::RegisterControl(SID_FORMATPAINTBRUSH, pMod ); - SvxGrafModeToolBoxControl ::RegisterControl(SID_ATTR_GRAF_MODE, pMod); - SvxGrafRedToolBoxControl ::RegisterControl(SID_ATTR_GRAF_RED, pMod); - SvxGrafGreenToolBoxControl ::RegisterControl(SID_ATTR_GRAF_GREEN, pMod); - SvxGrafBlueToolBoxControl ::RegisterControl(SID_ATTR_GRAF_BLUE, pMod); - SvxGrafLuminanceToolBoxControl ::RegisterControl(SID_ATTR_GRAF_LUMINANCE, pMod); - SvxGrafContrastToolBoxControl ::RegisterControl(SID_ATTR_GRAF_CONTRAST, pMod); - SvxGrafGammaToolBoxControl ::RegisterControl(SID_ATTR_GRAF_GAMMA, pMod); + SvxGrafModeToolBoxControl ::RegisterControl(SID_ATTR_GRAF_MODE, pMod); + SvxGrafRedToolBoxControl ::RegisterControl(SID_ATTR_GRAF_RED, pMod); + SvxGrafGreenToolBoxControl ::RegisterControl(SID_ATTR_GRAF_GREEN, pMod); + SvxGrafBlueToolBoxControl ::RegisterControl(SID_ATTR_GRAF_BLUE, pMod); + SvxGrafLuminanceToolBoxControl ::RegisterControl(SID_ATTR_GRAF_LUMINANCE, pMod); + SvxGrafContrastToolBoxControl ::RegisterControl(SID_ATTR_GRAF_CONTRAST, pMod); + SvxGrafGammaToolBoxControl ::RegisterControl(SID_ATTR_GRAF_GAMMA, pMod); SvxGrafTransparenceToolBoxControl::RegisterControl(SID_ATTR_GRAF_TRANSPARENCE, pMod); - SvxGrafFilterToolBoxControl ::RegisterControl(SID_GRFFILTER, pMod); + SvxGrafFilterToolBoxControl ::RegisterControl(SID_GRFFILTER, pMod); SvxVertTextTbxCtrl::RegisterControl(SID_DRAW_CAPTION_VERTICAL, pMod); SvxVertTextTbxCtrl::RegisterControl(SID_DRAW_TEXT_VERTICAL, pMod); @@ -242,77 +242,77 @@ void ScDLL::Init() ::sfx2::TaskPaneWrapper::RegisterChildWindow( FALSE, pMod ); // Svx-StatusBar-Controller - SvxInsertStatusBarControl ::RegisterControl(SID_ATTR_INSERT, pMod); - SvxSelectionModeControl ::RegisterControl(SID_STATUS_SELMODE, pMod); - SvxZoomStatusBarControl ::RegisterControl(SID_ATTR_ZOOM, pMod); + SvxInsertStatusBarControl ::RegisterControl(SID_ATTR_INSERT, pMod); + SvxSelectionModeControl ::RegisterControl(SID_STATUS_SELMODE, pMod); + SvxZoomStatusBarControl ::RegisterControl(SID_ATTR_ZOOM, pMod); SvxZoomSliderControl ::RegisterControl(SID_ATTR_ZOOMSLIDER, pMod); - SvxModifyControl ::RegisterControl(SID_DOC_MODIFIED, pMod); + SvxModifyControl ::RegisterControl(SID_DOC_MODIFIED, pMod); XmlSecStatusBarControl ::RegisterControl( SID_SIGNATURE, pMod ); - SvxPosSizeStatusBarControl ::RegisterControl(SID_ATTR_SIZE, pMod); + SvxPosSizeStatusBarControl ::RegisterControl(SID_ATTR_SIZE, pMod); // Svx-Menue-Controller - SvxFontMenuControl ::RegisterControl(SID_ATTR_CHAR_FONT, pMod); - SvxFontSizeMenuControl ::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod); + SvxFontMenuControl ::RegisterControl(SID_ATTR_CHAR_FONT, pMod); + SvxFontSizeMenuControl ::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod); // CustomShape extrusion controller svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod ); svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod ); - // Child-Windows + // Child-Windows // Hack: Eingabezeile mit 42 registrieren, damit sie im PlugIn immer sichtbar ist - ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK); + ScInputWindowWrapper ::RegisterChildWindow(42, pMod, SFX_CHILDWIN_TASK|SFX_CHILDWIN_FORCEDOCK); ScNavigatorDialogWrapper ::RegisterChildWindowContext( sal::static_int_cast<sal_uInt16>(ScTabViewShell::GetInterfaceId()), pMod); - ScSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod); ScOptSolverDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScNameDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScPivotLayoutWrapper ::RegisterChildWindow(FALSE, pMod); - ScTabOpDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScSpecialFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScDbNameDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScConsolidateDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScPrintAreasDlgWrapper ::RegisterChildWindow(FALSE, pMod); - ScCondFormatDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScNameDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScPivotLayoutWrapper ::RegisterChildWindow(FALSE, pMod); + ScTabOpDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScSpecialFilterDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScDbNameDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScConsolidateDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScPrintAreasDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScCondFormatDlgWrapper ::RegisterChildWindow(FALSE, pMod); ScColRowNameRangesDlgWrapper::RegisterChildWindow(FALSE, pMod); - ScFormulaDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScFormulaDlgWrapper ::RegisterChildWindow(FALSE, pMod); // First docking Window for Calc - ScFunctionChildWindow ::RegisterChildWindow(FALSE, pMod); + ScFunctionChildWindow ::RegisterChildWindow(FALSE, pMod); // Redlining- Window - ScAcceptChgDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScAcceptChgDlgWrapper ::RegisterChildWindow(FALSE, pMod); ScSimpleRefDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_ALWAYSAVAILABLE|SFX_CHILDWIN_NEVERHIDE ); - ScHighlightChgDlgWrapper ::RegisterChildWindow(FALSE, pMod); + ScHighlightChgDlgWrapper ::RegisterChildWindow(FALSE, pMod); SvxSearchDialogWrapper ::RegisterChildWindow(FALSE, pMod); SvxHlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod); - SvxFontWorkChildWindow ::RegisterChildWindow(FALSE, pMod); - SvxHyperlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_FORCEDOCK); - SvxIMapDlgChildWindow ::RegisterChildWindow(FALSE, pMod); - GalleryChildWindow ::RegisterChildWindow(FALSE, pMod); + SvxFontWorkChildWindow ::RegisterChildWindow(FALSE, pMod); + SvxHyperlinkDlgWrapper ::RegisterChildWindow(FALSE, pMod, SFX_CHILDWIN_FORCEDOCK); + SvxIMapDlgChildWindow ::RegisterChildWindow(FALSE, pMod); + GalleryChildWindow ::RegisterChildWindow(FALSE, pMod); ScSpellDialogChildWindow ::RegisterChildWindow(FALSE, pMod); - ::avmedia::MediaPlayer ::RegisterChildWindow(FALSE, pMod); + ::avmedia::MediaPlayer ::RegisterChildWindow(FALSE, pMod); //<!--Added by PengYunQuan for Validity Cell Range Picker ScValidityRefChildWin::RegisterChildWindow(FALSE, pMod); //-->Added by PengYunQuan for Validity Cell Range Picker - - // Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init + + // Edit-Engine-Felder, soweit nicht schon in OfficeApplication::Init SvClassManager& rClassManager = SvxFieldItem::GetClassManager(); -// rClassManager.SV_CLASS_REGISTER( SvxURLField ); -// rClassManager.SV_CLASS_REGISTER( SvxDateField ); -// rClassManager.SV_CLASS_REGISTER( SvxPageField ); +// rClassManager.SV_CLASS_REGISTER( SvxURLField ); +// rClassManager.SV_CLASS_REGISTER( SvxDateField ); +// rClassManager.SV_CLASS_REGISTER( SvxPageField ); rClassManager.SV_CLASS_REGISTER( SvxPagesField ); -// rClassManager.SV_CLASS_REGISTER( SvxTimeField ); +// rClassManager.SV_CLASS_REGISTER( SvxTimeField ); rClassManager.SV_CLASS_REGISTER( SvxFileField ); -// rClassManager.SV_CLASS_REGISTER( SvxExtFileField ); +// rClassManager.SV_CLASS_REGISTER( SvxExtFileField ); rClassManager.SV_CLASS_REGISTER( SvxTableField ); - SdrRegisterFieldClasses(); // SvDraw-Felder registrieren + SdrRegisterFieldClasses(); // SvDraw-Felder registrieren // 3D-Objekt-Factory eintragen E3dObjFactory(); @@ -322,7 +322,7 @@ void ScDLL::Init() pMod->PutItem( SfxUInt16Item( SID_ATTR_METRIC, sal::static_int_cast<UINT16>(pMod->GetAppOptions().GetAppMetric()) ) ); - // StarOne Services are now handled in the registry + // StarOne Services are now handled in the registry } void ScDLL::Exit() @@ -332,14 +332,14 @@ void ScDLL::Exit() delete (*ppShlPtr); (*ppShlPtr) = NULL; - // ScGlobal::Clear ist schon im Module-dtor + // ScGlobal::Clear ist schon im Module-dtor } //------------------------------------------------------------------ -// Statusbar +// Statusbar //------------------------------------------------------------------ -#define TEXT_WIDTH(s) rStatusBar.GetTextWidth((s)) +#define TEXT_WIDTH(s) rStatusBar.GetTextWidth((s)) #undef TEXT_WIDTH diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 66b9fade4d8f..0382970bbb9e 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -2,7 +2,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 @@ -114,10 +114,10 @@ #include "scabstdlg.hxx" -#define SC_IDLE_MIN 150 -#define SC_IDLE_MAX 3000 -#define SC_IDLE_STEP 75 -#define SC_IDLE_COUNT 50 +#define SC_IDLE_MIN 150 +#define SC_IDLE_MAX 3000 +#define SC_IDLE_STEP 75 +#define SC_IDLE_COUNT 50 static USHORT nIdleCount = 0; @@ -127,7 +127,7 @@ SFX_IMPL_INTERFACE( ScModule, SfxShell, ScResId(RID_APPTITLE) ) { SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_VIEWER, ScResId(RID_OBJECTBAR_APP) ); - SFX_STATUSBAR_REGISTRATION( ScResId(SCCFG_STATUSBAR) ); // nur ID wichtig + SFX_STATUSBAR_REGISTRATION( ScResId(SCCFG_STATUSBAR) ); // nur ID wichtig SFX_CHILDWINDOW_REGISTRATION( SvxHyperlinkDlgWrapper::GetChildWindowId() ); } @@ -159,19 +159,19 @@ ScModule::ScModule( SfxObjectFactory* pFact ) : mbIsInSharedDocLoading( false ), mbIsInSharedDocSaving( false ) { - // im ctor ist der ResManager (DLL-Daten) noch nicht initialisiert! + // im ctor ist der ResManager (DLL-Daten) noch nicht initialisiert! - SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("StarCalc"))); // fuer Basic + SetName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("StarCalc"))); // fuer Basic ResetDragObject(); SetClipObject( NULL, NULL ); - // InputHandler braucht nicht mehr angelegt zu werden + // InputHandler braucht nicht mehr angelegt zu werden - // ErrorHandler anlegen - war in Init() - // zwischen OfficeApplication::Init und ScGlobal::Init + // ErrorHandler anlegen - war in Init() + // zwischen OfficeApplication::Init und ScGlobal::Init SvxErrorHandler::Get(); - pErrorHdl = new SfxErrorHandler( RID_ERRHDLSC, + pErrorHdl = new SfxErrorHandler( RID_ERRHDLSC, ERRCODE_AREA_SC, ERRCODE_AREA_APP2-1, GetResMgr() ); @@ -187,25 +187,25 @@ ScModule::ScModule( SfxObjectFactory* pFact ) : SetPool( pMessagePool ); ScGlobal::InitTextHeight( pMessagePool ); - StartListening( *SFX_APP() ); // for SFX_HINT_DEINITIALIZING + StartListening( *SFX_APP() ); // for SFX_HINT_DEINITIALIZING } ScModule::~ScModule() { DBG_ASSERT( !pSelTransfer, "Selection Transfer object not deleted" ); - // InputHandler braucht nicht mehr geloescht zu werden (gibt keinen an der App mehr) + // InputHandler braucht nicht mehr geloescht zu werden (gibt keinen an der App mehr) SfxItemPool::Free(pMessagePool); DELETEZ( pFormEditData ); delete pErrorHdl; -// delete pSvxErrorHdl; +// delete pSvxErrorHdl; - ScGlobal::Clear(); // ruft auch ScDocumentPool::DeleteVersionMaps(); + ScGlobal::Clear(); // ruft auch ScDocumentPool::DeleteVersionMaps(); - DeleteCfg(); // wurde mal aus Exit() gerufen + DeleteCfg(); // wurde mal aus Exit() gerufen } //------------------------------------------------------------------ @@ -213,8 +213,8 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3 { if ( p == pColorConfig || p == pAccessOptions ) { - // Test if detective objects have to be updated with new colors - // (if the detective colors haven't been used yet, there's nothing to update) + // Test if detective objects have to be updated with new colors + // (if the detective colors haven't been used yet, there's nothing to update) if ( ScDetectiveFunc::IsColorsInitialized() ) { const svtools::ColorConfig& rColors = GetColorConfig(); @@ -225,10 +225,10 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3 ( ScDetectiveFunc::GetCommentColor() != (ColorData)rColors.GetColorValue(svtools::CALCNOTESBACKGROUND).nColor ); if ( bArrows || bComments ) { - ScDetectiveFunc::InitializeColors(); // get the new colors + ScDetectiveFunc::InitializeColors(); // get the new colors - // update detective objects in all open documents - SfxObjectShell* pObjSh = SfxObjectShell::GetFirst(); + // update detective objects in all open documents + SfxObjectShell* pObjSh = SfxObjectShell::GetFirst(); while ( pObjSh ) { if ( pObjSh->Type() == TYPE(ScDocShell) ) @@ -244,7 +244,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3 } } - // force all views to repaint, using the new options + // force all views to repaint, using the new options SfxViewShell* pViewShell = SfxViewShell::GetFirst(); while(pViewShell) @@ -259,7 +259,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3 ScInputHandler* pHdl = pViewSh->GetInputHandler(); if ( pHdl ) - pHdl->ForgetLastPattern(); // EditEngine BackgroundColor may change + pHdl->ForgetLastPattern(); // EditEngine BackgroundColor may change } else if ( pViewShell->ISA(ScPreviewShell) ) { @@ -272,8 +272,8 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3 } else if ( p == pCTLOptions ) { - // for all documents: set digit language for printer, recalc output factor, update row heights - SfxObjectShell* pObjSh = SfxObjectShell::GetFirst(); + // for all documents: set digit language for printer, recalc output factor, update row heights + SfxObjectShell* pObjSh = SfxObjectShell::GetFirst(); while ( pObjSh ) { if ( pObjSh->Type() == TYPE(ScDocShell) ) @@ -292,7 +292,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3 pObjSh = SfxObjectShell::GetNext( *pObjSh ); } - // for all views (table and preview): update digit language + // for all views (table and preview): update digit language SfxViewShell* pSh = SfxViewShell::GetFirst(); while ( pSh ) { @@ -300,7 +300,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3 { ScTabViewShell* pViewSh = (ScTabViewShell*)pSh; - // set ref-device for EditEngine (re-evaluates digit settings) + // set ref-device for EditEngine (re-evaluates digit settings) ScInputHandler* pHdl = GetInputHdl(pViewSh); if (pHdl) pHdl->UpdateRefDevice(); @@ -329,7 +329,7 @@ void ScModule::Notify( SfxBroadcaster&, const SfxHint& rHint ) ULONG nHintId = ((SfxSimpleHint&)rHint).GetId(); if ( nHintId == SFX_HINT_DEINITIALIZING ) { - // ConfigItems must be removed before ConfigManager + // ConfigItems must be removed before ConfigManager DeleteCfg(); } } @@ -370,7 +370,7 @@ void ScModule::DeleteCfg() //------------------------------------------------------------------ -#define TEXT_WIDTH(s) rStatusBar.GetTextWidth((s)) +#define TEXT_WIDTH(s) rStatusBar.GetTextWidth((s)) void ScModule::FillStatusBar(StatusBar& rStatusBar) { @@ -432,7 +432,7 @@ void ScModule::FillStatusBar(StatusBar& rStatusBar) //------------------------------------------------------------------ // -// von der Applikation verschoben: +// von der Applikation verschoben: // //------------------------------------------------------------------ @@ -441,8 +441,8 @@ void ScModule::Execute( SfxRequest& rReq ) SfxViewFrame* pViewFrm = SfxViewFrame::Current(); SfxBindings* pBindings = pViewFrm ? &pViewFrm->GetBindings() : NULL; - const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + const SfxItemSet* pReqArgs = rReq.GetArgs(); + USHORT nSlot = rReq.GetSlot(); switch ( nSlot ) { @@ -473,7 +473,7 @@ void ScModule::Execute( SfxRequest& rReq ) if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); else - { // Toggle + { // Toggle ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); if ( pDocSh ) bSet = !pDocSh->GetDocument()->GetDocOptions().IsAutoSpell(); @@ -496,7 +496,7 @@ void ScModule::Execute( SfxRequest& rReq ) FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue(); switch( eUnit ) { - case FUNIT_MM: // nur die Einheiten, die auch im Dialog stehen + case FUNIT_MM: // nur die Einheiten, die auch im Dialog stehen case FUNIT_CM: case FUNIT_INCH: case FUNIT_PICA: @@ -561,7 +561,7 @@ void ScModule::Execute( SfxRequest& rReq ) if (pBindings) { pBindings->Invalidate( SID_TABLE_CELL ); - pBindings->Update( SID_TABLE_CELL ); // sofort + pBindings->Update( SID_TABLE_CELL ); // sofort pBindings->Invalidate( SID_PSZ_FUNCTION ); pBindings->Update( SID_PSZ_FUNCTION ); @@ -599,10 +599,10 @@ void ScModule::Execute( SfxRequest& rReq ) ScInputHandler* pInputHandler = GetInputHdl(); if ( pInputHandler ) - pInputHandler->UpdateSpellSettings(); // EditEngine-Flags + pInputHandler->UpdateSpellSettings(); // EditEngine-Flags ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current()); if ( pViewSh ) - pViewSh->UpdateDrawTextOutliner(); // EditEngine-Flags + pViewSh->UpdateDrawTextOutliner(); // EditEngine-Flags pDocSh->SetDocumentModified(); } @@ -681,8 +681,8 @@ void ScModule::GetState( SfxItemSet& rSet ) } break; case SID_ATTR_LANGUAGE: - case ATTR_CJK_FONT_LANGUAGE: // WID for SID_ATTR_CHAR_CJK_LANGUAGE - case ATTR_CTL_FONT_LANGUAGE: // WID for SID_ATTR_CHAR_CTL_LANGUAGE + case ATTR_CJK_FONT_LANGUAGE: // WID for SID_ATTR_CHAR_CJK_LANGUAGE + case ATTR_CTL_FONT_LANGUAGE: // WID for SID_ATTR_CHAR_CTL_LANGUAGE { ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); ScDocument* pDoc = pDocSh ? pDocSh->GetDocument() : NULL; @@ -745,9 +745,9 @@ void ScModule::SetDragLink( const String& rDoc, const String& rTab, const String { ResetDragObject(); - aDragData.aLinkDoc = rDoc; + aDragData.aLinkDoc = rDoc; aDragData.aLinkTable = rTab; - aDragData.aLinkArea = rArea; + aDragData.aLinkArea = rArea; } void ScModule::SetDragJump( ScDocument* pLocalDoc, const String& rTarget, const String& rText ) @@ -771,7 +771,7 @@ void ScModule::SetClipObject( ScTransferObj* pCellObj, ScDrawTransferObj* pDrawO ScDocument* ScModule::GetClipDoc() { - // called from document + // called from document ScTransferObj* pObj = ScTransferObj::GetOwnClipboard( NULL ); if (pObj) @@ -833,7 +833,7 @@ const ScDocOptions& ScModule::GetDocOptions() return *pDocCfg; } -#ifndef LRU_MAX +#ifndef LRU_MAX #define LRU_MAX 10 #endif @@ -843,27 +843,27 @@ void ScModule::InsertEntryToLRUList(USHORT nFIndex) { const ScAppOptions& rAppOpt = GetAppOptions(); USHORT nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (USHORT)LRU_MAX ); - USHORT* pLRUListIds = rAppOpt.GetLRUFuncList(); + USHORT* pLRUListIds = rAppOpt.GetLRUFuncList(); - USHORT aIdxList[LRU_MAX]; - USHORT n = 0; - BOOL bFound = FALSE; + USHORT aIdxList[LRU_MAX]; + USHORT n = 0; + BOOL bFound = FALSE; - while ((n < LRU_MAX) && n<nLRUFuncCount) // alte Liste abklappern + while ((n < LRU_MAX) && n<nLRUFuncCount) // alte Liste abklappern { if (!bFound && (pLRUListIds[n]== nFIndex)) - bFound = TRUE; // erster! Treffer + bFound = TRUE; // erster! Treffer else if (bFound) - aIdxList[n ] = pLRUListIds[n]; // hinter Treffer kopieren + aIdxList[n ] = pLRUListIds[n]; // hinter Treffer kopieren else if ((n+1) < LRU_MAX) - aIdxList[n+1] = pLRUListIds[n]; // vor Treffer verschieben + aIdxList[n+1] = pLRUListIds[n]; // vor Treffer verschieben n++; } - if (!bFound && (n < LRU_MAX)) // Eintrag nicht gefunden? - n++; // einen mehr - aIdxList[0] = nFIndex; // Current on Top + if (!bFound && (n < LRU_MAX)) // Eintrag nicht gefunden? + n++; // einen mehr + aIdxList[0] = nFIndex; // Current on Top - ScAppOptions aNewOpts(rAppOpt); // an App melden + ScAppOptions aNewOpts(rAppOpt); // an App melden aNewOpts.SetLRUFuncList(aIdxList, n); SetAppOptions(aNewOpts); @@ -873,10 +873,10 @@ void ScModule::InsertEntryToLRUList(USHORT nFIndex) void ScModule::RecentFunctionsChanged() { - // update function list window + // update function list window USHORT nFuncListID = ScFunctionChildWindow::GetChildWindowId(); - //! notify all views + //! notify all views SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if ( pViewFrm && pViewFrm->HasChildWindow(nFuncListID) ) { @@ -1009,12 +1009,12 @@ USHORT ScModule::GetOptDigitLanguage() //------------------------------------------------------------------ // -// Optionen +// Optionen // //------------------------------------------------------------------ // -// ModifyOptions - Items aus Calc-Options-Dialog +// ModifyOptions - Items aus Calc-Options-Dialog // und SID_AUTOSPELL_CHECK // @@ -1039,23 +1039,23 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) SfxViewFrame* pViewFrm = SfxViewFrame::Current(); SfxBindings* pBindings = pViewFrm ? &pViewFrm->GetBindings() : NULL; - ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current()); - ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); - ScDocument* pDoc = pDocSh ? pDocSh->GetDocument() : NULL; - const SfxPoolItem* pItem = NULL; - BOOL bRepaint = FALSE; - BOOL bUpdateMarks = FALSE; - BOOL bUpdateRefDev = FALSE; - BOOL bCalcAll = FALSE; - BOOL bSaveSpellCheck = FALSE; - BOOL bSaveAppOptions = FALSE; - BOOL bSaveInputOptions = FALSE; + ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current()); + ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); + ScDocument* pDoc = pDocSh ? pDocSh->GetDocument() : NULL; + const SfxPoolItem* pItem = NULL; + BOOL bRepaint = FALSE; + BOOL bUpdateMarks = FALSE; + BOOL bUpdateRefDev = FALSE; + BOOL bCalcAll = FALSE; + BOOL bSaveSpellCheck = FALSE; + BOOL bSaveAppOptions = FALSE; + BOOL bSaveInputOptions = FALSE; //-------------------------------------------------------------------------- // SFX_APP()->SetOptions( rOptSet ); - // Linguistik nicht mehr + // Linguistik nicht mehr if ( IS_AVAILABLE(SID_ATTR_METRIC,pItem) ) { @@ -1086,15 +1086,15 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if ( pViewSh ) { - ScViewData* pViewData = pViewSh->GetViewData(); - const ScViewOptions& rOldOpt = pViewData->GetOptions(); + ScViewData* pViewData = pViewSh->GetViewData(); + const ScViewOptions& rOldOpt = pViewData->GetOptions(); BOOL bAnchorList = ( rOldOpt.GetOption( VOPT_ANCHOR ) != rNewOpt.GetOption( VOPT_ANCHOR ) ); if ( rOldOpt != rNewOpt ) { - pViewData->SetOptions( rNewOpt ); // veraendert rOldOpt + pViewData->SetOptions( rNewOpt ); // veraendert rOldOpt pViewData->GetDocument()->SetViewOptions( rNewOpt ); pDocSh->SetDocumentModified(); bRepaint = TRUE; @@ -1118,8 +1118,8 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if ( pViewSh ) { - ScViewData* pViewData = pViewSh->GetViewData(); - ScViewOptions aNewViewOpt( pViewData->GetOptions() ); + ScViewData* pViewData = pViewSh->GetViewData(); + ScViewOptions aNewViewOpt( pViewData->GetOptions() ); const ScGridOptions& rOldGridOpt = aNewViewOpt.GetGridOptions(); if ( rOldGridOpt != aNewGridOpt ) @@ -1148,7 +1148,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if ( IS_AVAILABLE(SID_SCDOCOPTIONS,pItem) ) { - const ScDocOptions& rNewOpt = ((const ScTpCalcItem*)pItem)->GetDocOptions(); + const ScDocOptions& rNewOpt = ((const ScTpCalcItem*)pItem)->GetDocOptions(); if ( pDoc ) { @@ -1168,7 +1168,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) || (rNewOpt.IsCalcAsShown() && rOldOpt.GetStdPrecision() != rNewOpt.GetStdPrecision()) || rOldOpt.IsMatchWholeCell() != rNewOpt.IsMatchWholeCell() - || rOldOpt.GetYear2000() != rNewOpt.GetYear2000() + || rOldOpt.GetYear2000() != rNewOpt.GetYear2000() || rOldOpt.IsFormulaRegexEnabled() != rNewOpt.IsFormulaRegexEnabled() ); pDoc->SetDocOptions( rNewOpt ); @@ -1196,9 +1196,9 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) } } - // AutoSpell nach den Doc-Options (weil Member) + // AutoSpell nach den Doc-Options (weil Member) - if ( IS_AVAILABLE(SID_AUTOSPELL_CHECK,pItem) ) // an Doc-Options + if ( IS_AVAILABLE(SID_AUTOSPELL_CHECK,pItem) ) // an Doc-Options { BOOL bDoAutoSpell = ((const SfxBoolItem*)pItem)->GetValue(); @@ -1211,18 +1211,18 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) pDoc->SetDocOptions( aNewOpt ); if (bDoAutoSpell) - pDoc->SetOnlineSpellPos( ScAddress(0,0,0) ); // vorne anfangen + pDoc->SetOnlineSpellPos( ScAddress(0,0,0) ); // vorne anfangen else { WaitObject aWait( pDocSh->GetActiveDialogParent() ); - pDoc->RemoveAutoSpellObj(); // Edit-Text-Objekte wieder zurueckwandeln + pDoc->RemoveAutoSpellObj(); // Edit-Text-Objekte wieder zurueckwandeln } //#92038#; don't set document modified, because this flag is no longer saved -// pDocSh->SetDocumentModified(); +// pDocSh->SetDocumentModified(); - bRepaint = TRUE; // weil HideAutoSpell evtl. ungueltig - //! alle Views painten ??? + bRepaint = TRUE; // weil HideAutoSpell evtl. ungueltig + //! alle Views painten ??? } } @@ -1232,12 +1232,12 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) bSaveSpellCheck = TRUE; } if ( pDocSh ) - pDocSh->PostPaintGridAll(); // wegen Markierungen + pDocSh->PostPaintGridAll(); // wegen Markierungen ScInputHandler* pInputHandler = GetInputHdl(); if ( pInputHandler ) - pInputHandler->UpdateSpellSettings(); // EditEngine-Flags + pInputHandler->UpdateSpellSettings(); // EditEngine-Flags if ( pViewSh ) - pViewSh->UpdateDrawTextOutliner(); // EditEngine-Flags + pViewSh->UpdateDrawTextOutliner(); // EditEngine-Flags if (pBindings) pBindings->Invalidate( SID_AUTOSPELL_CHECK ); @@ -1308,17 +1308,17 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) const ScPrintOptions& rNewOpt = ((const ScTpPrintItem*)pItem)->GetPrintOptions(); SetPrintOptions( rNewOpt ); - // broadcast causes all previews to recalc page numbers + // broadcast causes all previews to recalc page numbers SFX_APP()->Broadcast( SfxSimpleHint( SID_SCPRINTOPTIONS ) ); } //---------------------------------------------------------- -// if ( bSaveSpellCheck ) -// { - // currently LinguProperties are saved only at program exit. - // if a save method becomes available, it should be called here. -// } +// if ( bSaveSpellCheck ) +// { + // currently LinguProperties are saved only at program exit. + // if a save method becomes available, it should be called here. +// } if ( bSaveAppOptions ) pAppCfg->OptionsChanged(); @@ -1364,8 +1364,8 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if ( bUpdateRefDev ) { - // for all documents: recalc output factor, update row heights - SfxObjectShell* pObjSh = SfxObjectShell::GetFirst(); + // for all documents: recalc output factor, update row heights + SfxObjectShell* pObjSh = SfxObjectShell::GetFirst(); while ( pObjSh ) { if ( pObjSh->Type() == TYPE(ScDocShell) ) @@ -1379,23 +1379,23 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) pObjSh = SfxObjectShell::GetNext( *pObjSh ); } - // for all (tab-) views: + // for all (tab-) views: TypeId aScType = TYPE(ScTabViewShell); SfxViewShell* pSh = SfxViewShell::GetFirst( &aScType ); while ( pSh ) { ScTabViewShell* pOneViewSh = (ScTabViewShell*)pSh; - // set ref-device for EditEngine + // set ref-device for EditEngine ScInputHandler* pHdl = GetInputHdl(pOneViewSh); if (pHdl) pHdl->UpdateRefDevice(); - // update view scale + // update view scale ScViewData* pViewData = pOneViewSh->GetViewData(); pOneViewSh->SetZoom( pViewData->GetZoomX(), pViewData->GetZoomY(), FALSE ); - // repaint + // repaint pOneViewSh->PaintGrid(); pOneViewSh->PaintTop(); pOneViewSh->PaintLeft(); @@ -1409,7 +1409,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) //------------------------------------------------------------------ // -// Input-Handler +// Input-Handler // //------------------------------------------------------------------ @@ -1430,9 +1430,9 @@ ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, BOOL bUseRef ) } if ( pViewSh ) - pHdl = pViewSh->GetInputHandler(); // Viewshell hat jetzt immer einen + pHdl = pViewSh->GetInputHandler(); // Viewshell hat jetzt immer einen - // #57989# wenn keine ViewShell uebergeben oder aktiv, kann NULL herauskommen + // #57989# wenn keine ViewShell uebergeben oder aktiv, kann NULL herauskommen DBG_ASSERT( pHdl || !pViewSh, "GetInputHdl: kein InputHandler gefunden" ); return pHdl; } @@ -1472,7 +1472,7 @@ BOOL ScModule::InputKeyEvent( const KeyEvent& rKEvt, BOOL bStartEdit ) void ScModule::InputEnterHandler( BYTE nBlockMode ) { - if ( !SFX_APP()->IsDowning() ) // nicht beim Programmende + if ( !SFX_APP()->IsDowning() ) // nicht beim Programmende { ScInputHandler* pHdl = GetInputHdl(); if (pHdl) @@ -1519,7 +1519,7 @@ ScInputHandler* ScModule::GetRefInputHdl() } //------------------------------------------------------------------------ -// Olk's Krempel: +// Olk's Krempel: void ScModule::InputGetSelection( xub_StrLen& rStart, xub_StrLen& rEnd ) { @@ -1568,7 +1568,7 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix ) BYTE nMode = bMatrix ? SC_ENTER_MATRIX : SC_ENTER_NORMAL; pHdl->EnterHandler( nMode ); - // ohne Invalidate bleibt die Selektion stehen, wenn die Formel unveraendert ist + // ohne Invalidate bleibt die Selektion stehen, wenn die Formel unveraendert ist if (pWin) pWin->TextInvalidate(); } @@ -1587,14 +1587,14 @@ void ScModule::ActivateInputWindow( const String* pStrFormula, BOOL bMatrix ) //------------------------------------------------------------------ // -// Referenz - Dialoge +// Referenz - Dialoge // //------------------------------------------------------------------ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm ) { - //! move reference dialog handling to view - //! (only keep function autopilot here for references to other documents) + //! move reference dialog handling to view + //! (only keep function autopilot here for references to other documents) if(nCurRefDlgId==0 || (nId==nCurRefDlgId && !bVis)) { @@ -1604,13 +1604,13 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm ) // #79379# bindings update causes problems with update of stylist if // current style family has changed //if ( pViewFrm ) - // pViewFrm->GetBindings().Update(); // to avoid trouble in LockDispatcher + // pViewFrm->GetBindings().Update(); // to avoid trouble in LockDispatcher - nCurRefDlgId = bVis ? nId : 0 ; // before SetChildWindow + nCurRefDlgId = bVis ? nId : 0 ; // before SetChildWindow if ( pViewFrm ) { - // store the dialog id also in the view shell + // store the dialog id also in the view shell SfxViewShell* pViewSh = pViewFrm->GetViewShell(); if ( pViewSh && pViewSh->ISA( ScTabViewShell ) ) ((ScTabViewShell*)pViewSh)->SetCurRefDlgId( nCurRefDlgId ); @@ -1631,34 +1631,34 @@ void ScModule::SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm ) SfxChildWindow* lcl_GetChildWinFromAnyView( USHORT nId ) { - // first try the current view + // first try the current view SfxViewFrame* pViewFrm = SfxViewFrame::Current(); // #i46999# current view frame can be null (for example, when closing help) SfxChildWindow* pChildWnd = pViewFrm ? pViewFrm->GetChildWindow( nId ) : NULL; if ( pChildWnd ) - return pChildWnd; // found in the current view + return pChildWnd; // found in the current view - // if not found there, get the child window from any open view - // it can be open only in one view because nCurRefDlgId is global + // if not found there, get the child window from any open view + // it can be open only in one view because nCurRefDlgId is global pViewFrm = SfxViewFrame::GetFirst(); while ( pViewFrm ) { pChildWnd = pViewFrm->GetChildWindow( nId ); if ( pChildWnd ) - return pChildWnd; // found in any view + return pChildWnd; // found in any view pViewFrm = SfxViewFrame::GetNext( *pViewFrm ); } - return NULL; // none found + return NULL; // none found } BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh) { - //! move reference dialog handling to view - //! (only keep function autopilot here for references to other documents) + //! move reference dialog handling to view + //! (only keep function autopilot here for references to other documents) BOOL bIsModal = FALSE; @@ -1674,13 +1674,13 @@ BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh) else { // in 592 and above, the dialog isn't visible in other views - // if the dialog is open but can't be accessed, disable input + // if the dialog is open but can't be accessed, disable input bIsModal = TRUE; } - // pChildWnd kann 0 sein, wenn der Dialog nach dem Umschalten - // von einer anderen Shell noch nicht erzeugt wurde (z.B. in GetFocus) + // pChildWnd kann 0 sein, wenn der Dialog nach dem Umschalten + // von einer anderen Shell noch nicht erzeugt wurde (z.B. in GetFocus) } else if (pDocSh) { @@ -1694,12 +1694,12 @@ BOOL ScModule::IsModalMode(SfxObjectShell* pDocSh) BOOL ScModule::IsTableLocked() { - //! move reference dialog handling to view - //! (only keep function autopilot here for references to other documents) + //! move reference dialog handling to view + //! (only keep function autopilot here for references to other documents) BOOL bLocked = FALSE; - // bisher nur bei ScAnyRefDlg + // bisher nur bei ScAnyRefDlg if ( nCurRefDlgId ) { @@ -1707,7 +1707,7 @@ BOOL ScModule::IsTableLocked() if ( pChildWnd ) bLocked = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow())->IsTableLocked(); else - bLocked = TRUE; // for other views, see IsModalMode + bLocked = TRUE; // for other views, see IsModalMode } return bLocked; @@ -1715,8 +1715,8 @@ BOOL ScModule::IsTableLocked() BOOL ScModule::IsRefDialogOpen() { - //! move reference dialog handling to view - //! (only keep function autopilot here for references to other documents) + //! move reference dialog handling to view + //! (only keep function autopilot here for references to other documents) BOOL bIsOpen = FALSE; @@ -1726,7 +1726,7 @@ BOOL ScModule::IsRefDialogOpen() if ( pChildWnd ) bIsOpen = pChildWnd->IsVisible(); else - bIsOpen = TRUE; // for other views, see IsModalMode + bIsOpen = TRUE; // for other views, see IsModalMode } return bIsOpen; @@ -1734,8 +1734,8 @@ BOOL ScModule::IsRefDialogOpen() BOOL ScModule::IsFormulaMode() { - //! move reference dialog handling to view - //! (only keep function autopilot here for references to other documents) + //! move reference dialog handling to view + //! (only keep function autopilot here for references to other documents) BOOL bIsFormula = FALSE; @@ -1780,14 +1780,14 @@ void lcl_MarkedTabs( const ScMarkData& rMark, SCTAB& rStartTab, SCTAB& rEndTab ) void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc, const ScMarkData* pMarkData ) { - //! move reference dialog handling to view - //! (only keep function autopilot here for references to other documents) + //! move reference dialog handling to view + //! (only keep function autopilot here for references to other documents) - // in Ref-Dialogen wird hiermit auch das Zoom-In ausgeloest, - // wenn Start und Ende der Ref unterschiedlich sind + // in Ref-Dialogen wird hiermit auch das Zoom-In ausgeloest, + // wenn Start und Ende der Ref unterschiedlich sind ScRange aNew = rRef; - aNew.Justify(); // immer "richtig herum" + aNew.Justify(); // immer "richtig herum" if( nCurRefDlgId ) { @@ -1806,8 +1806,8 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc, IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()); - // hide the (color) selection now instead of later from LoseFocus, - // don't abort the ref input that causes this call (bDoneRefMode = FALSE) + // hide the (color) selection now instead of later from LoseFocus, + // don't abort the ref input that causes this call (bDoneRefMode = FALSE) pRefDlg->HideReference( FALSE ); pRefDlg->SetReference( aNew, pDoc ); } @@ -1824,10 +1824,10 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc, } } -void ScModule::AddRefEntry() // "Mehrfachselektion" +void ScModule::AddRefEntry() // "Mehrfachselektion" { - //! move reference dialog handling to view - //! (only keep function autopilot here for references to other documents) + //! move reference dialog handling to view + //! (only keep function autopilot here for references to other documents) if ( nCurRefDlgId ) { @@ -1849,12 +1849,12 @@ void ScModule::AddRefEntry() // "Mehrfachselektion" void ScModule::EndReference() { - //! move reference dialog handling to view - //! (only keep function autopilot here for references to other documents) + //! move reference dialog handling to view + //! (only keep function autopilot here for references to other documents) - // in Ref-Dialogen wird hiermit auch das Zoom-In wieder aufgehoben + // in Ref-Dialogen wird hiermit auch das Zoom-In wieder aufgehoben - //! ShowRefFrame am InputHdl, wenn der Funktions-AP offen ist ??? + //! ShowRefFrame am InputHdl, wenn der Funktions-AP offen ist ??? if ( nCurRefDlgId ) { @@ -1870,7 +1870,7 @@ void ScModule::EndReference() //------------------------------------------------------------------ // -// Idle / Online-Spelling +// Idle / Online-Spelling // //------------------------------------------------------------------ @@ -1900,7 +1900,7 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG ) { if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD ) ) { - aIdleTimer.Start(); // Timeout unveraendert + aIdleTimer.Start(); // Timeout unveraendert return 0; } @@ -1914,12 +1914,12 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG ) BOOL bWidth = pDoc->IdleCalcTextWidth(); BOOL bSpell = pDoc->ContinueOnlineSpelling(); if ( bSpell ) - aSpellTimer.Start(); // da ist noch was + aSpellTimer.Start(); // da ist noch was - bMore = bLinks || bWidth || bSpell; // ueberhaupt noch was? + bMore = bLinks || bWidth || bSpell; // ueberhaupt noch was? - // While calculating a Basic formula, a paint event may have occured, - // so check the bNeedsRepaint flags for this document's views + // While calculating a Basic formula, a paint event may have occured, + // so check the bNeedsRepaint flags for this document's views if (bWidth) lcl_CheckNeedsRepaint( pDocSh ); } @@ -1933,7 +1933,7 @@ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG ) } else { - // SC_IDLE_COUNT mal mit initialem Timeout, dann hochzaehlen + // SC_IDLE_COUNT mal mit initialem Timeout, dann hochzaehlen if ( nIdleCount < SC_IDLE_COUNT ) ++nIdleCount; @@ -1956,7 +1956,7 @@ IMPL_LINK( ScModule, SpellTimerHdl, Timer*, EMPTYARG ) if ( Application::AnyInput( INPUT_KEYBOARD ) ) { aSpellTimer.Start(); - return 0; // dann spaeter wieder... + return 0; // dann spaeter wieder... } ScDocShell* pDocSh = PTR_CAST( ScDocShell, SfxObjectShell::Current() ); @@ -1970,46 +1970,46 @@ IMPL_LINK( ScModule, SpellTimerHdl, Timer*, EMPTYARG ) } //virtuelle Methoden fuer den Optionendialog -SfxItemSet* ScModule::CreateItemSet( USHORT nId ) +SfxItemSet* ScModule::CreateItemSet( USHORT nId ) { - SfxItemSet* pRet = 0; + SfxItemSet* pRet = 0; if(SID_SC_EDITOPTIONS == nId) { pRet = new SfxItemSet( GetPool(), // TP_CALC: - SID_SCDOCOPTIONS, SID_SCDOCOPTIONS, + SID_SCDOCOPTIONS, SID_SCDOCOPTIONS, // TP_VIEW: - SID_SCVIEWOPTIONS, SID_SCVIEWOPTIONS, + SID_SCVIEWOPTIONS, SID_SCVIEWOPTIONS, SID_SC_OPT_SYNCZOOM, SID_SC_OPT_SYNCZOOM, // TP_INPUT: SID_SC_INPUT_SELECTION,SID_SC_INPUT_MARK_HEADER, SID_SC_INPUT_TEXTWYSIWYG,SID_SC_INPUT_TEXTWYSIWYG, SID_SC_INPUT_REPLCELLSWARN,SID_SC_INPUT_REPLCELLSWARN, // TP_USERLISTS: - SCITEM_USERLIST, SCITEM_USERLIST, + SCITEM_USERLIST, SCITEM_USERLIST, // TP_PRINT: - SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS, + SID_SCPRINTOPTIONS, SID_SCPRINTOPTIONS, // TP_GRID: SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS, // - SID_ATTR_METRIC, SID_ATTR_METRIC, - SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP, + SID_ATTR_METRIC, SID_ATTR_METRIC, + SID_ATTR_DEFTABSTOP, SID_ATTR_DEFTABSTOP, 0 ); - ScDocShell* pDocSh = PTR_CAST(ScDocShell, + ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current()); - ScDocOptions aCalcOpt = pDocSh + ScDocOptions aCalcOpt = pDocSh ? pDocSh->GetDocument()->GetDocOptions() : GetDocOptions(); ScTabViewShell* pViewSh = PTR_CAST(ScTabViewShell, SfxViewShell::Current()); - ScViewOptions aViewOpt = pViewSh + ScViewOptions aViewOpt = pViewSh ? pViewSh->GetViewData()->GetOptions() : GetViewOptions(); - ScUserListItem aULItem( SCITEM_USERLIST ); - ScUserList* pUL = ScGlobal::GetUserList(); + ScUserListItem aULItem( SCITEM_USERLIST ); + ScUserList* pUL = ScGlobal::GetUserList(); // SFX_APP()->GetOptions( aSet ); @@ -2071,7 +2071,7 @@ void ScModule::ApplyItemSet( USHORT nId, const SfxItemSet& rSet ) } } -SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet ) +SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet ) { SfxTabPage* pRet = NULL; ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); @@ -2092,7 +2092,7 @@ SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItem pRet = (*ScTpContentOptionsCreate)(pParent, rSet); } break; - case SID_SC_TP_GRID: pRet = SvxGridTabPage::Create(pParent, rSet); break; + case SID_SC_TP_GRID: pRet = SvxGridTabPage::Create(pParent, rSet); break; case SID_SC_TP_USERLISTS: { ::CreateTabPage ScTpUserListsCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_USERLISTS ); @@ -2123,14 +2123,14 @@ SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItem break; case SID_SC_TP_CHANGES: { - ::CreateTabPage ScRedlineOptionsTabPageCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_OPREDLINE ); + ::CreateTabPage ScRedlineOptionsTabPageCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_OPREDLINE ); if ( ScRedlineOptionsTabPageCreate ) pRet =(*ScRedlineOptionsTabPageCreate)(pParent, rSet); } break; case RID_SC_TP_PRINT: { - ::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_PRINT ); + ::CreateTabPage ScTpPrintOptionsCreate = pFact->GetTabPageCreatorFunc( RID_SCPAGE_PRINT ); if ( ScTpPrintOptionsCreate ) pRet = (*ScTpPrintOptionsCreate)( pParent, rSet); } @@ -2156,7 +2156,7 @@ SfxTabPage* ScModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItem IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo ) { - //! mit ScFieldEditEngine zusammenfassen !!! + //! mit ScFieldEditEngine zusammenfassen !!! if (pInfo) { diff --git a/sc/source/ui/app/scmod2.cxx b/sc/source/ui/app/scmod2.cxx index 246d204038ae..390d9c29ad55 100644 --- a/sc/source/ui/app/scmod2.cxx +++ b/sc/source/ui/app/scmod2.cxx @@ -2,7 +2,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 @@ -46,7 +46,7 @@ using namespace com::sun::star; //------------------------------------------------------------------ -#define LINGUPROP_AUTOSPELL "IsSpellAuto" +#define LINGUPROP_AUTOSPELL "IsSpellAuto" //------------------------------------------------------------------ @@ -54,8 +54,8 @@ using namespace com::sun::star; void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCtlLang, BOOL& rAutoSpell ) { - // use SvtLinguConfig instead of service LinguProperties to avoid - // loading the linguistic component + // use SvtLinguConfig instead of service LinguProperties to avoid + // loading the linguistic component SvtLinguConfig aConfig; SvtLinguOptions aOptions; @@ -70,8 +70,8 @@ void ScModule::GetSpellSettings( USHORT& rDefLang, USHORT& rCjkLang, USHORT& rCt // static void ScModule::SetAutoSpellProperty( BOOL bSet ) { - // use SvtLinguConfig instead of service LinguProperties to avoid - // loading the linguistic component + // use SvtLinguConfig instead of service LinguProperties to avoid + // loading the linguistic component SvtLinguConfig aConfig; uno::Any aAny; diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index 1866008f6782..74356ed46188 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -2,7 +2,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 @@ -47,7 +47,7 @@ #include "transobj.hxx" #include "drwtrans.hxx" #include "scmod.hxx" -#include "dbfunc.hxx" // for CopyToClip +#include "dbfunc.hxx" // for CopyToClip #include "docsh.hxx" #include "drawview.hxx" #include "drwlayer.hxx" @@ -97,7 +97,7 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView SdrView* pSdrView = pView->GetSdrView(); if ( pSdrView ) { - // handle selection on drawing layer + // handle selection on drawing layer const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); ULONG nMarkCount = rMarkList.GetMarkCount(); if ( nMarkCount ) @@ -121,23 +121,23 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView } if ( eMode == SC_SELTRANS_INVALID ) - eMode = SC_SELTRANS_DRAW_OTHER; // something selected but no special selection + eMode = SC_SELTRANS_DRAW_OTHER; // something selected but no special selection } } - if ( eMode == SC_SELTRANS_INVALID ) // no drawing object selected + if ( eMode == SC_SELTRANS_INVALID ) // no drawing object selected { ScRange aRange; ScViewData* pViewData = pView->GetViewData(); const ScMarkData& rMark = pViewData->GetMarkData(); - // allow MultiMarked because GetSimpleArea may be able to merge into a simple range - // (GetSimpleArea modifies a local copy of MarkData) + // allow MultiMarked because GetSimpleArea may be able to merge into a simple range + // (GetSimpleArea modifies a local copy of MarkData) // Also allow simple filtered area. ScMarkType eMarkType; if ( ( rMark.IsMarked() || rMark.IsMultiMarked() ) && (((eMarkType = pViewData->GetSimpleArea( aRange )) == SC_MARK_SIMPLE) || (eMarkType == SC_MARK_SIMPLE_FILTERED)) ) { - // only for "real" selection, cursor alone isn't used + // only for "real" selection, cursor alone isn't used if ( aRange.aStart == aRange.aEnd ) eMode = SC_SELTRANS_CELL; else @@ -159,7 +159,7 @@ ScSelectionTransferObj::ScSelectionTransferObj( ScTabView* pSource, ScSelectionT pCellData( NULL ), pDrawData( NULL ) { - //! store range for StillValid + //! store range for StillValid } ScSelectionTransferObj::~ScSelectionTransferObj() @@ -167,8 +167,8 @@ ScSelectionTransferObj::~ScSelectionTransferObj() ScModule* pScMod = SC_MOD(); if ( pScMod->GetSelectionTransfer() == this ) { - // this is reached when the object wasn't really copied to the selection - // (CopyToSelection has no effect under Windows) + // this is reached when the object wasn't really copied to the selection + // (CopyToSelection has no effect under Windows) ForgetView(); pScMod->SetSelectionTransfer( NULL ); @@ -179,8 +179,8 @@ ScSelectionTransferObj::~ScSelectionTransferObj() BOOL ScSelectionTransferObj::StillValid() { - //! check if view still has same cell selection - //! (but return FALSE if data has changed inbetween) + //! check if view still has same cell selection + //! (but return FALSE if data has changed inbetween) return FALSE; } @@ -203,14 +203,14 @@ void ScSelectionTransferObj::ForgetView() void ScSelectionTransferObj::AddSupportedFormats() { - // AddSupportedFormats must work without actually creating the - // "real" transfer object + // AddSupportedFormats must work without actually creating the + // "real" transfer object switch (eMode) { case SC_SELTRANS_CELL: case SC_SELTRANS_CELLS: - // same formats as in ScTransferObj::AddSupportedFormats + // same formats as in ScTransferObj::AddSupportedFormats AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( SOT_FORMAT_GDIMETAFILE ); @@ -257,7 +257,7 @@ void ScSelectionTransferObj::AddSupportedFormats() break; case SC_SELTRANS_DRAW_OTHER: - // other drawing objects + // other drawing objects AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ); AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ); AddFormat( SOT_FORMATSTR_ID_DRAWING ); @@ -278,10 +278,10 @@ void ScSelectionTransferObj::CreateCellData() if ( pView ) { ScViewData* pViewData = pView->GetViewData(); - ScMarkData aNewMark( pViewData->GetMarkData() ); // use local copy for MarkToSimple + ScMarkData aNewMark( pViewData->GetMarkData() ); // use local copy for MarkToSimple aNewMark.MarkToSimple(); - // similar to ScViewFunctionSet::BeginDrag + // similar to ScViewFunctionSet::BeginDrag if ( aNewMark.IsMarked() && !aNewMark.IsMultiMarked() ) { ScDocShell* pDocSh = pViewData->GetDocShell(); @@ -291,7 +291,7 @@ void ScSelectionTransferObj::CreateCellData() ScDocShellRef aDragShellRef; if ( pDocSh->GetDocument()->HasOLEObjectsInArea( aSelRange, &aNewMark ) ) { - aDragShellRef = new ScDocShell; // DocShell needs a Ref immediately + aDragShellRef = new ScDocShell; // DocShell needs a Ref immediately aDragShellRef->DoInitNew(NULL); } ScDrawLayer::SetGlobalDrawPersist(aDragShellRef); @@ -318,12 +318,12 @@ void ScSelectionTransferObj::CreateCellData() //? pTransferObj->SetVisibleTab( nTab ); SfxObjectShellRef aPersistRef( aDragShellRef ); - pTransferObj->SetDrawPersist( aPersistRef ); // keep persist for ole objects alive + pTransferObj->SetDrawPersist( aPersistRef ); // keep persist for ole objects alive pTransferObj->SetDragSource( pDocSh, aNewMark ); pCellData = pTransferObj; - pCellData->acquire(); // keep ref count up - released in ForgetView + pCellData->acquire(); // keep ref count up - released in ForgetView } else delete pClipDoc; @@ -332,7 +332,7 @@ void ScSelectionTransferObj::CreateCellData() DBG_ASSERT( pCellData, "can't create CellData" ); } -//! make static member of ScDrawView +//! make static member of ScDrawView extern void lcl_CheckOle( const SdrMarkList& rMarkList, BOOL& rAnyOle, BOOL& rOneOle ); void ScSelectionTransferObj::CreateDrawData() @@ -340,7 +340,7 @@ void ScSelectionTransferObj::CreateDrawData() DBG_ASSERT( !pDrawData, "CreateDrawData twice" ); if ( pView ) { - // similar to ScDrawView::BeginDrag + // similar to ScDrawView::BeginDrag ScDrawView* pDrawView = pView->GetScDrawView(); if ( pDrawView ) @@ -353,7 +353,7 @@ void ScSelectionTransferObj::CreateDrawData() ScDocShellRef aDragShellRef; if (bAnyOle) { - aDragShellRef = new ScDocShell; // ohne Ref lebt die DocShell nicht !!! + aDragShellRef = new ScDocShell; // ohne Ref lebt die DocShell nicht !!! aDragShellRef->DoInitNew(NULL); } //--------------------------------------------------------- @@ -374,11 +374,11 @@ void ScSelectionTransferObj::CreateDrawData() uno::Reference<datatransfer::XTransferable> xTransferable( pTransferObj ); SfxObjectShellRef aPersistRef( aDragShellRef ); - pTransferObj->SetDrawPersist( aPersistRef ); // keep persist for ole objects alive - pTransferObj->SetDragSource( pDrawView ); // copies selection + pTransferObj->SetDrawPersist( aPersistRef ); // keep persist for ole objects alive + pTransferObj->SetDragSource( pDrawView ); // copies selection pDrawData = pTransferObj; - pDrawData->acquire(); // keep ref count up - released in ForgetView + pDrawData->acquire(); // keep ref count up - released in ForgetView } } DBG_ASSERT( pDrawData, "can't create DrawData" ); @@ -436,7 +436,7 @@ sal_Bool ScSelectionTransferObj::GetData( const ::com::sun::star::datatransfer:: void ScSelectionTransferObj::ObjectReleased() { - // called when another selection is set from outside + // called when another selection is set from outside ForgetView(); diff --git a/sc/source/ui/app/template.cxx b/sc/source/ui/app/template.cxx index edb30ff6468d..afec56dd0a9c 100644 --- a/sc/source/ui/app/template.cxx +++ b/sc/source/ui/app/template.cxx @@ -2,7 +2,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 diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 906a0f3e150a..d2978210361b 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -2,7 +2,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 @@ -78,10 +78,10 @@ using namespace com::sun::star; // ----------------------------------------------------------------------- -#define SCTRANS_TYPE_IMPEX 1 -#define SCTRANS_TYPE_EDIT_RTF 2 -#define SCTRANS_TYPE_EDIT_BIN 3 -#define SCTRANS_TYPE_EMBOBJ 4 +#define SCTRANS_TYPE_IMPEX 1 +#define SCTRANS_TYPE_EDIT_RTF 2 +#define SCTRANS_TYPE_EDIT_BIN 3 +#define SCTRANS_TYPE_EMBOBJ 4 // ----------------------------------------------------------------------- @@ -115,7 +115,7 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPr return; Point aPoint; - Rectangle aBound( aPoint, pDev->GetOutputSize() ); //! use size from clip area? + Rectangle aBound( aPoint, pDev->GetOutputSize() ); //! use size from clip area? ScViewData aViewData(NULL,NULL); aViewData.InitData( pDoc ); @@ -149,14 +149,14 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc SCCOL nCol2; SCROW nRow2; pDoc->GetClipStart( nCol1, nRow1 ); - pDoc->GetClipArea( nCol2, nRow2, TRUE ); // real source area - include filtered rows + pDoc->GetClipArea( nCol2, nRow2, TRUE ); // real source area - include filtered rows nCol2 = sal::static_int_cast<SCCOL>( nCol2 + nCol1 ); nRow2 = sal::static_int_cast<SCROW>( nRow2 + nRow1 ); SCCOL nDummy; pDoc->GetClipArea( nDummy, nNonFiltered, FALSE ); bHasFiltered = (nNonFiltered < (nRow2 - nRow1)); - ++nNonFiltered; // to get count instead of diff + ++nNonFiltered; // to get count instead of diff SCTAB nTab1=0; SCTAB nTab2=0; @@ -171,8 +171,8 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc } DBG_ASSERT(!bFirst, "no sheet selected"); - // only limit to used cells if whole sheet was marked - // (so empty cell areas can be copied) + // only limit to used cells if whole sheet was marked + // (so empty cell areas can be copied) if ( nCol2>=MAXCOL && nRow2>=MAXROW ) { SCROW nMaxRow; @@ -185,7 +185,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc } aBlock = ScRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); - nVisibleTab = nTab1; // valid table as default + nVisibleTab = nTab1; // valid table as default Rectangle aMMRect = pDoc->GetMMRect( nCol1,nRow1, nCol2,nRow2, nTab1 ); aObjDesc.maSize = aMMRect.GetSize(); @@ -208,9 +208,9 @@ ScTransferObj::~ScTransferObj() pScMod->ResetDragObject(); } - delete pDoc; // ScTransferObj is owner of clipboard document + delete pDoc; // ScTransferObj is owner of clipboard document - aDocShellRef.Clear(); // before releasing the mutex + aDocShellRef.Clear(); // before releasing the mutex aDrawPersistRef.Clear(); // after the model @@ -222,16 +222,16 @@ ScTransferObj* ScTransferObj::GetOwnClipboard( Window* pUIWin ) ScTransferObj* pObj = SC_MOD()->GetClipData().pCellClipboard; if ( pObj && pUIWin ) { - // check formats to see if pObj is really in the system clipboard + // check formats to see if pObj is really in the system clipboard - // pUIWin is NULL when called from core (IsClipboardSource), - // in that case don't access the system clipboard, because the call - // may be from other clipboard operations (like flushing, #86059#) + // pUIWin is NULL when called from core (IsClipboardSource), + // in that case don't access the system clipboard, because the call + // may be from other clipboard operations (like flushing, #86059#) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pUIWin ) ); if ( !aDataHelper.HasFormat( SOT_FORMATSTR_ID_DIF ) ) { -// DBG_ERROR("ScTransferObj wasn't released"); +// DBG_ERROR("ScTransferObj wasn't released"); pObj = NULL; } } @@ -259,8 +259,8 @@ void ScTransferObj::AddSupportedFormats() sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) { - sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); - sal_Bool bOK = sal_False; + sal_uInt32 nFormat = SotExchange::GetFormat( rFlavor ); + sal_Bool bOK = sal_False; if( HasFormat( nFormat ) ) { @@ -271,7 +271,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) else if ( ( nFormat == SOT_FORMAT_RTF || nFormat == SOT_FORMATSTR_ID_EDITENGINE ) && aBlock.aStart == aBlock.aEnd ) { - // RTF from a single cell is handled by EditEngine + // RTF from a single cell is handled by EditEngine SCCOL nCol = aBlock.aStart.Col(); SCROW nRow = aBlock.aStart.Row(); @@ -303,8 +303,8 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) } else if ( ScImportExport::IsFormatSupported( nFormat ) || nFormat == SOT_FORMAT_RTF ) { - // if this transfer object was used to create a DDE link, filtered rows - // have to be included for subsequent calls (to be consistent with link data) + // if this transfer object was used to create a DDE link, filtered rows + // have to be included for subsequent calls (to be consistent with link data) if ( nFormat == SOT_FORMATSTR_ID_LINK ) bUsedForLink = TRUE; @@ -316,7 +316,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) aObj.SetFormulas( pDoc->GetViewOptions().GetOption( VOPT_FORMULAS ) ); aObj.SetIncludeFiltered( bIncludeFiltered ); - // DataType depends on format type: + // DataType depends on format type: if ( rFlavor.DataType.equals( ::getCppuType( (const ::rtl::OUString*) 0 ) ) ) { @@ -326,7 +326,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) } else if ( rFlavor.DataType.equals( ::getCppuType( (const uno::Sequence< sal_Int8 >*) 0 ) ) ) { - // SetObject converts a stream into a Int8-Sequence + // SetObject converts a stream into a Int8-Sequence bOK = SetObject( &aObj, SCTRANS_TYPE_IMPEX, rFlavor ); } else @@ -355,10 +355,10 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) // like SvEmbeddedTransfer::GetData: - GDIMetaFile aMtf; - VirtualDevice aVDev; - MapMode aMapMode( pEmbObj->GetMapUnit() ); - Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) ); + GDIMetaFile aMtf; + VirtualDevice aVDev; + MapMode aMapMode( pEmbObj->GetMapUnit() ); + Rectangle aVisArea( pEmbObj->GetVisArea( ASPECT_CONTENT ) ); aVDev.EnableOutput( FALSE ); aVDev.SetMapMode( aMapMode ); @@ -376,7 +376,7 @@ sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor& rFlavor ) else if ( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE ) { //TODO/LATER: differentiate between formats?! - InitDocShell(); // set aDocShellRef + InitDocShell(); // set aDocShellRef SfxObjectShell* pEmbObj = aDocShellRef; bOK = SetObject( pEmbObj, SCTRANS_TYPE_EMBOBJ, rFlavor ); @@ -415,9 +415,9 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj } else { - // #107722# can't use Write for EditEngine format because that would - // write old format without support for unicode characters. - // Get the data from the EditEngine's transferable instead. + // #107722# can't use Write for EditEngine format because that would + // write old format without support for unicode characters. + // Get the data from the EditEngine's transferable instead. USHORT nParCnt = pEngine->GetParagraphCount(); if ( nParCnt == 0 ) @@ -488,13 +488,13 @@ void ScTransferObj::DragFinished( sal_Int8 nDropAction ) { if ( nDropAction == DND_ACTION_MOVE && !bDragWasInternal && !(nDragSourceFlags & SC_DROP_NAVIGATOR) ) { - // move: delete source data + // move: delete source data ScDocShell* pSourceSh = GetSourceDocShell(); if (pSourceSh) { ScMarkData aMarkData = GetSourceMarkData(); - // external drag&drop doesn't copy objects, so they also aren't deleted: - // #105703# bApi=TRUE, don't show error messages from drag&drop + // external drag&drop doesn't copy objects, so they also aren't deleted: + // #105703# bApi=TRUE, don't show error messages from drag&drop pSourceSh->GetDocFunc().DeleteContents( aMarkData, IDF_ALL & ~IDF_OBJECTS, TRUE, TRUE ); } } @@ -503,7 +503,7 @@ void ScTransferObj::DragFinished( sal_Int8 nDropAction ) if ( pScMod->GetDragData().pCellTransfer == this ) pScMod->ResetDragObject(); - xDragSourceRanges = NULL; // don't keep source after dropping + xDragSourceRanges = NULL; // don't keep source after dropping TransferableHelper::DragFinished( nDropAction ); } @@ -555,7 +555,7 @@ ScDocShell* ScTransferObj::GetSourceDocShell() if (pRangesObj) return pRangesObj->GetDocShell(); - return NULL; // none set + return NULL; // none set } ScMarkData ScTransferObj::GetSourceMarkData() @@ -571,7 +571,7 @@ ScMarkData ScTransferObj::GetSourceMarkData() } // -// initialize aDocShellRef with a live document from the ClipDoc +// initialize aDocShellRef with a live document from the ClipDoc // void ScTransferObj::InitDocShell() @@ -579,7 +579,7 @@ void ScTransferObj::InitDocShell() if ( !aDocShellRef.Is() ) { ScDocShell* pDocSh = new ScDocShell; - aDocShellRef = pDocSh; // ref must be there before InitNew + aDocShellRef = pDocSh; // ref must be there before InitNew pDocSh->DoInitNew(NULL); @@ -591,7 +591,7 @@ void ScTransferObj::InitDocShell() String aTabName; pDoc->GetName( aBlock.aStart.Tab(), aTabName ); - pDestDoc->RenameTab( 0, aTabName, FALSE ); // no UpdateRef (empty) + pDestDoc->RenameTab( 0, aTabName, FALSE ); // no UpdateRef (empty) pDestDoc->CopyStdStylesFrom( pDoc ); @@ -600,8 +600,8 @@ void ScTransferObj::InitDocShell() SCCOL nEndX = aBlock.aEnd.Col(); SCROW nEndY = aBlock.aEnd.Row(); - // widths / heights - // (must be copied before CopyFromClip, for drawing objects) + // widths / heights + // (must be copied before CopyFromClip, for drawing objects) SCCOL nCol, nLastCol; SCTAB nSrcTab = aBlock.aStart.Tab(); @@ -625,7 +625,7 @@ void ScTransferObj::InitDocShell() { pDestDoc->SetRowHeight( nRow, 0, pDoc->GetOriginalHeight( nRow, nSrcTab ) ); - // if height was set manually, that flag has to be copied, too + // if height was set manually, that flag has to be copied, too if ( nSourceFlags & CR_MANUALSIZE ) rDestRowFlags.OrValue( nRow, CR_MANUALSIZE); } @@ -634,14 +634,14 @@ void ScTransferObj::InitDocShell() if ( pDoc->GetDrawLayer() ) pDocSh->MakeDrawLayer(); - // cell range is copied to the original position, but on the first sheet - // -> bCutMode must be set - // pDoc is always a Clipboard-document + // cell range is copied to the original position, but on the first sheet + // -> bCutMode must be set + // pDoc is always a Clipboard-document ScRange aDestRange( nStartX,nStartY,0, nEndX,nEndY,0 ); BOOL bWasCut = pDoc->IsCutMode(); if (!bWasCut) - pDoc->SetClipArea( aDestRange, TRUE ); // Cut + pDoc->SetClipArea( aDestRange, TRUE ); // Cut pDestDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL, NULL, pDoc, FALSE ); pDoc->SetClipArea( aDestRange, bWasCut ); @@ -650,11 +650,11 @@ void ScTransferObj::InitDocShell() ScRange aMergeRange = aDestRange; pDestDoc->ExtendMerge( aMergeRange, TRUE ); - pDoc->CopyDdeLinks( pDestDoc ); // copy values of DDE Links + pDoc->CopyDdeLinks( pDestDoc ); // copy values of DDE Links - // page format (grid etc) and page size (maximum size for ole object) + // page format (grid etc) and page size (maximum size for ole object) - Size aPaperSize = SvxPaperInfo::GetPaperSize( PAPER_A4 ); // Twips + Size aPaperSize = SvxPaperInfo::GetPaperSize( PAPER_A4 ); // Twips ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); String aStyleName = pDoc->GetPageStyle( aBlock.aStart.Tab() ); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE ); @@ -663,7 +663,7 @@ void ScTransferObj::InitDocShell() const SfxItemSet& rSourceSet = pStyleSheet->GetItemSet(); aPaperSize = ((const SvxSizeItem&) rSourceSet.Get(ATTR_PAGE_SIZE)).GetSize(); - // CopyStyleFrom kopiert SetItems mit richtigem Pool + // CopyStyleFrom kopiert SetItems mit richtigem Pool ScStyleSheetPool* pDestPool = pDestDoc->GetStyleSheetPool(); pDestPool->CopyStyleFrom( pStylePool, aStyleName, SFX_STYLE_FAMILY_PAGE ); } @@ -675,7 +675,7 @@ void ScTransferObj::InitDocShell() pDestDoc->SetViewOptions( pDoc->GetViewOptions() ); - // Size + // Size //! get while copying sizes long nPosX = 0; @@ -688,7 +688,7 @@ void ScTransferObj::InitDocShell() nPosY = (long) ( nPosY * HMM_PER_TWIPS ); - aPaperSize.Width() *= 2; // limit OLE object to double of page size + aPaperSize.Width() *= 2; // limit OLE object to double of page size aPaperSize.Height() *= 2; long nSizeX = 0; @@ -696,21 +696,21 @@ void ScTransferObj::InitDocShell() for (nCol=nStartX; nCol<=nEndX; nCol++) { long nAdd = pDestDoc->GetColWidth( nCol, 0 ); - if ( nSizeX+nAdd > aPaperSize.Width() && nSizeX ) // above limit? + if ( nSizeX+nAdd > aPaperSize.Width() && nSizeX ) // above limit? break; nSizeX += nAdd; } for (SCROW nRow=nStartY; nRow<=nEndY; nRow++) { long nAdd = pDestDoc->GetRowHeight( nRow, 0 ); - if ( nSizeY+nAdd > aPaperSize.Height() && nSizeY ) // above limit? + if ( nSizeY+nAdd > aPaperSize.Height() && nSizeY ) // above limit? break; nSizeY += nAdd; } nSizeX = (long) ( nSizeX * HMM_PER_TWIPS ); nSizeY = (long) ( nSizeY * HMM_PER_TWIPS ); -// pDocSh->SetVisAreaSize( Size(nSizeX,nSizeY) ); +// pDocSh->SetVisAreaSize( Size(nSizeX,nSizeY) ); Rectangle aNewArea( Point(nPosX,nPosY), Size(nSizeX,nSizeY) ); //TODO/LATER: why twice?! @@ -719,13 +719,13 @@ void ScTransferObj::InitDocShell() pDocSh->UpdateOle(&aViewData, TRUE); - //! SetDocumentModified? + //! SetDocumentModified? if ( pDestDoc->IsChartListenerCollectionNeedsUpdate() ) pDestDoc->UpdateChartListenerCollection(); } } -// static +// static SfxObjectShell* ScTransferObj::SetDrawClipDoc( BOOL bAnyOle ) { // update ScGlobal::pDrawClipDocShellRef @@ -745,7 +745,7 @@ SfxObjectShell* ScTransferObj::SetDrawClipDoc( BOOL bAnyOle ) } } -// static +// static void ScTransferObj::StripRefs( ScDocument* pDoc, SCCOL nStartX, SCROW nStartY, SCCOL nEndX, SCROW nEndY, ScDocument* pDestDoc, SCCOL nSubX, SCROW nSubY ) @@ -756,7 +756,7 @@ void ScTransferObj::StripRefs( ScDocument* pDoc, DBG_ASSERT(nSubX==0&&nSubY==0, "can't move within the document"); } - // In a clipboard doc the data don't have to be on the first sheet + // In a clipboard doc the data don't have to be on the first sheet SCTAB nSrcTab = 0; while (nSrcTab<MAXTAB && !pDoc->HasTable(nSrcTab)) @@ -822,7 +822,7 @@ void ScTransferObj::StripRefs( ScDocument* pDoc, } pDestDoc->PutCell( nCol,nRow,nDestTab, pNew ); - // number formats + // number formats ULONG nOldFormat = ((const SfxUInt32Item*) pDestDoc->GetAttr(nCol,nRow,nDestTab, ATTR_VALUE_FORMAT))->GetValue(); diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx index 10c35fde833f..97a004e0b3ed 100644 --- a/sc/source/ui/app/typemap.cxx +++ b/sc/source/ui/app/typemap.cxx @@ -2,7 +2,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 @@ -36,7 +36,7 @@ #include <editeng/memberids.hrc> -#define ITEMID_DBTYPE 0 +#define ITEMID_DBTYPE 0 @@ -130,7 +130,7 @@ #define SvxDrawToolItem SfxAllEnumItem #define SvxDrawAlignItem SfxAllEnumItem -#define SvxChooseControlItem SfxEnumItem +#define SvxChooseControlItem SfxEnumItem #define avmedia_MediaItem ::avmedia::MediaItem #define SFX_TYPEMAP diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx index 4148b96675c6..2d3472263ee6 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -2,7 +2,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 @@ -45,14 +45,14 @@ TYPEINIT1(ScQueryItem, SfxPoolItem); TYPEINIT1(ScSubTotalItem, SfxPoolItem); TYPEINIT1(ScUserListItem, SfxPoolItem); TYPEINIT1(ScConsolidateItem, SfxPoolItem); -TYPEINIT1(ScPivotItem, SfxPoolItem); -TYPEINIT1(ScSolveItem, SfxPoolItem); -TYPEINIT1(ScTabOpItem, SfxPoolItem); -TYPEINIT1(ScCondFrmtItem, SfxPoolItem); +TYPEINIT1(ScPivotItem, SfxPoolItem); +TYPEINIT1(ScSolveItem, SfxPoolItem); +TYPEINIT1(ScTabOpItem, SfxPoolItem); +TYPEINIT1(ScCondFrmtItem, SfxPoolItem); -TYPEINIT1(ScTablesHint, SfxHint); -TYPEINIT1(ScEditViewHint, SfxHint); -TYPEINIT1(ScIndexHint, SfxHint); +TYPEINIT1(ScTablesHint, SfxHint); +TYPEINIT1(ScEditViewHint, SfxHint); +TYPEINIT1(ScIndexHint, SfxHint); // ----------------------------------------------------------------------- // ScInputStatusItem - Status-Update fuer Eingabezeile @@ -65,21 +65,21 @@ ScInputStatusItem::ScInputStatusItem( USHORT nWhichP, const String& rString, const EditTextObject* pData ) : SfxPoolItem ( nWhichP ), - 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 ) { } ScInputStatusItem::ScInputStatusItem( const ScInputStatusItem& rItem ) - : SfxPoolItem ( rItem ), - aCursorPos ( rItem.aCursorPos ), - aStartPos ( rItem.aStartPos ), - aEndPos ( rItem.aEndPos ), - aString ( rItem.aString ), - pEditData ( rItem.pEditData ? rItem.pEditData->Clone() : NULL ) + : SfxPoolItem ( rItem ), + aCursorPos ( rItem.aCursorPos ), + aStartPos ( rItem.aStartPos ), + aEndPos ( rItem.aEndPos ), + aString ( rItem.aString ), + pEditData ( rItem.pEditData ? rItem.pEditData->Clone() : NULL ) { } @@ -97,11 +97,11 @@ int __EXPORT ScInputStatusItem::operator==( const SfxPoolItem& rItem ) const { DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); - return ( (aStartPos == ((ScInputStatusItem&)rItem).aStartPos) - && (aEndPos == ((ScInputStatusItem&)rItem).aEndPos) - && (aCursorPos == ((ScInputStatusItem&)rItem).aCursorPos) - && (aString == ((ScInputStatusItem&)rItem).aString) ); - //! Edit-Daten vergleichen! + return ( (aStartPos == ((ScInputStatusItem&)rItem).aStartPos) + && (aEndPos == ((ScInputStatusItem&)rItem).aEndPos) + && (aCursorPos == ((ScInputStatusItem&)rItem).aCursorPos) + && (aString == ((ScInputStatusItem&)rItem).aString) ); + //! Edit-Daten vergleichen! } SfxPoolItem* __EXPORT ScInputStatusItem::Clone( SfxItemPool * ) const @@ -110,11 +110,11 @@ SfxPoolItem* __EXPORT ScInputStatusItem::Clone( SfxItemPool * ) const } // -// ScPaintHint ist nach schints.cxx verschoben +// ScPaintHint ist nach schints.cxx verschoben // // ----------------------------------------------------------------------- -// ScTablesHint - Views anpassen, wenn Tabellen eingefuegt / geloescht +// ScTablesHint - Views anpassen, wenn Tabellen eingefuegt / geloescht // ----------------------------------------------------------------------- ScTablesHint::ScTablesHint(USHORT nNewId, SCTAB nTable1, SCTAB nTable2) : @@ -130,7 +130,7 @@ ScTablesHint::~ScTablesHint() // ----------------------------------------------------------------------- -// ScIndexHint +// ScIndexHint // ----------------------------------------------------------------------- ScIndexHint::ScIndexHint(USHORT nNewId, USHORT nIdx) : @@ -238,7 +238,7 @@ ScQueryItem::ScQueryItem( USHORT nWhichP, const ScQueryParam* pQueryData ) : SfxPoolItem ( nWhichP ), pViewData ( ptrViewData ), - bIsAdvanced ( FALSE ) + bIsAdvanced ( FALSE ) { if ( pQueryData ) theQueryData = *pQueryData; } @@ -249,7 +249,7 @@ ScQueryItem::ScQueryItem( USHORT nWhichP, const ScQueryParam* pQueryData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ), - bIsAdvanced ( FALSE ) + bIsAdvanced ( FALSE ) { if ( pQueryData ) theQueryData = *pQueryData; } @@ -260,8 +260,8 @@ ScQueryItem::ScQueryItem( const ScQueryItem& rItem ) : SfxPoolItem ( rItem ), pViewData ( rItem.pViewData ), theQueryData( rItem.theQueryData ), - bIsAdvanced ( rItem.bIsAdvanced ), - aAdvSource ( rItem.aAdvSource ) + bIsAdvanced ( rItem.bIsAdvanced ), + aAdvSource ( rItem.aAdvSource ) { } @@ -321,8 +321,8 @@ SfxPoolItem* __EXPORT ScQueryItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, - ScViewData* ptrViewData, - const ScSubTotalParam* pSubTotalData ) : + ScViewData* ptrViewData, + const ScSubTotalParam* pSubTotalData ) : SfxPoolItem ( nWhichP ), pViewData ( ptrViewData ) { @@ -332,7 +332,7 @@ ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, //------------------------------------------------------------------------ ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, - const ScSubTotalParam* pSubTotalData ) : + const ScSubTotalParam* pSubTotalData ) : SfxPoolItem ( nWhichP ), pViewData ( NULL ) { @@ -342,9 +342,9 @@ ScSubTotalItem::ScSubTotalItem( USHORT nWhichP, //------------------------------------------------------------------------ ScSubTotalItem::ScSubTotalItem( const ScSubTotalItem& rItem ) : - SfxPoolItem ( rItem ), - pViewData ( rItem.pViewData ), - theSubTotalData ( rItem.theSubTotalData ) + SfxPoolItem ( rItem ), + pViewData ( rItem.pViewData ), + theSubTotalData ( rItem.theSubTotalData ) { } @@ -367,7 +367,7 @@ int __EXPORT ScSubTotalItem::operator==( const SfxPoolItem& rItem ) const const ScSubTotalItem& rSTItem = (const ScSubTotalItem&)rItem; - return ( (pViewData == rSTItem.pViewData) + return ( (pViewData == rSTItem.pViewData) && (theSubTotalData == rSTItem.theSubTotalData) ); } @@ -393,14 +393,14 @@ bool ScSubTotalItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /* nMember ScUserListItem::ScUserListItem( USHORT nWhichP ) : SfxPoolItem ( nWhichP ), - pUserList ( NULL ) + pUserList ( NULL ) { } //------------------------------------------------------------------------ ScUserListItem::ScUserListItem( const ScUserListItem& rItem ) - : SfxPoolItem ( rItem ) + : SfxPoolItem ( rItem ) { if ( rItem.pUserList ) pUserList = new ScUserList( *(rItem.pUserList) ); @@ -459,7 +459,7 @@ void ScUserListItem::SetUserList( const ScUserList& rUserList ) ScConsolidateItem::ScConsolidateItem( USHORT nWhichP, - const ScConsolidateParam* pConsolidateData ) : + const ScConsolidateParam* pConsolidateData ) : SfxPoolItem ( nWhichP ) { if ( pConsolidateData ) theConsData = *pConsolidateData; @@ -468,8 +468,8 @@ ScConsolidateItem::ScConsolidateItem( //------------------------------------------------------------------------ ScConsolidateItem::ScConsolidateItem( const ScConsolidateItem& rItem ) : - SfxPoolItem ( rItem ), - theConsData ( rItem.theConsData ) + SfxPoolItem ( rItem ), + theConsData ( rItem.theConsData ) { } @@ -513,7 +513,7 @@ ScPivotItem::ScPivotItem( USHORT nWhichP, const ScDPSaveData* pData, const ScRange* pRange, BOOL bNew ) : SfxPoolItem ( nWhichP ) { - // pSaveData must always exist + // pSaveData must always exist if ( pData ) pSaveData = new ScDPSaveData(*pData); else @@ -525,9 +525,9 @@ ScPivotItem::ScPivotItem( USHORT nWhichP, const ScDPSaveData* pData, //------------------------------------------------------------------------ ScPivotItem::ScPivotItem( const ScPivotItem& rItem ) : - SfxPoolItem ( rItem ), - aDestRange ( rItem.aDestRange ), - bNewSheet ( rItem.bNewSheet ) + SfxPoolItem ( rItem ), + aDestRange ( rItem.aDestRange ), + bNewSheet ( rItem.bNewSheet ) { DBG_ASSERT(rItem.pSaveData, "pSaveData"); pSaveData = new ScDPSaveData(*rItem.pSaveData); @@ -573,7 +573,7 @@ SfxPoolItem* __EXPORT ScPivotItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- ScSolveItem::ScSolveItem( USHORT nWhichP, - const ScSolveParam* pSolveData ) + const ScSolveParam* pSolveData ) : SfxPoolItem ( nWhichP ) { if ( pSolveData ) theSolveData = *pSolveData; @@ -582,8 +582,8 @@ ScSolveItem::ScSolveItem( USHORT nWhichP, //------------------------------------------------------------------------ ScSolveItem::ScSolveItem( const ScSolveItem& rItem ) - : SfxPoolItem ( rItem ), - theSolveData ( rItem.theSolveData ) + : SfxPoolItem ( rItem ), + theSolveData ( rItem.theSolveData ) { } @@ -623,7 +623,7 @@ SfxPoolItem* __EXPORT ScSolveItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- ScTabOpItem::ScTabOpItem( USHORT nWhichP, - const ScTabOpParam* pTabOpData ) + const ScTabOpParam* pTabOpData ) : SfxPoolItem ( nWhichP ) { if ( pTabOpData ) theTabOpData = *pTabOpData; @@ -632,8 +632,8 @@ ScTabOpItem::ScTabOpItem( USHORT nWhichP, //------------------------------------------------------------------------ ScTabOpItem::ScTabOpItem( const ScTabOpItem& rItem ) - : SfxPoolItem ( rItem ), - theTabOpData ( rItem.theTabOpData ) + : SfxPoolItem ( rItem ), + theTabOpData ( rItem.theTabOpData ) { } @@ -674,18 +674,18 @@ SfxPoolItem* __EXPORT ScTabOpItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- ScCondFrmtItem::ScCondFrmtItem( USHORT nWhichP, -//! const ScConditionalFormat* pCondFrmt ) +//! const ScConditionalFormat* pCondFrmt ) const ScConditionalFormat& rCondFrmt ) : SfxPoolItem ( nWhichP ), - theCondFrmtData ( rCondFrmt ) //! + theCondFrmtData ( rCondFrmt ) //! { -//! if ( pCondFrmt ) theCondFrmtData = *pCondFrmt; +//! if ( pCondFrmt ) theCondFrmtData = *pCondFrmt; } //------------------------------------------------------------------------ ScCondFrmtItem::ScCondFrmtItem( const ScCondFrmtItem& rItem ) - : SfxPoolItem ( rItem ), + : SfxPoolItem ( rItem ), theCondFrmtData ( rItem.theCondFrmtData ) { } diff --git a/sc/source/ui/app/wtcdummy.cxx b/sc/source/ui/app/wtcdummy.cxx index 055a37a644f4..c1f5eed9b82d 100644 --- a/sc/source/ui/app/wtcdummy.cxx +++ b/sc/source/ui/app/wtcdummy.cxx @@ -2,7 +2,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 |