diff options
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: */ |