filter/source/svg/svgfilter.cxx | 53 ---------------------------------------- 1 file changed, 53 deletions(-)
New commits: commit cdbfa9bd50125c3c8ec02c514a5ecf2efccc3b26 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Tue Jun 17 08:56:16 2025 +0200 Commit: Noel Grandin <noelgran...@gmail.com> CommitDate: Wed Jun 18 12:09:16 2025 +0200 remove some dead code after commit 74916e20a070d183b4d9669a0bd88cee85f8c9e1 (origin/master, origin/HEAD) Author: Noel Grandin <noelgran...@gmail.com> Date: Tue Jun 17 08:56:16 2025 +0200 add XSlideSorterSelectionSupplier for use in filter Change-Id: If5435ae4ad7311012923047c6c8a3b7a4cd735a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186645 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 94d5900941aa..f18053a3f257 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -198,59 +198,6 @@ css::uno::Reference<css::frame::XController> SVGFilter::fillDrawImpressSelectedP } } - uno::Reference<drawing::framework::XControllerManager> xManager(xController, uno::UNO_QUERY); - if (!xManager) - return {}; - uno::Reference<drawing::framework::XConfigurationController> xConfigController( - xManager->getConfigurationController()); - - // which view configuration are we in? - // - // * traverse Impress resources to find slide preview pane, grab selection from there - // * otherwise, fallback to current slide - // - const uno::Sequence<uno::Reference<drawing::framework::XResourceId>> aResIds( - xConfigController->getCurrentConfiguration()->getResources( - {}, u""_ustr, drawing::framework::AnchorBindingMode_INDIRECT)); - - for (const uno::Reference<drawing::framework::XResourceId>& rResId : aResIds) - { - // can we somehow obtain the slidesorter from the Impress framework? - if (rResId->getResourceURL() == "private:resource/view/SlideSorter") - { - // got it, grab current selection from there - uno::Reference<view::XSelectionSupplier> xSelectionSupplier( - xConfigController->getResource(rResId), uno::UNO_QUERY); - if (!xSelectionSupplier) - continue; - - Sequence<Reference<XInterface>> aSelectedPageSequence; - if (xSelectionSupplier->getSelection() >>= aSelectedPageSequence) - { - for (auto& xInterface : aSelectedPageSequence) - { - uno::Reference<drawing::XDrawPage> xDrawPage(xInterface, uno::UNO_QUERY); - - if (Reference<XPropertySet> xPropSet{ xDrawPage, UNO_QUERY }) - { - Reference<XPropertySetInfo> xPropSetInfo = xPropSet->getPropertySetInfo(); - if (xPropSetInfo && xPropSetInfo->hasPropertyByName(u"Visible"_ustr)) - { - bool bIsSlideVisible = true; // default: true - xPropSet->getPropertyValue(u"Visible"_ustr) >>= bIsSlideVisible; - if (!bIsSlideVisible) - continue; - } - } - mSelectedPages.push_back(xDrawPage); - } - - // and stop looping. It is likely not getting better - break; - } - } - } - if (mSelectedPages.empty()) { // apparently failed to get a selection - fallback to current page