diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-02 11:43:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-02 14:51:56 +0000 |
commit | 22d80c90c83fd1f819f6a208b09bedf7117c6611 (patch) | |
tree | 83e07064dad87a70fa1bb7239067dd628c7fed0b /sc/source | |
parent | 25dbaef62b8f6dee9a2c0b3806cc31f32fc0ff63 (diff) |
convert import options dialog to .ui
Change-Id: Iaf20b6d2306ba76f21cb5f7be231f40b403c790a
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/dbgui/imoptdlg.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/dbgui/imoptdlg.hrc | 37 | ||||
-rw-r--r-- | sc/source/ui/dbgui/imoptdlg.src | 137 | ||||
-rw-r--r-- | sc/source/ui/dbgui/scuiimoptdlg.cxx | 155 | ||||
-rw-r--r-- | sc/source/ui/inc/scuiimoptdlg.hxx | 43 | ||||
-rw-r--r-- | sc/source/ui/unoobj/filtuno.cxx | 2 |
8 files changed, 101 insertions, 291 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index fea71db24374..84162cfbf7e2 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -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, diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 8663baa063ff..f0176dd31765 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -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, diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx index fd2a18a136b6..bfbb546b6137 100644 --- a/sc/source/ui/dbgui/imoptdlg.cxx +++ b/sc/source/ui/dbgui/imoptdlg.cxx @@ -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> diff --git a/sc/source/ui/dbgui/imoptdlg.hrc b/sc/source/ui/dbgui/imoptdlg.hrc deleted file mode 100644 index 40a48659008e..000000000000 --- a/sc/source/ui/dbgui/imoptdlg.hrc +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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: */ diff --git a/sc/source/ui/dbgui/imoptdlg.src b/sc/source/ui/dbgui/imoptdlg.src deleted file mode 100644 index 805206cf86bd..000000000000 --- a/sc/source/ui/dbgui/imoptdlg.src +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- 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: */ diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 1b712959d433..1fba5ba2fb26 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -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; } diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx index d68b69c00d9e..95db317d7c3f 100644 --- a/sc/source/ui/inc/scuiimoptdlg.hxx +++ b/sc/source/ui/inc/scuiimoptdlg.hxx @@ -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; diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 068d01c2a319..053a075ecd5e 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -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!"); |