Kaydet (Commit) 22d80c90 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert import options dialog to .ui

Change-Id: Iaf20b6d2306ba76f21cb5f7be231f40b403c790a
üst 25dbaef6
......@@ -201,7 +201,16 @@
<glade-widget-class title="Text Encoding ListBox" name="svxlo-SvxTextEncodingBox"
generic-name="TextEncodingBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
icon-name="widget-gtk-combobox">
<properties>
<property save="True" query="False" id="dropdown" default="True" name="Use DropDown">
<parameter-spec>
<type>GParamBoolean</type>
</parameter-spec>
</property>
</properties>
</glade-widget-class>
<glade-widget-class title="Limit ListBox" name="dbulo-LimitBox"
generic-name="LimitBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
......
......@@ -53,7 +53,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
sc/source/ui/dbgui/dpgroupdlg.src \
sc/source/ui/dbgui/pvfundlg.src \
sc/source/ui/dbgui/dapitype.src \
sc/source/ui/dbgui/imoptdlg.src \
sc/source/ui/dbgui/scendlg.src \
sc/source/ui/dbgui/validate.src \
sc/source/ui/drawfunc/drformsh.src \
......
......@@ -94,6 +94,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/headerdialog \
sc/uiconfig/scalc/ui/headerfootercontent \
sc/uiconfig/scalc/ui/headerfooterdialog \
sc/uiconfig/scalc/ui/imoptdialog \
sc/uiconfig/scalc/ui/inputstringdialog \
sc/uiconfig/scalc/ui/insertcells \
sc/uiconfig/scalc/ui/insertname \
......
......@@ -52,7 +52,6 @@
// Hilfe IDs fuer Dialoge / Pages (max.70) -----------------------------------
#define HID_SC_PIVOTFILTER "SC_HID_SC_PIVOTFILTER"
#define HID_SC_INPORTOPT "SC_HID_SC_INPORTOPT"
#define HID_SC_NAVIGATOR "SC_HID_SC_NAVIGATOR"
......
......@@ -1029,7 +1029,6 @@
#define RID_SCPAGE_CALC (SC_DIALOGS_START + 56)
#define RID_SCDLG_NAVIGATOR (SC_DIALOGS_START + 57)
#define RID_SCDLG_IMPORTOPT (SC_DIALOGS_START + 59)
#define RID_POPUP_ROWHEADER (SC_DIALOGS_START + 60)
#define RID_POPUP_COLHEADER (SC_DIALOGS_START + 61)
#define RID_SCDLG_HFEDIT_SHDR (SC_DIALOGS_START + 62)
......
......@@ -459,7 +459,6 @@ public:
const OString& ) = 0;
virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( Window* pParent,
int nId,
sal_Bool bAscii = sal_True,
const ScImportOptions* pOptions = NULL,
const OUString* pStrTitle = NULL,
......
......@@ -960,7 +960,6 @@ AbstractScTabBgColorDlg * ScAbstractDialogFactory_Impl::CreateScTabBgColorDlg(
}
AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptionsDlg ( Window* pParent,
int nId,
sal_Bool bAscii,
const ScImportOptions* pOptions,
const OUString* pStrTitle,
......@@ -968,19 +967,8 @@ AbstractScImportOptionsDlg * ScAbstractDialogFactory_Impl::CreateScImportOptions
sal_Bool bOnlyDbtoolsEncodings,
sal_Bool bImport )
{
ScImportOptionsDlg * pDlg=NULL;
switch ( nId )
{
case RID_SCDLG_IMPORTOPT :
pDlg = new ScImportOptionsDlg( pParent, bAscii, pOptions,pStrTitle, bMultiByte,bOnlyDbtoolsEncodings, bImport );
break;
default:
break;
}
if ( pDlg )
return new AbstractScImportOptionsDlg_Impl( pDlg );
return 0;
ScImportOptionsDlg * pDlg = new ScImportOptionsDlg( pParent, bAscii, pOptions,pStrTitle, bMultiByte,bOnlyDbtoolsEncodings, bImport );
return new AbstractScImportOptionsDlg_Impl( pDlg );
}
SfxAbstractTabDialog * ScAbstractDialogFactory_Impl::CreateScAttrDlg(SfxViewFrame* pFrame,
......
......@@ -528,7 +528,6 @@ public:
const OString& sHelpId );
virtual AbstractScImportOptionsDlg * CreateScImportOptionsDlg ( Window* pParent,
int nId,
sal_Bool bAscii = sal_True,
const ScImportOptions* pOptions = NULL,
const OUString* pStrTitle = NULL,
......
......@@ -20,7 +20,6 @@
#include "imoptdlg.hxx"
#include "asciiopt.hxx"
#include "scresid.hxx"
#include "imoptdlg.hrc"
#include <comphelper/string.hxx>
#include <osl/thread.h>
#include <rtl/tencinfo.h>
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 "sc.hrc"
#define BTN_OK 1
#define BTN_CANCEL 2
#define BTN_HELP 3
#define FT_FIELDSEP 4
#define ED_FIELDSEP 5
#define FT_TEXTSEP 6
#define ED_TEXTSEP 7
#define FT_FONT 8
#define DDLB_FONT 9
#define LB_FONT 10
#define FL_FIELDOPT 11
#define CB_FIXEDWIDTH 12
#define CB_SAVESHOWN 13
#define CB_QUOTEALL 14
#define CB_FORMULAS 15
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 "imoptdlg.hrc"
ModalDialog RID_SCDLG_IMPORTOPT
{
HelpId = HID_SC_INPORTOPT ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 256 , 66 ) ;
Moveable = TRUE ;
Closeable = FALSE ;
Text [ en-US ] = "Import File" ;
FixedText FT_FIELDSEP
{
Pos = MAP_APPFONT ( 12 , 32 ) ;
Size = MAP_APPFONT ( 55 , 8 ) ;
Text [ en-US ] = "~Field delimiter" ;
};
ComboBox ED_FIELDSEP
{
HelpID = "sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_FIELDSEP";
Pos = MAP_APPFONT ( 70 , 30 ) ;
Size = MAP_APPFONT ( 121 , 60 ) ;
DropDown = TRUE ;
};
FixedText FT_TEXTSEP
{
Pos = MAP_APPFONT ( 12 , 48 ) ;
Size = MAP_APPFONT ( 55 , 8 ) ;
Text [ en-US ] = "~Text delimiter" ;
};
ComboBox ED_TEXTSEP
{
HelpID = "sc:ComboBox:RID_SCDLG_IMPORTOPT:ED_TEXTSEP";
Pos = MAP_APPFONT ( 70 , 46 ) ;
Size = MAP_APPFONT ( 121 , 60 ) ;
DropDown = TRUE ;
};
FixedText FT_FONT
{
Pos = MAP_APPFONT ( 12 , 16 ) ;
Size = MAP_APPFONT ( 55 , 8 ) ;
Text [ en-US ] = "~Character set" ;
};
ListBox DDLB_FONT
{
HelpID = "sc:ListBox:RID_SCDLG_IMPORTOPT:DDLB_FONT";
Border = TRUE;
Sort = TRUE;
DropDown = TRUE ;
Pos = MAP_APPFONT ( 70 , 14 ) ;
Size = MAP_APPFONT ( 121 , 52 ) ;
};
ListBox LB_FONT
{
HelpID = "sc:ListBox:RID_SCDLG_IMPORTOPT:LB_FONT";
Border = TRUE;
Sort = TRUE;
DropDown = FALSE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 179 , 50 ) ;
};
FixedLine FL_FIELDOPT
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 188 , 8 ) ;
Text [ en-US ] = "Field options" ;
};
CheckBox CB_SAVESHOWN
{
HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_SAVESHOWN";
Pos = MAP_APPFONT( 12, 66 );
Size = MAP_APPFONT( 172, 10 );
Hide = TRUE;
Text [ en-US ] = "Save cell content as ~shown";
};
CheckBox CB_FORMULAS
{
HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FORMULAS";
Pos = MAP_APPFONT( 12, 79 );
Size = MAP_APPFONT( 172, 10 );
Hide = TRUE;
Text [ en-US ] = "Save cell fo~rmulas instead of calculated values";
};
CheckBox CB_QUOTEALL
{
HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_QUOTEALL";
Pos = MAP_APPFONT( 12, 92 );
Size = MAP_APPFONT( 172, 10 );
Hide = TRUE;
Text [ en-US ] = "~Quote all text cells";
};
CheckBox CB_FIXEDWIDTH
{
HelpID = "sc:CheckBox:RID_SCDLG_IMPORTOPT:CB_FIXEDWIDTH";
Pos = MAP_APPFONT( 12, 105 );
Size = MAP_APPFONT( 172, 10 );
Hide = TRUE;
Text [ en-US ] = "Fixed column ~width";
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 202 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 202 , 24 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 202 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -25,7 +25,7 @@
#include "scuiimoptdlg.hxx"
#include "tabvwsh.hxx"
#include "scresid.hxx"
#include "imoptdlg.hrc"
#include "sc.hrc"
#include <comphelper/string.hxx>
#include <osl/thread.h>
#include <rtl/tencinfo.h>
......@@ -117,23 +117,29 @@ ScImportOptionsDlg::ScImportOptionsDlg(
sal_Bool bMultiByte,
sal_Bool bOnlyDbtoolsEncodings,
sal_Bool bImport )
: ModalDialog ( pParent, ScResId( RID_SCDLG_IMPORTOPT ) ),
aFlFieldOpt ( this, ScResId( FL_FIELDOPT ) ),
aFtFont ( this, ScResId( FT_FONT ) ),
aLbFont ( this, ScResId( bAscii ? DDLB_FONT : LB_FONT ) ),
aFtFieldSep ( this, ScResId( FT_FIELDSEP ) ),
aEdFieldSep ( this, ScResId( ED_FIELDSEP ) ),
aFtTextSep ( this, ScResId( FT_TEXTSEP ) ),
aEdTextSep ( this, ScResId( ED_TEXTSEP ) ),
aCbShown ( this, ScResId( CB_SAVESHOWN ) ),
aCbFormulas ( this, ScResId( CB_FORMULAS ) ),
aCbQuoteAll ( this, ScResId( CB_QUOTEALL ) ),
aCbFixed ( this, ScResId( CB_FIXEDWIDTH ) ),
aBtnOk ( this, ScResId( BTN_OK ) ),
aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
aBtnHelp ( this, ScResId( BTN_HELP ) )
: ModalDialog ( pParent, "ImOptDialog",
"modules/scalc/ui/imoptdialog.ui" )
{
get(m_pFieldFrame, "fieldframe");
get(m_pFtCharset, "charsetft");
if (bAscii)
get(m_pLbCharset, "charsetdropdown");
else
{
get(m_pLbCharset, "charsetlist");
m_pLbCharset->set_height_request(6 * m_pLbCharset->GetTextHeight());
}
m_pLbCharset->Show();
get(m_pFtFieldSep, "fieldft");
get(m_pEdFieldSep, "field");
get(m_pFtTextSep, "textft");
get(m_pEdTextSep, "text");
get(m_pCbShown, "asshown");
get(m_pCbFormulas, "formulas");
get(m_pCbQuoteAll, "quoteall");
get(m_pCbFixed, "fixedwidth");
get(m_pBtnOk, "ok");
OUString sFieldSep(SC_RESSTR(SCSTR_FIELDSEP));
sFieldSep = sFieldSep.replaceFirst( "%TAB", SC_RESSTR(SCSTR_FIELDSEP_TAB) );
sFieldSep = sFieldSep.replaceFirst( "%SPACE", SC_RESSTR(SCSTR_FIELDSEP_SPACE) );
......@@ -147,7 +153,7 @@ ScImportOptionsDlg::ScImportOptionsDlg(
while ( !aStr.isEmpty() )
{
aEdFieldSep.InsertEntry( aStr );
m_pEdFieldSep->InsertEntry( aStr );
aStr = pFieldSepTab->NextDel();
}
......@@ -155,27 +161,27 @@ ScImportOptionsDlg::ScImportOptionsDlg(
while ( !aStr.isEmpty() )
{
aEdTextSep.InsertEntry( aStr );
m_pEdTextSep->InsertEntry( aStr );
aStr = pTextSepTab->NextDel();
}
aEdFieldSep.SetText( aEdFieldSep.GetEntry(0) );
aEdTextSep.SetText( aEdTextSep.GetEntry(0) );
m_pEdFieldSep->SetText( m_pEdFieldSep->GetEntry(0) );
m_pEdTextSep->SetText( m_pEdTextSep->GetEntry(0) );
if ( bOnlyDbtoolsEncodings )
{
// Even dBase export allows multibyte now
if ( bMultiByte )
aLbFont.FillFromDbTextEncodingMap( bImport );
m_pLbCharset->FillFromDbTextEncodingMap( bImport );
else
aLbFont.FillFromDbTextEncodingMap( bImport, RTL_TEXTENCODING_INFO_MULTIBYTE );
m_pLbCharset->FillFromDbTextEncodingMap( bImport, RTL_TEXTENCODING_INFO_MULTIBYTE );
}
else if ( !bAscii )
{ //!TODO: Unicode would need work in each filter
if ( bMultiByte )
aLbFont.FillFromTextEncodingTable( bImport, RTL_TEXTENCODING_INFO_UNICODE );
m_pLbCharset->FillFromTextEncodingTable( bImport, RTL_TEXTENCODING_INFO_UNICODE );
else
aLbFont.FillFromTextEncodingTable( bImport, RTL_TEXTENCODING_INFO_UNICODE |
m_pLbCharset->FillFromTextEncodingTable( bImport, RTL_TEXTENCODING_INFO_UNICODE |
RTL_TEXTENCODING_INFO_MULTIBYTE );
}
else
......@@ -186,67 +192,60 @@ ScImportOptionsDlg::ScImportOptionsDlg(
aStr = pFieldSepTab->GetDelimiter( nCode );
if ( aStr.isEmpty() )
aEdFieldSep.SetText( OUString((sal_Unicode)nCode) );
m_pEdFieldSep->SetText( OUString((sal_Unicode)nCode) );
else
aEdFieldSep.SetText( aStr );
m_pEdFieldSep->SetText( aStr );
nCode = pOptions->nTextSepCode;
aStr = pTextSepTab->GetDelimiter( nCode );
if ( aStr.isEmpty() )
aEdTextSep.SetText( OUString((sal_Unicode)nCode) );
m_pEdTextSep->SetText( OUString((sal_Unicode)nCode) );
else
aEdTextSep.SetText( aStr );
m_pEdTextSep->SetText( aStr );
}
// all encodings allowed, even Unicode
aLbFont.FillFromTextEncodingTable( bImport );
m_pLbCharset->FillFromTextEncodingTable( bImport );
}
if( bAscii )
{
Size aWinSize( GetSizePixel() );
aWinSize.Height() = aCbFixed.GetPosPixel().Y() + aCbFixed.GetSizePixel().Height();
Size aDiffSize( LogicToPixel( Size( 0, 6 ), MapMode( MAP_APPFONT ) ) );
aWinSize.Height() += aDiffSize.Height();
SetSizePixel( aWinSize );
aCbFixed.Show();
aCbFixed.SetClickHdl( LINK( this, ScImportOptionsDlg, FixedWidthHdl ) );
aCbFixed.Check( false );
aCbShown.Show();
aCbShown.Check( sal_True );
aCbQuoteAll.Show();
aCbQuoteAll.Check( false );
aCbFormulas.Show();
m_pCbFixed->Show();
m_pCbFixed->SetClickHdl( LINK( this, ScImportOptionsDlg, FixedWidthHdl ) );
m_pCbFixed->Check( false );
m_pCbShown->Show();
m_pCbShown->Check( sal_True );
m_pCbQuoteAll->Show();
m_pCbQuoteAll->Check( false );
m_pCbFormulas->Show();
ScTabViewShell* pViewSh = PTR_CAST( ScTabViewShell, SfxViewShell::Current());
bool bFormulas = (pViewSh ?
pViewSh->GetViewData()->GetOptions().GetOption( VOPT_FORMULAS) :
false);
aCbFormulas.Check( bFormulas );
m_pCbFormulas->Check( bFormulas );
}
else
{
aFlFieldOpt.SetText( aFtFont.GetText() );
aFtFieldSep.Hide();
aFtTextSep.Hide();
aFtFont.Hide();
aEdFieldSep.Hide();
aEdTextSep.Hide();
aCbFixed.Hide();
aCbShown.Hide();
aCbQuoteAll.Hide();
aCbFormulas.Hide();
aLbFont.GrabFocus();
aLbFont.SetDoubleClickHdl( LINK( this, ScImportOptionsDlg, DoubleClickHdl ) );
m_pFieldFrame->set_label(m_pFtCharset->GetText());
m_pFtFieldSep->Hide();
m_pFtTextSep->Hide();
m_pFtCharset->Hide();
m_pEdFieldSep->Hide();
m_pEdTextSep->Hide();
m_pCbFixed->Hide();
m_pCbShown->Hide();
m_pCbQuoteAll->Hide();
m_pCbFormulas->Hide();
m_pLbCharset->GrabFocus();
m_pLbCharset->SetDoubleClickHdl( LINK( this, ScImportOptionsDlg, DoubleClickHdl ) );
}
aLbFont.SelectTextEncoding( pOptions ? pOptions->eCharSet :
m_pLbCharset->SelectTextEncoding( pOptions ? pOptions->eCharSet :
osl_getThreadTextEncoding() );
// optionaler Titel:
if ( pStrTitle )
SetText( *pStrTitle );
FreeResource();
}
//------------------------------------------------------------------------
......@@ -261,16 +260,16 @@ ScImportOptionsDlg::~ScImportOptionsDlg()
void ScImportOptionsDlg::GetImportOptions( ScImportOptions& rOptions ) const
{
rOptions.SetTextEncoding( aLbFont.GetSelectTextEncoding() );
rOptions.SetTextEncoding( m_pLbCharset->GetSelectTextEncoding() );
if ( aCbFixed.IsVisible() )
if ( m_pCbFixed->IsVisible() )
{
rOptions.nFieldSepCode = GetCodeFromCombo( aEdFieldSep );
rOptions.nTextSepCode = GetCodeFromCombo( aEdTextSep );
rOptions.bFixedWidth = aCbFixed.IsChecked();
rOptions.bSaveAsShown = aCbShown.IsChecked();
rOptions.bQuoteAllText = aCbQuoteAll.IsChecked();
rOptions.bSaveFormulas = aCbFormulas.IsChecked();
rOptions.nFieldSepCode = GetCodeFromCombo( *m_pEdFieldSep );
rOptions.nTextSepCode = GetCodeFromCombo( *m_pEdTextSep );
rOptions.bFixedWidth = m_pCbFixed->IsChecked();
rOptions.bSaveAsShown = m_pCbShown->IsChecked();
rOptions.bQuoteAllText = m_pCbQuoteAll->IsChecked();
rOptions.bSaveFormulas = m_pCbFormulas->IsChecked();
}
}
......@@ -282,7 +281,7 @@ sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const
OUString aStr( rEd.GetText() );
sal_uInt16 nCode;
if ( &rEd == &aEdTextSep )
if ( &rEd == m_pEdTextSep )
pTab = pTextSepTab;
else
pTab = pFieldSepTab;
......@@ -306,24 +305,24 @@ sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const
IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox )
{
if( pCheckBox == &aCbFixed )
if (pCheckBox == m_pCbFixed)
{
sal_Bool bEnable = !aCbFixed.IsChecked();
aFtFieldSep.Enable( bEnable );
aEdFieldSep.Enable( bEnable );
aFtTextSep.Enable( bEnable );
aEdTextSep.Enable( bEnable );
aCbShown.Enable( bEnable );
aCbQuoteAll.Enable( bEnable );
sal_Bool bEnable = !m_pCbFixed->IsChecked();
m_pFtFieldSep->Enable( bEnable );
m_pEdFieldSep->Enable( bEnable );
m_pFtTextSep->Enable( bEnable );
m_pEdTextSep->Enable( bEnable );
m_pCbShown->Enable( bEnable );
m_pCbQuoteAll->Enable( bEnable );
}
return 0;
}
IMPL_LINK( ScImportOptionsDlg, DoubleClickHdl, ListBox*, pLb )
{
if ( pLb == &aLbFont )
if (pLb == m_pLbCharset)
{
aBtnOk.Click();
m_pBtnOk->Click();
}
return 0;
}
......
......@@ -20,6 +20,7 @@
#ifndef SCUI_IMOPTDLG_HXX
#define SCUI_IMOPTDLG_HXX
#include <vcl/layout.hxx>
#include "imoptdlg.hxx"
//===================================================================
......@@ -30,33 +31,31 @@ class ScDelimiterTable;
class ScImportOptionsDlg : public ModalDialog
{
public:
ScImportOptionsDlg( Window* pParent,
sal_Bool bAscii = sal_True,
const ScImportOptions* pOptions = NULL,
const OUString* pStrTitle = NULL,
sal_Bool bMultiByte = false,
sal_Bool bOnlyDbtoolsEncodings = false,
sal_Bool bImport = sal_True );
ScImportOptionsDlg( Window* pParent,
sal_Bool bAscii = sal_True,
const ScImportOptions* pOptions = NULL,
const OUString* pStrTitle = NULL,
sal_Bool bMultiByte = false,
sal_Bool bOnlyDbtoolsEncodings = false,
sal_Bool bImport = sal_True );
~ScImportOptionsDlg();
~ScImportOptionsDlg();
void GetImportOptions( ScImportOptions& rOptions ) const;
private:
FixedLine aFlFieldOpt;
FixedText aFtFont;
SvxTextEncodingBox aLbFont;
FixedText aFtFieldSep;
ComboBox aEdFieldSep;
FixedText aFtTextSep;
ComboBox aEdTextSep;
CheckBox aCbShown;
CheckBox aCbFormulas;
CheckBox aCbQuoteAll;
CheckBox aCbFixed;
OKButton aBtnOk;
CancelButton aBtnCancel;
HelpButton aBtnHelp;
VclFrame* m_pFieldFrame;
FixedText* m_pFtCharset;
SvxTextEncodingBox* m_pLbCharset;
FixedText* m_pFtFieldSep;
ComboBox* m_pEdFieldSep;
FixedText* m_pFtTextSep;
ComboBox* m_pEdTextSep;
CheckBox* m_pCbShown;
CheckBox* m_pCbFormulas;
CheckBox* m_pCbQuoteAll;
CheckBox* m_pCbFixed;
OKButton* m_pBtnOk;
ScDelimiterTable* pFieldSepTab;
ScDelimiterTable* pTextSepTab;
......
......@@ -309,7 +309,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException)
ScImportOptions aOptions( cAsciiDel, cStrDel, eEncoding);
AbstractScImportOptionsDlg* pDlg = pFact->CreateScImportOptionsDlg( NULL, RID_SCDLG_IMPORTOPT,
AbstractScImportOptionsDlg* pDlg = pFact->CreateScImportOptionsDlg(NULL,
bAscii, &aOptions, &aTitle, bMultiByte, bDBEnc,
!bExport);
OSL_ENSURE(pDlg, "Dialog create fail!");
......
This diff is collapsed.
......@@ -48,11 +48,19 @@ SvxTextEncodingBox::SvxTextEncodingBox( Window* pParent, WinBits nBits )
m_pEncTable = new SvxTextEncodingTable;
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxTextEncodingBox(Window *pParent, VclBuilder::stringmap &)
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxTextEncodingBox(Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinBits = WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
bool bDropdown = VclBuilder::extractDropdown(rMap);
if (bDropdown)
nWinBits |= WB_DROPDOWN;
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
SvxTextEncodingBox *pListBox = new SvxTextEncodingBox(pParent, nWinBits);
pListBox->EnableAutoSize(true);
if (bDropdown)
pListBox->EnableAutoSize(true);
return pListBox;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment