diff options
author | Petr Vorel <petr.vorel@gmail.com> | 2013-02-21 21:11:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-24 23:16:32 +0000 |
commit | 538ba011d7b598737c898cfcce1e0d7b00b40c84 (patch) | |
tree | c5dacb0705bdfaa84fd903cf12accd825397a2ea /sc | |
parent | f4a6b7d3d6ab2599dc795b640e14af808ea9de35 (diff) |
rewrite import CSV dialog to WidgetLayout
Change-Id: Ifa674dc3cf14c9633be10b2fb7b59fea55a6a2e4
Reviewed-on: https://gerrit.libreoffice.org/2332
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/AllLangResTarget_sc.mk | 1 | ||||
-rw-r--r-- | sc/UI_scalc.mk | 1 | ||||
-rw-r--r-- | sc/source/ui/dbgui/asciiopt.src | 268 | ||||
-rw-r--r-- | sc/source/ui/dbgui/scuiasciiopt.cxx | 304 | ||||
-rw-r--r-- | sc/source/ui/inc/scuiasciiopt.hxx | 52 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/textimportcsv.ui | 633 |
6 files changed, 801 insertions, 458 deletions
diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk index df0d318fe6e0..e92e18c8c824 100644 --- a/sc/AllLangResTarget_sc.mk +++ b/sc/AllLangResTarget_sc.mk @@ -93,7 +93,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\ sc/source/ui/pagedlg/hfedtdlg.src \ sc/source/ui/styleui/scstyles.src \ sc/source/ui/styleui/styledlg.src \ - sc/source/ui/dbgui/asciiopt.src \ sc/source/ui/dbgui/pivot.src \ sc/source/ui/dbgui/dpgroupdlg.src \ sc/source/ui/dbgui/consdlg.src \ diff --git a/sc/UI_scalc.mk b/sc/UI_scalc.mk index c10f2b875a7e..990fb2678a73 100644 --- a/sc/UI_scalc.mk +++ b/sc/UI_scalc.mk @@ -17,6 +17,7 @@ $(eval $(call gb_UI_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/sortkey \ sc/uiconfig/scalc/ui/sortoptionspage \ sc/uiconfig/scalc/ui/textimportoptions \ + sc/uiconfig/scalc/ui/textimportcsv \ )) # vim: set noet sw=4 ts=4: diff --git a/sc/source/ui/dbgui/asciiopt.src b/sc/source/ui/dbgui/asciiopt.src deleted file mode 100644 index f03c1ce26aaf..000000000000 --- a/sc/source/ui/dbgui/asciiopt.src +++ /dev/null @@ -1,268 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "asciiopt.hrc" - -ModalDialog RID_SCDLG_ASCII -{ - HelpID = "sc:ModalDialog:RID_SCDLG_ASCII"; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 320 , 305 ) ; - Text [ en-US ] = "Text Import" ; - Moveable = TRUE ; - - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 264 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 264 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 264 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - - FixedLine FL_FIELDOPT - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 252 , 8 ) ; - Text [ en-US ] = "Import" ; - }; - - FixedText FT_CHARSET - { - Pos = MAP_APPFONT ( 12 , 16 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "Ch~aracter set" ; - }; - - ListBox LB_CHARSET - { - HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_CHARSET"; - Pos = MAP_APPFONT ( 76 , 14 ) ; - Size = MAP_APPFONT ( 130 , 61 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - Sort = TRUE; - }; - - FixedText FT_CUSTOMLANG - { - Pos = MAP_APPFONT ( 12 , 32 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "Language" ; - }; - - ListBox LB_CUSTOMLANG - { - HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_CUSTOMLANG"; - Pos = MAP_APPFONT ( 76 , 30 ) ; - Size = MAP_APPFONT ( 130 , 61 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - Sort = TRUE; - }; - - FixedText FT_AT_ROW - { - Pos = MAP_APPFONT ( 12 , 48 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "From ro~w" ; - }; - - NumericField NF_AT_ROW - { - HelpID = "sc:NumericField:RID_SCDLG_ASCII:NF_AT_ROW"; - Border = TRUE ; - SVLook = TRUE ; - Pos = MAP_APPFONT ( 76 , 46 ) ; - Size = MAP_APPFONT ( 30 , 12 ) ; - TabStop = TRUE ; - Spin = TRUE ; - Repeat = TRUE ; - Minimum = 1 ; - }; - - FixedLine FL_SEPOPT - { - Pos = MAP_APPFONT ( 6 , 63 ) ; - Size = MAP_APPFONT ( 252 , 8 ) ; - Text [ en-US ] = "Separator options" ; - }; - RadioButton RB_FIXED - { - HelpID = "sc:RadioButton:RID_SCDLG_ASCII:RB_FIXED"; - Pos = MAP_APPFONT ( 12 , 75 ) ; - Size = MAP_APPFONT ( 243 , 10 ) ; - Text [ en-US ] = "~Fixed width" ; - TabStop = TRUE ; - }; - RadioButton RB_SEPARATED - { - HelpID = "sc:RadioButton:RID_SCDLG_ASCII:RB_SEPARATED"; - Pos = MAP_APPFONT ( 12 , 89 ) ; - Size = MAP_APPFONT ( 243 , 10 ) ; - Text [ en-US ] = "~Separated by" ; - TabStop = TRUE ; - Check = TRUE ; - }; - - CheckBox CKB_TAB - { - HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_TAB"; - Pos = MAP_APPFONT ( 20 , 102 ) ; - Size = MAP_APPFONT ( 68 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Tab" ; - }; - CheckBox CKB_COMMA - { - HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_COMMA"; - Pos = MAP_APPFONT ( 92 , 102 ) ; - Size = MAP_APPFONT ( 68 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Comma" ; - }; - CheckBox CKB_OTHER - { - HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_OTHER"; - Pos = MAP_APPFONT ( 164 , 102 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Other" ; - }; - Edit ED_OTHER - { - HelpID = "sc:Edit:RID_SCDLG_ASCII:ED_OTHER"; - Border = TRUE ; - Pos = MAP_APPFONT ( 218 , 100 ) ; - Size = MAP_APPFONT ( 37 , 12 ) ; - TabStop = TRUE ; - MaxTextLength = 10 ; - }; - - CheckBox CKB_SEMICOLON - { - HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_SEMICOLON"; - Pos = MAP_APPFONT ( 20 , 115 ) ; - Size = MAP_APPFONT ( 68 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "S~emicolon" ; - }; - CheckBox CKB_SPACE - { - HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CKB_SPACE"; - Pos = MAP_APPFONT ( 92 , 115 ) ; - Size = MAP_APPFONT ( 68 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "S~pace" ; - }; - - CheckBox CB_ASONCE - { - HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_ASONCE"; - Pos = MAP_APPFONT ( 20 , 130 ) ; - Size = MAP_APPFONT ( 130 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Merge ~delimiters" ; - }; - - ComboBox CB_TEXTSEP - { - HelpID = "sc:ComboBox:RID_SCDLG_ASCII:CB_TEXTSEP"; - Pos = MAP_APPFONT ( 218 , 128 ) ; - Size = MAP_APPFONT ( 37 , 94 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - FixedText FT_TEXTSEP - { - Pos = MAP_APPFONT ( 156 , 130 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "Te~xt delimiter" ; - }; - - FixedLine FL_OTHER_OPTIONS - { - Pos = MAP_APPFONT ( 6 , 146 ) ; - Size = MAP_APPFONT ( 252 , 8 ) ; - Text [ en-US ] = "Other options" ; - }; - - CheckBox CB_QUOTED_AS_TEXT - { - HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_QUOTED_AS_TEXT"; - Pos = MAP_APPFONT ( 12 , 158 ) ; - Size = MAP_APPFONT ( 130 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Quoted field as text" ; - }; - - CheckBox CB_DETECT_SPECIAL_NUMBER - { - HelpID = "sc:CheckBox:RID_SCDLG_ASCII:CB_DETECT_SPECIAL_NUMBER"; - Pos = MAP_APPFONT ( 12 , 171 ) ; - Size = MAP_APPFONT ( 130 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Detect special numbers" ; - }; - - FixedLine FL_WIDTH - { - Pos = MAP_APPFONT ( 6 , 187 ) ; - Size = MAP_APPFONT ( 252 , 8 ) ; - Text [ en-US ] = "Fields" ; - }; - FixedText FT_TYPE - { - Pos = MAP_APPFONT ( 12 , 200 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "Column t~ype"; - }; - ListBox LB_TYPE1 - { - HelpID = "sc:ListBox:RID_SCDLG_ASCII:LB_TYPE1"; - Pos = MAP_APPFONT ( 76 , 198 ) ; - Size = MAP_APPFONT ( 60 , 68 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - }; - Control CTR_TABLEBOX - { - HelpId = HID_SC_ASCII_TABCTR ; - Border = TRUE ; - DialogControl = TRUE ; - Pos = MAP_APPFONT ( 12 , 216 ) ; - Size = MAP_APPFONT ( 243 , 82 ) ; - }; - - String STR_TEXTTOCOLUMNS - { - Text [ en-US ] = "Text to Columns" ; - }; -}; diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 9624fde0c13a..c84229a0d713 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -237,51 +237,14 @@ static void save_Separators( ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, SvStream* pInStream, ScImportAsciiCall eCall ) : - ModalDialog ( pParent, ScResId( RID_SCDLG_ASCII ) ), + ModalDialog (pParent, "TextImportCsvDialog", + "modules/scalc/ui/textimportcsv.ui"), mpDatStream ( pInStream ), mnStreamPos( pInStream ? pInStream->Tell() : 0 ), mpRowPosArray( NULL ), mnRowPosCount(0), - aFlFieldOpt ( this, ScResId( FL_FIELDOPT ) ), - aFtCharSet ( this, ScResId( FT_CHARSET ) ), - aLbCharSet ( this, ScResId( LB_CHARSET ) ), - aFtCustomLang( this, ScResId( FT_CUSTOMLANG ) ), - aLbCustomLang( this, ScResId( LB_CUSTOMLANG ) ), - - aFtRow ( this, ScResId( FT_AT_ROW ) ), - aNfRow ( this, ScResId( NF_AT_ROW ) ), - - aFlSepOpt ( this, ScResId( FL_SEPOPT ) ), - aRbFixed ( this, ScResId( RB_FIXED ) ), - aRbSeparated( this, ScResId( RB_SEPARATED ) ), - - aCkbTab ( this, ScResId( CKB_TAB ) ), - aCkbSemicolon(this, ScResId( CKB_SEMICOLON ) ), - aCkbComma ( this, ScResId( CKB_COMMA ) ), - aCkbSpace ( this, ScResId( CKB_SPACE ) ), - aCkbOther ( this, ScResId( CKB_OTHER ) ), - aEdOther ( this, ScResId( ED_OTHER ) ), - aCkbAsOnce ( this, ScResId( CB_ASONCE) ), - aFlOtherOpt ( this, ScResId( FL_OTHER_OPTIONS ) ), - - aFtTextSep ( this, ScResId( FT_TEXTSEP ) ), - aCbTextSep ( this, ScResId( CB_TEXTSEP ) ), - - aCkbQuotedAsText( this, ScResId(CB_QUOTED_AS_TEXT) ), - aCkbDetectNumber( this, ScResId(CB_DETECT_SPECIAL_NUMBER) ), - - aFlWidth ( this, ScResId( FL_WIDTH ) ), - aFtType ( this, ScResId( FT_TYPE ) ), - aLbType ( this, ScResId( LB_TYPE1 ) ), - - maTableBox ( this, ScResId( CTR_TABLEBOX ) ), - - aBtnOk ( this, ScResId( BTN_OK ) ), - aBtnCancel ( this, ScResId( BTN_CANCEL ) ), - aBtnHelp ( this, ScResId( BTN_HELP ) ), - aCharSetUser( ScResId( SCSTR_CHARSET_USER ) ), aColumnUser ( ScResId( SCSTR_COLUMN_USER ) ), aTextSepList( ScResId( SCSTR_TEXTSEP ) ), @@ -289,7 +252,28 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, maStrTextToColumns( ScResId( STR_TEXTTOCOLUMNS ) ), meCall(eCall) { - FreeResource(); + get(pFtCharSet, "textcharset"); + get(pLbCharSet, "charset"); + get(pFtCustomLang, "textlanguage"); + get(pLbCustomLang, "language"); + get(pFtRow, "textfromrow"); + get(pNfRow, "fromrow"); + get(pRbFixed, "tofixedwidth"); + get(pRbSeparated, "toseparatedby"); + get(pCkbTab, "tab"); + get(pCkbSemicolon, "semicolon"); + get(pCkbComma, "comma"); + get(pCkbSpace, "space"); + get(pCkbOther, "other"); + get(pEdOther, "inputother"); + get(pCkbAsOnce, "mergedelimiters"); + get(pFtTextSep, "texttextdelimiter"); + get(pCbTextSep, "textdelimiter"); + get(pCkbQuotedAsText, "quotedfieldastext"); + get(pCkbDetectNumber, "detectspecialnumbers"); + get(pFtType, "textcolumntype"); + get(pLbType, "columntype"); + get(mpTableBox, "scrolledwindowcolumntype"); String aName = GetText(); switch (meCall) @@ -321,15 +305,15 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, maFieldSeparators = String(sFieldSeparators); if( bMergeDelimiters ) - aCkbAsOnce.Check(); + pCkbAsOnce->Check(); if (bQuotedFieldAsText) - aCkbQuotedAsText.Check(); + pCkbQuotedAsText->Check(); if (bDetectSpecialNum) - aCkbDetectNumber.Check(); + pCkbDetectNumber->Check(); if( bFixedWidth ) - aRbFixed.Check(); + pRbFixed->Check(); if( nFromRow != 1 ) - aNfRow.SetValue( nFromRow ); + pNfRow->SetValue( nFromRow ); // Set Separators in the dialog from maFieldSeparators (empty are not set) SetSeparators(); @@ -381,90 +365,90 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,String aDatName, mnStreamPos = mpDatStream->Tell(); } - aNfRow.SetModifyHdl( LINK( this, ScImportAsciiDlg, FirstRowHdl ) ); + pNfRow->SetModifyHdl( LINK( this, ScImportAsciiDlg, FirstRowHdl ) ); // *** Separator characters *** - lcl_FillCombo( aCbTextSep, aTextSepList, mcTextSep ); - aCbTextSep.SetText( sTextSeparators ); + lcl_FillCombo( *pCbTextSep, aTextSepList, mcTextSep ); + pCbTextSep->SetText( sTextSeparators ); Link aSeparatorHdl =LINK( this, ScImportAsciiDlg, SeparatorHdl ); - aCbTextSep.SetSelectHdl( aSeparatorHdl ); - aCbTextSep.SetModifyHdl( aSeparatorHdl ); - aCkbTab.SetClickHdl( aSeparatorHdl ); - aCkbSemicolon.SetClickHdl( aSeparatorHdl ); - aCkbComma.SetClickHdl( aSeparatorHdl ); - aCkbAsOnce.SetClickHdl( aSeparatorHdl ); - aCkbQuotedAsText.SetClickHdl( aSeparatorHdl ); - aCkbDetectNumber.SetClickHdl( aSeparatorHdl ); - aCkbSpace.SetClickHdl( aSeparatorHdl ); - aCkbOther.SetClickHdl( aSeparatorHdl ); - aEdOther.SetModifyHdl( aSeparatorHdl ); + pCbTextSep->SetSelectHdl( aSeparatorHdl ); + pCbTextSep->SetModifyHdl( aSeparatorHdl ); + pCkbTab->SetClickHdl( aSeparatorHdl ); + pCkbSemicolon->SetClickHdl( aSeparatorHdl ); + pCkbComma->SetClickHdl( aSeparatorHdl ); + pCkbAsOnce->SetClickHdl( aSeparatorHdl ); + pCkbQuotedAsText->SetClickHdl( aSeparatorHdl ); + pCkbDetectNumber->SetClickHdl( aSeparatorHdl ); + pCkbSpace->SetClickHdl( aSeparatorHdl ); + pCkbOther->SetClickHdl( aSeparatorHdl ); + pEdOther->SetModifyHdl( aSeparatorHdl ); // *** text encoding ListBox *** // all encodings allowed, including Unicode, but subsets are excluded - aLbCharSet.FillFromTextEncodingTable( sal_True ); + pLbCharSet->FillFromTextEncodingTable( sal_True ); // Insert one "SYSTEM" entry for compatibility in AsciiOptions and system // independent document linkage. - aLbCharSet.InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser ); - aLbCharSet.SelectTextEncoding( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ? + pLbCharSet->InsertTextEncoding( RTL_TEXTENCODING_DONTKNOW, aCharSetUser ); + pLbCharSet->SelectTextEncoding( ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ? osl_getThreadTextEncoding() : ePreselectUnicode ); if( nCharSet >= 0 && ePreselectUnicode == RTL_TEXTENCODING_DONTKNOW ) - aLbCharSet.SelectEntryPos( static_cast<sal_uInt16>(nCharSet) ); + pLbCharSet->SelectEntryPos( static_cast<sal_uInt16>(nCharSet) ); SetSelectedCharSet(); - aLbCharSet.SetSelectHdl( LINK( this, ScImportAsciiDlg, CharSetHdl ) ); + pLbCharSet->SetSelectHdl( LINK( this, ScImportAsciiDlg, CharSetHdl ) ); - aLbCustomLang.SetLanguageList( + pLbCustomLang->SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, false, false); - aLbCustomLang.InsertLanguage(LANGUAGE_SYSTEM); - aLbCustomLang.SelectLanguage(static_cast<LanguageType>(nLanguage), true); + pLbCustomLang->InsertLanguage(LANGUAGE_SYSTEM); + pLbCustomLang->SelectLanguage(static_cast<LanguageType>(nLanguage), true); // *** column type ListBox *** xub_StrLen nCount = comphelper::string::getTokenCount(aColumnUser, ';'); for (xub_StrLen i=0; i<nCount; i++) - aLbType.InsertEntry( aColumnUser.GetToken( i ) ); + pLbType->InsertEntry( aColumnUser.GetToken( i ) ); - aLbType.SetSelectHdl( LINK( this, ScImportAsciiDlg, LbColTypeHdl ) ); - aFtType.Disable(); - aLbType.Disable(); + pLbType->SetSelectHdl( LINK( this, ScImportAsciiDlg, LbColTypeHdl ) ); + pFtType->Disable(); + pLbType->Disable(); // *** table box preview *** - maTableBox.Init(); - maTableBox.SetUpdateTextHdl( LINK( this, ScImportAsciiDlg, UpdateTextHdl ) ); - maTableBox.InitTypes( aLbType ); - maTableBox.SetColTypeHdl( LINK( this, ScImportAsciiDlg, ColTypeHdl ) ); + mpTableBox->Init(); + mpTableBox->SetUpdateTextHdl( LINK( this, ScImportAsciiDlg, UpdateTextHdl ) ); + mpTableBox->InitTypes( *pLbType ); + mpTableBox->SetColTypeHdl( LINK( this, ScImportAsciiDlg, ColTypeHdl ) ); - aRbSeparated.SetClickHdl( LINK( this, ScImportAsciiDlg, RbSepFixHdl ) ); - aRbFixed.SetClickHdl( LINK( this, ScImportAsciiDlg, RbSepFixHdl ) ); + pRbSeparated->SetClickHdl( LINK( this, ScImportAsciiDlg, RbSepFixHdl ) ); + pRbFixed->SetClickHdl( LINK( this, ScImportAsciiDlg, RbSepFixHdl ) ); SetupSeparatorCtrls(); - RbSepFixHdl( &aRbFixed ); + RbSepFixHdl( pRbFixed ); UpdateVertical(); - maTableBox.Execute( CSVCMD_NEWCELLTEXTS ); + mpTableBox->Execute( CSVCMD_NEWCELLTEXTS ); - aEdOther.SetAccessibleName(aCkbOther.GetText()); - aEdOther.SetAccessibleRelationLabeledBy(&aCkbOther); + pEdOther->SetAccessibleName(pCkbOther->GetText()); + pEdOther->SetAccessibleRelationLabeledBy(pCkbOther); if (meCall == SC_TEXTTOCOLUMNS) { - aFtCharSet.Disable(); - aLbCharSet.Disable(); - aFtCustomLang.Disable(); - aLbCustomLang.SelectLanguage(LANGUAGE_SYSTEM); - aLbCustomLang.Disable(); - aFtRow.Disable(); - aNfRow.Disable(); + pFtCharSet->Disable(); + pLbCharSet->Disable(); + pFtCustomLang->Disable(); + pLbCustomLang->SelectLanguage(LANGUAGE_SYSTEM); + pLbCustomLang->Disable(); + pFtRow->Disable(); + pNfRow->Disable(); // Quoted field as text option is not used for text-to-columns mode. - aCkbQuotedAsText.Check(false); - aCkbQuotedAsText.Disable(); + pCkbQuotedAsText->Check(false); + pCkbQuotedAsText->Disable(); // Always detect special numbers for text-to-columns mode. - aCkbDetectNumber.Check(); - aCkbDetectNumber.Disable(); + pCkbDetectNumber->Check(); + pCkbDetectNumber->Disable(); } } @@ -483,7 +467,7 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, rtl::OUString &rText ) return false; bool bRet = true; - bool bFixed = aRbFixed.IsChecked(); + bool bFixed = pRbFixed->IsChecked(); if (!mpRowPosArray) mpRowPosArray = new sal_uLong[ASCIIDLG_MAXROWS + 2]; @@ -550,29 +534,29 @@ void ScImportAsciiDlg::GetOptions( ScAsciiOptions& rOpt ) { rOpt.SetCharSet( meCharSet ); rOpt.SetCharSetSystem( mbCharSetSystem ); - rOpt.SetLanguage(aLbCustomLang.GetSelectLanguage()); - rOpt.SetFixedLen( aRbFixed.IsChecked() ); - rOpt.SetStartRow( (long)aNfRow.GetValue() ); - maTableBox.FillColumnData( rOpt ); - if( aRbSeparated.IsChecked() ) + rOpt.SetLanguage(pLbCustomLang->GetSelectLanguage()); + rOpt.SetFixedLen( pRbFixed->IsChecked() ); + rOpt.SetStartRow( (long)pNfRow->GetValue() ); + mpTableBox->FillColumnData( rOpt ); + if( pRbSeparated->IsChecked() ) { rOpt.SetFieldSeps( GetSeparators() ); - rOpt.SetMergeSeps( aCkbAsOnce.IsChecked() ); - rOpt.SetTextSep( lcl_CharFromCombo( aCbTextSep, aTextSepList ) ); + rOpt.SetMergeSeps( pCkbAsOnce->IsChecked() ); + rOpt.SetTextSep( lcl_CharFromCombo( *pCbTextSep, aTextSepList ) ); } - rOpt.SetQuotedAsText(aCkbQuotedAsText.IsChecked()); - rOpt.SetDetectSpecialNumber(aCkbDetectNumber.IsChecked()); + rOpt.SetQuotedAsText(pCkbQuotedAsText->IsChecked()); + rOpt.SetDetectSpecialNumber(pCkbDetectNumber->IsChecked()); } void ScImportAsciiDlg::SaveParameters() { - save_Separators( maFieldSeparators, aCbTextSep.GetText(), aCkbAsOnce.IsChecked(), - aCkbQuotedAsText.IsChecked(), aCkbDetectNumber.IsChecked(), - aRbFixed.IsChecked(), - static_cast<sal_Int32>(aNfRow.GetValue()), - static_cast<sal_Int32>(aLbCharSet.GetSelectEntryPos()), - static_cast<sal_Int32>(aLbCustomLang.GetSelectLanguage()), meCall ); + save_Separators( maFieldSeparators, pCbTextSep->GetText(), pCkbAsOnce->IsChecked(), + pCkbQuotedAsText->IsChecked(), pCkbDetectNumber->IsChecked(), + pRbFixed->IsChecked(), + static_cast<sal_Int32>(pNfRow->GetValue()), + static_cast<sal_Int32>(pLbCharSet->GetSelectEntryPos()), + static_cast<sal_Int32>(pLbCustomLang->GetSelectLanguage()), meCall ); } void ScImportAsciiDlg::SetSeparators() @@ -585,20 +569,20 @@ void ScImportAsciiDlg::SetSeparators() { switch( aSep[i] ) { - case '\t': aCkbTab.Check(); break; - case ';': aCkbSemicolon.Check(); break; - case ',': aCkbComma.Check(); break; - case ' ': aCkbSpace.Check(); break; + case '\t': pCkbTab->Check(); break; + case ';': pCkbSemicolon->Check(); break; + case ',': pCkbComma->Check(); break; + case ' ': pCkbSpace->Check(); break; default: - aCkbOther.Check(); - aEdOther.SetText( aEdOther.GetText() + OUString( aSep[i] ) ); + pCkbOther->Check(); + pEdOther->SetText( pEdOther->GetText() + OUString( aSep[i] ) ); } } } void ScImportAsciiDlg::SetSelectedCharSet() { - meCharSet = aLbCharSet.GetSelectTextEncoding(); + meCharSet = pLbCharSet->GetSelectTextEncoding(); mbCharSetSystem = (meCharSet == RTL_TEXTENCODING_DONTKNOW); if( mbCharSetSystem ) meCharSet = osl_getThreadTextEncoding(); @@ -607,31 +591,31 @@ void ScImportAsciiDlg::SetSelectedCharSet() String ScImportAsciiDlg::GetSeparators() const { String aSepChars; - if( aCkbTab.IsChecked() ) + if( pCkbTab->IsChecked() ) aSepChars += '\t'; - if( aCkbSemicolon.IsChecked() ) + if( pCkbSemicolon->IsChecked() ) aSepChars += ';'; - if( aCkbComma.IsChecked() ) + if( pCkbComma->IsChecked() ) aSepChars += ','; - if( aCkbSpace.IsChecked() ) + if( pCkbSpace->IsChecked() ) aSepChars += ' '; - if( aCkbOther.IsChecked() ) - aSepChars += aEdOther.GetText(); + if( pCkbOther->IsChecked() ) + aSepChars += pEdOther->GetText(); return aSepChars; } void ScImportAsciiDlg::SetupSeparatorCtrls() { - sal_Bool bEnable = aRbSeparated.IsChecked(); - aCkbTab.Enable( bEnable ); - aCkbSemicolon.Enable( bEnable ); - aCkbComma.Enable( bEnable ); - aCkbSpace.Enable( bEnable ); - aCkbOther.Enable( bEnable ); - aEdOther.Enable( bEnable ); - aCkbAsOnce.Enable( bEnable ); - aFtTextSep.Enable( bEnable ); - aCbTextSep.Enable( bEnable ); + sal_Bool bEnable = pRbSeparated->IsChecked(); + pCkbTab->Enable( bEnable ); + pCkbSemicolon->Enable( bEnable ); + pCkbComma->Enable( bEnable ); + pCkbSpace->Enable( bEnable ); + pCkbOther->Enable( bEnable ); + pEdOther->Enable( bEnable ); + pCkbAsOnce->Enable( bEnable ); + pFtTextSep->Enable( bEnable ); + pCbTextSep->Enable( bEnable ); } void ScImportAsciiDlg::UpdateVertical() @@ -648,13 +632,13 @@ IMPL_LINK( ScImportAsciiDlg, RbSepFixHdl, RadioButton*, pButton ) { OSL_ENSURE( pButton, "ScImportAsciiDlg::RbSepFixHdl - missing sender" ); - if( (pButton == &aRbFixed) || (pButton == &aRbSeparated) ) + if( (pButton == pRbFixed) || (pButton == pRbSeparated) ) { SetPointer( Pointer( POINTER_WAIT ) ); - if( aRbFixed.IsChecked() ) - maTableBox.SetFixedWidthMode(); + if( pRbFixed->IsChecked() ) + mpTableBox->SetFixedWidthMode(); else - maTableBox.SetSeparatorsMode(); + mpTableBox->SetSeparatorsMode(); SetPointer( Pointer( POINTER_ARROW ) ); SetupSeparatorCtrls(); @@ -665,25 +649,25 @@ IMPL_LINK( ScImportAsciiDlg, RbSepFixHdl, RadioButton*, pButton ) IMPL_LINK( ScImportAsciiDlg, SeparatorHdl, Control*, pCtrl ) { OSL_ENSURE( pCtrl, "ScImportAsciiDlg::SeparatorHdl - missing sender" ); - OSL_ENSURE( !aRbFixed.IsChecked(), "ScImportAsciiDlg::SeparatorHdl - not allowed in fixed width" ); + OSL_ENSURE( !pRbFixed->IsChecked(), "ScImportAsciiDlg::SeparatorHdl - not allowed in fixed width" ); /* #i41550# First update state of the controls. The GetSeparators() function needs final state of the check boxes. */ - if( (pCtrl == &aCkbOther) && aCkbOther.IsChecked() ) - aEdOther.GrabFocus(); - else if( pCtrl == &aEdOther ) - aCkbOther.Check( !aEdOther.GetText().isEmpty() ); + if( (pCtrl == pCkbOther) && pCkbOther->IsChecked() ) + pEdOther->GrabFocus(); + else if( pCtrl == pEdOther ) + pCkbOther->Check( !pEdOther->GetText().isEmpty() ); String aOldFldSeps( maFieldSeparators); maFieldSeparators = GetSeparators(); sal_Unicode cOldSep = mcTextSep; - mcTextSep = lcl_CharFromCombo( aCbTextSep, aTextSepList ); + mcTextSep = lcl_CharFromCombo( *pCbTextSep, aTextSepList ); // Any separator changed may result in completely different lines due to // embedded line breaks. if (cOldSep != mcTextSep || aOldFldSeps != maFieldSeparators) UpdateVertical(); - maTableBox.Execute( CSVCMD_NEWCELLTEXTS ); + mpTableBox->Execute( CSVCMD_NEWCELLTEXTS ); return 0; } @@ -691,7 +675,7 @@ IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox ) { OSL_ENSURE( pCharSetBox, "ScImportAsciiDlg::CharSetHdl - missing sender" ); - if( (pCharSetBox == &aLbCharSet) && (pCharSetBox->GetSelectEntryCount() == 1) ) + if( (pCharSetBox == pLbCharSet) && (pCharSetBox->GetSelectEntryCount() == 1) ) { SetPointer( Pointer( POINTER_WAIT ) ); CharSet eOldCharSet = meCharSet; @@ -700,7 +684,7 @@ IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox ) if (eOldCharSet != meCharSet) UpdateVertical(); - maTableBox.Execute( CSVCMD_NEWCELLTEXTS ); + mpTableBox->Execute( CSVCMD_NEWCELLTEXTS ); SetPointer( Pointer( POINTER_ARROW ) ); } return 0; @@ -709,22 +693,22 @@ IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox ) IMPL_LINK( ScImportAsciiDlg, FirstRowHdl, NumericField*, pNumField ) { OSL_ENSURE( pNumField, "ScImportAsciiDlg::FirstRowHdl - missing sender" ); - maTableBox.Execute( CSVCMD_SETFIRSTIMPORTLINE, sal::static_int_cast<sal_Int32>( pNumField->GetValue() - 1 ) ); + mpTableBox->Execute( CSVCMD_SETFIRSTIMPORTLINE, sal::static_int_cast<sal_Int32>( pNumField->GetValue() - 1 ) ); return 0; } IMPL_LINK( ScImportAsciiDlg, LbColTypeHdl, ListBox*, pListBox ) { OSL_ENSURE( pListBox, "ScImportAsciiDlg::LbColTypeHdl - missing sender" ); - if( pListBox == &aLbType ) - maTableBox.Execute( CSVCMD_SETCOLUMNTYPE, pListBox->GetSelectEntryPos() ); + if( pListBox == pLbType ) + mpTableBox->Execute( CSVCMD_SETCOLUMNTYPE, pListBox->GetSelectEntryPos() ); return 0; } IMPL_LINK_NOARG(ScImportAsciiDlg, UpdateTextHdl) { - sal_Int32 nBaseLine = maTableBox.GetFirstVisLine(); - sal_Int32 nRead = maTableBox.GetVisLineCount(); + sal_Int32 nBaseLine = mpTableBox->GetFirstVisLine(); + sal_Int32 nRead = mpTableBox->GetVisLineCount(); // If mnRowPosCount==0, this is an initializing call, read ahead for row // count and resulting scroll bar size and position to be able to scroll at // all. When adding lines, read only the amount of next lines to be @@ -741,9 +725,9 @@ IMPL_LINK_NOARG(ScImportAsciiDlg, UpdateTextHdl) for (; i < CSV_PREVIEW_LINES; i++) maPreviewLine[i] = rtl::OUString(); - maTableBox.Execute( CSVCMD_SETLINECOUNT, mnRowPosCount); - bool bMergeSep = (aCkbAsOnce.IsChecked() == sal_True); - maTableBox.SetUniStrings( maPreviewLine, maFieldSeparators, mcTextSep, bMergeSep); + mpTableBox->Execute( CSVCMD_SETLINECOUNT, mnRowPosCount); + bool bMergeSep = (pCkbAsOnce->IsChecked() == sal_True); + mpTableBox->SetUniStrings( maPreviewLine, maFieldSeparators, mcTextSep, bMergeSep); return 0; } @@ -753,20 +737,20 @@ IMPL_LINK( ScImportAsciiDlg, ColTypeHdl, ScCsvTableBox*, pTableBox ) OSL_ENSURE( pTableBox, "ScImportAsciiDlg::ColTypeHdl - missing sender" ); sal_Int32 nType = pTableBox->GetSelColumnType(); - sal_Int32 nTypeCount = aLbType.GetEntryCount(); + sal_Int32 nTypeCount = pLbType->GetEntryCount(); bool bEmpty = (nType == CSV_TYPE_MULTI); bool bEnable = ((0 <= nType) && (nType < nTypeCount)) || bEmpty; - aFtType.Enable( bEnable ); - aLbType.Enable( bEnable ); + pFtType->Enable( bEnable ); + pLbType->Enable( bEnable ); - Link aSelHdl = aLbType.GetSelectHdl(); - aLbType.SetSelectHdl( Link() ); + Link aSelHdl = pLbType->GetSelectHdl(); + pLbType->SetSelectHdl( Link() ); if( bEmpty ) - aLbType.SetNoSelection(); + pLbType->SetNoSelection(); else if( bEnable ) - aLbType.SelectEntryPos( static_cast< sal_uInt16 >( nType ) ); - aLbType.SetSelectHdl( aSelHdl ); + pLbType->SelectEntryPos( static_cast< sal_uInt16 >( nType ) ); + pLbType->SetSelectHdl( aSelHdl ); return 0; } diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx index cf93988ea43f..60db01388051 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -37,44 +37,38 @@ class ScImportAsciiDlg : public ModalDialog rtl::OUString maPreviewLine[ CSV_PREVIEW_LINES ]; - FixedLine aFlFieldOpt; - FixedText aFtCharSet; - SvxTextEncodingBox aLbCharSet; - FixedText aFtCustomLang; - SvxLanguageBox aLbCustomLang; + FixedText* pFtCharSet; - FixedText aFtRow; - NumericField aNfRow; + SvxTextEncodingBox* pLbCharSet; - FixedLine aFlSepOpt; - RadioButton aRbFixed; - RadioButton aRbSeparated; + FixedText* pFtCustomLang; - CheckBox aCkbTab; - CheckBox aCkbSemicolon; - CheckBox aCkbComma; - CheckBox aCkbSpace; - CheckBox aCkbOther; - Edit aEdOther; - CheckBox aCkbAsOnce; + SvxLanguageBox* pLbCustomLang; - FixedLine aFlOtherOpt; + FixedText* pFtRow; + NumericField* pNfRow; - FixedText aFtTextSep; - ComboBox aCbTextSep; + RadioButton* pRbFixed; + RadioButton* pRbSeparated; - CheckBox aCkbQuotedAsText; - CheckBox aCkbDetectNumber; + CheckBox* pCkbTab; + CheckBox* pCkbSemicolon; + CheckBox* pCkbComma; + CheckBox* pCkbSpace; + CheckBox* pCkbOther; + Edit* pEdOther; + CheckBox* pCkbAsOnce; - FixedLine aFlWidth; - FixedText aFtType; - ListBox aLbType; + FixedText* pFtTextSep; + ComboBox* pCbTextSep; - ScCsvTableBox maTableBox; + CheckBox* pCkbQuotedAsText; + CheckBox* pCkbDetectNumber; - OKButton aBtnOk; - CancelButton aBtnCancel; - HelpButton aBtnHelp; + FixedText* pFtType; + ListBox* pLbType; + + ScCsvTableBox* mpTableBox; String aCharSetUser; String aColumnUser; diff --git a/sc/uiconfig/scalc/ui/textimportcsv.ui b/sc/uiconfig/scalc/ui/textimportcsv.ui new file mode 100644 index 000000000000..262b614841d5 --- /dev/null +++ b/sc/uiconfig/scalc/ui/textimportcsv.ui @@ -0,0 +1,633 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="TextImportCsvDialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="bottom_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkAccelLabel" id="textcharset"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xpad">6</property> + <property name="label" translatable="yes">Ch_aracter set</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkAccelLabel" id="textlanguage"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Language</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkAccelLabel" id="textfromrow"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">From ro_w</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="charset"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="language"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="fromrow"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Import</property> + <attributes> + <attribute name="weight" value="semibold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="bottom_padding">12</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkRadioButton" id="tofixedwidth"> + <property name="label" translatable="yes">_Fixed width</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">toseparatedby</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="toseparatedby"> + <property name="label" translatable="yes">_Separated by</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">tofixedwidth</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_left">20</property> + <child> + <object class="GtkCheckButton" id="tab"> + <property name="label" translatable="yes">_Tab</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="semicolon"> + <property name="label" translatable="yes">S_emicolon</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="mergedelimiters"> + <property name="label" translatable="yes">Merge _delimiters</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="comma"> + <property name="label" translatable="yes">_Comma</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="space"> + <property name="label" translatable="yes">S_pace</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="other"> + <property name="label" translatable="yes">_Other</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="inputother"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="invisible_char">●</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="textdelimiter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkAccelLabel" id="texttextdelimiter"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Te_xt delimiter</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="separatoroptions"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Separator options</property> + <attributes> + <attribute name="weight" value="semibold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="bottom_padding">12</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkCheckButton" id="quotedfieldastext"> + <property name="label" translatable="yes">_Quoted field as text</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0.0099999997764825821</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="detectspecialnumbers"> + <property name="label" translatable="yes">Detect special _numbers</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_action_appearance">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Other options</property> + <attributes> + <attribute name="weight" value="semibold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="bottom_padding">12</property> + <property name="left_padding">12</property> + <child> + <object class="GtkBox" id="box4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkBox" id="box5"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkAccelLabel" id="textcolumntype"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Column t_ype</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="columntype"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="scrolledwindowcolumntype"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="shadow_type">in</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Fields</property> + <attributes> + <attribute name="weight" value="semibold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">help</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">ok</action-widget> + </action-widgets> + </object> +</interface> |