summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-06 13:27:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-07 07:56:49 +0100
commit83241dba8fbf2004c48d87cb7221fd354589b28c (patch)
treec7f94b07d2c4cf2a5f49c1372c2970424ac7b2ea /sc/source/ui/vba
parent2e2d736ccbb21daae91603732c87d5375ede1b47 (diff)
loplugin:collapseif in sc
Change-Id: I06bcf6b33af5c6eddb614f1f0ce1b2713876b162 Reviewed-on: https://gerrit.libreoffice.org/62954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/vba')
-rw-r--r--sc/source/ui/vba/vbarange.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 10db96a23e7f..d3bdf3a59796 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -4978,14 +4978,11 @@ ScVbaRange::PrintOut( const uno::Any& From, const uno::Any& To, const uno::Any&
}
printAreas[ index - 1 ] = rangeAddress;
}
- if ( pShell )
+ if ( pShell && xPrintAreas.is() )
{
- if ( xPrintAreas.is() )
- {
- xPrintAreas->setPrintAreas( printAreas );
- uno::Reference< frame::XModel > xModel = pShell->GetModel();
- PrintOutHelper( excel::getBestViewShell( xModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, true );
- }
+ xPrintAreas->setPrintAreas( printAreas );
+ uno::Reference< frame::XModel > xModel = pShell->GetModel();
+ PrintOutHelper( excel::getBestViewShell( xModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, true );
}
}