summaryrefslogtreecommitdiff
path: root/svx/source/form
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-04 14:50:08 +0200
committerNoel Grandin <noel@peralex.com>2013-09-05 08:55:09 +0200
commit689bf5e24a5a6757efd035515f828b11b559cded (patch)
tree414b7d04e74ad60f8b7a71f57ebdb58cbf12d6f0 /svx/source/form
parent1287804a89c73e072d57a11ca18988c3e73a77b8 (diff)
convert svx/source/form/*.cxx from String to OUString
Change-Id: I3cac7b1f267bf119265869968c723df0473043b6
Diffstat (limited to 'svx/source/form')
-rw-r--r--svx/source/form/ParseContext.cxx2
-rw-r--r--svx/source/form/databaselocationinput.cxx24
-rw-r--r--svx/source/form/datanavi.cxx124
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/form/fmPropBrw.cxx2
-rw-r--r--svx/source/form/fmobj.cxx10
-rw-r--r--svx/source/form/fmundo.cxx4
-rw-r--r--svx/source/form/formcontroller.cxx10
-rw-r--r--svx/source/form/navigatortree.cxx8
-rw-r--r--svx/source/form/tbxform.cxx2
10 files changed, 94 insertions, 94 deletions
diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx
index 1e4dd6e3980c..37ca31537606 100644
--- a/svx/source/form/ParseContext.cxx
+++ b/svx/source/form/ParseContext.cxx
@@ -61,7 +61,7 @@ OSystemParseContext::~OSystemParseContext()
//-----------------------------------------------------------------------------
OUString OSystemParseContext::getErrorMessage(ErrorCode _eCode) const
{
- String aMsg;
+ OUString aMsg;
SolarMutexGuard aGuard;
switch (_eCode)
{
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index 8eb6a0dea5f6..92e8775868fb 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -63,15 +63,15 @@ namespace svx
);
~DatabaseLocationInputController_Impl();
- bool prepareCommit();
- void setURL( const String& _rURL );
- String getURL() const;
+ bool prepareCommit();
+ void setURL( const OUString& _rURL );
+ OUString getURL() const;
private:
- void impl_initFilterProperties_nothrow();
- void impl_onBrowseButtonClicked();
- void impl_onLocationModified();
- String impl_getCurrentURL() const;
+ void impl_initFilterProperties_nothrow();
+ void impl_onBrowseButtonClicked();
+ void impl_onLocationModified();
+ OUString impl_getCurrentURL() const;
DECL_LINK( OnControlAction, VclWindowEvent* );
@@ -141,14 +141,14 @@ namespace svx
}
//--------------------------------------------------------------------
- void DatabaseLocationInputController_Impl::setURL( const String& _rURL )
+ void DatabaseLocationInputController_Impl::setURL( const OUString& _rURL )
{
::svt::OFileNotation aTransformer( _rURL );
m_rLocationInput.SetText( aTransformer.get( ::svt::OFileNotation::N_SYSTEM ) );
}
//--------------------------------------------------------------------
- String DatabaseLocationInputController_Impl::getURL() const
+ OUString DatabaseLocationInputController_Impl::getURL() const
{
return impl_getCurrentURL();
}
@@ -219,10 +219,10 @@ namespace svx
}
// -----------------------------------------------------------------------------
- String DatabaseLocationInputController_Impl::impl_getCurrentURL() const
+ OUString DatabaseLocationInputController_Impl::impl_getCurrentURL() const
{
- String sCurrentFile( m_rLocationInput.GetText() );
- if ( sCurrentFile.Len() )
+ OUString sCurrentFile( m_rLocationInput.GetText() );
+ if ( !sCurrentFile.isEmpty() )
{
::svt::OFileNotation aCurrentFile( sCurrentFile );
sCurrentFile = aCurrentFile.get( ::svt::OFileNotation::N_URL );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 333aff993e07..66cffbab0d55 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -667,7 +667,7 @@ namespace svxform
if ( aDlg.Execute() == RET_OK )
{
// Set the new name
- String sNewName;
+ OUString sNewName;
if ( DGTInstance == m_eGroup )
{
try
@@ -684,13 +684,13 @@ namespace svxform
{
try
{
- String sDelim( RTL_CONSTASCII_USTRINGPARAM( ": " ) );
+ OUString sDelim( ": " );
OUString sTemp;
pNode->m_xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sNewName += String( sTemp );
+ sNewName += sTemp;
sNewName += sDelim;
pNode->m_xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
- sNewName += String( sTemp );
+ sNewName += sTemp;
}
catch ( Exception& )
{
@@ -972,28 +972,28 @@ namespace svxform
pEntry = m_aItemList.InsertEntry( sTemp, aImage, aImage, NULL, sal_False, LIST_APPEND, pNode );
// Action
_rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp;
- String sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_ACTION );
- sEntry += String( sTemp );
+ OUString sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_ACTION );
+ sEntry += sTemp;
m_aItemList.InsertEntry( sEntry, aImage, aImage, pEntry );
// Method
_rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_METHOD );
- sEntry += String( lcl_MethodString::get().toUI( sTemp ) );
+ sEntry += lcl_MethodString::get().toUI( sTemp );
m_aItemList.InsertEntry( sEntry, aImage, aImage, pEntry );
// Ref
_rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REF );
- sEntry += String( sTemp );
+ sEntry += sTemp;
m_aItemList.InsertEntry( sEntry, aImage, aImage, pEntry );
// Bind
_rEntry->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_BIND );
- sEntry += String( sTemp );
+ sEntry += sTemp;
m_aItemList.InsertEntry( sEntry, aImage, aImage, pEntry );
// Replace
_rEntry->getPropertyValue( PN_SUBMISSION_REPLACE ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REPLACE );
- sEntry += String( lcl_ReplaceString::get().toUI( sTemp ) );
+ sEntry += lcl_ReplaceString::get().toUI( sTemp );
m_aItemList.InsertEntry( sEntry, aImage, aImage, pEntry );
}
catch ( Exception& )
@@ -1005,13 +1005,13 @@ namespace svxform
{
try
{
- String sDelim( RTL_CONSTASCII_USTRINGPARAM( ": " ) );
+ OUString sDelim( ": " );
OUString sName;
_rEntry->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sName += String( sTemp );
+ sName += sTemp;
sName += sDelim;
_rEntry->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
- sName += String( sTemp );
+ sName += sTemp;
pEntry = m_aItemList.InsertEntry(
sName, aImage, aImage, NULL, sal_False, LIST_APPEND, pNode );
}
@@ -1048,29 +1048,29 @@ namespace svxform
m_aItemList.SetEntryText( pEntry, sTemp );
_rEntry->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp;
- String sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_BIND );
- sEntry += String( sTemp );
+ OUString sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_BIND );
+ sEntry += sTemp;
sal_uIntPtr nPos = 0;
SvTreeListEntry* pChild = m_aItemList.GetEntry( pEntry, nPos++ );
m_aItemList.SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REF );
- sEntry += String( sTemp );
+ sEntry += sTemp;
pChild = m_aItemList.GetEntry( pEntry, nPos++ );
m_aItemList.SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_ACTION );
- sEntry += String( sTemp );
+ sEntry += sTemp;
pChild = m_aItemList.GetEntry( pEntry, nPos++ );
m_aItemList.SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_METHOD );
- sEntry += String( lcl_MethodString::get().toUI( sTemp ) );
+ sEntry += lcl_MethodString::get().toUI( sTemp );
pChild = m_aItemList.GetEntry( pEntry, nPos++ );
m_aItemList.SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_REPLACE ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REPLACE );
- sEntry += String( lcl_ReplaceString::get().toUI( sTemp ) );
+ sEntry += lcl_ReplaceString::get().toUI( sTemp );
pChild = m_aItemList.GetEntry( pEntry, nPos++ );
m_aItemList.SetEntryText( pChild, sEntry );
}
@@ -1146,8 +1146,8 @@ namespace svxform
SAL_WARN( "svx.form", "XFormsPage::RemoveEntry(): exception caught" );
}
QueryBox aQBox( this, SVX_RES( nResId ) );
- String sMessText = aQBox.GetMessText();
- sMessText.SearchAndReplace( sSearch, String( sName ) );
+ OUString sMessText = aQBox.GetMessText();
+ sMessText = sMessText.replaceFirst( sSearch, sName);
aQBox.SetMessText( sMessText );
if ( aQBox.Execute() == RET_YES )
{
@@ -1209,7 +1209,7 @@ namespace svxform
DBG_ASSERT( _xModel.is(), "XFormsPage::SetModel(): invalid model" );
m_xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( _xModel, UNO_QUERY );
- String sRet;
+ OUString sRet;
m_bHasModel = true;
const ImageList& rImageList = m_pNaviWin->GetItemImageList();
@@ -1310,20 +1310,20 @@ namespace svxform
{
Image aImage1 = rImageList.GetImage( IID_ELEMENT );
Image aImage2 = rImageList.GetImage( IID_ELEMENT );
- String sDelim( RTL_CONSTASCII_USTRINGPARAM( ": " ) );
+ OUString sDelim( ": " );
while ( xNum->hasMoreElements() )
{
Reference< XPropertySet > xPropSet;
Any aAny = xNum->nextElement();
if ( aAny >>= xPropSet )
{
- String sEntry;
+ OUString sEntry;
OUString sTemp;
xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sEntry += String( sTemp );
+ sEntry += sTemp;
sEntry += sDelim;
xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
- sEntry += String( sTemp );
+ sEntry += sTemp;
ItemNode* pNode = new ItemNode( xPropSet );
m_aItemList.InsertEntry(
@@ -1659,7 +1659,7 @@ namespace svxform
bShowDialog = false;
if ( aDlg.Execute() == RET_OK )
{
- String sNewName = aDlg.GetName();
+ OUString sNewName = aDlg.GetName();
sal_Bool bDocumentData = aDlg.GetModifyDoc();
if ( m_aModelsBox.GetEntryPos( sNewName ) != LISTBOX_ENTRY_NOTFOUND )
@@ -1742,8 +1742,8 @@ namespace svxform
}
}
- String sNewName = aDlg.GetName();
- if ( sNewName.Len() > 0 && ( sNewName != String( sSelectedModel ) ) )
+ OUString sNewName = aDlg.GetName();
+ if ( !sNewName.isEmpty() && ( sNewName != sSelectedModel ) )
{
try
{
@@ -1836,10 +1836,10 @@ namespace svxform
aDlg.SetName( pPage->GetInstanceName() );
aDlg.SetURL( pPage->GetInstanceURL() );
aDlg.SetLinkInstance( pPage->GetLinkOnce() );
- String sOldName = aDlg.GetName();
+ OUString sOldName = aDlg.GetName();
if ( aDlg.Execute() == RET_OK )
{
- String sNewName = aDlg.GetName();
+ OUString sNewName = aDlg.GetName();
OUString sURL = aDlg.GetURL();
bool bLinkOnce = aDlg.IsLinkInstance();
try
@@ -1868,7 +1868,7 @@ namespace svxform
XFormsPage* pPage = GetCurrentPage( nId );
if ( pPage )
{
- String sInstName = pPage->GetInstanceName();
+ OUString sInstName = pPage->GetInstanceName();
QueryBox aQBox( this, SVX_RES( RID_QRY_REMOVE_INSTANCE ) );
OUString sMessText = aQBox.GetMessText();
sMessText = sMessText.replaceFirst( INSTANCENAME, sInstName );
@@ -2103,9 +2103,9 @@ namespace svxform
// instance page
nPagePos = m_aTabCtrl.GetPagePos( nId );
m_bIsNotifyDisabled = true;
- String sText = pPage->SetModel( xFormsModel, nPagePos );
+ OUString sText = pPage->SetModel( xFormsModel, nPagePos );
m_bIsNotifyDisabled = false;
- if ( sText.Len() > 0 )
+ if ( !sText.isEmpty() )
m_aTabCtrl.SetPageText( nId, sText );
}
}
@@ -2213,7 +2213,7 @@ namespace svxform
if ( sInstName.isEmpty() )
{
SAL_WARN( "svx.form", "DataNavigatorWindow::CreateInstancePage(): instance without name" );
- String sTemp = OUString("untitled");
+ OUString sTemp("untitled");
sTemp += OUString::number( nPageId );
sInstName = sTemp;
}
@@ -2595,7 +2595,7 @@ namespace svxform
sPropName = PN_CALCULATE_EXPR;
AddConditionDialog aDlg( this, sPropName, m_xTempBinding );
bool bIsDefBtn = ( &m_aDefaultBtn == pBtn );
- String sCondition;
+ OUString sCondition;
if ( bIsDefBtn )
sCondition = m_aDefaultED.GetText();
else
@@ -2609,7 +2609,7 @@ namespace svxform
if ( aDlg.Execute() == RET_OK )
{
- String sNewCondition = aDlg.GetCondition();
+ OUString sNewCondition = aDlg.GetCondition();
if ( bIsDefBtn )
m_aDefaultED.SetText( sNewCondition );
else
@@ -2939,7 +2939,7 @@ namespace svxform
OUString sTemp;
if ( m_xTempBinding->getPropertyValue( PN_BINDING_TYPE ) >>= sTemp )
{
- sal_uInt16 nPos = m_aDataTypeLB.GetEntryPos( String( sTemp ) );
+ sal_uInt16 nPos = m_aDataTypeLB.GetEntryPos( sTemp );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nPos = m_aDataTypeLB.InsertEntry( sTemp );
m_aDataTypeLB.SelectEntryPos( nPos );
@@ -2956,7 +2956,7 @@ namespace svxform
void AddDataItemDialog::InitText( DataItemType _eType )
{
- String sText;
+ OUString sText;
switch ( _eType )
{
@@ -3105,9 +3105,9 @@ namespace svxform
//------------------------------------------------------------------------
IMPL_LINK_NOARG(AddConditionDialog, ResultHdl)
{
- String sCondition = comphelper::string::strip(m_aConditionED.GetText(), ' ');
- String sResult;
- if ( sCondition.Len() > 0 )
+ OUString sCondition = comphelper::string::strip(m_aConditionED.GetText(), ' ');
+ OUString sResult;
+ if ( !sCondition.isEmpty() )
{
try
{
@@ -3148,8 +3148,8 @@ namespace svxform
{
static long aStaticTabs[]= { 3, 0, 35, 200 };
m_aNamespacesList.SvSimpleTable::SetTabs( aStaticTabs );
- String sHeader = SVX_RESSTR( STR_HEADER_PREFIX );
- sHeader += '\t';
+ OUString sHeader = SVX_RESSTR( STR_HEADER_PREFIX );
+ sHeader += "\t";
sHeader += SVX_RESSTR(STR_HEADER_URL);
m_aNamespacesList.InsertHeaderEntry(
sHeader, HEADERBAR_APPEND, HIB_LEFT /*| HIB_FIXEDPOS | HIB_FIXED*/ );
@@ -3190,8 +3190,8 @@ namespace svxform
ManageNamespaceDialog aDlg( this, m_pConditionDlg, false );
if ( aDlg.Execute() == RET_OK )
{
- String sEntry = aDlg.GetPrefix();
- sEntry += '\t';
+ OUString sEntry = aDlg.GetPrefix();
+ sEntry += "\t";
sEntry += aDlg.GetURL();
m_aNamespacesList.InsertEntry( sEntry );
}
@@ -3201,7 +3201,7 @@ namespace svxform
ManageNamespaceDialog aDlg( this, m_pConditionDlg, true );
SvTreeListEntry* pEntry = m_aNamespacesList.FirstSelected();
DBG_ASSERT( pEntry, "NamespaceItemDialog::ClickHdl(): no entry" );
- String sPrefix( m_aNamespacesList.GetEntryText( pEntry, 0 ) );
+ OUString sPrefix( m_aNamespacesList.GetEntryText( pEntry, 0 ) );
aDlg.SetNamespace(
sPrefix,
m_aNamespacesList.GetEntryText( pEntry, 1 ) );
@@ -3281,9 +3281,9 @@ namespace svxform
Any aAny = m_rNamespaces->getByName( sPrefix );
if ( aAny >>= sURL )
{
- String sEntry( sPrefix );
- sEntry += '\t';
- sEntry += String( sURL );
+ OUString sEntry( sPrefix );
+ sEntry += "\t";
+ sEntry += sURL;
m_aNamespacesList.InsertEntry( sEntry );
}
@@ -3333,7 +3333,7 @@ namespace svxform
//------------------------------------------------------------------------
IMPL_LINK_NOARG(ManageNamespaceDialog, OKHdl)
{
- String sPrefix = m_aPrefixED.GetText();
+ OUString sPrefix = m_aPrefixED.GetText();
try
{
@@ -3463,8 +3463,8 @@ namespace svxform
m_xSubmission->setPropertyValue( PN_SUBMISSION_METHOD, makeAny( sTemp ) );
sTemp = m_aRefED.GetText();
m_xSubmission->setPropertyValue( PN_SUBMISSION_REF, makeAny( sTemp ) );
- String sEntry = m_aBindLB.GetSelectEntry();
- sEntry.Erase( sEntry.Search( ':' ) );
+ OUString sEntry = m_aBindLB.GetSelectEntry();
+ sEntry = sEntry.replaceFirst( ":", "" );
sTemp = sEntry;
m_xSubmission->setPropertyValue( PN_SUBMISSION_BIND, makeAny( sTemp ) );
sTemp = lcl_ReplaceString::get().toAPI( m_aReplaceLB.GetSelectEntry() );
@@ -3501,20 +3501,20 @@ namespace svxform
Reference < XEnumeration > xNum = xNumAccess->createEnumeration();
if ( xNum.is() && xNum->hasMoreElements() )
{
- String sDelim( RTL_CONSTASCII_USTRINGPARAM( ": " ) );
+ OUString sDelim( ": " );
while ( xNum->hasMoreElements() )
{
Reference< XPropertySet > xPropSet;
Any aAny = xNum->nextElement();
if ( aAny >>= xPropSet )
{
- String sEntry;
+ OUString sEntry;
OUString sTemp;
xPropSet->getPropertyValue( PN_BINDING_ID ) >>= sTemp;
- sEntry += String( sTemp );
+ sEntry += sTemp;
sEntry += sDelim;
xPropSet->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp;
- sEntry += String( sTemp );
+ sEntry += sTemp;
m_aBindLB.InsertEntry( sEntry );
if ( !m_xTempBinding.is() )
@@ -3564,13 +3564,13 @@ namespace svxform
m_xSubmission->getPropertyValue( PN_SUBMISSION_METHOD ) >>= sTemp;
sTemp = lcl_MethodString::get().toUI( sTemp );
- sal_uInt16 nPos = m_aMethodLB.GetEntryPos( String( sTemp ) );
+ sal_uInt16 nPos = m_aMethodLB.GetEntryPos( sTemp );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nPos = m_aMethodLB.InsertEntry( sTemp );
m_aMethodLB.SelectEntryPos( nPos );
m_xSubmission->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp;
- nPos = m_aBindLB.GetEntryPos( String( sTemp ) );
+ nPos = m_aBindLB.GetEntryPos( sTemp );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nPos = m_aBindLB.InsertEntry( sTemp );
m_aBindLB.SelectEntryPos( nPos );
@@ -3579,7 +3579,7 @@ namespace svxform
sTemp = lcl_ReplaceString::get().toUI( sTemp );
if ( sTemp.isEmpty() )
sTemp = m_aReplaceLB.GetEntry(0); // first entry == "none"
- nPos = m_aReplaceLB.GetEntryPos( String( sTemp ) );
+ nPos = m_aReplaceLB.GetEntryPos( sTemp );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nPos = m_aReplaceLB.InsertEntry( sTemp );
m_aReplaceLB.SelectEntryPos( nPos );
@@ -3666,8 +3666,8 @@ namespace svxform
INetURLObject aFile( SvtPathOptions().GetWorkPath() );
aDlg.AddFilter( m_sAllFilterName, OUString(FILEDIALOG_FILTER_ALL) );
- String sFilterName( "XML" );
- aDlg.AddFilter( sFilterName, OUString("*.xml") );
+ OUString sFilterName( "XML" );
+ aDlg.AddFilter( sFilterName, "*.xml" );
aDlg.SetCurrentFilter( sFilterName );
aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 1ebc6c24f817..fc92b76d1fdf 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1609,7 +1609,7 @@ void FmFilterNavigator::insertFilterItem(const ::std::vector<FmFilterItem*>& _rF
continue;
FmFilterItem* pFilterItem = _pTargetItems->Find( pLookupItem->GetComponentIndex() );
- String aText = pLookupItem->GetText();
+ OUString aText = pLookupItem->GetText();
if ( !pFilterItem )
{
pFilterItem = new FmFilterItem( _pTargetItems, pLookupItem->GetFieldName(), aText, pLookupItem->GetComponentIndex() );
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 72bdf74816da..0d879727d3be 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -417,7 +417,7 @@ void FmPropBrw::implSetNewSelection( const InterfaceBag& _rSelection )
}
// set the new title according to the selected object
- String sTitle;
+ OUString sTitle;
if ( _rSelection.empty() )
{
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index c62dd0f66473..f4321fb62a41 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -73,7 +73,7 @@ FmFormObj::FmFormObj(const OUString& rModelName)
//------------------------------------------------------------------
FmFormObj::FmFormObj()
- :SdrUnoObj ( String() )
+ :SdrUnoObj ( "" )
,m_nPos ( -1 )
,m_pLastKnownRefDevice ( NULL )
{
@@ -418,8 +418,8 @@ namespace
xParent = Reference< ::com::sun::star::container::XIndexAccess>(xChild->getParent(), UNO_QUERY);
// while the current content is a form
- String sReturn;
- String sCurrentIndex;
+ OUString sReturn;
+ OUString sCurrentIndex;
while (xChild.is())
{
// get the content's relative pos within it's parent container
@@ -427,9 +427,9 @@ namespace
// prepend this current relaive pos
sCurrentIndex = OUString::number(nPos);
- if (sReturn.Len() != 0)
+ if (!sReturn.isEmpty())
{
- sCurrentIndex += '\\';
+ sCurrentIndex += "\\";
sCurrentIndex += sReturn;
}
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 6a50966c980b..674bcfd006e1 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -1021,9 +1021,9 @@ void FmUndoPropertyAction::Redo()
//------------------------------------------------------------------------------
OUString FmUndoPropertyAction::GetComment() const
{
- String aStr(static_STR_UNDO_PROPERTY);
+ OUString aStr(static_STR_UNDO_PROPERTY);
- aStr.SearchAndReplace( OUString('#'), aPropertyName );
+ aStr = aStr.replaceFirst( "#", aPropertyName );
return aStr;
}
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index fe70ba209df9..54eff2b9b1d5 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -3651,7 +3651,7 @@ Reference< XControl > FormController::locateControl( const Reference< XControlMo
//------------------------------------------------------------------------------
namespace
{
- void displayErrorSetFocus( const String& _rMessage, const Reference< XControl >& _rxFocusControl, Window* _pDialogParent )
+ void displayErrorSetFocus( const OUString& _rMessage, const Reference< XControl >& _rxFocusControl, Window* _pDialogParent )
{
SQLContext aError;
aError.Message = SVX_RESSTR(RID_STR_WRITEERROR);
@@ -3777,8 +3777,8 @@ sal_Bool SAL_CALL FormController::approveRowChange(const RowChangeEvent& _rEvent
if ( !rColInfo.xColumn->getString().isEmpty() || !rColInfo.xColumn->wasNull() )
continue;
- String sMessage( SVX_RESSTR( RID_ERR_FIELDREQUIRED ) );
- sMessage.SearchAndReplace( OUString('#'), rColInfo.sName );
+ OUString sMessage( SVX_RESSTR( RID_ERR_FIELDREQUIRED ) );
+ sMessage = sMessage.replaceFirst( "#", rColInfo.sName );
// the control to focus
Reference< XControl > xControl( rColInfo.xFirstControlWithInputRequired );
@@ -4036,12 +4036,12 @@ sal_Bool SAL_CALL FormController::confirmDelete(const RowChangeEvent& aEvent) th
}
// default handling: instantiate an interaction handler and let it handle the request
- String sTitle;
+ OUString sTitle;
sal_Int32 nLength = aEvent.Rows;
if ( nLength > 1 )
{
sTitle = SVX_RESSTR( RID_STR_DELETECONFIRM_RECORDS );
- sTitle.SearchAndReplace( OUString('#'), OUString::number(nLength) );
+ sTitle = sTitle.replaceFirst( "#", OUString::number(nLength) );
}
else
sTitle = SVX_RESSTR( RID_STR_DELETECONFIRM_RECORD );
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 50b118c1d238..33a310c2b3a2 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1771,20 +1771,20 @@ namespace svxform
{
// ---------------
// initialize UNDO
- String aUndoStr;
+ OUString aUndoStr;
if ( m_arrCurrentSelection.size() == 1 )
{
aUndoStr = SVX_RESSTR(RID_STR_UNDO_CONTAINER_REMOVE);
if (m_nFormsSelected)
- aUndoStr.SearchAndReplaceAscii( "#", SVX_RESSTR( RID_STR_FORM ) );
+ aUndoStr = aUndoStr.replaceFirst( "#", SVX_RESSTR( RID_STR_FORM ) );
else
// it must be a control (else the root would be selected, but it cannot be deleted)
- aUndoStr.SearchAndReplaceAscii( "#", SVX_RESSTR( RID_STR_CONTROL ) );
+ aUndoStr = aUndoStr.replaceFirst( "#", SVX_RESSTR( RID_STR_CONTROL ) );
}
else
{
aUndoStr = SVX_RESSTR(RID_STR_UNDO_CONTAINER_REMOVE_MULTIPLE);
- aUndoStr.SearchAndReplaceAscii( "#", OUString::number( m_arrCurrentSelection.size() ) );
+ aUndoStr = aUndoStr.replaceFirst( "#", OUString::number( m_arrCurrentSelection.size() ) );
}
pFormModel->BegUndo(aUndoStr);
}
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 36763c1931e1..8e2e81eb882e 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -390,7 +390,7 @@ SvxFmTbxCtlRecTotal::~SvxFmTbxCtlRecTotal()
Window* SvxFmTbxCtlRecTotal::CreateItemWindow( Window* pParent )
{
pFixedText = new FixedText( pParent );
- String aSample(RTL_CONSTASCII_USTRINGPARAM("123456"));
+ OUString aSample("123456");
Size aSize( pFixedText->GetTextWidth( aSample ), pFixedText->GetTextHeight( ) );
aSize.Width() += 12;
pFixedText->SetSizePixel( aSize );