diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 7af4a7795844..a77589bd0630 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -416,16 +416,24 @@ Reference < XContent > SfxMedium::GetContent() const if ( !pImpl->aContent.get().is() ) { Reference < css::ucb::XContent > xContent; + Reference < css::ucb::XCommandEnvironment > xEnv; - // tdf#95144 add a default css::ucb::XCommandEnvironment - // in order to have http and https protocol manage certificates correctly - css:: uno::Reference< task::XInteractionHandler > xIH( - css::task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), nullptr ) ); + try + { + // tdf#95144 add a default css::ucb::XCommandEnvironment + // in order to have http and https protocol manage certificates correctly + css:: uno::Reference< task::XInteractionHandler > xIH( + css::task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), nullptr ) ); - css::uno::Reference< css::ucb::XProgressHandler > xProgress; - ::ucbhelper::CommandEnvironment* pCommandEnv = new ::ucbhelper::CommandEnvironment(new comphelper::SimpleFileAccessInteraction( xIH ), xProgress); + css::uno::Reference< css::ucb::XProgressHandler > xProgress; + ::ucbhelper::CommandEnvironment* pCommandEnv = new ::ucbhelper::CommandEnvironment(new comphelper::SimpleFileAccessInteraction( xIH ), xProgress); - Reference < css::ucb::XCommandEnvironment > xEnv(static_cast< css::ucb::XCommandEnvironment* >(pCommandEnv), css::uno::UNO_QUERY); + xEnv = Reference < css::ucb::XCommandEnvironment >(static_cast< css::ucb::XCommandEnvironment* >(pCommandEnv), css::uno::UNO_QUERY); + } + catch(...) + { + //temp tinderbox fix + } const SfxUnoAnyItem* pItem = SfxItemSet::GetItem<SfxUnoAnyItem>(pImpl->m_pSet, SID_CONTENT, false); if ( pItem ) |