summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-01 06:54:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-01 06:54:46 +0000
commit039073c7555afc205b322b0cf4e8fafe3b99833d (patch)
treee53536d4d22b21115b80800f9f6dee7e7848adaf
parentuse MediaDescriptor to add a stream if only got a URL (diff)
downloadbinfilter-039073c7555afc205b322b0cf4e8fafe3b99833d.tar.gz
binfilter-039073c7555afc205b322b0cf4e8fafe3b99833d.zip
tweak to be potentially in-place testable
-rw-r--r--binfilter/filter/source/bf_migrate/bf_migratefilter.cxx3
-rw-r--r--binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx30
2 files changed, 23 insertions, 10 deletions
diff --git a/binfilter/filter/source/bf_migrate/bf_migratefilter.cxx b/binfilter/filter/source/bf_migrate/bf_migratefilter.cxx
index 25388f0ea..76ab45a2e 100644
--- a/binfilter/filter/source/bf_migrate/bf_migratefilter.cxx
+++ b/binfilter/filter/source/bf_migrate/bf_migratefilter.cxx
@@ -174,8 +174,6 @@ sal_Bool bf_MigrateFilter::importImpl(const Sequence< ::com::sun::star::beans::P
// Get DocumentType using GetFilterMatcher() (test)
const SfxFilter* pFilter = SFX_APP()->GetFilterMatcher().GetFilter4FilterName( sFilterName );
- fprintf(stderr, "pFilter is %p\n", pFilter);
-
if(bRetval)
{
if(pFilter)
@@ -514,7 +512,6 @@ Reference< XInterface > SAL_CALL bf_MigrateFilter_createInstance(const Reference
if ( !mxLegServFact.is() )
{
mxLegServFact = ::legacy_binfilters::getLegacyProcessServiceFactory();
- fprintf(stderr, "mxLegServFact is %d\n", mxLegServFact.is());
::com::sun::star::uno::Reference < XComponent > xWrapper( mxLegServFact->createInstance(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.OfficeWrapper" ))), UNO_QUERY );
}
diff --git a/binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx b/binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx
index fc84f75af..51d838c4c 100644
--- a/binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx
+++ b/binfilter/legacysmgr/source/legacy/legacy_binfilters_smgr.cxx
@@ -2017,12 +2017,28 @@ void * SAL_CALL legacysmgr_component_getFactory(
xMgr->createInstance(
OUSTR("com.sun.star.registry.SimpleRegistry") ),
UNO_QUERY_THROW );
- rtl::OUString rdbUrl(
- RTL_CONSTASCII_USTRINGPARAM(
- "$BRAND_BASE_DIR/program/legacy_binfilters.rdb"));
- rtl::Bootstrap::expandMacros(rdbUrl); //TODO: detect failure
- xSimReg->open(
- rdbUrl, sal_True /* read-only */, sal_False /* ! create */ );
+
+ try
+ {
+ rtl::OUString rdbUrl(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$BRAND_BASE_DIR/program/legacy_binfilters.rdb"));
+ fprintf(stderr, "1: trying to open %s\n", rtl::OUStringToOString(rdbUrl, RTL_TEXTENCODING_UTF8).getStr());
+ rtl::Bootstrap::expandMacros(rdbUrl); //TODO: detect failure
+ xSimReg->open(
+ rdbUrl, sal_True /* read-only */, sal_False /* ! create */ );
+ }
+ catch (...)
+ {
+ rtl::OUString rdbUrl(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "$BRAND_BASE_DIR/legacy_binfilters.rdb"));
+ rtl::Bootstrap::expandMacros(rdbUrl);
+ fprintf(stderr, "2: trying to open %s\n", rtl::OUStringToOString(rdbUrl, RTL_TEXTENCODING_UTF8).getStr());
+ xSimReg->open(
+ rdbUrl, sal_True /* read-only */, sal_False /* ! create */ );
+ }
+
Any arg( makeAny( xSimReg ) );
// * legacy rdb mgr *
@@ -2071,7 +2087,7 @@ void * SAL_CALL legacysmgr_component_getFactory(
}
catch (const Exception & exc)
{
-#if defined _DEBUG
+#if OSL_DEBUG_LEVEL > 1
OUStringBuffer buf( 128 );
buf.appendAscii(
RTL_CONSTASCII_STRINGPARAM(