LibreOffice Module sc (master) 1
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
csvcontrol.hxx File Reference
#include <scdllapi.h>
#include <address.hxx>
#include "csvsplits.hxx"
#include <o3tl/typed_flags_set.hxx>
#include <rtl/ref.hxx>
#include <vcl/customweld.hxx>
#include "AccessibleCsvControl.hxx"
Include dependency graph for csvcontrol.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ScCsvExpData
 Exported data of a column (data used in the dialog). More...
 
struct  o3tl::typed_flags< ScCsvDiff >
 
struct  ScCsvLayoutData
 A structure containing all layout data valid for both ruler and data grid (i.e. More...
 
class  ScCsvCmd
 Data for a CSV control command. More...
 
class  ScCsvControl
 Base class for the CSV ruler and the data grid control. More...
 

Namespaces

namespace  com
 
namespace  com::sun
 
namespace  com::sun::star
 
namespace  com::sun::star::accessibility
 
namespace  o3tl
 

Typedefs

typedef ::std::vector< ScCsvExpDataScCsvExpDataVec
 

Enumerations

enum  ScMoveMode {
  MOVE_NONE ,
  MOVE_FIRST ,
  MOVE_LAST ,
  MOVE_PREV ,
  MOVE_NEXT ,
  MOVE_PREVPAGE ,
  MOVE_NEXTPAGE
}
 Specifies which element should be used to perform an action. More...
 
enum class  ScCsvDiff : sal_uInt32 {
  Equal = 0x0000 ,
  PosCount = 0x0001 ,
  PosOffset = 0x0002 ,
  HeaderWidth = 0x0004 ,
  CharWidth = 0x0008 ,
  LineCount = 0x0010 ,
  LineOffset = 0x0020 ,
  HeaderHeight = 0x0040 ,
  LineHeight = 0x0080 ,
  RulerCursor = 0x0100 ,
  GridCursor = 0x0200 ,
  HorizontalMask = PosCount | PosOffset | HeaderWidth | CharWidth ,
  VerticalMask = LineCount | LineOffset | HeaderHeight | LineHeight
}
 Flags for comparison of old and new control layout data. More...
 
enum  ScCsvCmdType {
  CSVCMD_NONE ,
  CSVCMD_REPAINT ,
  CSVCMD_SETPOSCOUNT ,
  CSVCMD_SETPOSOFFSET ,
  CSVCMD_SETHDRWIDTH ,
  CSVCMD_SETCHARWIDTH ,
  CSVCMD_SETLINECOUNT ,
  CSVCMD_SETLINEOFFSET ,
  CSVCMD_SETHDRHEIGHT ,
  CSVCMD_SETLINEHEIGHT ,
  CSVCMD_MOVERULERCURSOR ,
  CSVCMD_MOVEGRIDCURSOR ,
  CSVCMD_MAKEPOSVISIBLE ,
  CSVCMD_NEWCELLTEXTS ,
  CSVCMD_UPDATECELLTEXTS ,
  CSVCMD_SETCOLUMNTYPE ,
  CSVCMD_EXPORTCOLUMNTYPE ,
  CSVCMD_SETFIRSTIMPORTLINE ,
  CSVCMD_INSERTSPLIT ,
  CSVCMD_REMOVESPLIT ,
  CSVCMD_TOGGLESPLIT ,
  CSVCMD_MOVESPLIT ,
  CSVCMD_REMOVEALLSPLITS
}
 Enumeration of possible commands to change any settings of the CSV controls. More...
 

Functions

bool operator== (const ScCsvLayoutData &rData1, const ScCsvLayoutData &rData2)
 
bool operator!= (const ScCsvLayoutData &rData1, const ScCsvLayoutData &rData2)
 

Variables

const sal_Int32 CSV_MINCOLWIDTH = 8
 Minimum character count for a column in separators mode. More...
 
const sal_Int32 CSV_MAXSTRLEN = 0x7FFF
 Maximum length of a cell string. More...
 
const sal_uInt16 CSV_HDR_TRANSPARENCY = 85
 Transparency for header color of selected columns. More...
 
const sal_Int32 CSV_SCROLL_DIST = 3
 Minimum distance to border for auto scroll. More...
 
const sal_Int32 CSV_PREVIEW_LINES = 32
 TODO make string array dynamic. More...
 
const sal_Int32 CSV_MAXCOLCOUNT = MAXCOLCOUNT
 Maximum count of columns. More...
 
const sal_Int32 CSV_TYPE_DEFAULT = 0
 Default column data type. More...
 
const sal_Int32 CSV_TYPE_MULTI = -1
 Multi selection with different types. More...
 
const sal_Int32 CSV_TYPE_NOSELECTION = -2
 No column selected. More...
 
const sal_uInt8 SC_COL_STANDARD = 1
 
const sal_uInt8 SC_COL_TEXT = 2
 
const sal_uInt8 SC_COL_MDY = 3
 
const sal_uInt8 SC_COL_DMY = 4
 
const sal_uInt8 SC_COL_YMD = 5
 
const sal_uInt8 SC_COL_SKIP = 9
 
const sal_uInt8 SC_COL_ENGLISH = 10
 

Typedef Documentation

◆ ScCsvExpDataVec

typedef ::std::vector< ScCsvExpData > ScCsvExpDataVec

Definition at line 73 of file csvcontrol.hxx.

Enumeration Type Documentation

◆ ScCsvCmdType

Enumeration of possible commands to change any settings of the CSV controls.

@descr Controls have to send commands instead of changing their settings directly. This helps to keep the different controls consistent to each other. A command can contain 0 to 2 sal_Int32 parameters. In the description of each command the required parameters are shown in brackets. [-] means no parameter.

Enumerator
CSVCMD_NONE 
CSVCMD_REPAINT 

No command. [-].

CSVCMD_SETPOSCOUNT 

Repaint all controls. [-].

CSVCMD_SETPOSOFFSET 

Change position/column count. [character count].

CSVCMD_SETHDRWIDTH 

Change position offset (scroll pos). [position].

CSVCMD_SETCHARWIDTH 

Change width of the header column. [width in pixel].

CSVCMD_SETLINECOUNT 

Change character pixel width. [width in pixel].

CSVCMD_SETLINEOFFSET 

Change number of data lines. [line count].

CSVCMD_SETHDRHEIGHT 

Change first visible line. [line index].

CSVCMD_SETLINEHEIGHT 

Change height of top header line. [height in pixel].

CSVCMD_MOVERULERCURSOR 

Change data line pixel height. [height in pixel}.

CSVCMD_MOVEGRIDCURSOR 

Move ruler cursor to new position. [position].

CSVCMD_MAKEPOSVISIBLE 

Move data grid cursor to new column. [position].

CSVCMD_NEWCELLTEXTS 

Move to make passed position visible (for mouse tracking). [position].

CSVCMD_UPDATECELLTEXTS 

Recalculate splits and cell texts. [-].

CSVCMD_SETCOLUMNTYPE 

Update cell texts with current split settings. [-].

CSVCMD_EXPORTCOLUMNTYPE 

Change data type of selected columns. [column type].

CSVCMD_SETFIRSTIMPORTLINE 

Send selected column type to external controls. [-].

CSVCMD_INSERTSPLIT 

Set number of first imported line. [line index].

CSVCMD_REMOVESPLIT 

Insert a split. [position].

CSVCMD_TOGGLESPLIT 

Remove a split. [position].

CSVCMD_MOVESPLIT 

Inserts or removes a split. [position].

CSVCMD_REMOVEALLSPLITS 

Move a split. [old position, new position].

Remove all splits. [-]

Definition at line 158 of file csvcontrol.hxx.

◆ ScCsvDiff

enum class ScCsvDiff : sal_uInt32
strong

Flags for comparison of old and new control layout data.

Enumerator
Equal 
PosCount 
PosOffset 
HeaderWidth 
CharWidth 
LineCount 
LineOffset 
HeaderHeight 
LineHeight 
RulerCursor 
GridCursor 
HorizontalMask 
VerticalMask 

Definition at line 88 of file csvcontrol.hxx.

◆ ScMoveMode

enum ScMoveMode

Specifies which element should be used to perform an action.

Enumerator
MOVE_NONE 
MOVE_FIRST 

No action.

MOVE_LAST 

First element in current context.

MOVE_PREV 

Last element in current context.

MOVE_NEXT 

Predecessor of current element in current context.

MOVE_PREVPAGE 

Successor of current element in current context.

MOVE_NEXTPAGE 

Previous page relative to current context.

Next page relative to current context.

Definition at line 76 of file csvcontrol.hxx.

Function Documentation

◆ operator!=()

bool operator!= ( const ScCsvLayoutData rData1,
const ScCsvLayoutData rData2 
)
inline

Definition at line 148 of file csvcontrol.hxx.

◆ operator==()

bool operator== ( const ScCsvLayoutData rData1,
const ScCsvLayoutData rData2 
)
inline

Definition at line 143 of file csvcontrol.hxx.

References Equal, and ScCsvLayoutData::GetDiff().

Variable Documentation

◆ CSV_HDR_TRANSPARENCY

const sal_uInt16 CSV_HDR_TRANSPARENCY = 85

Transparency for header color of selected columns.

Definition at line 37 of file csvcontrol.hxx.

Referenced by ScCsvGrid::ImplDrawColumnSelection().

◆ CSV_MAXCOLCOUNT

const sal_Int32 CSV_MAXCOLCOUNT = MAXCOLCOUNT

Maximum count of columns.

Definition at line 44 of file csvcontrol.hxx.

Referenced by IMPL_LINK(), and ScCsvGrid::ImplSetTextLineSep().

◆ CSV_MAXSTRLEN

const sal_Int32 CSV_MAXSTRLEN = 0x7FFF

Maximum length of a cell string.

Definition at line 35 of file csvcontrol.hxx.

Referenced by ScCsvGrid::ImplSetTextLineFix(), and ScCsvGrid::ImplSetTextLineSep().

◆ CSV_MINCOLWIDTH

const sal_Int32 CSV_MINCOLWIDTH = 8

Minimum character count for a column in separators mode.

Definition at line 33 of file csvcontrol.hxx.

Referenced by ScCsvGrid::ImplSetTextLineSep().

◆ CSV_PREVIEW_LINES

const sal_Int32 CSV_PREVIEW_LINES = 32

TODO make string array dynamic.

Definition at line 42 of file csvcontrol.hxx.

Referenced by IMPL_LINK_NOARG(), and ScCsvTableBox::SetUniStrings().

◆ CSV_SCROLL_DIST

const sal_Int32 CSV_SCROLL_DIST = 3

Minimum distance to border for auto scroll.

Definition at line 39 of file csvcontrol.hxx.

Referenced by ScCsvGrid::GetNoScrollCol(), ScCsvRuler::GetNoScrollPos(), ScCsvTableBox::MakePosVisible(), and ScCsvGrid::MoveCursor().

◆ CSV_TYPE_DEFAULT

const sal_Int32 CSV_TYPE_DEFAULT = 0

Default column data type.

Definition at line 47 of file csvcontrol.hxx.

Referenced by ScCsvGrid::FillColumnDataSep(), and ScCsvGrid::SetTypeNames().

◆ CSV_TYPE_MULTI

const sal_Int32 CSV_TYPE_MULTI = -1

Multi selection with different types.

Definition at line 49 of file csvcontrol.hxx.

Referenced by ScCsvGrid::GetSelColumnType(), IMPL_LINK(), and ScCsvGrid::SetSelColumnType().

◆ CSV_TYPE_NOSELECTION

const sal_Int32 CSV_TYPE_NOSELECTION = -2

No column selected.

Definition at line 51 of file csvcontrol.hxx.

Referenced by ScCsvGrid::GetColumnType(), ScCsvGrid::GetSelColumnType(), and ScCsvGrid::SetSelColumnType().

◆ SC_COL_DMY

const sal_uInt8 SC_COL_DMY = 4

Definition at line 57 of file csvcontrol.hxx.

Referenced by lcl_GetExtColumnType(), and lcl_PutString().

◆ SC_COL_ENGLISH

const sal_uInt8 SC_COL_ENGLISH = 10

Definition at line 60 of file csvcontrol.hxx.

Referenced by lcl_GetExtColumnType(), and lcl_PutString().

◆ SC_COL_MDY

const sal_uInt8 SC_COL_MDY = 3

Definition at line 56 of file csvcontrol.hxx.

Referenced by lcl_GetExtColumnType(), and lcl_PutString().

◆ SC_COL_SKIP

const sal_uInt8 SC_COL_SKIP = 9

◆ SC_COL_STANDARD

const sal_uInt8 SC_COL_STANDARD = 1

Definition at line 54 of file csvcontrol.hxx.

Referenced by ScImportExport::ExtText2Doc(), lcl_GetExtColumnType(), and lcl_PutString().

◆ SC_COL_TEXT

const sal_uInt8 SC_COL_TEXT = 2

Definition at line 55 of file csvcontrol.hxx.

Referenced by ScImportExport::ExtText2Doc(), lcl_GetExtColumnType(), and lcl_PutString().

◆ SC_COL_YMD

const sal_uInt8 SC_COL_YMD = 5

Definition at line 58 of file csvcontrol.hxx.

Referenced by lcl_GetExtColumnType(), and lcl_PutString().