[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Apr 26 15:59:05 PDT 2011


 sc/source/filter/excel/xipivot.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit bc6f50a0b3b17a983f1a24bcf183bc17ff46badf
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Apr 26 18:59:02 2011 -0400

    Fixed crash on load when loading doc with pivot table.

diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index 29ccb46..ef2108e 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);
+        }
     }
 }
 


More information about the Libreoffice-commits mailing list