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

Henry Castro hcastro at collabora.com
Mon Apr 20 12:08:12 PDT 2015


 sc/source/filter/excel/xichart.cxx |   51 +++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 24 deletions(-)

New commits:
commit 0c92e1092b4a8c49c0f893bcf9c538c224b42724
Author: Henry Castro <hcastro at collabora.com>
Date:   Mon Apr 13 20:32:22 2015 -0400

    Resolves tdf#83366 Copy and Paste crashes Calc when original doc closed
    
    Change-Id: I5ab279a7d7af6829735b47ef5228f56dc77580c9
    Reviewed-on: https://gerrit.libreoffice.org/15448
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at redhat.com>

diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 6313fa5..c7bb18d 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -818,35 +818,38 @@ Reference< XDataSequence > XclImpChSourceLink::CreateDataSequence( const OUStrin
 {
     Reference< XDataSequence > xDataSeq;
     Reference< XDataProvider > xDataProv = GetDataProvider();
-    if( xDataProv.is() && mxTokenArray )
+    if( xDataProv.is() )
     {
-        ScCompiler aComp( GetDocPtr(), ScAddress(), *mxTokenArray );
-        aComp.SetGrammar(GetDoc().GetGrammar());
-        OUStringBuffer aRangeRep;
-        aComp.CreateStringFromTokenArray( aRangeRep );
-        try
-        {
-            xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aRangeRep.makeStringAndClear() );
-            // set sequence role
-            ScfPropertySet aSeqProp( xDataSeq );
-            aSeqProp.SetProperty( EXC_CHPROP_ROLE, rRole );
-        }
-        catch( Exception& )
+        if ( mxTokenArray )
         {
-//            OSL_FAIL( "XclImpChSourceLink::CreateDataSequence - cannot create data sequence" );
+            ScCompiler aComp( GetDocPtr(), ScAddress(), *mxTokenArray );
+            aComp.SetGrammar(GetDoc().GetGrammar());
+            OUStringBuffer aRangeRep;
+            aComp.CreateStringFromTokenArray( aRangeRep );
+            try
+            {
+                xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aRangeRep.makeStringAndClear() );
+                // set sequence role
+                ScfPropertySet aSeqProp( xDataSeq );
+                aSeqProp.SetProperty( EXC_CHPROP_ROLE, rRole );
+            }
+            catch( Exception& )
+            {
+    //            OSL_FAIL( "XclImpChSourceLink::CreateDataSequence - cannot create data sequence" );
+            }
         }
-    }
-    else if( rRole == EXC_CHPROP_ROLE_LABEL && mxString && !mxString->GetText().isEmpty() )
-    {
-        try
+        else if( rRole == EXC_CHPROP_ROLE_LABEL && mxString && !mxString->GetText().isEmpty() )
         {
-            OUString aString("\"");
-            xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aString + mxString->GetText() + aString );
-            // set sequence role
-            ScfPropertySet aSeqProp( xDataSeq );
-            aSeqProp.SetProperty( EXC_CHPROP_ROLE, rRole );
+            try
+            {
+                OUString aString("\"");
+                xDataSeq = xDataProv->createDataSequenceByRangeRepresentation( aString + mxString->GetText() + aString );
+                // set sequence role
+                ScfPropertySet aSeqProp( xDataSeq );
+                aSeqProp.SetProperty( EXC_CHPROP_ROLE, rRole );
+            }
+            catch( Exception& ) { }
         }
-        catch( Exception& ) { }
     }
     return xDataSeq;
 }


More information about the Libreoffice-commits mailing list