summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-08-22 22:41:04 +0200
committerMichael Stahl <mstahl@redhat.com>2013-08-25 13:28:45 +0000
commitf83a1f8e1ce005183983e10e57933e0f8141e02c (patch)
treeeaa663b0d4f69c0ac0df9bf94d9ed857d4c3bd2e /sw
parentString to OUString (diff)
downloadcore-f83a1f8e1ce005183983e10e57933e0f8141e02c.tar.gz
core-f83a1f8e1ce005183983e10e57933e0f8141e02c.zip
String to OUString
Change-Id: I364c5eabf45a3a5011c0b1709da68cbeb38a6997 Reviewed-on: https://gerrit.libreoffice.org/5610 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/doc.hxx3
-rw-r--r--sw/inc/editsh.hxx2
-rw-r--r--sw/inc/fesh.hxx2
-rw-r--r--sw/inc/ndgrf.hxx2
-rw-r--r--sw/source/core/doc/docfly.cxx4
-rw-r--r--sw/source/core/doc/notxtfrm.cxx18
-rw-r--r--sw/source/core/edit/editsh.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx4
-rw-r--r--sw/source/core/graphic/ndgrf.cxx14
-rw-r--r--sw/source/core/inc/UndoInsert.hxx3
-rw-r--r--sw/source/core/undo/unins.cxx13
-rw-r--r--sw/source/core/unocore/unoframe.cxx59
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx6
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx13
-rw-r--r--sw/source/ui/docvw/edtdd.cxx2
-rw-r--r--sw/source/ui/docvw/romenu.cxx4
-rw-r--r--sw/source/ui/docvw/romenu.hxx4
-rw-r--r--sw/source/ui/shells/basesh.cxx4
-rw-r--r--sw/source/ui/shells/grfsh.cxx16
-rw-r--r--sw/source/ui/utlui/content.cxx2
22 files changed, 91 insertions, 92 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 16c7b2c0d1ba..ded1285aa7d4 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1162,8 +1162,7 @@ public:
void SetFlyName( SwFlyFrmFmt& rFmt, const OUString& rName );
const SwFlyFrmFmt* FindFlyByName( const OUString& rName, sal_Int8 nNdTyp = 0 ) const;
- void GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
- String* pFltName ) const;
+ void GetGrfNms( const SwFlyFrmFmt& rFmt, OUString* pGrfName, OUString* pFltName ) const;
/// Set a valid name for all Flys that have none (Called by Readers after reading).
void SetAllUniqueFlyNames();
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 08c71c39f762..fc5a6c1e41d0 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -622,7 +622,7 @@ public:
/** @return name and filter of a graphic if the cursor is in a graphic,
else give a rap on the knuckles!
If a string-ptr != 0 return the respective name. */
- void GetGrfNms( String* pGrfName, String* pFltName,
+ void GetGrfNms( OUString* pGrfName, OUString* pFltName,
const SwFlyFrmFmt* = 0 ) const;
/// Re-read if graphic is not ok. Current graphic is replaced by the new one.
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 43a8a950bae1..4aaa9736c3a3 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -336,7 +336,7 @@ public:
/** Deliver graphic in rName besides graphic name. If graphic is
linked give name with path. rbLink is TRUE if graphic is linked. */
const Graphic *GetGrfAtPos( const Point &rDocPos,
- String &rName, sal_Bool &rbLink ) const;
+ OUString &rName, sal_Bool &rbLink ) const;
OUString GetObjTitle() const;
void SetObjTitle( const OUString& rTitle );
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index ca2367ad9e2c..0d8c3b5cde67 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -194,7 +194,7 @@ public:
inline bool IsLinkedFile() const;
inline bool IsLinkedDDE() const;
::sfx2::SvBaseLinkRef GetLink() const { return refLink; }
- bool GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
+ bool GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const;
void ReleaseLink();
/** Scale an image-map: the image-map becomes zoomed in / out by
diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx
index be3e96bc04ab..292da2684d0f 100644
--- a/sw/source/core/doc/docfly.cxx
+++ b/sw/source/core/doc/docfly.cxx
@@ -583,8 +583,8 @@ bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
return bChgAnchor;
}
-void SwDoc::GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
- String* pFltName ) const
+void SwDoc::GetGrfNms( const SwFlyFrmFmt& rFmt, OUString* pGrfName,
+ OUString* pFltName ) const
{
SwNodeIndex aIdx( *rFmt.GetCntnt().GetCntntIdx(), 1 );
const SwGrfNode* pGrfNd = aIdx.GetNode().GetGrfNode();
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 52a2c4c2dac1..71abd3594a1d 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -77,7 +77,7 @@ using namespace com::sun::star;
extern void ClrContourCache( const SdrObject *pObj ); // TxtFly.Cxx
-inline bool GetRealURL( const SwGrfNode& rNd, String& rTxt )
+inline bool GetRealURL( const SwGrfNode& rNd, OUString& rTxt )
{
bool bRet = rNd.GetFileFilterNms( &rTxt, 0 );
if( bRet )
@@ -205,10 +205,10 @@ void SwNoTxtFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
if ( pSh->GetWin() && !pSh->IsPreView() )
{
const SwNoTxtNode* pNd = GetNode()->GetNoTxtNode();
- String aTxt( pNd->GetTitle() );
- if ( !aTxt.Len() && pNd->IsGrfNode() )
+ OUString aTxt( pNd->GetTitle() );
+ if ( aTxt.isEmpty() && pNd->IsGrfNode() )
GetRealURL( *(SwGrfNode*)pNd, aTxt );
- if( !aTxt.Len() )
+ if( aTxt.isEmpty() )
aTxt = FindFlyFrm()->GetFmt()->GetName();
lcl_PaintReplacement( Frm(), aTxt, *pSh, this, false );
}
@@ -851,8 +851,8 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
{
pGrfNd->TriggerAsyncRetrieveInputStream(); // #i73788#
}
- String aTxt( pGrfNd->GetTitle() );
- if ( !aTxt.Len() )
+ OUString aTxt( pGrfNd->GetTitle() );
+ if ( aTxt.isEmpty() )
GetRealURL( *pGrfNd, aTxt );
::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, false );
bContinue = false;
@@ -976,10 +976,10 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons
nResId = STR_COMCORE_CANT_SHOW;
}
((SwNoTxtFrm*)this)->nWeight = -1;
- String aText;
+ OUString aText;
if ( !nResId &&
- !(aText = pGrfNd->GetTitle()).Len() &&
- (!GetRealURL( *pGrfNd, aText ) || !aText.Len()))
+ (aText = pGrfNd->GetTitle()).isEmpty() &&
+ (!GetRealURL( *pGrfNd, aText ) || aText.isEmpty()))
{
nResId = STR_COMCORE_READERROR;
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 8acf2d5fc391..f29244678e87 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -310,7 +310,7 @@ void SwEditShell::ReRead( const String& rGrfName, const String& rFltName,
/// Returns the name and the filter name of a graphic if the pointer is on a graphic.
/// If a String-pointer is != 0 then return corresponding name.
-void SwEditShell::GetGrfNms( String* pGrfName, String* pFltName,
+void SwEditShell::GetGrfNms( OUString* pGrfName, OUString* pFltName,
const SwFlyFrmFmt* pFmt ) const
{
OSL_ENSURE( pGrfName || pFltName, "No parameters" );
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 9f5a55765f88..72a49324be86 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1618,7 +1618,7 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, String* pURL,
}
const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt,
- String &rName, sal_Bool &rbLink ) const
+ OUString &rName, sal_Bool &rbLink ) const
{
if( !Imp()->HasDrawView() )
return 0;
@@ -1645,7 +1645,7 @@ const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt,
}
pNd->GetFileFilterNms( &rName, 0 );
- if ( !rName.Len() )
+ if ( rName.isEmpty() )
rName = pFly->GetFmt()->GetName();
pNd->SwapIn( sal_True );
return &pNd->GetGrf();
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index e874282930f8..4f3a744e37f1 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -571,7 +571,7 @@ short SwGrfNode::SwapOut()
return 1;
}
-bool SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
+bool SwGrfNode::GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const
{
bool bRet = false;
if( refLink.Is() && refLink->GetLinkManager() )
@@ -582,14 +582,16 @@ bool SwGrfNode::GetFileFilterNms( String* pFileNm, String* pFilterNm ) const
refLink, 0, pFileNm, 0, pFilterNm );
else if( OBJECT_CLIENT_DDE == nType && pFileNm && pFilterNm )
{
- String sApp, sTopic, sItem;
+ OUString sApp;
+ OUString sTopic;
+ OUString sItem;
if( refLink->GetLinkManager()->GetDisplayNames(
refLink, &sApp, &sTopic, &sItem ) )
{
- ( *pFileNm = sApp ) += sfx2::cTokenSeparator;
- ( *pFileNm += sTopic ) += sfx2::cTokenSeparator;
- *pFileNm += sItem;
- pFilterNm->AssignAscii( RTL_CONSTASCII_STRINGPARAM( "DDE" ));
+ *pFileNm = sApp + OUString(sfx2::cTokenSeparator)
+ + sTopic + OUString(sfx2::cTokenSeparator)
+ + sItem;
+ *pFilterNm = "DDE";
bRet = true;
}
}
diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx
index b4689d3c7737..009209f3fbbe 100644
--- a/sw/source/core/inc/UndoInsert.hxx
+++ b/sw/source/core/inc/UndoInsert.hxx
@@ -129,7 +129,8 @@ private:
class SwUndoReRead : public SwUndo
{
Graphic *pGrf;
- String *pNm, *pFltr;
+ OUString *pNm;
+ OUString *pFltr;
sal_uLong nPos;
sal_uInt16 nMirr;
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index cbacd830e7aa..dd7bde01d28d 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -438,7 +438,8 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext)
case ND_GRFNODE:
{
SwGrfNode* pGrfNd = (SwGrfNode*)pCNd;
- String sFile, sFilter;
+ OUString sFile;
+ OUString sFilter;
if( pGrfNd->IsGrfLink() )
pGrfNd->GetFileFilterNms( &sFile, &sFilter );
@@ -838,14 +839,14 @@ void SwUndoReRead::SetAndSave(::sw::UndoRedoContext & rContext)
// cache the old values
Graphic* pOldGrf = pGrf;
- String* pOldNm = pNm;
- String* pOldFltr = pFltr;
+ OUString* pOldNm = pNm;
+ OUString* pOldFltr = pFltr;
sal_uInt16 nOldMirr = nMirr;
SaveGraphicData( *pGrfNd );
if( pOldNm )
{
- pGrfNd->ReRead( *pOldNm, pFltr ? *pFltr : aEmptyStr, 0, 0, sal_True );
+ pGrfNd->ReRead( *pOldNm, pFltr ? *pFltr : OUString(), 0, 0, sal_True );
delete pOldNm;
delete pOldFltr;
}
@@ -878,8 +879,8 @@ void SwUndoReRead::SaveGraphicData( const SwGrfNode& rGrfNd )
{
if( rGrfNd.IsGrfLink() )
{
- pNm = new String;
- pFltr = new String;
+ pNm = new OUString;
+ pFltr = new OUString;
rGrfNd.GetFileFilterNms( pNm, pFltr );
pGrf = 0;
}
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 0c5f4dd9aac8..8f84bf4c1ccd 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1173,31 +1173,29 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
else if( FN_UNO_GRAPHIC_U_R_L == pEntry->nWID ||
FN_UNO_GRAPHIC_FILTER == pEntry->nWID)
{
- String sGrfName, sFltName;
+ OUString sGrfName;
+ OUString sFltName;
GraphicObject *pGrfObj = 0;
pFmt->GetDoc()->GetGrfNms( *(SwFlyFrmFmt*)pFmt, &sGrfName, &sFltName );
- OUString uTemp;
- aValue >>= uTemp;
- String sTmp(uTemp);
+ OUString sTmp;
+ aValue >>= sTmp;
UnoActionContext aAction(pFmt->GetDoc());
if(FN_UNO_GRAPHIC_U_R_L == pEntry->nWID)
{
- if( sTmp.EqualsAscii( sPackageProtocol,
- 0, sizeof( sPackageProtocol )-1 ) )
+ if( sTmp.startsWith(sPackageProtocol) )
{
pGrfObj = new GraphicObject;
pGrfObj->SetUserData( sTmp );
pGrfObj->SetSwapState();
- sGrfName.Erase();
+ sGrfName = OUString();
}
- else if( sTmp.EqualsAscii( sGraphicObjectProtocol,
- 0, sizeof(sGraphicObjectProtocol)-1 ) )
+ else if( sTmp.startsWith(sGraphicObjectProtocol) )
{
- OString sId(OUStringToOString(
- sTmp.Copy(sizeof(sGraphicObjectProtocol)-1),
+ const OString sId(OUStringToOString(
+ sTmp.copy(sizeof(sGraphicObjectProtocol)-1),
RTL_TEXTENCODING_ASCII_US));
pGrfObj = new GraphicObject( sId );
- sGrfName.Erase();
+ sGrfName = OUString();
}
else
{
@@ -1553,7 +1551,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
else if( FN_UNO_GRAPHIC_U_R_L == pEntry->nWID)
{
- String sGrfName;
+ OUString sGrfName;
const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
if(pIdx)
{
@@ -1568,18 +1566,17 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
}
else
{
- OUString sPrefix( RTL_CONSTASCII_USTRINGPARAM(sGraphicObjectProtocol) );
OUString sId(OStringToOUString(
pGrfNode->GetGrfObj().GetUniqueID(),
RTL_TEXTENCODING_ASCII_US));
- sGrfName = sPrefix + sId;
+ sGrfName = sGraphicObjectProtocol + sId;
}
}
- aAny <<= OUString(sGrfName);
+ aAny <<= sGrfName;
}
else if( FN_UNO_REPLACEMENT_GRAPHIC_U_R_L == pEntry->nWID)
{
- String sGrfName;
+ OUString sGrfName;
const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx();
if(pIdx)
@@ -1593,18 +1590,18 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
if(pGraphicObject)
{
- OUString sPrefix( sGraphicObjectProtocol );
- (sGrfName = sPrefix) += OStringToOUString( pGraphicObject->GetUniqueID(), RTL_TEXTENCODING_ASCII_US );
+ sGrfName = sGraphicObjectProtocol
+ + OStringToOUString( pGraphicObject->GetUniqueID(), RTL_TEXTENCODING_ASCII_US );
}
}
- aAny <<= OUString(sGrfName);
+ aAny <<= sGrfName;
}
else if( FN_UNO_GRAPHIC_FILTER == pEntry->nWID )
{
- String sFltName;
+ OUString sFltName;
pFmt->GetDoc()->GetGrfNms( *(SwFlyFrmFmt*)pFmt, 0, &sFltName );
- aAny <<= OUString(sFltName);
+ aAny <<= sFltName;
}
else if( FN_UNO_GRAPHIC == pEntry->nWID )
{
@@ -2232,29 +2229,25 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan
{
UnoActionContext aCont(pDoc);
const ::uno::Any* pGraphicURL;
- String sGraphicURL;
+ OUString sGraphicURL;
GraphicObject *pGrfObj = 0;
if(pProps->GetProperty(FN_UNO_GRAPHIC_U_R_L, 0, pGraphicURL))
{
- OUString uTemp;
- (*pGraphicURL) >>= uTemp;
- sGraphicURL = String(uTemp);
- if( sGraphicURL.EqualsAscii( sPackageProtocol,
- 0, sizeof( sPackageProtocol )-1 ) )
+ (*pGraphicURL) >>= sGraphicURL;
+ if( sGraphicURL.startsWith(sPackageProtocol) )
{
pGrfObj = new GraphicObject;
pGrfObj->SetUserData( sGraphicURL );
pGrfObj->SetSwapState();
- sGraphicURL.Erase();
+ sGraphicURL = OUString();
}
- else if( sGraphicURL.EqualsAscii( sGraphicObjectProtocol,
- 0, sizeof(sGraphicObjectProtocol)-1 ) )
+ else if( sGraphicURL.startsWith(sGraphicObjectProtocol) )
{
OString sId(OUStringToOString(
- sGraphicURL.Copy( sizeof(sGraphicObjectProtocol)-1 ),
+ sGraphicURL.copy( sizeof(sGraphicObjectProtocol)-1 ),
RTL_TEXTENCODING_ASCII_US));
pGrfObj = new GraphicObject( sId );
- sGraphicURL.Erase();
+ sGraphicURL = OUString();
}
}
Graphic aGraphic;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 563c41958b08..8188fd6339ef 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2318,14 +2318,14 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
if ( pGrfNode && pGrfNode->IsLinkedFile() )
{
// linked image, just create the relation
- String aFileName;
+ OUString aFileName;
pGrfNode->GetFileFilterNms( &aFileName, 0 );
// TODO Convert the file name to relative for better interoperability
aRelId = m_rExport.AddRelation(
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
- OUString( aFileName ) );
+ aFileName );
nImageType = XML_link;
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index ecd54e861087..cf056e983bb1 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1411,7 +1411,7 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nSh
if (pGrfNd->IsLinkedFile())
{
- String sURL;
+ OUString sURL;
pGrfNd->GetFileFilterNms( &sURL, 0 );
ww::bytes aBuf;
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index e32b9a6df34e..baac689f3025 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -411,7 +411,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
{
if ( pGrfNd )
{
- String aFileURL;
+ OUString aFileURL;
pGrfNd->GetFileFilterNms( &aFileURL, 0 );
sStr += aFileURL;
}
@@ -701,14 +701,14 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
{
if (rGrfNd.IsLinkedFile()) // Linked File
{
- String aFileN;
+ OUString aFileN;
rGrfNd.GetFileFilterNms( &aFileN, 0 );
sal_uInt16 mm = 94; // 94 = BMP, GIF
WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
rGrfNd.GetpSwAttrSet());
- rStrm << (sal_uInt8)aFileN.Len(); // write Pascal-String
+ rStrm << (sal_uInt8)aFileN.getLength(); // write Pascal-String
SwWW8Writer::WriteString8(rStrm, aFileN, false,
RTL_TEXTENCODING_MS_1252);
}
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 1c9999d206ed..45ba8b45c500 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -779,7 +779,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
if(!pWrtShell)
return 0;
- String sGrfNm;
+ OUString sGrfNm;
const int nSelection = pWrtShell->GetSelectionType();
if( nSelection == nsSelectionType::SEL_GRF )
{
@@ -1546,15 +1546,15 @@ sal_uInt16 SwTransferable::GetSotDestination( const SwWrtShell& rSh,
if( pPt )
{
bIMap = 0 != rSh.GetFmtFromObj( *pPt )->GetURL().GetMap();
- String aDummy;
+ OUString aDummy;
rSh.GetGrfAtPos( *pPt, aDummy, bLink );
}
else
{
bIMap = 0 != rSh.GetFlyFrmFmt()->GetURL().GetMap();
- String aDummy;
+ OUString aDummy;
rSh.GetGrfNms( &aDummy, 0 );
- bLink = 0 != aDummy.Len();
+ bLink = !aDummy.isEmpty();
}
if( bLink && bIMap )
@@ -2939,7 +2939,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
{
if(!pWrtShell)
return;
- String sGrfNm;
+ OUString sGrfNm;
const int nSelection = pWrtShell->GetSelectionType();
if( nsSelectionType::SEL_GRF == nSelection)
{
@@ -3263,7 +3263,8 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
TRNSFR_GRAPHIC == eBufferType )
{
// ReRead the graphic
- String sGrfNm, sFltNm;
+ OUString sGrfNm;
+ OUString sFltNm;
rSrcSh.GetGrfNms( &sGrfNm, &sFltNm );
rSh.ReRead( sGrfNm, sFltNm, rSrcSh.GetGraphic() );
return 1;
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx
index fbe9ff0ca557..cc16fe634d0e 100644
--- a/sw/source/ui/docvw/edtdd.cxx
+++ b/sw/source/ui/docvw/edtdd.cxx
@@ -284,7 +284,7 @@ sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppO
{
sal_Bool bLink,
bIMap = 0 != rSh.GetFmtFromObj( aDocPt )->GetURL().GetMap();
- String aDummy;
+ OUString aDummy;
rSh.GetGrfAtPos( aDocPt, aDummy, bLink );
if ( bLink && bIMap )
nDropDestination = EXCHG_DEST_DOC_LNKD_GRAPH_W_IMAP;
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index 9d0947a4f112..c6d3e776933b 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -122,10 +122,10 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) :
if( rURL.GetMap() )
pImageMap = new ImageMap( *rURL.GetMap() );
else if( !rURL.GetURL().isEmpty() )
- pTargetURL = new INetImage( bLink ? sGrfName : aEmptyStr,
+ pTargetURL = new INetImage( bLink ? sGrfName : OUString(),
rURL.GetURL(),
rURL.GetTargetFrameName(),
- aEmptyStr, Size() );
+ OUString(), Size() );
}
}
diff --git a/sw/source/ui/docvw/romenu.hxx b/sw/source/ui/docvw/romenu.hxx
index df61667294a0..e7af754dba6d 100644
--- a/sw/source/ui/docvw/romenu.hxx
+++ b/sw/source/ui/docvw/romenu.hxx
@@ -37,8 +37,8 @@ class SwReadOnlyPopup : public PopupMenu
Graphic aGraphic;
String sURL,
sTargetFrameName,
- sDescription,
- sGrfName;
+ sDescription;
+ OUString sGrfName;
std::vector<String> aThemeList;
sal_Bool bGrfToGalleryAsLnk;
ImageMap* pImageMap;
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 87c393c4a667..9e67bc1fb4d2 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -178,12 +178,12 @@ static bool lcl_UpdateContourDlg( SwWrtShell &rSh, int nSel )
bool bRet = GRAPHIC_NONE != nGrfType && GRAPHIC_DEFAULT != nGrfType;
if( bRet )
{
- String aGrfName;
+ OUString aGrfName;
if ( nSel & nsSelectionType::SEL_GRF )
rSh.GetGrfNms( &aGrfName, 0 );
SvxContourDlg *pDlg = SWCONTOURDLG(rSh.GetView());
- pDlg->Update( aGraf, aGrfName.Len() > 0,
+ pDlg->Update( aGraf, !aGrfName.isEmpty(),
rSh.GetGraphicPolygon(), rSh.GetIMapInventor() );
}
return bRet;
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index b2ba913198ae..5b4bad2a62fc 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -115,7 +115,8 @@ void SwGrfShell::Execute(SfxRequest &rReq)
const Graphic *pGraphic;
if(0 != (pGraphic = rSh.GetGraphic()))
{
- String sGrfNm, sFilterNm;
+ OUString sGrfNm;
+ OUString sFilterNm;
rSh.GetGrfNms( &sGrfNm, &sFilterNm );
GraphicHelper::ExportGraphic( *pGraphic, sGrfNm );
}
@@ -249,9 +250,10 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put( aSzItm );
}
- String sGrfNm, sFilterNm;
+ OUString sGrfNm;
+ OUString sFilterNm;
rSh.GetGrfNms( &sGrfNm, &sFilterNm );
- if( sGrfNm.Len() )
+ if( !sGrfNm.isEmpty() )
{
aSet.Put( SvxBrushItem( INetURLObject::decode( sGrfNm,
INET_HEX_ESCAPE,
@@ -270,7 +272,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
SID_ATTR_GRAF_GRAPHIC ) );
}
}
- aSet.Put( SfxBoolItem( FN_PARAM_GRF_CONNECT, sGrfNm.Len() > 0 ) );
+ aSet.Put( SfxBoolItem( FN_PARAM_GRF_CONNECT, !sGrfNm.isEmpty() ) );
// get Mirror and Crop
{
@@ -368,14 +370,14 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if( ((SvxBrushItem*)pItem)->GetGraphicLink() )
sGrfNm = *((SvxBrushItem*)pItem)->GetGraphicLink();
else
- sGrfNm.Erase();
+ sGrfNm = OUString();
if( ((SvxBrushItem*)pItem)->GetGraphicFilter() )
sFilterNm = *((SvxBrushItem*)pItem)->GetGraphicFilter();
else
- sFilterNm.Erase();
+ sFilterNm = OUString();
- if( sGrfNm.Len() )
+ if( !sGrfNm.isEmpty() )
{
SwDocShell* pDocSh = GetView().GetDocShell();
SwWait aWait( *pDocSh, sal_True );
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 5f5f10960413..4dc34d42acd7 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -560,7 +560,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibilityChanged)
SwContent* pCnt;
if(CONTENT_TYPE_GRAPHIC == nContentType)
{
- String sLink;
+ OUString sLink;
pWrtShell->GetGrfNms( &sLink, 0, (SwFlyFrmFmt*) pFrmFmt);
pCnt = new SwGraphicContent(this, sFrmName,
INetURLObject::decode( sLink, INET_HEX_ESCAPE,