Author: orw
Date: Mon Sep  2 11:54:49 2013
New Revision: 1519400

URL: http://svn.apache.org/r1519400
Log:
122840: <ScXMLImport::SetNamedRanges()> - adding named ranges with temporary 
content "0" (correcting typo in changes for 120478)

        patch by: Clarence Guo <clarence dot guo dot bj at gmail dot com>

        cherry-picked from trunk


Modified:
    openoffice/branches/AOO401/   (props changed)
    openoffice/branches/AOO401/main/   (props changed)
    openoffice/branches/AOO401/main/sc/source/filter/xml/xmlimprt.cxx

Propchange: openoffice/branches/AOO401/
------------------------------------------------------------------------------
  Merged /openoffice/trunk:r1519366

Propchange: openoffice/branches/AOO401/main/
------------------------------------------------------------------------------
  Merged /openoffice/trunk/main:r1519366

Modified: openoffice/branches/AOO401/main/sc/source/filter/xml/xmlimprt.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/AOO401/main/sc/source/filter/xml/xmlimprt.cxx?rev=1519400&r1=1519399&r2=1519400&view=diff
==============================================================================
--- openoffice/branches/AOO401/main/sc/source/filter/xml/xmlimprt.cxx (original)
+++ openoffice/branches/AOO401/main/sc/source/filter/xml/xmlimprt.cxx Mon Sep  
2 11:54:49 2013
@@ -2749,9 +2749,9 @@ void ScXMLImport::SetNamedRanges()
                         try
                         {
                             //xNamedRanges->addNewByName((*aItr)->sName, 
sTempContent, aCellAddress, 
GetRangeType((*aItr)->sRangeType));//String::CreateFromInt32( 
(*aItr)->nNameScope)
-                                                       String sTabName;
-                                                       GetDocument()->GetName( 
(*aItr)->nNameScope, sTabName);
-                                                       
xNamedRanges->addNewByScopeName( sTabName, (*aItr)->sName, (*aItr)->sContent, 
aCellAddress, GetRangeType((*aItr)->sRangeType) );                              
                          
+                            String sTabName;
+                            GetDocument()->GetName( (*aItr)->nNameScope, 
sTabName);
+                            xNamedRanges->addNewByScopeName( sTabName, 
(*aItr)->sName, sTempContent, aCellAddress, GetRangeType((*aItr)->sRangeType) );
                         }
                         catch( uno::RuntimeException& )
                         {
@@ -2790,12 +2790,11 @@ void ScXMLImport::SetNamedRanges()
                     if (ScRangeStringConverter::GetAddressFromString(
                         aCellAddress, (*aItr)->sBaseCellAddress, 
GetDocument(), FormulaGrammar::CONV_OOO, nOffset ))
                     {
-                                               String sTableName;
-                                               GetDocument()->GetName( 
(*aItr)->nNameScope,  sTableName );
-                                               rtl::OUString sRangeScope( 
sTableName);
                         //uno::Reference <sheet::XNamedRange> 
xNamedRange(xNamedRanges->getByName((*aItr)->sName), uno::UNO_QUERY);
-                                               //getByScopeName
-                                               uno::Reference 
<sheet::XNamedRange2> xNamedRange(xNamedRanges->getByScopeName( 
sRangeScope,(*aItr)->sName), uno::UNO_QUERY);
+                        String sTableName;
+                        GetDocument()->GetName( (*aItr)->nNameScope,  
sTableName );
+                        rtl::OUString sRangeScope( sTableName);
+                        uno::Reference <sheet::XNamedRange2> 
xNamedRange(xNamedRanges->getByScopeName( sRangeScope,(*aItr)->sName), 
uno::UNO_QUERY);
                         if (xNamedRange.is())
                         {
                             LockSolarMutex();


Reply via email to