[Libreoffice-commits] core.git: sw/inc sw/source
Matteo Casalin
matteo.casalin at yahoo.com
Sat Aug 17 05:52:01 PDT 2013
sw/inc/section.hxx | 50 ++++++++++++++++-----------------
sw/source/core/doc/doc.cxx | 4 +-
sw/source/core/doc/docdde.cxx | 2 -
sw/source/core/doc/docfld.cxx | 2 -
sw/source/core/docnode/ndsect.cxx | 9 +++--
sw/source/core/docnode/section.cxx | 56 ++++++++++++++++++-------------------
sw/source/core/undo/unsect.cxx | 4 +-
sw/source/core/unocore/unosect.cxx | 6 +--
sw/source/ui/dialog/uiregionsw.cxx | 5 +--
sw/source/ui/utlui/glbltree.cxx | 11 +++----
10 files changed, 75 insertions(+), 74 deletions(-)
New commits:
commit 9a39102cee15d0855ae141b08cd785beebee06a0
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Thu Aug 15 16:08:35 2013 +0200
String to OUString
Change-Id: Id34e02af55a5e8a6e25ad30fb112d82d1b8166c5
Reviewed-on: https://gerrit.libreoffice.org/5440
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 0aea68b..8f3005e 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _SECTION_HXX
-#define _SECTION_HXX
+#ifndef SECTION_HXX
+#define SECTION_HXX
#include <boost/utility.hpp>
@@ -71,10 +71,10 @@ class SW_DLLPUBLIC SwSectionData
private:
SectionType m_eType;
- String m_sSectionName;
- String m_sCondition;
- String m_sLinkFileName;
- String m_sLinkFilePassword; // Must be changed to Sequence.
+ OUString m_sSectionName;
+ OUString m_sCondition;
+ OUString m_sLinkFileName;
+ OUString m_sLinkFilePassword; // Must be changed to Sequence.
::com::sun::star::uno::Sequence <sal_Int8> m_Password;
/// It seems this flag caches the current final "hidden" state.
@@ -93,14 +93,14 @@ private:
public:
- SwSectionData(SectionType const eType, String const& rName);
+ SwSectionData(SectionType const eType, OUString const& rName);
explicit SwSectionData(SwSection const&);
SwSectionData(SwSectionData const&);
SwSectionData & operator=(SwSectionData const&);
bool operator==(SwSectionData const&) const;
- String const& GetSectionName() const { return m_sSectionName; }
- void SetSectionName(String const& rName){ m_sSectionName = rName; }
+ OUString GetSectionName() const { return m_sSectionName; }
+ void SetSectionName(OUString const& rName){ m_sSectionName = rName; }
SectionType GetType() const { return m_eType; }
void SetType(SectionType const eNew) { m_eType = eNew; }
@@ -117,21 +117,21 @@ public:
void SetEditInReadonlyFlag(bool const bFlag)
{ m_bEditInReadonlyFlag = bFlag; }
- void SetCondHidden(bool const bFlag = true) { m_bCondHiddenFlag = bFlag; };
+ void SetCondHidden(bool const bFlag = true) { m_bCondHiddenFlag = bFlag; }
bool IsCondHidden() const { return m_bCondHiddenFlag; }
- String const& GetCondition() const { return m_sCondition; }
- void SetCondition(String const& rNew) { m_sCondition = rNew; }
+ OUString GetCondition() const { return m_sCondition; }
+ void SetCondition(OUString const& rNew) { m_sCondition = rNew; }
- String const& GetLinkFileName() const { return m_sLinkFileName; };
- void SetLinkFileName(String const& rNew, String const* pPassWd = 0)
+ OUString GetLinkFileName() const { return m_sLinkFileName; }
+ void SetLinkFileName(OUString const& rNew, OUString const* pPassWd = 0)
{
m_sLinkFileName = rNew;
if (pPassWd) { SetLinkFilePassword(*pPassWd); }
}
- String const& GetLinkFilePassword() const { return m_sLinkFilePassword; }
- void SetLinkFilePassword(String const& rS) { m_sLinkFilePassword = rS; }
+ OUString GetLinkFilePassword() const { return m_sLinkFilePassword; }
+ void SetLinkFilePassword(OUString const& rS){ m_sLinkFilePassword = rS; }
::com::sun::star::uno::Sequence<sal_Int8> const& GetPassword() const
{ return m_Password; }
@@ -169,7 +169,7 @@ protected:
public:
TYPEINFO(); // rtti
- SwSection(SectionType const eType, String const& rName,
+ SwSection(SectionType const eType, OUString const& rName,
SwSectionFmt & rFormat);
virtual ~SwSection();
@@ -177,8 +177,8 @@ public:
void SetSectionData(SwSectionData const& rData);
- String const& GetSectionName() const { return m_Data.GetSectionName(); }
- void SetSectionName(String const& rName){ m_Data.SetSectionName(rName); }
+ OUString GetSectionName() const { return m_Data.GetSectionName(); }
+ void SetSectionName(OUString const& rName){ m_Data.SetSectionName(rName); }
SectionType GetType() const { return m_Data.GetType(); }
void SetType(SectionType const eType) { return m_Data.SetType(eType); }
@@ -208,15 +208,15 @@ public:
inline SwSection* GetParent() const;
- String const& GetCondition() const { return m_Data.GetCondition(); }
- void SetCondition(String const& rNew) { m_Data.SetCondition(rNew); }
+ OUString GetCondition() const { return m_Data.GetCondition(); }
+ void SetCondition(OUString const& rNew) { m_Data.SetCondition(rNew); }
- const String& GetLinkFileName() const;
- void SetLinkFileName(String const& rNew, String const*const pPassWd = 0);
+ OUString GetLinkFileName() const;
+ void SetLinkFileName(OUString const& rNew, OUString const*const pPassWd = 0);
// Password of linked file (only valid during runtime!)
- String const& GetLinkFilePassword() const
+ OUString GetLinkFilePassword() const
{ return m_Data.GetLinkFilePassword(); }
- void SetLinkFilePassword(String const& rS)
+ void SetLinkFilePassword(OUString const& rS)
{ m_Data.SetLinkFilePassword(rS); }
// Get / set password of this section
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index d66c9e3..1bdf34f 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -2251,10 +2251,10 @@ bool SwDoc::RemoveInvisibleContent()
if (it == aSectFmts.end())
aSectFmts.insert( aSectFmts.begin(), pSect->GetFmt() );
}
- if( pSect->GetCondition().Len() )
+ if( !pSect->GetCondition().isEmpty() )
{
SwSectionData aSectionData( *pSect );
- aSectionData.SetCondition( aEmptyStr );
+ aSectionData.SetCondition( OUString() );
aSectionData.SetHidden( false );
UpdateSection( n, aSectionData );
}
diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx
index 6cd9667..d1863d8 100644
--- a/sw/source/core/doc/docdde.cxx
+++ b/sw/source/core/doc/docdde.cxx
@@ -83,7 +83,7 @@ static bool lcl_FindSection( const SwSectionFmt* pSectFmt, _FindItem * const pIt
{
String sNm( (bCaseSensitive)
? pSect->GetSectionName()
- : String(GetAppCharClass().lowercase( pSect->GetSectionName() )));
+ : GetAppCharClass().lowercase( pSect->GetSectionName() ));
String sCompare( (bCaseSensitive)
? pItem->m_Item
: String(GetAppCharClass().lowercase( pItem->m_Item ) ));
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index fbddc24..4a7cf24 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -2225,7 +2225,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
for (sal_uInt16 n = rArr.size(); n; )
{
SwSection* pSect = rArr[ --n ]->GetSection();
- if( pSect && pSect->IsHidden() && pSect->GetCondition().Len() &&
+ if( pSect && pSect->IsHidden() && !pSect->GetCondition().isEmpty() &&
0 != ( pSectNd = pSect->GetFmt()->GetSectionNode() ))
{
sal_uLong nIdx = pSectNd->GetIndex();
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index a071de5..5aaf2d1 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -332,7 +332,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
}
// Is a Condition set?
- if (rNewData.IsHidden() && rNewData.GetCondition().Len())
+ if (rNewData.IsHidden() && !rNewData.GetCondition().isEmpty())
{
// The calculate up to that position
SwCalc aCalc( *this );
@@ -683,7 +683,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
sCompareString += sfx2::cTokenSeparator;
const bool bUpdate =
(!pSection->IsLinkType() && rNewData.IsLinkType())
- || (rNewData.GetLinkFileName().Len()
+ || (!rNewData.GetLinkFileName().isEmpty()
&& (rNewData.GetLinkFileName() != sCompareString)
&& (rNewData.GetLinkFileName() != pSection->GetLinkFileName()));
@@ -710,7 +710,7 @@ void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData,
}
// Is a Condition set
- if( pSection->IsHidden() && pSection->GetCondition().Len() )
+ if( pSection->IsHidden() && !pSection->GetCondition().isEmpty() )
{
// Then calculate up to that position
SwCalc aCalc( *this );
@@ -1259,8 +1259,9 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) c
}
else
{
+ const String sSectionName(GetSection().GetSectionName());
pNewSect->SetSectionName(
- pDoc->GetUniqueSectionName( &GetSection().GetSectionName() ));
+ pDoc->GetUniqueSectionName( &sSectionName ));
}
}
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index bc22f90..6b4163f 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -64,8 +64,6 @@ using namespace ::com::sun::star;
SV_IMPL_REF( SwServerObject )
-#define sSectionFmtNm aEmptyStr
-
class SwIntrnlSectRefLink : public SwBaseLink
{
SwSectionFmt& rSectFmt;
@@ -95,7 +93,7 @@ TYPEINIT1(SwSectionFmt,SwFrmFmt );
TYPEINIT1(SwSection,SwClient );
-SwSectionData::SwSectionData(SectionType const eType, String const& rName)
+SwSectionData::SwSectionData(SectionType const eType, OUString const& rName)
: m_eType(eType)
, m_sSectionName(rName)
, m_bHiddenFlag(false)
@@ -200,7 +198,7 @@ OUString SwSectionData::CollapseWhiteSpaces(const OUString sName)
// SwSection ===========================================================
SwSection::SwSection(
- SectionType const eType, String const& rName, SwSectionFmt & rFormat)
+ SectionType const eType, OUString const& rName, SwSectionFmt & rFormat)
: SwClient(& rFormat)
, m_Data(eType, rName)
{
@@ -558,11 +556,11 @@ void SwSection::SetCondHidden(bool const bFlag)
// Set/remove the linked FileName
-const String& SwSection::GetLinkFileName() const
+OUString SwSection::GetLinkFileName() const
{
if (m_RefLink.Is())
{
- String sTmp;
+ OUString sTmp;
switch (m_Data.GetType())
{
case DDE_LINK_SECTION:
@@ -571,13 +569,14 @@ const String& SwSection::GetLinkFileName() const
case FILE_LINK_SECTION:
{
- String sRange, sFilter;
+ OUString sRange;
+ OUString sFilter;
if (m_RefLink->GetLinkManager() &&
m_RefLink->GetLinkManager()->GetDisplayNames(
m_RefLink, 0, &sTmp, &sRange, &sFilter ))
{
- ( sTmp += sfx2::cTokenSeparator ) += sFilter;
- ( sTmp += sfx2::cTokenSeparator ) += sRange;
+ sTmp += OUString(sfx2::cTokenSeparator) + sFilter
+ + OUString(sfx2::cTokenSeparator) + sRange;
}
else if( GetFmt() && !GetFmt()->GetSectionNode() )
{
@@ -596,7 +595,7 @@ const String& SwSection::GetLinkFileName() const
}
-void SwSection::SetLinkFileName(const String& rNew, String const*const pPassWd)
+void SwSection::SetLinkFileName(const OUString& rNew, OUString const*const pPassWd)
{
if (m_RefLink.Is())
{
@@ -646,7 +645,7 @@ const SwTOXBase* SwSection::GetTOXBase() const
// SwSectionFmt ========================================================
SwSectionFmt::SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc )
- : SwFrmFmt( pDoc->GetAttrPool(), sSectionFmtNm, pDrvdFrm )
+ : SwFrmFmt( pDoc->GetAttrPool(), OUString(), pDrvdFrm )
{
LockModify();
SetFmtAttr( *GetDfltAttr( RES_COL ) );
@@ -912,9 +911,7 @@ static bool lcl_SectionCmpPos( const SwSection *pFirst, const SwSection *pSecond
static bool lcl_SectionCmpNm( const SwSection *pFSect, const SwSection *pSSect)
{
OSL_ENSURE( pFSect && pSSect, "Invalid Sections" );
- StringCompare const eCmp =
- pFSect->GetSectionName().CompareTo( pSSect->GetSectionName() );
- return eCmp == COMPARE_LESS;
+ return pFSect->GetSectionName() < pSSect->GetSectionName();
}
// Alle Sections which have been derived from this one
@@ -1152,11 +1149,11 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
if( !pDShell || !pDShell->GetMedium() )
return ;
- String sName( pDShell->GetMedium()->GetName() );
+ const OUString sName( pDShell->GetMedium()->GetName() );
SwBaseLink* pBLink;
- String sMimeType( SotExchange::GetFormatMimeType( FORMAT_FILE ));
+ const OUString sMimeType( SotExchange::GetFormatMimeType( FORMAT_FILE ));
uno::Any aValue;
- aValue <<= OUString( sName ); // Arbitrary name
+ aValue <<= sName; // Arbitrary name
const ::sfx2::SvBaseLinks& rLnks = pDoc->GetLinkManager().GetLinks();
for( sal_uInt16 n = rLnks.size(); n; )
@@ -1169,7 +1166,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
rSectNd.EndOfSectionIndex() ) )
{
// It's in the Section, so update. But only if it's not in the same File!
- String sFName;
+ OUString sFName;
pDoc->GetLinkManager().GetDisplayNames( pBLink, 0, &sFName, 0, 0 );
if( sFName != sName )
{
@@ -1254,7 +1251,6 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
SwSection& rSection = pSectNd->GetSection();
rSection.SetConnectFlag(false);
- OUString sNewFileName;
Reader* pRead = 0;
switch( nDataFormat )
{
@@ -1267,9 +1263,13 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
break;
case FORMAT_FILE:
- if( rValue.hasValue() && ( rValue >>= sNewFileName ) )
+ if ( rValue.hasValue() )
{
- String sFilter, sRange, sFileName( sNewFileName );
+ OUString sFileName;
+ if ( !(rValue >>= sFileName) )
+ break;
+ OUString sFilter;
+ OUString sRange;
pDoc->GetLinkManager().GetDisplayNames( this, 0, &sFileName,
&sRange, &sFilter );
@@ -1277,7 +1277,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
SfxObjectShellRef xDocSh;
SfxObjectShellLock xLockRef;
int nRet;
- if( !sFileName.Len() )
+ if( sFileName.isEmpty() )
{
xDocSh = pDoc->GetDocShell();
nRet = 1;
@@ -1303,7 +1303,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
SwNodeRange* pCpyRg = 0;
if( xDocSh->GetMedium() &&
- !rSection.GetLinkFilePassword().Len() )
+ rSection.GetLinkFilePassword().isEmpty() )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == xDocSh->GetMedium()->GetItemSet()->
@@ -1314,7 +1314,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
SwDoc* pSrcDoc = ((SwDocShell*)&xDocSh)->GetDoc();
- if( sRange.Len() )
+ if( !sRange.isEmpty() )
{
// Catch recursion
bool bRecursion = false;
@@ -1426,7 +1426,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
aStrm.Seek( 0 );
// TODO/MBA: it's impossible to set a BaseURL here!
- SwReader aTmpReader( aStrm, aEmptyStr, pDoc->GetDocShell()->GetMedium()->GetBaseURL(), *pPam );
+ SwReader aTmpReader( aStrm, OUString(), pDoc->GetDocShell()->GetMedium()->GetBaseURL(), *pPam );
if( !IsError( aTmpReader.Read( *pRead ) ))
{
@@ -1481,7 +1481,7 @@ void SwIntrnlSectRefLink::Closed()
SwSectionData aSectionData(*rSectFmt.GetSection());
aSectionData.SetType( CONTENT_SECTION );
- aSectionData.SetLinkFileName( aEmptyStr );
+ aSectionData.SetLinkFileName( OUString() );
aSectionData.SetHidden( false );
aSectionData.SetProtectFlag( false );
// edit in readonly sections
@@ -1595,8 +1595,8 @@ void SwSection::BreakLink()
// change type
SetType( CONTENT_SECTION );
// reset linked file data
- SetLinkFileName( aEmptyStr );
- SetLinkFilePassword( aEmptyStr );
+ SetLinkFileName( OUString() );
+ SetLinkFilePassword( OUString() );
}
const SwNode* SwIntrnlSectRefLink::GetAnchor() const
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index 79e069f..f9580d9 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -360,7 +360,7 @@ void SwUndoDelSection::UndoImpl(::sw::UndoRedoContext & rContext)
/// frames, if the hidden condition flag changes.
SwSection& aInsertedSect = pInsertedSectNd->GetSection();
if ( aInsertedSect.IsHidden() &&
- aInsertedSect.GetCondition().Len() > 0 )
+ !aInsertedSect.GetCondition().isEmpty() )
{
SwCalc aCalc( rDoc );
rDoc.FldsToCalc(aCalc, pInsertedSectNd->GetIndex(), USHRT_MAX);
@@ -467,7 +467,7 @@ void SwUndoUpdateSection::UndoImpl(::sw::UndoRedoContext & rContext)
{
const bool bUpdate =
(!rNdSect.IsLinkType() && m_pSectionData->IsLinkType())
- || ( m_pSectionData->GetLinkFileName().Len()
+ || ( !m_pSectionData->GetLinkFileName().isEmpty()
&& (m_pSectionData->GetLinkFileName() !=
rNdSect.GetLinkFileName()));
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 88e5f0d..1ca8cbd 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -698,7 +698,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
sFileNameBuf.append(aLink.FilterName);
sFileNameBuf.append(sfx2::cTokenSeparator);
sFileNameBuf.append(
- pSectionData->GetLinkFileName().GetToken(2,
+ pSectionData->GetLinkFileName().getToken(2,
sfx2::cTokenSeparator));
const OUString sFileName(
sFileNameBuf.makeStringAndClear());
@@ -770,7 +770,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
else
{
- if (pSectionData->GetCondition().Len() != 0)
+ if (!pSectionData->GetCondition().isEmpty())
{
pSectionData->SetCondHidden(!bVal);
}
@@ -1066,7 +1066,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
}
else if (FILE_LINK_SECTION == pSect->GetType())
{
- sRet = pSect->GetLinkFileName().GetToken(2,
+ sRet = pSect->GetLinkFileName().getToken(2,
sfx2::cTokenSeparator);
}
pRet[nProperty] <<= sRet;
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index b3a3b4d..e456ee4 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -193,7 +193,7 @@ SectRepr::SectRepr( sal_uInt16 nPos, SwSection& rSect )
, m_FrmDirItem( FRMDIR_ENVIRONMENT, RES_FRAMEDIR )
, m_LRSpaceItem( RES_LR_SPACE )
, m_nArrPos(nPos)
- , m_bContent(m_SectionData.GetLinkFileName().Len() == 0)
+ , m_bContent(m_SectionData.GetLinkFileName().isEmpty())
, m_bSelected(false)
{
SwSectionFmt *pFmt = rSect.GetFmt();
@@ -1601,8 +1601,9 @@ void SwInsertSectionTabPage::SetWrtShell(SwWrtShell& rSh)
->GetSectionData();
if (pSectionData) // something set?
{
+ const String sSectionName(pSectionData->GetSectionName());
m_pCurName->SetText(
- rSh.GetUniqueSectionName(& pSectionData->GetSectionName()));
+ rSh.GetUniqueSectionName(&sSectionName));
m_pProtectCB->Check( 0 != pSectionData->IsProtectFlag() );
m_sFileName = pSectionData->GetLinkFileName();
m_sFilePasswd = pSectionData->GetLinkFilePassword();
diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx
index 4879f54..a0a0d20 100644
--- a/sw/source/ui/utlui/glbltree.cxx
+++ b/sw/source/ui/utlui/glbltree.cxx
@@ -467,7 +467,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt )
if (pItem && SV_ITEM_ID_LBOXSTRING == pItem->GetType())
{
const SwSection* pSect = pCont->GetSection();
- String sEntry = pSect->GetLinkFileName().GetToken(0, sfx2::cTokenSeparator);
+ String sEntry = pSect->GetLinkFileName().getToken(0, sfx2::cTokenSeparator);
if(!pSect->IsConnectFlag())
sEntry.Insert(aContextStrings[ST_BROKEN_LINK - ST_GLOBAL_CONTEXT_FIRST], 0 );
Point aEntryPos = GetEntryPosition( pEntry );
@@ -1156,14 +1156,14 @@ sal_Bool SwGlobalTree::Update(sal_Bool bHard)
void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
{
- String sFileName(pCont->GetSection()->GetLinkFileName().GetToken(0,
+ const OUString sFileName(pCont->GetSection()->GetLinkFileName().getToken(0,
sfx2::cTokenSeparator));
bool bFound = false;
const SfxObjectShell* pCurr = SfxObjectShell::GetFirst();
while( !bFound && pCurr )
{
if(pCurr->GetMedium() &&
- String(pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI)) == sFileName)
+ pCurr->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI) == sFileName)
{
bFound = true;
SwGlobalTree::SetShowShell(pCurr);
@@ -1176,10 +1176,9 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont)
}
if(!bFound)
{
- SfxStringItem aURL(SID_FILE_NAME,
- sFileName);
+ SfxStringItem aURL(SID_FILE_NAME, sFileName);
SfxBoolItem aReadOnly(SID_DOC_READONLY, sal_False);
- SfxStringItem aTargetFrameName( SID_TARGETNAME, OUString("_blank") );
+ SfxStringItem aTargetFrameName( SID_TARGETNAME, "_blank" );
SfxStringItem aReferer(SID_REFERER, pActiveShell->GetView().GetDocShell()->GetTitle());
pActiveShell->GetView().GetViewFrame()->GetDispatcher()->
Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON,
More information about the Libreoffice-commits
mailing list