summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-08-31 20:43:58 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-09-01 11:25:06 +0200
commit206ac77ec51d3ab25a83a573d49cb8995ea39065 (patch)
tree308c2dde882baff89426f488ab6a2271f6805d30
parent6bcdfb86d872e1a5c33c21dce68e7ee3da49d85f (diff)
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 <caolan.mcnamara@collabora.com>
-rw-r--r--filter/source/svg/svgexport.cxx12
-rw-r--r--filter/source/svg/svgfilter.hxx2
2 files changed, 14 insertions, 0 deletions
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;