LibreOffice Module sc (master) 1
|
A ruler control for the CSV import dialog. More...
#include <csvruler.hxx>
Public Member Functions | |
ScCsvRuler (const ScCsvLayoutData &rData, ScCsvTableBox *pTableBox) | |
If currently mouse tracking. More... | |
virtual void | SetDrawingArea (weld::DrawingArea *pDrawingArea) override |
ScCsvTableBox * | GetTableBox () |
virtual | ~ScCsvRuler () override |
void | ApplyLayout (const ScCsvLayoutData &rOldData) |
Apply current layout data to the ruler. More... | |
const ScCsvSplits & | GetSplits () const |
Returns the split array. More... | |
sal_uInt32 | GetSplitCount () const |
Returns the number of splits. More... | |
sal_Int32 | GetSplitPos (sal_uInt32 nIndex) const |
Returns the position of the specified split. More... | |
sal_Int32 | GetNoScrollPos (sal_Int32 nPos) const |
Finds a position nearest to nPos which does not cause scrolling the visible area. More... | |
bool | HasSplit (sal_Int32 nPos) const |
Returns true if at position nPos is a split. More... | |
void | InsertSplit (sal_Int32 nPos) |
Inserts a split. More... | |
void | RemoveSplit (sal_Int32 nPos) |
Removes a split. More... | |
void | MoveSplit (sal_Int32 nPos, sal_Int32 nNewPos) |
Moves a split from nPos to nNewPos. More... | |
void | RemoveAllSplits () |
Removes all splits of the ruler. More... | |
void | ImplRedraw (vcl::RenderContext &rRenderContext) |
Redraws the entire ruler. More... | |
Public Member Functions inherited from ScCsvControl | |
ScCsvControl (const ScCsvLayoutData &rData) | |
Reference to the accessible implementation object. More... | |
virtual | ~ScCsvControl () override |
virtual void | GetFocus () override |
virtual void | LoseFocus () override |
void | AccSendFocusEvent (bool bFocused) |
Sends a GetFocus or LoseFocus event to the accessibility object. More... | |
void | AccSendCaretEvent () |
Sends a caret changed event to the accessibility object. More... | |
void | AccSendVisibleEvent () |
Sends a visible area changed event to the accessibility object. More... | |
void | AccSendSelectionEvent () |
Sends a selection changed event to the accessibility object. More... | |
void | AccSendTableUpdateEvent (sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows=true) |
Sends a table model changed event for changed cell contents to the accessibility object. More... | |
void | AccSendInsertColumnEvent (sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn) |
Sends a table model changed event for an inserted column to the accessibility object. More... | |
void | AccSendRemoveColumnEvent (sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn) |
Sends a table model changed event for a removed column to the accessibility object. More... | |
ScAccessibleCsvControl * | GetAccessible () |
void | InvalidateGfx () |
Sets the graphic invalid (next Redraw() will not use cached graphic). More... | |
void | ValidateGfx () |
Sets the graphic valid (next Redraw() will use cached graphic). More... | |
bool | IsValidGfx () const |
Returns true, if cached graphic is valid. More... | |
void | Repaint (bool bInvalidate=false) |
Repaints all controls. More... | |
void | DisableRepaint () |
Increases no-repaint counter (controls do not repaint until the last EnableRepaint()). More... | |
void | EnableRepaint () |
Decreases no-repaint counter and repaints if counter reaches 0. More... | |
bool | IsNoRepaint () const |
Returns true, if controls will not repaint. More... | |
void | SetCmdHdl (const Link< ScCsvControl &, void > &rHdl) |
Sets a new command handler. More... | |
const ScCsvCmd & | GetCmd () const |
Returns data of the last command. More... | |
void | Execute (ScCsvCmdType eType, sal_Int32 nParam1=CSV_POS_INVALID, sal_Int32 nParam2=CSV_POS_INVALID) |
Executes a command by calling command handler. More... | |
const ScCsvLayoutData & | GetLayoutData () const |
Returns a reference to the current layout data. More... | |
bool | IsRTL () const |
Returns true, if the Right-to-Left layout mode is active. More... | |
sal_Int32 | GetPosCount () const |
Returns the number of available positions. More... | |
sal_Int32 | GetVisPosCount () const |
Returns the number of visible positions. More... | |
sal_Int32 | GetFirstVisPos () const |
Returns the first visible position. More... | |
sal_Int32 | GetLastVisPos () const |
Returns the last visible position. More... | |
sal_Int32 | GetMaxPosOffset () const |
Returns highest possible position for first visible character. More... | |
bool | IsValidSplitPos (sal_Int32 nPos) const |
Returns true, if it is allowed to set a split at nPos. More... | |
bool | IsVisibleSplitPos (sal_Int32 nPos) const |
Returns true, if nPos is an allowed AND visible split position. More... | |
sal_Int32 | GetHdrWidth () const |
Returns the width of the header column. More... | |
sal_Int32 | GetCharWidth () const |
Returns the width of one character column. More... | |
sal_Int32 | GetHdrX () const |
Returns the start position of the header column. More... | |
sal_Int32 | GetFirstX () const |
Returns the X position of the first pixel of the data area. More... | |
sal_Int32 | GetLastX () const |
Returns the X position of the last pixel of the data area. More... | |
sal_Int32 | GetX (sal_Int32 nPos) const |
Returns output X coordinate of the specified position. More... | |
sal_Int32 | GetPosFromX (sal_Int32 nX) const |
Returns position from output coordinate. More... | |
sal_Int32 | GetLineCount () const |
Returns the number of data lines. More... | |
sal_Int32 | GetVisLineCount () const |
Returns the number of visible lines (including partly visible bottom line). More... | |
sal_Int32 | GetFirstVisLine () const |
Returns index of first visible line. More... | |
sal_Int32 | GetLastVisLine () const |
Returns index of last visible line. More... | |
sal_Int32 | GetMaxLineOffset () const |
Returns highest possible index for first line. More... | |
bool | IsValidLine (sal_Int32 nLine) const |
Returns true, if nLine is a valid line index. More... | |
bool | IsVisibleLine (sal_Int32 nLine) const |
Returns true, if nLine is a valid and visible line index. More... | |
sal_Int32 | GetHdrHeight () const |
Returns the height of the header line. More... | |
sal_Int32 | GetLineHeight () const |
Returns the height of one line. More... | |
sal_Int32 | GetY (sal_Int32 nLine) const |
Returns output Y coordinate of the specified line. More... | |
sal_Int32 | GetLineFromY (sal_Int32 nY) const |
Returns line index from output coordinate. More... | |
sal_Int32 | GetRulerCursorPos () const |
Returns the ruler cursor position. More... | |
sal_Int32 | GetGridCursorPos () const |
Returns the data grid cursor position (not column index!). More... | |
Public Member Functions inherited from weld::CustomWidgetController | |
virtual css::uno::Reference< css::accessibility::XAccessible > | CreateAccessible () |
virtual void | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)=0 |
virtual void | Resize () |
virtual bool | MouseButtonDown (const MouseEvent &) |
virtual bool | MouseMove (const MouseEvent &) |
virtual bool | MouseButtonUp (const MouseEvent &) |
virtual void | GetFocus () |
virtual void | LoseFocus () |
virtual void | StyleUpdated () |
virtual bool | Command (const CommandEvent &) |
virtual bool | KeyInput (const KeyEvent &) |
virtual tools::Rectangle | GetFocusRect () |
virtual FactoryFunction | GetUITestFactory () const |
virtual OUString | RequestHelp (tools::Rectangle &) |
virtual OUString | GetHelpText () const |
Size const & | GetOutputSizePixel () const |
void | SetOutputSizePixel (const Size &rSize) |
virtual void | SetDrawingArea (weld::DrawingArea *pDrawingArea) |
weld::DrawingArea * | GetDrawingArea () const |
void | Invalidate () |
void | Invalidate (const tools::Rectangle &rRect) |
virtual void | Show () |
virtual void | Hide () |
void | SetCursor (void *pData) |
void | GrabFocus () |
bool | HasFocus () const |
bool | HasChildFocus () const |
bool | IsVisible () const |
bool | IsReallyVisible () const |
bool | IsEnabled () const |
void | Enable () const |
void | Disable () const |
bool | IsActive () const |
int | GetTextHeight () const |
int | GetTextWidth (const OUString &rText) const |
OUString | GetAccessibleName () const |
OUString | GetAccessibleDescription () const |
void | CaptureMouse () |
bool | IsMouseCaptured () const |
Point | GetPointerPosPixel () const |
void | EnableRTL (bool bEnable) |
bool | IsRTLEnabled () const |
void | ReleaseMouse () |
void | SetPointer (PointerStyle ePointerStyle) |
void | SetHelpId (const OUString &rHelpId) |
void | SetAccessibleName (const OUString &rName) |
void | SetInputContext (const InputContext &rInputContext) |
void | SetCursorRect (const tools::Rectangle &rCursorRect, int nExtTextInputWidth) |
virtual int | GetSurroundingText (OUString &) |
virtual bool | DeleteSurroundingText (const Selection &) |
css::uno::Reference< css::datatransfer::dnd::XDropTarget > | GetDropTarget () |
css::uno::Reference< css::datatransfer::clipboard::XClipboard > | GetClipboard () const |
void | SetDragDataTransferable (rtl::Reference< TransferDataContainer > &rTransferable, sal_uInt8 eDNDConstants) |
virtual bool | StartDrag () |
void | set_size_request (int nWidth, int nHeight) |
void | queue_resize () |
CustomWidgetController () | |
virtual | ~CustomWidgetController () |
CustomWidgetController (CustomWidgetController const &)=default | |
CustomWidgetController (CustomWidgetController &&)=default | |
CustomWidgetController & | operator= (CustomWidgetController const &)=default |
CustomWidgetController & | operator= (CustomWidgetController &&)=default |
Protected Member Functions | |
virtual void | Resize () override |
virtual void | GetFocus () override |
virtual void | LoseFocus () override |
virtual void | StyleUpdated () override |
virtual bool | MouseButtonDown (const MouseEvent &rMEvt) override |
virtual bool | MouseMove (const MouseEvent &rMEvt) override |
virtual bool | MouseButtonUp (const MouseEvent &rMEvt) override |
virtual bool | KeyInput (const KeyEvent &rKEvt) override |
virtual tools::Rectangle | GetFocusRect () override |
virtual void | Paint (vcl::RenderContext &rRenderContext, const tools::Rectangle &) override |
virtual css::uno::Reference< css::accessibility::XAccessible > | CreateAccessible () override |
Creates a new accessible object. More... | |
Private Member Functions | |
void | InitColors () |
Reads colors from system settings. More... | |
void | InitSizeData () |
Initializes all data dependent from the control's size. More... | |
void | MoveCursor (sal_Int32 nPos, bool bScroll=true) |
Moves cursor to a new position. More... | |
void | MoveCursorRel (ScMoveMode eDir) |
Moves cursor to the given direction. More... | |
void | MoveCursorToSplit (ScMoveMode eDir) |
Sets cursor to an existing split, according to eDir. More... | |
void | ScrollVertRel (ScMoveMode eDir) |
Scrolls data grid vertically. More... | |
sal_Int32 | FindEmptyPos (sal_Int32 nPos, ScMoveMode eDir) const |
Finds next position without a split. More... | |
void | MoveCurrSplit (sal_Int32 nNewPos) |
Moves split and cursor to nNewPos and commits event. More... | |
void | MoveCurrSplitRel (ScMoveMode eDir) |
Moves split and cursor to the given direction and commits event. More... | |
void | StartMouseTracking (sal_Int32 nPos) |
Starts tracking at the specified position. More... | |
void | MoveMouseTracking (sal_Int32 nPos) |
Moves tracking to a new position. More... | |
void | EndMouseTracking () |
Applies tracking action for the current tracking position. More... | |
sal_Int32 | GetWidth () const |
Returns the width of the control. More... | |
sal_Int32 | GetHeight () const |
Returns the height of the control. More... | |
void | UpdateSplitSize () |
Update the split size depending on the last width set by CSVCMD_SETCHARWIDTH. More... | |
void | ImplDrawArea (sal_Int32 nPosX, sal_Int32 nWidth) |
Draws the background and active area to maBackgrDev (only the given X range). More... | |
void | ImplDrawBackgrDev () |
Draws the entire ruler background with scaling to maBackgrDev. More... | |
void | ImplDrawSplit (sal_Int32 nPos) |
Draws a split to maRulerDev. More... | |
void | ImplEraseSplit (sal_Int32 nPos) |
Erases a split from maRulerDev. More... | |
void | ImplDrawRulerDev () |
Draws the ruler background, all splits and the cursor to maRulerDev. More... | |
void | ImplInvertCursor (sal_Int32 nPos) |
Inverts the cursor bar at the specified position in maRulerDev. More... | |
void | ImplSetMousePointer (sal_Int32 nPos) |
Sets arrow or horizontal split pointer. More... | |
Private Attributes | |
ScCsvTableBox * | mpTableBox |
ScopedVclPtrInstance< VirtualDevice > | maBackgrDev |
Grid Parent. More... | |
ScopedVclPtrInstance< VirtualDevice > | maRulerDev |
Ruler background, scaling. More... | |
Color | maBackColor |
Ruler with splits and cursor. More... | |
Color | maActiveColor |
Background color. More... | |
Color | maTextColor |
Color for active part of ruler. More... | |
Color | maSplitColor |
Text and scale color. More... | |
ScCsvSplits | maSplits |
Split area color. More... | |
ScCsvSplits | maOldSplits |
Vector with split positions. More... | |
sal_Int32 | mnPosCursorLast |
Old state for cancellation. More... | |
sal_Int32 | mnPosMTStart |
Last valid position of cursor. More... | |
sal_Int32 | mnPosMTCurr |
Start position of mouse tracking. More... | |
bool | mbPosMTMoved |
Current position of mouse tracking. More... | |
Size | maWinSize |
Tracking: Anytime moved to another position? More... | |
tools::Rectangle | maActiveRect |
Size of the control. More... | |
sal_Int32 | mnSplitSize |
The active area of the ruler. More... | |
bool | mbTracking |
Size of a split circle. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ScCsvControl | |
static void | ImplInvertRect (OutputDevice &rOutDev, const tools::Rectangle &rRect) |
Inverts a rectangle in the specified output device. More... | |
static ScMoveMode | GetHorzDirection (sal_uInt16 nCode, bool bHomeEnd) |
Returns direction code for the keys LEFT, RIGHT, HOME, END. More... | |
static ScMoveMode | GetVertDirection (sal_uInt16 nCode, bool bHomeEnd) |
Returns direction code for the keys UP, DOWN, HOME, END, PAGE UP, PAGE DOWN. More... | |
Static Public Member Functions inherited from weld::CustomWidgetController | |
static bool | IsUpdateMode () |
Protected Attributes inherited from ScCsvControl | |
rtl::Reference< ScAccessibleCsvControl > | mxAccessible |
Content of virtual devices valid? More... | |
A ruler control for the CSV import dialog.
Supports setting and moving splits (which divide lines of data into several columns).
Definition at line 32 of file csvruler.hxx.
|
explicit |
If currently mouse tracking.
Definition at line 93 of file csvruler.cxx.
|
overridevirtual |
Definition at line 125 of file csvruler.cxx.
References maSplits, and save_FixedWidthList().
void ScCsvRuler::ApplyLayout | ( | const ScCsvLayoutData & | rOldData | ) |
Apply current layout data to the ruler.
Definition at line 132 of file csvruler.cxx.
References ScCsvControl::AccSendVisibleEvent(), ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), Equal, ScCsvLayoutData::GetDiff(), ScCsvControl::GetLayoutData(), ScCsvControl::GetPosCount(), ScCsvControl::GetRulerCursorPos(), HorizontalMask, ImplInvertCursor(), InitSizeData(), ScCsvLayoutData::mnPosCursor, MoveCursor(), PosOffset, and RulerCursor.
|
overrideprotectedvirtual |
Creates a new accessible object.
Reimplemented from weld::CustomWidgetController.
Definition at line 658 of file csvruler.cxx.
References ScCsvControl::mxAccessible.
|
private |
Applies tracking action for the current tracking position.
Definition at line 512 of file csvruler.cxx.
References CSV_POS_INVALID, CSVCMD_REMOVESPLIT, ScCsvControl::Execute(), ScCsvSplits::HasSplit(), maOldSplits, mbPosMTMoved, mnPosMTCurr, and mnPosMTStart.
Referenced by MouseButtonUp().
|
private |
Finds next position without a split.
Definition at line 322 of file csvruler.cxx.
References CSV_POS_INVALID, FindEmptyPos(), ScCsvControl::GetPosCount(), HasSplit(), ScCsvControl::IsValidSplitPos(), MOVE_FIRST, MOVE_LAST, MOVE_NEXT, MOVE_PREV, and nPos.
Referenced by FindEmptyPos(), and MoveCurrSplitRel().
|
overrideprotectedvirtual |
Reimplemented from ScCsvControl.
Definition at line 377 of file csvruler.cxx.
References CSV_POS_INVALID, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::GetFocus(), GetNoScrollPos(), ScCsvControl::GetRulerCursorPos(), mnPosCursorLast, and MoveCursor().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 541 of file csvruler.cxx.
References weld::CustomWidgetController::GetFocusRect(), GetHeight(), GetWidth(), and weld::CustomWidgetController::HasFocus().
|
inlineprivate |
Returns the height of the control.
Definition at line 153 of file csvruler.hxx.
References Size::Height(), and maWinSize.
Referenced by GetFocusRect(), ImplDrawArea(), ImplDrawSplit(), ImplEraseSplit(), ImplInvertCursor(), and InitSizeData().
sal_Int32 ScCsvRuler::GetNoScrollPos | ( | sal_Int32 | nPos | ) | const |
Finds a position nearest to nPos which does not cause scrolling the visible area.
Definition at line 267 of file csvruler.cxx.
References CSV_POS_INVALID, CSV_SCROLL_DIST, ScCsvControl::GetFirstVisPos(), ScCsvControl::GetLastVisPos(), ScCsvControl::GetMaxPosOffset(), and nPos.
Referenced by GetFocus().
|
inline |
Returns the number of splits.
Definition at line 90 of file csvruler.hxx.
References ScCsvSplits::Count(), and maSplits.
|
inline |
Returns the position of the specified split.
Definition at line 93 of file csvruler.hxx.
References maSplits, and nIndex.
Referenced by ImplDrawRulerDev().
|
inline |
|
inline |
Definition at line 61 of file csvruler.hxx.
References mpTableBox.
Referenced by ScAccessibleCsvRuler::getAccessibleRelationSet().
|
inlineprivate |
Returns the width of the control.
Definition at line 151 of file csvruler.hxx.
References maWinSize, and Size::Width().
Referenced by GetFocusRect(), ImplDrawBackgrDev(), and InitSizeData().
|
inline |
Returns true if at position nPos is a split.
Definition at line 99 of file csvruler.hxx.
References ScCsvSplits::HasSplit(), maSplits, and nPos.
Referenced by FindEmptyPos(), ScAccessibleCsvRuler::implHasSplit(), ImplInvertCursor(), ImplSetMousePointer(), MoveCurrSplitRel(), and StartMouseTracking().
|
private |
Draws the background and active area to maBackgrDev (only the given X range).
Definition at line 549 of file csvruler.cxx.
References ScCsvControl::GetFirstX(), GetHeight(), ScCsvControl::GetLastX(), ScCsvControl::GetPosCount(), ScCsvControl::GetX(), tools::Rectangle::Left(), maActiveColor, maActiveRect, maBackColor, maBackgrDev, maTextColor, tools::Rectangle::Right(), tools::Rectangle::SetLeft(), and tools::Rectangle::SetRight().
Referenced by ImplDrawBackgrDev().
|
private |
Draws the entire ruler background with scaling to maBackgrDev.
Definition at line 570 of file csvruler.cxx.
References tools::Rectangle::Bottom(), ScCsvControl::GetPosFromX(), GetWidth(), ScCsvControl::GetX(), ImplDrawArea(), maActiveRect, maBackgrDev, maTextColor, nPos, and tools::Rectangle::Top().
Referenced by ImplRedraw().
|
private |
Draws the ruler background, all splits and the cursor to maRulerDev.
Definition at line 629 of file csvruler.cxx.
References CSV_VEC_NOTFOUND, ScCsvControl::GetFirstVisPos(), ScCsvControl::GetLastVisPos(), ScCsvControl::GetRulerCursorPos(), GetSplitPos(), ImplDrawSplit(), ImplInvertCursor(), ScCsvSplits::LowerBound(), maBackgrDev, maRulerDev, maSplits, maWinSize, nIndex, and ScCsvSplits::UpperBound().
Referenced by ImplRedraw().
|
private |
Draws a split to maRulerDev.
Definition at line 604 of file csvruler.cxx.
References GetHeight(), ScCsvControl::GetX(), ScCsvControl::IsVisibleSplitPos(), maRulerDev, maSplitColor, maTextColor, mnSplitSize, and nPos.
Referenced by ImplDrawRulerDev(), ImplInvertCursor(), InsertSplit(), and MoveSplit().
|
private |
Erases a split from maRulerDev.
Definition at line 617 of file csvruler.cxx.
References GetHeight(), ScCsvControl::GetRulerCursorPos(), ScCsvControl::GetX(), ImplInvertCursor(), ScCsvControl::IsVisibleSplitPos(), maBackgrDev, maRulerDev, mnSplitSize, and nPos.
Referenced by MoveSplit(), and RemoveSplit().
|
private |
Inverts the cursor bar at the specified position in maRulerDev.
Definition at line 641 of file csvruler.cxx.
References GetHeight(), ScCsvControl::GetX(), HasSplit(), ImplDrawSplit(), ScCsvControl::ImplInvertRect(), ScCsvControl::IsVisibleSplitPos(), maRulerDev, and nPos.
Referenced by ApplyLayout(), ImplDrawRulerDev(), and ImplEraseSplit().
void ScCsvRuler::ImplRedraw | ( | vcl::RenderContext & | rRenderContext | ) |
Redraws the entire ruler.
Definition at line 527 of file csvruler.cxx.
References OutputDevice::DrawOutDev(), ImplDrawBackgrDev(), ImplDrawRulerDev(), ScCsvControl::IsValidGfx(), weld::CustomWidgetController::IsVisible(), maRulerDev, maWinSize, and ScCsvControl::ValidateGfx().
Referenced by Paint().
|
private |
Sets arrow or horizontal split pointer.
Definition at line 651 of file csvruler.cxx.
References HasSplit(), nPos, and weld::CustomWidgetController::SetPointer().
Referenced by MouseButtonDown(), and MouseMove().
|
private |
Reads colors from system settings.
Definition at line 155 of file csvruler.cxx.
References COL_LIGHTRED(), StyleSettings::GetFaceColor(), StyleSettings::GetLabelTextColor(), Application::GetSettings(), AllSettings::GetStyleSettings(), StyleSettings::GetWindowColor(), ScCsvControl::InvalidateGfx(), Color::IsDark(), maActiveColor, maBackColor, maSplitColor, and maTextColor.
Referenced by SetDrawingArea(), and StyleUpdated().
|
private |
Initializes all data dependent from the control's size.
Definition at line 170 of file csvruler.cxx.
References ScCsvControl::GetCharWidth(), ScCsvControl::GetFirstX(), ScCsvControl::GetHdrWidth(), GetHeight(), weld::CustomWidgetController::GetOutputSizePixel(), ScCsvControl::GetPosCount(), weld::CustomWidgetController::GetTextHeight(), GetWidth(), ScCsvControl::InvalidateGfx(), maActiveRect, maBackgrDev, maRulerDev, maWinSize, tools::Rectangle::SetPos(), tools::Rectangle::SetSize(), and UpdateSplitSize().
Referenced by ApplyLayout(), Resize(), and SetDrawingArea().
void ScCsvRuler::InsertSplit | ( | sal_Int32 | nPos | ) |
Inserts a split.
Definition at line 286 of file csvruler.cxx.
References ImplDrawSplit(), ScCsvSplits::Insert(), maSplits, nPos, and ScCsvControl::Repaint().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 451 of file csvruler.cxx.
References CSVCMD_INSERTSPLIT, CSVCMD_REMOVEALLSPLITS, CSVCMD_REMOVESPLIT, CSVCMD_TOGGLESPLIT, ScCsvControl::Execute(), vcl::KeyCode::GetCode(), vcl::KeyCode::GetGroup(), ScCsvControl::GetHorzDirection(), KeyEvent::GetKeyCode(), vcl::KeyCode::GetModifier(), ScCsvControl::GetRulerCursorPos(), ScCsvControl::GetVertDirection(), KEY_DELETE, KEY_INSERT, KEY_MOD1, KEY_SHIFT, KEY_SPACE, KEYGROUP_CURSOR, MOVE_NONE, MoveCurrSplitRel(), MoveCursorRel(), MoveCursorToSplit(), and ScrollVertRel().
|
overrideprotectedvirtual |
Reimplemented from ScCsvControl.
Definition at line 386 of file csvruler.cxx.
References CSV_POS_INVALID, ScCsvControl::GetRulerCursorPos(), ScCsvControl::LoseFocus(), mnPosCursorLast, and MoveCursor().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 401 of file csvruler.cxx.
References ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::GetPosFromX(), MouseEvent::GetPosPixel(), weld::CustomWidgetController::GrabFocus(), weld::CustomWidgetController::HasFocus(), ImplSetMousePointer(), MouseEvent::IsLeft(), ScCsvControl::IsVisibleSplitPos(), nPos, StartMouseTracking(), and Point::X().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 417 of file csvruler.cxx.
References EndMouseTracking(), and mbTracking.
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 427 of file csvruler.cxx.
References tools::Rectangle::Contains(), CSV_POS_INVALID, ScCsvControl::GetPosCount(), ScCsvControl::GetPosFromX(), MouseEvent::GetPosPixel(), ScCsvControl::GetRulerCursorPos(), weld::CustomWidgetController::HasFocus(), ImplSetMousePointer(), MouseEvent::IsModifierChanged(), ScCsvControl::IsVisibleSplitPos(), maWinSize, mbTracking, MoveCursor(), MoveMouseTracking(), nPos, and Point::X().
|
private |
Moves split and cursor to nNewPos and commits event.
Definition at line 350 of file csvruler.cxx.
References CSVCMD_MOVESPLIT, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), ScCsvControl::GetRulerCursorPos(), and MoveCursor().
Referenced by MoveCurrSplitRel().
|
private |
Moves split and cursor to the given direction and commits event.
Definition at line 358 of file csvruler.cxx.
References CSV_POS_INVALID, FindEmptyPos(), ScCsvControl::GetRulerCursorPos(), HasSplit(), and MoveCurrSplit().
Referenced by KeyInput().
|
private |
Moves cursor to a new position.
bScroll | sal_True = The method may scroll the ruler. |
Definition at line 188 of file csvruler.cxx.
References ScCsvControl::AccSendCaretEvent(), CSV_POS_INVALID, CSVCMD_MAKEPOSVISIBLE, CSVCMD_MOVERULERCURSOR, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), ScCsvControl::IsVisibleSplitPos(), and nPos.
Referenced by ApplyLayout(), GetFocus(), LoseFocus(), MouseMove(), MoveCurrSplit(), MoveCursorRel(), MoveCursorToSplit(), and MoveMouseTracking().
|
private |
Moves cursor to the given direction.
Definition at line 198 of file csvruler.cxx.
References CSV_POS_INVALID, ScCsvControl::GetPosCount(), ScCsvControl::GetRulerCursorPos(), MOVE_FIRST, MOVE_LAST, MOVE_NEXT, MOVE_PREV, and MoveCursor().
Referenced by KeyInput().
|
private |
Sets cursor to an existing split, according to eDir.
Definition at line 226 of file csvruler.cxx.
References CSV_POS_INVALID, CSV_VEC_NOTFOUND, ScCsvControl::GetPosCount(), ScCsvControl::GetRulerCursorPos(), ScCsvSplits::LowerBound(), maSplits, MOVE_FIRST, MOVE_LAST, MOVE_NEXT, MOVE_PREV, MoveCursor(), nIndex, nPos, and ScCsvSplits::UpperBound().
Referenced by KeyInput().
|
private |
Moves tracking to a new position.
Definition at line 496 of file csvruler.cxx.
References CSVCMD_INSERTSPLIT, CSVCMD_MOVESPLIT, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), ScCsvSplits::HasSplit(), maOldSplits, mbPosMTMoved, mnPosMTCurr, mnPosMTStart, MoveCursor(), and nPos.
Referenced by MouseMove().
void ScCsvRuler::MoveSplit | ( | sal_Int32 | nPos, |
sal_Int32 | nNewPos | ||
) |
Moves a split from nPos to nNewPos.
Definition at line 304 of file csvruler.cxx.
References ImplDrawSplit(), ImplEraseSplit(), ScCsvSplits::Insert(), maSplits, nPos, ScCsvSplits::Remove(), and ScCsvControl::Repaint().
|
overrideprotectedvirtual |
Implements weld::CustomWidgetController.
Definition at line 522 of file csvruler.cxx.
References ImplRedraw().
void ScCsvRuler::RemoveAllSplits | ( | ) |
Removes all splits of the ruler.
Definition at line 316 of file csvruler.cxx.
References ScCsvSplits::Clear(), maSplits, and ScCsvControl::Repaint().
void ScCsvRuler::RemoveSplit | ( | sal_Int32 | nPos | ) |
Removes a split.
Definition at line 295 of file csvruler.cxx.
References ImplEraseSplit(), maSplits, nPos, ScCsvSplits::Remove(), and ScCsvControl::Repaint().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 370 of file csvruler.cxx.
References InitSizeData(), ScCsvControl::Repaint(), and weld::CustomWidgetController::Resize().
|
private |
Scrolls data grid vertically.
Definition at line 248 of file csvruler.cxx.
References CSVCMD_SETLINEOFFSET, ScCsvControl::Execute(), ScCsvControl::GetFirstVisLine(), ScCsvControl::GetVisLineCount(), MOVE_NEXT, MOVE_NEXTPAGE, MOVE_PREV, and MOVE_PREVPAGE.
Referenced by KeyInput().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 105 of file csvruler.cxx.
References weld::CustomWidgetController::EnableRTL(), weld::DrawingArea::get_ref_device(), OutputDevice::GetFont(), weld::CustomWidgetController::GetTextHeight(), Size::Height(), InitColors(), InitSizeData(), load_FixedWidthList(), maBackgrDev, maRulerDev, maSplits, mnSplitSize, weld::Widget::set_size_request(), weld::CustomWidgetController::SetDrawingArea(), weld::CustomWidgetController::SetOutputSizePixel(), UpdateSplitSize(), and Size::Width().
|
private |
Starts tracking at the specified position.
Definition at line 486 of file csvruler.cxx.
References CSVCMD_INSERTSPLIT, ScCsvControl::Execute(), HasSplit(), maOldSplits, maSplits, mbPosMTMoved, mbTracking, mnPosMTCurr, mnPosMTStart, and nPos.
Referenced by MouseButtonDown().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 393 of file csvruler.cxx.
References InitColors(), ScCsvControl::Repaint(), and weld::CustomWidgetController::StyleUpdated().
|
private |
Update the split size depending on the last width set by CSVCMD_SETCHARWIDTH.
Definition at line 165 of file csvruler.cxx.
References ScCsvControl::GetCharWidth(), and mnSplitSize.
Referenced by InitSizeData(), and SetDrawingArea().
|
private |
Background color.
Definition at line 41 of file csvruler.hxx.
Referenced by ImplDrawArea(), and InitColors().
|
private |
Size of the control.
Definition at line 54 of file csvruler.hxx.
Referenced by ImplDrawArea(), ImplDrawBackgrDev(), and InitSizeData().
|
private |
Ruler with splits and cursor.
Definition at line 40 of file csvruler.hxx.
Referenced by ImplDrawArea(), and InitColors().
|
private |
Grid Parent.
Definition at line 37 of file csvruler.hxx.
Referenced by ImplDrawArea(), ImplDrawBackgrDev(), ImplDrawRulerDev(), ImplEraseSplit(), InitSizeData(), and SetDrawingArea().
|
private |
Vector with split positions.
Definition at line 46 of file csvruler.hxx.
Referenced by EndMouseTracking(), MoveMouseTracking(), and StartMouseTracking().
|
private |
Ruler background, scaling.
Definition at line 38 of file csvruler.hxx.
Referenced by ImplDrawRulerDev(), ImplDrawSplit(), ImplEraseSplit(), ImplInvertCursor(), ImplRedraw(), InitSizeData(), and SetDrawingArea().
|
private |
Text and scale color.
Definition at line 43 of file csvruler.hxx.
Referenced by ImplDrawSplit(), and InitColors().
|
private |
Split area color.
Definition at line 45 of file csvruler.hxx.
Referenced by GetSplitCount(), GetSplitPos(), GetSplits(), HasSplit(), ImplDrawRulerDev(), InsertSplit(), MoveCursorToSplit(), MoveSplit(), RemoveAllSplits(), RemoveSplit(), SetDrawingArea(), StartMouseTracking(), and ~ScCsvRuler().
|
private |
Color for active part of ruler.
Definition at line 42 of file csvruler.hxx.
Referenced by ImplDrawArea(), ImplDrawBackgrDev(), ImplDrawSplit(), and InitColors().
|
private |
Tracking: Anytime moved to another position?
Definition at line 53 of file csvruler.hxx.
Referenced by GetHeight(), GetWidth(), ImplDrawRulerDev(), ImplRedraw(), InitSizeData(), and MouseMove().
|
private |
Current position of mouse tracking.
Definition at line 51 of file csvruler.hxx.
Referenced by EndMouseTracking(), MoveMouseTracking(), and StartMouseTracking().
|
private |
Size of a split circle.
Definition at line 56 of file csvruler.hxx.
Referenced by MouseButtonUp(), MouseMove(), and StartMouseTracking().
|
private |
Old state for cancellation.
Definition at line 48 of file csvruler.hxx.
Referenced by GetFocus(), and LoseFocus().
|
private |
Start position of mouse tracking.
Definition at line 50 of file csvruler.hxx.
Referenced by EndMouseTracking(), MoveMouseTracking(), and StartMouseTracking().
|
private |
Last valid position of cursor.
Definition at line 49 of file csvruler.hxx.
Referenced by EndMouseTracking(), MoveMouseTracking(), and StartMouseTracking().
|
private |
The active area of the ruler.
Definition at line 55 of file csvruler.hxx.
Referenced by ImplDrawSplit(), ImplEraseSplit(), SetDrawingArea(), and UpdateSplitSize().
|
private |
Definition at line 35 of file csvruler.hxx.
Referenced by GetTableBox().