Disable all features that rely on orcus.

Change-Id: I6dcf91491497cd9d3662adaeceb73b4b544a56c9
This commit is contained in:
Kohei Yoshida
2013-09-18 21:35:50 -04:00
parent 02346aa466
commit 05dd2fb998
7 changed files with 71 additions and 9 deletions

View File

@@ -86,6 +86,8 @@
#include "rtl/bootstrap.hxx"
#include <vcl/svapp.hxx>
#include <config_orcus.h>
const char PROP_TYPES[] = "Types";
const char PROP_NAME[] = "Name";
@@ -711,6 +713,8 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString&
namespace {
#if ENABLE_ORCUS
bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescriptor, OUString& rType, OUString& rFilter)
{
// depending on the experimental mode
@@ -775,6 +779,15 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>& rDescrip
return false;
}
#else
bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>&, OUString&, OUString&)
{
return false;
}
#endif
}
void LoadEnv::impl_detectTypeAndFilter()

View File

@@ -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:

View File

@@ -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).

View File

@@ -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)

View File

@@ -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 )

View File

@@ -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();
}

View File

@@ -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;