summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews7.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-14 09:10:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-15 07:48:14 +0100
commitc2429e3e95a4298f43c468f36a1a2832992dd40e (patch)
treef43bd173eabe863b896de6057b5aee2f92d808d5 /sd/source/ui/view/drviews7.cxx
parentb89f239aa9d3d4660380bbd0c893aecde0986032 (diff)
loplugin:flatten in sd/source/ui/view
Change-Id: I28e75ec162cde89fe1aa7d85aecce7ce80878d88 Reviewed-on: https://gerrit.libreoffice.org/67828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view/drviews7.cxx')
-rw-r--r--sd/source/ui/view/drviews7.cxx92
1 files changed, 46 insertions, 46 deletions
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 73c1e7253a67..456cc5ce176d 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1682,60 +1682,60 @@ void DrawViewShell::GetPageProperties( SfxItemSet &rSet )
{
SdPage *pPage = getCurrentPage();
- if (pPage != nullptr && GetDoc() != nullptr)
- {
- SvxPageItem aPageItem(SID_ATTR_PAGE);
- aPageItem.SetLandscape( pPage->GetOrientation() == Orientation::Landscape );
+ if (pPage == nullptr || GetDoc() == nullptr)
+ return;
- rSet.Put(SvxSizeItem( SID_ATTR_PAGE_SIZE, pPage->GetSize() ));
- rSet.Put(aPageItem);
+ SvxPageItem aPageItem(SID_ATTR_PAGE);
+ aPageItem.SetLandscape( pPage->GetOrientation() == Orientation::Landscape );
- const SfxItemSet &rPageAttr = pPage->getSdrPageProperties().GetItemSet();
- drawing::FillStyle eXFS = rPageAttr.GetItem( XATTR_FILLSTYLE )->GetValue();
- XFillStyleItem aFillStyleItem( eXFS );
- aFillStyleItem.SetWhich( SID_ATTR_PAGE_FILLSTYLE );
- rSet.Put(aFillStyleItem);
+ rSet.Put(SvxSizeItem( SID_ATTR_PAGE_SIZE, pPage->GetSize() ));
+ rSet.Put(aPageItem);
- switch (eXFS)
- {
- case drawing::FillStyle_SOLID:
- {
- Color aColor = rPageAttr.GetItem( XATTR_FILLCOLOR )->GetColorValue();
- XFillColorItem aFillColorItem( OUString(), aColor );
- aFillColorItem.SetWhich( SID_ATTR_PAGE_COLOR );
- rSet.Put( aFillColorItem );
- }
- break;
+ const SfxItemSet &rPageAttr = pPage->getSdrPageProperties().GetItemSet();
+ drawing::FillStyle eXFS = rPageAttr.GetItem( XATTR_FILLSTYLE )->GetValue();
+ XFillStyleItem aFillStyleItem( eXFS );
+ aFillStyleItem.SetWhich( SID_ATTR_PAGE_FILLSTYLE );
+ rSet.Put(aFillStyleItem);
- case drawing::FillStyle_GRADIENT:
- {
- const XFillGradientItem *pGradient = rPageAttr.GetItem( XATTR_FILLGRADIENT );
- XFillGradientItem aFillGradientItem( pGradient->GetName(), pGradient->GetGradientValue(), SID_ATTR_PAGE_GRADIENT );
- rSet.Put( aFillGradientItem );
- }
- break;
+ switch (eXFS)
+ {
+ case drawing::FillStyle_SOLID:
+ {
+ Color aColor = rPageAttr.GetItem( XATTR_FILLCOLOR )->GetColorValue();
+ XFillColorItem aFillColorItem( OUString(), aColor );
+ aFillColorItem.SetWhich( SID_ATTR_PAGE_COLOR );
+ rSet.Put( aFillColorItem );
+ }
+ break;
- case drawing::FillStyle_HATCH:
- {
- const XFillHatchItem *pFillHatchItem( rPageAttr.GetItem( XATTR_FILLHATCH ) );
- XFillHatchItem aFillHatchItem( pFillHatchItem->GetName(), pFillHatchItem->GetHatchValue());
- aFillHatchItem.SetWhich( SID_ATTR_PAGE_HATCH );
- rSet.Put( aFillHatchItem );
- }
- break;
+ case drawing::FillStyle_GRADIENT:
+ {
+ const XFillGradientItem *pGradient = rPageAttr.GetItem( XATTR_FILLGRADIENT );
+ XFillGradientItem aFillGradientItem( pGradient->GetName(), pGradient->GetGradientValue(), SID_ATTR_PAGE_GRADIENT );
+ rSet.Put( aFillGradientItem );
+ }
+ break;
- case drawing::FillStyle_BITMAP:
- {
- const XFillBitmapItem *pFillBitmapItem = rPageAttr.GetItem( XATTR_FILLBITMAP );
- XFillBitmapItem aFillBitmapItem( pFillBitmapItem->GetName(), pFillBitmapItem->GetGraphicObject() );
- aFillBitmapItem.SetWhich( SID_ATTR_PAGE_BITMAP );
- rSet.Put( aFillBitmapItem );
- }
- break;
+ case drawing::FillStyle_HATCH:
+ {
+ const XFillHatchItem *pFillHatchItem( rPageAttr.GetItem( XATTR_FILLHATCH ) );
+ XFillHatchItem aFillHatchItem( pFillHatchItem->GetName(), pFillHatchItem->GetHatchValue());
+ aFillHatchItem.SetWhich( SID_ATTR_PAGE_HATCH );
+ rSet.Put( aFillHatchItem );
+ }
+ break;
- default:
- break;
+ case drawing::FillStyle_BITMAP:
+ {
+ const XFillBitmapItem *pFillBitmapItem = rPageAttr.GetItem( XATTR_FILLBITMAP );
+ XFillBitmapItem aFillBitmapItem( pFillBitmapItem->GetName(), pFillBitmapItem->GetGraphicObject() );
+ aFillBitmapItem.SetWhich( SID_ATTR_PAGE_BITMAP );
+ rSet.Put( aFillBitmapItem );
}
+ break;
+
+ default:
+ break;
}
}