This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch Pilot-Pirx-table
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/Pilot-Pirx-table by this push:
new 797d3d600d Additional files
797d3d600d is described below
commit 797d3d600db2557c040cf38a5c3651cb440367d5
Author: mseidel <[email protected]>
AuthorDate: Tue Jan 27 03:39:39 2026 +0100
Additional files
---
main/sc/source/ui/inc/tabview.hxx | 80 ++++++++++++-------------
main/sc/source/ui/view/tabview.cxx | 118 +++++++++++++++++--------------------
2 files changed, 92 insertions(+), 106 deletions(-)
diff --git a/main/sc/source/ui/inc/tabview.hxx
b/main/sc/source/ui/inc/tabview.hxx
index 41a61e5777..b138867687 100644
--- a/main/sc/source/ui/inc/tabview.hxx
+++ b/main/sc/source/ui/inc/tabview.hxx
@@ -19,7 +19,6 @@
*
*************************************************************/
-
#ifndef SC_TABVIEW_HXX
#define SC_TABVIEW_HXX
@@ -58,7 +57,7 @@ class SdrHdlList;
namespace com { namespace sun { namespace star {
namespace chart2 { namespace data {
- struct HighlightedRange;
+ struct HighlightedRange;
}}}}}
#define SPLIT_HANDLE_SIZE 3
@@ -85,7 +84,6 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
};
-
// ---------------------------------------------------------------------------
class ScTabView
@@ -100,7 +98,7 @@ private:
ScHeaderSelectionEngine* pHdrSelEng;
ScHeaderFunctionSet aHdrFunc;
- SfxInPlaceClient* pIPClient;
+ SfxInPlaceClient* pIPClient;
ScDrawView* pDrawView;
@@ -133,9 +131,9 @@ private:
ScPageBreakData* pPageBreakData; // fuer
Seitenumbruch-Modus
ScHighlightRanges* pHighlightRanges;
- ScDocument* pBrushDocument; // cell formats for format
paint brush
- SfxItemSet* pDrawBrushSet; // drawing object attributes
for paint brush
- sal_Bool bLockPaintBrush; // keep for more than one
use?
+ ScDocument* pBrushDocument; // cell formats for format
paint brush
+ SfxItemSet* pDrawBrushSet; // drawing object
attributes for paint brush
+ sal_Bool bLockPaintBrush; // keep for more than
one use?
Timer aScrollTimer;
ScGridWindow* pTimerWindow;
@@ -152,20 +150,20 @@ private:
sal_Bool bBlockRows;
// werden ganze Zeilen markiert?
SCCOL nBlockStartX;
- SCCOL nBlockStartXOrig;
+ SCCOL nBlockStartXOrig;
SCCOL nBlockEndX;
SCROW nBlockStartY;
- SCROW nBlockStartYOrig;
+ SCROW nBlockStartYOrig;
SCROW nBlockEndY;
SCTAB nBlockStartZ;
SCTAB nBlockEndZ;
- SCCOL nOldCurX;
- SCROW nOldCurY;
+ SCCOL nOldCurX;
+ SCROW nOldCurY;
- double mfPendingTabBarWidth; // Tab bar width relative
to frame window width.
+ double mfPendingTabBarWidth; // Tab bar width relative to
frame window width.
sal_Bool bMinimized;
sal_Bool bInUpdateHeader;
@@ -190,7 +188,7 @@ private:
void UpdateVarZoom();
- void UpdateVisibleRange();
+ void UpdateVisibleRange();
static void SetScrollBar( ScrollBar& rScroll, long
nRangeMax, long nVisible, long nPos, sal_Bool bLayoutRTL );
static long GetScrollBarPos( ScrollBar& rScroll, sal_Bool
bLayoutRTL );
@@ -230,9 +228,8 @@ public:
void RemoveHintWindow();
void TestHintWindow();
-
DECL_LINK( TabBarResize, void* );
- /** Sets an absolute tab bar width (in pixels). */
+ /** Sets an absolute tab bar width (in pixels). */
void SetTabBarWidth( long nNewWidth );
/** Sets a relative tab bar width.
@param fRelTabBarWidth Tab bar width relative to frame window width
(0.0 ... 1.0). */
@@ -285,7 +282,7 @@ public:
sal_Bool IsMinimized() const {
return bMinimized; }
- // bSameTabButMoved = true if the same sheet as before is activated, used
after moving/copying/inserting/deleting a sheet
+ // bSameTabButMoved = true if the same sheet as before is activated,
used after moving/copying/inserting/deleting a sheet
void TabChanged( bool bSameTabButMoved = false );
void SetZoom( const Fraction& rNewX, const Fraction&
rNewY, sal_Bool bAll );
SC_DLLPUBLIC void RefreshZoom();
@@ -337,8 +334,8 @@ public:
Point GetInsertPos();
- Point GetChartInsertPos( const Size& rSize, const ScRange&
rCellRange );
- Point GetChartDialogPos( const Size& rDialogSize, const
Rectangle& rLogicChart );
+ Point GetChartInsertPos( const Size& rSize, const ScRange&
rCellRange );
+ Point GetChartDialogPos( const Size& rDialogSize, const
Rectangle& rLogicChart );
void UpdateAutoFillMark();
@@ -350,13 +347,13 @@ public:
void AlignToCursor( SCsCOL nCurX, SCsROW nCurY,
ScFollowMode eMode,
const
ScSplitPos* pWhich = NULL );
- SvxZoomType GetZoomType() const;
- void SetZoomType( SvxZoomType eNew, sal_Bool bAll );
+ SvxZoomType GetZoomType() const;
+ void SetZoomType( SvxZoomType eNew, sal_Bool bAll );
sal_uInt16 CalcZoom( SvxZoomType eType, sal_uInt16
nOldZoom );
// void CalcZoom( SvxZoomType eType, sal_uInt16& rZoom,
SCCOL& rCol, SCROW& rRow );
- sal_Bool HasPageFieldDataAtCursor() const;
+ sal_Bool HasPageFieldDataAtCursor() const;
void StartDataSelect();
// MoveCursorAbs -
absolut
@@ -380,15 +377,15 @@ public:
void MoveCursorEnter( sal_Bool bShift );
// Shift fuer Richtung (kein Markieren)
- sal_Bool MoveCursorKeyInput( const KeyEvent& rKeyEvent );
+ sal_Bool MoveCursorKeyInput( const KeyEvent& rKeyEvent );
void FindNextUnprot( sal_Bool bShift, sal_Bool
bInSelection = sal_True );
void SetNewStartIfMarking();
- // bSameTabButMoved = true if the same sheet as before is activated, used
after moving/copying/inserting/deleting a sheet
- SC_DLLPUBLIC void SetTabNo( SCTAB nTab, sal_Bool bNew = sal_False,
sal_Bool bExtendSelection = sal_False, bool bSameTabButMoved = false );
- void SelectNextTab( short nDir, sal_Bool bExtendSelection =
sal_False );
+ // bSameTabButMoved = true if the same sheet as before is activated,
used after moving/copying/inserting/deleting a sheet
+ SC_DLLPUBLIC void SetTabNo( SCTAB nTab, sal_Bool bNew = sal_False,
sal_Bool bExtendSelection = sal_False, bool bSameTabButMoved = false );
+ void SelectNextTab( short nDir, sal_Bool bExtendSelection =
sal_False );
void ActivateView( sal_Bool bActivate, sal_Bool
bFirst );
void ActivatePart( ScSplitPos eWhich );
@@ -434,9 +431,9 @@ public:
void CreateAnchorHandles(SdrHdlList& rHdl, const
ScAddress& rAddress);
- void UpdateSelectionOverlay();
- void UpdateShrinkOverlay();
- void UpdateAllOverlays();
+ void UpdateSelectionOverlay();
+ void UpdateShrinkOverlay();
+ void UpdateAllOverlays();
void UpdateFormulas();
void InterpretVisible();
@@ -461,12 +458,11 @@ public:
void KillEditView( sal_Bool bNoPaint );
void UpdateEditView();
-
//
Bloecke
void SelectAll( sal_Bool bContinue = sal_False );
void SelectAllTables();
- void DeselectAllTables();
+ void DeselectAllTables();
void MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB
nCurZ,
sal_Bool bCols = sal_False, sal_Bool bRows =
sal_False, sal_Bool bCellSelection = sal_False );
@@ -484,15 +480,15 @@ public:
void MarkMatrixFormula();
void Unmark();
- void MarkRange( const ScRange& rRange, sal_Bool bSetCursor =
sal_True, sal_Bool bContinue = sal_False );
+ void MarkRange( const ScRange& rRange, sal_Bool bSetCursor =
sal_True, sal_Bool bContinue = sal_False );
sal_Bool IsMarking( SCCOL nCol, SCROW nRow,
SCTAB nTab ) const;
void PaintMarks( SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow );
void PaintBlock( sal_Bool bReset = sal_False );
- void SetMarkData( const ScMarkData& rNew );
- void MarkDataChanged();
+ void SetMarkData( const ScMarkData& rNew );
+ void MarkDataChanged();
void LockModifiers( sal_uInt16 nModifiers );
sal_uInt16 GetLockedModifiers() const;
@@ -515,15 +511,15 @@ public:
Window* GetFrameWin() const { return pFrameWin; }
- sal_Bool HasPaintBrush() const { return
pBrushDocument || pDrawBrushSet; }
- ScDocument* GetBrushDocument() const { return pBrushDocument; }
- SfxItemSet* GetDrawBrushSet() const { return pDrawBrushSet; }
- sal_Bool IsPaintBrushLocked() const { return
bLockPaintBrush; }
- void SetBrushDocument( ScDocument* pNew, sal_Bool bLock );
- void SetDrawBrushSet( SfxItemSet* pNew, sal_Bool bLock );
- void ResetBrushDocument();
+ sal_Bool HasPaintBrush() const { return
pBrushDocument || pDrawBrushSet; }
+ ScDocument* GetBrushDocument() const { return
pBrushDocument; }
+ SfxItemSet* GetDrawBrushSet() const { return pDrawBrushSet;
}
+ sal_Bool IsPaintBrushLocked() const { return
bLockPaintBrush; }
+ void SetBrushDocument( ScDocument* pNew, sal_Bool bLock );
+ void SetDrawBrushSet( SfxItemSet* pNew, sal_Bool bLock );
+ void ResetBrushDocument();
};
-
-
#endif
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sc/source/ui/view/tabview.cxx
b/main/sc/source/ui/view/tabview.cxx
index 383047d4c0..a5804fe333 100644
--- a/main/sc/source/ui/view/tabview.cxx
+++ b/main/sc/source/ui/view/tabview.cxx
@@ -19,12 +19,9 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
//------------------------------------------------------------------
#if 0
@@ -61,7 +58,7 @@
///////////////////////////////////////////////////////////////////////////
// NODRAW.HXX
// Erweiterte Konstanten, um CLOKs mit SVDRAW.HXX zu vermeiden
-// Die u.a. Aenderungen nehmen vorgeschlagene Konstante vorweg
+// Die u.a. Änderungen nehmen vorgeschlagene Konstante vorweg
///////////////////////////////////////////////////////////////////////////
#if 0
@@ -165,7 +162,6 @@
////////////////////// Ende der SVDRAW-Modifikationen /////////////////////
-
// INCLUDE ---------------------------------------------------------------
#include "scitems.hxx"
@@ -204,17 +200,16 @@
#define SC_SCROLLBAR_MIN 30
#define SC_TABBAR_MIN 6
-// fuer Rad-Maus
+// für Rad-Maus
#define SC_DELTA_ZOOM 10
using namespace ::com::sun::star;
// STATIC DATA -----------------------------------------------------------
-
//==================================================================
-// Corner-Button
+// Corner-Button
ScCornerButton::ScCornerButton( Window* pParent, ScViewData* pData, sal_Bool
bAdditional ) :
Window( pParent, WinBits( 0 ) ),
@@ -243,33 +238,33 @@ void __EXPORT ScCornerButton::Paint( const Rectangle&
rRect )
sal_Bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL(
pViewData->GetTabNo() );
long nDarkX = bLayoutRTL ? 0 : nPosX;
- if ( !bAdd && !rStyleSettings.GetHighContrastMode() )
- {
- // match the shaded look of column/row headers
-
- Color aFace( rStyleSettings.GetFaceColor() );
- Color aWhite( COL_WHITE );
- Color aCenter( aFace );
- aCenter.Merge( aWhite, 0xd0 ); // lighten up a bit
- Color aOuter( aFace );
- aOuter.Merge( aWhite, 0xa0 ); // lighten up more
-
- long nCenterX = (aSize.Width() / 2) - 1;
- long nCenterY = (aSize.Height() / 2) - 1;
-
- SetLineColor();
- SetFillColor(aCenter);
- DrawRect( Rectangle( nCenterX, nCenterY, nCenterX, nPosY ) );
- DrawRect( Rectangle( nCenterX, nCenterY, nDarkX, nCenterY ) );
- SetFillColor(aOuter);
- DrawRect( Rectangle( 0, 0, nPosX, nCenterY-1 ) );
- if ( bLayoutRTL )
- DrawRect( Rectangle( nCenterX+1, nCenterY, nPosX, nPosY ) );
- else
- DrawRect( Rectangle( 0, nCenterY, nCenterX-1, nPosY ) );
- }
+ if ( !bAdd && !rStyleSettings.GetHighContrastMode() )
+ {
+ // match the shaded look of column/row headers
+
+ Color aFace( rStyleSettings.GetFaceColor() );
+// Color aWhite( COL_WHITE );
+ Color aCenter( aFace );
+// aCenter.Merge( aWhite, 0xd0 ); // lighten up a bit
+ Color aOuter( aFace );
+// aOuter.Merge( aWhite, 0xa0 ); // lighten up more
+
+ long nCenterX = (aSize.Width() / 2) - 1;
+ long nCenterY = (aSize.Height() / 2) - 1;
+
+ SetLineColor();
+ SetFillColor(aCenter);
+ DrawRect( Rectangle( nCenterX, nCenterY, nCenterX, nPosY ) );
+ DrawRect( Rectangle( nCenterX, nCenterY, nDarkX, nCenterY ) );
+ SetFillColor(aOuter);
+ DrawRect( Rectangle( 0, 0, nPosX, nCenterY-1 ) );
+ if ( bLayoutRTL )
+ DrawRect( Rectangle( nCenterX+1, nCenterY, nPosX, nPosY
) );
+ else
+ DrawRect( Rectangle( 0, nCenterY, nCenterX-1, nPosY ) );
+ }
- // both buttons have the same look now - only dark right/bottom
lines
+ // both buttons have the same look now - only dark right/bottom lines
SetLineColor( rStyleSettings.GetDarkShadowColor() );
DrawLine( Point(0,nPosY), Point(nPosX,nPosY) );
DrawLine( Point(nDarkX,0), Point(nDarkX,nPosY) );
@@ -295,7 +290,6 @@ void ScCornerButton::DataChanged( const DataChangedEvent&
rDCEvt )
Invalidate();
}
-
void __EXPORT ScCornerButton::Resize()
{
Invalidate();
@@ -347,7 +341,6 @@ sal_Bool lcl_HasRowOutline( const ScViewData& rViewData )
// Init und Konstruktoren
// ScTabView::Init() in tabview5.cxx wegen out of keys
-
#define TABVIEW_INIT \
pSelEngine( NULL ),
\
aFunctionSet( &aViewData ),
\
@@ -365,24 +358,23 @@ sal_Bool lcl_HasRowOutline( const ScViewData& rViewData )
pInputHintWindow( NULL ),
\
pPageBreakData( NULL ),
\
pHighlightRanges( NULL ),
\
- pBrushDocument( NULL ), \
- pDrawBrushSet( NULL ), \
- bLockPaintBrush( sal_False ),
\
+ pBrushDocument( NULL ),
\
+ pDrawBrushSet( NULL ),
\
+ bLockPaintBrush( sal_False ),
\
pTimerWindow( NULL ),
\
nTipVisible( 0 ),
\
- bDragging( sal_False ),
\
+ bDragging( sal_False ),
\
bIsBlockMode( sal_False ),
\
bBlockNeg( sal_False ),
\
bBlockCols( sal_False ),
\
bBlockRows( sal_False ),
\
- mfPendingTabBarWidth( -1.0 ), \
+ mfPendingTabBarWidth( -1.0 ),
\
bMinimized( sal_False ),
\
bInUpdateHeader( sal_False ),
\
bInActivatePart( sal_False ),
\
bInZoomUpdate( sal_False ),
\
bMoveIsShift( sal_False ),
\
- bNewStartIfMarking( sal_False )
-
+ bNewStartIfMarking( sal_False )
ScTabView::ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell*
pViewShell ) :
pFrameWin( pParent ),
@@ -498,8 +490,8 @@ void ScTabView::DoResize( const Point& rOffset, const Size&
rSize, sal_Bool bInn
long nBarX = 0;
long nBarY = 0;
- long nOutlineX = 0;
- long nOutlineY = 0;
+ long nOutlineX = 0;
+ long nOutlineY = 0;
long nOutPosX;
long nOutPosY;
@@ -617,7 +609,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size&
rSize, sal_Bool bInn
lcl_SetPosSize( *pTabControl, Point(nPosX-nOverlap,
nPosY+nSizeY),
Size(nTabSize+nOverlap, nBarY), nTotalWidth, bLayoutRTL );
- pTabControl->SetSheetLayoutRTL( bLayoutRTL );
+ pTabControl->SetSheetLayoutRTL( bLayoutRTL );
lcl_SetPosSize( aHScrollLeft,
Point(nPosX+nTabSize-nOverlap, nPosY+nSizeY),
Size(nSizeLt+2*nOverlap, nBarY), nTotalWidth, bLayoutRTL );
@@ -840,7 +832,6 @@ void ScTabView::DoResize( const Point& rOffset, const Size&
rSize, sal_Bool bInn
pRowBar[SC_SPLIT_BOTTOM]->Hide();
}
-
// Grid-Windows
if (bInner)
@@ -863,9 +854,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size&
rSize, sal_Bool bInn
Point(nSplitPosX,nPosY),
Size(nRightSize,nTopSize), nTotalWidth, bLayoutRTL );
}
- //
// Scrollbars updaten
- //
if (!bInUpdateHeader)
{
@@ -1773,7 +1762,6 @@ void ScTabView::UpdateShow()
ShowHide( pColBar[SC_SPLIT_RIGHT], bShowH && bHeader );
ShowHide( pRowBar[SC_SPLIT_TOP], bShowV && bHeader );
-
//! neue Gridwindows eintragen
}
@@ -2466,30 +2454,30 @@ void ScTabView::SetNewVisArea()
sal_Bool ScTabView::HasPageFieldDataAtCursor() const
{
- ScGridWindow* pWin = pGridWin[aViewData.GetActivePart()];
- SCCOL nCol = aViewData.GetCurX();
- SCROW nRow = aViewData.GetCurY();
- if (pWin)
- return pWin->GetDPFieldOrientation( nCol, nRow ) ==
sheet::DataPilotFieldOrientation_PAGE;
+ ScGridWindow* pWin = pGridWin[aViewData.GetActivePart()];
+ SCCOL nCol = aViewData.GetCurX();
+ SCROW nRow = aViewData.GetCurY();
+ if (pWin)
+ return pWin->GetDPFieldOrientation( nCol, nRow ) ==
sheet::DataPilotFieldOrientation_PAGE;
- return sal_False;
+ return sal_False;
}
void ScTabView::StartDataSelect()
{
- ScGridWindow* pWin = pGridWin[aViewData.GetActivePart()];
- SCCOL nCol = aViewData.GetCurX();
- SCROW nRow = aViewData.GetCurY();
+ ScGridWindow* pWin = pGridWin[aViewData.GetActivePart()];
+ SCCOL nCol = aViewData.GetCurX();
+ SCROW nRow = aViewData.GetCurY();
- if (!pWin)
- return;
+ if (!pWin)
+ return;
switch (pWin->GetDPFieldOrientation(nCol, nRow))
{
case sheet::DataPilotFieldOrientation_PAGE:
- // #i36598# If the cursor is on a page field's data cell,
- // no meaningful input is possible anyway, so this function
- // can be used to select a page field entry.
+ // #i36598# If the cursor is on a page field's data cell,
+ // no meaningful input is possible anyway, so this function
+ // can be used to select a page field entry.
pWin->LaunchPageFieldMenu( nCol, nRow );
break;
case sheet::DataPilotFieldOrientation_COLUMN:
@@ -2526,3 +2514,5 @@ void ScTabView::EnableRefInput(sal_Bool bFlag)
if(pRowBar[SC_SPLIT_TOP]!=NULL)
pRowBar[SC_SPLIT_TOP]->EnableInput(bFlag,sal_False);
}
+
+/* vim: set noet sw=4 ts=4: */