summaryrefslogtreecommitdiff
path: root/oox/source/xls/pivotcachebuffer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/xls/pivotcachebuffer.cxx')
-rw-r--r--oox/source/xls/pivotcachebuffer.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/oox/source/xls/pivotcachebuffer.cxx b/oox/source/xls/pivotcachebuffer.cxx
index 5132b7d43a16..77b5a0fc1fc2 100644
--- a/oox/source/xls/pivotcachebuffer.cxx
+++ b/oox/source/xls/pivotcachebuffer.cxx
@@ -302,6 +302,12 @@ void PivotCacheItem::readError( BiffInputStream& rStrm )
mnType = XML_e;
}
+void PivotCacheItem::setStringValue( const OUString& sString )
+{
+ mnType = XML_s;
+ maValue <<= sString;
+}
+
OUString PivotCacheItem::getName() const
{
switch( mnType )
@@ -393,6 +399,15 @@ const PivotCacheItem* PivotCacheItemList::getCacheItem( sal_Int32 nItemIdx ) con
return ContainerHelper::getVectorElement( maItems, nItemIdx );
}
+void PivotCacheItemList::applyItemCaptions( const IdCaptionPairList& vCaptions )
+{
+ for( IdCaptionPairList::const_iterator aIt = vCaptions.begin(), aEnd = vCaptions.end(); aIt != aEnd; ++aIt )
+ {
+ if ( static_cast<sal_uInt32>( aIt->first ) < maItems.size() )
+ maItems[ aIt->first ].setStringValue( aIt->second );
+ }
+}
+
void PivotCacheItemList::getCacheItemNames( ::std::vector< OUString >& orItemNames ) const
{
orItemNames.clear();
@@ -753,6 +768,14 @@ const PivotCacheItem* PivotCacheField::getCacheItem( sal_Int32 nItemIdx ) const
return 0;
}
+void PivotCacheField::applyItemCaptions( const IdCaptionPairList& vCaptions )
+{
+ if( hasGroupItems() )
+ maGroupItems.applyItemCaptions( vCaptions );
+ if( hasSharedItems() )
+ maSharedItems.applyItemCaptions( vCaptions );
+}
+
void PivotCacheField::getCacheItemNames( ::std::vector< OUString >& orItemNames ) const
{
if( hasGroupItems() )