enable calc's ODS file filter unit test
This commit is contained in:
parent
da1073f130
commit
f44c104106
3 changed files with 41 additions and 20 deletions
|
@ -35,20 +35,36 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_filters_test, \
|
|||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_add_linked_libs,sc_filters_test, \
|
||||
sc \
|
||||
sfx \
|
||||
svl \
|
||||
svt \
|
||||
vcl \
|
||||
tl \
|
||||
ucbhelper \
|
||||
utl \
|
||||
i18nisolang1 \
|
||||
avmedia \
|
||||
basegfx \
|
||||
comphelper \
|
||||
cppu \
|
||||
cppuhelper \
|
||||
drawinglayer \
|
||||
editeng \
|
||||
fileacc \
|
||||
for \
|
||||
forui \
|
||||
i18nisolang1 \
|
||||
msfilter \
|
||||
sal \
|
||||
$(gb_STDLIBS) \
|
||||
salhelper \
|
||||
sb \
|
||||
sc \
|
||||
sfx \
|
||||
sot \
|
||||
svl \
|
||||
svt \
|
||||
svx \
|
||||
svxcore \
|
||||
tk \
|
||||
tl \
|
||||
ucbhelper \
|
||||
utl \
|
||||
vbahelper \
|
||||
vcl \
|
||||
xo \
|
||||
$(gb_STDLIBS) \
|
||||
))
|
||||
|
||||
$(eval $(call gb_CppunitTest_set_include,sc_filters_test,\
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
sc sc : filter TRANSLATIONS:translations vbahelper oovbaapi svx uui stoc BOOST:boost formula MDDS:mdds oox LIBXSLT:libxslt unoxml ure test NULL
|
||||
sc sc : filter TRANSLATIONS:translations vbahelper oovbaapi svx uui stoc BOOST:boost formula MDDS:mdds oox LIBXSLT:libxslt unoxml ure test xmloff desktop ucb package configmgr NULL
|
||||
sc sc\prj nmake - all sc_prj NULL
|
||||
|
|
|
@ -73,7 +73,7 @@ public:
|
|||
virtual void tearDown();
|
||||
|
||||
void recursiveScan(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData, int nExpected);
|
||||
ScDocShellRef load(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData);
|
||||
ScDocShellRef load(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData, sal_uLong nFormatType = 0);
|
||||
|
||||
/**
|
||||
* Ensure CVEs remain unbroken
|
||||
|
@ -95,12 +95,16 @@ private:
|
|||
};
|
||||
|
||||
ScDocShellRef FiltersTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL,
|
||||
const rtl::OUString &rUserData)
|
||||
const rtl::OUString &rUserData, sal_uLong nFormatType)
|
||||
{
|
||||
sal_uInt32 nFormat = 0;
|
||||
if (nFormatType)
|
||||
nFormat = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS;
|
||||
SfxFilter aFilter(
|
||||
rFilter,
|
||||
rtl::OUString(), 0, 0, rtl::OUString(), 0, rtl::OUString(),
|
||||
rUserData, rtl::OUString() );
|
||||
rtl::OUString(), nFormatType, nFormat, rtl::OUString(), 0, rtl::OUString(),
|
||||
rUserData, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/scalc*")) );
|
||||
aFilter.SetVersion(SOFFICE_FILEFORMAT_CURRENT);
|
||||
|
||||
ScDocShellRef xDocShRef = new ScDocShell;
|
||||
SfxMedium aSrcMed(rURL, STREAM_STD_READ, true);
|
||||
|
@ -186,13 +190,14 @@ void FiltersTest::testCVEs()
|
|||
|
||||
void FiltersTest::testODSs()
|
||||
{
|
||||
#if 0
|
||||
// TODO: loading of ods still fails. I need to look into this.
|
||||
ScDocShellRef xDocSh = load(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("calc8")),
|
||||
m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/ods/named-ranges-global.ods")), rtl::OUString());
|
||||
rtl::OUString aString1(RTL_CONSTASCII_USTRINGPARAM("calc8"));
|
||||
rtl::OUString aString2 = m_aSrcRoot + rtl::OUString(
|
||||
RTL_CONSTASCII_USTRINGPARAM("/sc/qa/unit/data/ods/named-ranges-global.ods"));
|
||||
return;
|
||||
|
||||
ScDocShellRef xDocSh = load( aString1, aString2 , rtl::OUString(), 50331943);
|
||||
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-global.ods.", xDocSh.Is());
|
||||
#endif
|
||||
}
|
||||
|
||||
FiltersTest::FiltersTest()
|
||||
|
|
Loading…
Reference in a new issue