summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2011-11-07 08:57:49 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2011-11-07 09:18:52 +0400
commitbc858110c2c8c7292a19ed849fd190b2d4aad0b7 (patch)
tree8260e5a39f0159384d9eef8eaf07750a8f10de8c /svx
parentaa22ecc606ad927ef18e80488070c523e8dde2b8 (diff)
cppcheck: drop redundant check
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx80
1 files changed, 35 insertions, 45 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 956773a4c6a3..0b60214bd43f 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -739,51 +739,41 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
pView->SetPageVisible( sal_False );
pView->ShowSdrPage( pPage );
- if ( pView && pPage )
- {
- pView->SetBordVisible( sal_False );
- pView->SetPageVisible( sal_False );
- pView->ShowSdrPage( pPage );
-
- const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() );
- aNewSize = Size( aSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder(),
- aSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder() );
- const Rectangle aClipRect( aNewOrg, aNewSize );
- MapMode aVMap( aMap );
-
- aVDev.Push();
- aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
- aVDev.SetRelativeMapMode( aVMap );
- aVDev.IntersectClipRegion( aClipRect );
-
- // Use new StandardCheckVisisbilityRedirector
- ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage );
-
- pView->CompleteRedraw(&aVDev, Region(Rectangle(Point(), aNewSize)), &aRedirector);
-
- aVDev.Pop();
-
- aMtf.Stop();
- aMtf.WindStart();
- aMtf.SetPrefMapMode( aMap );
- aMtf.SetPrefSize( aNewSize );
-
- // AW: Here the current version was filtering out the META_CLIPREGION_ACTIONs
- // from the metafile. I asked some other developers why this was done, but no
- // one knew a direct reason. Since it's in for long time, it may be an old
- // piece of code. MetaFiles save and load ClipRegions with polygons with preserving
- // the polygons, so a resolution-indepent roundtrip is supported. Removed this
- // code since it destroys some MetaFiles where ClipRegions are used. Anyways,
- // just filtering them out is a hack, at least the encapsulated content would need
- // to be clipped geometrically.
- aGraphic = Graphic(aMtf);
- }
-
- if ( pView )
- {
- pView->HideSdrPage();
- delete pView;
- }
+ const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() );
+ aNewSize = Size( aSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder(),
+ aSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder() );
+ const Rectangle aClipRect( aNewOrg, aNewSize );
+ MapMode aVMap( aMap );
+
+ aVDev.Push();
+ aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
+ aVDev.SetRelativeMapMode( aVMap );
+ aVDev.IntersectClipRegion( aClipRect );
+
+ // Use new StandardCheckVisisbilityRedirector
+ ImplExportCheckVisisbilityRedirector aRedirector( mpCurrentPage );
+
+ pView->CompleteRedraw(&aVDev, Region(Rectangle(Point(), aNewSize)), &aRedirector);
+
+ aVDev.Pop();
+
+ aMtf.Stop();
+ aMtf.WindStart();
+ aMtf.SetPrefMapMode( aMap );
+ aMtf.SetPrefSize( aNewSize );
+
+ // AW: Here the current version was filtering out the META_CLIPREGION_ACTIONs
+ // from the metafile. I asked some other developers why this was done, but no
+ // one knew a direct reason. Since it's in for long time, it may be an old
+ // piece of code. MetaFiles save and load ClipRegions with polygons with preserving
+ // the polygons, so a resolution-indepent roundtrip is supported. Removed this
+ // code since it destroys some MetaFiles where ClipRegions are used. Anyways,
+ // just filtering them out is a hack, at least the encapsulated content would need
+ // to be clipped geometrically.
+ aGraphic = Graphic(aMtf);
+
+ pView->HideSdrPage();
+ delete pView;
if( rSettings.mbTranslucent )
{