[Libreoffice-commits] core.git: 4 commits - filter/source padmin/source pyuno/source ucb/source ucb/workben
Chr. Rossmanith
ChrRossmanith at gmx.de
Thu Mar 28 15:01:41 PDT 2013
filter/source/graphic/GraphicExportDialog.cxx | 6 +-
filter/source/graphicfilter/ipcd/ipcd.cxx | 4 -
filter/source/msfilter/escherex.cxx | 6 +-
filter/source/msfilter/eschesdo.cxx | 16 ++----
padmin/source/adddlg.cxx | 21 +++-----
padmin/source/padialog.cxx | 9 +--
padmin/source/prtsetup.cxx | 14 ++---
pyuno/source/loader/pyuno_loader.cxx | 2
pyuno/source/module/pyuno.cxx | 62 +++++++++++++-------------
pyuno/source/module/pyuno_adapter.cxx | 16 ++----
pyuno/source/module/pyuno_util.cxx | 18 +++----
ucb/source/ucp/webdav/SerfSession.cxx | 3 -
ucb/source/ucp/webdav/SerfUri.cxx | 20 ++++----
ucb/source/ucp/webdav/webdavprovider.cxx | 22 ++-------
ucb/workben/ucb/ucbdemo.cxx | 13 ++---
15 files changed, 105 insertions(+), 127 deletions(-)
New commits:
commit 5e649bc002ca49a5a3db43cf48149709d446bb0e
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Thu Mar 28 21:56:43 2013 +0100
Remove RTL_CONSTASCII_(U)STRINGPARAM in ucb
and use append() instead of appendAscii()
Change-Id: I7c9dd0e03e24a39240a82fc245b4722d4c424842
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index 32201ef..4064167 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -1222,8 +1222,7 @@ void SerfSession::abort()
// -------------------------------------------------------------------
const ucbhelper::InternetProxyServer & SerfSession::getProxySettings() const
{
- if ( m_aUri.GetScheme().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http" ) ) ||
- m_aUri.GetScheme().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "https" ) ) )
+ if ( m_aUri.GetScheme() == "http" || m_aUri.GetScheme() == "https" )
{
return m_rProxyDecider.getProxy( m_aUri.GetScheme(),
m_aUri.GetHost(),
diff --git a/ucb/source/ucp/webdav/SerfUri.cxx b/ucb/source/ucp/webdav/SerfUri.cxx
index 704d8eb..550524f 100644
--- a/ucb/source/ucp/webdav/SerfUri.cxx
+++ b/ucb/source/ucp/webdav/SerfUri.cxx
@@ -140,19 +140,19 @@ SerfUri::~SerfUri( )
void SerfUri::calculateURI ()
{
rtl::OUStringBuffer aBuf( mScheme );
- aBuf.appendAscii( "://" );
+ aBuf.append( "://" );
if ( mUserInfo.getLength() > 0 )
{
aBuf.append( mUserInfo );
- aBuf.appendAscii( "@" );
+ aBuf.append( "@" );
}
// Is host a numeric IPv6 address?
if ( ( mHostName.indexOf( ':' ) != -1 ) &&
( mHostName[ 0 ] != sal_Unicode( '[' ) ) )
{
- aBuf.appendAscii( "[" );
+ aBuf.append( "[" );
aBuf.append( mHostName );
- aBuf.appendAscii( "]" );
+ aBuf.append( "]" );
}
else
{
@@ -164,16 +164,16 @@ void SerfUri::calculateURI ()
switch ( mPort )
{
case DEFAULT_HTTP_PORT:
- bAppendPort = !mScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http" ) );
+ bAppendPort = (mScheme != "http");
break;
case DEFAULT_HTTPS_PORT:
- bAppendPort = !mScheme.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "https" ) );
+ bAppendPort = (mScheme != "https");
break;
}
if ( bAppendPort )
{
- aBuf.appendAscii( ":" );
+ aBuf.append( ":" );
aBuf.append( rtl::OUString::valueOf( mPort ) );
}
aBuf.append( mPath );
@@ -256,9 +256,9 @@ rtl::OUString SerfUri::makeConnectionEndPointString(
if ( ( rHostName.indexOf( ':' ) != -1 ) &&
( rHostName[ 0 ] != sal_Unicode( '[' ) ) )
{
- aBuf.appendAscii( "[" );
+ aBuf.append( "[" );
aBuf.append( rHostName );
- aBuf.appendAscii( "]" );
+ aBuf.append( "]" );
}
else
{
@@ -267,7 +267,7 @@ rtl::OUString SerfUri::makeConnectionEndPointString(
if ( ( nPort != DEFAULT_HTTP_PORT ) && ( nPort != DEFAULT_HTTPS_PORT ) )
{
- aBuf.appendAscii( ":" );
+ aBuf.append( ":" );
aBuf.append( rtl::OUString::valueOf( sal_Int32( nPort ) ) );
}
return aBuf.makeStringAndClear();
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index 07d1e9a..21befa3 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -109,16 +109,9 @@ ContentProvider::queryContent(
const rtl::OUString aScheme
= Identifier->getContentProviderScheme().toAsciiLowerCase();
- if ( !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( HTTP_URL_SCHEME ) ) &&
- !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( HTTPS_URL_SCHEME ) ) &&
- !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) &&
- !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) &&
- !aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) )
+ if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME &&
+ aScheme != WEBDAV_URL_SCHEME && aScheme != DAV_URL_SCHEME &&
+ aScheme != DAVS_URL_SCHEME )
throw ucb::IllegalIdentifierException();
// Normalize URL and create new Id, if nessacary.
@@ -136,8 +129,7 @@ ContentProvider::queryContent(
uno::Reference< ucb::XContentIdentifier > xCanonicId;
bool bNewId = false;
- if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( WEBDAV_URL_SCHEME ) ) )
+ if ( aScheme == WEBDAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
WEBDAV_URL_SCHEME_LENGTH,
@@ -145,8 +137,7 @@ ContentProvider::queryContent(
HTTP_URL_SCHEME ) );
bNewId = true;
}
- else if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAV_URL_SCHEME ) ) )
+ else if ( aScheme == DAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAV_URL_SCHEME_LENGTH,
@@ -154,8 +145,7 @@ ContentProvider::queryContent(
HTTP_URL_SCHEME ) );
bNewId = true;
}
- else if ( aScheme.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( DAVS_URL_SCHEME ) ) )
+ else if ( aScheme == DAVS_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAVS_URL_SCHEME_LENGTH,
diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx
index fd58609..27fd415 100644
--- a/ucb/workben/ucb/ucbdemo.cxx
+++ b/ucb/workben/ucb/ucbdemo.cxx
@@ -1096,12 +1096,10 @@ void UcbContent::open( const rtl::OUString & rName, const OUString& rInput,
if ( bPrint )
{
if ( !bFolder && xRow->wasNull() )
- aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM(
- "<null>" ) );
+ aText.AppendAscii( "<null>" );
else
aText += bFolder ? OUString("true") : OUString("false");
- aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM(
- " : " ) );
+ aText.AppendAscii( " : " );
}
// IsDocument:
@@ -1109,8 +1107,7 @@ void UcbContent::open( const rtl::OUString & rName, const OUString& rInput,
if ( bPrint )
{
if ( !bFolder && xRow->wasNull() )
- aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM(
- "<null>" ) );
+ aText.AppendAscii( "<null>" );
else
aText
+= bDocument ? OUString("true") : OUString("false"); // IsDocument
@@ -1606,12 +1603,12 @@ void SAL_CALL UcbContent::contentEvent( const ucb::ContentEvent& evt )
aMatch += String(evt.Id->getContentIdentifier());
if (evt.Content.is())
{
- aMatch.AppendAscii(RTL_CONSTASCII_STRINGPARAM(" - "));
+ aMatch.AppendAscii(" - ");
aMatch += String(evt.Content->getContentType());
}
}
else
- aMatch.AppendAscii(RTL_CONSTASCII_STRINGPARAM("<no id>"));
+ aMatch.AppendAscii("<no id>");
print(aMatch);
break;
}
commit 46dfe0bce41de411ed14b21c24c849cc7e5f4b81
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Thu Mar 28 21:51:36 2013 +0100
Remove RTL_CONSTASCII_(U)STRINGPARAM in filter
Change-Id: I6522800280725605d7ef245544975aca9c6106ed
diff --git a/filter/source/graphic/GraphicExportDialog.cxx b/filter/source/graphic/GraphicExportDialog.cxx
index 23a5e20..9d3af13 100644
--- a/filter/source/graphic/GraphicExportDialog.cxx
+++ b/filter/source/graphic/GraphicExportDialog.cxx
@@ -141,16 +141,16 @@ void GraphicExportDialog::setSourceDocument( const Reference<XComponent>& xDocum
if ( !aConfigPath.isEmpty() )
{
FilterConfigItem aConfigItem( aConfigPath );
- String aPropertyName;
+ OUString aPropertyName;
SvtSysLocale aSysLocale;
if ( aSysLocale.GetLocaleDataPtr()->getMeasurementSystemEnum() == MEASURE_METRIC )
{
- aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "Metric" ) );
+ aPropertyName = OUString( "Metric" );
}
else
{
- aPropertyName = String( RTL_CONSTASCII_USTRINGPARAM( "NonMetric" ) );
+ aPropertyName = OUString( "NonMetric" );
}
meFieldUnit = (FieldUnit) aConfigItem.ReadInt32( aPropertyName, FUNIT_CM );
}
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 0b44cda..f4c3f49 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -108,7 +108,7 @@ sal_Bool PCDReader::ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem )
eResolution = PCDRES_BASE;
if ( pConfigItem )
{
- sal_Int32 nResolution = pConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), 2 );
+ sal_Int32 nResolution = pConfigItem->ReadInt32( "Resolution", 2 );
if ( nResolution == 1 )
eResolution = PCDRES_BASE4;
else if ( nResolution == 0 )
@@ -177,7 +177,7 @@ void PCDReader::CheckPCDImagePacFile()
m_rPCD.Seek( 2048 );
m_rPCD.Read( Buf, 7 );
Buf[ 7 ] = 0;
- if (!rtl::OString(Buf).equalsL(RTL_CONSTASCII_STRINGPARAM("PCD_IPI")))
+ if (rtl::OString(Buf) != "PCD_IPI")
bStatus = sal_False;
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 45e0d08..f3944cf 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -969,7 +969,7 @@ void EscherPropertyContainer::CreateLineProperties(
AddOpt( ESCHER_Prop_lineJoinStyle, eLineJoin );
if ( EscherPropertyValueHelper::GetPropertyValue(
- aAny, rXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "LineTransparence" ) ), sal_True ) )
+ aAny, rXPropSet, "LineTransparence", sal_True ) )
{
sal_Int16 nTransparency = 0;
if ( aAny >>= nTransparency )
@@ -3035,7 +3035,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
}
}
//export gTextAlign attr
- if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "TextHorizontalAdjust" ) ), sal_True ) )
+ if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, "TextHorizontalAdjust", sal_True ) )
{
MSO_GeoTextAlign gTextAlign = mso_alignTextCenter;
drawing::TextHorizontalAdjust eHA( drawing::TextHorizontalAdjust_LEFT );
@@ -4090,7 +4090,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
{
bool bRectangularConnection = true;
- if (aType.equalsL(RTL_CONSTASCII_STRINGPARAM("drawing.Custom")))
+ if (aType == "drawing.Custom")
{
SdrObject* pCustoShape( GetSdrObjectFromXShape( aXShape ) );
if ( pCustoShape && pCustoShape->ISA( SdrObjCustomShape ) )
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 1e918cc..b99360a 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -201,9 +201,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
::cppu::any2bool( rObj.GetUsrAny() ) ) ||
rObj.GetType().EqualsAscii( "drawing.Measure" ) )
{
- rObj.SetType( String( RTL_CONSTASCII_STRINGPARAM(
- "drawing.dontknow" ),
- RTL_TEXTENCODING_MS_1252 ));
+ rObj.SetType( String("drawing.dontknow"));
}
const ::com::sun::star::awt::Size aSize100thmm( rObj.GetShapeRef()->getSize() );
@@ -242,7 +240,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if ( sCustomShapeType == "col-502ad400" || sCustomShapeType == "col-60da8460" )
{
ADD_SHAPE( ESCHER_ShpInst_PictureFrame, 0xa00 );
- if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "MetaFile" ) ), sal_False ) )
+ if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, "MetaFile", sal_False ) )
{
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100000 ); // no fill
@@ -517,7 +515,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
have to create a simpe Rectangle with fill bitmap instead (while not allowing BitmapMode_Repeat).
*/
ADD_SHAPE( ESCHER_ShpInst_Rectangle, 0xa00 ); // Flags: Connector | HasSpt
- if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "GraphicURL" ) ), sal_True, sal_True, sal_False ) )
+ if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, "GraphicURL", sal_True, sal_True, sal_False ) )
{
aPropOpt.AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapNone );
aPropOpt.AddOpt( ESCHER_Prop_AnchorText, ESCHER_AnchorMiddle );
@@ -533,7 +531,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
else
{
ADD_SHAPE( ESCHER_ShpInst_PictureFrame, 0xa00 );
- if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "GraphicURL" ) ), sal_False, sal_True ) )
+ if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, "GraphicURL", sal_False, sal_True ) )
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
}
}
@@ -602,7 +600,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
mpEscherEx->OpenContainer( ESCHER_SpContainer );
ADD_SHAPE( ESCHER_ShpInst_PictureFrame, 0xa00 );
- if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Bitmap" ) ), sal_False ) )
+ if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, "Bitmap", sal_False ) )
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
}
else if ( rObj.GetType().EqualsAscii( "drawing.Caption" ))
@@ -610,7 +608,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
rObj.SetAngle( 0 );
mpEscherEx->OpenContainer( ESCHER_SpContainer );
ADD_SHAPE( ESCHER_ShpInst_TextBox, 0xa00 );
- if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "MetaFile" ) ), sal_False ) )
+ if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, "MetaFile", sal_False ) )
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
}
else if ( rObj.GetType().EqualsAscii( "drawing.dontknow" ))
@@ -618,7 +616,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
rObj.SetAngle( 0 );
mpEscherEx->OpenContainer( ESCHER_SpContainer );
ADD_SHAPE( ESCHER_ShpInst_PictureFrame, 0xa00 );
- if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "MetaFile" ) ), sal_False ) )
+ if ( aPropOpt.CreateGraphicProperties( rObj.mXPropSet, "MetaFile", sal_False ) )
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
}
else
commit 6833a02def7ff76ce8d5e0588da65023f03ac377
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Thu Mar 28 21:35:39 2013 +0100
Remove RTL_CONSTASCII_(U)STRINGPARAM in padmin
Change-Id: Icdf78be74a1ce82de50772e9424dbc172f355484
diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index 12c4efa..d930384 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -506,8 +506,8 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
rtl::OString aDriver(aValue.getToken(0, ' '));
rtl::OString aPS( aValue.getToken(0, ',').getToken(1, ' ') );
rtl::OString aNewDriver(aDriver);
- if( aDriver.equalsL(RTL_CONSTASCII_STRINGPARAM("GENERIC")))
- aNewDriver = rtl::OString(RTL_CONSTASCII_STRINGPARAM("SGENPRT"));
+ if( aDriver == "GENERIC")
+ aNewDriver = rtl::OString("SGENPRT");
if( aPS != "PostScript" )
continue;
@@ -547,7 +547,7 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
// read the printer settings
rtl::OStringBuffer aGroup(aDriver);
- aGroup.append(RTL_CONSTASCII_STRINGPARAM(",PostScript,"));
+ aGroup.append(",PostScript,");
aGroup.append(aPort);
aConfig.SetGroup(aGroup.makeStringAndClear());
@@ -598,13 +598,12 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
// should never have been writte because they are defaults
// PageRegion leads to problems in conjunction
// with a not matching PageSize
- if (aPPDKey.matchL(RTL_CONSTASCII_STRINGPARAM("PPD_")) &&
- !aPPDKey.equalsL(RTL_CONSTASCII_STRINGPARAM("PPD_PageRegion")))
+ if (aPPDKey.match("PPD_") && aPPDKey != "PPD_PageRegion")
{
aValue = aConfig.ReadKey( nPPDKey );
aPPDKey = aPPDKey.copy(4);
const PPDKey* pKey = aInfo.m_pParser->getKey( rtl::OStringToOUString(aPPDKey, RTL_TEXTENCODING_ISO_8859_1) );
- const PPDValue* pValue = pKey ? ( aValue.equalsL(RTL_CONSTASCII_STRINGPARAM("*nil")) ? NULL : pKey->getValue(rtl::OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)) ) : NULL;
+ const PPDValue* pValue = pKey ? ( aValue == "*nil" ? NULL : pKey->getValue(rtl::OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)) ) : NULL;
if( pKey )
aInfo.m_aContext.setValue( pKey, pValue, true );
}
@@ -1087,18 +1086,16 @@ String AddPrinterDialog::getOldPrinterLocation()
if( pHome )
{
aFileName = rtl::OStringBuffer().append(pHome).
- append(RTL_CONSTASCII_STRINGPARAM("/.Xpdefaults")).
- makeStringAndClear();
+ append("/.Xpdefaults").makeStringAndClear();
if (access(aFileName.getStr(), F_OK))
{
aFileName = rtl::OStringBuffer().append(pHome).
- append(RTL_CONSTASCII_STRINGPARAM("/.sversionrc")).
- makeStringAndClear();
+ append("/.sversionrc").makeStringAndClear();
Config aSVer(rtl::OStringToOUString(aFileName, aEncoding));
aSVer.SetGroup( "Versions" );
aFileName = aSVer.ReadKey( "StarOffice 5.2" );
if (!aFileName.isEmpty())
- aFileName = aFileName + rtl::OString(RTL_CONSTASCII_STRINGPARAM("/share/xp3/Xpdefaults"));
+ aFileName = aFileName + rtl::OString("/share/xp3/Xpdefaults");
else if(
(aFileName = aSVer.ReadKey( "StarOffice 5.1" ) ).getLength()
||
@@ -1107,7 +1104,7 @@ String AddPrinterDialog::getOldPrinterLocation()
(aFileName = aSVer.ReadKey( "StarOffice 4.0" ) ).getLength()
)
{
- aFileName = aFileName + rtl::OString(RTL_CONSTASCII_STRINGPARAM("/xp3/Xpdefaults"));
+ aFileName = aFileName + rtl::OString("/xp3/Xpdefaults");
}
if (!aFileName.isEmpty() && access(aFileName.getStr(), F_OK))
aFileName = rtl::OString();
diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx
index bf89597..fc04a2c 100644
--- a/padmin/source/padialog.cxx
+++ b/padmin/source/padialog.cxx
@@ -408,7 +408,7 @@ void SpaPrinterController::printPage( int ) const
Size( aPaperSize.Width()-600,
aPaperSize.Height()-600 ) ) );
- Font aFont( String( RTL_CONSTASCII_USTRINGPARAM( "Courier" ) ), Size( 0, 400 ) );
+ Font aFont( String( "Courier" ), Size( 0, 400 ) );
aFont.SetWeight( WEIGHT_NORMAL );
aFont.SetItalic( ITALIC_NONE );
pPrinter->SetFont( aFont );
@@ -458,7 +458,7 @@ void SpaPrinterController::printPage( int ) const
if( pPrintParser )
aPrintText.append( pPrintParser->getPrinterName() );
aPrintText.appendAscii( "\n: " );
- INetURLObject aDriverPath( pPrintParser ? pPrintParser->getFilename() : String( RTL_CONSTASCII_USTRINGPARAM( "<undef>" ) ),
+ INetURLObject aDriverPath( pPrintParser ? pPrintParser->getFilename() : String( "<undef>" ),
INET_PROT_FILE, INetURLObject::ENCODE_ALL );
aPrintText.append( aDriverPath.GetName() );
aPrintText.appendAscii( "\n: " );
@@ -581,8 +581,7 @@ void PADialog::PrintTestPage()
boost::shared_ptr<vcl::PrinterController> pController( new SpaPrinterController( pPrinter ) );
JobSetup aJobSetup( pPrinter->GetJobSetup() );
- aJobSetup.SetValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsQuickJob" ) ),
- String( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) );
+ aJobSetup.SetValue( "IsQuickJob", "true" );
Printer::PrintJob( pController, aJobSetup );
}
@@ -605,7 +604,7 @@ void PADialog::RemDevice()
if( ! m_rPIManager.removePrinter( aPrinter ) )
{
String aText( PaResId( RID_ERR_PRINTERNOTREMOVEABLE ) );
- aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), aPrinter );
+ aText.SearchAndReplace( String( "%s" ), aPrinter );
ErrorBox aBox( this, WB_OK | WB_DEF_OK, aText );
aBox.Execute();
return;
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 2f136c9..7d58ff9 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -95,7 +95,7 @@ RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool
get(m_pTabControl, "notebook");
String aTitle( GetText() );
- aTitle.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), m_aJobData.m_aPrinterName );
+ aTitle.SearchAndReplace( String( "%s" ), m_aJobData.m_aPrinterName );
SetText( aTitle );
if( ! bAllPages )
@@ -259,7 +259,7 @@ void RTSPaperPage::update()
// duplex
if( m_pParent->m_aJobData.m_pParser &&
- (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) )) )
+ (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "Duplex" ) )) )
{
m_pParent->insertAllPPDValues( *m_pDuplexBox, m_pParent->m_aJobData.m_pParser, pKey );
}
@@ -271,7 +271,7 @@ void RTSPaperPage::update()
// paper
if( m_pParent->m_aJobData.m_pParser &&
- (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) )) )
+ (pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "PageSize" ) )) )
{
m_pParent->insertAllPPDValues( *m_pPaperBox, m_pParent->m_aJobData.m_pParser, pKey );
}
@@ -302,17 +302,17 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox )
if( pBox == m_pPaperBox )
{
if( m_pParent->m_aJobData.m_pParser )
- pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
+ pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "PageSize" ) );
}
else if( pBox == m_pDuplexBox )
{
if( m_pParent->m_aJobData.m_pParser )
- pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
+ pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "Duplex" ) );
}
else if( pBox == m_pSlotBox )
{
if( m_pParent->m_aJobData.m_pParser )
- pKey = m_pParent->m_aJobData.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
+ pKey = m_pParent->m_aJobData.m_pParser->getKey( String( "InputSlot" ) );
}
else if( pBox == m_pOrientBox )
{
@@ -800,7 +800,7 @@ RTSPWDialog::RTSPWDialog( const OString& rServer, const OString& rUserName, Wind
{
FreeResource();
String aText( m_aText.GetText() );
- aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), OStringToOUString( rServer, osl_getThreadTextEncoding() ) );
+ aText.SearchAndReplace( String( "%s" ), OStringToOUString( rServer, osl_getThreadTextEncoding() ) );
m_aText.SetText( aText );
m_aUserEdit.SetText( OStringToOUString( rUserName, osl_getThreadTextEncoding() ) );
}
commit 8333cbf2a3940abd0ed6b6bbb2ac25513f86a2fd
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Thu Mar 28 21:22:54 2013 +0100
Remove RTL_CONSTASCII_(U)STRINGPARAM in pyuno
and use append() instead of appendAscii()
Change-Id: Iaf29a2f18eff39db5d1b5cc298cce23442ac51a9
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 07d0cc6..9a9fb63 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -184,7 +184,7 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c
{
OUString pythonPath;
OUString pythonHome;
- OUString path( RTL_CONSTASCII_USTRINGPARAM( "$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("pythonloader.uno" )));
+ OUString path( "$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("pythonloader.uno" ));
rtl::Bootstrap::expandMacros(path); //TODO: detect failure
rtl::Bootstrap bootstrap(path);
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index d42aa20..cf18d9c 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -83,41 +83,41 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
{
case typelib_TypeClass_INTERFACE:
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") );
+ buf.append( "0x" );
buf.append( reinterpret_cast< sal_IntPtr >(*(void **)pVal), 16 );
if( VAL2STR_MODE_DEEP == mode )
{
- buf.appendAscii( "{" ); Reference< XInterface > r = *( Reference< XInterface > * ) pVal;
+ buf.append( "{" ); Reference< XInterface > r = *( Reference< XInterface > * ) pVal;
Reference< XServiceInfo > serviceInfo( r, UNO_QUERY);
Reference< XTypeProvider > typeProvider(r,UNO_QUERY);
if( serviceInfo.is() )
{
- buf.appendAscii("implementationName=" );
+ buf.append("implementationName=" );
buf.append(serviceInfo->getImplementationName() );
- buf.appendAscii(", supportedServices={" );
+ buf.append(", supportedServices={" );
Sequence< OUString > seq = serviceInfo->getSupportedServiceNames();
for( int i = 0 ; i < seq.getLength() ; i ++ )
{
buf.append( seq[i] );
if( i +1 != seq.getLength() )
- buf.appendAscii( "," );
+ buf.append( "," );
}
- buf.appendAscii("}");
+ buf.append("}");
}
if( typeProvider.is() )
{
- buf.appendAscii(", supportedInterfaces={" );
+ buf.append(", supportedInterfaces={" );
Sequence< Type > seq (typeProvider->getTypes());
for( int i = 0 ; i < seq.getLength() ; i ++ )
{
buf.append(seq[i].getTypeName());
if( i +1 != seq.getLength() )
- buf.appendAscii( "," );
+ buf.append( "," );
}
- buf.appendAscii("}");
+ buf.append("}");
}
- buf.appendAscii( "}" );
+ buf.append( "}" );
}
break;
@@ -129,7 +129,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION:
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("{ ") );
+ buf.append( "{ " );
typelib_TypeDescription * pTypeDescr = 0;
TYPELIB_DANGER_GET( &pTypeDescr, pTypeRef );
OSL_ASSERT( pTypeDescr );
@@ -141,7 +141,7 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
{
buf.append( val2str( pVal, ((typelib_TypeDescription *)pCompType->pBaseTypeDescription)->pWeakRef,mode ) );
if (nDescr)
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(", ") );
+ buf.append( ", " );
}
typelib_TypeDescriptionReference ** ppTypeRefs = pCompType->ppTypeRefs;
@@ -151,18 +151,18 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
for ( sal_Int32 nPos = 0; nPos < nDescr; ++nPos )
{
buf.append( ppMemberNames[nPos] );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" = ") );
+ buf.append( " = " );
typelib_TypeDescription * pMemberType = 0;
TYPELIB_DANGER_GET( &pMemberType, ppTypeRefs[nPos] );
buf.append( val2str( (char *)pVal + pMemberOffsets[nPos], pMemberType->pWeakRef, mode ) );
TYPELIB_DANGER_RELEASE( pMemberType );
if (nPos < (nDescr -1))
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(", ") );
+ buf.append( ", " );
}
TYPELIB_DANGER_RELEASE( pTypeDescr );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" }") );
+ buf.append( " }" );
break;
}
case typelib_TypeClass_SEQUENCE:
@@ -179,30 +179,30 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
if (nElements)
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("{ ") );
+ buf.append( "{ " );
char * pElements = pSequence->elements;
for ( sal_Int32 nPos = 0; nPos < nElements; ++nPos )
{
buf.append( val2str( pElements + (nElementSize * nPos), pElementTypeDescr->pWeakRef, mode ) );
if (nPos < (nElements -1))
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(", ") );
+ buf.append( ", " );
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" }") );
+ buf.append( " }" );
}
else
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("{}") );
+ buf.append( "{}" );
}
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
TYPELIB_DANGER_RELEASE( pTypeDescr );
break;
}
case typelib_TypeClass_ANY:
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("{ ") );
+ buf.append( "{ " );
buf.append( val2str( ((uno_Any *)pVal)->pData,
((uno_Any *)pVal)->pType ,
mode) );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" }") );
+ buf.append( " }" );
break;
case typelib_TypeClass_TYPE:
buf.append( (*(typelib_TypeDescriptionReference **)pVal)->pTypeName );
@@ -234,9 +234,9 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
}
case typelib_TypeClass_BOOLEAN:
if (*(sal_Bool *)pVal)
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("true") );
+ buf.append( "true" );
else
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("false") );
+ buf.append( "false" );
break;
case typelib_TypeClass_CHAR:
buf.append( (sal_Unicode)'\'' );
@@ -250,28 +250,28 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef
buf.append( *(double *)pVal );
break;
case typelib_TypeClass_BYTE:
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") );
+ buf.append( "0x" );
buf.append( (sal_Int32)*(sal_Int8 *)pVal, 16 );
break;
case typelib_TypeClass_SHORT:
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") );
+ buf.append( "0x" );
buf.append( (sal_Int32)*(sal_Int16 *)pVal, 16 );
break;
case typelib_TypeClass_UNSIGNED_SHORT:
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") );
+ buf.append( "0x" );
buf.append( (sal_Int32)*(sal_uInt16 *)pVal, 16 );
break;
case typelib_TypeClass_LONG:
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") );
+ buf.append( "0x" );
buf.append( *(sal_Int32 *)pVal, 16 );
break;
case typelib_TypeClass_UNSIGNED_LONG:
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") );
+ buf.append( "0x" );
buf.append( (sal_Int64)*(sal_uInt32 *)pVal, 16 );
break;
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") );
+ buf.append( "0x" );
#if defined(__GNUC__) && defined(SPARC)
// I guess this really should check if there are strict alignment
// requirements, not just "GCC on SPARC".
@@ -338,9 +338,9 @@ PyObject *PyUNO_invoke( PyObject *object, const char *name , PyObject *args )
if (! me->members->xInvocation->hasMethod (attrName))
{
OUStringBuffer buf;
- buf.appendAscii( "Attribute " );
+ buf.append( "Attribute " );
buf.append( attrName );
- buf.appendAscii( " unknown" );
+ buf.append( " unknown" );
throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface > () );
}
callable = PyUNO_callable_new (
diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx
index 968f52b..e987a7e 100644
--- a/pyuno/source/module/pyuno_adapter.cxx
+++ b/pyuno/source/module/pyuno_adapter.cxx
@@ -128,7 +128,7 @@ Sequence< sal_Int16 > Adapter::getOutIndexes( const OUString & functionName )
if( !introspection.is() )
{
throw RuntimeException(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "pyuno bridge: Couldn't inspect uno adapter ( the python class must implement com.sun.star.lang.XTypeProvider !)" ) ),
+ OUString( "pyuno bridge: Couldn't inspect uno adapter ( the python class must implement com.sun.star.lang.XTypeProvider !)" ),
Reference< XInterface > () );
}
@@ -270,10 +270,8 @@ Any Adapter::invoke( const OUString &aFunctionName,
if( ! ( ret >>= seq ) )
{
throw RuntimeException(
- (OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "pyuno bridge: Couldn't extract out"
- " parameters for method "))
+ (OUString("pyuno bridge: Couldn't extract out"
+ " parameters for method ")
+ aFunctionName),
Reference< XInterface > () );
}
@@ -281,13 +279,13 @@ Any Adapter::invoke( const OUString &aFunctionName,
if( aOutParamIndex.getLength() +1 != seq.getLength() )
{
OUStringBuffer buf;
- buf.appendAscii( "pyuno bridge: expected for method " );
+ buf.append( "pyuno bridge: expected for method " );
buf.append( aFunctionName );
- buf.appendAscii( " one return value and " );
+ buf.append( " one return value and " );
buf.append( (sal_Int32) aOutParamIndex.getLength() );
- buf.appendAscii( " out parameters, got a sequence of " );
+ buf.append( " out parameters, got a sequence of " );
buf.append( seq.getLength() );
- buf.appendAscii( " elements as return value." );
+ buf.append( " elements as return value." );
throw RuntimeException(buf.makeStringAndClear(), *this );
}
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx
index 6d56279..0b0d6ef 100644
--- a/pyuno/source/module/pyuno_util.cxx
+++ b/pyuno/source/module/pyuno_util.cxx
@@ -183,9 +183,9 @@ void logException( RuntimeCargo *cargo, const char *intro,
rtl::OUStringBuffer buf( 128 );
buf.appendAscii( intro );
appendPointer(buf, ptr);
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("].") );
+ buf.append( "]." );
buf.append( aFunctionName );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ) );
+ buf.append( " = " );
buf.append(
val2str( data, type.getTypeLibType(), VAL2STR_MODE_SHALLOW ) );
log( cargo,LogLevel::CALL, buf.makeStringAndClear() );
@@ -204,16 +204,16 @@ void logReply(
rtl::OUStringBuffer buf( 128 );
buf.appendAscii( intro );
appendPointer(buf, ptr);
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("].") );
+ buf.append( "]." );
buf.append( aFunctionName );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("()=") );
+ buf.append( "()=" );
if( isLog( cargo, LogLevel::ARGS ) )
{
buf.append(
val2str( returnValue.getValue(), returnValue.getValueTypeRef(), VAL2STR_MODE_SHALLOW) );
for( int i = 0; i < aParams.getLength() ; i ++ )
{
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(", " ) );
+ buf.append( ", " );
buf.append(
val2str( aParams[i].getValue(), aParams[i].getValueTypeRef(), VAL2STR_MODE_SHALLOW) );
}
@@ -229,20 +229,20 @@ void logCall( RuntimeCargo *cargo, const char *intro,
rtl::OUStringBuffer buf( 128 );
buf.appendAscii( intro );
appendPointer(buf, ptr);
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("].") );
+ buf.append( "]." );
buf.append( aFunctionName );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("(") );
+ buf.append( "(" );
if( isLog( cargo, LogLevel::ARGS ) )
{
for( int i = 0; i < aParams.getLength() ; i ++ )
{
if( i > 0 )
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(", " ) );
+ buf.append( ", " );
buf.append(
val2str( aParams[i].getValue(), aParams[i].getValueTypeRef(), VAL2STR_MODE_SHALLOW) );
}
}
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(")") );
+ buf.append( ")" );
log( cargo,LogLevel::CALL, buf.makeStringAndClear() );
}
More information about the Libreoffice-commits
mailing list