summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-11-03 19:12:10 +0000
committerMichael Meeks <michael.meeks@suse.com>2011-11-03 19:12:10 +0000
commit3c8b99a3fcbaf0192c9b5ffe2b94f7f84e2dde2b (patch)
tree2fefbc747dbdd323e802bf62a841fd2e36af6c10 /vcl
parentdab309e782cce77b3c22915627f2a2d3ff66cf01 (diff)
IsGreyPalette: belt and braces, empty palettes are grey (apparently)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/vcl/salbtype.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/inc/vcl/salbtype.hxx b/vcl/inc/vcl/salbtype.hxx
index 41c90e917055..aca81abe1724 100644
--- a/vcl/inc/vcl/salbtype.hxx
+++ b/vcl/inc/vcl/salbtype.hxx
@@ -207,7 +207,7 @@ public:
inline BitmapColor& operator[]( sal_uInt16 nIndex );
inline sal_uInt16 GetBestIndex( const BitmapColor& rCol ) const;
- bool IsGreyPalette() const { return mbIsGrey; }
+ bool IsGreyPalette() const { return !GetEntryCount() || mbIsGrey; }
void SetGreyPalette( bool bGrey ) { mbIsGrey = bGrey; }
};