summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/data/globalx.cxx4
-rw-r--r--sc/source/core/tool/optutil.cxx4
-rw-r--r--sc/source/filter/excel/excel.cxx11
-rw-r--r--vcl/workben/fftester.cxx14
4 files changed, 33 insertions, 0 deletions
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx
index 5430bb8cf9d3..2b3794a8fa61 100644
--- a/sc/source/core/data/globalx.cxx
+++ b/sc/source/core/data/globalx.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
+#include <unotools/configmgr.hxx>
#include <unotools/localedatawrapper.hxx>
using namespace ::com::sun::star;
@@ -43,6 +44,9 @@ using namespace ::com::sun::star::ucb;
void ScGlobal::InitAddIns()
{
+ if (utl::ConfigManager::IsAvoidConfig())
+ return;
+
// multi paths separated by semicolons
SvtPathOptions aPathOpt;
OUString aMultiPath = aPathOpt.GetAddinPath();
diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx
index 6bbc0dcede3d..e78fabd63022 100644
--- a/sc/source/core/tool/optutil.cxx
+++ b/sc/source/core/tool/optutil.cxx
@@ -21,10 +21,14 @@
#include "optutil.hxx"
#include "global.hxx"
+#include <unotools/configmgr.hxx>
#include <unotools/syslocale.hxx>
bool ScOptionsUtil::IsMetricSystem()
{
+ if (utl::ConfigManager::IsAvoidConfig())
+ return true;
+
//TODO: which language should be used here - system language or installed office language?
MeasurementSystem eSys = ScGlobal::pLocaleData->getMeasurementSystemEnum();
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 10c22a9849c0..b21ca5f6f8dd 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -40,6 +40,7 @@
#include "imp_op.hxx"
#include "excimp8.hxx"
#include "exp_op.hxx"
+#include "scdll.hxx"
#include <memory>
@@ -217,4 +218,14 @@ FltError ScFormatFilterPluginImpl::ScExportExcel5( SfxMedium& rMedium, ScDocumen
return eRet;
}
+extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportXLS(const OUString &rURL)
+{
+ ScDLL::Init();
+ SfxMedium aMedium(rURL, StreamMode::READ);
+ ScDocument aDocument;
+ aDocument.MakeTable(0);
+ FltError eError = ScFormatFilter::Get().ScImportExcel(aMedium, &aDocument, EIF_AUTO);
+ return eError == eERR_OK;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index 41f5f88eb424..f0bbb7442668 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -335,6 +335,20 @@ try_again:
else
ret = (int) (*pfnImport)(out, OUString("CWW8"));
}
+ else if (strcmp(argv[2], "xls") == 0)
+ {
+ static HFilterCall pfnImport(0);
+ if (!pfnImport)
+ {
+ osl::Module aLibrary;
+ aLibrary.loadRelative(&thisModule, "libscfiltlo.so", SAL_LOADMODULE_LAZY);
+ pfnImport = reinterpret_cast<HFilterCall>(
+ aLibrary.getFunctionSymbol("TestImportXLS"));
+ aLibrary.release();
+ }
+ ret = (int) (*pfnImport)(out);
+ }
+
else if (strcmp(argv[2], "hwp") == 0)
{
static HFilterCall pfnImport(0);