diff options
Diffstat (limited to 'sc/source/ui/view/cellsh3.cxx')
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index a57835fdf54d..c56d82691f85 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.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 @@ -53,7 +53,7 @@ #include "autoform.hxx" #include "autofmt.hxx" #include "cellsh.hxx" -#include "attrdlg.hrc" // TP_ALIGNMENT +#include "attrdlg.hrc" // TP_ALIGNMENT #include "inputhdl.hxx" #include "editable.hxx" @@ -61,34 +61,34 @@ #define IS_EDITMODE() GetViewData()->HasEditView( GetViewData()->GetActivePart() ) -inline long TwipsToHMM(long nTwips) { return (nTwips * 127 + 36) / 72; } -inline long HMMToTwips(long nHMM) { return (nHMM * 72 + 63) / 127; } -inline long TwipsToEvenHMM(long nTwips) { return ( (nTwips * 127 + 72) / 144 ) * 2; } +inline long TwipsToHMM(long nTwips) { return (nTwips * 127 + 36) / 72; } +inline long HMMToTwips(long nHMM) { return (nHMM * 72 + 63) / 127; } +inline long TwipsToEvenHMM(long nTwips) { return ( (nTwips * 127 + 72) / 144 ) * 2; } //------------------------------------------------------------------ void ScCellShell::Execute( SfxRequest& rReq ) { - ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); - SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings(); - ScModule* pScMod = SC_MOD(); - const SfxItemSet* pReqArgs = rReq.GetArgs(); - USHORT nSlot = rReq.GetSlot(); + ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); + SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings(); + ScModule* pScMod = SC_MOD(); + const SfxItemSet* pReqArgs = rReq.GetArgs(); + USHORT nSlot = rReq.GetSlot(); - if (nSlot != SID_CURRENTCELL) // der kommt beim MouseButtonUp - pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox + if (nSlot != SID_CURRENTCELL) // der kommt beim MouseButtonUp + pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox if ( IS_EDITMODE() ) { switch ( nSlot ) { - // beim Oeffnen eines Referenz-Dialogs darf die SubShell nicht umgeschaltet werden - // (beim Schliessen des Dialogs wird StopEditShell gerufen) + // beim Oeffnen eines Referenz-Dialogs darf die SubShell nicht umgeschaltet werden + // (beim Schliessen des Dialogs wird StopEditShell gerufen) case SID_OPENDLG_FUNCTION: - // #53318# inplace macht die EditShell Aerger... - //! kann nicht immer umgeschaltet werden ???? + // #53318# inplace macht die EditShell Aerger... + //! kann nicht immer umgeschaltet werden ???? if (!pTabViewShell->GetViewFrame()->GetFrame().IsInPlace()) - pTabViewShell->SetDontSwitch(TRUE); // EditShell nicht abschalten + pTabViewShell->SetDontSwitch(TRUE); // EditShell nicht abschalten // kein break case FID_CELL_FORMAT: @@ -121,16 +121,16 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_STATUS_SELMODE: if ( pReqArgs ) { - /* 0: STD Click hebt Sel auf - * 1: ER Click erweitert Selektion - * 2: ERG Click definiert weitere Selektion + /* 0: STD Click hebt Sel auf + * 1: ER Click erweitert Selektion + * 2: ERG Click definiert weitere Selektion */ UINT16 nMode = ((const SfxUInt16Item&)pReqArgs->Get( nSlot )).GetValue(); switch ( nMode ) { - case 1: nMode = KEY_SHIFT; break; - case 2: nMode = KEY_MOD1; break; // Control-Taste + case 1: nMode = KEY_SHIFT; break; + case 2: nMode = KEY_MOD1; break; // Control-Taste case 0: default: nMode = 0; @@ -140,15 +140,15 @@ void ScCellShell::Execute( SfxRequest& rReq ) } else { - // no arguments (also executed by double click on the status bar controller): - // advance to next selection mode + // no arguments (also executed by double click on the status bar controller): + // advance to next selection mode USHORT nModifiers = pTabViewShell->GetLockedModifiers(); switch ( nModifiers ) { - case KEY_SHIFT: nModifiers = KEY_MOD1; break; // EXT -> ADD - case KEY_MOD1: nModifiers = 0; break; // ADD -> STD - default: nModifiers = KEY_SHIFT; break; // STD -> EXT + case KEY_SHIFT: nModifiers = KEY_MOD1; break; // EXT -> ADD + case KEY_MOD1: nModifiers = 0; break; // ADD -> STD + default: nModifiers = KEY_SHIFT; break; // STD -> EXT } pTabViewShell->LockModifiers( nModifiers ); } @@ -157,14 +157,14 @@ void ScCellShell::Execute( SfxRequest& rReq ) rReq.Done(); break; - // SID_STATUS_SELMODE_NORM wird nicht benutzt ??? + // SID_STATUS_SELMODE_NORM wird nicht benutzt ??? case SID_STATUS_SELMODE_NORM: pTabViewShell->LockModifiers( 0 ); rBindings.Invalidate( SID_STATUS_SELMODE ); break; - // SID_STATUS_SELMODE_ERG / SID_STATUS_SELMODE_ERW als Toggles: + // SID_STATUS_SELMODE_ERG / SID_STATUS_SELMODE_ERW als Toggles: case SID_STATUS_SELMODE_ERG: if ( pTabViewShell->GetLockedModifiers() & KEY_MOD1 ) @@ -197,18 +197,18 @@ void ScCellShell::Execute( SfxRequest& rReq ) ScInputHandler* pHdl = SC_MOD()->GetInputHdl( pTabViewShell ); if ( !pHdl || !pHdl->IsInEnterHandler() ) { - // #101061# UpdateInputHandler is needed after the cell content - // has changed, but if called from EnterHandler, UpdateInputHandler - // will be called later when moving the cursor. + // #101061# UpdateInputHandler is needed after the cell content + // has changed, but if called from EnterHandler, UpdateInputHandler + // will be called later when moving the cursor. pTabViewShell->UpdateInputHandler(); } rReq.Done(); - // hier kein GrabFocus, weil sonst auf dem Mac die Tabelle vor die - // Seitenansicht springt, wenn die Eingabe nicht abgeschlossen war - // (GrabFocus passiert in KillEditView) + // hier kein GrabFocus, weil sonst auf dem Mac die Tabelle vor die + // Seitenansicht springt, wenn die Eingabe nicht abgeschlossen war + // (GrabFocus passiert in KillEditView) } } break; @@ -264,7 +264,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) aCursorPos.Tab() == GetViewData()->GetTabNo() ) { - SfxStringItem aItem( SID_ENTER_STRING, aString ); + SfxStringItem aItem( SID_ENTER_STRING, aString ); // SfxBindings& rBindings = pTabViewShell->GetViewFrame()->GetBindings(); const SfxPoolItem* aArgs[2]; @@ -294,9 +294,9 @@ void ScCellShell::Execute( SfxRequest& rReq ) } - // hier kein GrabFocus, weil sonst auf dem Mac die Tabelle vor die - // Seitenansicht springt, wenn die Eingabe nicht abgeschlossen war - // (GrabFocus passiert in KillEditView) + // hier kein GrabFocus, weil sonst auf dem Mac die Tabelle vor die + // Seitenansicht springt, wenn die Eingabe nicht abgeschlossen war + // (GrabFocus passiert in KillEditView) } break; @@ -313,7 +313,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_OPENDLG_CONSOLIDATE: { - USHORT nId = ScConsolidateDlgWrapper::GetChildWindowId(); + USHORT nId = ScConsolidateDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); @@ -328,18 +328,18 @@ void ScCellShell::Execute( SfxRequest& rReq ) //---------------------------------- // Zellattribute ohne Dialog setzen: //---------------------------------- - SfxItemSet* pEmptySet = + SfxItemSet* pEmptySet = new SfxItemSet( *pReqArgs->GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END ); - SfxItemSet* pNewSet = + SfxItemSet* pNewSet = new SfxItemSet( *pReqArgs->GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END ); - const SfxPoolItem* pAttr = NULL; - USHORT nWhich = 0; + const SfxPoolItem* pAttr = NULL; + USHORT nWhich = 0; for ( nWhich=ATTR_PATTERN_START; nWhich<=ATTR_PATTERN_END; nWhich++ ) if ( pReqArgs->GetItemState( nWhich, TRUE, &pAttr ) == SFX_ITEM_SET ) @@ -365,7 +365,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_OPENDLG_SOLVE: { - USHORT nId = ScSolverDlgWrapper::GetChildWindowId(); + USHORT nId = ScSolverDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); @@ -385,7 +385,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_OPENDLG_TABOP: { - USHORT nId = ScTabOpDlgWrapper::GetChildWindowId(); + USHORT nId = ScTabOpDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); @@ -438,8 +438,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) aBaseName += ScGlobal::GetRscString(STR_SCENARIO); aBaseName += '_'; - // vorneweg testen, ob der Prefix als gueltig erkannt wird - // wenn nicht, nur doppelte vermeiden + // vorneweg testen, ob der Prefix als gueltig erkannt wird + // wenn nicht, nur doppelte vermeiden BOOL bPrefix = pDoc->ValidTabName( aBaseName ); DBG_ASSERT(bPrefix, "ungueltiger Tabellenname"); @@ -470,8 +470,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) if ( pReqArgs->GetItemState( SID_NEW_TABLENAME, TRUE, &pItem ) == SFX_ITEM_SET ) aArgComment = ((const SfxStringItem*)pItem)->GetValue(); - aColor = Color( COL_LIGHTGRAY ); // Default - nFlags = 0; // nicht-TwoWay + aColor = Color( COL_LIGHTGRAY ); // Default + nFlags = 0; // nicht-TwoWay pTabViewShell->MakeScenario( aArgName, aArgComment, aColor, nFlags ); if( ! rReq.IsAPI() ) @@ -530,8 +530,8 @@ void ScCellShell::Execute( SfxRequest& rReq ) else { ScViewData* pData = GetViewData(); - FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric(); - USHORT nCurHeight = pData->GetDocument()-> + FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric(); + USHORT nCurHeight = pData->GetDocument()-> GetRowHeight( pData->GetCurY(), pData->GetTabNo() ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); @@ -621,9 +621,9 @@ void ScCellShell::Execute( SfxRequest& rReq ) } else { - FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric(); + FieldUnit eMetric = SC_MOD()->GetAppOptions().GetAppMetric(); ScViewData* pData = GetViewData(); - USHORT nCurHeight = pData->GetDocument()-> + USHORT nCurHeight = pData->GetDocument()-> GetColWidth( pData->GetCurX(), pData->GetTabNo() ); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); @@ -864,7 +864,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) else if (pTabViewShell->HasPaintBrush()) pTabViewShell->ResetBrushDocument(); // abort format paint brush else if (pTabViewShell->HasHintWindow()) - pTabViewShell->RemoveHintWindow(); // Eingabemeldung abschalten + pTabViewShell->RemoveHintWindow(); // Eingabemeldung abschalten else if( ScViewUtil::IsFullScreen( *pTabViewShell ) ) ScViewUtil::SetFullScreen( *pTabViewShell, false ); else @@ -880,7 +880,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) //} } -// SetSumAssignMode(); //ScInputWindow +// SetSumAssignMode(); //ScInputWindow } break; @@ -898,7 +898,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_OPENDLG_CONDFRMT: { - USHORT nId = ScCondFormatDlgWrapper::GetChildWindowId(); + USHORT nId = ScCondFormatDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame(); SfxChildWindow* pWnd = pViewFrm->GetChildWindow( nId ); @@ -906,7 +906,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) } break; - // ---------------------------------------------------------------- + // ---------------------------------------------------------------- case FID_INPUTLINE_STATUS: DBG_ERROR("Execute von InputLine-Status"); @@ -914,7 +914,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_STATUS_DOCPOS: // Launch navigator. - GetViewData()->GetDispatcher().Execute( + GetViewData()->GetDispatcher().Execute( SID_NAVIGATOR, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD ); break; |