diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-22 16:55:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-26 09:38:53 +0200 |
commit | 30b635c26d6cc07b5a84dc0d829f0b0cde3d1f5a (patch) | |
tree | 0ed53ffc7dd75bc6ca40c99453ae39fea3421462 /sc/source/ui/vba/vbapalette.cxx | |
parent | 94c548ac6468a567aa352fc47e5d2acc34076130 (diff) |
loplugin:flatten in sc
Change-Id: I40653af2d90ef123cf77d7223c520cba0e5a3aca
Reviewed-on: https://gerrit.libreoffice.org/42661
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/vba/vbapalette.cxx')
-rw-r--r-- | sc/source/ui/vba/vbapalette.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/vba/vbapalette.cxx b/sc/source/ui/vba/vbapalette.cxx index 4010200a370f..557b00937e0b 100644 --- a/sc/source/ui/vba/vbapalette.cxx +++ b/sc/source/ui/vba/vbapalette.cxx @@ -95,10 +95,11 @@ ScVbaPalette::getPalette() const { uno::Reference< container::XIndexAccess > xIndex; uno::Reference< beans::XPropertySet > xProps; - if ( m_pShell ) - xProps.set( m_pShell->GetModel(), uno::UNO_QUERY_THROW ); - else + if ( !m_pShell ) throw uno::RuntimeException("Can't extract palette, no doc shell" ); + + xProps.set( m_pShell->GetModel(), uno::UNO_QUERY_THROW ); + xIndex.set( xProps->getPropertyValue("ColorPalette"), uno::UNO_QUERY ); if ( !xIndex.is() ) return new DefaultPalette(); |