diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-30 16:46:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-30 19:37:32 +0100 |
commit | ac9e7af60bd4e898f921173260bd0e9ebfd0ea34 (patch) | |
tree | dd988ab65fe1c01d1c4e25521d722428b786901a /sc | |
parent | 9e481f6036775044bb02a5e08f6d3af3a37acc56 (diff) |
add xls support to fftester
Change-Id: I23e219cec1a8d98e02c3584041f67ff42dd29bd8
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/globalx.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/optutil.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/excel.cxx | 11 |
3 files changed, 19 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: */ |