summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-14 11:10:12 +0200
committerNoel Grandin <noel@peralex.com>2013-10-15 12:25:47 +0200
commitc1bc91fc4889e74a6edb38ba7690be6ab1e9dbb1 (patch)
tree7115b8c30010ae43a0880f52d05b1983927b341e /sw
parent9c52261c39a1090d07e2f5d2a41ca0c0fea41e81 (diff)
convert sw/source/ui/dialog/*.cxx from String to OUString
Change-Id: I668952728724dbb6c3d328ddf66e51113cc76e3d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx2
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx6
-rw-r--r--sw/source/ui/dialog/macassgn.cxx26
-rw-r--r--sw/source/ui/dialog/regionsw.cxx6
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx94
5 files changed, 67 insertions, 67 deletions
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index 82afcddb83de..3a25d88e9dcf 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -419,7 +419,7 @@ The code below would only be part of the solution.
if(bCloseMessage)
{
LockFocusNotification( true );
- String sInfo(SW_RES(STR_SPELLING_COMPLETED));
+ OUString sInfo(SW_RES(STR_SPELLING_COMPLETED));
//#i84610#
Window* pTemp = GetWindow(); // temporary needed for g++ 3.3.5
InfoBox(pTemp, sInfo ).Execute();
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 8929bb968906..97a7cc509bd3 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -181,7 +181,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
}
// get the set of disctinct available family names
- std::set< String > aFontNames;
+ std::set< OUString > aFontNames;
int nFontNames = pPrt->GetDevFontCount();
for( int i = 0; i < nFontNames; i++ )
{
@@ -190,7 +190,7 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
}
// insert to listbox
- for( std::set< String >::const_iterator it = aFontNames.begin();
+ for( std::set< OUString >::const_iterator it = aFontNames.begin();
it != aFontNames.end(); ++it )
{
m_pFontLB->InsertEntry( *it );
@@ -245,7 +245,7 @@ SwAsciiFilterDlg::~SwAsciiFilterDlg()
void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
{
sal_uLong nCCode = m_pCharSetLB->GetSelectTextEncoding();
- String sFont;
+ OUString sFont;
sal_uLong nLng = 0;
if( m_pFontLB->IsVisible() )
{
diff --git a/sw/source/ui/dialog/macassgn.cxx b/sw/source/ui/dialog/macassgn.cxx
index 034ea0c58d74..8b21ede7d57d 100644
--- a/sw/source/ui/dialog/macassgn.cxx
+++ b/sw/source/ui/dialog/macassgn.cxx
@@ -51,20 +51,20 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
switch( eType )
{
case MACASSGN_AUTOTEXT:
- aItem.AddEvent( String( SW_RES(STR_EVENT_START_INS_GLOSSARY) ), String(),
+ aItem.AddEvent( OUString( SW_RES(STR_EVENT_START_INS_GLOSSARY) ), OUString(),
SW_EVENT_START_INS_GLOSSARY );
- aItem.AddEvent( String( SW_RES(STR_EVENT_END_INS_GLOSSARY) ), String(),
+ aItem.AddEvent( OUString( SW_RES(STR_EVENT_END_INS_GLOSSARY) ), OUString(),
SW_EVENT_END_INS_GLOSSARY);
// in order for the new handler to become active!
break;
case MACASSGN_ALLFRM:
case MACASSGN_GRAPHIC: // graphics
{
- aItem.AddEvent( String( SW_RES(STR_EVENT_IMAGE_ERROR) ), String(),
+ aItem.AddEvent( OUString( SW_RES(STR_EVENT_IMAGE_ERROR) ), OUString(),
SVX_EVENT_IMAGE_ERROR);
- aItem.AddEvent( String( SW_RES(STR_EVENT_IMAGE_ABORT) ), String(),
+ aItem.AddEvent( OUString( SW_RES(STR_EVENT_IMAGE_ABORT) ), OUString(),
SVX_EVENT_IMAGE_ABORT);
- aItem.AddEvent( String( SW_RES(STR_EVENT_IMAGE_LOAD) ), String(),
+ aItem.AddEvent( OUString( SW_RES(STR_EVENT_IMAGE_LOAD) ), OUString(),
SVX_EVENT_IMAGE_LOAD);
}
// no break;
@@ -73,13 +73,13 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
if( !bHtmlMode &&
(MACASSGN_FRMURL == eType || MACASSGN_ALLFRM == eType))
{
- aItem.AddEvent( String( SW_RES( STR_EVENT_FRM_KEYINPUT_A ) ), String(),
+ aItem.AddEvent( OUString( SW_RES( STR_EVENT_FRM_KEYINPUT_A ) ), OUString(),
SW_EVENT_FRM_KEYINPUT_ALPHA );
- aItem.AddEvent( String( SW_RES( STR_EVENT_FRM_KEYINPUT_NOA ) ), String(),
+ aItem.AddEvent( OUString( SW_RES( STR_EVENT_FRM_KEYINPUT_NOA ) ), OUString(),
SW_EVENT_FRM_KEYINPUT_NOALPHA );
- aItem.AddEvent( String( SW_RES( STR_EVENT_FRM_RESIZE ) ), String(),
+ aItem.AddEvent( OUString( SW_RES( STR_EVENT_FRM_RESIZE ) ), OUString(),
SW_EVENT_FRM_RESIZE );
- aItem.AddEvent( String( SW_RES( STR_EVENT_FRM_MOVE ) ), String(),
+ aItem.AddEvent( OUString( SW_RES( STR_EVENT_FRM_MOVE ) ), OUString(),
SW_EVENT_FRM_MOVE );
}
}
@@ -87,17 +87,17 @@ SfxEventNamesItem SwMacroAssignDlg::AddEvents( DlgEventType eType )
case MACASSGN_OLE: // OLE
{
if( !bHtmlMode )
- aItem.AddEvent( String( SW_RES(STR_EVENT_OBJECT_SELECT) ), String(),
+ aItem.AddEvent( OUString( SW_RES(STR_EVENT_OBJECT_SELECT) ), OUString(),
SW_EVENT_OBJECT_SELECT );
}
// no break;
case MACASSGN_INETFMT: // INetFmt-Attributes
{
- aItem.AddEvent( String( SW_RES(STR_EVENT_MOUSEOVER_OBJECT) ), String(),
+ aItem.AddEvent( OUString( SW_RES(STR_EVENT_MOUSEOVER_OBJECT) ), OUString(),
SFX_EVENT_MOUSEOVER_OBJECT );
- aItem.AddEvent( String( SW_RES(STR_EVENT_MOUSECLICK_OBJECT) ), String(),
+ aItem.AddEvent( OUString( SW_RES(STR_EVENT_MOUSECLICK_OBJECT) ), OUString(),
SFX_EVENT_MOUSECLICK_OBJECT);
- aItem.AddEvent( String( SW_RES(STR_EVENT_MOUSEOUT_OBJECT) ), String(),
+ aItem.AddEvent( OUString( SW_RES(STR_EVENT_MOUSEOUT_OBJECT) ), OUString(),
SFX_EVENT_MOUSEOUT_OBJECT);
}
break;
diff --git a/sw/source/ui/dialog/regionsw.cxx b/sw/source/ui/dialog/regionsw.cxx
index 7b3c77e367e8..dd7b1ab47cc5 100644
--- a/sw/source/ui/dialog/regionsw.cxx
+++ b/sw/source/ui/dialog/regionsw.cxx
@@ -93,7 +93,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
else
{
const SfxPoolItem *pItem = 0;
- String aTmpStr;
+ OUString aTmpStr;
if ( SFX_ITEM_SET ==
pSet->GetItemState(FN_PARAM_REGION_NAME, sal_True, &pItem) )
{
@@ -147,7 +147,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
pSet->GetItemState(FN_PARAM_REGION_CONDITION, sal_True, &pItem))
aSection.SetCondition(((const SfxStringItem *)pItem)->GetValue());
- String aFile, aSub;
+ OUString aFile, aSub;
if(SFX_ITEM_SET ==
pSet->GetItemState(FN_PARAM_1, sal_True, &pItem))
aFile = ((const SfxStringItem *)pItem)->GetValue();
@@ -157,7 +157,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
aSub = ((const SfxStringItem *)pItem)->GetValue();
- if(aFile.Len() || aSub.Len())
+ if(!aFile.isEmpty() || !aSub.isEmpty())
{
OUString sLinkFileName = OUString(sfx2::cTokenSeparator);
sLinkFileName += OUString(sfx2::cTokenSeparator);
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 0341bd3ccd9a..a3f3d95c6439 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -167,11 +167,11 @@ public:
SvxLRSpaceItem& GetLRSpace() { return m_LRSpaceItem; }
sal_uInt16 GetArrPos() const { return m_nArrPos; }
- String GetFile() const;
- String GetSubRegion() const;
- void SetFile(String const& rFile);
- void SetFilter(String const& rFilter);
- void SetSubRegion(String const& rSubRegion);
+ OUString GetFile() const;
+ OUString GetSubRegion() const;
+ void SetFile(OUString const& rFile);
+ void SetFilter(OUString const& rFilter);
+ void SetSubRegion(OUString const& rSubRegion);
bool IsContent() { return m_bContent; }
void SetContent(bool const bValue) { m_bContent = bValue; }
@@ -207,27 +207,27 @@ SectRepr::SectRepr( sal_uInt16 nPos, SwSection& rSect )
}
}
-void SectRepr::SetFile( const String& rFile )
+void SectRepr::SetFile( const OUString& rFile )
{
- String sNewFile( INetURLObject::decode( rFile, INET_HEX_ESCAPE,
+ OUString sNewFile( INetURLObject::decode( rFile, INET_HEX_ESCAPE,
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ));
- String sOldFileName( m_SectionData.GetLinkFileName() );
- String sSub( sOldFileName.GetToken( 2, sfx2::cTokenSeparator ) );
+ OUString sOldFileName( m_SectionData.GetLinkFileName() );
+ OUString sSub( sOldFileName.getToken( 2, sfx2::cTokenSeparator ) );
- if( rFile.Len() || sSub.Len() )
+ if( !rFile.isEmpty() || !sSub.isEmpty() )
{
- sNewFile += sfx2::cTokenSeparator;
- if( rFile.Len() ) // Filter only with FileName
- sNewFile += sOldFileName.GetToken( 1, sfx2::cTokenSeparator );
+ sNewFile += OUString(sfx2::cTokenSeparator);
+ if( !rFile.isEmpty() ) // Filter only with FileName
+ sNewFile += sOldFileName.getToken( 1, sfx2::cTokenSeparator );
- sNewFile += sfx2::cTokenSeparator;
+ sNewFile += OUString(sfx2::cTokenSeparator);
sNewFile += sSub;
}
m_SectionData.SetLinkFileName( sNewFile );
- if( rFile.Len() || sSub.Len() )
+ if( !rFile.isEmpty() || !sSub.isEmpty() )
{
m_SectionData.SetType( FILE_LINK_SECTION );
}
@@ -238,41 +238,41 @@ void SectRepr::SetFile( const String& rFile )
}
-void SectRepr::SetFilter( const String& rFilter )
+void SectRepr::SetFilter( const OUString& rFilter )
{
- String sNewFile;
- String sOldFileName( m_SectionData.GetLinkFileName() );
- String sFile( sOldFileName.GetToken( 0, sfx2::cTokenSeparator ) );
- String sSub( sOldFileName.GetToken( 2, sfx2::cTokenSeparator ) );
+ OUString sNewFile;
+ OUString sOldFileName( m_SectionData.GetLinkFileName() );
+ OUString sFile( sOldFileName.getToken( 0, sfx2::cTokenSeparator ) );
+ OUString sSub( sOldFileName.getToken( 2, sfx2::cTokenSeparator ) );
- if( sFile.Len() )
- (((( sNewFile = sFile ) += sfx2::cTokenSeparator ) += rFilter )
- += sfx2::cTokenSeparator ) += sSub;
- else if( sSub.Len() )
- (( sNewFile = sfx2::cTokenSeparator ) += sfx2::cTokenSeparator ) += sSub;
+ if( !sFile.isEmpty() )
+ sNewFile = sFile + OUString(sfx2::cTokenSeparator) +
+ rFilter + OUString(sfx2::cTokenSeparator) + sSub;
+ else if( !sSub.isEmpty() )
+ sNewFile = OUString(sfx2::cTokenSeparator) + OUString(sfx2::cTokenSeparator) + sSub;
m_SectionData.SetLinkFileName( sNewFile );
- if( sNewFile.Len() )
+ if( !sNewFile.isEmpty() )
{
m_SectionData.SetType( FILE_LINK_SECTION );
}
}
-void SectRepr::SetSubRegion(const String& rSubRegion)
+void SectRepr::SetSubRegion(const OUString& rSubRegion)
{
- String sNewFile;
- String sOldFileName( m_SectionData.GetLinkFileName() );
- String sFilter( sOldFileName.GetToken( 1, sfx2::cTokenSeparator ) );
- sOldFileName = sOldFileName.GetToken( 0, sfx2::cTokenSeparator );
+ OUString sNewFile;
+ OUString sOldFileName( m_SectionData.GetLinkFileName() );
+ OUString sFilter( sOldFileName.getToken( 1, sfx2::cTokenSeparator ) );
+ sOldFileName = sOldFileName.getToken( 0, sfx2::cTokenSeparator );
- if( rSubRegion.Len() || sOldFileName.Len() )
- (((( sNewFile = sOldFileName ) += sfx2::cTokenSeparator ) += sFilter )
- += sfx2::cTokenSeparator ) += rSubRegion;
+ if( !rSubRegion.isEmpty() || !sOldFileName.isEmpty() )
+ sNewFile = sOldFileName + OUString(sfx2::cTokenSeparator) +
+ sFilter + OUString(sfx2::cTokenSeparator) + rSubRegion;
m_SectionData.SetLinkFileName( sNewFile );
- if( rSubRegion.Len() || sOldFileName.Len() )
+ if( !rSubRegion.isEmpty() || !sOldFileName.isEmpty() )
{
m_SectionData.SetType( FILE_LINK_SECTION );
}
@@ -283,32 +283,32 @@ void SectRepr::SetSubRegion(const String& rSubRegion)
}
-String SectRepr::GetFile() const
+OUString SectRepr::GetFile() const
{
- String sLinkFile( m_SectionData.GetLinkFileName() );
- if( sLinkFile.Len() )
+ OUString sLinkFile( m_SectionData.GetLinkFileName() );
+ if( !sLinkFile.isEmpty() )
{
if (DDE_LINK_SECTION == m_SectionData.GetType())
{
- sal_uInt16 n = sLinkFile.SearchAndReplace( sfx2::cTokenSeparator, ' ' );
- sLinkFile.SearchAndReplace( sfx2::cTokenSeparator, ' ', n );
+ sal_Int32 n = 0;
+ sLinkFile = sLinkFile.replaceFirst( OUString(sfx2::cTokenSeparator), " ", &n );
+ sLinkFile = sLinkFile.replaceFirst( OUString(sfx2::cTokenSeparator), " ", &n );
}
else
- sLinkFile = INetURLObject::decode( sLinkFile.GetToken( 0,
- sfx2::cTokenSeparator ),
+ sLinkFile = INetURLObject::decode( sLinkFile.getToken( 0, sfx2::cTokenSeparator ),
INET_HEX_ESCAPE,
- INetURLObject::DECODE_UNAMBIGUOUS,
+ INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 );
}
return sLinkFile;
}
-String SectRepr::GetSubRegion() const
+OUString SectRepr::GetSubRegion() const
{
- String sLinkFile( m_SectionData.GetLinkFileName() );
- if( sLinkFile.Len() )
- sLinkFile = sLinkFile.GetToken( 2, sfx2::cTokenSeparator );
+ OUString sLinkFile( m_SectionData.GetLinkFileName() );
+ if( !sLinkFile.isEmpty() )
+ sLinkFile = sLinkFile.getToken( 2, sfx2::cTokenSeparator );
return sLinkFile;
}