LibreOffice Module sc (master) 1
|
The control in the CSV import dialog that contains a ruler and a data grid to visualize and modify the current import settings. More...
#include <csvtablebox.hxx>
Public Member Functions | |
ScCsvTableBox (weld::Builder &rBuilder) | |
false = Separators, true = Fixed width. More... | |
~ScCsvTableBox () | |
void | Init () |
Finishes initialization. More... | |
void | SetSeparatorsMode () |
Sets the control to separators mode. More... | |
void | SetFixedWidthMode () |
Sets the control to fixed width mode. More... | |
ScCsvRuler & | GetRuler () |
ScCsvGrid & | GetGrid () |
SAL_DLLPRIVATE void | InitControls () |
Initializes the children controls (pos/size, scroll bars, ...). More... | |
void | SetUniStrings (const OUString *pTextLines, const OUString &rSepChars, sal_Unicode cTextSep, bool bMergeSep, bool bRemoveSpace) |
Fills all cells of all lines with the passed texts (Unicode strings). More... | |
void | InitTypes (const weld::ComboBox &rListBox) |
Reads UI strings for data types from the list box. More... | |
sal_Int32 | GetSelColumnType () const |
Returns the data type of the selected columns. More... | |
void | FillColumnData (ScAsciiOptions &rOptions) const |
Fills the options object with current column data. More... | |
void | SetUpdateTextHdl (const Link< ScCsvTableBox &, void > &rHdl) |
Sets a new handler for "update cell texts" requests. More... | |
void | SetColTypeHdl (const Link< ScCsvTableBox &, void > &rHdl) |
Sets a new handler for "column selection changed" events. More... | |
Private Member Functions | |
SAL_DLLPRIVATE void | InitHScrollBar () |
Initializes size and position data of horizontal scrollbar. More... | |
SAL_DLLPRIVATE void | InitVScrollBar () |
Initializes size and position data of vertical scrollbar. More... | |
SAL_DLLPRIVATE void | ImplSetPosOffset (sal_Int32 nPos) |
Calculates and sets valid position offset nearest to nPos. More... | |
SAL_DLLPRIVATE void | ImplSetLineOffset (sal_Int32 nLine) |
Calculates and sets valid line offset nearest to nLine. More... | |
SAL_DLLPRIVATE void | MakePosVisible (sal_Int32 nPos) |
Moves controls (not cursors!) so that nPos becomes visible. More... | |
DECL_DLLPRIVATE_LINK (CsvCmdHdl, ScCsvControl &, void) | |
DECL_DLLPRIVATE_LINK (HScrollHdl, weld::ScrolledWindow &, void) | |
DECL_DLLPRIVATE_LINK (VScrollHdl, weld::ScrolledWindow &, void) | |
DECL_DLLPRIVATE_LINK (ScrollEndHdl, Timer *, void) | |
Private Attributes | |
ScCsvLayoutData | maData |
std::unique_ptr< ScCsvRuler > | mxRuler |
Current layout data of the controls. More... | |
std::unique_ptr< ScCsvGrid > | mxGrid |
The ruler for fixed width mode. More... | |
std::unique_ptr< weld::ScrolledWindow > | mxScroll |
Calc-like data table for fixed width mode. More... | |
std::unique_ptr< weld::CustomWeld > | mxRulerWeld |
Scrolled Window. More... | |
std::unique_ptr< weld::CustomWeld > | mxGridWeld |
Connect the ruler to its drawingarea. More... | |
Link< ScCsvTableBox &, void > | maUpdateTextHdl |
connect the grid to its drawingarea More... | |
Link< ScCsvTableBox &, void > | maColTypeHdl |
Updates all cell texts. More... | |
Idle | maEndScrollIdle |
Handler for exporting the column type. More... | |
ScCsvColStateVec | maFixColStates |
Called when horizontal scrolling has ended. More... | |
ScCsvColStateVec | maSepColStates |
Column states in fixed width mode. More... | |
sal_Int32 | mnFixedWidth |
Column states in separators mode. More... | |
bool | mbFixedMode |
Cached total width for fixed width mode. More... | |
The control in the CSV import dialog that contains a ruler and a data grid to visualize and modify the current import settings.
Definition at line 43 of file csvtablebox.hxx.
|
explicit |
false = Separators, true = Fixed width.
Definition at line 23 of file csvtablebox.cxx.
References Size::Height(), InitControls(), LINK, maData, maEndScrollIdle, mbFixedMode, mnFixedWidth, mxGrid, mxRuler, mxScroll, Timer::SetInvokeHandler(), Task::SetPriority(), and Size::Width().
ScCsvTableBox::~ScCsvTableBox | ( | ) |
Definition at line 53 of file csvtablebox.cxx.
|
private |
|
private |
|
private |
|
private |
void ScCsvTableBox::FillColumnData | ( | ScAsciiOptions & | rOptions | ) | const |
Fills the options object with current column data.
Definition at line 194 of file csvtablebox.cxx.
References mbFixedMode, and mxGrid.
|
inline |
Definition at line 81 of file csvtablebox.hxx.
Referenced by ScAccessibleCsvRuler::getAccessibleRelationSet().
|
inline |
Definition at line 80 of file csvtablebox.hxx.
Referenced by ScAccessibleCsvGrid::getAccessibleRelationSet().
|
inline |
Returns the data type of the selected columns.
Definition at line 113 of file csvtablebox.hxx.
|
inlineprivate |
Calculates and sets valid line offset nearest to nLine.
Definition at line 96 of file csvtablebox.hxx.
References maData.
|
inlineprivate |
Calculates and sets valid position offset nearest to nPos.
Definition at line 93 of file csvtablebox.hxx.
void ScCsvTableBox::Init | ( | void | ) |
Finishes initialization.
Must be called after constructing a new object.
Definition at line 98 of file csvtablebox.cxx.
References mxGrid.
void ScCsvTableBox::InitControls | ( | ) |
Initializes the children controls (pos/size, scroll bars, ...).
Definition at line 103 of file csvtablebox.cxx.
References CSVCMD_SETLINEOFFSET, CSVCMD_SETPOSOFFSET, Size::Height(), InitHScrollBar(), InitVScrollBar(), maData, mbFixedMode, ScCsvLayoutData::mnWinHeight, ScCsvLayoutData::mnWinWidth, mxGrid, mxRuler, and Size::Width().
Referenced by ScCsvGrid::Resize(), ScCsvTableBox(), SetFixedWidthMode(), and SetSeparatorsMode().
|
private |
Initializes size and position data of horizontal scrollbar.
Definition at line 128 of file csvtablebox.cxx.
References AllSettings::GetLayoutRTL(), mxGrid, mxScroll, and nValue.
Referenced by InitControls().
void ScCsvTableBox::InitTypes | ( | const weld::ComboBox & | rListBox | ) |
Reads UI strings for data types from the list box.
Definition at line 185 of file csvtablebox.cxx.
References weld::ComboBox::get_count(), weld::ComboBox::get_text(), mxGrid, and nIndex.
|
private |
Initializes size and position data of vertical scrollbar.
Definition at line 144 of file csvtablebox.cxx.
References mxGrid, and mxScroll.
Referenced by InitControls().
|
private |
Moves controls (not cursors!) so that nPos becomes visible.
Definition at line 151 of file csvtablebox.cxx.
References CSV_SCROLL_DIST, CSVCMD_SETPOSOFFSET, mxGrid, and nPos.
|
inline |
Sets a new handler for "column selection changed" events.
Definition at line 123 of file csvtablebox.hxx.
void ScCsvTableBox::SetFixedWidthMode | ( | ) |
Sets the control to fixed width mode.
Definition at line 79 of file csvtablebox.cxx.
References CSVCMD_SETLINEOFFSET, CSVCMD_SETPOSCOUNT, InitControls(), maFixColStates, maSepColStates, mbFixedMode, mnFixedWidth, mxGrid, and mxRuler.
void ScCsvTableBox::SetSeparatorsMode | ( | ) |
Sets the control to separators mode.
Definition at line 59 of file csvtablebox.cxx.
References CSVCMD_NEWCELLTEXTS, CSVCMD_SETLINEOFFSET, CSVCMD_SETPOSCOUNT, InitControls(), maFixColStates, maSepColStates, mbFixedMode, mnFixedWidth, and mxGrid.
void ScCsvTableBox::SetUniStrings | ( | const OUString * | pTextLines, |
const OUString & | rSepChars, | ||
sal_Unicode | cTextSep, | ||
bool | bMergeSep, | ||
bool | bRemoveSpace | ||
) |
Fills all cells of all lines with the passed texts (Unicode strings).
Definition at line 164 of file csvtablebox.cxx.
References CSV_PREVIEW_LINES, mbFixedMode, and mxGrid.
|
inline |
Sets a new handler for "update cell texts" requests.
Definition at line 121 of file csvtablebox.hxx.
|
private |
Updates all cell texts.
Definition at line 55 of file csvtablebox.hxx.
|
private |
Definition at line 46 of file csvtablebox.hxx.
Referenced by InitControls().
|
private |
Handler for exporting the column type.
Definition at line 57 of file csvtablebox.hxx.
Referenced by ScCsvTableBox().
|
private |
Called when horizontal scrolling has ended.
Definition at line 59 of file csvtablebox.hxx.
Referenced by SetFixedWidthMode(), and SetSeparatorsMode().
|
private |
Column states in fixed width mode.
Definition at line 60 of file csvtablebox.hxx.
Referenced by SetFixedWidthMode(), and SetSeparatorsMode().
|
private |
connect the grid to its drawingarea
Definition at line 54 of file csvtablebox.hxx.
|
private |
Cached total width for fixed width mode.
Definition at line 64 of file csvtablebox.hxx.
Referenced by FillColumnData(), InitControls(), ScCsvTableBox(), SetFixedWidthMode(), SetSeparatorsMode(), and SetUniStrings().
|
private |
Column states in separators mode.
Definition at line 62 of file csvtablebox.hxx.
Referenced by ScCsvTableBox(), SetFixedWidthMode(), and SetSeparatorsMode().
|
private |
The ruler for fixed width mode.
Definition at line 49 of file csvtablebox.hxx.
Referenced by FillColumnData(), Init(), InitControls(), InitHScrollBar(), InitTypes(), InitVScrollBar(), MakePosVisible(), ScCsvTableBox(), SetFixedWidthMode(), SetSeparatorsMode(), and SetUniStrings().
|
private |
Connect the ruler to its drawingarea.
Definition at line 52 of file csvtablebox.hxx.
|
private |
Current layout data of the controls.
Definition at line 48 of file csvtablebox.hxx.
Referenced by InitControls(), ScCsvTableBox(), and SetFixedWidthMode().
|
private |
Scrolled Window.
Definition at line 51 of file csvtablebox.hxx.
|
private |
Calc-like data table for fixed width mode.
Definition at line 50 of file csvtablebox.hxx.
Referenced by InitHScrollBar(), InitVScrollBar(), and ScCsvTableBox().