Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4261

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/61/4261/1

String=>OUString svtools grfmgr + fmtfield

Change-Id: Ie3d49014cb5edfbb709bea97b6f1332351fc6f3c
---
M include/svtools/fmtfield.hxx
M include/svtools/grfmgr.hxx
M svtools/source/control/fmtfield.cxx
M svtools/source/graphic/grfmgr.cxx
4 files changed, 27 insertions(+), 27 deletions(-)



diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx
index 6fab7e4..df7b741 100644
--- a/include/svtools/fmtfield.hxx
+++ b/include/svtools/fmtfield.hxx
@@ -52,7 +52,7 @@
     };
 
 protected:
-    String      m_sLastValidText;
+    OUString      m_sLastValidText;
         // hat nichts mit dem current value zu tun, ist der letzte Text, der waehrend einer 
Eingabe als gueltig erkannt
         // wurde (also durch CheckText geprueft, nicht durch den Formatter gejagt)
     Selection   m_aLastSelection;
@@ -84,8 +84,8 @@
     // ausgibt
     sal_Bool                m_bTreatAsNumber;
     // und mit den folgenden Members koennen wir das Ganze hier auch zur formatierten Text-Ausgabe 
benutzen ...
-    String              m_sCurrentTextValue;
-    String              m_sDefaultText;
+    OUString              m_sCurrentTextValue;
+    OUString              m_sDefaultText;
 
     // die bei der letzten Ausgabe-Operation vom Formatter gelieferte Farbe (nicht dass wir sie 
beachten wuerden, aber
     // man kann sie von aussen abfragen)
@@ -188,10 +188,10 @@
         (der Text wird einfach nur durch den Formatter gejagt und dann gesetzt)
     */
     void SetTextFormatted(const OUString& rText);
-    String  GetTextValue() const;
+    OUString  GetTextValue() const;
 
     void    SetDefaultText(const OUString& rDefault) { m_sDefaultText = rDefault; }
-    String  GetDefaultText() const { return m_sDefaultText; }
+    OUString  GetDefaultText() const { return m_sDefaultText; }
 
     // die bei der letzten Ausgabe-Operation vom Formatter gelieferte Farbe (Ausgabe-Operationen 
werden getriggert durch
     // SetValue, SetTextValue, SetTextFormatted, also indirekt eventuell auch durch 
SetMin-/-MaxValue)
diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx
index 9a3bd8c..c479fa0 100644
--- a/include/svtools/grfmgr.hxx
+++ b/include/svtools/grfmgr.hxx
@@ -169,9 +169,9 @@
     sal_uLong               mnSizeBytes;
     GraphicType             meType;
     GraphicManager*         mpMgr;
-    String*                 mpLink;
+    OUString*               mpLink;
     Link*                   mpSwapStreamHdl;
-    String*                 mpUserData;
+    OUString*               mpUserData;
     Timer*                  mpSwapOutTimer;
     GrfSimpleCacheObj*      mpSimpleCache;
     sal_uLong               mnAnimationLoopCount;
@@ -343,7 +343,7 @@
 
     const Graphic&          GetGraphic() const;
     void                    SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj = 
0);
-    void                    SetGraphic( const Graphic& rGraphic, const String& rLink );
+    void                    SetGraphic( const Graphic& rGraphic, const OUString& rLink );
 
     /** Get graphic transformed according to given attributes
 
@@ -380,15 +380,15 @@
     void                    SetAttr( const GraphicAttr& rAttr );
     const GraphicAttr&      GetAttr() const { return maAttr; }
 
-    sal_Bool                HasLink() const { return( mpLink != NULL && mpLink->Len() > 0 ); }
+    sal_Bool                HasLink() const { return( mpLink != NULL && !mpLink->isEmpty()); }
     void                    SetLink();
-    void                    SetLink( const String& rLink );
-    String                  GetLink() const;
+    void                    SetLink( const OUString& rLink );
+    OUString                GetLink() const;
 
-    sal_Bool                HasUserData() const { return( mpUserData != NULL && mpUserData->Len() 
0 ); }
+    sal_Bool                HasUserData() const { return( mpUserData != NULL && 
!mpUserData->isEmpty() ); }
     void                    SetUserData();
-    void                    SetUserData( const String& rUserData );
-    String                  GetUserData() const;
+    void                    SetUserData( const OUString& rUserData );
+    OUString                GetUserData() const;
 
     OString            GetUniqueID() const;
 
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 7e04e8c..807ca54 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -451,7 +451,7 @@
 }
 
 //------------------------------------------------------------------------------
-String FormattedField::GetTextValue() const
+OUString FormattedField::GetTextValue() const
 {
     if (m_bValueDirty)
     {
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 136aa57..1a25822 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -81,8 +81,8 @@
     SvDataCopyStream(),
     maGraphic   ( rGraphicObj.GetGraphic() ),
     maAttr      ( rGraphicObj.maAttr ),
-    mpLink      ( rGraphicObj.mpLink ? ( new String( *rGraphicObj.mpLink ) ) : NULL ),
-    mpUserData  ( rGraphicObj.mpUserData ? ( new String( *rGraphicObj.mpUserData ) ) : NULL )
+    mpLink      ( rGraphicObj.mpLink ? ( new OUString( *rGraphicObj.mpLink ) ) : NULL ),
+    mpUserData  ( rGraphicObj.mpUserData ? ( new OUString( *rGraphicObj.mpUserData ) ) : NULL )
 {
     ImplConstruct();
     ImplAssignGraphicData();
@@ -330,8 +330,8 @@
 
         maGraphic = rGraphicObj.GetGraphic();
         maAttr = rGraphicObj.maAttr;
-        mpLink = rGraphicObj.mpLink ? new String( *rGraphicObj.mpLink ) : NULL;
-        mpUserData = rGraphicObj.mpUserData ? new String( *rGraphicObj.mpUserData ) : NULL;
+        mpLink = rGraphicObj.mpLink ? new OUString( *rGraphicObj.mpLink ) : NULL;
+        mpUserData = rGraphicObj.mpUserData ? new OUString( *rGraphicObj.mpUserData ) : NULL;
         ImplAssignGraphicData();
         mbAutoSwapped = sal_False;
         mpMgr = rGraphicObj.mpMgr;
@@ -396,12 +396,12 @@
         delete mpLink, mpLink = NULL;
 }
 
-void GraphicObject::SetLink( const String& rLink )
+void GraphicObject::SetLink( const OUString& rLink )
 {
-    delete mpLink, mpLink = new String( rLink );
+    delete mpLink, mpLink = new OUString( rLink );
 }
 
-String GraphicObject::GetLink() const
+OUString GraphicObject::GetLink() const
 {
     if( mpLink )
         return *mpLink;
@@ -415,12 +415,12 @@
         delete mpUserData, mpUserData = NULL;
 }
 
-void GraphicObject::SetUserData( const String& rUserData )
+void GraphicObject::SetUserData( const OUString& rUserData )
 {
-    delete mpUserData, mpUserData = new String( rUserData );
+    delete mpUserData, mpUserData = new OUString( rUserData );
 }
 
-String GraphicObject::GetUserData() const
+OUString GraphicObject::GetUserData() const
 {
     if( mpUserData )
         return *mpUserData;
@@ -753,10 +753,10 @@
         mpSwapOutTimer->Start();
 }
 
-void GraphicObject::SetGraphic( const Graphic& rGraphic, const String& rLink )
+void GraphicObject::SetGraphic( const Graphic& rGraphic, const OUString& rLink )
 {
     SetGraphic( rGraphic );
-    mpLink = new String( rLink );
+    mpLink = new OUString( rLink );
 }
 
 Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMode& rDestMap, 
const GraphicAttr& rAttr ) const

-- 
To view, visit https://gerrit.libreoffice.org/4261
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3d49014cb5edfbb709bea97b6f1332351fc6f3c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Norbert Thiebaud <nthiebaud@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.