summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/pivotcachefragment.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/oox/pivotcachefragment.cxx')
-rw-r--r--sc/source/filter/oox/pivotcachefragment.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/filter/oox/pivotcachefragment.cxx b/sc/source/filter/oox/pivotcachefragment.cxx
index 9fc8ca27a34f..db3918f6ec8d 100644
--- a/sc/source/filter/oox/pivotcachefragment.cxx
+++ b/sc/source/filter/oox/pivotcachefragment.cxx
@@ -22,7 +22,9 @@
#include <oox/helper/attributelist.hxx>
#include "addressconverter.hxx"
#include "biffinputstream.hxx"
+#include "formulabuffer.hxx"
#include "pivotcachebuffer.hxx"
+#include "worksheetbuffer.hxx"
namespace oox {
namespace xls {
@@ -210,8 +212,12 @@ PivotCacheRecordsFragment::PivotCacheRecordsFragment( const WorksheetHelper& rHe
mnRowIdx( 0 ),
mbInRecord( false )
{
+ sal_Int32 nSheetCount = rPivotCache.getWorksheets().getAllSheetCount();
+
// prepare sheet: insert column header names into top row
rPivotCache.writeSourceHeaderCells( *this );
+ // resize formula buffers since we've added a new dummy sheet
+ rHelper.getFormulaBuffer().SetSheetCount( nSheetCount );
}
ContextHandlerRef PivotCacheRecordsFragment::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )