diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/Library_scfilt.mk | 24 | ||||
-rw-r--r-- | sc/qa/unit/helper/qahelper.cxx | 13 | ||||
-rw-r--r-- | sc/source/filter/ftools/ftools.cxx | 9 | ||||
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh2.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshc.cxx | 4 |
6 files changed, 58 insertions, 9 deletions
diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk index 75ee0fee8d43..ddd52a39680d 100644 --- a/sc/Library_scfilt.mk +++ b/sc/Library_scfilt.mk @@ -63,12 +63,6 @@ $(eval $(call gb_Library_use_libraries,scfilt,\ $(gb_UWINAPI) \ )) -$(eval $(call gb_Library_use_externals,scfilt,\ - orcus \ - orcus-parser \ - zlib \ -)) - $(eval $(call gb_Library_add_exception_objects,scfilt,\ sc/source/filter/dif/difexp \ sc/source/filter/dif/difimp \ @@ -221,16 +215,28 @@ $(eval $(call gb_Library_add_exception_objects,scfilt,\ sc/source/filter/oox/worksheetfragment \ sc/source/filter/oox/worksheethelper \ sc/source/filter/oox/worksheetsettings \ - sc/source/filter/orcus/interface \ - sc/source/filter/orcus/orcusfiltersimpl \ - sc/source/filter/orcus/xmlcontext \ sc/source/filter/services \ )) +ifeq ($(ENABLE_ORCUS),TRUE) +$(eval $(call gb_Library_use_externals,scfilt,\ + orcus \ + orcus-parser \ + zlib \ +)) + ifeq ($(SYSTEM_ZLIB),YES) $(eval $(call gb_Library_add_defs,scfilt,\ -DSYSTEM_ZLIB \ )) endif +$(eval $(call gb_Library_add_exception_objects,scfilt,\ + sc/source/filter/orcus/interface \ + sc/source/filter/orcus/orcusfiltersimpl \ + sc/source/filter/orcus/xmlcontext \ +)) + +endif + # vim: set noet sw=4 ts=4: diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 33c8f0494e0b..8139363c4079 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -15,10 +15,14 @@ #include "svx/svdpage.hxx" #include "svx/svdoole2.hxx" +#include <config_orcus.h> + +#if ENABLE_ORCUS #if defined WNT #define __ORCUS_STATIC_LIB #endif #include <orcus/csv_parser.hpp> +#endif #include <fstream> @@ -93,6 +97,8 @@ void loadFile(const OUString& aFileName, std::string& aContent) aContent = aOStream.str(); } +#if ENABLE_ORCUS + void testFile(OUString& aFileName, ScDocument* pDoc, SCTAB nTab, StringType aStringFormat) { csv_handler aHandler(pDoc, nTab, aStringFormat); @@ -142,6 +148,13 @@ void testCondFile(OUString& aFileName, ScDocument* pDoc, SCTAB nTab) } } +#else + +void testFile(OUString&, ScDocument*, SCTAB, StringType) {} +void testCondFile(OUString&, ScDocument*, SCTAB) {} + +#endif + const SdrOle2Obj* getSingleChartObject(ScDocument& rDoc, sal_uInt16 nPage) { // Retrieve the chart object instance from the 2nd page (for the 2nd sheet). diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index aab9afd87ad3..3623a7d6e054 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -32,7 +32,12 @@ #include "stlpool.hxx" #include "stlsheet.hxx" #include "compiler.hxx" + +#include <config_orcus.h> + +#if ENABLE_ORCUS #include "orcusfiltersimpl.hxx" +#endif #include <stdio.h> @@ -348,8 +353,12 @@ ScFormatFilterPluginImpl::~ScFormatFilterPluginImpl() {} ScOrcusFilters* ScFormatFilterPluginImpl::GetOrcusFilters() { +#if ENABLE_ORCUS static ScOrcusFiltersImpl aImpl; return &aImpl; +#else + return NULL; +#endif } SAL_DLLPUBLIC_EXPORT ScFormatFilterPlugin * SAL_CALL ScFilterCreate(void) diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index fa89af0976bd..9beb5c98c96b 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -56,7 +56,9 @@ #include "document.hxx" #include "rangelst.hxx" +#if ENABLE_ORCUS #include <orcus/css_parser.hpp> +#endif #include <com/sun/star/document/XDocumentProperties.hpp> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> @@ -3164,6 +3166,8 @@ void ScHTMLQueryParser::CloseTable( const ImportInfo& rInfo ) mpCurrTable = mpCurrTable->CloseTable( rInfo ); } +#if ENABLE_ORCUS + namespace { /** @@ -3267,6 +3271,12 @@ void ScHTMLQueryParser::ParseStyle(const OUString& rStrm) } } +#else + +void ScHTMLQueryParser::ParseStyle(const OUString&) {} + +#endif + // ---------------------------------------------------------------------------- IMPL_LINK( ScHTMLQueryParser, HTMLImportHdl, const ImportInfo*, pInfo ) diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index a1403185e17b..9da5ace1bde5 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -59,6 +59,8 @@ #include "queryentry.hxx" #include "markdata.hxx" +#include <config_orcus.h> + using namespace com::sun::star; static bool lcl_GetTextToColumnsRange( const ScViewData* pData, ScRange& rRange ) @@ -1142,6 +1144,11 @@ void ScCellShell::GetDBState( SfxItemSet& rSet ) } } break; +#if !ENABLE_ORCUS + case SID_MANAGE_XML_SOURCE: + rSet.DisableItem(nWhich); + break; +#endif } nWhich = aIter.NextWhich(); } diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index 309a3e069bc6..1bc5dc4ae992 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -68,6 +68,8 @@ #include "CorrelationDialog.hxx" #include "CovarianceDialog.hxx" +#include <config_orcus.h> + //------------------------------------------------------------------ void ScTabViewShell::SetCurRefDlgId( sal_uInt16 nNew ) @@ -397,7 +399,9 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( case SID_MANAGE_XML_SOURCE: { +#if ENABLE_ORCUS pResult = new ScXMLSourceDlg(pB, pCW, pParent, pDoc); +#endif } break; |