LibreOffice Module sc (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScImportAsciiDlg Class Reference

#include <scuiasciiopt.hxx>

Inheritance diagram for ScImportAsciiDlg:
[legend]
Collaboration diagram for ScImportAsciiDlg:
[legend]

Public Member Functions

 ScImportAsciiDlg (weld::Window *pParent, const OUString &aDatName, SvStream *pInStream, ScImportAsciiCall eCall)
 
virtual ~ScImportAsciiDlg () override
 
void GetOptions (ScAsciiOptions &rOpt)
 
void SaveParameters ()
 
- Public Member Functions inherited from weld::GenericDialogController
 GenericDialogController (weld::Widget *pParent, const OUString &rUIFile, const OString &rDialogId, bool bMobile=false)
 
virtual DialoggetDialog () override
 
virtual ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override
 
- Public Member Functions inherited from weld::DialogController
const DialoggetConstDialog () const
 
virtual short run ()
 
void set_title (const OUString &rTitle)
 
OUString get_title () const
 
void set_help_id (const OString &rHelpId)
 
OString get_help_id () const
 
void response (int nResponse)
 
virtual ~DialogController () COVERITY_NOEXCEPT_FALSE
 

Private Member Functions

void SetSelectedCharSet ()
 Sets the selected char set data to meCharSet and mbCharSetSystem. More...
 
void SetSeparators ()
 Set separators in ui from maFieldSeparators. More...
 
OUString GetSeparators () const
 Returns all separator characters in a string. More...
 
void SetupSeparatorCtrls ()
 Enables or disables all separator checkboxes and edit fields. More...
 
bool GetLine (sal_uLong nLine, OUString &rText, sal_Unicode &rcDetectSep)
 
void UpdateVertical ()
 
bool Seek (sal_uLong nPos)
 
 DECL_LINK (CharSetHdl, weld::ComboBox &, void)
 
 DECL_LINK (FirstRowHdl, weld::SpinButton &, void)
 
 DECL_LINK (RbSepFixHdl, weld::Button &, void)
 
 DECL_LINK (SeparatorEditHdl, weld::Entry &, void)
 
 DECL_LINK (SeparatorClickHdl, weld::Button &, void)
 
 DECL_LINK (SeparatorComboBoxHdl, weld::ComboBox &, void)
 
void SeparatorHdl (const weld::Widget *)
 
 DECL_LINK (LbColTypeHdl, weld::ComboBox &, void)
 
 DECL_LINK (UpdateTextHdl, ScCsvTableBox &, void)
 
 DECL_LINK (ColTypeHdl, ScCsvTableBox &, void)
 

Private Attributes

SvStreammpDatStream
 
sal_uLong mnStreamPos
 
std::unique_ptr< sal_uLong[]> mpRowPosArray
 
sal_uLong mnRowPosCount
 
OUString maPreviewLine [CSV_PREVIEW_LINES]
 
OUString maFieldSeparators
 
sal_Unicode mcTextSep
 
rtl_TextEncoding meCharSet
 
bool mbCharSetSystem
 Selected char set. More...
 
ScImportAsciiCall meCall
 Is System char set selected? More...
 
bool mbDetectSpaceSep
 How the dialog is called (see asciiopt.hxx) More...
 
std::unique_ptr< weld::LabelmxFtCharSet
 Whether to detect a possible space separator. More...
 
std::unique_ptr< SvxTextEncodingBoxmxLbCharSet
 
std::unique_ptr< weld::LabelmxFtCustomLang
 
std::unique_ptr< SvxLanguageBoxmxLbCustomLang
 
std::unique_ptr< weld::LabelmxFtRow
 
std::unique_ptr< weld::SpinButtonmxNfRow
 
std::unique_ptr< weld::RadioButtonmxRbFixed
 
std::unique_ptr< weld::RadioButtonmxRbSeparated
 
std::unique_ptr< weld::CheckButtonmxCkbTab
 
std::unique_ptr< weld::CheckButtonmxCkbSemicolon
 
std::unique_ptr< weld::CheckButtonmxCkbComma
 
std::unique_ptr< weld::CheckButtonmxCkbRemoveSpace
 
std::unique_ptr< weld::CheckButtonmxCkbSpace
 
std::unique_ptr< weld::CheckButtonmxCkbOther
 
std::unique_ptr< weld::EntrymxEdOther
 
std::unique_ptr< weld::CheckButtonmxCkbAsOnce
 
std::unique_ptr< weld::LabelmxFtTextSep
 
std::unique_ptr< weld::ComboBoxmxCbTextSep
 
std::unique_ptr< weld::CheckButtonmxCkbQuotedAsText
 
std::unique_ptr< weld::CheckButtonmxCkbDetectNumber
 
std::unique_ptr< weld::CheckButtonmxCkbSkipEmptyCells
 
std::unique_ptr< weld::LabelmxFtType
 
std::unique_ptr< weld::ComboBoxmxLbType
 
std::unique_ptr< weld::LabelmxAltTitle
 
std::unique_ptr< ScCsvTableBoxmxTableBox
 

Additional Inherited Members

- Static Public Member Functions inherited from weld::DialogController
static bool runAsync (const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
 
- Protected Attributes inherited from weld::GenericDialogController
std::unique_ptr< weld::Builderm_xBuilder
 
std::shared_ptr< weld::Dialogm_xDialog
 

Detailed Description

Definition at line 33 of file scuiasciiopt.hxx.

Constructor & Destructor Documentation

ScImportAsciiDlg::ScImportAsciiDlg ( weld::Window pParent,
const OUString &  aDatName,
SvStream pInStream,
ScImportAsciiCall  eCall 
)
ScImportAsciiDlg::~ScImportAsciiDlg ( )
overridevirtual

Definition at line 532 of file scuiasciiopt.cxx.

Member Function Documentation

ScImportAsciiDlg::DECL_LINK ( CharSetHdl  ,
weld::ComboBox ,
void   
)
private
ScImportAsciiDlg::DECL_LINK ( FirstRowHdl  ,
weld::SpinButton ,
void   
)
private
ScImportAsciiDlg::DECL_LINK ( RbSepFixHdl  ,
weld::Button ,
void   
)
private
ScImportAsciiDlg::DECL_LINK ( SeparatorEditHdl  ,
weld::Entry ,
void   
)
private
ScImportAsciiDlg::DECL_LINK ( SeparatorClickHdl  ,
weld::Button ,
void   
)
private
ScImportAsciiDlg::DECL_LINK ( SeparatorComboBoxHdl  ,
weld::ComboBox ,
void   
)
private
ScImportAsciiDlg::DECL_LINK ( LbColTypeHdl  ,
weld::ComboBox ,
void   
)
private
ScImportAsciiDlg::DECL_LINK ( UpdateTextHdl  ,
ScCsvTableBox ,
void   
)
private
ScImportAsciiDlg::DECL_LINK ( ColTypeHdl  ,
ScCsvTableBox ,
void   
)
private
bool ScImportAsciiDlg::GetLine ( sal_uLong  nLine,
OUString &  rText,
sal_Unicode rcDetectSep 
)
private
void ScImportAsciiDlg::GetOptions ( ScAsciiOptions rOpt)
OUString ScImportAsciiDlg::GetSeparators ( ) const
private

Returns all separator characters in a string.

Definition at line 661 of file scuiasciiopt.cxx.

References mxCkbComma, mxCkbOther, mxCkbSemicolon, mxCkbSpace, mxCkbTab, and mxEdOther.

Referenced by GetOptions(), ScImportAsciiDlg(), and SeparatorHdl().

void ScImportAsciiDlg::SaveParameters ( )
bool ScImportAsciiDlg::Seek ( sal_uLong  nPos)
inlineprivate

Definition at line 119 of file scuiasciiopt.hxx.

References mnStreamPos, mpDatStream, and SvStream::Seek().

Referenced by GetLine().

void ScImportAsciiDlg::SeparatorHdl ( const weld::Widget pCtrl)
private
void ScImportAsciiDlg::SetSelectedCharSet ( )
private

Sets the selected char set data to meCharSet and mbCharSetSystem.

Definition at line 653 of file scuiasciiopt.cxx.

References mbCharSetSystem, meCharSet, and mxLbCharSet.

Referenced by ScImportAsciiDlg().

void ScImportAsciiDlg::SetSeparators ( )
private

Set separators in ui from maFieldSeparators.

Definition at line 632 of file scuiasciiopt.cxx.

References i, maFieldSeparators, mxCkbComma, mxCkbOther, mxCkbSemicolon, mxCkbSpace, mxCkbTab, mxEdOther, and OUStringToOString().

Referenced by ScImportAsciiDlg().

void ScImportAsciiDlg::SetupSeparatorCtrls ( )
private

Enables or disables all separator checkboxes and edit fields.

Definition at line 677 of file scuiasciiopt.cxx.

References mxCbTextSep, mxCkbAsOnce, mxCkbComma, mxCkbOther, mxCkbRemoveSpace, mxCkbSemicolon, mxCkbSpace, mxCkbTab, mxEdOther, mxFtTextSep, and mxRbSeparated.

Referenced by ScImportAsciiDlg().

void ScImportAsciiDlg::UpdateVertical ( )
private

Definition at line 692 of file scuiasciiopt.cxx.

References meCharSet, mnRowPosCount, mpDatStream, and SvStream::SetStreamCharSet().

Referenced by ScImportAsciiDlg(), and SeparatorHdl().

Member Data Documentation

OUString ScImportAsciiDlg::maFieldSeparators
private
OUString ScImportAsciiDlg::maPreviewLine[CSV_PREVIEW_LINES]
private

Definition at line 40 of file scuiasciiopt.hxx.

bool ScImportAsciiDlg::mbCharSetSystem
private

Selected char set.

Definition at line 46 of file scuiasciiopt.hxx.

Referenced by GetOptions(), and SetSelectedCharSet().

bool ScImportAsciiDlg::mbDetectSpaceSep
private

How the dialog is called (see asciiopt.hxx)

Definition at line 48 of file scuiasciiopt.hxx.

sal_Unicode ScImportAsciiDlg::mcTextSep
private

Definition at line 43 of file scuiasciiopt.hxx.

Referenced by GetLine(), ScImportAsciiDlg(), and SeparatorHdl().

ScImportAsciiCall ScImportAsciiDlg::meCall
private

Is System char set selected?

Definition at line 47 of file scuiasciiopt.hxx.

Referenced by SaveParameters(), and ScImportAsciiDlg().

rtl_TextEncoding ScImportAsciiDlg::meCharSet
private

Definition at line 45 of file scuiasciiopt.hxx.

Referenced by GetOptions(), SetSelectedCharSet(), and UpdateVertical().

sal_uLong ScImportAsciiDlg::mnRowPosCount
private

Definition at line 38 of file scuiasciiopt.hxx.

Referenced by GetLine(), and UpdateVertical().

sal_uLong ScImportAsciiDlg::mnStreamPos
private

Definition at line 36 of file scuiasciiopt.hxx.

Referenced by GetLine(), ScImportAsciiDlg(), and Seek().

SvStream* ScImportAsciiDlg::mpDatStream
private

Definition at line 35 of file scuiasciiopt.hxx.

Referenced by GetLine(), ScImportAsciiDlg(), Seek(), and UpdateVertical().

std::unique_ptr<sal_uLong[]> ScImportAsciiDlg::mpRowPosArray
private

Definition at line 37 of file scuiasciiopt.hxx.

Referenced by GetLine().

std::unique_ptr<weld::Label> ScImportAsciiDlg::mxAltTitle
private

Definition at line 79 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

std::unique_ptr<weld::ComboBox> ScImportAsciiDlg::mxCbTextSep
private
std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbAsOnce
private

Definition at line 68 of file scuiasciiopt.hxx.

Referenced by GetOptions(), SaveParameters(), ScImportAsciiDlg(), and SetupSeparatorCtrls().

std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbComma
private
std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbDetectNumber
private

Definition at line 74 of file scuiasciiopt.hxx.

Referenced by GetOptions(), SaveParameters(), and ScImportAsciiDlg().

std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbOther
private
std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbQuotedAsText
private

Definition at line 73 of file scuiasciiopt.hxx.

Referenced by GetOptions(), SaveParameters(), and ScImportAsciiDlg().

std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbRemoveSpace
private

Definition at line 64 of file scuiasciiopt.hxx.

Referenced by GetOptions(), SaveParameters(), ScImportAsciiDlg(), and SetupSeparatorCtrls().

std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbSemicolon
private
std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbSkipEmptyCells
private

Definition at line 75 of file scuiasciiopt.hxx.

Referenced by GetOptions(), SaveParameters(), and ScImportAsciiDlg().

std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbSpace
private
std::unique_ptr<weld::CheckButton> ScImportAsciiDlg::mxCkbTab
private
std::unique_ptr<weld::Entry> ScImportAsciiDlg::mxEdOther
private
std::unique_ptr<weld::Label> ScImportAsciiDlg::mxFtCharSet
private

Whether to detect a possible space separator.

Definition at line 50 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

std::unique_ptr<weld::Label> ScImportAsciiDlg::mxFtCustomLang
private

Definition at line 52 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

std::unique_ptr<weld::Label> ScImportAsciiDlg::mxFtRow
private

Definition at line 55 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

std::unique_ptr<weld::Label> ScImportAsciiDlg::mxFtTextSep
private

Definition at line 70 of file scuiasciiopt.hxx.

Referenced by SetupSeparatorCtrls().

std::unique_ptr<weld::Label> ScImportAsciiDlg::mxFtType
private

Definition at line 77 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

std::unique_ptr<SvxTextEncodingBox> ScImportAsciiDlg::mxLbCharSet
private

Definition at line 51 of file scuiasciiopt.hxx.

Referenced by SaveParameters(), ScImportAsciiDlg(), and SetSelectedCharSet().

std::unique_ptr<SvxLanguageBox> ScImportAsciiDlg::mxLbCustomLang
private

Definition at line 53 of file scuiasciiopt.hxx.

Referenced by GetOptions(), SaveParameters(), and ScImportAsciiDlg().

std::unique_ptr<weld::ComboBox> ScImportAsciiDlg::mxLbType
private

Definition at line 78 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

std::unique_ptr<weld::SpinButton> ScImportAsciiDlg::mxNfRow
private

Definition at line 56 of file scuiasciiopt.hxx.

Referenced by GetOptions(), SaveParameters(), and ScImportAsciiDlg().

std::unique_ptr<weld::RadioButton> ScImportAsciiDlg::mxRbFixed
private

Definition at line 58 of file scuiasciiopt.hxx.

Referenced by GetLine(), GetOptions(), SaveParameters(), ScImportAsciiDlg(), and SeparatorHdl().

std::unique_ptr<weld::RadioButton> ScImportAsciiDlg::mxRbSeparated
private

Definition at line 59 of file scuiasciiopt.hxx.

Referenced by GetOptions(), ScImportAsciiDlg(), and SetupSeparatorCtrls().

std::unique_ptr<ScCsvTableBox> ScImportAsciiDlg::mxTableBox
private

Definition at line 81 of file scuiasciiopt.hxx.

Referenced by GetOptions(), ScImportAsciiDlg(), and SeparatorHdl().


The documentation for this class was generated from the following files: