diff options
author | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2013-01-12 09:52:53 +0100 |
---|---|---|
committer | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2013-01-12 10:00:01 +0100 |
commit | 24a2aa1403bd71261a6e21e8cbbd2232257c87e6 (patch) | |
tree | f8c82a664099b68b214d9e6bb7ff48a49434ea35 /vcl | |
parent | d928a8198a4ec9a45228b18bfb221195bdae6bbd (diff) |
RTL_CONSTASCII_(U)STRINGPARAM removed in vcl/source/filter
Change-Id: I5d9b930cb00e485d157ba95ff344fc93c29b54ec
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/FilterConfigCache.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/FilterConfigItem.cxx | 16 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 30 | ||||
-rw-r--r-- | vcl/source/filter/igif/gifread.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/ixbm/xbmread.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/jpeg.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/sgvtext.cxx | 30 | ||||
-rw-r--r-- | vcl/source/filter/wmf/emfwr.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 8 |
9 files changed, 50 insertions, 54 deletions
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index 705daed4f783..344dba9ac7c2 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -190,10 +190,10 @@ void FilterConfigCache::ImplInit() xFilterSet->getPropertyValue(SFLAGS) >>= lFlags; if (lFlags.getLength()!=1 || lFlags[0].isEmpty()) continue; - if (lFlags[0].equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("import"))) + if (lFlags[0].equalsIgnoreAsciiCase("import")) aEntry.nFlags = 1; else - if (lFlags[0].equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("export"))) + if (lFlags[0].equalsIgnoreAsciiCase("export")) aEntry.nFlags = 2; OUString sUIComponent; diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx index bd7d7c5985c0..6423a90073e0 100644 --- a/vcl/source/filter/FilterConfigItem.cxx +++ b/vcl/source/filter/FilterConfigItem.cxx @@ -61,7 +61,7 @@ static sal_Bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv // creation arguments: nodepath PropertyValue aPathArgument; - aPathArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + aPathArgument.Name = OUString( "nodepath" ); aPathArgument.Value = aAny; Sequence< Any > aArguments( 1 ); @@ -71,7 +71,7 @@ static sal_Bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv try { xReadAccess = rXCfgProv->createInstanceWithArguments( - OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" ) ), + OUString( "com.sun.star.configuration.ConfigurationAccess" ), aArguments ); } catch (const ::com::sun::star::uno::Exception&) @@ -119,23 +119,21 @@ void FilterConfigItem::ImpInitTree( const String& rSubTree ) Reference< XMultiServiceFactory > xCfgProv = theDefaultProvider::get( xContext ); - OUString sTree( - OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.")) + - rSubTree); + OUString sTree(OUString("/org.openoffice.") + rSubTree); if ( ImpIsTreeAvailable(xCfgProv, sTree) ) { Any aAny; // creation arguments: nodepath PropertyValue aPathArgument; aAny <<= sTree; - aPathArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + aPathArgument.Name = OUString( "nodepath" ); aPathArgument.Value = aAny; // creation arguments: commit mode PropertyValue aModeArgument; sal_Bool bAsyncron = sal_True; aAny <<= bAsyncron; - aModeArgument.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "lazywrite" ) ); + aModeArgument.Name = OUString( "lazywrite" ); aModeArgument.Value = aAny; Sequence< Any > aArguments( 2 ); @@ -145,7 +143,7 @@ void FilterConfigItem::ImpInitTree( const String& rSubTree ) try { xUpdatableView = xCfgProv->createInstanceWithArguments( - OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationUpdateAccess" ) ), + OUString( "com.sun.star.configuration.ConfigurationUpdateAccess" ), aArguments ); if ( xUpdatableView.is() ) xPropSet = Reference< XPropertySet >( xUpdatableView, UNO_QUERY ); @@ -422,7 +420,7 @@ Sequence< PropertyValue > FilterConfigItem::GetFilterData() const Reference< XStatusIndicator > FilterConfigItem::GetStatusIndicator() const { Reference< XStatusIndicator > xStatusIndicator; - const rtl::OUString sStatusIndicator( RTL_CONSTASCII_USTRINGPARAM( "StatusIndicator" ) ); + const rtl::OUString sStatusIndicator( "StatusIndicator" ); sal_Int32 i, nCount = aFilterData.getLength(); for ( i = 0; i < nCount; i++ ) diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index bacf6f8b50c9..d51046294809 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -146,7 +146,7 @@ static void KillDirEntry( const String& rMainUrl ) ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); - aCnt.executeCommand( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )), + aCnt.executeCommand( "delete", ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); } catch(const ::com::sun::star::ucb::CommandAbortedException&) @@ -833,9 +833,9 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rS nBase = 1; else if ( pConfig->GetImportFilterType( rFormat ).EqualsIgnoreCaseAscii( "pcd_Photo_CD_Base16" ) ) nBase = 0; - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Import/PCD" ) ); + String aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" ); FilterConfigItem aFilterConfigItem( aFilterConfigPath ); - aFilterConfigItem.WriteInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), nBase ); + aFilterConfigItem.WriteInt32( "Resolution", nBase ); } } @@ -852,12 +852,12 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r ResMgr* pResMgr = ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag().getLocale() ); - sal_Int32 nLogicalWidth = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ), 0 ); - sal_Int32 nLogicalHeight = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ), 0 ); + sal_Int32 nLogicalWidth = rConfigItem.ReadInt32( "LogicalWidth", 0 ); + sal_Int32 nLogicalHeight = rConfigItem.ReadInt32( "LogicalHeight", 0 ); if ( rGraphic.GetType() != GRAPHIC_NONE ) { - sal_Int32 nMode = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ExportMode" ) ), -1 ); + sal_Int32 nMode = rConfigItem.ReadInt32( "ExportMode", -1 ); if ( nMode == -1 ) // the property is not there, this is possible, if the graphic filter { // is called via UnoGraphicExporter and not from a graphic export Dialog @@ -887,7 +887,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r Bitmap aBitmap( rGraphic.GetBitmap() ); MapMode aMap( MAP_100TH_INCH ); - sal_Int32 nDPI = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), 75 ); + sal_Int32 nDPI = rConfigItem.ReadInt32( "Resolution", 75 ); Fraction aFrac( 1, Min( Max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) ); aMap.SetScaleX( aFrac ); @@ -909,7 +909,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r else aGraphic = rGraphic; - sal_Int32 nColors = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Color" ) ), 0 ); // #92767# + sal_Int32 nColors = rConfigItem.ReadInt32( "Color", 0 ); // #92767# if ( nColors ) // graphic conversion necessary ? { BitmapEx aBmpEx( aGraphic.GetBitmapEx() ); @@ -1192,7 +1192,7 @@ void GraphicFilter::ImplInit() if( bUseConfig ) { - rtl::OUString url(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR/program")); + rtl::OUString url("$BRAND_BASE_DIR/program"); rtl::Bootstrap::expandMacros(url); //TODO: detect failure utl::LocalFileHelper::ConvertURLToPhysicalName(url, aFilterPath); } @@ -1782,7 +1782,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, aShortName = GetImportFormatShortName( nFormat ).ToUpperAscii(); if ( ( pFilterConfigItem == NULL ) && aShortName.EqualsAscii( "PCD" ) ) { - String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Import/PCD" ) ); + String aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" ); pFilterConfigItem = new FilterConfigItem( aFilterConfigPath ); } } @@ -2001,15 +2001,15 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& if( aFilterName.EqualsIgnoreCaseAscii( EXP_BMP ) ) { Bitmap aBmp( aGraphic.GetBitmap() ); - sal_Int32 nColorRes = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Colors" ) ), 0 ); + sal_Int32 nColorRes = aConfigItem.ReadInt32( "Colors", 0 ); if ( nColorRes && ( nColorRes <= (sal_uInt16)BMP_CONVERSION_24BIT) ) { if( !aBmp.Convert( (BmpConversion) nColorRes ) ) aBmp = aGraphic.GetBitmap(); } ResMgr* pResMgr = CREATERESMGR( svt ); - sal_Bool bRleCoding = aConfigItem.ReadBool( String( RTL_CONSTASCII_USTRINGPARAM( "RLE_Coding" ) ), sal_True ); - // Wollen wir RLE-Kodiert speichern? + sal_Bool bRleCoding = aConfigItem.ReadBool( "RLE_Coding", sal_True ); + // save RLE encoded? aBmp.Write( rOStm, bRleCoding ); delete pResMgr; @@ -2018,7 +2018,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& } else if( aFilterName.EqualsIgnoreCaseAscii( EXP_SVMETAFILE ) ) { - sal_Int32 nVersion = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), 0 ) ; + sal_Int32 nVersion = aConfigItem.ReadInt32( "Version", 0 ) ; if ( nVersion ) rOStm.SetVersion( nVersion ); GDIMetaFile aMTF; @@ -2185,7 +2185,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& xml::sax::Writer::create( xContext ), uno::UNO_QUERY_THROW); ::com::sun::star::uno::Reference< ::com::sun::star::svg::XSVGWriter > xSVGWriter( xMgr->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svg.SVGWriter" )) ), ::com::sun::star::uno::UNO_QUERY ); + OUString( "com.sun.star.svg.SVGWriter" ) ), ::com::sun::star::uno::UNO_QUERY ); if( xSaxWriter.is() && xSVGWriter.is() ) { diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 733fd9572bc2..63bce662f205 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -271,7 +271,7 @@ sal_Bool GIFReader::ReadExtension() rIStm >> cSize; // NetScape-Extension - if( aAppId.equalsL(RTL_CONSTASCII_STRINGPARAM("NETSCAPE")) && aAppCode.equalsL(RTL_CONSTASCII_STRINGPARAM("2.0")) && cSize == 3 ) + if( aAppId == "NETSCAPE" && aAppCode == "2.0" && cSize == 3 ) { rIStm >> cByte; @@ -298,7 +298,7 @@ sal_Bool GIFReader::ReadExtension() else rIStm.SeekRel( -1 ); } - else if ( aAppId.equalsL(RTL_CONSTASCII_STRINGPARAM("STARDIV ")) && aAppCode.equalsL(RTL_CONSTASCII_STRINGPARAM("5.0")) && cSize == 9 ) + else if ( aAppId == "STARDIV " && aAppCode == "5.0" && cSize == 9 ) { rIStm >> cByte; diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx index 762c6adee913..c3f83dfd79f9 100644 --- a/vcl/source/filter/ixbm/xbmread.cxx +++ b/vcl/source/filter/ixbm/xbmread.cxx @@ -306,9 +306,9 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic ) { XBMFormat eFormat = XBM10; - if (aLine.indexOfL(RTL_CONSTASCII_STRINGPARAM("short")) != -1) + if (aLine.indexOf("short") != -1) eFormat = XBM10; - else if (aLine.indexOfL(RTL_CONSTASCII_STRINGPARAM("char")) != -1) + else if (aLine.indexOf("char") != -1) eFormat = XBM11; else bStatus = sal_False; diff --git a/vcl/source/filter/jpeg/jpeg.cxx b/vcl/source/filter/jpeg/jpeg.cxx index 72c6e5746248..ad0513ab6ee0 100644 --- a/vcl/source/filter/jpeg/jpeg.cxx +++ b/vcl/source/filter/jpeg/jpeg.cxx @@ -593,8 +593,8 @@ JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValu pExpWasGrey ( pExportWasGrey ) { FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); - bGreys = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ) != 0; - nQuality = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ), 75 ); + bGreys = aConfigItem.ReadInt32( "ColorMode", 0 ) != 0; + nQuality = aConfigItem.ReadInt32( "Quality", 75 ); if ( pFilterData ) { diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index ed4846b3bf17..e73c517d45af 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -1177,21 +1177,21 @@ void SgfFontOne::ReadOne( const rtl::OString& rID, rtl::OString& Dsc ) if (!s.isEmpty()) { s = s.toAsciiUpperCase(); - if (s.matchL(RTL_CONSTASCII_STRINGPARAM("BOLD"))) Bold=sal_True; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("ITAL"))) Ital=sal_True; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("SERF"))) Serf=sal_True; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("SANS"))) Sans=sal_True; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("FIXD"))) Fixd=sal_True; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("ANSI"))) SVChSet=RTL_TEXTENCODING_MS_1252; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("IBMPC"))) SVChSet=RTL_TEXTENCODING_IBM_850; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("MAC"))) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("SYMBOL"))) SVChSet=RTL_TEXTENCODING_SYMBOL; - else if (s.matchL(RTL_CONSTASCII_STRINGPARAM("SYSTEM"))) SVChSet = osl_getThreadTextEncoding(); + if (s.match("BOLD")) Bold=sal_True; + else if (s.match("ITAL")) Ital=sal_True; + else if (s.match("SERF")) Serf=sal_True; + else if (s.match("SANS")) Sans=sal_True; + else if (s.match("FIXD")) Fixd=sal_True; + else if (s.match("ROMAN")) SVFamil=FAMILY_ROMAN; + else if (s.match("SWISS")) SVFamil=FAMILY_SWISS; + else if (s.match("MODERN")) SVFamil=FAMILY_MODERN; + else if (s.match("SCRIPT")) SVFamil=FAMILY_SCRIPT; + else if (s.match("DECORA")) SVFamil=FAMILY_DECORATIVE; + else if (s.match("ANSI")) SVChSet=RTL_TEXTENCODING_MS_1252; + else if (s.match("IBMPC")) SVChSet=RTL_TEXTENCODING_IBM_850; + else if (s.match("MAC")) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN; + else if (s.match("SYMBOL")) SVChSet=RTL_TEXTENCODING_SYMBOL; + else if (s.match("SYSTEM")) SVChSet = osl_getThreadTextEncoding(); else if (comphelper::string::isdigitAsciiString(s) ) SVWidth=sal::static_int_cast< sal_uInt16 >(s.toInt32()); } } diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index bb2f2404c27d..b5af4609401e 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -1614,8 +1614,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) break; default: - OSL_FAIL(rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM( - "EMFWriter::ImplWriteActions: unsupported MetaAction #" )). + OSL_FAIL(rtl::OStringBuffer( + "EMFWriter::ImplWriteActions: unsupported MetaAction #" ). append(static_cast<sal_Int32>(nType)).getStr()); break; } diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 63b0996b24a3..0adca65d678b 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -275,12 +275,10 @@ void WinMtfAssertHandler( const sal_Char* pAction, sal_uInt32 nFlags ) { if ( ( nAssertCount == 0 ) || ( bOnlyOnce == sal_False ) ) { - rtl::OStringBuffer aText(RTL_CONSTASCII_STRINGPARAM( - "WMF/EMF Import: ")); + rtl::OStringBuffer aText("WMF/EMF Import: "); if (pAction) aText.append(pAction); - aText.append(RTL_CONSTASCII_STRINGPARAM( - " needs to be implemented")); + aText.append(" needs to be implemented"); DBG_ASSERT( 0, aText.getStr() ); } nAssertCount++; @@ -911,7 +909,7 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : // this is necessary to be able to support // SetClipRgn( NULL ) and similar ClipRgn actions (SJ) - maFont.SetName( String( RTL_CONSTASCII_USTRINGPARAM( "Arial" )) ); // sj: #i57205#, we do have some scaling problems if using + maFont.SetName( "Arial" ); // sj: #i57205#, we do have some scaling problems if using maFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); // the default font then most times a x11 font is used, we maFont.SetHeight( 423 ); // will prevent this defining a font |