summaryrefslogtreecommitdiff
path: root/extensions/source/propctrlr
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/propctrlr')
-rw-r--r--extensions/source/propctrlr/eformshelper.cxx2
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx6
-rw-r--r--extensions/source/propctrlr/formlinkdialog.cxx32
-rw-r--r--extensions/source/propctrlr/formlinkdialog.hxx2
-rw-r--r--extensions/source/propctrlr/formmetadata.cxx28
-rw-r--r--extensions/source/propctrlr/formmetadata.hxx14
-rw-r--r--extensions/source/propctrlr/listselectiondlg.cxx2
-rw-r--r--extensions/source/propctrlr/listselectiondlg.hxx2
-rw-r--r--extensions/source/propctrlr/newdatatype.cxx10
-rw-r--r--extensions/source/propctrlr/newdatatype.hxx2
-rw-r--r--extensions/source/propctrlr/propertyeditor.cxx2
-rw-r--r--extensions/source/propctrlr/propertyeditor.hxx2
-rw-r--r--extensions/source/propctrlr/propertyinfo.hxx12
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx84
-rw-r--r--extensions/source/propctrlr/stringrepresentation.cxx8
-rw-r--r--extensions/source/propctrlr/usercontrol.cxx12
-rw-r--r--extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx4
17 files changed, 112 insertions, 112 deletions
diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx
index dc0a92146d99..101ee1a40c42 100644
--- a/extensions/source/propctrlr/eformshelper.cxx
+++ b/extensions/source/propctrlr/eformshelper.cxx
@@ -549,7 +549,7 @@ namespace pcr
{
// find a nice name for it
OUString sBaseName(PcrRes(RID_STR_BINDING_UI_NAME).toString());
- sBaseName += OUString(" ");
+ sBaseName += " ";
OUString sNewName;
sal_Int32 nNumber = 1;
do
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index 672ab9b3e285..ca9d93b1fef4 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -986,8 +986,8 @@ namespace pcr
nPropId = PROPERTY_ID_WORDBREAK;
}
- String sDisplayName = m_pInfoService->getPropertyTranslation( nPropId );
- if ( !sDisplayName.Len() )
+ OUString sDisplayName = m_pInfoService->getPropertyTranslation( nPropId );
+ if ( sDisplayName.isEmpty() )
{
OSL_FAIL( "FormComponentPropertyHandler::describePropertyLine: did getSupportedProperties not work properly?" );
throw UnknownPropertyException();
@@ -2606,7 +2606,7 @@ namespace pcr
{
OSL_PRECOND( m_pInfoService.get(), "FormComponentPropertyHandler::impl_dialogListSelection_nothrow: no property meta data!" );
- String sPropertyUIName( m_pInfoService->getPropertyTranslation( m_pInfoService->getPropertyId( _rProperty ) ) );
+ OUString sPropertyUIName( m_pInfoService->getPropertyTranslation( m_pInfoService->getPropertyId( _rProperty ) ) );
ListSelectionDialog aDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, _rProperty, sPropertyUIName );
_rClearBeforeDialog.clear();
return ( RET_OK == aDialog.Execute() );
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx
index 0f9d6d59d35a..047747737de9 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -83,8 +83,8 @@ namespace pcr
/** retrieves the selected field name for either the master or the detail field
@return <TRUE/> if and only a valid field is selected
*/
- bool GetFieldName( LinkParticipant _eWhich, String& /* [out] */ _rName ) const;
- void SetFieldName( LinkParticipant _eWhich, const String& _rName );
+ bool GetFieldName( LinkParticipant _eWhich, OUString& /* [out] */ _rName ) const;
+ void SetFieldName( LinkParticipant _eWhich, const OUString& _rName );
void fillList( LinkParticipant _eWhich, const Sequence< OUString >& _rFieldNames );
@@ -120,15 +120,15 @@ namespace pcr
}
//------------------------------------------------------------------------
- bool FieldLinkRow::GetFieldName( LinkParticipant _eWhich, String& /* [out] */ _rName ) const
+ bool FieldLinkRow::GetFieldName( LinkParticipant _eWhich, OUString& /* [out] */ _rName ) const
{
const ComboBox* pBox = ( _eWhich == eDetailField ) ? &m_aDetailColumn : &m_aMasterColumn;
_rName = pBox->GetText();
- return _rName.Len() != 0;
+ return !_rName.isEmpty();
}
//------------------------------------------------------------------------
- void FieldLinkRow::SetFieldName( LinkParticipant _eWhich, const String& _rName )
+ void FieldLinkRow::SetFieldName( LinkParticipant _eWhich, const OUString& _rName )
{
ComboBox* pBox = ( _eWhich == eDetailField ) ? &m_aDetailColumn : &m_aMasterColumn;
pBox->SetText( _rName );
@@ -203,10 +203,10 @@ namespace pcr
for ( sal_Int32 i = 0; i < 4; ++i )
{
- String sDetailField, sMasterField;
+ OUString sDetailField, sMasterField;
aRows[ i ]->GetFieldName( FieldLinkRow::eDetailField, sDetailField );
aRows[ i ]->GetFieldName( FieldLinkRow::eMasterField, sMasterField );
- if ( !sDetailField.Len() && !sMasterField.Len() )
+ if ( sDetailField.isEmpty() && sMasterField.isEmpty() )
continue;
aDetailFields.push_back( sDetailField );
@@ -266,8 +266,8 @@ namespace pcr
void FormLinkDialog::initializeColumnLabels()
{
// label for the detail form
- String sDetailType = getFormDataSourceType( m_xDetailForm );
- if ( !sDetailType.Len() )
+ OUString sDetailType = getFormDataSourceType( m_xDetailForm );
+ if ( sDetailType.isEmpty() )
{
if ( m_sDetailLabel.isEmpty() )
{
@@ -279,8 +279,8 @@ namespace pcr
m_aDetailLabel.SetText( sDetailType );
// label for the master form
- String sMasterType = getFormDataSourceType( m_xMasterForm );
- if ( !sMasterType.Len() )
+ OUString sMasterType = getFormDataSourceType( m_xMasterForm );
+ if ( sMasterType.isEmpty() )
{
if ( m_sMasterLabel.isEmpty() )
{
@@ -349,7 +349,7 @@ namespace pcr
for ( sal_Int32 i = 0; ( i < 4 ) && bEnable; ++i )
{
- String sNotInterestedInRightNow;
+ OUString sNotInterestedInRightNow;
if ( aRows[ i ]->GetFieldName( FieldLinkRow::eDetailField, sNotInterestedInRightNow )
!= aRows[ i ]->GetFieldName( FieldLinkRow::eMasterField, sNotInterestedInRightNow )
)
@@ -360,9 +360,9 @@ namespace pcr
}
//------------------------------------------------------------------------
- String FormLinkDialog::getFormDataSourceType( const Reference< XPropertySet >& _rxForm ) const SAL_THROW(())
+ OUString FormLinkDialog::getFormDataSourceType( const Reference< XPropertySet >& _rxForm ) const SAL_THROW(())
{
- String sReturn;
+ OUString sReturn;
if ( !_rxForm.is() )
return sReturn;
@@ -424,11 +424,11 @@ namespace pcr
if ( aErrorInfo.isValid() )
{
- String sErrorMessage;
+ OUString sErrorMessage;
{
::svt::OLocalResourceAccess aStringAccess( PcrRes( RID_DLG_FORMLINKS ), RSC_MODALDIALOG );
sErrorMessage = PcrRes(STR_ERROR_RETRIEVING_COLUMNS).toString();
- sErrorMessage.SearchAndReplace(OUString('#'), sCommand);
+ sErrorMessage = sErrorMessage.replaceFirst("#", sCommand);
}
SQLContext aContext;
diff --git a/extensions/source/propctrlr/formlinkdialog.hxx b/extensions/source/propctrlr/formlinkdialog.hxx
index 48aa39db7213..80b3d0eb6caf 100644
--- a/extensions/source/propctrlr/formlinkdialog.hxx
+++ b/extensions/source/propctrlr/formlinkdialog.hxx
@@ -104,7 +104,7 @@ namespace pcr
::com::sun::star::uno::Sequence< OUString >& _rMasterFields
);
- String getFormDataSourceType(
+ OUString getFormDataSourceType(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxForm
) const SAL_THROW(());
diff --git a/extensions/source/propctrlr/formmetadata.cxx b/extensions/source/propctrlr/formmetadata.cxx
index b460cff34bc2..971c0c7ac971 100644
--- a/extensions/source/propctrlr/formmetadata.cxx
+++ b/extensions/source/propctrlr/formmetadata.cxx
@@ -40,17 +40,17 @@ namespace pcr
//========================================================================
struct OPropertyInfoImpl
{
- String sName;
- String sTranslation;
- OString sHelpId;
+ OUString sName;
+ OUString sTranslation;
+ OString sHelpId;
sal_Int32 nId;
sal_uInt16 nPos;
sal_uInt32 nUIFlags;
OPropertyInfoImpl(
- const OUString& rName,
+ const OUString& rName,
sal_Int32 _nId,
- const String& aTranslation,
+ const OUString& aTranslation,
sal_uInt16 nPosId,
const OString&,
sal_uInt32 _nUIFlags);
@@ -58,7 +58,7 @@ namespace pcr
//------------------------------------------------------------------------
OPropertyInfoImpl::OPropertyInfoImpl(const OUString& _rName, sal_Int32 _nId,
- const String& aString, sal_uInt16 nP, const OString& sHid, sal_uInt32 _nUIFlags)
+ const OUString& aString, sal_uInt16 nP, const OString& sHid, sal_uInt32 _nUIFlags)
:sName(_rName)
,sTranslation(aString)
,sHelpId(sHid)
@@ -74,7 +74,7 @@ namespace pcr
{
bool operator()( const OPropertyInfoImpl& _rLHS, const OPropertyInfoImpl& _rRHS )
{
- return _rLHS.sName.CompareTo( _rRHS.sName ) == COMPARE_LESS;
+ return _rLHS.sName.compareTo( _rRHS.sName ) < 0;
}
};
@@ -363,24 +363,24 @@ namespace pcr
}
//------------------------------------------------------------------------
- sal_Int32 OPropertyInfoService::getPropertyId(const String& _rName) const
+ sal_Int32 OPropertyInfoService::getPropertyId(const OUString& _rName) const
{
const OPropertyInfoImpl* pInfo = getPropertyInfo(_rName);
return pInfo ? pInfo->nId : -1;
}
//------------------------------------------------------------------------
- String OPropertyInfoService::getPropertyName( sal_Int32 _nPropId )
+ OUString OPropertyInfoService::getPropertyName( sal_Int32 _nPropId )
{
const OPropertyInfoImpl* pInfo = getPropertyInfo(_nPropId);
- return pInfo ? pInfo->sName : String();
+ return pInfo ? pInfo->sName : OUString();
}
//------------------------------------------------------------------------
- String OPropertyInfoService::getPropertyTranslation(sal_Int32 _nId) const
+ OUString OPropertyInfoService::getPropertyTranslation(sal_Int32 _nId) const
{
const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId);
- return (pInfo) ? pInfo->sTranslation : String();
+ return (pInfo) ? pInfo->sTranslation : OUString();
}
//------------------------------------------------------------------------
@@ -540,12 +540,12 @@ namespace pcr
}
//------------------------------------------------------------------------
- const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo(const String& _rName)
+ const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo(const OUString& _rName)
{
// Initialization
if(!s_pPropertyInfos)
getPropertyInfo();
- OPropertyInfoImpl aSearch(_rName, 0L, String(), 0, "", 0);
+ OPropertyInfoImpl aSearch(_rName, 0L, OUString(), 0, "", 0);
const OPropertyInfoImpl* pInfo = ::std::lower_bound(
s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() );
diff --git a/extensions/source/propctrlr/formmetadata.hxx b/extensions/source/propctrlr/formmetadata.hxx
index 1f2340614c52..d290a8c93250 100644
--- a/extensions/source/propctrlr/formmetadata.hxx
+++ b/extensions/source/propctrlr/formmetadata.hxx
@@ -45,20 +45,20 @@ namespace pcr
public:
// IPropertyInfoService
- virtual sal_Int32 getPropertyId(const String& _rName) const;
- virtual String getPropertyTranslation(sal_Int32 _nId) const;
+ virtual sal_Int32 getPropertyId(const OUString& _rName) const;
+ virtual OUString getPropertyTranslation(sal_Int32 _nId) const;
virtual OString getPropertyHelpId(sal_Int32 _nId) const;
- virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const;
- virtual sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const;
- virtual ::std::vector< OUString > getPropertyEnumRepresentations(sal_Int32 _nId) const;
- virtual String getPropertyName( sal_Int32 _nPropId );
+ virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const;
+ virtual sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const;
+ virtual ::std::vector< OUString > getPropertyEnumRepresentations(sal_Int32 _nId) const;
+ virtual OUString getPropertyName( sal_Int32 _nPropId );
virtual sal_Bool isComposeable( const OUString& _rPropertyName ) const;
protected:
static const OPropertyInfoImpl* getPropertyInfo();
- static const OPropertyInfoImpl* getPropertyInfo(const String& _rName);
+ static const OPropertyInfoImpl* getPropertyInfo(const OUString& _rName);
static const OPropertyInfoImpl* getPropertyInfo(sal_Int32 _nId);
};
diff --git a/extensions/source/propctrlr/listselectiondlg.cxx b/extensions/source/propctrlr/listselectiondlg.cxx
index 75b040df8d9f..9b4ac38deda8 100644
--- a/extensions/source/propctrlr/listselectiondlg.cxx
+++ b/extensions/source/propctrlr/listselectiondlg.cxx
@@ -38,7 +38,7 @@ namespace pcr
//====================================================================
//--------------------------------------------------------------------
ListSelectionDialog::ListSelectionDialog( Window* _pParent, const Reference< XPropertySet >& _rxListBox,
- const OUString& _rPropertyName, const String& _rPropertyUIName )
+ const OUString& _rPropertyName, const OUString& _rPropertyUIName )
:ModalDialog( _pParent, PcrRes( RID_DLG_SELECTION ) )
,m_aLabel ( this, PcrRes( FT_ENTRIES ) )
,m_aEntries ( this, PcrRes( LB_ENTRIES ) )
diff --git a/extensions/source/propctrlr/listselectiondlg.hxx b/extensions/source/propctrlr/listselectiondlg.hxx
index 79c4e9c589c6..c62473b7ec61 100644
--- a/extensions/source/propctrlr/listselectiondlg.hxx
+++ b/extensions/source/propctrlr/listselectiondlg.hxx
@@ -53,7 +53,7 @@ namespace pcr
Window* _pParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxListBox,
const OUString& _rPropertyName,
- const String& _rPropertyUIName
+ const OUString& _rPropertyUIName
);
// Dialog overridables
diff --git a/extensions/source/propctrlr/newdatatype.cxx b/extensions/source/propctrlr/newdatatype.cxx
index a61dba03d233..096166d4e93f 100644
--- a/extensions/source/propctrlr/newdatatype.cxx
+++ b/extensions/source/propctrlr/newdatatype.cxx
@@ -58,9 +58,9 @@ namespace pcr
}
}
- String sNameBase( _rNameBase.copy( 0, nStripUntil ? nStripUntil + 1 : 0 ) );
- sNameBase.Append( ' ' );
- String sInitialName;
+ OUString sNameBase( _rNameBase.copy( 0, nStripUntil ? nStripUntil + 1 : 0 ) );
+ sNameBase += " ";
+ OUString sInitialName;
sal_Int32 nPostfixNumber = 1;
do
{
@@ -75,8 +75,8 @@ namespace pcr
//--------------------------------------------------------------------
IMPL_LINK( NewDataTypeDialog, OnNameModified, void*, /*_pNotInterestedIn*/ )
{
- String sCurrentName = GetName();
- bool bNameIsOK = ( sCurrentName.Len() > 0 )
+ OUString sCurrentName = GetName();
+ bool bNameIsOK = ( !sCurrentName.isEmpty() )
&& ( m_aProhibitedNames.find( sCurrentName ) == m_aProhibitedNames.end() );
m_aOK.Enable( bNameIsOK );
diff --git a/extensions/source/propctrlr/newdatatype.hxx b/extensions/source/propctrlr/newdatatype.hxx
index b78fe3774e8a..511110810563 100644
--- a/extensions/source/propctrlr/newdatatype.hxx
+++ b/extensions/source/propctrlr/newdatatype.hxx
@@ -50,7 +50,7 @@ namespace pcr
public:
NewDataTypeDialog( Window* _pParent, const OUString& _rNameBase, const ::std::vector< OUString >& _rProhibitedNames );
- inline String GetName() const { return m_aName.GetText(); }
+ inline OUString GetName() const { return m_aName.GetText(); }
private:
DECL_LINK( OnNameModified, void* );
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 0440de348a58..a35fbc0fdba2 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -206,7 +206,7 @@ namespace pcr
}
//------------------------------------------------------------------
- sal_uInt16 OPropertyEditor::AppendPage( const String & _rText, const OString& _rHelpId )
+ sal_uInt16 OPropertyEditor::AppendPage( const OUString & _rText, const OString& _rHelpId )
{
// obtain a new id
sal_uInt16 nId = m_nNextId++;
diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx
index d8883231554d..7e1340059c2d 100644
--- a/extensions/source/propctrlr/propertyeditor.hxx
+++ b/extensions/source/propctrlr/propertyeditor.hxx
@@ -88,7 +88,7 @@ namespace pcr
void SetHelpLineLimites( sal_Int32 _nMinLines, sal_Int32 _nMaxLines );
void SetHelpId( const OString& sHelpId );
- sal_uInt16 AppendPage( const String& r, const OString& _rHelpId );
+ sal_uInt16 AppendPage( const OUString& r, const OString& _rHelpId );
void SetPage( sal_uInt16 );
void RemovePage(sal_uInt16 nID);
sal_uInt16 GetCurPage();
diff --git a/extensions/source/propctrlr/propertyinfo.hxx b/extensions/source/propctrlr/propertyinfo.hxx
index 45bcbaed6986..597a06fb8b53 100644
--- a/extensions/source/propctrlr/propertyinfo.hxx
+++ b/extensions/source/propctrlr/propertyinfo.hxx
@@ -37,15 +37,15 @@ namespace pcr
class SAL_NO_VTABLE IPropertyInfoService
{
public:
- virtual sal_Int32 getPropertyId(const String& _rName) const = 0;
- virtual String getPropertyTranslation(sal_Int32 _nId) const = 0;
+ virtual sal_Int32 getPropertyId(const OUString& _rName) const = 0;
+ virtual OUString getPropertyTranslation(sal_Int32 _nId) const = 0;
virtual OString getPropertyHelpId(sal_Int32 _nId) const = 0;
- virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const = 0;
- virtual sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const = 0;
- virtual ::std::vector< OUString > getPropertyEnumRepresentations(sal_Int32 _nId) const = 0;
+ virtual sal_Int16 getPropertyPos(sal_Int32 _nId) const = 0;
+ virtual sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const = 0;
+ virtual ::std::vector< OUString > getPropertyEnumRepresentations(sal_Int32 _nId) const = 0;
// this is only temporary, until the UNOization of the property browser is completed
- virtual String getPropertyName( sal_Int32 _nPropId ) = 0;
+ virtual OUString getPropertyName( sal_Int32 _nPropId ) = 0;
virtual ~IPropertyInfoService() { }
};
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 156b8bfe9ba4..50d409bb0f5c 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -82,7 +82,7 @@ namespace pcr
util::Time aUNOTime;
if ( !( _rValue >>= aUNOTime ) )
{
- getTypedControlWindow()->SetText( String() );
+ getTypedControlWindow()->SetText( "" );
getTypedControlWindow()->SetEmptyTime();
}
else
@@ -134,7 +134,7 @@ namespace pcr
util::Date aUNODate;
if ( !( _rValue >>= aUNODate ) )
{
- getTypedControlWindow()->SetText( String() );
+ getTypedControlWindow()->SetText( "" );
getTypedControlWindow()->SetEmptyDate();
}
else
@@ -273,7 +273,7 @@ namespace pcr
{
if ( !_rValue.hasValue() )
{
- getTypedControlWindow()->SetText( String() );
+ getTypedControlWindow()->SetText( "" );
}
else
{
@@ -597,7 +597,7 @@ namespace pcr
{
if ( !_rValue.hasValue() )
{
- getTypedControlWindow()->SetText( String() );
+ getTypedControlWindow()->SetText( "" );
getTypedControlWindow()->SetEmptyFieldValue();
}
else
@@ -648,19 +648,19 @@ namespace pcr
//==================================================================
#define LB_DEFAULT_COUNT 20
//------------------------------------------------------------------
- String MakeHexStr(sal_uInt32 nVal, sal_uInt32 nLength)
+ OUString MakeHexStr(sal_uInt32 nVal, sal_Int32 nLength)
{
- String aStr;
+ OUStringBuffer aStr;
while (nVal>0)
{
- char c=char(nVal & 0x000F);
- nVal>>=4;
- if (c<=9) c+='0';
- else c+='A'-10;
- aStr.Insert(c,0);
+ char c = char(nVal & 0x000F);
+ nVal >>= 4;
+ if (c<=9) c += '0';
+ else c += 'A' - 10;
+ aStr.insert(c,0);
}
- while (aStr.Len() < nLength) aStr.Insert('0',0);
- return aStr;
+ while (aStr.getLength() < nLength) aStr.insert('0',0);
+ return aStr.makeStringAndClear();
}
//------------------------------------------------------------------
@@ -713,7 +713,7 @@ namespace pcr
getTypedControlWindow()->SelectEntry( aRgbCol );
if ( !getTypedControlWindow()->IsEntrySelected( aRgbCol ) )
{ // the given color is not part of the list -> insert a new entry with the hex code of the color
- String aStr = OUString("0x");
+ OUString aStr("0x");
aStr += MakeHexStr(nColor,8);
getTypedControlWindow()->InsertEntry( aRgbCol, aStr );
getTypedControlWindow()->SelectEntry( aRgbCol );
@@ -1156,32 +1156,32 @@ namespace pcr
namespace
{
//..............................................................
- StlSyntaxSequence< OUString > lcl_convertMultiLineToList( const String& _rCompsedTextWithLineBreaks )
+ StlSyntaxSequence< OUString > lcl_convertMultiLineToList( const OUString& _rCompsedTextWithLineBreaks )
{
xub_StrLen nLines( comphelper::string::getTokenCount(_rCompsedTextWithLineBreaks, '\n') );
StlSyntaxSequence< OUString > aStrings( nLines );
StlSyntaxSequence< OUString >::iterator stringItem = aStrings.begin();
for ( xub_StrLen token = 0; token < nLines; ++token, ++stringItem )
- *stringItem = _rCompsedTextWithLineBreaks.GetToken( token, '\n' );
+ *stringItem = _rCompsedTextWithLineBreaks.getToken( token, '\n' );
return aStrings;
}
- String lcl_convertListToMultiLine( const StlSyntaxSequence< OUString >& _rStrings )
+ OUString lcl_convertListToMultiLine( const StlSyntaxSequence< OUString >& _rStrings )
{
- String sMultiLineText;
+ OUString sMultiLineText;
for ( StlSyntaxSequence< OUString >::const_iterator item = _rStrings.begin();
item != _rStrings.end();
)
{
- sMultiLineText += String( *item );
+ sMultiLineText += *item;
if ( ++item != _rStrings.end() )
- sMultiLineText += '\n';
+ sMultiLineText += "\n";
}
return sMultiLineText;
}
//..............................................................
- String lcl_convertListToDisplayText( const StlSyntaxSequence< OUString >& _rStrings )
+ OUString lcl_convertListToDisplayText( const StlSyntaxSequence< OUString >& _rStrings )
{
OUStringBuffer aComposed;
for ( StlSyntaxSequence< OUString >::const_iterator strings = _rStrings.begin();
@@ -1219,7 +1219,7 @@ namespace pcr
m_bDropdown=sal_True;
if ( m_nOperationMode == eMultiLineText )
m_pFloatingEdit->getEdit()->SetText( m_pImplEdit->GetText() );
- m_pImplEdit->SetText(String());
+ m_pImplEdit->SetText("");
}
else
{
@@ -1228,7 +1228,7 @@ namespace pcr
m_pFloatingEdit->Update();
// transfer the text from the floating edit to our own edit
- String sDisplayText( m_pFloatingEdit->getEdit()->GetText() );
+ OUString sDisplayText( m_pFloatingEdit->getEdit()->GetText() );
if ( m_nOperationMode == eStringList )
sDisplayText = lcl_convertListToDisplayText( lcl_convertMultiLineToList( sDisplayText ) );
@@ -1245,31 +1245,31 @@ namespace pcr
long DropDownEditControl::FindPos(long nSinglePos)
{
long nPos=0;
- String aOutput;
- String aStr=m_pFloatingEdit->getEdit()->GetText();
- String aStr1 = GetText();
+ OUString aOutput;
+ OUString aStr=m_pFloatingEdit->getEdit()->GetText();
+ OUString aStr1 = GetText();
- if ((nSinglePos == 0) || (nSinglePos == aStr1.Len()))
+ if ((nSinglePos == 0) || (nSinglePos == aStr1.getLength()))
{
return nSinglePos;
}
- if (aStr.Len()>0)
+ if (!aStr.isEmpty())
{
long nDiff=0;
sal_Int32 nCount = comphelper::string::getTokenCount(aStr, '\n');
- String aInput = aStr.GetToken(0,'\n' );
+ OUString aInput = aStr.getToken(0,'\n' );
- if (aInput.Len()>0)
+ if (!aInput.isEmpty())
{
- aOutput+='\"';
+ aOutput += "\"";
nDiff++;
- aOutput+=aInput;
- aOutput+='\"';
+ aOutput += aInput;
+ aOutput += "\"";
}
- if (nSinglePos <= aOutput.Len())
+ if (nSinglePos <= aOutput.getLength())
{
nPos=nSinglePos-nDiff;
}
@@ -1277,16 +1277,16 @@ namespace pcr
{
for (sal_Int32 i=1; i<nCount; ++i)
{
- aInput=aStr.GetToken((sal_uInt16)i, '\n');
- if (aInput.Len()>0)
+ aInput=aStr.getToken((sal_uInt16)i, '\n');
+ if (!aInput.isEmpty())
{
- aOutput += ';';
- aOutput += '\"';
+ aOutput += ";";
+ aOutput += "\"";
nDiff += 2;
aOutput += aInput;
- aOutput += '\"';
+ aOutput += "\"";
- if (nSinglePos <= aOutput.Len())
+ if (nSinglePos <= aOutput.getLength())
{
nPos=nSinglePos-nDiff;
break;
@@ -1302,8 +1302,8 @@ namespace pcr
IMPL_LINK( DropDownEditControl, ReturnHdl, OMultilineFloatingEdit*, /*pMEd*/)
{
- String aStr = m_pFloatingEdit->getEdit()->GetText();
- String aStr2 = GetText();
+ OUString aStr = m_pFloatingEdit->getEdit()->GetText();
+ OUString aStr2 = GetText();
ShowDropDown(sal_False);
if (aStr!=aStr2 || ( m_nOperationMode == eStringList ) )
diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx
index 998aade8f033..ccc356a2d63b 100644
--- a/extensions/source/propctrlr/stringrepresentation.cxx
+++ b/extensions/source/propctrlr/stringrepresentation.cxx
@@ -334,7 +334,7 @@ namespace
template < class ElementType, class Transformer >
OUString composeSequenceElements( const Sequence< ElementType >& _rElements, const Transformer& _rTransformer )
{
- String sCompose;
+ OUString sCompose;
// loop through the elements and concatenate the string representations of the integers
// (separated by a line break)
@@ -342,9 +342,9 @@ namespace
const ElementType* pElementsEnd = pElements + _rElements.getLength();
for ( ; pElements != pElementsEnd; ++pElements )
{
- sCompose += String( _rTransformer( *pElements ) );
+ sCompose += OUString( _rTransformer( *pElements ) );
if ( pElements != pElementsEnd )
- sCompose += '\n';
+ sCompose += "\n";
}
return sCompose;
@@ -531,7 +531,7 @@ bool StringRepresentation::convertStringToGenericValue( const OUString& _rString
{
uno::Type aElementType = ::comphelper::getSequenceElementType( _rTargetType );
- String aStr( _rStringRep );
+ OUString aStr( _rStringRep );
switch ( aElementType.getTypeClass() )
{
case uno::TypeClass_STRING:
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx
index d3a9f4ff2382..c0ca42f322a8 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -54,7 +54,7 @@ namespace pcr
if ((KEY_DELETE == nKey) || (KEY_BACKSPACE == nKey))
{
- SetText( String() );
+ SetText( "" );
if ( m_pHelper )
m_pHelper->ModifiedHdl( this );
return 1;
@@ -79,7 +79,7 @@ namespace pcr
{
TreatAsNumber( sal_False );
SetFormatter( NULL, sal_True );
- SetText( String() );
+ SetText( "" );
}
}
@@ -112,7 +112,7 @@ namespace pcr
getTypedControlWindow()->SetValue( pEntry ? getPreviewValue( *pEntry ) : 1234.56789 );
}
else
- getTypedControlWindow()->SetText( String() );
+ getTypedControlWindow()->SetText( "" );
}
//------------------------------------------------------------------
double OFormatSampleControl::getPreviewValue( const SvNumberformat& i_rEntry )
@@ -193,7 +193,7 @@ namespace pcr
if ( _rValue >>= nValue )
getTypedControlWindow()->SetValue( nValue );
else
- getTypedControlWindow()->SetText(String());
+ getTypedControlWindow()->SetText("");
}
//------------------------------------------------------------------
@@ -256,7 +256,7 @@ namespace pcr
{
getTypedControlWindow()->TreatAsNumber(sal_False);
getTypedControlWindow()->SetFormatter(NULL, sal_True);
- getTypedControlWindow()->SetText(String());
+ getTypedControlWindow()->SetText("");
m_nLastDecimalDigits = 0;
}
}
@@ -289,7 +289,7 @@ namespace pcr
getTypedControlWindow()->DisplayURL( sURL );
}
else
- getTypedControlWindow()->SetText( String() );
+ getTypedControlWindow()->SetText( "" );
}
//------------------------------------------------------------------
diff --git a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
index d13a4ee7120f..2594e02ee1e7 100644
--- a/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
+++ b/extensions/source/propctrlr/xsdvalidationpropertyhandler.cxx
@@ -534,8 +534,8 @@ namespace pcr
}
// confirmation message
- String sConfirmation( PcrRes( RID_STR_CONFIRM_DELETE_DATA_TYPE ).toString() );
- sConfirmation.SearchAndReplaceAscii( "#type#", pType->getName() );
+ OUString sConfirmation( PcrRes( RID_STR_CONFIRM_DELETE_DATA_TYPE ).toString() );
+ sConfirmation = sConfirmation.replaceFirst( "#type#", pType->getName() );
QueryBox aQuery( NULL, WB_YES_NO, sConfirmation ); // TODO/eForms: proper parent
if ( aQuery.Execute() != RET_YES )
return false;