summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-04-26 18:59:02 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-04-26 18:59:02 -0400
commitbc6f50a0b3b17a983f1a24bcf183bc17ff46badf (patch)
treed4d2d6ca81170564379e3cc089e9031a5cb74cee
parent61db82397810dcfd560561cd5c1cbc871d383131 (diff)
Fixed crash on load when loading doc with pivot table.
-rw-r--r--sc/source/filter/excel/xipivot.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 29ccb46a9..ef2108e0a 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -1010,8 +1010,12 @@ void XclImpPTField::ConvertPageField( ScDPSaveData& rSaveData ) const
DBG_ASSERT( maFieldInfo.mnAxes & EXC_SXVD_AXIS_PAGE, "XclImpPTField::ConvertPageField - no page field" );
if( ScDPSaveDimension* pSaveDim = ConvertRCPField( rSaveData ) )
{
- const rtl::OUString aName = *GetItemName( maPageInfo.mnSelItem );
- pSaveDim->SetCurrentPage( &aName );
+ const String* pName = GetItemName( maPageInfo.mnSelItem );
+ if (pName)
+ {
+ const OUString aName(*pName);
+ pSaveDim->SetCurrentPage(&aName);
+ }
}
}