summaryrefslogtreecommitdiff
path: root/sw/source/ui
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/source/ui
parent8b0864c4b9a3392dea34658ac0368f9a1e4f66ed (diff)
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/source/ui')
-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
7 files changed, 24 insertions, 21 deletions
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,