LibreOffice Module sc (master) 1
|
A data grid control for the CSV import dialog. More...
#include <csvgrid.hxx>
Public Member Functions | |
ScCsvGrid (const ScCsvLayoutData &rData, std::unique_ptr< weld::Menu > xPopup, ScCsvTableBox *pTableBox) | |
Mouse tracking mode: true = select, false = deselect. More... | |
virtual void | SetDrawingArea (weld::DrawingArea *pDrawingArea) override |
ScCsvTableBox * | GetTableBox () |
virtual | ~ScCsvGrid () override |
void | Init () |
Finishes initialization. More... | |
void | UpdateLayoutData () |
Updates layout data dependent from the control's state. More... | |
void | UpdateOffsetX () |
Updates X coordinate of first visible position dependent from line numbers. More... | |
void | ApplyLayout (const ScCsvLayoutData &rOldData) |
Apply current layout data to the grid control. More... | |
void | SetFirstImportedLine (sal_Int32 nLine) |
Sets the number of the first imported line (for visual feedback). More... | |
sal_Int32 | GetNoScrollCol (sal_Int32 nPos) const |
Finds a column position nearest to nPos which does not cause scrolling the visible area. 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) |
Inserts a new or removes an existing split. More... | |
void | RemoveAllSplits () |
Removes all splits. More... | |
void | SetSplits (const ScCsvSplits &rSplits) |
Removes all splits and inserts the splits from rSplits. More... | |
sal_uInt32 | GetColumnCount () const |
Returns the number of columns. More... | |
sal_uInt32 | GetFirstVisColumn () const |
Returns the index of the first visible column. More... | |
sal_uInt32 | GetLastVisColumn () const |
Returns the index of the last visible column. More... | |
bool | IsValidColumn (sal_uInt32 nColIndex) const |
Returns true, if nColIndex points to an existing column. More... | |
bool | IsVisibleColumn (sal_uInt32 nColIndex) const |
Returns true, if column with index nColIndex is (at least partly) visible. More... | |
sal_Int32 | GetColumnX (sal_uInt32 nColIndex) const |
Returns X coordinate of the specified column. More... | |
sal_uInt32 | GetColumnFromX (sal_Int32 nX) const |
Returns column index from output coordinate. More... | |
sal_Int32 | GetColumnPos (sal_uInt32 nColIndex) const |
Returns start position of the column with the specified index. More... | |
sal_uInt32 | GetColumnFromPos (sal_Int32 nPos) const |
Returns column index from position. More... | |
sal_Int32 | GetColumnWidth (sal_uInt32 nColIndex) const |
Returns the character width of the column with the specified index. More... | |
const ScCsvColStateVec & | GetColumnStates () const |
Returns the vector with the states of all columns. More... | |
void | SetColumnStates (ScCsvColStateVec &&rColStates) |
Sets all column states to the values in the passed vector. More... | |
sal_Int32 | GetSelColumnType () const |
Returns the data type of the selected columns. More... | |
void | SetSelColumnType (sal_Int32 nType) |
Changes the data type of all selected columns. More... | |
void | SetTypeNames (std::vector< OUString > &&rTypeNames) |
Sets new UI data type names. More... | |
OUString | GetColumnTypeName (sal_uInt32 nColIndex) const |
Returns the UI type name of the specified column. More... | |
void | FillColumnDataSep (ScAsciiOptions &rOptions) const |
Fills the options object with column data for separators mode. More... | |
void | FillColumnDataFix (ScAsciiOptions &rOptions) const |
Fills the options object with column data for fixed width mode. More... | |
bool | IsSelected (sal_uInt32 nColIndex) const |
Returns true, if the specified column is selected. More... | |
sal_uInt32 | GetFirstSelected () const |
Returns index of the first selected column. More... | |
sal_uInt32 | GetNextSelected (sal_uInt32 nFromIndex) const |
Returns index of the first selected column really after nFromIndex. More... | |
void | Select (sal_uInt32 nColIndex, bool bSelect=true) |
Selects or deselects the specified column. More... | |
void | ToggleSelect (sal_uInt32 nColIndex) |
Toggles selection of the specified column. More... | |
void | SelectRange (sal_uInt32 nColIndex1, sal_uInt32 nColIndex2, bool bSelect=true) |
Selects or deselects the specified column range. More... | |
void | SelectAll (bool bSelect=true) |
Selects or deselects all columns. More... | |
sal_uInt32 | GetFocusColumn () const |
Returns index of the focused column. More... | |
void | ImplSetTextLineSep (sal_Int32 nLine, const OUString &rTextLine, const OUString &rSepChars, sal_Unicode cTextSep, bool bMergeSep, bool bRemoveSpace=false) |
Fills all cells of a line with the passed text (separators mode). More... | |
void | ImplSetTextLineFix (sal_Int32 nLine, const OUString &rTextLine) |
Fills all cells of a line with the passed text (fixed width mode). More... | |
OUString | GetCellText (sal_uInt32 nColIndex, sal_Int32 nLine) const |
Returns the text of the specified cell. More... | |
void | ImplRedraw (vcl::RenderContext &rRenderContext) |
Redraws the entire data grid. More... | |
EditEngine * | GetEditEngine () |
Returns a pointer to the used edit engine. 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 |
Public Member Functions inherited from utl::ConfigurationListener | |
virtual | ~ConfigurationListener () |
virtual void | ConfigurationChanged (ConfigurationBroadcaster *p, ConfigurationHints nHint)=0 |
Protected Member Functions | |
virtual void | Resize () override |
virtual void | GetFocus () override |
virtual void | LoseFocus () 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 bool | Command (const CommandEvent &rCEvt) override |
virtual tools::Rectangle | GetFocusRect () override |
virtual void | StyleUpdated () override |
virtual void | ConfigurationChanged (::utl::ConfigurationBroadcaster *, ConfigurationHints) 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 | |
SAL_DLLPRIVATE void | InitColors () |
Reads colors from system settings. More... | |
SAL_DLLPRIVATE void | InitFonts () |
Initializes all font settings. More... | |
SAL_DLLPRIVATE void | InitSizeData () |
Initializes all data dependent from the control's size. More... | |
SAL_DLLPRIVATE bool | ImplInsertSplit (sal_Int32 nPos) |
Inserts a split and adjusts column data. More... | |
SAL_DLLPRIVATE bool | ImplRemoveSplit (sal_Int32 nPos) |
Removes a split and adjusts column data. More... | |
SAL_DLLPRIVATE void | ImplClearSplits () |
Clears the split array and re-inserts boundary splits. More... | |
SAL_DLLPRIVATE sal_Int32 | GetColumnType (sal_uInt32 nColIndex) const |
Returns the data type of the specified column. More... | |
SAL_DLLPRIVATE void | SetColumnType (sal_uInt32 nColIndex, sal_Int32 nColType) |
Sets the data type of the specified column. More... | |
SAL_DLLPRIVATE void | ScrollVertRel (ScMoveMode eDir) |
Scrolls data grid vertically. More... | |
SAL_DLLPRIVATE void | ExecutePopup (const Point &rPos) |
Executes the data type popup menu. More... | |
SAL_DLLPRIVATE void | MoveCursor (sal_uInt32 nColIndex) |
Moves column cursor to a new position. More... | |
SAL_DLLPRIVATE void | MoveCursorRel (ScMoveMode eDir) |
Moves column cursor to the given direction. More... | |
SAL_DLLPRIVATE void | ImplClearSelection () |
Clears the entire selection without notify. More... | |
SAL_DLLPRIVATE void | DoSelectAction (sal_uInt32 nColIndex, sal_uInt16 nModifier) |
Executes selection action for a specific column. More... | |
sal_Int32 | GetWidth () const |
Returns the width of the control. More... | |
sal_Int32 | GetHeight () const |
Returns the height of the control. More... | |
SAL_DLLPRIVATE void | ImplSetColumnClipRegion (OutputDevice &rOutDev, sal_uInt32 nColIndex) |
Sets a clip region in the specified output device for the specified column. More... | |
SAL_DLLPRIVATE void | ImplDrawColumnHeader (OutputDevice &rOutDev, sal_uInt32 nColIndex, Color aFillColor) |
Draws the header of the specified column to the specified output device. More... | |
SAL_DLLPRIVATE void | ImplDrawCellText (const Point &rPos, const OUString &rText) |
Draws the text at the specified position to maBackgrDev. More... | |
SAL_DLLPRIVATE void | ImplDrawFirstLineSep (bool bSet) |
Draws the "first imported line" separator to maBackgrDev (or erases, if bSet is false). More... | |
SAL_DLLPRIVATE void | ImplDrawColumnBackgr (sal_uInt32 nColIndex) |
Draws the column with index nColIndex to maBackgrDev. More... | |
SAL_DLLPRIVATE void | ImplDrawRowHeaders () |
Draws the row headers column to maBackgrDev. More... | |
SAL_DLLPRIVATE void | ImplDrawBackgrDev () |
Draws all columns and the row headers column to maBackgrDev. More... | |
SAL_DLLPRIVATE void | ImplDrawColumnSelection (sal_uInt32 nColIndex) |
Draws the column with index nColIndex with its selection state to maGridDev. More... | |
SAL_DLLPRIVATE void | ImplDrawGridDev () |
Draws all columns with selection and cursor to maGridDev. More... | |
SAL_DLLPRIVATE void | ImplDrawColumn (sal_uInt32 nColIndex) |
Redraws the entire column (background and selection). More... | |
SAL_DLLPRIVATE void | ImplDrawHorzScrolled (sal_Int32 nOldPos) |
Optimized drawing: Scrolls horizontally and redraws only missing parts. More... | |
SAL_DLLPRIVATE void | ImplInvertCursor (sal_Int32 nPos) |
Inverts the cursor bar at the specified position in maGridDev. More... | |
Private Attributes | |
ScCsvTableBox * | mpTableBox |
VclPtr< VirtualDevice > | mpBackgrDev |
Grid Parent. More... | |
VclPtr< VirtualDevice > | mpGridDev |
Grid background, headers, cell texts. More... | |
std::unique_ptr< weld::Menu > | mxPopup |
Data grid with selection and cursor. More... | |
::svtools::ColorConfig * | mpColorConfig |
Popup menu for column types. More... | |
Color | maBackColor |
Application color configuration. More... | |
Color | maGridColor |
Cell background color. More... | |
Color | maGridPBColor |
Table grid color. More... | |
Color | maAppBackColor |
Grid color for "first imported line" delimiter. More... | |
Color | maTextColor |
Background color for unused area. More... | |
Color | maHeaderBackColor |
Text color for data area. More... | |
Color | maHeaderGridColor |
Background color for headers. More... | |
Color | maHeaderTextColor |
Grid color for headers. More... | |
Color | maSelectColor |
Text color for headers. More... | |
std::unique_ptr< ScEditEngineDefaulter > | mpEditEngine |
Header color of selected columns. More... | |
vcl::Font | maHeaderFont |
For drawing cell texts. More... | |
vcl::Font | maMonoFont |
Font for column and row headers. More... | |
Size | maWinSize |
Monospace font for data cells. More... | |
Size | maEdEngSize |
Size of the control. More... | |
ScCsvSplits | maSplits |
Paper size for edit engine. More... | |
ScCsvColStateVec | maColStates |
Vector with split positions. More... | |
std::vector< OUString > | maTypeNames |
State of each column. More... | |
std::vector< std::vector< OUString > > | maTexts |
UI names of data types. More... | |
sal_Int32 | mnFirstImpLine |
2D-vector for cell texts. More... | |
sal_uInt32 | mnRecentSelCol |
First imported line (0-based). More... | |
sal_uInt32 | mnMTCurrCol |
Index of most recently selected column. More... | |
bool | mbTracking |
Current column of mouse tracking. More... | |
bool | mbMTSelecting |
True if Mouse tracking. 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 data grid control for the CSV import dialog.
The design of this control simulates a Calc spreadsheet with row and column headers.
Definition at line 57 of file csvgrid.hxx.
|
explicit |
Mouse tracking mode: true = select, false = deselect.
Definition at line 75 of file csvgrid.cxx.
References Create(), VclPtr< class reference_type >::get(), get(), maEdEngSize, mpBackgrDev, mpEditEngine, and SAL_MAX_UINT32.
|
overridevirtual |
Definition at line 124 of file csvgrid.cxx.
References VclPtr< class reference_type >::disposeAndClear(), mpBackgrDev, mpColorConfig, and mpGridDev.
void ScCsvGrid::ApplyLayout | ( | const ScCsvLayoutData & | rOldData | ) |
Apply current layout data to the grid control.
Definition at line 172 of file csvgrid.cxx.
References ScCsvControl::AccSendVisibleEvent(), ScCsvSplits::Count(), CSVCMD_UPDATECELLTEXTS, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), Equal, ScCsvControl::Execute(), ScCsvLayoutData::GetDiff(), ScCsvControl::GetLayoutData(), ScCsvControl::GetPosCount(), ScCsvControl::GetRulerCursorPos(), HorizontalMask, ImplDrawHorzScrolled(), ImplInvertCursor(), ScCsvSplits::Insert(), ScCsvControl::InvalidateGfx(), LineOffset, maColStates, maSplits, ScCsvLayoutData::mnPosCount, ScCsvLayoutData::mnPosCursor, ScCsvLayoutData::mnPosOffset, PosCount, PosOffset, ScCsvSplits::Remove(), ScCsvSplits::RemoveRange(), RulerCursor, SelectAll(), UpdateOffsetX(), and VerticalMask.
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 1012 of file csvgrid.cxx.
References tools::Rectangle::Contains(), CSVCMD_SETLINEOFFSET, DoSelectAction(), ScCsvControl::Execute(), ExecutePopup(), GetColumnFromX(), GetColumnX(), CommandEvent::GetCommand(), ScCsvControl::GetFirstVisLine(), ScCsvControl::GetFirstX(), GetFocusColumn(), GetHeight(), ScCsvControl::GetLastX(), CommandEvent::GetMousePosPixel(), CommandEvent::GetWheelData(), GetWidth(), CommandEvent::IsMouseEvent(), IsSelected(), IsValidColumn(), maWinSize, pData, Select(), and Point::X().
|
overrideprotectedvirtual |
Definition at line 1069 of file csvgrid.cxx.
References InitColors(), and ScCsvControl::Repaint().
|
overrideprotectedvirtual |
Creates a new accessible object.
Reimplemented from weld::CustomWidgetController.
Definition at line 1409 of file csvgrid.cxx.
References ScCsvControl::mxAccessible.
|
private |
Executes selection action for a specific column.
Definition at line 758 of file csvgrid.cxx.
References CSVCMD_MOVEGRIDCURSOR, ScCsvControl::Execute(), GetColumnPos(), ImplClearSelection(), KEY_MOD1, KEY_SHIFT, mbMTSelecting, mbTracking, mnRecentSelCol, Select(), SelectRange(), and ToggleSelect().
Referenced by Command(), MouseButtonDown(), and MouseMove().
|
private |
Executes the data type popup menu.
Definition at line 627 of file csvgrid.cxx.
References CSVCMD_SETCOLUMNTYPE, ScCsvControl::Execute(), weld::CustomWidgetController::GetDrawingArea(), and mxPopup.
Referenced by Command().
void ScCsvGrid::FillColumnDataFix | ( | ScAsciiOptions & | rOptions | ) | const |
Fills the options object with column data for fixed width mode.
Definition at line 592 of file csvgrid.cxx.
References GetColumnCount(), GetColumnPos(), GetColumnType(), lcl_GetExtColumnType(), MAXCOLCOUNT, ScCsvExpData::mnIndex, ScCsvExpData::mnType, nCount, SAL_MAX_INT32, SC_COL_SKIP, and ScAsciiOptions::SetColumnInfo().
void ScCsvGrid::FillColumnDataSep | ( | ScAsciiOptions & | rOptions | ) | const |
Fills the options object with column data for separators mode.
Definition at line 576 of file csvgrid.cxx.
References CSV_TYPE_DEFAULT, GetColumnCount(), GetColumnType(), lcl_GetExtColumnType(), nCount, and ScAsciiOptions::SetColumnInfo().
OUString ScCsvGrid::GetCellText | ( | sal_uInt32 | nColIndex, |
sal_Int32 | nLine | ||
) | const |
Returns the text of the specified cell.
Definition at line 865 of file csvgrid.cxx.
References ScCsvControl::GetFirstVisLine(), and maTexts.
Referenced by ScAccessibleCsvGrid::implGetCellText().
|
inline |
Returns the number of columns.
Definition at line 149 of file csvgrid.hxx.
Referenced by FillColumnDataFix(), FillColumnDataSep(), GetNextSelected(), ImplClearSplits(), ScAccessibleCsvGrid::implGetColumnCount(), ImplInsertSplit(), ImplSetTextLineFix(), ImplSetTextLineSep(), IsValidColumn(), MoveCursorRel(), SelectAll(), and SetColumnStates().
sal_uInt32 ScCsvGrid::GetColumnFromPos | ( | sal_Int32 | nPos | ) | const |
Returns column index from position.
A split counts to its following column.
Definition at line 488 of file csvgrid.cxx.
References maSplits, nPos, and ScCsvSplits::UpperBound().
Referenced by GetColumnFromX(), GetFirstVisColumn(), GetLastVisColumn(), ImplDrawHorzScrolled(), ImplInsertSplit(), ImplRemoveSplit(), InsertSplit(), MouseMove(), MoveSplit(), and RemoveSplit().
sal_uInt32 ScCsvGrid::GetColumnFromX | ( | sal_Int32 | nX | ) | const |
Returns column index from output coordinate.
Definition at line 481 of file csvgrid.cxx.
References CSV_COLUMN_INVALID, ScCsvControl::GetCharWidth(), GetColumnFromPos(), ScCsvControl::GetFirstVisPos(), ScCsvControl::GetFirstX(), ScCsvControl::GetLastVisPos(), and nPos.
Referenced by Command(), ScAccessibleCsvGrid::getAccessibleAtPoint(), and MouseButtonDown().
|
inline |
Returns start position of the column with the specified index.
Definition at line 166 of file csvgrid.hxx.
Referenced by DoSelectAction(), FillColumnDataFix(), GetColumnWidth(), GetColumnX(), ScAccessibleCsvCell::grabFocus(), ImplDrawColumnBackgr(), IsVisibleColumn(), MoveCursor(), and MoveSplit().
|
inline |
Returns the vector with the states of all columns.
Definition at line 173 of file csvgrid.hxx.
|
private |
Returns the data type of the specified column.
Definition at line 507 of file csvgrid.cxx.
References CSV_TYPE_NOSELECTION, IsValidColumn(), and maColStates.
Referenced by FillColumnDataFix(), FillColumnDataSep(), GetColumnTypeName(), GetSelColumnType(), and ImplInsertSplit().
OUString ScCsvGrid::GetColumnTypeName | ( | sal_uInt32 | nColIndex | ) | const |
Returns the UI type name of the specified column.
Definition at line 562 of file csvgrid.cxx.
References GetColumnType(), and maTypeNames.
Referenced by ImplDrawColumnHeader(), and ScAccessibleCsvGrid::implGetCellText().
sal_Int32 ScCsvGrid::GetColumnWidth | ( | sal_uInt32 | nColIndex | ) | const |
Returns the character width of the column with the specified index.
Definition at line 493 of file csvgrid.cxx.
References GetColumnPos(), and IsValidColumn().
Referenced by ScAccessibleCsvCell::implGetRealSize(), ImplSetTextLineFix(), and ImplSetTextLineSep().
sal_Int32 ScCsvGrid::GetColumnX | ( | sal_uInt32 | nColIndex | ) | const |
Returns X coordinate of the specified column.
Definition at line 476 of file csvgrid.cxx.
References GetColumnPos(), and ScCsvControl::GetX().
Referenced by Command(), GetFocusRect(), ImplDrawColumnBackgr(), ImplDrawColumnHeader(), ImplDrawColumnSelection(), ImplDrawFirstLineSep(), ScAccessibleCsvCell::implGetRealPos(), and ImplSetColumnClipRegion().
EditEngine * ScCsvGrid::GetEditEngine | ( | ) |
Returns a pointer to the used edit engine.
Definition at line 1096 of file csvgrid.cxx.
References mpEditEngine.
Referenced by ScAccessibleCsvCell::implCreateEditSource().
sal_uInt32 ScCsvGrid::GetFirstSelected | ( | ) | const |
Returns index of the first selected column.
Definition at line 641 of file csvgrid.cxx.
References GetNextSelected(), and IsSelected().
Referenced by GetSelColumnType(), ScAccessibleCsvGrid::getSelectedAccessibleColumns(), ScAccessibleCsvGrid::implGetSelColumn(), ScAccessibleCsvGrid::implGetSelColumnCount(), and SetSelColumnType().
sal_uInt32 ScCsvGrid::GetFirstVisColumn | ( | ) | const |
Returns the index of the first visible column.
Definition at line 454 of file csvgrid.cxx.
References GetColumnFromPos(), and ScCsvControl::GetFirstVisPos().
Referenced by ImplDrawBackgrDev(), and ImplDrawGridDev().
|
overrideprotectedvirtual |
Reimplemented from ScCsvControl.
Definition at line 889 of file csvgrid.cxx.
References CSVCMD_MOVEGRIDCURSOR, ScCsvControl::Execute(), ScCsvControl::GetFocus(), ScCsvControl::GetGridCursorPos(), GetNoScrollCol(), and ScCsvControl::Repaint().
|
inline |
Returns index of the focused column.
Definition at line 219 of file csvgrid.hxx.
References ScCsvControl::GetGridCursorPos().
Referenced by Command(), ScAccessibleCsvCell::getAccessibleStateSet(), GetFocusRect(), KeyInput(), and MoveCursorRel().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 1394 of file csvgrid.cxx.
References GetColumnX(), ScCsvControl::GetFirstX(), GetFocusColumn(), weld::CustomWidgetController::GetFocusRect(), GetHeight(), ScCsvControl::GetLastVisLine(), ScCsvControl::GetLastX(), ScCsvControl::GetY(), weld::CustomWidgetController::HasFocus(), and IsVisibleColumn().
|
inlineprivate |
Returns the height of the control.
Definition at line 277 of file csvgrid.hxx.
References Size::Height().
Referenced by Command(), GetFocusRect(), ImplDrawBackgrDev(), ImplDrawHorzScrolled(), ImplDrawRowHeaders(), and ImplSetColumnClipRegion().
sal_uInt32 ScCsvGrid::GetLastVisColumn | ( | ) | const |
Returns the index of the last visible column.
Definition at line 459 of file csvgrid.cxx.
References GetColumnFromPos(), ScCsvControl::GetLastVisPos(), and ScCsvControl::GetPosCount().
Referenced by ImplDrawBackgrDev(), ImplDrawFirstLineSep(), and ImplDrawGridDev().
sal_uInt32 ScCsvGrid::GetNextSelected | ( | sal_uInt32 | nFromIndex | ) | const |
Returns index of the first selected column really after nFromIndex.
Definition at line 646 of file csvgrid.cxx.
References CSV_COLUMN_INVALID, GetColumnCount(), and IsSelected().
Referenced by GetFirstSelected(), GetSelColumnType(), ScAccessibleCsvGrid::getSelectedAccessibleColumns(), ScAccessibleCsvGrid::implGetSelColumn(), ScAccessibleCsvGrid::implGetSelColumnCount(), and SetSelColumnType().
sal_Int32 ScCsvGrid::GetNoScrollCol | ( | sal_Int32 | nPos | ) | const |
Finds a column position nearest to nPos which does not cause scrolling the visible area.
Definition at line 225 of file csvgrid.cxx.
References CSV_POS_INVALID, CSV_SCROLL_DIST, ScCsvControl::GetFirstVisPos(), ScCsvControl::GetLastVisPos(), ScCsvControl::GetMaxPosOffset(), and nPos.
Referenced by GetFocus().
sal_Int32 ScCsvGrid::GetSelColumnType | ( | ) | const |
Returns the data type of the selected columns.
Definition at line 521 of file csvgrid.cxx.
References CSV_COLUMN_INVALID, CSV_TYPE_MULTI, CSV_TYPE_NOSELECTION, GetColumnType(), GetFirstSelected(), GetNextSelected(), and nType.
|
inline |
Definition at line 97 of file csvgrid.hxx.
Referenced by ScAccessibleCsvGrid::getAccessibleRelationSet().
|
inlineprivate |
Returns the width of the control.
Definition at line 275 of file csvgrid.hxx.
References Size::Width().
Referenced by Command(), and ImplDrawBackgrDev().
|
private |
Clears the entire selection without notify.
Definition at line 752 of file csvgrid.cxx.
References ImplDrawGridDev(), and maColStates.
Referenced by DoSelectAction(), and KeyInput().
|
private |
Clears the split array and re-inserts boundary splits.
Definition at line 441 of file csvgrid.cxx.
References ScCsvControl::AccSendRemoveColumnEvent(), ScCsvSplits::Clear(), GetColumnCount(), ScCsvControl::GetPosCount(), ScCsvSplits::Insert(), ScCsvControl::InvalidateGfx(), maColStates, and maSplits.
Referenced by RemoveAllSplits(), SetDrawingArea(), and SetSplits().
|
private |
Draws all columns and the row headers column to maBackgrDev.
Definition at line 1260 of file csvgrid.cxx.
References CSV_COLUMN_INVALID, GetFirstVisColumn(), ScCsvControl::GetFirstX(), ScCsvControl::GetHdrWidth(), GetHeight(), GetLastVisColumn(), GetWidth(), ImplDrawColumnBackgr(), ImplDrawRowHeaders(), maAppBackColor, and mpBackgrDev.
Referenced by ImplDrawHorzScrolled(), and ImplRedraw().
|
private |
Draws the text at the specified position to maBackgrDev.
Definition at line 1128 of file csvgrid.cxx.
References ScCsvControl::GetCharWidth(), ScCsvControl::GetLineHeight(), maEdEngSize, maTextColor, mpBackgrDev, mpEditEngine, Point::X(), and Point::Y().
Referenced by ImplDrawColumnBackgr().
|
private |
Redraws the entire column (background and selection).
Definition at line 1319 of file csvgrid.cxx.
References ImplDrawColumnBackgr(), and ImplDrawColumnSelection().
Referenced by ImplDrawHorzScrolled(), InsertSplit(), MoveSplit(), and RemoveSplit().
|
private |
Draws the column with index nColIndex to maBackgrDev.
Definition at line 1176 of file csvgrid.cxx.
References EE_CHAR_COLOR(), GetColumnPos(), GetColumnX(), ScCsvControl::GetFirstVisLine(), ScCsvControl::GetFirstVisPos(), ScCsvControl::GetHdrHeight(), ScCsvControl::GetLastVisLine(), ScCsvControl::GetLastVisPos(), ScCsvControl::GetLineHeight(), ScCsvControl::GetX(), ScCsvControl::GetY(), ImplDrawCellText(), ImplDrawColumnHeader(), ImplDrawFirstLineSep(), ImplSetColumnClipRegion(), IsVisibleColumn(), maBackColor, maGridColor, maHeaderBackColor, maTextColor, maTexts, mpBackgrDev, and mpEditEngine.
Referenced by ImplDrawBackgrDev(), and ImplDrawColumn().
|
private |
Draws the header of the specified column to the specified output device.
Definition at line 1108 of file csvgrid.cxx.
References OutputDevice::DrawLine(), OutputDevice::DrawRect(), OutputDevice::DrawText(), GetColumnTypeName(), GetColumnX(), ScCsvControl::GetHdrHeight(), maHeaderFont, maHeaderGridColor, maHeaderTextColor, OutputDevice::SetFillColor(), OutputDevice::SetFont(), OutputDevice::SetLineColor(), OutputDevice::SetTextColor(), and OutputDevice::SetTextFillColor().
Referenced by ImplDrawColumnBackgr(), and ImplDrawColumnSelection().
|
private |
Draws the column with index nColIndex with its selection state to maGridDev.
Definition at line 1276 of file csvgrid.cxx.
References COL_LIGHTGRAY(), CSV_HDR_TRANSPARENCY, GetColumnX(), ScCsvControl::GetHdrHeight(), ScCsvControl::GetLastVisLine(), ScCsvControl::GetRulerCursorPos(), ScCsvControl::GetY(), ImplDrawColumnHeader(), ImplInvertCursor(), ScCsvControl::ImplInvertRect(), ImplSetColumnClipRegion(), Color::IsDark(), IsSelected(), maHeaderBackColor, maSelectColor, maWinSize, mpBackgrDev, and mpGridDev.
Referenced by ImplDrawColumn(), ImplDrawGridDev(), Select(), and SelectRange().
|
private |
Draws the "first imported line" separator to maBackgrDev (or erases, if bSet is false).
Definition at line 1165 of file csvgrid.cxx.
References GetColumnX(), ScCsvControl::GetFirstVisLine(), ScCsvControl::GetFirstX(), GetLastVisColumn(), ScCsvControl::GetLastX(), ScCsvControl::GetY(), ScCsvControl::IsVisibleLine(), maGridColor, maGridPBColor, mnFirstImpLine, and mpBackgrDev.
Referenced by ImplDrawColumnBackgr(), and SetFirstImportedLine().
|
private |
Draws all columns with selection and cursor to maGridDev.
Definition at line 1309 of file csvgrid.cxx.
References CSV_COLUMN_INVALID, GetFirstVisColumn(), GetLastVisColumn(), ImplDrawColumnSelection(), maWinSize, mpBackgrDev, and mpGridDev.
Referenced by ImplClearSelection(), ImplDrawHorzScrolled(), ImplRedraw(), and SetFirstImportedLine().
|
private |
Optimized drawing: Scrolls horizontally and redraws only missing parts.
Definition at line 1325 of file csvgrid.cxx.
References ScCsvControl::GetCharWidth(), GetColumnFromPos(), ScCsvControl::GetFirstVisPos(), ScCsvControl::GetFirstX(), GetHeight(), ScCsvControl::GetLastX(), ScCsvControl::GetPosCount(), ScCsvControl::GetRulerCursorPos(), ScCsvControl::GetVisPosCount(), ScCsvControl::GetX(), ImplDrawBackgrDev(), ImplDrawColumn(), ImplDrawGridDev(), ImplInvertCursor(), ScCsvControl::IsValidGfx(), maAppBackColor, maWinSize, mpBackgrDev, mpGridDev, and nPos.
Referenced by ApplyLayout().
|
private |
Draws the row headers column to maBackgrDev.
Definition at line 1223 of file csvgrid.cxx.
References tools::Rectangle::BottomLeft(), tools::Rectangle::BottomRight(), ScCsvControl::GetFirstVisLine(), ScCsvControl::GetHdrHeight(), ScCsvControl::GetHdrWidth(), ScCsvControl::GetHdrX(), GetHeight(), ScCsvControl::GetLastVisLine(), ScCsvControl::GetLineHeight(), ScCsvControl::GetY(), ScCsvControl::IsRTL(), maAppBackColor, maHeaderBackColor, maHeaderFont, maHeaderGridColor, maHeaderTextColor, mpBackgrDev, tools::Rectangle::SetBottom(), tools::Rectangle::SetTop(), tools::Rectangle::TopLeft(), and tools::Rectangle::TopRight().
Referenced by ImplDrawBackgrDev().
|
private |
Inserts a split and adjusts column data.
Definition at line 411 of file csvgrid.cxx.
References ScCsvControl::AccSendInsertColumnEvent(), ScCsvControl::AccSendTableUpdateEvent(), GetColumnCount(), GetColumnFromPos(), GetColumnType(), ScCsvSplits::Insert(), IsSelected(), maColStates, maSplits, nPos, and ScCsvColState::Select().
Referenced by ImplSetTextLineSep(), InsertSplit(), and MoveSplit().
|
private |
Inverts the cursor bar at the specified position in maGridDev.
Definition at line 1381 of file csvgrid.cxx.
References ScCsvControl::GetHdrHeight(), ScCsvControl::GetLastVisLine(), ScCsvControl::GetX(), ScCsvControl::GetY(), ScCsvControl::ImplInvertRect(), ScCsvControl::IsVisibleSplitPos(), mpGridDev, nPos, tools::Rectangle::SetBottom(), and tools::Rectangle::SetTop().
Referenced by ApplyLayout(), ImplDrawColumnSelection(), and ImplDrawHorzScrolled().
void ScCsvGrid::ImplRedraw | ( | vcl::RenderContext & | rRenderContext | ) |
Redraws the entire data grid.
Definition at line 1082 of file csvgrid.cxx.
References OutputDevice::DrawOutDev(), ImplDrawBackgrDev(), ImplDrawGridDev(), ScCsvControl::IsValidGfx(), weld::CustomWidgetController::IsVisible(), maWinSize, mpGridDev, and ScCsvControl::ValidateGfx().
Referenced by Paint().
|
private |
Removes a split and adjusts column data.
Definition at line 426 of file csvgrid.cxx.
References ScCsvControl::AccSendRemoveColumnEvent(), ScCsvControl::AccSendTableUpdateEvent(), GetColumnFromPos(), IsSelected(), maColStates, maSplits, nPos, and ScCsvSplits::Remove().
Referenced by MoveSplit(), and RemoveSplit().
|
private |
Sets a clip region in the specified output device for the specified column.
Definition at line 1101 of file csvgrid.cxx.
References GetColumnX(), ScCsvControl::GetFirstX(), GetHeight(), ScCsvControl::GetLastX(), and OutputDevice::SetClipRegion().
Referenced by ImplDrawColumnBackgr(), and ImplDrawColumnSelection().
void ScCsvGrid::ImplSetTextLineFix | ( | sal_Int32 | nLine, |
const OUString & | rTextLine | ||
) |
Fills all cells of a line with the passed text (fixed width mode).
Definition at line 836 of file csvgrid.cxx.
References ScImportExport::CountVisualWidth(), CSV_MAXSTRLEN, CSVCMD_SETPOSCOUNT, ScCsvControl::Execute(), GetColumnCount(), GetColumnWidth(), ScCsvControl::GetFirstVisLine(), ScCsvControl::GetPosCount(), ScCsvControl::InvalidateGfx(), and maTexts.
void ScCsvGrid::ImplSetTextLineSep | ( | sal_Int32 | nLine, |
const OUString & | rTextLine, | ||
const OUString & | rSepChars, | ||
sal_Unicode | cTextSep, | ||
bool | bMergeSep, | ||
bool | bRemoveSpace = false |
||
) |
Fills all cells of a line with the passed text (separators mode).
Definition at line 775 of file csvgrid.cxx.
References ScImportExport::CountVisualWidth(), CSV_MAXCOLCOUNT, CSV_MAXSTRLEN, CSV_MINCOLWIDTH, CSVCMD_SETPOSCOUNT, ScCsvControl::Execute(), GetColumnCount(), GetColumnWidth(), ScCsvControl::GetFirstVisLine(), ScCsvControl::GetPosCount(), ImplInsertSplit(), ScCsvSplits::Insert(), ScCsvControl::InvalidateGfx(), IsValidColumn(), maSplits, maTexts, nPos, pChar, ScCsvSplits::Remove(), and ScImportExport::ScanNextFieldFromString().
void ScCsvGrid::Init | ( | void | ) |
Finishes initialization.
Must be called after constructing a new object.
Definition at line 134 of file csvgrid.cxx.
References InitColors(), mpColorConfig, and SC_MOD.
|
private |
Reads colors from system settings.
Definition at line 244 of file csvgrid.cxx.
References COL_AUTO(), COL_BLACK(), COL_WHITE(), StyleSettings::GetActiveColor(), StyleSettings::GetButtonTextColor(), svtools::ColorConfig::GetColorValue(), StyleSettings::GetDarkShadowColor(), StyleSettings::GetFaceColor(), Application::GetSettings(), AllSettings::GetStyleSettings(), ScCsvControl::InvalidateGfx(), Color::IsDark(), maAppBackColor, maBackColor, maGridColor, maGridPBColor, maHeaderBackColor, maHeaderGridColor, maHeaderTextColor, maSelectColor, maTextColor, mpColorConfig, and svtools::ColorConfigValue::nColor.
Referenced by ConfigurationChanged(), Init(), and StyleUpdated().
|
private |
Initializes all font settings.
Definition at line 273 of file csvgrid.cxx.
References SfxPoolItem::Clone(), EE_CHAR_FONTHEIGHT_CJK(), EE_CHAR_FONTHEIGHT_CTL(), EE_CHAR_FONTINFO(), EE_CHAR_FONTINFO_CJK(), EE_CHAR_FONTINFO_CTL(), EE_CHAR_ITALIC(), EE_CHAR_ITALIC_CJK(), EE_CHAR_ITALIC_CTL(), EE_CHAR_LANGUAGE(), EE_CHAR_LANGUAGE_CJK(), EE_CHAR_LANGUAGE_CTL(), EE_CHAR_WEIGHT(), EE_CHAR_WEIGHT_CJK(), EE_CHAR_WEIGHT_CTL(), SfxItemSet::Get(), OutputDevice::GetDefaultFont(), vcl::Font::GetFontSize(), Size::Height(), ScCsvControl::InvalidateGfx(), LANGUAGE_ENGLISH_US, maHeaderFont, maMonoFont, mpEditEngine, SfxItemSet::Put(), EditEngine::SetFontInfoInItemSet(), vcl::Font::SetFontSize(), SfxPoolItem::SetWhich(), and Size::Width().
Referenced by SetDrawingArea(), and StyleUpdated().
|
private |
Initializes all data dependent from the control's size.
Definition at line 322 of file csvgrid.cxx.
References weld::CustomWidgetController::GetOutputSizePixel(), ScCsvControl::InvalidateGfx(), maWinSize, mpBackgrDev, and mpGridDev.
Referenced by Resize().
void ScCsvGrid::InsertSplit | ( | sal_Int32 | nPos | ) |
Inserts a split.
Definition at line 332 of file csvgrid.cxx.
References CSVCMD_EXPORTCOLUMNTYPE, CSVCMD_UPDATECELLTEXTS, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), GetColumnFromPos(), ImplDrawColumn(), ImplInsertSplit(), nPos, and ScCsvControl::ValidateGfx().
bool ScCsvGrid::IsSelected | ( | sal_uInt32 | nColIndex | ) | const |
Returns true, if the specified column is selected.
Definition at line 636 of file csvgrid.cxx.
References IsValidColumn(), and maColStates.
Referenced by Command(), ScAccessibleCsvCell::getAccessibleStateSet(), GetFirstSelected(), GetNextSelected(), ImplDrawColumnSelection(), ImplInsertSplit(), ScAccessibleCsvGrid::implIsColumnSelected(), ImplRemoveSplit(), MouseButtonDown(), and ToggleSelect().
bool ScCsvGrid::IsValidColumn | ( | sal_uInt32 | nColIndex | ) | const |
Returns true, if nColIndex points to an existing column.
Definition at line 464 of file csvgrid.cxx.
References GetColumnCount().
Referenced by Command(), GetColumnType(), GetColumnWidth(), ImplSetTextLineSep(), IsSelected(), IsVisibleColumn(), MouseButtonDown(), MoveCursor(), Select(), SelectRange(), and SetColumnType().
bool ScCsvGrid::IsVisibleColumn | ( | sal_uInt32 | nColIndex | ) | const |
Returns true, if column with index nColIndex is (at least partly) visible.
Definition at line 469 of file csvgrid.cxx.
References GetColumnPos(), ScCsvControl::GetFirstVisPos(), ScCsvControl::GetLastVisPos(), and IsValidColumn().
Referenced by GetFocusRect(), and ImplDrawColumnBackgr().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 959 of file csvgrid.cxx.
References CSVCMD_SETCOLUMNTYPE, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), vcl::KeyCode::GetCode(), GetFocusColumn(), vcl::KeyCode::GetGroup(), ScCsvControl::GetHorzDirection(), KeyEvent::GetKeyCode(), ScCsvControl::GetVertDirection(), ImplClearSelection(), vcl::KeyCode::IsMod1(), vcl::KeyCode::IsMod2(), vcl::KeyCode::IsShift(), KEY_1, KEY_9, KEY_A, KEY_SPACE, KEYGROUP_CURSOR, maTypeNames, mnRecentSelCol, MOVE_NONE, MoveCursorRel(), nType, ScrollVertRel(), Select(), SelectAll(), SelectRange(), and ToggleSelect().
|
overrideprotectedvirtual |
Reimplemented from ScCsvControl.
Definition at line 896 of file csvgrid.cxx.
References ScCsvControl::LoseFocus(), and ScCsvControl::Repaint().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 902 of file csvgrid.cxx.
References ScCsvControl::DisableRepaint(), DoSelectAction(), ScCsvControl::EnableRepaint(), GetColumnFromX(), ScCsvControl::GetFirstX(), ScCsvControl::GetHdrHeight(), ScCsvControl::GetLastX(), MouseEvent::GetModifier(), MouseEvent::GetPosPixel(), weld::CustomWidgetController::GrabFocus(), weld::CustomWidgetController::HasFocus(), MouseEvent::IsLeft(), IsSelected(), IsValidColumn(), mbMTSelecting, mbTracking, mnMTCurrCol, SelectAll(), Point::X(), and Point::Y().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 930 of file csvgrid.cxx.
References mbTracking.
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 936 of file csvgrid.cxx.
References CSVCMD_MAKEPOSVISIBLE, ScCsvControl::DisableRepaint(), DoSelectAction(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), ScCsvControl::GetCharWidth(), GetColumnFromPos(), ScCsvControl::GetFirstVisPos(), ScCsvControl::GetFirstX(), MouseEvent::GetModifier(), ScCsvControl::GetPosCount(), MouseEvent::GetPosPixel(), mbTracking, mnMTCurrCol, nPos, and Point::X().
|
private |
Moves column cursor to a new position.
Definition at line 706 of file csvgrid.cxx.
References CSV_SCROLL_DIST, CSVCMD_MOVEGRIDCURSOR, CSVCMD_SETPOSOFFSET, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), GetColumnPos(), ScCsvControl::GetFirstVisPos(), ScCsvControl::GetLastVisPos(), ScCsvControl::GetVisPosCount(), and IsValidColumn().
Referenced by MoveCursorRel().
|
private |
Moves column cursor to the given direction.
Definition at line 724 of file csvgrid.cxx.
References CSV_COLUMN_INVALID, GetColumnCount(), GetFocusColumn(), MOVE_FIRST, MOVE_LAST, MOVE_NEXT, MOVE_PREV, and MoveCursor().
Referenced by KeyInput().
void ScCsvGrid::MoveSplit | ( | sal_Int32 | nPos, |
sal_Int32 | nNewPos | ||
) |
Inserts a new or removes an existing split.
Definition at line 360 of file csvgrid.cxx.
References ScCsvControl::AccSendTableUpdateEvent(), CSV_COLUMN_INVALID, CSVCMD_EXPORTCOLUMNTYPE, CSVCMD_UPDATECELLTEXTS, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), GetColumnFromPos(), GetColumnPos(), ImplDrawColumn(), ImplInsertSplit(), ImplRemoveSplit(), ScCsvSplits::Insert(), maSplits, nPos, ScCsvSplits::Remove(), and ScCsvControl::ValidateGfx().
|
overrideprotectedvirtual |
Implements weld::CustomWidgetController.
Definition at line 1077 of file csvgrid.cxx.
References ImplRedraw().
void ScCsvGrid::RemoveAllSplits | ( | ) |
Removes all splits.
Definition at line 388 of file csvgrid.cxx.
References CSVCMD_EXPORTCOLUMNTYPE, CSVCMD_UPDATECELLTEXTS, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), and ImplClearSplits().
void ScCsvGrid::RemoveSplit | ( | sal_Int32 | nPos | ) |
Removes a split.
Definition at line 347 of file csvgrid.cxx.
References CSVCMD_EXPORTCOLUMNTYPE, CSVCMD_UPDATECELLTEXTS, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), GetColumnFromPos(), ImplDrawColumn(), ImplRemoveSplit(), nPos, and ScCsvControl::ValidateGfx().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 880 of file csvgrid.cxx.
References CSVCMD_UPDATECELLTEXTS, ScCsvControl::Execute(), ScCsvTableBox::InitControls(), InitSizeData(), mpTableBox, and weld::CustomWidgetController::Resize().
|
private |
Scrolls data grid vertically.
Definition at line 608 of file csvgrid.cxx.
References CSVCMD_SETLINEOFFSET, ScCsvControl::Execute(), ScCsvControl::GetFirstVisLine(), ScCsvControl::GetMaxLineOffset(), ScCsvControl::GetVisLineCount(), MOVE_FIRST, MOVE_LAST, MOVE_NEXT, MOVE_NEXTPAGE, MOVE_PREV, and MOVE_PREVPAGE.
Referenced by KeyInput().
void ScCsvGrid::Select | ( | sal_uInt32 | nColIndex, |
bool | bSelect = true |
||
) |
Selects or deselects the specified column.
Definition at line 655 of file csvgrid.cxx.
References ScCsvControl::AccSendSelectionEvent(), CSVCMD_EXPORTCOLUMNTYPE, ScCsvControl::Execute(), ImplDrawColumnSelection(), IsValidColumn(), maColStates, mnRecentSelCol, and ScCsvControl::Repaint().
Referenced by Command(), DoSelectAction(), ScAccessibleCsvGrid::implSelectColumn(), KeyInput(), SelectRange(), and ToggleSelect().
void ScCsvGrid::SelectAll | ( | bool | bSelect = true | ) |
Selects or deselects all columns.
Definition at line 701 of file csvgrid.cxx.
References GetColumnCount(), and SelectRange().
Referenced by ApplyLayout(), ScAccessibleCsvGrid::clearAccessibleSelection(), KeyInput(), MouseButtonDown(), and ScAccessibleCsvGrid::selectAccessibleChild().
void ScCsvGrid::SelectRange | ( | sal_uInt32 | nColIndex1, |
sal_uInt32 | nColIndex2, | ||
bool | bSelect = true |
||
) |
Selects or deselects the specified column range.
Definition at line 674 of file csvgrid.cxx.
References ScCsvControl::AccSendSelectionEvent(), CSV_COLUMN_INVALID, CSVCMD_EXPORTCOLUMNTYPE, ScCsvControl::Execute(), ImplDrawColumnSelection(), IsValidColumn(), maColStates, mnRecentSelCol, ScCsvControl::Repaint(), Select(), and SelectRange().
Referenced by DoSelectAction(), KeyInput(), SelectAll(), and SelectRange().
void ScCsvGrid::SetColumnStates | ( | ScCsvColStateVec && | rColStates | ) |
Sets all column states to the values in the passed vector.
Definition at line 498 of file csvgrid.cxx.
References ScCsvControl::AccSendSelectionEvent(), ScCsvControl::AccSendTableUpdateEvent(), ScCsvSplits::Count(), CSVCMD_EXPORTCOLUMNTYPE, ScCsvControl::Execute(), GetColumnCount(), maColStates, and maSplits.
|
private |
Sets the data type of the specified column.
Definition at line 512 of file csvgrid.cxx.
References ScCsvControl::AccSendTableUpdateEvent(), IsValidColumn(), and maColStates.
Referenced by SetSelColumnType().
|
overridevirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 96 of file csvgrid.cxx.
References weld::CustomWidgetController::EnableRTL(), weld::DrawingArea::get_ref_device(), StyleSettings::GetAppFont(), OutputDevice::GetFont(), Application::GetSettings(), AllSettings::GetStyleSettings(), Size::Height(), ImplClearSplits(), InitFonts(), comphelper::LibreOfficeKit::isActive(), maHeaderFont, weld::Widget::set_size_request(), weld::CustomWidgetController::SetDrawingArea(), weld::CustomWidgetController::SetOutputSizePixel(), weld::SetPointFont(), and Size::Width().
void ScCsvGrid::SetFirstImportedLine | ( | sal_Int32 | nLine | ) |
Sets the number of the first imported line (for visual feedback).
nLine is 0-based!
Definition at line 216 of file csvgrid.cxx.
References ImplDrawFirstLineSep(), ImplDrawGridDev(), mnFirstImpLine, and ScCsvControl::Repaint().
void ScCsvGrid::SetSelColumnType | ( | sal_Int32 | nType | ) |
Changes the data type of all selected columns.
Definition at line 537 of file csvgrid.cxx.
References CSV_COLUMN_INVALID, CSV_TYPE_MULTI, CSV_TYPE_NOSELECTION, CSVCMD_EXPORTCOLUMNTYPE, ScCsvControl::Execute(), GetFirstSelected(), GetNextSelected(), nType, ScCsvControl::Repaint(), and SetColumnType().
void ScCsvGrid::SetSplits | ( | const ScCsvSplits & | rSplits | ) |
Removes all splits and inserts the splits from rSplits.
Definition at line 397 of file csvgrid.cxx.
References ScCsvSplits::Count(), CSVCMD_EXPORTCOLUMNTYPE, CSVCMD_UPDATECELLTEXTS, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), ImplClearSplits(), ScCsvSplits::Insert(), maColStates, maSplits, and nCount.
void ScCsvGrid::SetTypeNames | ( | std::vector< OUString > && | rTypeNames | ) |
Sets new UI data type names.
Definition at line 548 of file csvgrid.cxx.
References CSV_TYPE_DEFAULT, maColStates, maTypeNames, mxPopup, nCount, and ScCsvControl::Repaint().
|
overrideprotectedvirtual |
Reimplemented from weld::CustomWidgetController.
Definition at line 1059 of file csvgrid.cxx.
References CSVCMD_UPDATECELLTEXTS, ScCsvControl::Execute(), InitColors(), InitFonts(), weld::CustomWidgetController::StyleUpdated(), and UpdateLayoutData().
void ScCsvGrid::ToggleSelect | ( | sal_uInt32 | nColIndex | ) |
Toggles selection of the specified column.
Definition at line 669 of file csvgrid.cxx.
References IsSelected(), and Select().
Referenced by DoSelectAction(), and KeyInput().
void ScCsvGrid::UpdateLayoutData | ( | ) |
Updates layout data dependent from the control's state.
Definition at line 144 of file csvgrid.cxx.
References CSVCMD_SETCHARWIDTH, CSVCMD_SETHDRHEIGHT, CSVCMD_SETLINEHEIGHT, ScCsvControl::DisableRepaint(), ScCsvControl::EnableRepaint(), ScCsvControl::Execute(), weld::DrawingArea::get_ref_device(), weld::CustomWidgetController::GetDrawingArea(), OutputDevice::GetTextHeight(), OutputDevice::GetTextWidth(), maHeaderFont, maMonoFont, OutputDevice::SetFont(), and UpdateOffsetX().
Referenced by StyleUpdated().
void ScCsvGrid::UpdateOffsetX | ( | ) |
Updates X coordinate of first visible position dependent from line numbers.
Definition at line 157 of file csvgrid.cxx.
References CSVCMD_SETHDRWIDTH, ScCsvControl::Execute(), weld::CustomWidgetController::GetDrawingArea(), and ScCsvControl::GetLastVisLine().
Referenced by ApplyLayout(), and UpdateLayoutData().
|
private |
Grid color for "first imported line" delimiter.
Definition at line 69 of file csvgrid.hxx.
Referenced by ImplDrawBackgrDev(), ImplDrawHorzScrolled(), ImplDrawRowHeaders(), and InitColors().
|
private |
Application color configuration.
Definition at line 66 of file csvgrid.hxx.
Referenced by ImplDrawColumnBackgr(), and InitColors().
|
private |
Vector with split positions.
Definition at line 84 of file csvgrid.hxx.
Referenced by ApplyLayout(), GetColumnType(), ImplClearSelection(), ImplClearSplits(), ImplInsertSplit(), ImplRemoveSplit(), IsSelected(), Select(), SelectRange(), SetColumnStates(), SetColumnType(), SetSplits(), and SetTypeNames().
|
private |
Size of the control.
Definition at line 81 of file csvgrid.hxx.
Referenced by ImplDrawCellText(), and ScCsvGrid().
|
private |
Cell background color.
Definition at line 67 of file csvgrid.hxx.
Referenced by ImplDrawColumnBackgr(), ImplDrawFirstLineSep(), and InitColors().
|
private |
Table grid color.
Definition at line 68 of file csvgrid.hxx.
Referenced by ImplDrawFirstLineSep(), and InitColors().
|
private |
Text color for data area.
Definition at line 71 of file csvgrid.hxx.
Referenced by ImplDrawColumnBackgr(), ImplDrawColumnSelection(), ImplDrawRowHeaders(), and InitColors().
|
private |
For drawing cell texts.
Definition at line 78 of file csvgrid.hxx.
Referenced by ImplDrawColumnHeader(), ImplDrawRowHeaders(), InitFonts(), SetDrawingArea(), and UpdateLayoutData().
|
private |
Background color for headers.
Definition at line 72 of file csvgrid.hxx.
Referenced by ImplDrawColumnHeader(), ImplDrawRowHeaders(), and InitColors().
|
private |
Grid color for headers.
Definition at line 73 of file csvgrid.hxx.
Referenced by ImplDrawColumnHeader(), ImplDrawRowHeaders(), and InitColors().
|
private |
Font for column and row headers.
Definition at line 79 of file csvgrid.hxx.
Referenced by InitFonts(), and UpdateLayoutData().
|
private |
Text color for headers.
Definition at line 74 of file csvgrid.hxx.
Referenced by ImplDrawColumnSelection(), and InitColors().
|
private |
Paper size for edit engine.
Definition at line 83 of file csvgrid.hxx.
Referenced by ApplyLayout(), GetColumnFromPos(), ImplClearSplits(), ImplInsertSplit(), ImplRemoveSplit(), ImplSetTextLineSep(), MoveSplit(), SetColumnStates(), and SetSplits().
|
private |
Background color for unused area.
Definition at line 70 of file csvgrid.hxx.
Referenced by ImplDrawCellText(), ImplDrawColumnBackgr(), and InitColors().
|
private |
UI names of data types.
Definition at line 86 of file csvgrid.hxx.
Referenced by GetCellText(), ImplDrawColumnBackgr(), ImplSetTextLineFix(), and ImplSetTextLineSep().
|
private |
State of each column.
Definition at line 85 of file csvgrid.hxx.
Referenced by GetColumnTypeName(), KeyInput(), and SetTypeNames().
|
private |
Monospace font for data cells.
Definition at line 80 of file csvgrid.hxx.
Referenced by Command(), ImplDrawColumnSelection(), ImplDrawGridDev(), ImplDrawHorzScrolled(), ImplRedraw(), and InitSizeData().
|
private |
True if Mouse tracking.
Definition at line 92 of file csvgrid.hxx.
Referenced by DoSelectAction(), and MouseButtonDown().
|
private |
Current column of mouse tracking.
Definition at line 91 of file csvgrid.hxx.
Referenced by DoSelectAction(), MouseButtonDown(), MouseButtonUp(), and MouseMove().
|
private |
2D-vector for cell texts.
Definition at line 88 of file csvgrid.hxx.
Referenced by ImplDrawFirstLineSep(), and SetFirstImportedLine().
|
private |
Index of most recently selected column.
Definition at line 90 of file csvgrid.hxx.
Referenced by MouseButtonDown(), and MouseMove().
|
private |
First imported line (0-based).
Definition at line 89 of file csvgrid.hxx.
Referenced by DoSelectAction(), KeyInput(), Select(), and SelectRange().
|
private |
Grid Parent.
Definition at line 61 of file csvgrid.hxx.
Referenced by ImplDrawBackgrDev(), ImplDrawCellText(), ImplDrawColumnBackgr(), ImplDrawColumnSelection(), ImplDrawFirstLineSep(), ImplDrawGridDev(), ImplDrawHorzScrolled(), ImplDrawRowHeaders(), InitSizeData(), ScCsvGrid(), and ~ScCsvGrid().
|
private |
Popup menu for column types.
Definition at line 65 of file csvgrid.hxx.
Referenced by Init(), InitColors(), and ~ScCsvGrid().
|
private |
Header color of selected columns.
Definition at line 77 of file csvgrid.hxx.
Referenced by GetEditEngine(), ImplDrawCellText(), ImplDrawColumnBackgr(), InitFonts(), and ScCsvGrid().
|
private |
Grid background, headers, cell texts.
Definition at line 62 of file csvgrid.hxx.
Referenced by ImplDrawColumnSelection(), ImplDrawGridDev(), ImplDrawHorzScrolled(), ImplInvertCursor(), ImplRedraw(), InitSizeData(), and ~ScCsvGrid().
|
private |
Definition at line 60 of file csvgrid.hxx.
Referenced by Resize().
|
private |
Data grid with selection and cursor.
Definition at line 63 of file csvgrid.hxx.
Referenced by ExecutePopup(), and SetTypeNames().