summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-08-17 13:47:15 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-08-19 14:24:58 +0000
commitb862b8d5757cd031f361e5960dff8b149d16b615 (patch)
treeb0b0e3e32fc07913bc07b853e0c0bdcb9673a163 /sw
parentedba90dc39fc3141a8a9e441aa97b46baa4c6ca2 (diff)
String to OUString
Change-Id: Ib028b0846fca69ae678ff02d551eb369a59bc129 Reviewed-on: https://gerrit.libreoffice.org/5475 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/ndole.hxx12
-rw-r--r--sw/source/core/ole/ndole.cxx16
-rw-r--r--sw/source/core/unocore/unochart.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx2
-rw-r--r--sw/source/filter/xml/xmltexte.cxx2
5 files changed, 17 insertions, 17 deletions
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 8c65ae435800..650b1b8d2cb9 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -73,12 +73,12 @@ class SW_DLLPUBLIC SwOLENode: public SwNoTxtNode
friend class SwNodes;
mutable SwOLEObj aOLEObj;
Graphic* pGraphic;
- String sChartTblName; ///< with chart objects: name of referenced table.
+ OUString sChartTblName; ///< with chart objects: name of referenced table.
sal_Bool bOLESizeInvalid; /**< Should be considered at SwDoc::PrtOLENotify
(e.g. copied). Is not persistent. */
SwEmbedObjectLink* mpObjectLink;
- String maLinkURL;
+ OUString maLinkURL;
SwOLENode( const SwNodeIndex &rWhere,
const svt::EmbeddedObjectRef&,
@@ -86,7 +86,7 @@ class SW_DLLPUBLIC SwOLENode: public SwNoTxtNode
SwAttrSet* pAutoAttr = 0 );
SwOLENode( const SwNodeIndex &rWhere,
- const String &rName,
+ const OUString &rName,
sal_Int64 nAspect,
SwGrfFmtColl *pGrfColl,
SwAttrSet* pAutoAttr = 0 );
@@ -126,7 +126,7 @@ public:
/** Remove OLE-object from "memory".
inline void Unload() { aOLEObj.Unload(); } */
- String GetDescription() const { return aOLEObj.GetDescription(); }
+ OUString GetDescription() const { return aOLEObj.GetDescription(); }
sal_Bool UpdateLinkURL_Impl();
void BreakFileLink_Impl();
@@ -137,8 +137,8 @@ public:
// #i99665#
bool IsChart() const;
- const String& GetChartTblName() const { return sChartTblName; }
- void SetChartTblName( const String& rNm ) { sChartTblName = rNm; }
+ OUString GetChartTblName() const { return sChartTblName; }
+ void SetChartTblName( const OUString& rNm ) { sChartTblName = rNm; }
};
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 432037b27673..93bd4dd2c8f3 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -243,7 +243,7 @@ SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
}
SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
- const String &rString,
+ const OUString &rString,
sal_Int64 nAspect,
SwGrfFmtColl *pGrfColl,
SwAttrSet* pAutoAttr ) :
@@ -359,7 +359,7 @@ sal_Bool SwOLENode::SavePersistentData()
bChartWithInternalProvider = sal_True;
}
- if ( IsChart() && sChartTblName.Len() && !bChartWithInternalProvider )
+ if ( IsChart() && !sChartTblName.isEmpty() && !bChartWithInternalProvider )
bKeepObjectToTempStorage = sal_False;
pCnt->RemoveEmbeddedObject( aOLEObj.aName, sal_False, bKeepObjectToTempStorage );
// modify end
@@ -535,9 +535,9 @@ sal_Bool SwOLENode::UpdateLinkURL_Impl()
if ( mpObjectLink )
{
- String aNewLinkURL;
+ OUString aNewLinkURL;
GetDoc()->GetLinkManager().GetDisplayNames( mpObjectLink, 0, &aNewLinkURL, 0, 0 );
- if ( !aNewLinkURL.EqualsIgnoreCaseAscii( maLinkURL ) )
+ if ( !aNewLinkURL.equalsIgnoreAsciiCase( maLinkURL ) )
{
if ( !aOLEObj.xOLERef.is() )
aOLEObj.GetOleRef();
@@ -556,7 +556,7 @@ sal_Bool SwOLENode::UpdateLinkURL_Impl()
// TODO/LATER: there should be possible to get current mediadescriptor settings from the object
uno::Sequence< beans::PropertyValue > aArgs( 1 );
aArgs[0].Name = OUString( "URL" );
- aArgs[0].Value <<= OUString( aNewLinkURL );
+ aArgs[0].Value <<= aNewLinkURL;
xPersObj->reload( aArgs, uno::Sequence< beans::PropertyValue >() );
maLinkURL = aNewLinkURL;
@@ -593,7 +593,7 @@ void SwOLENode::BreakFileLink_Impl()
uno::Reference< embed::XLinkageSupport > xLinkSupport( aOLEObj.GetOleRef(), uno::UNO_QUERY_THROW );
xLinkSupport->breakLink( xStorage, aOLEObj.GetCurrentPersistName() );
DisconnectFileLink_Impl();
- maLinkURL = String();
+ maLinkURL = OUString();
}
catch( uno::Exception& )
{
@@ -620,8 +620,8 @@ void SwOLENode::CheckFileLink_Impl()
uno::Reference< embed::XLinkageSupport > xLinkSupport( aOLEObj.xOLERef.GetObject(), uno::UNO_QUERY_THROW );
if ( xLinkSupport->isLink() )
{
- String aLinkURL = xLinkSupport->getLinkURL();
- if ( aLinkURL.Len() )
+ const OUString aLinkURL = xLinkSupport->getLinkURL();
+ if ( !aLinkURL.isEmpty() )
{
// this is a file link so the model link manager should handle it
mpObjectLink = new SwEmbedObjectLink( this );
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index d3b1feb15ee3..34d276621234 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -153,7 +153,7 @@ void SwChartLockController_Helper::LockUnlockAllCharts( sal_Bool bLock )
{
++aIdx;
if (0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
- pONd->GetChartTblName().Len() > 0 /* is chart object? */)
+ !pONd->GetChartTblName().isEmpty() /* is chart object? */)
{
uno::Reference < embed::XEmbeddedObject > xIP = pONd->GetOLEObj().GetOleRef();
if ( svt::EmbeddedObjectRef::TryRunningState( xIP ) )
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 6ea9e7c2a270..5e2fd606217d 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -615,7 +615,7 @@ sal_Bool ViewShell::HasCharts() const
{
++aIdx;
const SwOLENode *pNd = aIdx.GetNode().GetOLENode();
- if( pNd && pNd->GetChartTblName().Len() )
+ if( pNd && !pNd->GetChartTblName().isEmpty() )
{
bRet = sal_True;
break;
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 21feeab42d4b..fcc1373aebcb 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -502,7 +502,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
sURL = GetExport().AddEmbeddedObject( sURL );
lcl_addURL( rXMLExport, sURL, false );
}
- if( SV_EMBEDDED_OWN == nType && pOLENd->GetChartTblName().Len() )
+ if( SV_EMBEDDED_OWN == nType && !pOLENd->GetChartTblName().isEmpty() )
{
OUString sRange( pOLENd->GetChartTblName() );
OUStringBuffer aBuffer( sRange.getLength() + 2 );