[Libreoffice-commits] .: 2 commits - sc/CppunitTest_sc_filters_test.mk sc/qa
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Fri Nov 18 13:48:34 PST 2011
sc/CppunitTest_sc_filters_test.mk | 1
sc/qa/unit/macros-test.cxx | 47 --------------------------------------
2 files changed, 1 insertion(+), 47 deletions(-)
New commits:
commit b352f5357c95cf37ffa1debb1ffe62b84c223509
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Nov 18 22:48:20 2011 +0100
macros_test does not need to inherit from Filters-Test
diff --git a/sc/qa/unit/macros-test.cxx b/sc/qa/unit/macros-test.cxx
index 5250ae6..207c939 100644
--- a/sc/qa/unit/macros-test.cxx
+++ b/sc/qa/unit/macros-test.cxx
@@ -80,16 +80,11 @@ FileFormat aFileFormats[] = {
/* Implementation of Macros test */
-class ScMacrosTest
- : public test::FiltersTest
- , public test::BootstrapFixture
+class ScMacrosTest : public test::BootstrapFixture
{
public:
ScMacrosTest();
- virtual bool 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, const rtl::OUString& rTypeName, sal_uLong nFormatType=0);
uno::Reference< com::sun::star::lang::XComponent > loadFromDesktop(const rtl::OUString& rURL);
void createFileURL(const rtl::OUString& aFileBase, const rtl::OUString& aFileExtension, rtl::OUString& rFilePath);
@@ -115,35 +110,6 @@ private:
::rtl::OUString m_aBaseString;
};
-ScDocShellRef ScMacrosTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL,
- const rtl::OUString &rUserData, const rtl::OUString& rTypeName, sal_uLong nFormatType)
-{
- sal_uInt32 nFormat = 0;
- if (nFormatType)
- nFormat = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS;
- SfxFilter* aFilter = new SfxFilter(
- rFilter,
- rtl::OUString(), nFormatType, nFormat, rTypeName, 0, rtl::OUString(),
- rUserData, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/scalc*")) );
- aFilter->SetVersion(SOFFICE_FILEFORMAT_CURRENT);
-
- ScDocShellRef xDocShRef = new ScDocShell;
- SfxMedium* pSrcMed = new SfxMedium(rURL, STREAM_STD_READWRITE, true);
- pSrcMed->SetFilter(aFilter);
- if (!xDocShRef->DoLoad(pSrcMed))
- {
- xDocShRef->DoClose();
- // load failed.
- xDocShRef.Clear();
- }
- else if (nFormatType)
- {
- pSrcMed->GetItemSet()->Put( SfxUInt16Item( SID_MACROEXECMODE, document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN ));
- SfxObjectShell::SetCurrentComponent( xDocShRef->GetModel() );
- }
-
- return xDocShRef;
-}
uno::Reference< com::sun::star::lang::XComponent > ScMacrosTest::loadFromDesktop(const rtl::OUString& rURL)
{
@@ -161,17 +127,6 @@ uno::Reference< com::sun::star::lang::XComponent > ScMacrosTest::loadFromDesktop
}
-bool ScMacrosTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL,
- const rtl::OUString &rUserData)
-{
- ScDocShellRef xDocShRef = load(rFilter, rURL, rUserData, rtl::OUString());
- bool bLoaded = xDocShRef.Is();
- //reference counting of ScDocShellRef is very confused.
- if (bLoaded)
- xDocShRef->DoClose();
- return bLoaded;
-}
-
void ScMacrosTest::createFileURL(const rtl::OUString& aFileBase, const rtl::OUString& aFileExtension, rtl::OUString& rFilePath)
{
rtl::OUString aSep(RTL_CONSTASCII_USTRINGPARAM("/"));
commit 67f8ddd3a071a901838c8fec01ff79b553c05f29
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Nov 18 22:48:13 2011 +0100
basic component is no longer needed in filters-test
diff --git a/sc/CppunitTest_sc_filters_test.mk b/sc/CppunitTest_sc_filters_test.mk
index 3051ef8..4aeaad7 100644
--- a/sc/CppunitTest_sc_filters_test.mk
+++ b/sc/CppunitTest_sc_filters_test.mk
@@ -89,7 +89,6 @@ $(eval $(call gb_CppunitTest_add_type_rdbs,sc_filters_test,\
))
$(eval $(call gb_CppunitTest_add_components,sc_filters_test,\
- basic/util/sb \
chart2/source/controller/chartcontroller \
chart2/source/tools/charttools \
chart2/source/model/chartmodel \
More information about the Libreoffice-commits
mailing list