[Libreoffice-commits] core.git: Branch 'private/kohei/calc-shared-string' - sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Fri Oct 4 17:35:27 PDT 2013


 sc/source/core/data/cellvalue.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 438d12eb5e3f0fabbeb1ab8546dbd08b69751665
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri Oct 4 20:36:54 2013 -0400

    Slight optimization when copying OUString.
    
    Change-Id: If934e18c0fd68d89d838ca9717aa2e4616bc3b6a

diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx
index ba71d1e..7a7f941 100644
--- a/sc/source/core/data/cellvalue.cxx
+++ b/sc/source/core/data/cellvalue.cxx
@@ -163,7 +163,7 @@ ScCellValue::ScCellValue( const ScRefCellValue& rCell ) : meType(rCell.meType),
     switch (rCell.meType)
     {
         case CELLTYPE_STRING:
-            mpString = new OUString(*rCell.mpString);
+            mpString = new OUString(rCell.mpString->pData);
         break;
         case CELLTYPE_EDIT:
             mpEditText = rCell.mpEditText->Clone();
@@ -186,7 +186,7 @@ ScCellValue::ScCellValue( const ScCellValue& r ) : meType(r.meType), mfValue(r.m
     switch (r.meType)
     {
         case CELLTYPE_STRING:
-            mpString = new OUString(*r.mpString);
+            mpString = new OUString(r.mpString->pData);
         break;
         case CELLTYPE_EDIT:
             mpEditText = r.mpEditText->Clone();
@@ -272,7 +272,7 @@ void ScCellValue::assign( const ScDocument& rDoc, const ScAddress& rPos )
     switch (meType)
     {
         case CELLTYPE_STRING:
-            mpString = new OUString(*aRefVal.mpString);
+            mpString = new OUString(aRefVal.mpString->pData);
         break;
         case CELLTYPE_EDIT:
             if (aRefVal.mpEditText)
@@ -297,7 +297,7 @@ void ScCellValue::assign( const ScCellValue& rOther, ScDocument& rDestDoc, int n
     switch (meType)
     {
         case CELLTYPE_STRING:
-            mpString = new OUString(*rOther.mpString);
+            mpString = new OUString(rOther.mpString->pData);
         break;
         case CELLTYPE_EDIT:
         {


More information about the Libreoffice-commits mailing list