[Libreoffice-commits] core.git: sw/inc sw/source

Matteo Casalin matteo.casalin at yahoo.com
Sun Aug 25 06:34:38 PDT 2013


 sw/inc/crsrsh.hxx               |    5 +++--
 sw/source/core/crsr/crstrvl.cxx |    4 ++--
 sw/source/ui/inc/wrtsh.hxx      |    2 +-
 sw/source/ui/utlui/content.cxx  |    5 +++--
 sw/source/ui/utlui/glbltree.cxx |    2 +-
 sw/source/ui/wrtsh/move.cxx     |    2 +-
 6 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit d598bb3ec735e45e53d82258d8aa9788bf0dc9a4
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date:   Thu Aug 22 23:04:54 2013 +0200

    String to OUString
    
    Change-Id: Icc70248f48dd24a2940552f88590f02492a38824
    Reviewed-on: https://gerrit.libreoffice.org/5612
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 61a7d2a..df120f9 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -21,6 +21,7 @@
 
 #include <com/sun/star/i18n/WordType.hpp>
 
+#include <rtl/ustring.hxx>
 #include <tools/string.hxx>
 #include <tools/link.hxx>
 #include <tools/rtti.hxx>
@@ -665,8 +666,8 @@ public:
     // in a headerframe otherwise in a footerframe
     bool IsInHeaderFooter( sal_Bool* pbInHeader = 0 ) const;
 
-    sal_Bool GotoNextTOXBase( const String* = 0 );
-    sal_Bool GotoPrevTOXBase( const String* = 0 );
+    sal_Bool GotoNextTOXBase( const OUString* = 0 );
+    sal_Bool GotoPrevTOXBase( const OUString* = 0 );
     sal_Bool GotoTOXMarkBase();
     // jump to the next or previous index entry
     sal_Bool GotoNxtPrvTOXMark( sal_Bool bNext = sal_True );
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 1b11a31..9e5630b1e5 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -284,7 +284,7 @@ sal_Bool SwCrsrShell::SetCrsrInHdFt( sal_uInt16 nDescNo, sal_Bool bInHeader )
 }
 
 /// jump to the next index
-sal_Bool SwCrsrShell::GotoNextTOXBase( const String* pName )
+sal_Bool SwCrsrShell::GotoNextTOXBase( const OUString* pName )
 {
     sal_Bool bRet = sal_False;
 
@@ -335,7 +335,7 @@ sal_Bool SwCrsrShell::GotoNextTOXBase( const String* pName )
 }
 
 /// jump to previous index
-sal_Bool SwCrsrShell::GotoPrevTOXBase( const String* pName )
+sal_Bool SwCrsrShell::GotoPrevTOXBase( const OUString* pName )
 {
     sal_Bool bRet = sal_False;
 
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 2b38eac..ca6895e 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -464,7 +464,7 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
     bool GotoRegion( const String& rName );
     sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
         sal_uInt16 nSeqNo = 0 );
-    sal_Bool GotoNextTOXBase( const String* pName = 0);
+    sal_Bool GotoNextTOXBase( const OUString* pName = 0);
     bool GotoTable( const String& rName );
     sal_Bool GotoFld( const SwFmtFld& rFld );
     const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False);
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 4dc34d4..5bc51f2 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -2963,8 +2963,9 @@ void SwContentTree::GotoContent(SwContent* pCnt)
         break;
         case CONTENT_TYPE_INDEX:
         {
-            if (!pActiveShell->GotoNextTOXBase(&pCnt->GetName()))
-                pActiveShell->GotoPrevTOXBase(&pCnt->GetName());
+            const OUString sName(pCnt->GetName());
+            if (!pActiveShell->GotoNextTOXBase(&sName))
+                pActiveShell->GotoPrevTOXBase(&sName);
         }
         break;
         case CONTENT_TYPE_POSTIT:
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 31b7f74..e433b95 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -1013,7 +1013,7 @@ void SwGlobalTree::GotoContent(const SwGlblDocContent* pCont)
         break;
         case GLBLDOC_TOXBASE:
         {
-            String sName = pCont->GetTOX()->GetTOXName();
+            const OUString sName = pCont->GetTOX()->GetTOXName();
             if (!pActiveShell->GotoNextTOXBase(&sName))
                 pActiveShell->GotoPrevTOXBase(&sName);
         }
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx
index 6b998f3..26125c5 100644
--- a/sw/source/ui/wrtsh/move.cxx
+++ b/sw/source/ui/wrtsh/move.cxx
@@ -650,7 +650,7 @@ sal_Bool SwWrtShell::GotoRefMark( const String& rRefMark, sal_uInt16 nSubType,
     return bRet;
 }
 
-sal_Bool SwWrtShell::GotoNextTOXBase( const String* pName )
+sal_Bool SwWrtShell::GotoNextTOXBase( const OUString* pName )
 {
     SwPosition aPos = *GetCrsr()->GetPoint();
     bool bRet = SwCrsrShell::GotoNextTOXBase(pName);


More information about the Libreoffice-commits mailing list