LibreOffice Module sc (master) 1
|
Base class for the CSV ruler and the data grid control. More...
#include <csvcontrol.hxx>
Public Member Functions | |
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 |
Static Public Member Functions | |
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 | |
rtl::Reference< ScAccessibleCsvControl > | mxAccessible |
Content of virtual devices valid? More... | |
Private Attributes | |
Link< ScCsvControl &, void > | maCmdHdl |
ScCsvCmd | maCmd |
External command handler. More... | |
const ScCsvLayoutData & | mrData |
Data of last command. More... | |
bool | mbValidGfx |
Shared layout data. More... | |
Base class for the CSV ruler and the data grid control.
Implements command handling.
Definition at line 222 of file csvcontrol.hxx.
|
explicit |
Reference to the accessible implementation object.
Definition at line 59 of file csvcontrol.cxx.
References mrData.
|
overridevirtual |
Definition at line 65 of file csvcontrol.cxx.
References mxAccessible.
void ScCsvControl::AccSendCaretEvent | ( | ) |
Sends a caret changed event to the accessibility object.
Definition at line 92 of file csvcontrol.cxx.
References mxAccessible.
Referenced by ScCsvRuler::MoveCursor().
void ScCsvControl::AccSendFocusEvent | ( | bool | bFocused | ) |
Sends a GetFocus or LoseFocus event to the accessibility object.
Definition at line 86 of file csvcontrol.cxx.
References mxAccessible.
Referenced by GetFocus(), and LoseFocus().
void ScCsvControl::AccSendInsertColumnEvent | ( | sal_uInt32 | nFirstColumn, |
sal_uInt32 | nLastColumn | ||
) |
Sends a table model changed event for an inserted column to the accessibility object.
Definition at line 116 of file csvcontrol.cxx.
References mxAccessible.
Referenced by ScCsvGrid::ImplInsertSplit().
void ScCsvControl::AccSendRemoveColumnEvent | ( | sal_uInt32 | nFirstColumn, |
sal_uInt32 | nLastColumn | ||
) |
Sends a table model changed event for a removed column to the accessibility object.
Definition at line 122 of file csvcontrol.cxx.
References mxAccessible.
Referenced by ScCsvGrid::ImplClearSplits(), and ScCsvGrid::ImplRemoveSplit().
void ScCsvControl::AccSendSelectionEvent | ( | ) |
Sends a selection changed event to the accessibility object.
Definition at line 104 of file csvcontrol.cxx.
References mxAccessible.
Referenced by ScCsvGrid::Select(), ScCsvGrid::SelectRange(), and ScCsvGrid::SetColumnStates().
void ScCsvControl::AccSendTableUpdateEvent | ( | sal_uInt32 | nFirstColumn, |
sal_uInt32 | nLastColumn, | ||
bool | bAllRows = true |
||
) |
Sends a table model changed event for changed cell contents to the accessibility object.
Definition at line 110 of file csvcontrol.cxx.
References mxAccessible.
Referenced by ScCsvGrid::ImplInsertSplit(), ScCsvGrid::ImplRemoveSplit(), ScCsvGrid::MoveSplit(), ScCsvGrid::SetColumnStates(), and ScCsvGrid::SetColumnType().
void ScCsvControl::AccSendVisibleEvent | ( | ) |
Sends a visible area changed event to the accessibility object.
Definition at line 98 of file csvcontrol.cxx.
References mxAccessible.
Referenced by ScCsvGrid::ApplyLayout(), and ScCsvRuler::ApplyLayout().
void ScCsvControl::DisableRepaint | ( | ) |
Increases no-repaint counter (controls do not repaint until the last EnableRepaint()).
Definition at line 138 of file csvcontrol.cxx.
References ScCsvLayoutData::mnNoRepaint, and mrData.
Referenced by ScCsvGrid::ApplyLayout(), ScCsvRuler::ApplyLayout(), ScCsvRuler::GetFocus(), ScCsvGrid::InsertSplit(), ScCsvGrid::KeyInput(), ScCsvGrid::MouseButtonDown(), ScCsvRuler::MouseButtonDown(), ScCsvGrid::MouseMove(), ScCsvRuler::MoveCurrSplit(), ScCsvRuler::MoveCursor(), ScCsvGrid::MoveCursor(), ScCsvRuler::MoveMouseTracking(), ScCsvGrid::MoveSplit(), ScCsvGrid::RemoveAllSplits(), ScCsvGrid::RemoveSplit(), ScCsvGrid::SetSplits(), and ScCsvGrid::UpdateLayoutData().
void ScCsvControl::EnableRepaint | ( | ) |
Decreases no-repaint counter and repaints if counter reaches 0.
Definition at line 143 of file csvcontrol.cxx.
References IsNoRepaint(), ScCsvLayoutData::mnNoRepaint, mrData, and Repaint().
Referenced by ScCsvGrid::ApplyLayout(), ScCsvRuler::ApplyLayout(), ScCsvRuler::GetFocus(), ScCsvGrid::InsertSplit(), ScCsvGrid::KeyInput(), ScCsvGrid::MouseButtonDown(), ScCsvRuler::MouseButtonDown(), ScCsvGrid::MouseMove(), ScCsvRuler::MoveCurrSplit(), ScCsvRuler::MoveCursor(), ScCsvGrid::MoveCursor(), ScCsvRuler::MoveMouseTracking(), ScCsvGrid::MoveSplit(), ScCsvGrid::RemoveAllSplits(), ScCsvGrid::RemoveSplit(), ScCsvGrid::SetSplits(), and ScCsvGrid::UpdateLayoutData().
void ScCsvControl::Execute | ( | ScCsvCmdType | eType, |
sal_Int32 | nParam1 = CSV_POS_INVALID , |
||
sal_Int32 | nParam2 = CSV_POS_INVALID |
||
) |
Executes a command by calling command handler.
Definition at line 152 of file csvcontrol.cxx.
References Link< typename Arg, typename Ret >::Call(), eType, maCmd, maCmdHdl, and ScCsvCmd::Set().
Referenced by ScCsvGrid::ApplyLayout(), ScCsvGrid::Command(), ScCsvGrid::DoSelectAction(), ScCsvRuler::EndMouseTracking(), ScCsvGrid::ExecutePopup(), ScCsvGrid::GetFocus(), ScAccessibleCsvCell::grabFocus(), ScCsvGrid::ImplSetTextLineFix(), ScCsvGrid::ImplSetTextLineSep(), ScCsvGrid::InsertSplit(), ScCsvGrid::KeyInput(), ScCsvRuler::KeyInput(), ScCsvGrid::MouseMove(), ScCsvRuler::MoveCurrSplit(), ScCsvRuler::MoveCursor(), ScCsvGrid::MoveCursor(), ScCsvRuler::MoveMouseTracking(), ScCsvGrid::MoveSplit(), ScCsvGrid::RemoveAllSplits(), ScCsvGrid::RemoveSplit(), Repaint(), ScCsvGrid::Resize(), ScCsvGrid::ScrollVertRel(), ScCsvRuler::ScrollVertRel(), ScCsvGrid::Select(), ScCsvGrid::SelectRange(), ScAccessibleCsvRuler::setCaretPosition(), ScCsvGrid::SetColumnStates(), ScCsvGrid::SetSelColumnType(), ScCsvGrid::SetSplits(), ScCsvRuler::StartMouseTracking(), ScCsvGrid::StyleUpdated(), ScCsvGrid::UpdateLayoutData(), and ScCsvGrid::UpdateOffsetX().
|
inline |
Definition at line 258 of file csvcontrol.hxx.
Referenced by ScAccessibleCsvCell::getAccessibleParent(), ScAccessibleCsvRuler::getAccessibleRelationSet(), and ScAccessibleCsvGrid::getAccessibleRelationSet().
|
inline |
Returns the width of one character column.
Definition at line 318 of file csvcontrol.hxx.
References mrData.
Referenced by ScAccessibleCsvRuler::getCharacterBounds(), ScCsvGrid::GetColumnFromX(), GetPosFromX(), GetVisPosCount(), GetX(), ScAccessibleCsvCell::implCalcPixelWidth(), ScCsvGrid::ImplDrawCellText(), ScCsvGrid::ImplDrawHorzScrolled(), ScCsvRuler::InitSizeData(), ScCsvGrid::MouseMove(), and ScCsvRuler::UpdateSplitSize().
|
inline |
Returns data of the last command.
Definition at line 284 of file csvcontrol.hxx.
|
inline |
Returns index of first visible line.
Definition at line 335 of file csvcontrol.hxx.
References mrData.
Referenced by ScCsvGrid::Command(), ScAccessibleCsvGrid::getAccessibleAtPoint(), ScCsvGrid::GetCellText(), GetLastVisLine(), GetLineFromY(), GetY(), ScCsvGrid::ImplDrawColumnBackgr(), ScCsvGrid::ImplDrawFirstLineSep(), ScCsvGrid::ImplDrawRowHeaders(), ScAccessibleCsvGrid::implGetCellText(), ScAccessibleCsvGrid::implGetRowCount(), ScCsvGrid::ImplSetTextLineFix(), ScCsvGrid::ImplSetTextLineSep(), IsVisibleLine(), ScCsvGrid::ScrollVertRel(), and ScCsvRuler::ScrollVertRel().
|
inline |
Returns the first visible position.
Definition at line 304 of file csvcontrol.hxx.
References mrData.
Referenced by ScCsvGrid::GetColumnFromX(), ScCsvGrid::GetFirstVisColumn(), ScCsvGrid::GetNoScrollCol(), ScCsvRuler::GetNoScrollPos(), GetPosFromX(), GetX(), ScCsvGrid::ImplDrawColumnBackgr(), ScCsvGrid::ImplDrawHorzScrolled(), ScCsvRuler::ImplDrawRulerDev(), ScCsvGrid::IsVisibleColumn(), IsVisibleSplitPos(), ScCsvGrid::MouseMove(), and ScCsvGrid::MoveCursor().
sal_Int32 ScCsvControl::GetFirstX | ( | ) | const |
Returns the X position of the first pixel of the data area.
Definition at line 185 of file csvcontrol.cxx.
References GetHdrWidth(), and IsRTL().
Referenced by ScCsvGrid::Command(), ScAccessibleCsvGrid::getAccessibleAtPoint(), ScCsvGrid::GetColumnFromX(), ScCsvGrid::GetFocusRect(), GetPosFromX(), GetX(), ScCsvRuler::ImplDrawArea(), ScCsvGrid::ImplDrawBackgrDev(), ScCsvGrid::ImplDrawFirstLineSep(), ScCsvGrid::ImplDrawHorzScrolled(), ScAccessibleCsvCell::implGetBounds(), ScCsvGrid::ImplSetColumnClipRegion(), ScCsvRuler::InitSizeData(), ScCsvGrid::MouseButtonDown(), and ScCsvGrid::MouseMove().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Reimplemented in ScCsvGrid, and ScCsvRuler.
Definition at line 74 of file csvcontrol.cxx.
References AccSendFocusEvent(), and weld::CustomWidgetController::GetFocus().
Referenced by ScCsvGrid::GetFocus(), and ScCsvRuler::GetFocus().
|
inline |
Returns the data grid cursor position (not column index!).
Definition at line 358 of file csvcontrol.hxx.
References mrData.
Referenced by ScCsvGrid::GetFocus(), and ScCsvGrid::GetFocusColumn().
|
inline |
Returns the height of the header line.
Definition at line 347 of file csvcontrol.hxx.
References mrData.
Referenced by ScAccessibleCsvGrid::getAccessibleAtPoint(), GetLineFromY(), GetVisLineCount(), GetY(), ScCsvGrid::ImplDrawColumnBackgr(), ScCsvGrid::ImplDrawColumnHeader(), ScCsvGrid::ImplDrawColumnSelection(), ScCsvGrid::ImplDrawRowHeaders(), ScAccessibleCsvCell::implGetBounds(), ScAccessibleCsvCell::implGetRealSize(), ScCsvGrid::ImplInvertCursor(), and ScCsvGrid::MouseButtonDown().
|
inline |
Returns the width of the header column.
Definition at line 316 of file csvcontrol.hxx.
References mrData.
Referenced by GetFirstX(), GetHdrX(), GetLastX(), GetVisPosCount(), ScCsvGrid::ImplDrawBackgrDev(), ScCsvGrid::ImplDrawRowHeaders(), ScAccessibleCsvCell::implGetRealSize(), and ScCsvRuler::InitSizeData().
sal_Int32 ScCsvControl::GetHdrX | ( | ) | const |
Returns the start position of the header column.
Definition at line 180 of file csvcontrol.cxx.
References GetHdrWidth(), IsRTL(), ScCsvLayoutData::mnWinWidth, and mrData.
Referenced by ScCsvGrid::ImplDrawRowHeaders(), and ScAccessibleCsvCell::implGetRealPos().
|
static |
Returns direction code for the keys LEFT, RIGHT, HOME, END.
bHomeEnd | false = ignore HOME and END key. |
Definition at line 252 of file csvcontrol.cxx.
References KEY_END, KEY_HOME, KEY_LEFT, KEY_RIGHT, MOVE_FIRST, MOVE_LAST, MOVE_NEXT, MOVE_NONE, and MOVE_PREV.
Referenced by ScCsvGrid::KeyInput(), and ScCsvRuler::KeyInput().
sal_Int32 ScCsvControl::GetLastVisLine | ( | ) | const |
Returns index of last visible line.
Definition at line 210 of file csvcontrol.cxx.
References GetFirstVisLine(), GetLineCount(), and GetVisLineCount().
Referenced by ScCsvGrid::GetFocusRect(), ScCsvGrid::ImplDrawColumnBackgr(), ScCsvGrid::ImplDrawColumnSelection(), ScCsvGrid::ImplDrawRowHeaders(), ScAccessibleCsvGrid::implGetRowCount(), ScCsvGrid::ImplInvertCursor(), IsVisibleLine(), and ScCsvGrid::UpdateOffsetX().
|
inline |
Returns the last visible position.
Definition at line 306 of file csvcontrol.hxx.
Referenced by ScCsvGrid::GetColumnFromX(), ScCsvGrid::GetLastVisColumn(), ScCsvGrid::GetNoScrollCol(), ScCsvRuler::GetNoScrollPos(), ScCsvGrid::ImplDrawColumnBackgr(), ScCsvRuler::ImplDrawRulerDev(), ScCsvGrid::IsVisibleColumn(), IsVisibleSplitPos(), and ScCsvGrid::MoveCursor().
sal_Int32 ScCsvControl::GetLastX | ( | ) | const |
Returns the X position of the last pixel of the data area.
Definition at line 190 of file csvcontrol.cxx.
References GetHdrWidth(), IsRTL(), ScCsvLayoutData::mnWinWidth, and mrData.
Referenced by ScCsvGrid::Command(), ScAccessibleCsvGrid::getAccessibleAtPoint(), ScCsvGrid::GetFocusRect(), ScCsvRuler::ImplDrawArea(), ScCsvGrid::ImplDrawFirstLineSep(), ScCsvGrid::ImplDrawHorzScrolled(), ScAccessibleCsvCell::implGetBounds(), ScCsvGrid::ImplSetColumnClipRegion(), and ScCsvGrid::MouseButtonDown().
|
inline |
Returns a reference to the current layout data.
Definition at line 295 of file csvcontrol.hxx.
References mrData.
Referenced by ScCsvGrid::ApplyLayout(), and ScCsvRuler::ApplyLayout().
|
inline |
Returns the number of data lines.
Definition at line 331 of file csvcontrol.hxx.
References mrData.
Referenced by GetLastVisLine(), GetMaxLineOffset(), and IsValidLine().
sal_Int32 ScCsvControl::GetLineFromY | ( | sal_Int32 | nY | ) | const |
Returns line index from output coordinate.
Definition at line 235 of file csvcontrol.cxx.
References GetFirstVisLine(), GetHdrHeight(), and GetLineHeight().
Referenced by ScAccessibleCsvGrid::getAccessibleAtPoint().
|
inline |
Returns the height of one line.
Definition at line 349 of file csvcontrol.hxx.
References mrData.
Referenced by GetLineFromY(), GetVisLineCount(), GetY(), ScCsvGrid::ImplDrawCellText(), ScCsvGrid::ImplDrawColumnBackgr(), ScCsvGrid::ImplDrawRowHeaders(), and ScAccessibleCsvCell::implGetRealSize().
sal_Int32 ScCsvControl::GetMaxLineOffset | ( | ) | const |
Returns highest possible index for first line.
Definition at line 215 of file csvcontrol.cxx.
References GetLineCount(), and GetVisLineCount().
Referenced by ScCsvGrid::ScrollVertRel().
sal_Int32 ScCsvControl::GetMaxPosOffset | ( | ) | const |
Returns highest possible position for first visible character.
Definition at line 165 of file csvcontrol.cxx.
References GetPosCount(), and GetVisPosCount().
Referenced by ScCsvGrid::GetNoScrollCol(), and ScCsvRuler::GetNoScrollPos().
|
inline |
Returns the number of available positions.
Definition at line 300 of file csvcontrol.hxx.
References mrData.
Referenced by ScCsvGrid::ApplyLayout(), ScCsvRuler::ApplyLayout(), ScAccessibleCsvRuler::constructStringBuffer(), ScCsvRuler::FindEmptyPos(), ScAccessibleCsvRuler::getIndexAtPoint(), ScCsvGrid::GetLastVisColumn(), GetMaxPosOffset(), ScCsvGrid::ImplClearSplits(), ScCsvRuler::ImplDrawArea(), ScCsvGrid::ImplDrawHorzScrolled(), ScCsvGrid::ImplSetTextLineFix(), ScCsvGrid::ImplSetTextLineSep(), ScCsvRuler::InitSizeData(), IsValidSplitPos(), ScCsvGrid::MouseMove(), ScCsvRuler::MouseMove(), ScCsvRuler::MoveCursorRel(), and ScCsvRuler::MoveCursorToSplit().
sal_Int32 ScCsvControl::GetPosFromX | ( | sal_Int32 | nX | ) | const |
Returns position from output coordinate.
Definition at line 200 of file csvcontrol.cxx.
References GetCharWidth(), GetFirstVisPos(), and GetFirstX().
Referenced by ScAccessibleCsvRuler::getIndexAtPoint(), ScCsvRuler::ImplDrawBackgrDev(), ScCsvRuler::MouseButtonDown(), and ScCsvRuler::MouseMove().
|
inline |
Returns the ruler cursor position.
Definition at line 356 of file csvcontrol.hxx.
References mrData.
Referenced by ScCsvGrid::ApplyLayout(), ScCsvRuler::ApplyLayout(), ScCsvRuler::GetFocus(), ScCsvGrid::ImplDrawColumnSelection(), ScCsvGrid::ImplDrawHorzScrolled(), ScCsvRuler::ImplDrawRulerDev(), ScCsvRuler::ImplEraseSplit(), ScCsvRuler::KeyInput(), ScCsvRuler::LoseFocus(), ScCsvRuler::MouseMove(), ScCsvRuler::MoveCurrSplit(), ScCsvRuler::MoveCurrSplitRel(), ScCsvRuler::MoveCursorRel(), ScCsvRuler::MoveCursorToSplit(), ScAccessibleCsvRuler::SendCaretEvent(), and ScAccessibleCsvRuler::setCaretPosition().
|
static |
Returns direction code for the keys UP, DOWN, HOME, END, PAGE UP, PAGE DOWN.
bHomeEnd | false = ignore HOME and END key. |
Definition at line 267 of file csvcontrol.cxx.
References KEY_DOWN, KEY_END, KEY_HOME, KEY_PAGEDOWN, KEY_PAGEUP, KEY_UP, MOVE_FIRST, MOVE_LAST, MOVE_NEXT, MOVE_NEXTPAGE, MOVE_NONE, MOVE_PREV, and MOVE_PREVPAGE.
Referenced by ScCsvGrid::KeyInput(), and ScCsvRuler::KeyInput().
sal_Int32 ScCsvControl::GetVisLineCount | ( | ) | const |
Returns the number of visible lines (including partly visible bottom line).
Definition at line 205 of file csvcontrol.cxx.
References GetHdrHeight(), GetLineHeight(), ScCsvLayoutData::mnWinHeight, and mrData.
Referenced by GetLastVisLine(), GetMaxLineOffset(), ScCsvGrid::ScrollVertRel(), and ScCsvRuler::ScrollVertRel().
sal_Int32 ScCsvControl::GetVisPosCount | ( | ) | const |
Returns the number of visible positions.
Definition at line 160 of file csvcontrol.cxx.
References GetCharWidth(), GetHdrWidth(), ScCsvLayoutData::mnWinWidth, and mrData.
Referenced by GetMaxPosOffset(), ScCsvGrid::ImplDrawHorzScrolled(), and ScCsvGrid::MoveCursor().
sal_Int32 ScCsvControl::GetX | ( | sal_Int32 | nPos | ) | const |
Returns output X coordinate of the specified position.
Definition at line 195 of file csvcontrol.cxx.
References GetCharWidth(), GetFirstVisPos(), GetFirstX(), and nPos.
Referenced by ScAccessibleCsvRuler::getCharacterBounds(), ScCsvGrid::GetColumnX(), ScCsvRuler::ImplDrawArea(), ScCsvRuler::ImplDrawBackgrDev(), ScCsvGrid::ImplDrawColumnBackgr(), ScCsvGrid::ImplDrawHorzScrolled(), ScCsvRuler::ImplDrawSplit(), ScCsvRuler::ImplEraseSplit(), ScCsvGrid::ImplInvertCursor(), and ScCsvRuler::ImplInvertCursor().
sal_Int32 ScCsvControl::GetY | ( | sal_Int32 | nLine | ) | const |
Returns output Y coordinate of the specified line.
Definition at line 230 of file csvcontrol.cxx.
References GetFirstVisLine(), GetHdrHeight(), and GetLineHeight().
Referenced by ScCsvGrid::GetFocusRect(), ScCsvGrid::ImplDrawColumnBackgr(), ScCsvGrid::ImplDrawColumnSelection(), ScCsvGrid::ImplDrawFirstLineSep(), ScCsvGrid::ImplDrawRowHeaders(), ScAccessibleCsvCell::implGetRealPos(), and ScCsvGrid::ImplInvertCursor().
|
static |
Inverts a rectangle in the specified output device.
Definition at line 242 of file csvcontrol.cxx.
References COL_BLACK(), OutputDevice::DrawRect(), vcl::FILLCOLOR, vcl::LINECOLOR, OutputDevice::Pop(), OutputDevice::Push(), vcl::RASTEROP, OutputDevice::SetFillColor(), OutputDevice::SetLineColor(), and OutputDevice::SetRasterOp().
Referenced by ScCsvGrid::ImplDrawColumnSelection(), ScCsvGrid::ImplInvertCursor(), and ScCsvRuler::ImplInvertCursor().
|
inline |
Sets the graphic invalid (next Redraw() will not use cached graphic).
Definition at line 263 of file csvcontrol.hxx.
Referenced by ScCsvGrid::ApplyLayout(), ScCsvGrid::ImplClearSplits(), ScCsvGrid::ImplSetTextLineFix(), ScCsvGrid::ImplSetTextLineSep(), ScCsvGrid::InitColors(), ScCsvRuler::InitColors(), ScCsvGrid::InitFonts(), ScCsvGrid::InitSizeData(), ScCsvRuler::InitSizeData(), and Repaint().
|
inline |
Returns true, if controls will not repaint.
Definition at line 277 of file csvcontrol.hxx.
References mrData.
Referenced by EnableRepaint(), and Repaint().
|
inline |
Returns true, if the Right-to-Left layout mode is active.
Definition at line 297 of file csvcontrol.hxx.
References mrData.
Referenced by GetFirstX(), GetHdrX(), GetLastX(), and ScCsvGrid::ImplDrawRowHeaders().
|
inline |
Returns true, if cached graphic is valid.
Definition at line 267 of file csvcontrol.hxx.
Referenced by ScCsvGrid::ImplDrawHorzScrolled(), ScCsvGrid::ImplRedraw(), and ScCsvRuler::ImplRedraw().
bool ScCsvControl::IsValidLine | ( | sal_Int32 | nLine | ) | const |
Returns true, if nLine is a valid line index.
Definition at line 220 of file csvcontrol.cxx.
References GetLineCount().
Referenced by IsVisibleLine().
bool ScCsvControl::IsValidSplitPos | ( | sal_Int32 | nPos | ) | const |
Returns true, if it is allowed to set a split at nPos.
Definition at line 170 of file csvcontrol.cxx.
References GetPosCount(), and nPos.
Referenced by ScCsvRuler::FindEmptyPos(), and IsVisibleSplitPos().
bool ScCsvControl::IsVisibleLine | ( | sal_Int32 | nLine | ) | const |
Returns true, if nLine is a valid and visible line index.
Definition at line 225 of file csvcontrol.cxx.
References GetFirstVisLine(), GetLastVisLine(), and IsValidLine().
Referenced by ScCsvGrid::ImplDrawFirstLineSep().
bool ScCsvControl::IsVisibleSplitPos | ( | sal_Int32 | nPos | ) | const |
Returns true, if nPos is an allowed AND visible split position.
Definition at line 175 of file csvcontrol.cxx.
References GetFirstVisPos(), GetLastVisPos(), IsValidSplitPos(), and nPos.
Referenced by ScCsvRuler::ImplDrawSplit(), ScCsvRuler::ImplEraseSplit(), ScCsvGrid::ImplInvertCursor(), ScCsvRuler::ImplInvertCursor(), ScCsvRuler::MouseButtonDown(), ScCsvRuler::MouseMove(), and ScCsvRuler::MoveCursor().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Reimplemented in ScCsvGrid, and ScCsvRuler.
Definition at line 80 of file csvcontrol.cxx.
References AccSendFocusEvent(), and weld::CustomWidgetController::LoseFocus().
Referenced by ScCsvGrid::LoseFocus(), and ScCsvRuler::LoseFocus().
void ScCsvControl::Repaint | ( | bool | bInvalidate = false | ) |
Repaints all controls.
bInvalidate | true = invalidates graphics of this control (not all). |
Definition at line 130 of file csvcontrol.cxx.
References CSVCMD_REPAINT, Execute(), InvalidateGfx(), and IsNoRepaint().
Referenced by ScCsvGrid::ConfigurationChanged(), EnableRepaint(), ScCsvGrid::GetFocus(), ScCsvRuler::InsertSplit(), ScCsvGrid::LoseFocus(), ScCsvRuler::MoveSplit(), ScCsvRuler::RemoveAllSplits(), ScCsvRuler::RemoveSplit(), ScCsvRuler::Resize(), ScCsvGrid::Select(), ScCsvGrid::SelectRange(), ScCsvGrid::SetFirstImportedLine(), ScCsvGrid::SetSelColumnType(), ScCsvGrid::SetTypeNames(), and ScCsvRuler::StyleUpdated().
|
inline |
Sets a new command handler.
Definition at line 282 of file csvcontrol.hxx.
|
inline |
Sets the graphic valid (next Redraw() will use cached graphic).
Definition at line 265 of file csvcontrol.hxx.
Referenced by ScCsvGrid::ImplRedraw(), ScCsvRuler::ImplRedraw(), ScCsvGrid::InsertSplit(), ScCsvGrid::MoveSplit(), and ScCsvGrid::RemoveSplit().
|
private |
|
private |
Definition at line 225 of file csvcontrol.hxx.
Referenced by Execute().
|
private |
Shared layout data.
Definition at line 229 of file csvcontrol.hxx.
|
private |
Data of last command.
Definition at line 227 of file csvcontrol.hxx.
Referenced by DisableRepaint(), EnableRepaint(), GetHdrX(), GetLastX(), GetVisLineCount(), and GetVisPosCount().
|
protected |
Content of virtual devices valid?
Definition at line 232 of file csvcontrol.hxx.
Referenced by AccSendCaretEvent(), AccSendFocusEvent(), AccSendInsertColumnEvent(), AccSendRemoveColumnEvent(), AccSendSelectionEvent(), AccSendTableUpdateEvent(), AccSendVisibleEvent(), ScCsvGrid::CreateAccessible(), ScCsvRuler::CreateAccessible(), and ~ScCsvControl().