diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-11-29 11:05:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-01 09:15:05 +0000 |
commit | 8f7fe77b9ffeb45f5765d9d8f45710956a3e73d3 (patch) | |
tree | e8215e47c7043c44ced5e8837fc7fc2a058db01f | |
parent | 75c956d8ed1a4d8f46af3de079ab1fb68add3b40 (diff) |
tdf#63324: Fix convert for svg filter
If no currentFrame, it means we are in headless case
Change-Id: I840a9085417451fa1d4c0bd8311408357a8f60e9
Reviewed-on: https://gerrit.libreoffice.org/20268
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | filter/source/svg/svgfilter.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 9303b8fcd657..7fd47989c9ba 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -129,11 +129,11 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto } uno::Reference<frame::XDesktop2> xDesktop(frame::Desktop::create(mxContext)); - uno::Reference<frame::XFrame> xFrame(xDesktop->getCurrentFrame(), uno::UNO_QUERY_THROW); - uno::Reference<frame::XController > xController(xFrame->getController(), uno::UNO_QUERY_THROW); - - if (!bPageProvided) + uno::Reference<frame::XController > xController; + if (xDesktop->getCurrentFrame().is() && !bPageProvided) // Manage headless case { + uno::Reference<frame::XFrame> xFrame(xDesktop->getCurrentFrame(), uno::UNO_QUERY_THROW); + xController.set(xFrame->getController(), uno::UNO_QUERY_THROW); uno::Reference<drawing::XDrawView> xDrawView(xController, uno::UNO_QUERY_THROW); uno::Reference<drawing::framework::XControllerManager> xManager(xController, uno::UNO_QUERY_THROW); uno::Reference<drawing::framework::XConfigurationController> xConfigController(xManager->getConfigurationController()); |