summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/source/svg/svgexport.cxx3
-rw-r--r--filter/source/svg/svgfilter.cxx32
2 files changed, 17 insertions, 18 deletions
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index f087fa64dda1..04939e7703ae 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/xml/sax/Writer.hpp>
+#include <comphelper/lok.hxx>
#include <rtl/bootstrap.hxx>
#include <svtools/miscopt.hxx>
#include <svx/unopage.hxx>
@@ -700,7 +701,7 @@ bool SVGFilter::implExportDocument()
SvtMiscOptions aMiscOptions;
const bool bExperimentalMode = aMiscOptions.IsExperimentalMode();
- mbSinglePage = (nLastPage == 0) || !bExperimentalMode;
+ mbSinglePage = ((nLastPage == 0) || !bExperimentalMode) && !comphelper::LibreOfficeKit::isActive();
mnVisiblePage = -1;
const Reference< XPropertySet > xDefaultPagePropertySet( mxDefaultPage, UNO_QUERY );
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index bf6483fec660..f11399ec1632 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -20,6 +20,7 @@
#include <cstdio>
+#include <comphelper/lok.hxx>
#include <comphelper/servicedecl.hxx>
#include <uno/environment.h>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -107,22 +108,31 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
{
// #i124608# detect selection
bool bSelectionOnly = false;
- bool bGotSelection(false);
+ bool bGotSelection = false;
- // #i124608# extract Single selection wanted from dialog return values
- for ( sal_Int32 nInd = 0; nInd < rDescriptor.getLength(); nInd++ )
+ // when using LibreOfficeKit, default to exporting everything (-1)
+ bool bPageProvided = comphelper::LibreOfficeKit::isActive();
+ sal_Int32 nPageToExport = -1;
+
+ for (sal_Int32 nInd = 0; nInd < rDescriptor.getLength(); nInd++)
{
- if ( rDescriptor[nInd].Name == "SelectionOnly" )
+ if (rDescriptor[nInd].Name == "SelectionOnly")
{
+ // #i124608# extract single selection wanted from dialog return values
rDescriptor[nInd].Value >>= bSelectionOnly;
}
+ else if (rDescriptor[nInd].Name == "PagePos")
+ {
+ rDescriptor[nInd].Value >>= nPageToExport;
+ bPageProvided = true;
+ }
}
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( !mSelectedPages.hasElements() )
+ if (!bPageProvided)
{
uno::Reference<drawing::XDrawView> xDrawView(xController, uno::UNO_QUERY_THROW);
uno::Reference<drawing::framework::XControllerManager> xManager(xController, uno::UNO_QUERY_THROW);
@@ -186,18 +196,6 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
*/
if( !mSelectedPages.hasElements() )
{
- sal_Int32 nLength = rDescriptor.getLength();
- const PropertyValue* pValue = rDescriptor.getConstArray();
- sal_Int32 nPageToExport = -1;
-
- for ( sal_Int32 i = 0 ; i < nLength; ++i)
- {
- if ( pValue[ i ].Name == "PagePos" )
- {
- pValue[ i ].Value >>= nPageToExport;
- }
- }
-
uno::Reference< drawing::XMasterPagesSupplier > xMasterPagesSupplier( mxSrcDoc, uno::UNO_QUERY );
uno::Reference< drawing::XDrawPagesSupplier > xDrawPagesSupplier( mxSrcDoc, uno::UNO_QUERY );