filter/source/svg/svgexport.cxx | 24 +++++++++++++----------- filter/source/svg/svgfilter.hxx | 2 ++ 2 files changed, 15 insertions(+), 11 deletions(-)
New commits: commit 206ac77ec51d3ab25a83a573d49cb8995ea39065 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Aug 31 20:43:58 2023 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Sep 1 11:25:06 2023 +0200 show status indicator progress on svg export of slides somewhat related to https://github.com/CollaboraOnline/online/issues/6616 just for standard export case for now Change-Id: If2399e29a1463b0a3b465e77c5d67565655999e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156360 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index bda73f0c16af..98a21eeed5c1 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <strings.hrc> #include "svgwriter.hxx" #include "svgfontexport.hxx" #include "svgfilter.hxx" @@ -653,6 +654,8 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) { pValue[ i ].Value >>= maFilterData; } + else if (pValue[i].Name == "StatusIndicator") + pValue[i].Value >>= mxStatusIndicator; } if(mbWriterFilter || mbCalcFilter) @@ -1912,8 +1915,14 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing: mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "SlideGroup" ); SvXMLElementExport aExp( *mpSVGExport, XML_NAMESPACE_NONE, "g", true, true ); + if (mxStatusIndicator) + mxStatusIndicator->start(FilterResId(STR_FILTER_DOC_SAVING), nLastPage - nFirstPage + 1); + for( sal_Int32 i = nFirstPage; i <= nLastPage; ++i ) { + if (mxStatusIndicator.is()) + mxStatusIndicator->setValue(i - nFirstPage); + Reference<css::drawing::XShapes> xShapes = rxPages[i]; if( xShapes.is() ) @@ -1957,6 +1966,9 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing: } // append the </g> closing tag related to inserted elements } // append the </g> closing tag related to the svg element handling the slide visibility } + + if (mxStatusIndicator) + mxStatusIndicator->end(); } else { diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx index 5b7573a1be98..5f92e716da2d 100644 --- a/filter/source/svg/svgfilter.hxx +++ b/filter/source/svg/svgfilter.hxx @@ -28,6 +28,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/task/XStatusIndicator.hpp> #include <cppuhelper/implbase.hxx> #include <com/sun/star/xml/sax/XWriter.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> @@ -208,6 +209,7 @@ private: bool mbExportShapeSelection; Sequence< PropertyValue > maFilterData; Reference< css::drawing::XDrawPage > mxDefaultPage; + Reference<css::task::XStatusIndicator> mxStatusIndicator; std::vector< Reference< css::drawing::XDrawPage > > mSelectedPages; bool mbIsPreview; bool mbShouldCompress; commit 6bcdfb86d872e1a5c33c21dce68e7ee3da49d85f Author: Caolán McNamara <[email protected]> AuthorDate: Thu Aug 31 20:20:42 2023 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Sep 1 11:24:58 2023 +0200 outer check is mbExportShapeSelection so inner !mbExportShapeSelection Change-Id: If4356a0217296a1d91a1daa145f8deccd8ea0f8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156359 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 5e63db81b70c..bda73f0c16af 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1906,7 +1906,7 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing: } } - if(!mbExportShapeSelection) + if (!mbExportShapeSelection) { // We wrap all slide in a group element with class name "SlideGroup". mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "SlideGroup" ); @@ -1914,17 +1914,7 @@ void SVGFilter::implExportDrawPages( const std::vector< Reference< css::drawing: for( sal_Int32 i = nFirstPage; i <= nLastPage; ++i ) { - Reference< css::drawing::XShapes > xShapes; - - if (mbExportShapeSelection) - { - // #i124608# export a given object selection - xShapes = maShapeSelection; - } - else - { - xShapes = rxPages[i]; - } + Reference<css::drawing::XShapes> xShapes = rxPages[i]; if( xShapes.is() ) {
