svg export filter: not export hidden slides
Change-Id: I6010f27812a783fd27a423a0f34e30a1b0c584f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152798
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
(cherry picked from commit 7523efa63a
)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157727
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
parent
37cc752dda
commit
ca62ba974c
1 changed files with 24 additions and 8 deletions
|
@ -430,12 +430,23 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
|
|||
{
|
||||
Sequence< Reference< XInterface > > aSelectedPageSequence;
|
||||
aSelection >>= aSelectedPageSequence;
|
||||
mSelectedPages.resize( aSelectedPageSequence.getLength() );
|
||||
for( size_t j=0; j<mSelectedPages.size(); ++j )
|
||||
sal_Int32 nCount = aSelectedPageSequence.getLength();
|
||||
if (nCount > 0)
|
||||
{
|
||||
uno::Reference< drawing::XDrawPage > xDrawPage( aSelectedPageSequence[j],
|
||||
uno::UNO_QUERY );
|
||||
mSelectedPages[j] = xDrawPage;
|
||||
size_t nSelectedPageCount = nCount;
|
||||
for( size_t j=0; j<nSelectedPageCount; ++j )
|
||||
{
|
||||
uno::Reference< drawing::XDrawPage > xDrawPage( aSelectedPageSequence[j],
|
||||
uno::UNO_QUERY );
|
||||
|
||||
Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
|
||||
bool bIsSlideVisible = true; // default: true
|
||||
xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible;
|
||||
if (!bIsSlideVisible)
|
||||
continue;
|
||||
|
||||
mSelectedPages.push_back(xDrawPage);
|
||||
}
|
||||
}
|
||||
|
||||
// and stop looping. It is likely not getting better
|
||||
|
@ -470,19 +481,24 @@ bool SVGFilter::filterImpressOrDraw( const Sequence< PropertyValue >& rDescripto
|
|||
{
|
||||
sal_Int32 nDPCount = xDrawPages->getCount();
|
||||
|
||||
mSelectedPages.resize( nPageToExport != -1 ? 1 : nDPCount );
|
||||
sal_Int32 i;
|
||||
for( i = 0; i < nDPCount; ++i )
|
||||
{
|
||||
if( nPageToExport != -1 && nPageToExport == i )
|
||||
{
|
||||
uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), uno::UNO_QUERY );
|
||||
mSelectedPages[0] = xDrawPage;
|
||||
mSelectedPages.push_back(xDrawPage);
|
||||
}
|
||||
else
|
||||
{
|
||||
uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPages->getByIndex( i ), uno::UNO_QUERY );
|
||||
mSelectedPages[i] = xDrawPage;
|
||||
Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY );
|
||||
bool bIsSlideVisible = true; // default: true
|
||||
xPropSet->getPropertyValue( "Visible" ) >>= bIsSlideVisible;
|
||||
if (!bIsSlideVisible)
|
||||
continue;
|
||||
|
||||
mSelectedPages.push_back(xDrawPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue