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/inc | |
parent | CWS-TOOLING: integrate CWS calc52 (diff) | |
parent | koheicsvimport: #i102141# Use the global 'use US English' option only when th... (diff) | |
download | core-4d27ce49a33c074b598566ac7073fc712c3613af.tar.gz core-4d27ce49a33c074b598566ac7073fc712c3613af.zip |
CWS-TOOLING: integrate CWS koheicsvimport
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/column.hxx | 4 | ||||
-rw-r--r-- | sc/inc/document.hxx | 4 | ||||
-rw-r--r-- | sc/inc/filter.hxx | 8 | ||||
-rw-r--r-- | sc/inc/optutil.hxx | 7 | ||||
-rw-r--r-- | sc/inc/sc.hrc | 5 | ||||
-rw-r--r-- | sc/inc/scabstdlg.hxx | 12 | ||||
-rw-r--r-- | sc/inc/stringutil.hxx | 56 | ||||
-rw-r--r-- | sc/inc/table.hxx | 3 |
8 files changed, 89 insertions, 10 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 08f3d1f7b1e3..5692ab1e3b13 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -235,7 +235,9 @@ public: // TRUE = Zahlformat gesetzt BOOL SetString( SCROW nRow, SCTAB nTab, const String& rString, - formula::FormulaGrammar::AddressConvention conv = formula::FormulaGrammar::CONV_OOO ); + formula::FormulaGrammar::AddressConvention conv = formula::FormulaGrammar::CONV_OOO, + SvNumberFormatter* pFormatter = NULL, + bool bDetectNumberFormat = true ); void SetValue( SCROW nRow, const double& rVal); void SetError( SCROW nRow, const USHORT nError); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 44bda96f8322..c053c27047d4 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -727,7 +727,9 @@ public: SC_DLLPUBLIC void PutCell(SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell, ULONG nFormatIndex, BOOL bForceTab = FALSE); // return TRUE = Zahlformat gesetzt - SC_DLLPUBLIC BOOL SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString ); + SC_DLLPUBLIC BOOL SetString( + SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, + SvNumberFormatter* pFormatter = NULL, bool bDetectNumberFormat = true ); SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal ); void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const USHORT nError); diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx index 8e3e540c9038..ae0fd92f6858 100644 --- a/sc/inc/filter.hxx +++ b/sc/inc/filter.hxx @@ -39,6 +39,7 @@ class SvStream; class ScAddress; class ScDocument; class ScRange; +class SvNumberFormatter; // Return-Werte Im-/Exportfilter (ULONG) @@ -89,7 +90,9 @@ class ScEEAbsImport { virtual ~ScEEAbsImport() {} virtual ULONG Read( SvStream& rStream, const String& rBaseURL ) = 0; virtual ScRange GetRange() = 0; - virtual void WriteToDocument( BOOL bSizeColsRows = FALSE, double nOutputFactor = 1.0 ) = 0; + virtual void WriteToDocument( + BOOL bSizeColsRows = FALSE, double nOutputFactor = 1.0, + SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) = 0; }; class ScFormatFilterPlugin { @@ -106,7 +109,8 @@ class ScFormatFilterPlugin { virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress& rInsPos, const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, UINT32 nDifOption = SC_DIFOPT_EXCEL ) = 0; virtual FltError ScImportRTF( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange ) = 0; - virtual FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0, BOOL bCalcWidthHeight = TRUE ) = 0; + virtual FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange, double nOutputFactor = 1.0, + BOOL bCalcWidthHeight = TRUE, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ) = 0; // various import helpers virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange ) = 0; diff --git a/sc/inc/optutil.hxx b/sc/inc/optutil.hxx index c197076ee642..83b23a3c9ef9 100644 --- a/sc/inc/optutil.hxx +++ b/sc/inc/optutil.hxx @@ -30,6 +30,7 @@ #include <unotools/configitem.hxx> #include <tools/link.hxx> +#include "scdllapi.h" class ScOptionsUtil @@ -41,13 +42,13 @@ public: // ConfigItem for classes that use items from several sub trees -class ScLinkConfigItem : public utl::ConfigItem +class SC_DLLPUBLIC ScLinkConfigItem : public utl::ConfigItem { Link aCommitLink; public: - ScLinkConfigItem( const rtl::OUString rSubTree ); - ScLinkConfigItem( const rtl::OUString rSubTree, sal_Int16 nMode ); + ScLinkConfigItem( const rtl::OUString& rSubTree ); + ScLinkConfigItem( const rtl::OUString& rSubTree, sal_Int16 nMode ); void SetCommitLink( const Link& rLink ); virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames ); diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index d9bce97f1bc8..1b6d18e21dbb 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -1631,9 +1631,10 @@ #define RID_SCDLG_DOCPROTECTION (SC_DIALOGS_START + 149) #define RID_SCDLG_RETYPEPASS (SC_DIALOGS_START + 150) #define RID_SCDLG_RETYPEPASS_INPUT (SC_DIALOGS_START + 151) -#define RID_POPUP_FILTER (SC_DIALOGS_START + 152) +#define RID_SCDLG_TEXT_IMPORT_OPTIONS (SC_DIALOGS_START + 152) +#define RID_POPUP_FILTER (SC_DIALOGS_START + 153) -#define SC_DIALOGS_END (SC_DIALOGS_START + 153) +#define SC_DIALOGS_END (SC_DIALOGS_START + 154) #ifndef STD_MASKCOLOR #define STD_MASKCOLOR Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; } diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index f33077b3e090..d3c19bb539d5 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -38,6 +38,7 @@ #include "sc.hrc" #include "global.hxx" #include "pivot.hxx" +#include "i18npool/lang.h" class ScAsciiOptions; class ScAutoFormat; @@ -65,6 +66,7 @@ class AbstractScImportAsciiDlg : public VclAbstractDialog //add for ScImportAsc public: virtual void GetOptions( ScAsciiOptions& rOpt ) = 0; virtual void SetTextToColumnsMode() = 0; + virtual void SaveParameters() = 0; }; @@ -289,6 +291,14 @@ class AbstractScImportOptionsDlg : public VclAbstractDialog //add for ScImportO public: virtual void GetImportOptions( ScImportOptions& rOptions ) const = 0; }; + +class AbstractScTextImportOptionsDlg : public VclAbstractDialog //add for ScLangChooserDlg +{ +public: + virtual LanguageType GetLanguageType() const = 0; + virtual bool IsDateConversionSet() const = 0; +}; + //-------Scabstract fractory --------------------------- class ScAbstractDialogFactory { @@ -299,6 +309,8 @@ public: SvStream* pInStream, int nId, sal_Unicode cSep = '\t') = 0; + virtual AbstractScTextImportOptionsDlg * CreateScTextImportOptionsDlg( Window* pParent, int nId ) = 0; + virtual AbstractScAutoFormatDlg * CreateScAutoFormatDlg( Window* pParent, //add for ScAutoFormatDlg ScAutoFormat* pAutoFormat, const ScAutoFormatData* pSelFormatData, diff --git a/sc/inc/stringutil.hxx b/sc/inc/stringutil.hxx new file mode 100644 index 000000000000..c50c0d8cf156 --- /dev/null +++ b/sc/inc/stringutil.hxx @@ -0,0 +1,56 @@ +/************************************************************************* + * + * 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: table.hxx,v $ + * $Revision: 1.35 $ + * + * 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_STRINGUTIL_HXX +#define SC_STRINGUTIL_HXX + +#include "rtl/ustring.hxx" + +class ScStringUtil +{ +public: + /** + * Check if a given string is a simple decimal number (e.g. 12.345). We + * don't do any elaborate parsing here; we only check for the simplest + * case of decimal number format. + * + * @param rStr string to parse + * @param dsep decimal separator + * @param gsep group separator (aka thousands separator) + * @param rVal value of successfully parsed number + * + * @return true if the string is a valid number, false otherwise. + */ + static bool parseSimpleNumber( + const ::rtl::OUString& rStr, sal_Unicode dsep, sal_Unicode gsep, double& rVal); +}; + + +#endif diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 55d31d30430e..7811d6aa50b6 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -265,7 +265,8 @@ public: void PutCell( SCCOL nCol, SCROW nRow, ScBaseCell* pCell ); void PutCell(SCCOL nCol, SCROW nRow, ULONG nFormatIndex, ScBaseCell* pCell); // TRUE = Zahlformat gesetzt - BOOL SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString ); + BOOL SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString, + SvNumberFormatter* pFormatter = NULL, bool bDetectNumberFormat = true ); void SetValue( SCCOL nCol, SCROW nRow, const double& rVal ); void SetError( SCCOL nCol, SCROW nRow, USHORT nError); |