diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-03-22 17:31:11 +0100 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-03-22 17:31:11 +0100 |
commit | 4d27ce49a33c074b598566ac7073fc712c3613af (patch) | |
tree | a34f9d2af67d8d335f90c497f94f4be418d5c39f /sc/source/ui/inc | |
parent | 8d39d5f26f520911e47731fa4e25125f2828f9d8 (diff) | |
parent | 0760ed43d7d8e9c8f29e94eba8a954d54ad2ef80 (diff) |
CWS-TOOLING: integrate CWS koheicsvimport
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r-- | sc/source/ui/inc/asciiopt.hxx | 11 | ||||
-rw-r--r-- | sc/source/ui/inc/csvruler.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/impex.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/scuiasciiopt.hxx | 12 | ||||
-rw-r--r-- | sc/source/ui/inc/textimportoptions.hrc | 42 | ||||
-rw-r--r-- | sc/source/ui/inc/textimportoptions.hxx | 76 |
7 files changed, 143 insertions, 2 deletions
diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx index aee63d682a26..a5c7a2b554b4 100644 --- a/sc/source/ui/inc/asciiopt.hxx +++ b/sc/source/ui/inc/asciiopt.hxx @@ -52,7 +52,7 @@ #include <tools/stream.hxx> #include <svx/txencbox.hxx> #include "csvtablebox.hxx" - +#include "i18npool/lang.h" // ============================================================================ @@ -62,8 +62,11 @@ private: BOOL bFixedLen; String aFieldSeps; BOOL bMergeFieldSeps; + bool bQuotedFieldAsText; + bool bDetectSpecialNumber; sal_Unicode cTextSep; CharSet eCharSet; + LanguageType eLang; BOOL bCharSetSystem; long nStartRow; USHORT nInfoCount; @@ -90,20 +93,26 @@ public: BOOL GetCharSetSystem() const { return bCharSetSystem; } const String& GetFieldSeps() const { return aFieldSeps; } BOOL IsMergeSeps() const { return bMergeFieldSeps; } + bool IsQuotedAsText() const { return bQuotedFieldAsText; } + bool IsDetectSpecialNumber() const { return bDetectSpecialNumber; } sal_Unicode GetTextSep() const { return cTextSep; } BOOL IsFixedLen() const { return bFixedLen; } USHORT GetInfoCount() const { return nInfoCount; } const xub_StrLen* GetColStart() const { return pColStart; } const BYTE* GetColFormat() const { return pColFormat; } long GetStartRow() const { return nStartRow; } + LanguageType GetLanguage() const { return eLang; } void SetCharSet( CharSet eNew ) { eCharSet = eNew; } void SetCharSetSystem( BOOL bSet ) { bCharSetSystem = bSet; } void SetFixedLen( BOOL bSet ) { bFixedLen = bSet; } void SetFieldSeps( const String& rStr ) { aFieldSeps = rStr; } void SetMergeSeps( BOOL bSet ) { bMergeFieldSeps = bSet; } + void SetQuotedAsText(bool bSet) { bQuotedFieldAsText = bSet; } + void SetDetectSpecialNumber(bool bSet) { bDetectSpecialNumber = bSet; } void SetTextSep( sal_Unicode c ) { cTextSep = c; } void SetStartRow( long nRow) { nStartRow= nRow; } + void SetLanguage(LanguageType e) { eLang = e; } void SetColInfo( USHORT nCount, const xub_StrLen* pStart, const BYTE* pFormat ); void SetColumnInfo( const ScCsvExpDataVec& rDataVec ); diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx index 5ddeb1f1ceba..52be4b4ebd8c 100644 --- a/sc/source/ui/inc/csvruler.hxx +++ b/sc/source/ui/inc/csvruler.hxx @@ -68,6 +68,7 @@ private: // ------------------------------------------------------------------------ public: explicit ScCsvRuler( ScCsvControl& rParent ); + ~ScCsvRuler(); // common ruler handling -------------------------------------------------- public: diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index da5e5e7ffbff..fe02942d1077 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -399,6 +399,7 @@ public: static ScDocShell* GetShellByNum( USHORT nDocNo ); static String GetOwnFilterName(); + static String GetHtmlFilterName(); static String GetWebQueryFilterName(); static String GetAsciiFilterName(); static String GetLotusFilterName(); diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index fe4177df7cae..86a91216edcc 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -107,7 +107,7 @@ public: static BOOL IsFormatSupported( ULONG nFormat ); static const sal_Unicode* ScanNextFieldFromString( const sal_Unicode* p, - String& rField, sal_Unicode cStr, const sal_Unicode* pSeps, BOOL bMergeSeps ); + String& rField, sal_Unicode cStr, const sal_Unicode* pSeps, bool bMergeSeps, bool& rbIsQuoted ); static void WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, BOOL bZero = FALSE ); static void WriteUnicodeOrByteEndl( SvStream& rStrm ); static inline BOOL IsEndianSwap( const SvStream& rStrm ); diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx index a1f73458c3a0..3e1a7db38fb2 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -32,6 +32,8 @@ #include "asciiopt.hxx" +#include "svx/langbox.hxx" + // ============================================================================ class ScImportAsciiDlg : public ModalDialog @@ -46,6 +48,8 @@ class ScImportAsciiDlg : public ModalDialog FixedLine aFlFieldOpt; FixedText aFtCharSet; SvxTextEncodingBox aLbCharSet; + FixedText aFtCustomLang; + SvxLanguageBox aLbCustomLang; FixedText aFtRow; NumericField aNfRow; @@ -61,9 +65,15 @@ class ScImportAsciiDlg : public ModalDialog CheckBox aCkbOther; Edit aEdOther; CheckBox aCkbAsOnce; + + FixedLine aFlOtherOpt; + FixedText aFtTextSep; ComboBox aCbTextSep; + CheckBox aCkbQuotedAsText; + CheckBox aCkbDetectNumber; + FixedLine aFlWidth; FixedText aFtType; ListBox aLbType; @@ -84,6 +94,7 @@ class ScImportAsciiDlg : public ModalDialog CharSet meCharSet; /// Selected char set. bool mbCharSetSystem; /// Is System char set selected? + bool mbFileImport; /// Is this dialog involked for csv file import ? public: ScImportAsciiDlg( @@ -93,6 +104,7 @@ public: void GetOptions( ScAsciiOptions& rOpt ); void SetTextToColumnsMode(); + void SaveParameters(); private: /** Sets the selected char set data to meCharSet and mbCharSetSystem. */ diff --git a/sc/source/ui/inc/textimportoptions.hrc b/sc/source/ui/inc/textimportoptions.hrc new file mode 100644 index 000000000000..93c554ef5c45 --- /dev/null +++ b/sc/source/ui/inc/textimportoptions.hrc @@ -0,0 +1,42 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: retypepassdlg.src,v $ + * $Revision: 1.1.2.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include <sc.hrc> + +#define BTN_OK 1 +#define BTN_CANCEL 2 +#define BTN_HELP 3 + +#define FL_CHOOSE_LANG 4 +#define RB_AUTOMATIC 5 +#define RB_CUSTOM 6 +#define LB_CUSTOM_LANG 7 +#define FL_OPTION 8 +#define BTN_CONVERT_DATE 9 diff --git a/sc/source/ui/inc/textimportoptions.hxx b/sc/source/ui/inc/textimportoptions.hxx new file mode 100644 index 000000000000..bbb2bf6ebf09 --- /dev/null +++ b/sc/source/ui/inc/textimportoptions.hxx @@ -0,0 +1,76 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: langbox.hxx,v $ + * $Revision: 1.4.242.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_UI_IMPORTOPTIONS_HXX +#define SC_UI_IMPORTOPTIONS_HXX + +#include "vcl/dialog.hxx" +#include "vcl/button.hxx" +#include "vcl/fixed.hxx" +#include "i18npool/lang.h" +#include "svx/langbox.hxx" + +class ScTextImportOptionsDlg : public ModalDialog +{ +public: + ScTextImportOptionsDlg(Window* pParent); + virtual ~ScTextImportOptionsDlg(); + + virtual short Execute(); + + LanguageType getLanguageType() const; + bool isDateConversionSet() const; + +private: + void init(); + +private: + OKButton maBtnOk; + CancelButton maBtnCancel; + HelpButton maBtnHelp; + + FixedLine maFlChooseLang; + + RadioButton maRbAutomatic; + RadioButton maRbCustom; + + SvxLanguageBox maLbCustomLang; + + FixedLine maFlOption; + + CheckBox maBtnConvertDate; + + DECL_LINK( OKHdl, OKButton* ); + + DECL_LINK( RadioHdl, RadioButton* ); +}; + + +#endif |