diff options
-rw-r--r-- | sc/inc/colorscale.hxx | 4 | ||||
-rw-r--r-- | sc/inc/fillinfo.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/colorscale.cxx | 1 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcondformat.cxx | 13 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 1 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlimprt.hxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/output2.cxx | 4 |
8 files changed, 26 insertions, 3 deletions
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index e7b611bcd7cb..8311de3f3ef0 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -312,7 +312,11 @@ private: struct ScIconSetFormatData { ScIconSetType eIconSetType; + bool mbShowValue; boost::ptr_vector<ScColorScaleEntry> maEntries; + + ScIconSetFormatData(): + mbShowValue(true) {} }; class SC_DLLPUBLIC ScIconSetFormat : public ScColorFormat diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx index 23d0f9b94d34..e3fdb6e5af42 100644 --- a/sc/inc/fillinfo.hxx +++ b/sc/inc/fillinfo.hxx @@ -87,6 +87,7 @@ struct ScIconSetInfo { sal_Int32 nIconIndex; ScIconSetType eIconSetType; + bool mbShowValue; }; struct CellInfo diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index f5d23c1285bd..27be28313860 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -909,6 +909,7 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const ScAddress& rAddr) const pInfo->nIconIndex = nIndex; pInfo->eIconSetType = mpFormatData->eIconSetType; + pInfo->mbShowValue = mpFormatData->mbShowValue; return pInfo; } diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx index 8b97a7883f90..e3f390399c2e 100644 --- a/sc/source/filter/xml/xmlcondformat.cxx +++ b/sc/source/filter/xml/xmlcondformat.cxx @@ -310,7 +310,7 @@ ScXMLIconSetFormatContext::ScXMLIconSetFormatContext(ScXMLImport& rImport, sal_u ScConditionalFormat* pFormat): SvXMLImportContext( rImport, nPrfx, rLName ) { - rtl::OUString aIconSetType; + rtl::OUString aIconSetType, sShowValue; sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetIconSetAttrMap(); for( sal_Int16 i=0; i < nAttrCount; ++i ) @@ -326,6 +326,9 @@ ScXMLIconSetFormatContext::ScXMLIconSetFormatContext(ScXMLImport& rImport, sal_u case XML_TOK_ICONSET_TYPE: aIconSetType = sValue; break; + case XML_TOK_ICONSET_SHOWVALUE: + sShowValue = sValue; + break; default: break; } @@ -345,6 +348,14 @@ ScXMLIconSetFormatContext::ScXMLIconSetFormatContext(ScXMLImport& rImport, sal_u ScIconSetFormat* pIconSetFormat = new ScIconSetFormat(GetScImport().GetDocument()); ScIconSetFormatData* pIconSetFormatData = new ScIconSetFormatData; + + if(!sShowValue.isEmpty()) + { + bool bShowValue = true; + sax::Converter::convertBool( bShowValue, sShowValue ); + pIconSetFormatData->mbShowValue = !bShowValue; + } + pIconSetFormatData->eIconSetType = eType; pIconSetFormat->SetIconSetData(pIconSetFormatData); pFormat->AddEntry(pIconSetFormat); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 3e4599e6c015..de931b033a6a 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -4059,6 +4059,8 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab) rtl::OUString aIconSetName = getIconSetName(mrIconSet.GetIconSetData()->eIconSetType); AddAttribute( XML_NAMESPACE_CALC_EXT, XML_ICON_SET_TYPE, aIconSetName ); SvXMLElementExport aElementColorScale(*this, XML_NAMESPACE_CALC_EXT, XML_ICON_SET, true, true); + if(!mrIconSet.GetIconSetData()->mbShowValue) + AddAttribute(XML_NAMESPACE_CALC_EXT, XML_SHOW_VALUE, XML_FALSE); for(ScIconSetFormat::const_iterator it = mrIconSet.begin(); it != mrIconSet.end(); ++it) { diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index b7f229c9e4b9..717d0ee79ae3 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -733,6 +733,7 @@ const SvXMLTokenMap& ScXMLImport::GetIconSetAttrMap() static SvXMLTokenMapEntry aIconSetAttrTokenMap[] = { { XML_NAMESPACE_CALC_EXT, XML_ICON_SET_TYPE, XML_TOK_ICONSET_TYPE }, + { XML_NAMESPACE_CALC_EXT, XML_SHOW_VALUE, XML_TOK_ICONSET_SHOWVALUE }, XML_TOKEN_MAP_END }; diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index 87f3f3e8d974..ee5708f9aed4 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -205,7 +205,8 @@ enum ScXMLDataBarEntryAttrTokens enum ScXMLIconSetAttrTokens { - XML_TOK_ICONSET_TYPE + XML_TOK_ICONSET_TYPE, + XML_TOK_ICONSET_SHOWVALUE }; enum ScXMLLabelRangesElemTokens diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 58f7f6d51b43..474043dee042 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -1545,11 +1545,13 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic ) if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow ) bDoCell = false; - // skip text in cell if data bar is set and only value selected + // skip text in cell if data bar/icon set is set and only value selected if ( bDoCell ) { if(pInfo->pDataBar && !pInfo->pDataBar->mbShowValue) bDoCell = false; + if(pInfo->pIconSet && !pInfo->pIconSet->mbShowValue) + bDoCell = false; } // |