summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/Configuration_filter.mk1
-rw-r--r--filter/source/config/fragments/filters/MS_Excel__encoded_.xcu30
-rw-r--r--officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu2
-rw-r--r--sc/inc/filter.hxx2
-rw-r--r--sc/inc/globstr.hrc4
-rw-r--r--sc/qa/unit/data/xls/biff5enc.xlsbin5120 -> 0 bytes
-rw-r--r--sc/qa/unit/helper/qahelper.cxx7
-rw-r--r--sc/qa/unit/helper/qahelper.hxx2
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx13
-rw-r--r--sc/source/filter/excel/excel.cxx7
-rw-r--r--sc/source/filter/excel/xlroot.cxx3
-rw-r--r--sc/source/filter/inc/ftools.hxx2
-rw-r--r--sc/source/filter/inc/xlroot.hxx1
-rw-r--r--sc/source/ui/docshell/docsh.cxx26
-rw-r--r--sc/source/ui/docshell/impex.cxx2
-rw-r--r--sc/source/ui/inc/docsh.hxx1
-rw-r--r--sc/source/ui/src/globstr.src4
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx6
18 files changed, 10 insertions, 103 deletions
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 1fcd3a51100a..5dd20f7f12f7 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -502,7 +502,6 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_calc_filters.x
MS_Excel_95_Vorlage_Template \
MS_Excel_97 \
MS_Excel_97_Vorlage_Template \
- MS_Excel__encoded_ \
Rich_Text_Format__StarCalc_ \
SYLK \
StarOffice_XML__Calc_ \
diff --git a/filter/source/config/fragments/filters/MS_Excel__encoded_.xcu b/filter/source/config/fragments/filters/MS_Excel__encoded_.xcu
deleted file mode 100644
index 767be941f1b9..000000000000
--- a/filter/source/config/fragments/filters/MS_Excel__encoded_.xcu
+++ /dev/null
@@ -1,30 +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 .
--->
-<node oor:name="MS Excel (encoded)" oor:op="replace">
- <prop oor:name="Flags"><value>IMPORT ALIEN</value></prop>
- <prop oor:name="UIComponent"><value>com.sun.star.comp.Calc.FilterOptionsDialog</value></prop>
- <prop oor:name="FilterService"/>
- <prop oor:name="UserData"/>
- <prop oor:name="UIName">
- <value xml:lang="en-US">Microsoft Excel - Choose Encoding</value>
- </prop>
- <prop oor:name="FileFormatVersion"><value>0</value></prop>
- <prop oor:name="Type"><value>calc_MS_Excel_40</value></prop>
- <prop oor:name="TemplateName"/>
- <prop oor:name="DocumentService"><value>com.sun.star.sheet.SpreadsheetDocument</value></prop>
-</node>
diff --git a/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu b/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu
index cf811a7a5f7c..2dd54edbd963 100644
--- a/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu
+++ b/officecfg/registry/data/org/openoffice/TypeDetection/UISort.xcu
@@ -21,7 +21,7 @@
<node oor:name="ModuleDependendFilterOrder">
<node oor:name="com.sun.star.sheet.SpreadsheetDocument" oor:op="replace" install:module="calc">
<prop oor:name="SortedFilterList">
- <value oor:separator=";">calc8;calc8_template;StarOffice XML (Calc);calc_StarOffice_XML_Calc_Template;OpenDocument Spreadsheet Flat XML;UOF spreadsheet;Calc MS Excel 2007 XML;Calc MS Excel 2007 XML Template;Calc MS Excel 2007 Binary;MS Excel 2003 XML;MS Excel 97;MS Excel 97 Vorlage/Template;MS Excel 95;MS Excel 95 Vorlage/Template;MS Excel 5.0/95;MS Excel 5.0/95 Vorlage/Template;MS Excel 4.0;MS Excel 4.0 Vorlage/Template;MS Excel (encoded);DIF;dBase;HTML (StarCalc);Lotus;Pocket Excel;Quattro Pro 6.0;Rich Text Format (StarCalc);SYLK;Text - txt - csv (StarCalc);calc_HTML_WebQuery;Calc Office Open XML;Calc Office Open XML Template</value>
+ <value oor:separator=";">calc8;calc8_template;StarOffice XML (Calc);calc_StarOffice_XML_Calc_Template;OpenDocument Spreadsheet Flat XML;UOF spreadsheet;Calc MS Excel 2007 XML;Calc MS Excel 2007 XML Template;Calc MS Excel 2007 Binary;MS Excel 2003 XML;MS Excel 97;MS Excel 97 Vorlage/Template;MS Excel 95;MS Excel 95 Vorlage/Template;MS Excel 5.0/95;MS Excel 5.0/95 Vorlage/Template;MS Excel 4.0;MS Excel 4.0 Vorlage/Template;;DIF;dBase;HTML (StarCalc);Lotus;Pocket Excel;Quattro Pro 6.0;Rich Text Format (StarCalc);SYLK;Text - txt - csv (StarCalc);calc_HTML_WebQuery;Calc Office Open XML;Calc Office Open XML Template</value>
</prop>
</node>
<node oor:name="com.sun.star.drawing.DrawingDocument" oor:op="replace" install:module="draw">
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index a987f8d7747b..8ea69de84f71 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -84,7 +84,7 @@ class SAL_DLLPUBLIC_RTTI ScFormatFilterPlugin {
// various import filters
virtual FltError ScImportLotus123( SfxMedium&, ScDocument*, rtl_TextEncoding eSrc = RTL_TEXTENCODING_DONTKNOW ) = 0;
virtual FltError ScImportQuattroPro( SfxMedium &rMedium, ScDocument *pDoc ) = 0;
- virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT, rtl_TextEncoding eSrc = RTL_TEXTENCODING_DONTKNOW ) = 0;
+ virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) = 0;
// eFormat == EIF_AUTO -> matching filter is used automatically
// eFormat == EIF_BIFF5 -> only Biff5 stream is read successfully (in an Excel97 doc, too)
// eFormat == EIF_BIFF8 -> only Biff8 stream is read successfully (only in Excel97 docs)
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 638a01cfa246..81e44932d49b 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -708,9 +708,7 @@
#define STR_FILTER_SELCOUNT 533
-#define STR_IMPORT_EXCEL_ENCODING 534
-
-#define SC_GLOBSTR_STR_COUNT 535 /**< the count of permanently resident strings */
+#define SC_GLOBSTR_STR_COUNT 534 /**< the count of permanently resident strings */
#endif
diff --git a/sc/qa/unit/data/xls/biff5enc.xls b/sc/qa/unit/data/xls/biff5enc.xls
deleted file mode 100644
index 6f71d661bd00..000000000000
--- a/sc/qa/unit/data/xls/biff5enc.xls
+++ /dev/null
Binary files differ
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 2fe290a181d6..ac61dc2f9955 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -86,8 +86,7 @@ const FileFormat ScBootstrapFixture::aFileFormats[] = {
{ "dif", "DIF", "calc_DIF", DIF_FORMAT_TYPE },
{ "xml", "MS Excel 2003 XML", "calc_MS_Excel_2003_XML", XLS_XML_FORMAT_TYPE },
{ "xlsb", "Calc MS Excel 2007 Binary", "MS Excel 2007 Binary", XLSB_XML_FORMAT_TYPE },
- { "fods", "OpenDocument Spreadsheet Flat XML", "calc_ODS_FlatXML", FODS_FORMAT_TYPE },
- { "xls" , "MS Excel (encoded)", "calc_MS_Excel_40", XLS_ENC_FORMAT_TYPE }
+ { "fods", "OpenDocument Spreadsheet Flat XML", "calc_ODS_FlatXML", FODS_FORMAT_TYPE }
};
bool testEqualsWithTolerance( long nVal1, long nVal2, long nTol )
@@ -557,10 +556,6 @@ ScDocShellRef ScBootstrapFixture::load( bool bReadWrite,
{
pSet->Put(SfxStringItem(SID_PASSWORD, *pPassword));
}
- if (rFilter == "MS Excel (encoded)")
- {
- pSet->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, "34"));
- }
pSet->Put(SfxUInt16Item(SID_MACROEXECMODE,css::document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN));
SAL_INFO( "sc.qa", "about to load " << rURL );
if (!xDocShRef->DoLoad(pSrcMed))
diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx
index 973c4ee0bdf8..9929c6c800c1 100644
--- a/sc/qa/unit/helper/qahelper.hxx
+++ b/sc/qa/unit/helper/qahelper.hxx
@@ -52,7 +52,6 @@
#define XLS_XML_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::ALIEN)
#define XLSB_XML_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::ALIEN | SfxFilterFlags::STARONEFILTER | SfxFilterFlags::PREFERED)
#define FODS_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::OWN | SfxFilterFlags::STARONEFILTER )
-#define XLS_ENC_FORMAT_TYPE (SfxFilterFlags::IMPORT | SfxFilterFlags::ALIEN)
#define FORMAT_ODS 0
#define FORMAT_XLS 1
@@ -65,7 +64,6 @@
#define FORMAT_XLS_XML 8
#define FORMAT_XLSB 9
#define FORMAT_FODS 10
-#define FORMAT_XLS_ENC 11
enum StringType { PureString, FormulaValue, StringValue };
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 01111cf698e2..0c1428ec3c06 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -101,7 +101,6 @@ public:
virtual void tearDown() override;
//ods, xls, xlsx filter tests
- void testEncodedXLS();
void testBooleanFormatXLSX();
void testBasicCellContentODS();
void testRangeNameXLS();
@@ -217,7 +216,6 @@ public:
void testBnc762542();
CPPUNIT_TEST_SUITE(ScFiltersTest);
- CPPUNIT_TEST(testEncodedXLS);
CPPUNIT_TEST(testBooleanFormatXLSX);
CPPUNIT_TEST(testBasicCellContentODS);
CPPUNIT_TEST(testRangeNameXLS);
@@ -401,17 +399,6 @@ void ScFiltersTest::testBasicCellContentODS()
xDocSh->DoClose();
}
-void ScFiltersTest::testEncodedXLS()
-{
- ScDocShellRef xDocSh = loadDoc("biff5enc.", FORMAT_XLS_ENC);
- ScDocument& rDoc = xDocSh->GetDocument();
-
- OUString aText = rDoc.GetString(0, 0, 0);
- CPPUNIT_ASSERT_EQUAL(OUString(sal_Unicode(0x43F)), aText);
-
- xDocSh->DoClose();
-}
-
void ScFiltersTest::testBooleanFormatXLSX()
{
ScDocShellRef xDocSh = loadDoc("check-boolean.", FORMAT_XLSX);
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 323e209892fa..73ee93ed3773 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -45,7 +45,7 @@
#include <memory>
-FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument* pDocument, const EXCIMPFORMAT eFormat, rtl_TextEncoding eSrc )
+FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument* pDocument, const EXCIMPFORMAT eFormat )
{
// check the passed Calc document
OSL_ENSURE( pDocument, "::ScImportExcel - no document" );
@@ -129,11 +129,6 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument
case EXC_BIFF3:
case EXC_BIFF4:
case EXC_BIFF5:
- if ( eSrc != RTL_TEXTENCODING_DONTKNOW )
- {
- aImpData.meTextEnc = eSrc;
- aImpData.mbForcedTextEnc = true;
- }
xFilter.reset( new ImportExcel( aImpData, *pBookStrm ) );
break;
case EXC_BIFF8:
diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx
index 91f90727155d..46d9d28c2ad8 100644
--- a/sc/source/filter/excel/xlroot.cxx
+++ b/sc/source/filter/excel/xlroot.cxx
@@ -95,7 +95,6 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium,
mfScreenPixelY( 50.0 ),
mnCharWidth( 110 ),
mnScTab( 0 ),
- mbForcedTextEnc( false ),
mbExport( bExport )
{
maUserName = SvtUserOptions().GetLastName();
@@ -192,7 +191,7 @@ XclRoot& XclRoot::operator=( const XclRoot& rRoot )
void XclRoot::SetTextEncoding( rtl_TextEncoding eTextEnc )
{
- if( eTextEnc != RTL_TEXTENCODING_DONTKNOW && !mrData.mbForcedTextEnc )
+ if( eTextEnc != RTL_TEXTENCODING_DONTKNOW )
mrData.meTextEnc = eTextEnc;
}
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 10817ef8df1d..1fb6b03c321d 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -269,7 +269,7 @@ public:
// various import filters
virtual FltError ScImportLotus123( SfxMedium&, ScDocument*, rtl_TextEncoding eSrc = RTL_TEXTENCODING_DONTKNOW ) override;
virtual FltError ScImportQuattroPro( SfxMedium &rMedium, ScDocument *pDoc ) override;
- virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT, rtl_TextEncoding eSrc = RTL_TEXTENCODING_DONTKNOW ) override;
+ virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) override;
// eFormat == EIF_AUTO -> passender Filter wird automatisch verwendet
// eFormat == EIF_BIFF5 -> nur Biff5-Stream fuehrt zum Erfolg (auch wenn in einem Excel97-Doc)
// eFormat == EIF_BIFF8 -> nur Biff8-Stream fuehrt zum Erfolg (nur in Excel97-Docs)
diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx
index dd927ceeab90..50829231bef8 100644
--- a/sc/source/filter/inc/xlroot.hxx
+++ b/sc/source/filter/inc/xlroot.hxx
@@ -109,7 +109,6 @@ struct XclRootData
double mfScreenPixelY; /// Height of a screen pixel (1/100 mm).
long mnCharWidth; /// Width of '0' in default font (twips).
SCTAB mnScTab; /// Current Calc sheet index.
- bool mbForcedTextEnc; /// true = Text encoding is not allowed to be changed.
const bool mbExport; /// false = Import, true = Export.
explicit XclRootData( XclBiff eBiff, SfxMedium& rMedium,
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 599fce43d954..de05c84cc7cc 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -153,7 +153,6 @@ static const sal_Char pFilterExcel95[] = "MS Excel 95";
static const sal_Char pFilterEx95Temp[] = "MS Excel 95 Vorlage/Template";
static const sal_Char pFilterExcel97[] = "MS Excel 97";
static const sal_Char pFilterEx97Temp[] = "MS Excel 97 Vorlage/Template";
-static const sal_Char pFilterExcelEnc[] = "MS Excel (encoded)";
static const sal_Char pFilterDBase[] = "dBase";
static const sal_Char pFilterDif[] = "DIF";
static const sal_Char pFilterSylk[] = "SYLK";
@@ -1111,8 +1110,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
bSetColWidths = true;
bSetRowHeights = true;
}
- else if ( aFltName == pFilterExcelEnc ||
- aFltName == pFilterExcel4 || aFltName == pFilterExcel5 ||
+ else if ( aFltName == pFilterExcel4 || aFltName == pFilterExcel5 ||
aFltName == pFilterExcel95 || aFltName == pFilterExcel97 ||
aFltName == pFilterEx4Temp || aFltName == pFilterEx5Temp ||
aFltName == pFilterEx95Temp || aFltName == pFilterEx97Temp )
@@ -1126,24 +1124,9 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
else if ( aFltName == pFilterExcel97 || aFltName == pFilterEx97Temp )
eFormat = EIF_BIFF8;
- rtl_TextEncoding eTextEnc = RTL_TEXTENCODING_DONTKNOW;
- if ( eFormat != EIF_BIFF8 )
- {
- OUString sItStr;
- SfxItemSet* pSet = rMedium.GetItemSet();
- const SfxPoolItem* pItem;
- if ( pSet && SfxItemState::SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
- {
- sItStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- if ( !sItStr.isEmpty() )
- eTextEnc = ScGlobal::GetCharsetValue( sItStr );
- }
- }
-
MakeDrawLayer(); //! In the filter
CalcOutputFactor(); // prepare update of row height
- FltError eError = ScFormatFilter::Get().ScImportExcel( rMedium, &aDocument, eFormat, eTextEnc );
+ FltError eError = ScFormatFilter::Get().ScImportExcel( rMedium, &aDocument, eFormat );
aDocument.UpdateFontCharSet();
if ( aDocument.IsChartListenerCollectionNeedsUpdate() )
aDocument.UpdateChartListenerCollection(); //! For all imports?
@@ -2615,11 +2598,6 @@ OUString ScDocShell::GetDifFilterName()
return OUString(pFilterDif);
}
-OUString ScDocShell::GetExcelEncodingFilterName()
-{
- return OUString(pFilterExcelEnc);
-}
-
bool ScDocShell::HasAutomaticTableName( const OUString& rFilter )
{
// sal_True for those filters that keep the default table name
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 9b23831e1c99..47a796414ce8 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2217,7 +2217,7 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin {
virtual ~ScFormatFilterMissing() {}
virtual FltError ScImportLotus123( SfxMedium&, ScDocument*, rtl_TextEncoding ) override { return eERR_INTERN; }
virtual FltError ScImportQuattroPro( SfxMedium &, ScDocument * ) override { return eERR_INTERN; }
- virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT, rtl_TextEncoding ) override { return eERR_INTERN; }
+ virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) override { return eERR_INTERN; }
virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) override { return eERR_INTERN; }
virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress&,
const rtl_TextEncoding, sal_uInt32 ) override { return eERR_INTERN; }
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 914f369d6ba1..079b542e68dc 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -398,7 +398,6 @@ public:
static OUString GetLotusFilterName();
static OUString GetDBaseFilterName();
static OUString GetDifFilterName();
- static OUString GetExcelEncodingFilterName();
static bool HasAutomaticTableName( const OUString& rFilter );
DECL_LINK_TYPED( RefreshDBDataHdl, Timer*, void );
diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src
index f026a13e5640..c74373f662b3 100644
--- a/sc/source/ui/src/globstr.src
+++ b/sc/source/ui/src/globstr.src
@@ -2109,10 +2109,6 @@ Resource RID_GLOBSTR
{
Text [ en-US ] = "%1 and %2 more";
};
- String STR_IMPORT_EXCEL_ENCODING
- {
- Text [ en-US ] = "Import Excel file";
- };
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index eac4e805da4c..96f74ce7b949 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -274,12 +274,6 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st
// common for DIF import/export
eEncoding = RTL_TEXTENCODING_MS_1252;
}
- else if ( aFilterString == ScDocShell::GetExcelEncodingFilterName() )
- {
- SAL_WARN_IF( bExport, "sc.ui", "Filter Options for Excel Export is not implemented" );
- aTitle = ScGlobal::GetRscString( STR_IMPORT_EXCEL_ENCODING );
- eEncoding = RTL_TEXTENCODING_MS_1252;
- }
ScImportOptions aOptions( cAsciiDel, cStrDel, eEncoding);