diff options
author | Noel Grandin <noel@peralex.com> | 2013-08-08 13:59:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-08-15 09:11:32 +0200 |
commit | 60dddd2012b759397c8ddd008f7d4bf65867e7a4 (patch) | |
tree | 80b6161b952f9d5cf6fd05080a390e22ca38916f /sw | |
parent | 90ed68e732b5ae644f865d40129b34745a1bc426 (diff) |
convert include/svtools/transfer.hxx from String to OUString
Change-Id: Ie80c29a73db295ccc8fe975f8fe7027b9a1eb79a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/dochdl/swdtflvr.cxx | 42 | ||||
-rw-r--r-- | sw/source/ui/inc/swdtflvr.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/utlui/content.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/utlui/navipi.cxx | 4 |
4 files changed, 29 insertions, 29 deletions
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index b92f5e059715..ef9f0a16b7c2 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -1417,13 +1417,13 @@ int SwTransferable::PasteData( TransferableDataHelper& rData, case EXCHG_OUT_ACTION_INSERT_HYPERLINK: { - String sURL, sDesc; + OUString sURL, sDesc; if( SOT_FORMAT_FILE == nFormat ) { - if( rData.GetString( nFormat, sURL ) && sURL.Len() ) + if( rData.GetString( nFormat, sURL ) && !sURL.isEmpty() ) { SwTransferable::_CheckForURLOrLNKFile( rData, sURL, &sDesc ); - if( !sDesc.Len() ) + if( sDesc.isEmpty() ) sDesc = sURL; nRet = 1; } @@ -1911,7 +1911,7 @@ int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData, { if( aINetImg.GetImageURL().Len() && bInsertGRF ) { - String sURL( aINetImg.GetImageURL() ); + OUString sURL( aINetImg.GetImageURL() ); SwTransferable::_CheckForURLOrLNKFile( rData, sURL ); //!!! check at FileSystem - only then it make sense to test graphics !!! @@ -2106,7 +2106,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData, SwDDEFieldType* pDDETyp = (SwDDEFieldType*)pTyp; - String aExpand; + OUString aExpand; if( rData.GetString( FORMAT_STRING, aExpand )) { do { // middle checked loop @@ -2114,7 +2114,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& rData, // When data comes from a spreadsheet, we add a DDE-table if( ( rData.HasFormat( SOT_FORMATSTR_ID_SYLK ) || rData.HasFormat( SOT_FORMATSTR_ID_SYLK_BIGCAPS ) ) && - aExpand.Len() && + !aExpand.isEmpty() && ( 1 < comphelper::string::getTokenCount(aExpand, '\n') || comphelper::string::getTokenCount(aExpand, '\t') ) ) { @@ -2248,10 +2248,10 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh, case SOT_FORMAT_FILE: { - String sTxt; + OUString sTxt; if( 0 != ( nRet = rData.GetString( nFmt, sTxt ) ) ) { - String sDesc; + OUString sDesc; SwTransferable::_CheckForURLOrLNKFile( rData, sTxt, &sDesc ); aBkmk = INetBookmark( @@ -2417,10 +2417,10 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, SwWrtShell& rSh, sal_uLong nFmt ) { int nRet = 0; - String sFile; - if( rData.GetString( nFmt, sFile ) && sFile.Len() ) + OUString sFile; + if( rData.GetString( nFmt, sFile ) && !sFile.isEmpty() ) { - String sDesc; + OUString sDesc; SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc ); // first, make the URL absolute @@ -2449,7 +2449,7 @@ int SwTransferable::_PasteAsHyperlink( TransferableDataHelper& rData, default: { rSh.InsertURL( SwFmtINetFmt( sFile, OUString() ), - sDesc.Len() ? sDesc : sFile ); + sDesc.isEmpty() ? sFile : sDesc); } } nRet = sal_True; @@ -2468,8 +2468,8 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData, nRet |= SWTRANSFER_GRAPHIC_INSERTED; if( !nRet ) { - String sFile, sDesc; - if( rData.GetString( nFmt, sFile ) && sFile.Len() ) + OUString sFile, sDesc; + if( rData.GetString( nFmt, sFile ) && !sFile.isEmpty() ) { INetURLObject aMediaURL; @@ -2536,7 +2536,7 @@ int SwTransferable::_PasteFileName( TransferableDataHelper& rData, default: { rSh.InsertURL( SwFmtINetFmt( sFile, OUString() ), - sDesc.Len() ? sDesc : sFile ); + sDesc.isEmpty() ? sFile : sDesc ); } } nRet = sal_True; @@ -2552,8 +2552,8 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& rData, const Point* pDragPt, sal_Bool bMsg ) { int nRet = 0; - String sTxt; - if( rData.GetString( nFmt, sTxt ) && sTxt.Len() ) + OUString sTxt; + if( rData.GetString( nFmt, sTxt ) && !sTxt.isEmpty() ) { sal_uInt16 nWh = SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE == nFmt ? 0 @@ -2690,7 +2690,7 @@ int SwTransferable::_PasteFileList( TransferableDataHelper& rData, } sal_Bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData, - String& rFileName, String* pTitle ) + OUString& rFileName, OUString* pTitle ) { sal_Bool bIsURLFile = sal_False; INetBookmark aBkmk; @@ -2703,10 +2703,10 @@ sal_Bool SwTransferable::_CheckForURLOrLNKFile( TransferableDataHelper& rData, } else { - xub_StrLen nLen = rFileName.Len(); - if( 4 < nLen && '.' == rFileName.GetChar( nLen - 4 )) + sal_Int32 nLen = rFileName.getLength(); + if( 4 < nLen && '.' == rFileName[ nLen - 4 ]) { - String sExt( rFileName.Copy( nLen - 3 )); + String sExt( rFileName.copy( nLen - 3 )); if( sExt.EqualsIgnoreCaseAscii( "url" )) { OSL_ENSURE( !&rFileName, "how do we read today .URL - Files?" ); diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx index ad9d369d5128..89ea0ad53d55 100644 --- a/sw/source/ui/inc/swdtflvr.hxx +++ b/sw/source/ui/inc/swdtflvr.hxx @@ -85,7 +85,7 @@ class SwTransferable : public TransferableHelper static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData ); static void SetSelInShell( SwWrtShell& , sal_Bool , const Point* ); static sal_Bool _CheckForURLOrLNKFile( TransferableDataHelper& rData, - String& rFileName, String* pTitle = 0 ); + OUString& rFileName, OUString* pTitle = 0 ); static int _TestAllowedFormat( const TransferableDataHelper& rData, sal_uLong nFormat, sal_uInt16 nDestination ); diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 5b54d0eff077..5f5f10960413 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -3048,15 +3048,15 @@ void NaviContentBookmark::Copy( TransferDataContainer& rData ) const sal_Bool NaviContentBookmark::Paste( TransferableDataHelper& rData ) { - String sStr; + OUString sStr; sal_Bool bRet = rData.GetString( SOT_FORMATSTR_ID_SONLK, sStr ); if( bRet ) { sal_Int32 nPos = 0; - aUrl = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ); - aDescr = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ); - nDefDrag= (sal_uInt16)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32(); - nDocSh = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32(); + aUrl = sStr.getToken(0, NAVI_BOOKMARK_DELIM, nPos ); + aDescr = sStr.getToken(0, NAVI_BOOKMARK_DELIM, nPos ); + nDefDrag= (sal_uInt16)sStr.getToken(0, NAVI_BOOKMARK_DELIM, nPos ).toInt32(); + nDocSh = sStr.getToken(0, NAVI_BOOKMARK_DELIM, nPos ).toInt32(); } return bRet; } diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 5c6bea7fa967..a681f8cfcd9f 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -1141,7 +1141,7 @@ IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem) String SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) { - String sFileName; + OUString sFileName; sal_uLong nFmt; if( rData.HasFormat( nFmt = FORMAT_FILE_LIST )) { @@ -1163,7 +1163,7 @@ String SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) rData.GetINetBookmark( nFmt, aBkmk ); sFileName = aBkmk.GetURL(); } - if( sFileName.Len() ) + if( !sFileName.isEmpty() ) { sFileName = INetURLObject( sFileName ).GetMainURL( INetURLObject::NO_DECODE ); } |