diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-09-17 12:37:23 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-09-17 12:39:46 +0200 |
commit | 2d9cdbd9d9a43e41a7242f9c5bc843fde9362920 (patch) | |
tree | b62845e1ebd8d872efd6e9dedc375abaabdf9d9d /sc | |
parent | 65bd55cc6aa3056d0f4f62b9ab0f9d0527137ed4 (diff) |
Another Windows build fix - too much C++11 for MSVC 2012...
Change-Id: I2ae08bd7b850e26bd58d8cb9fad830edb0395259
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/document10.cxx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index 8702e4c4458d..51b85ec0cfc4 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -248,8 +248,6 @@ void ScDocument::CopyCellValuesFrom( const ScAddress& rTopPos, const sc::CellVal std::vector<Color> ScDocument::GetDocColors() { - // list of color attributes to collect - const std::vector<sal_uInt16> aColAttrs({ATTR_FONT_COLOR, ATTR_BACKGROUND}); std::vector<Color> docColors; for( unsigned int nTabIx = 0; nTabIx < maTabs.size(); ++nTabIx ) @@ -273,14 +271,22 @@ std::vector<Color> ScDocument::GetDocColors() if( SfxItemState::SET == rItemSet.GetItemState( nWhich, false, &pItem ) ) { sal_uInt16 aWhich = pItem->Which(); - if( std::find(aColAttrs.begin(), aColAttrs.end(), aWhich) != aColAttrs.end() ) + switch (aWhich) { - Color aColor( ((SvxColorItem*)pItem)->GetValue() ); - if( COL_AUTO != aColor.GetColor() && - std::find(docColors.begin(), docColors.end(), aColor) == docColors.end() ) - { - docColors.push_back( aColor ); - } + // attributes we want to collect + case ATTR_FONT_COLOR: + case ATTR_BACKGROUND: + { + Color aColor( ((SvxColorItem*)pItem)->GetValue() ); + if( COL_AUTO != aColor.GetColor() && + std::find(docColors.begin(), docColors.end(), aColor) == docColors.end() ) + { + docColors.push_back( aColor ); + } + } + break; + default: + break; } } |