Kaydet (Commit) 641cf5ed authored tarafından Noel Grandin's avatar Noel Grandin

convert svtools/source/uno/* from String to OUString

Change-Id: I40e50b3d2e659c30a3456aab17a45f5e79365bfd
üst ac3c5d29
...@@ -250,7 +250,7 @@ namespace svt { namespace table ...@@ -250,7 +250,7 @@ namespace svt { namespace table
{ {
_rDevice.Push( PUSH_LINECOLOR); _rDevice.Push( PUSH_LINECOLOR);
String sHeaderText; OUString sHeaderText;
PColumnModel const pColumn = m_pImpl->rModel.getColumnModel( _nCol ); PColumnModel const pColumn = m_pImpl->rModel.getColumnModel( _nCol );
DBG_ASSERT( !!pColumn, "GridTableRenderer::PaintColumnHeader: invalid column model object!" ); DBG_ASSERT( !!pColumn, "GridTableRenderer::PaintColumnHeader: invalid column model object!" );
if ( !!pColumn ) if ( !!pColumn )
......
...@@ -182,7 +182,7 @@ bool OGenericUnoDialog::impl_ensureDialog_lck() ...@@ -182,7 +182,7 @@ bool OGenericUnoDialog::impl_ensureDialog_lck()
pParent = pImplementation->GetWindow(); pParent = pImplementation->GetWindow();
// the title // the title
String sTitle = m_sTitle; OUString sTitle = m_sTitle;
Dialog* pDialog = createDialog( pParent ); Dialog* pDialog = createDialog( pParent );
OSL_ENSURE( pDialog, "OGenericUnoDialog::impl_ensureDialog_lck: createDialog returned nonsense!" ); OSL_ENSURE( pDialog, "OGenericUnoDialog::impl_ensureDialog_lck: createDialog returned nonsense!" );
......
...@@ -294,7 +294,7 @@ throw ( RuntimeException ) ...@@ -294,7 +294,7 @@ throw ( RuntimeException )
if ( Event.State >>= aStrValue ) if ( Event.State >>= aStrValue )
pStatusBar->SetItemText( m_nID, aStrValue ); pStatusBar->SetItemText( m_nID, aStrValue );
else if ( !Event.State.hasValue() ) else if ( !Event.State.hasValue() )
pStatusBar->SetItemText( m_nID, String() ); pStatusBar->SetItemText( m_nID, "" );
} }
} }
......
...@@ -808,7 +808,7 @@ bool ToolboxController::getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox ) ...@@ -808,7 +808,7 @@ bool ToolboxController::getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox )
for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos ) for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
{ {
const sal_uInt16 nItemId = pToolBox->GetItemId( nPos ); const sal_uInt16 nItemId = pToolBox->GetItemId( nPos );
if ( pToolBox->GetItemCommand( nItemId ) == String( m_aCommandURL ) ) if ( pToolBox->GetItemCommand( nItemId ) == m_aCommandURL )
{ {
m_nToolBoxId = nItemId; m_nToolBoxId = nItemId;
break; break;
......
...@@ -62,8 +62,8 @@ extern "C" { ...@@ -62,8 +62,8 @@ extern "C" {
SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::sun::star::awt::WindowDescriptor* pDescriptor, Window* pParent, WinBits nWinBits ) SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::sun::star::awt::WindowDescriptor* pDescriptor, Window* pParent, WinBits nWinBits )
{ {
Window* pWindow = NULL; Window* pWindow = NULL;
String aServiceName( pDescriptor->WindowServiceName ); OUString aServiceName( pDescriptor->WindowServiceName );
if ( aServiceName.EqualsIgnoreCaseAscii( "MultiLineEdit" ) ) if ( aServiceName.equalsIgnoreAsciiCaseAscii( "MultiLineEdit" ) )
{ {
if ( pParent ) if ( pParent )
{ {
...@@ -77,7 +77,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com:: ...@@ -77,7 +77,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
return NULL; return NULL;
} }
} }
else if ( aServiceName.EqualsIgnoreCaseAscii( "FileControl" ) ) else if ( aServiceName.equalsIgnoreAsciiCaseAscii( "FileControl" ) )
{ {
if ( pParent ) if ( pParent )
{ {
...@@ -90,22 +90,22 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com:: ...@@ -90,22 +90,22 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
return NULL; return NULL;
} }
} }
else if (aServiceName.EqualsIgnoreCaseAscii("FormattedField") ) else if (aServiceName.equalsIgnoreAsciiCaseAscii("FormattedField") )
{ {
pWindow = new FormattedField( pParent, nWinBits ); pWindow = new FormattedField( pParent, nWinBits );
*ppNewComp = new SVTXFormattedField; *ppNewComp = new SVTXFormattedField;
} }
else if (aServiceName.EqualsIgnoreCaseAscii("NumericField") ) else if (aServiceName.equalsIgnoreAsciiCaseAscii("NumericField") )
{ {
pWindow = new DoubleNumericField( pParent, nWinBits ); pWindow = new DoubleNumericField( pParent, nWinBits );
*ppNewComp = new SVTXNumericField; *ppNewComp = new SVTXNumericField;
} }
else if (aServiceName.EqualsIgnoreCaseAscii("LongCurrencyField") ) else if (aServiceName.equalsIgnoreAsciiCaseAscii("LongCurrencyField") )
{ {
pWindow = new DoubleCurrencyField( pParent, nWinBits ); pWindow = new DoubleCurrencyField( pParent, nWinBits );
*ppNewComp = new SVTXCurrencyField; *ppNewComp = new SVTXCurrencyField;
} }
else if (aServiceName.EqualsIgnoreCaseAscii("datefield") ) else if (aServiceName.equalsIgnoreAsciiCaseAscii("datefield") )
{ {
pWindow = new CalendarField( pParent, nWinBits); pWindow = new CalendarField( pParent, nWinBits);
static_cast<CalendarField*>(pWindow)->EnableToday(); static_cast<CalendarField*>(pWindow)->EnableToday();
...@@ -114,12 +114,12 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com:: ...@@ -114,12 +114,12 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
*ppNewComp = new SVTXDateField; *ppNewComp = new SVTXDateField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(DateField*)pWindow ); ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(DateField*)pWindow );
} }
else if (aServiceName.EqualsIgnoreCaseAscii("roadmap") ) else if (aServiceName.equalsIgnoreAsciiCaseAscii("roadmap") )
{ {
pWindow = new ::svt::ORoadmap( pParent, WB_TABSTOP ); pWindow = new ::svt::ORoadmap( pParent, WB_TABSTOP );
*ppNewComp = new SVTXRoadmap; *ppNewComp = new SVTXRoadmap;
} }
else if ( aServiceName.EqualsIgnoreCaseAscii( "ProgressBar" ) ) else if ( aServiceName.equalsIgnoreAsciiCaseAscii( "ProgressBar" ) )
{ {
if ( pParent ) if ( pParent )
{ {
...@@ -132,13 +132,13 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com:: ...@@ -132,13 +132,13 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
return NULL; return NULL;
} }
} }
else if ( aServiceName.EqualsIgnoreCaseAscii( "Tree" ) ) else if ( aServiceName.equalsIgnoreAsciiCaseAscii( "Tree" ) )
{ {
TreeControlPeer* pPeer = new TreeControlPeer; TreeControlPeer* pPeer = new TreeControlPeer;
*ppNewComp = pPeer; *ppNewComp = pPeer;
pWindow = pPeer->createVclControl( pParent, nWinBits ); pWindow = pPeer->createVclControl( pParent, nWinBits );
} }
else if ( aServiceName.EqualsIgnoreCaseAscii( "FixedHyperlink" ) ) else if ( aServiceName.equalsIgnoreAsciiCaseAscii( "FixedHyperlink" ) )
{ {
if ( pParent ) if ( pParent )
{ {
...@@ -151,7 +151,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com:: ...@@ -151,7 +151,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
return NULL; return NULL;
} }
} }
else if ( aServiceName.EqualsIgnoreCaseAscii( "Grid" ) ) else if ( aServiceName.equalsIgnoreAsciiCaseAscii( "Grid" ) )
{ {
if ( pParent ) if ( pParent )
{ {
...@@ -1060,7 +1060,6 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const ::com: ...@@ -1060,7 +1060,6 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const ::com:
{ {
OUString aStr; OUString aStr;
rValue >>= aStr; rValue >>= aStr;
String sValue = aStr;
if (pField->TreatingAsNumber()) if (pField->TreatingAsNumber())
{ {
SvNumberFormatter* pFormatter = pField->GetFormatter(); SvNumberFormatter* pFormatter = pField->GetFormatter();
...@@ -1069,9 +1068,9 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const ::com: ...@@ -1069,9 +1068,9 @@ void SVTXFormattedField::setProperty( const OUString& PropertyName, const ::com:
double dVal; double dVal;
sal_uInt32 nTestFormat(0); sal_uInt32 nTestFormat(0);
if (!pFormatter->IsNumberFormat(sValue, nTestFormat, dVal)) if (!pFormatter->IsNumberFormat(aStr, nTestFormat, dVal))
aReturn.clear(); aReturn.clear();
aReturn <<=dVal; aReturn <<= dVal;
} }
else else
aReturn <<= aStr; aReturn <<= aStr;
...@@ -1262,7 +1261,7 @@ void SVTXFormattedField::SetValue(const ::com::sun::star::uno::Any& rValue) ...@@ -1262,7 +1261,7 @@ void SVTXFormattedField::SetValue(const ::com::sun::star::uno::Any& rValue)
if (!rValue.hasValue()) if (!rValue.hasValue())
{ {
pField->SetText(String()); pField->SetText("");
} }
else else
{ {
...@@ -1278,11 +1277,10 @@ void SVTXFormattedField::SetValue(const ::com::sun::star::uno::Any& rValue) ...@@ -1278,11 +1277,10 @@ void SVTXFormattedField::SetValue(const ::com::sun::star::uno::Any& rValue)
OUString sText; OUString sText;
rValue >>= sText; rValue >>= sText;
String aStr( sText );
if (!pField->TreatingAsNumber()) if (!pField->TreatingAsNumber())
pField->SetTextFormatted(aStr); pField->SetTextFormatted(sText);
else else
pField->SetTextValue(aStr); pField->SetTextValue(sText);
} }
} }
// NotifyTextListeners(); // NotifyTextListeners();
......
...@@ -264,11 +264,11 @@ SvUnoImageMapObject::~SvUnoImageMapObject() throw() ...@@ -264,11 +264,11 @@ SvUnoImageMapObject::~SvUnoImageMapObject() throw()
IMapObject* SvUnoImageMapObject::createIMapObject() const IMapObject* SvUnoImageMapObject::createIMapObject() const
{ {
const String aURL( maURL ); const OUString aURL( maURL );
const String aAltText( maAltText ); const OUString aAltText( maAltText );
const String aDesc( maDesc ); const OUString aDesc( maDesc );
const String aTarget( maTarget ); const OUString aTarget( maTarget );
const String aName( maName ); const OUString aName( maName );
IMapObject* pNewIMapObject; IMapObject* pNewIMapObject;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment