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, std::u16string_view 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 OUString &rDialogId, bool bMobile=false)
 
virtual DialoggetDialog () override
 
virtual ~GenericDialogController () COVERITY_NOEXCEPT_FALSE override
 
- Public Member Functions inherited from weld::DialogController
virtual DialoggetDialog ()=0
 
const DialoggetConstDialog () const
 
virtual short run ()
 
void set_title (const OUString &rTitle)
 
OUString get_title () const
 
void set_help_id (const OUString &rHelpId)
 
OUString 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 (sal_Unicode cSep)
 Set separators in ui from maFieldSeparators or an optionally defined separator. 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)
 
void RbSepFix ()
 
 DECL_LINK (CharSetHdl, weld::ComboBox &, void)
 
 DECL_LINK (FirstRowHdl, weld::SpinButton &, void)
 
 DECL_LINK (RbSepFixHdl, weld::Toggleable &, void)
 
 DECL_LINK (SeparatorEditHdl, weld::Entry &, void)
 
 DECL_LINK (SeparatorClickHdl, weld::Toggleable &, void)
 
 DECL_LINK (OtherOptionsClickHdl, weld::Toggleable &, 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)
 
 DECL_STATIC_LINK (ScImportAsciiDlg, InstallLOKNotifierHdl, void *, vcl::ILibreOfficeKitNotifier *)
 

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 mbDetectSep
 How the dialog is called (see asciiopt.hxx) More...
 
std::unique_ptr< weld::LabelmxFtCharSet
 Whether to detect a possible 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::CheckButtonmxCkbDetectScientificNumber
 
std::unique_ptr< weld::CheckButtonmxCkbEvaluateFormulas
 
std::unique_ptr< weld::CheckButtonmxCkbSkipEmptyCells
 
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 32 of file scuiasciiopt.hxx.

Constructor & Destructor Documentation

◆ ScImportAsciiDlg()

ScImportAsciiDlg::ScImportAsciiDlg ( weld::Window pParent,
std::u16string_view  aDatName,
SvStream pInStream,
ScImportAsciiCall  eCall 
)

◆ ~ScImportAsciiDlg()

ScImportAsciiDlg::~ScImportAsciiDlg ( )
overridevirtual

Definition at line 616 of file scuiasciiopt.cxx.

Member Function Documentation

◆ DECL_LINK() [1/10]

ScImportAsciiDlg::DECL_LINK ( CharSetHdl  ,
weld::ComboBox ,
void   
)
private

◆ DECL_LINK() [2/10]

ScImportAsciiDlg::DECL_LINK ( ColTypeHdl  ,
ScCsvTableBox ,
void   
)
private

◆ DECL_LINK() [3/10]

ScImportAsciiDlg::DECL_LINK ( FirstRowHdl  ,
weld::SpinButton ,
void   
)
private

◆ DECL_LINK() [4/10]

ScImportAsciiDlg::DECL_LINK ( LbColTypeHdl  ,
weld::ComboBox ,
void   
)
private

◆ DECL_LINK() [5/10]

ScImportAsciiDlg::DECL_LINK ( OtherOptionsClickHdl  ,
weld::Toggleable ,
void   
)
private

◆ DECL_LINK() [6/10]

ScImportAsciiDlg::DECL_LINK ( RbSepFixHdl  ,
weld::Toggleable ,
void   
)
private

◆ DECL_LINK() [7/10]

ScImportAsciiDlg::DECL_LINK ( SeparatorClickHdl  ,
weld::Toggleable ,
void   
)
private

◆ DECL_LINK() [8/10]

ScImportAsciiDlg::DECL_LINK ( SeparatorComboBoxHdl  ,
weld::ComboBox ,
void   
)
private

◆ DECL_LINK() [9/10]

ScImportAsciiDlg::DECL_LINK ( SeparatorEditHdl  ,
weld::Entry ,
void   
)
private

◆ DECL_LINK() [10/10]

ScImportAsciiDlg::DECL_LINK ( UpdateTextHdl  ,
ScCsvTableBox ,
void   
)
private

◆ DECL_STATIC_LINK()

ScImportAsciiDlg::DECL_STATIC_LINK ( ScImportAsciiDlg  ,
InstallLOKNotifierHdl  ,
void *  ,
vcl::ILibreOfficeKitNotifier  
)
private

◆ GetLine()

bool ScImportAsciiDlg::GetLine ( sal_uLong  nLine,
OUString &  rText,
sal_Unicode rcDetectSep 
)
private

◆ GetOptions()

void ScImportAsciiDlg::GetOptions ( ScAsciiOptions rOpt)

◆ GetSeparators()

OUString ScImportAsciiDlg::GetSeparators ( ) const
private

Returns all separator characters in a string.

Definition at line 771 of file scuiasciiopt.cxx.

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

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

◆ RbSepFix()

void ScImportAsciiDlg::RbSepFix ( )
private

◆ SaveParameters()

void ScImportAsciiDlg::SaveParameters ( )

◆ Seek()

bool ScImportAsciiDlg::Seek ( sal_uLong  nPos)
inlineprivate

Definition at line 124 of file scuiasciiopt.hxx.

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

Referenced by GetLine().

◆ SeparatorHdl()

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

◆ SetSelectedCharSet()

void ScImportAsciiDlg::SetSelectedCharSet ( )
private

Sets the selected char set data to meCharSet and mbCharSetSystem.

Definition at line 763 of file scuiasciiopt.cxx.

References mbCharSetSystem, meCharSet, and mxLbCharSet.

Referenced by ScImportAsciiDlg().

◆ SetSeparators()

void ScImportAsciiDlg::SetSeparators ( sal_Unicode  cSep)
private

Set separators in ui from maFieldSeparators or an optionally defined separator.

Definition at line 719 of file scuiasciiopt.cxx.

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

Referenced by ScImportAsciiDlg().

◆ SetupSeparatorCtrls()

void ScImportAsciiDlg::SetupSeparatorCtrls ( )
private

Enables or disables all separator checkboxes and edit fields.

Definition at line 787 of file scuiasciiopt.cxx.

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

Referenced by RbSepFix(), and ScImportAsciiDlg().

◆ UpdateVertical()

void ScImportAsciiDlg::UpdateVertical ( )
private

Definition at line 802 of file scuiasciiopt.cxx.

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

Referenced by ScImportAsciiDlg(), and SeparatorHdl().

Member Data Documentation

◆ maFieldSeparators

OUString ScImportAsciiDlg::maFieldSeparators
private

◆ maPreviewLine

OUString ScImportAsciiDlg::maPreviewLine[CSV_PREVIEW_LINES]
private

Definition at line 39 of file scuiasciiopt.hxx.

◆ mbCharSetSystem

bool ScImportAsciiDlg::mbCharSetSystem
private

Selected char set.

Definition at line 45 of file scuiasciiopt.hxx.

Referenced by GetOptions(), and SetSelectedCharSet().

◆ mbDetectSep

bool ScImportAsciiDlg::mbDetectSep
private

How the dialog is called (see asciiopt.hxx)

Definition at line 47 of file scuiasciiopt.hxx.

◆ mcTextSep

sal_Unicode ScImportAsciiDlg::mcTextSep
private

Definition at line 42 of file scuiasciiopt.hxx.

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

◆ meCall

ScImportAsciiCall ScImportAsciiDlg::meCall
private

Is System char set selected?

Definition at line 46 of file scuiasciiopt.hxx.

Referenced by SaveParameters(), and ScImportAsciiDlg().

◆ meCharSet

rtl_TextEncoding ScImportAsciiDlg::meCharSet
private

Definition at line 44 of file scuiasciiopt.hxx.

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

◆ mnRowPosCount

sal_uLong ScImportAsciiDlg::mnRowPosCount
private

Definition at line 37 of file scuiasciiopt.hxx.

Referenced by GetLine(), and UpdateVertical().

◆ mnStreamPos

sal_uLong ScImportAsciiDlg::mnStreamPos
private

Definition at line 35 of file scuiasciiopt.hxx.

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

◆ mpDatStream

SvStream* ScImportAsciiDlg::mpDatStream
private

Definition at line 34 of file scuiasciiopt.hxx.

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

◆ mpRowPosArray

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

Definition at line 36 of file scuiasciiopt.hxx.

Referenced by GetLine().

◆ mxAltTitle

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

Definition at line 79 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

◆ mxCbTextSep

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

◆ mxCkbAsOnce

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

Definition at line 67 of file scuiasciiopt.hxx.

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

◆ mxCkbComma

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

◆ mxCkbDetectNumber

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

Definition at line 73 of file scuiasciiopt.hxx.

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

◆ mxCkbDetectScientificNumber

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

Definition at line 74 of file scuiasciiopt.hxx.

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

◆ mxCkbEvaluateFormulas

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

Definition at line 75 of file scuiasciiopt.hxx.

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

◆ mxCkbOther

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

◆ mxCkbQuotedAsText

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

Definition at line 72 of file scuiasciiopt.hxx.

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

◆ mxCkbRemoveSpace

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

Definition at line 63 of file scuiasciiopt.hxx.

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

◆ mxCkbSemicolon

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

◆ mxCkbSkipEmptyCells

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

Definition at line 76 of file scuiasciiopt.hxx.

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

◆ mxCkbSpace

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

◆ mxCkbTab

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

◆ mxEdOther

std::unique_ptr<weld::Entry> ScImportAsciiDlg::mxEdOther
private

◆ mxFtCharSet

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

Whether to detect a possible separator.

Definition at line 49 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

◆ mxFtCustomLang

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

Definition at line 51 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

◆ mxFtRow

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

Definition at line 54 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

◆ mxFtTextSep

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

Definition at line 69 of file scuiasciiopt.hxx.

Referenced by SetupSeparatorCtrls().

◆ mxLbCharSet

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

Definition at line 50 of file scuiasciiopt.hxx.

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

◆ mxLbCustomLang

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

Definition at line 52 of file scuiasciiopt.hxx.

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

◆ mxLbType

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

Definition at line 78 of file scuiasciiopt.hxx.

Referenced by ScImportAsciiDlg().

◆ mxNfRow

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

Definition at line 55 of file scuiasciiopt.hxx.

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

◆ mxRbFixed

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

◆ mxRbSeparated

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

Definition at line 58 of file scuiasciiopt.hxx.

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

◆ mxTableBox

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

Definition at line 81 of file scuiasciiopt.hxx.

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


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