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

Eike Rathke erack at redhat.com
Tue Dec 3 15:49:51 PST 2013


 sc/inc/scmatrix.hxx                        |    2 +-
 sc/source/core/data/validat.cxx            |    2 +-
 sc/source/core/tool/interpr4.cxx           |    2 +-
 sc/source/filter/excel/xeformula.cxx       |    6 +++---
 sc/source/filter/excel/xehelper.cxx        |    2 +-
 sc/source/filter/excel/xilink.cxx          |    4 ++--
 sc/source/filter/xml/XMLExportDDELinks.cxx |    2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 507afd9531a89e5c8ec07514a8f741ce21a0b78d
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Dec 4 00:29:29 2013 +0100

    resolved fdo#72288 made case insensitive matrix string query work again
    
    The SharedString stored at ScQueryEntry::Item was constructed from an
    OUString passed from ScMatrixValue::GetString() so
    rItem.maString.getDataIgnoreCase() in QueryEvaluator::compareByString()
    was NULL and never evaluated equal. Made ScMatrixValue::GetString()
    return a SharedString instead.
    
    Change-Id: I473d5724dfb97707fea58e6b72b1396c049b79c8
    (cherry picked from commit 882665d821a2fc705b7ae03372c2ae7593028210)

diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index f2508a6..93105dd 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -54,7 +54,7 @@ struct ScMatrixValue
     ScMatValType nType;
 
     /// Only valid if ScMatrix methods indicate so!
-    OUString GetString() const { return aStr.getString(); }
+    svl::SharedString GetString() const { return aStr; }
 
     /// Only valid if ScMatrix methods indicate that this is no string!
     sal_uInt16 GetError() const         { return GetDoubleErrorValue( fVal); }
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 0adc60a..b7e51ba 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -731,7 +731,7 @@ bool ScValidationData::GetSelectionFromFormula(
             // strings and empties
             if( ScMatrix::IsNonValueType( nMatVal.nType ) )
             {
-                aValStr = nMatVal.GetString();
+                aValStr = nMatVal.GetString().getString();
 
                 if( NULL != pStrings )
                     pEntry = new ScTypedStrData( aValStr, 0.0, ScTypedStrData::Standard);
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index c70fdf4..6983d3e 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1855,7 +1855,7 @@ void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_
             }
             else
             {
-                OUString aStr( nMatVal.GetString());
+                svl::SharedString aStr( nMatVal.GetString());
                 FormulaTokenRef xRes = new FormulaStringToken( aStr);
                 PushTempToken( new ScMatrixCellResultToken( xMat, xRes.get()));
                 rRetTypeExpr = NUMBERFORMAT_TEXT;
diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index ba02aef..19040ff 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -1319,8 +1319,8 @@ void XclExpFmlaCompImpl::ProcessMatrix( const XclExpScToken& rTokData )
                 }
                 else    // string or empty
                 {
-                    const OUString& rStr = nMatVal.GetString();
-                    if( rStr.isEmpty() )
+                    const OUString aStr( nMatVal.GetString().getString());
+                    if( aStr.isEmpty() )
                     {
                         AppendExt( EXC_CACHEDVAL_EMPTY );
                         AppendExt( 0, 8 );
@@ -1328,7 +1328,7 @@ void XclExpFmlaCompImpl::ProcessMatrix( const XclExpScToken& rTokData )
                     else
                     {
                         AppendExt( EXC_CACHEDVAL_STRING );
-                        AppendExt( rStr );
+                        AppendExt( aStr );
                     }
                 }
             }
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index c64006a..2e6b4cf 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -1034,7 +1034,7 @@ void XclExpCachedMatrix::Save( XclExpStream& rStrm ) const
             }
             else if( ScMatrix::IsNonValueType( nMatVal.nType ) )
             {
-                XclExpString aStr( nMatVal.GetString(), EXC_STR_DEFAULT );
+                XclExpString aStr( nMatVal.GetString().getString(), EXC_STR_DEFAULT );
                 rStrm.SetSliceSize( 6 );
                 rStrm << EXC_CACHEDVAL_STRING << aStr;
             }
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 3a687eb..a33da23 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -517,8 +517,8 @@ bool XclImpExtName::CreateOleData(ScDocument& rDoc, const OUString& rUrl,
                 break;
                 case SC_MATVAL_STRING:
                 {
-                    const OUString& rStr = aVal.GetString();
-                    ScExternalRefCache::TokenRef pToken(new formula::FormulaStringToken(rStr));
+                    const svl::SharedString aStr( aVal.GetString());
+                    ScExternalRefCache::TokenRef pToken(new formula::FormulaStringToken(aStr));
                     xTab->setCell(nCol, nRow, pToken, 0, false);
                 }
                 break;
diff --git a/sc/source/filter/xml/XMLExportDDELinks.cxx b/sc/source/filter/xml/XMLExportDDELinks.cxx
index 4c6cfdf..1d61024 100644
--- a/sc/source/filter/xml/XMLExportDDELinks.cxx
+++ b/sc/source/filter/xml/XMLExportDDELinks.cxx
@@ -52,7 +52,7 @@ void ScXMLExportDDELinks::WriteCell(const ScMatrixValue& aVal, sal_Int32 nRepeat
         if (bString)
         {
             rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING);
-            rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_STRING_VALUE, aVal.GetString());
+            rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_STRING_VALUE, aVal.GetString().getString());
         }
         else
         {


More information about the Libreoffice-commits mailing list