diff options
Diffstat (limited to 'sc/source/ui/view/tabview2.cxx')
-rw-r--r-- | sc/source/ui/view/tabview2.cxx | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index a3692828c10f..a42cb4667c1a 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.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 @@ -62,9 +62,9 @@ #include "scmod.hxx" #include "tabprotection.hxx" -#define SC_BLOCKMODE_NONE 0 -#define SC_BLOCKMODE_NORMAL 1 -#define SC_BLOCKMODE_OWN 2 +#define SC_BLOCKMODE_NONE 0 +#define SC_BLOCKMODE_NORMAL 1 +#define SC_BLOCKMODE_OWN 2 @@ -104,14 +104,14 @@ void ScTabView::InitOwnBlockMode() { if (!bIsBlockMode) { - // Wenn keine (alte) Markierung mehr da ist, Anker in SelectionEngine loeschen: + // Wenn keine (alte) Markierung mehr da ist, Anker in SelectionEngine loeschen: ScMarkData& rMark = aViewData.GetMarkData(); if (!rMark.IsMarked() && !rMark.IsMultiMarked()) GetSelEngine()->CursorPosChanging( FALSE, FALSE ); -// bIsBlockMode = TRUE; - bIsBlockMode = SC_BLOCKMODE_OWN; //! Variable umbenennen! +// bIsBlockMode = TRUE; + bIsBlockMode = SC_BLOCKMODE_OWN; //! Variable umbenennen! nBlockStartX = 0; nBlockStartY = 0; nBlockStartZ = 0; @@ -119,7 +119,7 @@ void ScTabView::InitOwnBlockMode() nBlockEndY = 0; nBlockEndZ = 0; - SelectionChanged(); // Status wird mit gesetzer Markierung abgefragt + SelectionChanged(); // Status wird mit gesetzer Markierung abgefragt } } @@ -134,7 +134,7 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScMarkData& rMark = aViewData.GetMarkData(); SCTAB nTab = aViewData.GetTabNo(); - // Teil von Markierung aufheben? + // Teil von Markierung aufheben? if (bTestNeg) { if ( bCols ) @@ -148,8 +148,8 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, bBlockNeg = FALSE; rMark.SetMarkNegative(bBlockNeg); -// bIsBlockMode = TRUE; - bIsBlockMode = SC_BLOCKMODE_NORMAL; //! Variable umbenennen! +// bIsBlockMode = TRUE; + bIsBlockMode = SC_BLOCKMODE_NORMAL; //! Variable umbenennen! bBlockCols = bCols; bBlockRows = bRows; nBlockStartX = nBlockStartXOrig = nCurX; @@ -182,9 +182,9 @@ void ScTabView::InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE { - // Wenn zwischen Tabellen- und Header SelectionEngine gewechselt wird, - // wird evtl. DeselectAll gerufen, weil die andere Engine keinen Anker hat. - // Mit bMoveIsShift wird verhindert, dass dann die Selektion aufgehoben wird. + // Wenn zwischen Tabellen- und Header SelectionEngine gewechselt wird, + // wird evtl. DeselectAll gerufen, weil die andere Engine keinen Anker hat. + // Mit bMoveIsShift wird verhindert, dass dann die Selektion aufgehoben wird. if (bIsBlockMode && !bMoveIsShift) { @@ -199,19 +199,19 @@ void ScTabView::DoneBlockMode( BOOL bContinue ) // Default FALSE rMark.MarkToMulti(); else { - // Die Tabelle kann an dieser Stelle ungueltig sein, weil DoneBlockMode - // aus SetTabNo aufgerufen wird - // (z.B. wenn die aktuelle Tabelle von einer anderen View aus geloescht wird) + // Die Tabelle kann an dieser Stelle ungueltig sein, weil DoneBlockMode + // aus SetTabNo aufgerufen wird + // (z.B. wenn die aktuelle Tabelle von einer anderen View aus geloescht wird) SCTAB nTab = aViewData.GetTabNo(); ScDocument* pDoc = aViewData.GetDocument(); if ( pDoc->HasTable(nTab) ) - PaintBlock( TRUE ); // TRUE -> Block loeschen + PaintBlock( TRUE ); // TRUE -> Block loeschen else rMark.ResetMark(); } -// bIsBlockMode = FALSE; - bIsBlockMode = SC_BLOCKMODE_NONE; //! Variable umbenennen! +// bIsBlockMode = FALSE; + bIsBlockMode = SC_BLOCKMODE_NONE; //! Variable umbenennen! rMark.SetMarking(bFlag); rMark.SetMarkNegative(FALSE); @@ -243,13 +243,13 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ( aMarkRange.aStart.Row() != nBlockStartY && aMarkRange.aEnd.Row() != nBlockStartY ) || ( bIsBlockMode == SC_BLOCKMODE_OWN )) { - // Markierung ist veraendert worden - // (z.B. MarkToSimple, wenn per negativ alles bis auf ein Rechteck geloescht wurde) - // oder nach InitOwnBlockMode wird mit Shift-Klick weitermarkiert... + // Markierung ist veraendert worden + // (z.B. MarkToSimple, wenn per negativ alles bis auf ein Rechteck geloescht wurde) + // oder nach InitOwnBlockMode wird mit Shift-Klick weitermarkiert... BOOL bOldShift = bMoveIsShift; - bMoveIsShift = FALSE; // wirklich umsetzen - DoneBlockMode(FALSE); //! direkt Variablen setzen? (-> kein Geflacker) + bMoveIsShift = FALSE; // wirklich umsetzen + DoneBlockMode(FALSE); //! direkt Variablen setzen? (-> kein Geflacker) bMoveIsShift = bOldShift; InitBlockMode( aMarkRange.aStart.Col(), aMarkRange.aStart.Row(), @@ -263,13 +263,13 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, { // Current cursor has moved - SCTAB nTab = nCurZ; + SCTAB nTab = nCurZ; #ifdef OLD_SELECTION_PAINT - SCCOL nDrawStartCol; - SCROW nDrawStartRow; - SCCOL nDrawEndCol; - SCROW nDrawEndRow; + SCCOL nDrawStartCol; + SCROW nDrawStartRow; + SCCOL nDrawEndCol; + SCROW nDrawEndRow; #endif // Set old selection area @@ -380,8 +380,8 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, nDrawEndCol, nDrawEndRow, bCont ); if ( bDraw ) { -//? PutInOrder( nDrawStartCol, nDrawEndCol ); -//? PutInOrder( nDrawStartRow, nDrawEndRow ); +//? PutInOrder( nDrawStartCol, nDrawEndCol ); +//? PutInOrder( nDrawStartRow, nDrawEndRow ); HideAllCursors(); InvertBlockMark( nDrawStartCol, nDrawStartRow, nDrawEndCol, nDrawEndRow ); @@ -399,7 +399,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, nOldCurY = nCurY; aViewData.GetViewShell()->UpdateInputHandler(); -// InvalidateAttribs(); +// InvalidateAttribs(); } if ( !bCols && !bRows ) @@ -884,7 +884,7 @@ void ScTabView::UpdateAllOverlays() } //! -//! PaintBlock in zwei Methoden aufteilen: RepaintBlock und RemoveBlock o.ae. +//! PaintBlock in zwei Methoden aufteilen: RepaintBlock und RemoveBlock o.ae. //! void ScTabView::PaintBlock( BOOL bReset ) @@ -948,7 +948,7 @@ void ScTabView::PaintBlock( BOOL bReset ) #ifdef OLD_SELECTION_PAINT // (mis)use InvertBlockMark to remove all of the selection // -> set bBlockNeg (like when removing parts of a selection) - // and convert everything to Multi + // and convert everything to Multi rMark.MarkToMulti(); BOOL bOld = bBlockNeg; @@ -966,7 +966,7 @@ void ScTabView::PaintBlock( BOOL bReset ) bDidReset = TRUE; } - // repaint if controls are touched (#69680# in both cases) + // repaint if controls are touched (#69680# in both cases) // #i74768# Forms are rendered by DrawingLayer's EndDrawLayers() static bool bSuppressControlExtraStuff(true); @@ -979,7 +979,7 @@ void ScTabView::PaintBlock( BOOL bReset ) { if (pGridWin[i] && pGridWin[i]->IsVisible()) { - // MapMode muss logischer (1/100mm) sein !!! + // MapMode muss logischer (1/100mm) sein !!! pDoc->InvalidateControls( pGridWin[i], nTab, aMMRect ); pGridWin[i]->Update(); } @@ -1031,8 +1031,8 @@ void ScTabView::SelectAllTables() for (SCTAB i=0; i<nCount; i++) rMark.SelectTable( i, TRUE ); - // Markierungen werden per Default nicht pro Tabelle gehalten -// pDoc->ExtendMarksFromTable( nTab ); + // Markierungen werden per Default nicht pro Tabelle gehalten +// pDoc->ExtendMarksFromTable( nTab ); aViewData.GetDocShell()->PostPaintExtras(); SfxBindings& rBind = aViewData.GetBindings(); @@ -1070,7 +1070,7 @@ BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom, SCCOL nCol; for (nCol=0; nCol<nFixPosX; nCol++) { - // for frozen panes, add both parts + // for frozen panes, add both parts USHORT nColTwips = pDoc->GetColWidth( nCol, nTab ); if (nColTwips) { @@ -1096,7 +1096,7 @@ BOOL lcl_FitsInWindow( double fScaleX, double fScaleY, USHORT nZoom, if (pDoc->RowHidden(nRow, nTab)) continue; - // for frozen panes, add both parts + // for frozen panes, add both parts USHORT nRowTwips = pDoc->GetRowHeight(nRow, nTab); if (nRowTwips) { @@ -1129,26 +1129,26 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) nZoom = nOldZoom; break; - case SVX_ZOOM_OPTIMAL: // nZoom entspricht der optimalen Gr"o\se + case SVX_ZOOM_OPTIMAL: // nZoom entspricht der optimalen Gr"o\se { ScMarkData& rMark = aViewData.GetMarkData(); ScDocument* pDoc = aViewData.GetDocument(); if (!rMark.IsMarked() && !rMark.IsMultiMarked()) - nZoom = 100; // nothing selected + nZoom = 100; // nothing selected else { - SCTAB nTab = aViewData.GetTabNo(); + SCTAB nTab = aViewData.GetTabNo(); ScRange aMarkRange; if ( aViewData.GetSimpleArea( aMarkRange ) != SC_MARK_SIMPLE ) rMark.GetMultiMarkArea( aMarkRange ); - SCCOL nStartCol = aMarkRange.aStart.Col(); - SCROW nStartRow = aMarkRange.aStart.Row(); - SCTAB nStartTab = aMarkRange.aStart.Tab(); - SCCOL nEndCol = aMarkRange.aEnd.Col(); - SCROW nEndRow = aMarkRange.aEnd.Row(); - SCTAB nEndTab = aMarkRange.aEnd.Tab(); + SCCOL nStartCol = aMarkRange.aStart.Col(); + SCROW nStartRow = aMarkRange.aStart.Row(); + SCTAB nStartTab = aMarkRange.aStart.Tab(); + SCCOL nEndCol = aMarkRange.aEnd.Col(); + SCROW nEndRow = aMarkRange.aEnd.Row(); + SCTAB nEndTab = aMarkRange.aEnd.Tab(); if ( nTab < nStartTab && nTab > nEndTab ) nTab = nStartTab; @@ -1159,7 +1159,7 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) SCROW nFixPosY = 0; if ( aViewData.GetHSplitMode() == SC_SPLIT_FIX ) { - // use right part + // use right part eUsedPart = (WhichV(eUsedPart)==SC_SPLIT_TOP) ? SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT; nFixPosX = aViewData.GetFixPosX(); if ( nStartCol < nFixPosX ) @@ -1167,7 +1167,7 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) } if ( aViewData.GetVSplitMode() == SC_SPLIT_FIX ) { - // use bottom part + // use bottom part eUsedPart = (WhichH(eUsedPart)==SC_SPLIT_LEFT) ? SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT; nFixPosY = aViewData.GetFixPosY(); if ( nStartRow < nFixPosY ) @@ -1176,12 +1176,12 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) if (pGridWin[eUsedPart]) { - // Because scale is rounded to pixels, the only reliable way to find - // the right scale is to check if a zoom fits + // Because scale is rounded to pixels, the only reliable way to find + // the right scale is to check if a zoom fits Size aWinSize = pGridWin[eUsedPart]->GetOutputSizePixel(); - // for frozen panes, use sum of both parts for calculation + // for frozen panes, use sum of both parts for calculation if ( nFixPosX != 0 ) aWinSize.Width() += GetGridWidth( SC_SPLIT_LEFT ); @@ -1223,13 +1223,13 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) } break; - case SVX_ZOOM_WHOLEPAGE: // nZoom entspricht der ganzen Seite oder - case SVX_ZOOM_PAGEWIDTH: // nZoom entspricht der Seitenbreite + case SVX_ZOOM_WHOLEPAGE: // nZoom entspricht der ganzen Seite oder + case SVX_ZOOM_PAGEWIDTH: // nZoom entspricht der Seitenbreite { - SCTAB nCurTab = aViewData.GetTabNo(); - ScDocument* pDoc = aViewData.GetDocument(); - ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); - SfxStyleSheetBase* pStyleSheet = + SCTAB nCurTab = aViewData.GetTabNo(); + ScDocument* pDoc = aViewData.GetDocument(); + ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); + SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nCurTab ), SFX_STYLE_FAMILY_PAGE ); @@ -1243,11 +1243,11 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) Size aPageSize = aPrintFunc.GetDataSize(); - // use the size of the largest GridWin for normal split, - // or both combined for frozen panes, with the (document) size - // of the frozen part added to the page size - // (with frozen panes, the size of the individual parts - // depends on the scale that is to be calculated) + // use the size of the largest GridWin for normal split, + // or both combined for frozen panes, with the (document) size + // of the frozen part added to the page size + // (with frozen panes, the size of the individual parts + // depends on the scale that is to be calculated) if ( !pGridWin[SC_SPLIT_BOTTOMLEFT] ) return 0; Size aWinSize = pGridWin[SC_SPLIT_BOTTOMLEFT]->GetOutputSizePixel(); @@ -1307,7 +1307,7 @@ USHORT ScTabView::CalcZoom( SvxZoomType eType, USHORT nOldZoom ) return nZoom; } -// wird z.B. gerufen, wenn sich das View-Fenster verschiebt: +// wird z.B. gerufen, wenn sich das View-Fenster verschiebt: void ScTabView::StopMarking() { @@ -1337,7 +1337,7 @@ void ScTabView::MakeDrawLayer() { aViewData.GetDocShell()->MakeDrawLayer(); - // pDrawView wird per Notify gesetzt + // pDrawView wird per Notify gesetzt DBG_ASSERT(pDrawView,"ScTabView::MakeDrawLayer funktioniert nicht"); // #114409# @@ -1359,7 +1359,7 @@ void ScTabView::ErrorMessage( USHORT nGlobStrId ) return; } - StopMarking(); // falls per Focus aus MouseButtonDown aufgerufen + StopMarking(); // falls per Focus aus MouseButtonDown aufgerufen Window* pParent = aViewData.GetDialogParent(); ScWaitCursorOff aWaitOff( pParent ); @@ -1413,14 +1413,14 @@ void ScTabView::UpdatePageBreakData( BOOL bForcePaint ) pNewData = new ScPageBreakData(nCount); ScPrintFunc aPrintFunc( pDocSh, pDocSh->GetPrinter(), nTab, 0,0,NULL, NULL, pNewData ); - // ScPrintFunc fuellt im ctor die PageBreakData + // ScPrintFunc fuellt im ctor die PageBreakData if ( nCount > 1 ) { aPrintFunc.ResetBreaks(nTab); pNewData->AddPages(); } - // Druckbereiche veraendert? + // Druckbereiche veraendert? if ( bForcePaint || ( pPageBreakData && !pPageBreakData->IsEqual( *pNewData ) ) ) PaintGrid(); } |