[Libreoffice-commits] .: 2 commits - sc/inc sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Aug 29 18:48:12 PDT 2011


 sc/inc/rangeutl.hxx                |    1 
 sc/inc/scabstdlg.hxx               |    2 -
 sc/inc/tablink.hxx                 |    4 +-
 sc/source/core/tool/rangeutl.cxx   |   10 +++++++
 sc/source/ui/attrdlg/scdlgfact.cxx |    2 -
 sc/source/ui/attrdlg/scdlgfact.hxx |    2 -
 sc/source/ui/docshell/tablink.cxx  |    2 -
 sc/source/ui/inc/linkarea.hxx      |    8 ++---
 sc/source/ui/inc/mvtabdlg.hxx      |   16 +++++------
 sc/source/ui/inc/viewfunc.hxx      |    2 -
 sc/source/ui/miscdlgs/linkarea.cxx |   52 ++++++++++++++++++-------------------
 sc/source/ui/miscdlgs/mvtabdlg.cxx |   39 +++++++++++++--------------
 sc/source/ui/view/tabvwshf.cxx     |    8 ++---
 sc/source/ui/view/viewfun2.cxx     |    5 ++-
 14 files changed, 82 insertions(+), 71 deletions(-)

New commits:
commit a74bb447e6ff702db7e9f5fdaf897858ff1190fc
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Mon Aug 29 21:48:06 2011 -0400

    More on String to rtl::OUString.

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index e474a42..babe956 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -215,7 +215,7 @@ public:
     virtual sal_uInt16  GetSelectedTable        () const = 0;
     virtual bool    GetCopyTable            () const = 0;
     virtual bool    GetRenameTable          () const = 0;
-    virtual void    GetTabNameString( String& rString ) const = 0;
+    virtual void    GetTabNameString( rtl::OUString& rString ) const = 0;
     virtual void    SetForceCopyTable       () = 0;
     virtual void    EnableCopyTable         (sal_Bool bFlag=true) = 0;
     virtual void    EnableRenameTable       (sal_Bool bFlag=true) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index d5d0449..ee09f61 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -522,7 +522,7 @@ bool AbstractScMoveTableDlg_Impl::GetRenameTable() const
 {
     return pDlg->GetRenameTable();
 }
-void AbstractScMoveTableDlg_Impl::GetTabNameString( String& rString ) const
+void AbstractScMoveTableDlg_Impl::GetTabNameString( rtl::OUString& rString ) const
 {
     pDlg->GetTabNameString( rString );
 }
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 0ea51db..e55a523 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -267,7 +267,7 @@ class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg  //add for ScM
     virtual sal_uInt16  GetSelectedTable        () const;
     virtual bool    GetCopyTable            () const;
     virtual bool    GetRenameTable          () const;
-    virtual void    GetTabNameString( String& rString ) const;
+    virtual void    GetTabNameString( rtl::OUString& rString ) const;
     virtual void    SetForceCopyTable       ();
     virtual void    EnableCopyTable         (sal_Bool bFlag=true);
     virtual void    EnableRenameTable       (sal_Bool bFlag=true);
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index d563650..50a51ee 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -45,14 +45,14 @@
 class ScMoveTableDlg : public ModalDialog
 {
 public:
-                    ScMoveTableDlg( Window* pParent, const String& rDefault );
-                    ~ScMoveTableDlg();
+    ScMoveTableDlg(Window* pParent, const rtl::OUString& rDefault);
+    ~ScMoveTableDlg();
 
     sal_uInt16  GetSelectedDocument     () const;
     SCTAB   GetSelectedTable        () const;
     bool    GetCopyTable            () const;
     bool    GetRenameTable          () const;
-    void    GetTabNameString( String& rString ) const;
+    void    GetTabNameString( rtl::OUString& rString ) const;
     void    SetForceCopyTable       ();
     void    EnableCopyTable         (sal_Bool bFlag=true);
     void    EnableRenameTable       (sal_Bool bFlag=true);
@@ -79,13 +79,13 @@ private:
     CancelButton    aBtnCancel;
     HelpButton      aBtnHelp;
 
-    String          maStrTabNameUsed;
-    String          maStrTabNameEmpty;
-    String          maStrTabNameInvalid;
+    rtl::OUString   maStrTabNameUsed;
+    rtl::OUString   maStrTabNameEmpty;
+    rtl::OUString   maStrTabNameInvalid;
 
-    const String&   mrDefaultName;
+    const rtl::OUString maDefaultName;
 
-    sal_uInt16          nDocument;
+    sal_uInt16      nDocument;
     SCTAB           nTable;
     bool            bCopyTable:1;
     bool            bRenameTable:1;
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index e6b3d4f..06beba0 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -271,7 +271,7 @@ public:
     bool                DeleteTables(SCTAB nTab, SCTAB nSheets);
 
     sal_Bool            RenameTable( const String& rName, SCTAB nTabNr );
-    void            MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy, const String* pNewTabName = NULL );
+    void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const rtl::OUString* pNewTabName = NULL );
     void            ImportTables( ScDocShell* pSrcShell,
                                     SCTAB nCount, const SCTAB* pSrcTabs,
                                     sal_Bool bLink,SCTAB nTab);
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 0da0a32..a89cf6f 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -56,8 +56,7 @@
 
 //==================================================================
 
-ScMoveTableDlg::ScMoveTableDlg( Window*       pParent,
-                                const String& rDefault )
+ScMoveTableDlg::ScMoveTableDlg(Window* pParent, const rtl::OUString& rDefault)
 
     :   ModalDialog ( pParent, ScResId( RID_SCDLG_MOVETAB ) ),
         //
@@ -77,11 +76,11 @@ ScMoveTableDlg::ScMoveTableDlg( Window*       pParent,
         aBtnCancel  ( this, ScResId( BTN_CANCEL ) ),
         aBtnHelp    ( this, ScResId( BTN_HELP ) ),
 
-        maStrTabNameUsed( ScResId(STR_TABNAME_WARN_USED) ),
-        maStrTabNameEmpty( ScResId(STR_TABNAME_WARN_EMPTY) ),
-        maStrTabNameInvalid( ScResId(STR_TABNAME_WARN_INVALID) ),
+        maStrTabNameUsed( ResId::toString(ScResId(STR_TABNAME_WARN_USED)) ),
+        maStrTabNameEmpty( ResId::toString(ScResId(STR_TABNAME_WARN_EMPTY)) ),
+        maStrTabNameInvalid( ResId::toString(ScResId(STR_TABNAME_WARN_INVALID)) ),
         //
-        mrDefaultName( rDefault ),
+        maDefaultName( rDefault ),
         nDocument   ( 0 ),
         nTable      ( 0 ),
         bCopyTable  ( false ),
@@ -112,7 +111,7 @@ bool   ScMoveTableDlg::GetCopyTable        () const { return bCopyTable; }
 
 bool   ScMoveTableDlg::GetRenameTable        () const { return bRenameTable; }
 
-void ScMoveTableDlg::GetTabNameString( String& rString ) const
+void ScMoveTableDlg::GetTabNameString( rtl::OUString& rString ) const
 {
     rString = aEdTabName.GetText();
 }
@@ -159,24 +158,24 @@ void ScMoveTableDlg::ResetRenameInput()
         ScDocument* pDoc = GetSelectedDoc();
         if (pDoc)
         {
-            String aStr = mrDefaultName;
+            rtl::OUString aStr = maDefaultName;
             pDoc->CreateValidTabName(aStr);
             aEdTabName.SetText(aStr);
         }
         else
-            aEdTabName.SetText(mrDefaultName);
+            aEdTabName.SetText(maDefaultName);
     }
     else
         // move
-        aEdTabName.SetText(mrDefaultName);
+        aEdTabName.SetText(maDefaultName);
 
     CheckNewTabName();
 }
 
 void ScMoveTableDlg::CheckNewTabName()
 {
-    const String& rNewName = aEdTabName.GetText();
-    if (!rNewName.Len())
+    const rtl::OUString aNewName = aEdTabName.GetText();
+    if (aNewName.isEmpty())
     {
         // New sheet name is empty.  This is not good.
         aFtWarn.SetText(maStrTabNameEmpty);
@@ -185,7 +184,7 @@ void ScMoveTableDlg::CheckNewTabName()
         return;
     }
 
-    if (!ScDocument::ValidTabName(rNewName))
+    if (!ScDocument::ValidTabName(aNewName))
     {
         // New sheet name contains invalid characters.
         aFtWarn.SetText(maStrTabNameInvalid);
@@ -198,11 +197,11 @@ void ScMoveTableDlg::CheckNewTabName()
     sal_uInt16 nLast  = aLbTable.GetEntryCount() - 1;
     for ( sal_uInt16 i=0; i<=nLast; ++i )
     {
-        if ( rNewName == aLbTable.GetEntry( i ) )
+        if ( aNewName.equals(aLbTable.GetEntry(i)) )
         {
-            if( ( aBtnMove.IsChecked() ) &&
-                ( aLbDoc.GetSelectEntryPos() == 0 ) &&
-                ( aEdTabName.GetText() == mrDefaultName) )
+            if (aBtnMove.IsChecked() &&
+                aLbDoc.GetSelectEntryPos() == 0 &&
+                maDefaultName.equals(aEdTabName.GetText()))
 
                 // Move inside same document, thus same name is allowed.
                 bFound = false;
@@ -314,7 +313,7 @@ IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG )
     {
         // Return an empty string when the new name is the same as the
         // automatic name assigned by the document.
-        String aCopyName = mrDefaultName;
+        String aCopyName = maDefaultName;
         ScDocument* pDoc = GetSelectedDoc();
         if (pDoc)
             pDoc->CreateValidTabName(aCopyName);
@@ -325,8 +324,8 @@ IMPL_LINK( ScMoveTableDlg, OkHdl, void *, EMPTYARG )
     {
         // Return an empty string, when the new name is the same as the
         // original name.
-        if( mrDefaultName == aEdTabName.GetText() )
-            aEdTabName.SetText( String() );
+        if (maDefaultName.equals(aEdTabName.GetText()))
+            aEdTabName.SetText(rtl::OUString());
     }
 
     EndDialog( RET_OK );
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 7e4a932..7a11361 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -480,8 +480,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                 sal_uInt16 nDoc = 0;
                 SCTAB nTab = pViewData->GetTabNo();
                 sal_Bool   bCpy = false;
-                String aDocName;
-                String aTabName;
+                rtl::OUString aDocName;
+                rtl::OUString aTabName;
 
                 if( pReqArgs != NULL )
                 {
@@ -500,7 +500,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                     if( IS_AVAILABLE( FN_PARAM_2, &pItem ) )
                         bCpy = ((const SfxBoolItem*)pItem)->GetValue();
 
-                    if( aDocName.Len() )
+                    if (!aDocName.isEmpty())
                     {
                         SfxObjectShell* pSh     = SfxObjectShell::GetFirst();
                         ScDocShell*     pScSh   = NULL;
@@ -514,7 +514,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
                             {
                                 pScSh->GetTitle();
 
-                                if( pScSh->GetTitle() == aDocName )
+                                if (aDocName.equals(pScSh->GetTitle()))
                                 {
                                     nDoc = i;
                                     ScDocument* pDestDoc = pScSh->GetDocument();
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index d38131e..506f148 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2451,7 +2451,8 @@ void ScViewFunc::ImportTables( ScDocShell* pSrcShell,
 //----------------------------------------------------------------------------
 //  Move/Copy table to another document
 
-void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCopy, const String* pNewTabName )
+void ScViewFunc::MoveTable(
+    sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const rtl::OUString* pNewTabName )
 {
     ScDocument* pDoc       = GetViewData()->GetDocument();
     ScDocShell* pDocShell  = GetViewData()->GetDocShell();
@@ -2459,7 +2460,7 @@ void ScViewFunc::MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, sal_Bool bCop
     ScDocShell* pDestShell = NULL;
     ScTabViewShell* pDestViewSh = NULL;
     sal_Bool bUndo (pDoc->IsUndoEnabled());
-    bool bRename = pNewTabName && pNewTabName->Len();
+    bool bRename = pNewTabName && !pNewTabName->isEmpty();
 
     sal_Bool bNewDoc = ( nDestDocNo == SC_DOC_NEW );
     if ( bNewDoc )
commit c6d99ac2e37fac45aa0a33e00232d9f1572b766d
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Mon Aug 29 21:25:37 2011 -0400

    String to rtl::OUString.

diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx
index 826227f..18d15d5 100644
--- a/sc/inc/rangeutl.hxx
+++ b/sc/inc/rangeutl.hxx
@@ -317,6 +317,7 @@ public:
             ScAreaNameIterator( ScDocument* pDoc );
             ~ScAreaNameIterator() {}
 
+    bool Next( rtl::OUString& rName, ScRange& rRange );
     bool Next( String& rName, ScRange& rRange );
     bool WasDBName() const { return !bFirstPass; }
 };
diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx
index d7227b2..5fd98df 100644
--- a/sc/inc/tablink.hxx
+++ b/sc/inc/tablink.hxx
@@ -91,8 +91,8 @@ private:
 
 public:
                         ScDocumentLoader( const String& rFileName,
-                                            String& rFilterName, String& rOptions,
-                                            sal_uInt32 nRekCnt = 0, sal_Bool bWithInteraction = false );
+                                          String& rFilterName, String& rOptions,
+                                          sal_uInt32 nRekCnt = 0, bool bWithInteraction = false );
                         ~ScDocumentLoader();
     ScDocument*         GetDocument();
     ScDocShell*         GetDocShell()       { return pDocShell; }
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 3960de3..e0a00dc 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -1057,6 +1057,16 @@ ScAreaNameIterator::ScAreaNameIterator( ScDocument* pDoc ) :
     }
 }
 
+bool ScAreaNameIterator::Next( rtl::OUString& rName, ScRange& rRange )
+{
+    // Just a wrapper for rtl::OUString for now.  It should replace the method
+    // below eventually.
+    String aTmp;
+    bool bRet = Next(aTmp, rRange);
+    rName = aTmp;
+    return bRet;
+}
+
 bool ScAreaNameIterator::Next( String& rName, ScRange& rRange )
 {
     for (;;)
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index cb82550..9cfd9e8 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -546,7 +546,7 @@ void ScDocumentLoader::RemoveAppPrefix( String& rFilterName )
 
 ScDocumentLoader::ScDocumentLoader( const String& rFileName,
                                     String& rFilterName, String& rOptions,
-                                    sal_uInt32 nRekCnt, sal_Bool bWithInteraction ) :
+                                    sal_uInt32 nRekCnt, bool bWithInteraction ) :
         pDocShell(0),
         pMedium(0)
 {
diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx
index 2a5ab6a..20724fa 100644
--- a/sc/source/ui/inc/linkarea.hxx
+++ b/sc/source/ui/inc/linkarea.hxx
@@ -89,10 +89,10 @@ public:
 
     virtual short   Execute();          // overwritten to set dialog parent
 
-    String          GetURL();
-    String          GetFilter();        // may be empty
-    String          GetOptions();       // filter options
-    String          GetSource();        // separated by ";"
+    rtl::OUString       GetURL();
+    rtl::OUString       GetFilter();        // may be empty
+    rtl::OUString       GetOptions();       // filter options
+    rtl::OUString       GetSource();        // separated by ";"
     sal_uLong           GetRefresh();       // 0 if disabled
 };
 
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index baff237..dd7d129 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -121,27 +121,27 @@ IMPL_LINK( ScLinkedAreaDlg, BrowseHdl, PushButton*, EMPTYARG )
 
 IMPL_LINK( ScLinkedAreaDlg, FileHdl, ComboBox*, EMPTYARG )
 {
-    String aEntered = aCbUrl.GetURL();
+    rtl::OUString aEntered = aCbUrl.GetURL();
     if (pSourceShell)
     {
         SfxMedium* pMed = pSourceShell->GetMedium();
-        if ( pMed->GetName() == aEntered )
+        if ( aEntered.equals(pMed->GetName()) )
         {
             //  already loaded - nothing to do
             return 0;
         }
     }
 
-    String aFilter;
-    String aOptions;
+    rtl::OUString aFilter;
+    rtl::OUString aOptions;
     //  get filter name by looking at the file content (bWithContent = TRUE)
     // Break operation if any error occurred inside.
     if (!ScDocumentLoader::GetFilterName( aEntered, aFilter, aOptions, true, true ))
         return 0;
 
     // #i53241# replace HTML filter with DataQuery filter
-    if( aFilter.EqualsAscii( FILTERNAME_HTML ) )
-        aFilter.AssignAscii( FILTERNAME_QUERY );
+    if (aFilter.equalsAscii(FILTERNAME_HTML))
+        aFilter = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(FILTERNAME_QUERY));
 
     LoadDocument( aEntered, aFilter, aOptions );
 
@@ -169,7 +169,7 @@ void ScLinkedAreaDlg::LoadDocument( const String& rFile, const String& rFilter,
 
         SfxErrorContext aEc( ERRCTX_SFX_OPENDOC, rFile );
 
-        ScDocumentLoader aLoader( rFile, aNewFilter, aNewOptions, 0, sal_True );    // with interaction
+        ScDocumentLoader aLoader( rFile, aNewFilter, aNewOptions, 0, true );    // with interaction
         pSourceShell = aLoader.GetDocShell();
         if ( pSourceShell )
         {
@@ -205,7 +205,7 @@ void ScLinkedAreaDlg::InitFromOldLink( const String& rFile, const String& rFilte
         aLbRanges.SelectEntry( aRange );
     }
 
-    sal_Bool bDoRefresh = ( nRefresh != 0 );
+    bool bDoRefresh = (nRefresh != 0);
     aBtnReload.Check( bDoRefresh );
     if (bDoRefresh)
         aNfDelay.SetValue( nRefresh );
@@ -236,11 +236,11 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
         WaitObject aWait( this );
 
         // replace HTML filter with DataQuery filter
-        const String aHTMLFilterName( RTL_CONSTASCII_USTRINGPARAM( FILTERNAME_HTML ) );
-        const String aWebQFilterName( RTL_CONSTASCII_USTRINGPARAM( FILTERNAME_QUERY ) );
+        const rtl::OUString aHTMLFilterName( RTL_CONSTASCII_USTRINGPARAM( FILTERNAME_HTML ) );
+        const rtl::OUString aWebQFilterName( RTL_CONSTASCII_USTRINGPARAM( FILTERNAME_QUERY ) );
 
         const SfxFilter* pFilter = pMed->GetFilter();
-        if( pFilter && (pFilter->GetFilterName() == aHTMLFilterName) )
+        if (pFilter && aHTMLFilterName.equals(pFilter->GetFilterName()))
         {
             const SfxFilter* pNewFilter =
                 ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName( aWebQFilterName );
@@ -288,19 +288,19 @@ IMPL_LINK( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg
 
 void ScLinkedAreaDlg::UpdateSourceRanges()
 {
-    aLbRanges.SetUpdateMode( false );
+    aLbRanges.SetUpdateMode(false);
 
     aLbRanges.Clear();
     if ( pSourceShell )
     {
         ScAreaNameIterator aIter( pSourceShell->GetDocument() );
         ScRange aDummy;
-        String aName;
+        rtl::OUString aName;
         while ( aIter.Next( aName, aDummy ) )
             aLbRanges.InsertEntry( aName );
     }
 
-    aLbRanges.SetUpdateMode( sal_True );
+    aLbRanges.SetUpdateMode(true);
 
     if ( aLbRanges.GetEntryCount() == 1 )
         aLbRanges.SelectEntryPos(0);
@@ -308,15 +308,15 @@ void ScLinkedAreaDlg::UpdateSourceRanges()
 
 void ScLinkedAreaDlg::UpdateEnable()
 {
-    sal_Bool bEnable = ( pSourceShell && aLbRanges.GetSelectEntryCount() );
+    bool bEnable = ( pSourceShell && aLbRanges.GetSelectEntryCount() );
     aBtnOk.Enable( bEnable );
 
-    sal_Bool bReload = aBtnReload.IsChecked();
+    bool bReload = aBtnReload.IsChecked();
     aNfDelay.Enable( bReload );
     aFtSeconds.Enable( bReload );
 }
 
-String ScLinkedAreaDlg::GetURL()
+rtl::OUString ScLinkedAreaDlg::GetURL()
 {
     if (pSourceShell)
     {
@@ -326,37 +326,37 @@ String ScLinkedAreaDlg::GetURL()
     return EMPTY_STRING;
 }
 
-String ScLinkedAreaDlg::GetFilter()
+rtl::OUString ScLinkedAreaDlg::GetFilter()
 {
     if (pSourceShell)
     {
         SfxMedium* pMed = pSourceShell->GetMedium();
         return pMed->GetFilter()->GetFilterName();
     }
-    return EMPTY_STRING;
+    return rtl::OUString();
 }
 
-String ScLinkedAreaDlg::GetOptions()
+rtl::OUString ScLinkedAreaDlg::GetOptions()
 {
     if (pSourceShell)
     {
         SfxMedium* pMed = pSourceShell->GetMedium();
         return ScDocumentLoader::GetOptions( *pMed );
     }
-    return EMPTY_STRING;
+    return rtl::OUString();
 }
 
-String ScLinkedAreaDlg::GetSource()
+rtl::OUString ScLinkedAreaDlg::GetSource()
 {
-    String aSource;
+    rtl::OUStringBuffer aBuf;
     sal_uInt16 nCount = aLbRanges.GetSelectEntryCount();
     for (sal_uInt16 i=0; i<nCount; i++)
     {
         if (i > 0)
-            aSource.Append( (sal_Unicode) ';' );
-        aSource.Append( aLbRanges.GetSelectEntry( i ) );
+            aBuf.append(sal_Unicode(';'));
+        aBuf.append(aLbRanges.GetSelectEntry(i));
     }
-    return aSource;
+    return aBuf.makeStringAndClear();
 }
 
 sal_uLong ScLinkedAreaDlg::GetRefresh()


More information about the Libreoffice-commits mailing list