diff options
author | Gert Faller <gertfaller@aliceadsl.fr> | 2010-12-06 13:10:56 +0100 |
---|---|---|
committer | Gert Faller <gertfaller@aliceadsl.fr> | 2010-12-06 13:10:56 +0100 |
commit | 6c4698ded0d859ea64e867745d6512301fd4bcfb (patch) | |
tree | 06abcf53237a4fc364e9b42f76cfa604f49146de /sdext/source/minimizer | |
parent | 780df7c562f71cdf0967e8e906c5f4ac84a7b587 (diff) |
RTL_CONSTASCII_USTRINGPARAM in extensions 1
Diffstat (limited to 'sdext/source/minimizer')
-rw-r--r-- | sdext/source/minimizer/graphiccollector.cxx | 2 | ||||
-rw-r--r-- | sdext/source/minimizer/impoptimizer.cxx | 8 | ||||
-rw-r--r-- | sdext/source/minimizer/informationdialog.cxx | 18 | ||||
-rw-r--r-- | sdext/source/minimizer/optimizerdialog.cxx | 22 | ||||
-rw-r--r-- | sdext/source/minimizer/optimizerdialogcontrols.cxx | 2 | ||||
-rw-r--r-- | sdext/source/minimizer/pppoptimizerdialog.cxx | 6 | ||||
-rw-r--r-- | sdext/source/minimizer/pppoptimizeruno.cxx | 4 |
7 files changed, 31 insertions, 31 deletions
diff --git a/sdext/source/minimizer/graphiccollector.cxx b/sdext/source/minimizer/graphiccollector.cxx index d4258e66953c..5a9d94524c93 100644 --- a/sdext/source/minimizer/graphiccollector.cxx +++ b/sdext/source/minimizer/graphiccollector.cxx @@ -74,7 +74,7 @@ const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentCo void ImpAddEntity( std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities, Reference< XGraphic >& rxGraphic, const GraphicSettings& rGraphicSettings, const GraphicCollector::GraphicUser& rUser ) { const rtl::OUString aGraphicURL( rUser.maGraphicURL ); - const rtl::OUString sPackageURL( OUString::createFromAscii( "vnd.sun.star.GraphicObject:" ) ); + const rtl::OUString sPackageURL( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.GraphicObject:") ); if ( rGraphicSettings.mbEmbedLinkedGraphics || ( !aGraphicURL.getLength() || aGraphicURL.match( sPackageURL, 0 ) ) ) { diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx index d2e00fb94f26..01e0505bac9e 100644 --- a/sdext/source/minimizer/impoptimizer.cxx +++ b/sdext/source/minimizer/impoptimizer.cxx @@ -351,9 +351,9 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& } if ( bNeedsOptimizing && aDestSizePixel.Width && aDestSizePixel.Height ) { - Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxMSF ), UNO_QUERY_THROW ); + Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), rxMSF ), UNO_QUERY_THROW ); Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() ); - Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxMSF ), UNO_QUERY_THROW ); + Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.graphic.GraphicProvider")), rxMSF ), UNO_QUERY_THROW ); ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, bRemoveCropArea, aGraphicCropLogic ); Reference< XInputStream > xInputStream( xTempFile->getInputStream() ); @@ -371,9 +371,9 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >& else // this is a metafile { rtl::OUString aDestMimeType( aSourceMimeType ); - Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), rxMSF ), UNO_QUERY_THROW ); + Reference< XStream > xTempFile( rxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), rxMSF ), UNO_QUERY_THROW ); Reference< XOutputStream > xOutputStream( xTempFile->getOutputStream() ); - Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), rxMSF ), UNO_QUERY_THROW ); + Reference< XGraphicProvider > xGraphicProvider( rxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.graphic.GraphicProvider")), rxMSF ), UNO_QUERY_THROW ); ImpCompressGraphic( xGraphicProvider, xGraphic, xOutputStream, aDestMimeType, aLogicalSize, rGraphicSettings.mnJPEGQuality, rGraphicSettings.mnImageResolution, sal_False, aGraphicCropLogic ); Reference< XInputStream > xInputStream( xTempFile->getInputStream() ); Reference< XSeekable > xSeekable( xInputStream, UNO_QUERY_THROW ); diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx index 17413cef1ec9..f7faf8c29347 100644 --- a/sdext/source/minimizer/informationdialog.cxx +++ b/sdext/source/minimizer/informationdialog.cxx @@ -215,15 +215,15 @@ OUString InformationDialog::ImpGetStandardImage( const OUString& sPrivateURL ) rtl::OUString sURL; try { - mxTempFile = Reference< XStream >( mxMSF->getServiceManager()->createInstanceWithContext( OUString::createFromAscii( "com.sun.star.io.TempFile" ), mxMSF ), UNO_QUERY_THROW ); + mxTempFile = Reference< XStream >( mxMSF->getServiceManager()->createInstanceWithContext( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")), mxMSF ), UNO_QUERY_THROW ); Reference< XPropertySet > xPropSet( mxTempFile, UNO_QUERY ); Reference< XOutputStream > xOutputStream( mxTempFile->getOutputStream() ); if ( xOutputStream.is() && xPropSet.is() ) { Reference< graphic::XGraphicProvider > xGraphicProvider( mxMSF->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii( "com.sun.star.graphic.GraphicProvider" ), mxMSF ), UNO_QUERY_THROW ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.graphic.GraphicProvider")), mxMSF ), UNO_QUERY_THROW ); Sequence< PropertyValue > aArgs( 1 ); - aArgs[ 0 ].Name = OUString::createFromAscii( "URL" ); + aArgs[ 0 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("URL")); aArgs[ 0 ].Value <<= sPrivateURL; Reference< graphic::XGraphic > xGraphic( xGraphicProvider->queryGraphic( aArgs ) ); if ( xGraphic.is() ) @@ -236,7 +236,7 @@ OUString InformationDialog::ImpGetStandardImage( const OUString& sPrivateURL ) aArgs2[ 1 ].Value <<= xOutputStream; xGraphicProvider->storeGraphic( xGraphic, aArgs2 ); } - xPropSet->getPropertyValue( OUString::createFromAscii( "Uri" ) ) >>= sURL; + xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")) ) >>= sURL; } } catch( Exception& ) @@ -322,7 +322,7 @@ void InformationDialog::InitDialog() OUString aInfoString( getString( eInfoString ) ); const OUString aOldSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%OLDFILESIZE" ) ); const OUString aNewSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%NEWFILESIZE" ) ); - const OUString aTitlePlaceholder( aTitle.getLength() ? OUString::createFromAscii( "%TITLE" ) : OUString::createFromAscii( "'%TITLE'" ) ); + const OUString aTitlePlaceholder( aTitle.getLength() ? RTL_CONSTASCII_USTRINGPARAM("%TITLE") : RTL_CONSTASCII_USTRINGPARAM("'%TITLE'") ); sal_Int32 i = aInfoString.indexOf( aOldSizePlaceholder, 0 ); if ( i >= 0 ) @@ -337,11 +337,11 @@ void InformationDialog::InitDialog() aInfoString = aInfoString.replaceAt( k, aTitlePlaceholder.getLength(), aTitle ); com::sun::star::uno::Reference< com::sun::star::awt::XItemListener > xItemListener; - InsertImage( *this, rtl::OUString( rtl::OUString::createFromAscii( "aboutimage" ) ), ImpGetStandardImage( rtl::OUString::createFromAscii( "private:standardimage/query" ) ), 5, 5, 25, 25 ); - InsertFixedText( *this, rtl::OUString( rtl::OUString::createFromAscii( "fixedtext" ) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 ); + InsertImage( *this, rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("aboutimage")) ), ImpGetStandardImage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:standardimage/query")) ), 5, 5, 25, 25 ); + InsertFixedText( *this, rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fixedtext")) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 ); if ( maSaveAsURL.getLength() ) InsertCheckBox( *this, TKGet( TK_OpenNewDocument ), xItemListener, getString( STR_AUTOMATICALLY_OPEN ), PAGE_POS_X, 42, PAGE_WIDTH, 8, 1 ); - InsertButton( *this, rtl::OUString( rtl::OUString::createFromAscii( "button" ) ), mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 14, 2, STR_OK ); + InsertButton( *this, rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("button")) ), mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 14, 2, STR_OK ); sal_Bool bOpenNewDocument = mrbOpenNewDocument; setControlProperty( TKGet( TK_OpenNewDocument ), TKGet( TK_State ), Any( (sal_Int16)bOpenNewDocument ) ); @@ -399,7 +399,7 @@ sal_Bool InformationDialog::execute() void OKActionListener::actionPerformed( const ActionEvent& rEvent ) throw ( com::sun::star::uno::RuntimeException ) { - if ( rEvent.ActionCommand == rtl::OUString( rtl::OUString::createFromAscii( "button" ) ) ) + if ( rEvent.ActionCommand == rtl::OUString( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("button")) ) ) { mrInformationDialog.endExecute( sal_True ); } diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx index dc6532460dbe..aff500230021 100644 --- a/sdext/source/minimizer/optimizerdialog.cxx +++ b/sdext/source/minimizer/optimizerdialog.cxx @@ -129,8 +129,8 @@ void OptimizerDialog::InitRoadmap() InsertRoadmapItem( 4, sal_True, getString( STR_SUMMARY ), ITEM_ID_SUMMARY ); rtl::OUString sBitmapPath( getPath( TK_BitmapPath ) ); - rtl::OUString sBitmap( isHighContrast() ? rtl::OUString::createFromAscii( "/minimizepresi_80_h.png" ) - : rtl::OUString::createFromAscii( "/minimizepresi_80.png" ) ); + rtl::OUString sBitmap( isHighContrast() ? RTL_CONSTASCII_USTRINGPARAM("/minimizepresi_80_h.png") + : RTL_CONSTASCII_USTRINGPARAM("/minimizepresi_80.png") ); rtl::OUString sURL( sBitmapPath += sBitmap ); xPropertySet->setPropertyValue( TKGet( TK_ImageURL ), Any( sURL ) ); @@ -523,12 +523,12 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) { rtl::OUString sHelpFile( mrOptimizerDialog.getPath( TK_HelpFile ) ); Reference< XDesktop > desktop( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii( "com.sun.star.frame.Desktop" ), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); Reference< XSimpleFileAccess > xSimpleFileAccess( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); Reference< XInputStream > xInputStream( xSimpleFileAccess->openFileRead( sHelpFile ) ); Reference< XDesktop > xDesktop( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithContext( - OUString::createFromAscii( "com.sun.star.frame.Desktop" ), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), mrOptimizerDialog.GetComponentContext() ), UNO_QUERY_THROW ); Reference< XFrame > xDesktopFrame( xDesktop, UNO_QUERY_THROW ); xHelpFrame = Reference< XFrame >( xDesktopFrame->findFrame( TKGet( TK__blank ), 0 ) ); Reference< XCloseBroadcaster > xCloseBroadcaster( xHelpFrame, UNO_QUERY_THROW ); @@ -541,16 +541,16 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) aLoadProps[ 1 ].Name = TKGet( TK_InputStream ); aLoadProps[ 1 ].Value <<= xInputStream; - Reference< XComponent >( xLoader->loadComponentFromURL( OUString::createFromAscii( "private:stream" ), + Reference< XComponent >( xLoader->loadComponentFromURL( OUString(RTL_CONSTASCII_USTRINGPARAM("private:stream")), TKGet( TK__self ), 0, aLoadProps ) ); Reference< XPropertySet > xPropSet( xHelpFrame, UNO_QUERY_THROW ); Reference< XLayoutManager > xLayoutManager; - if ( xPropSet->getPropertyValue( OUString::createFromAscii( "LayoutManager" ) ) >>= xLayoutManager ) + if ( xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LayoutManager")) ) >>= xLayoutManager ) { xLayoutManager->setVisible( sal_False ); - xLayoutManager->hideElement( OUString::createFromAscii( "private:resource/menubar/menubar" ) ); - xLayoutManager->destroyElement( OUString::createFromAscii( "private:resource/statusbar/statusbar" ) ); + xLayoutManager->hideElement( OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/menubar/menubar")) ); + xLayoutManager->destroyElement( OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/statusbar/statusbar")) ); } } } @@ -603,7 +603,7 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) aLocation = aLocation.copy( 0, nIndex ); // adding .mini - aLocation = aLocation.concat( OUString::createFromAscii( ".mini" ) ); + aLocation = aLocation.concat( OUString(RTL_CONSTASCII_USTRINGPARAM(".mini")) ); aFileOpenDialog.setDefaultName( aLocation ); } } @@ -653,7 +653,7 @@ void ActionListener::actionPerformed( const ActionEvent& rEvent ) aArgs[ 0 ] <<= mrOptimizerDialog.GetFrame(); Reference < XDispatch > xDispatch( mrOptimizerDialog.GetComponentContext()->getServiceManager()->createInstanceWithArgumentsAndContext( - OUString::createFromAscii( "com.sun.star.comp.PPPOptimizer" ), aArgs, mrOptimizerDialog.GetComponentContext() ), UNO_QUERY ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.PPPOptimizer")), aArgs, mrOptimizerDialog.GetComponentContext() ), UNO_QUERY ); URL aURL; aURL.Protocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.com.sun.star.comp.PPPOptimizer:" ) ); diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx index de5cabf20158..ff7e5a00f2d2 100644 --- a/sdext/source/minimizer/optimizerdialogcontrols.cxx +++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx @@ -609,7 +609,7 @@ static OUString ImpValueOfInMB( const sal_Int64& rVal, sal_Unicode nSeparator = aVal.setLength( nX + 2 ); aVal.setCharAt( nX, nSeparator ); } - aVal.append( OUString::createFromAscii( " MB" ) ); + aVal.append( OUString(RTL_CONSTASCII_USTRINGPARAM(" MB")) ); return aVal.makeStringAndClear(); } diff --git a/sdext/source/minimizer/pppoptimizerdialog.cxx b/sdext/source/minimizer/pppoptimizerdialog.cxx index 5729eda5c4dc..bf7fc438c8f9 100644 --- a/sdext/source/minimizer/pppoptimizerdialog.cxx +++ b/sdext/source/minimizer/pppoptimizerdialog.cxx @@ -155,11 +155,11 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL, if ( nFileSizeSource && nFileSizeDest ) { - rtl::OUStringBuffer sBuf( rtl::OUString::createFromAscii( "Your Presentation has been minimized from:" ) ); + rtl::OUStringBuffer sBuf( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Your Presentation has been minimized from:")) ); sBuf.append( rtl::OUString::valueOf( nFileSizeSource >> 10 ) ); - sBuf.append( rtl::OUString::createFromAscii( "KB to " ) ); + sBuf.append( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KB to ")) ); sBuf.append( rtl::OUString::valueOf( nFileSizeDest >> 10 ) ); - sBuf.append( rtl::OUString::createFromAscii( "KB." ) ); + sBuf.append( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KB.")) ); OUString sResult( sBuf.makeStringAndClear() ); // mpOptimizerDialog->showMessageBox( sResult, sResult, sal_False ); } diff --git a/sdext/source/minimizer/pppoptimizeruno.cxx b/sdext/source/minimizer/pppoptimizeruno.cxx index 1bb4d182bb2b..6ac0f7d22ab3 100644 --- a/sdext/source/minimizer/pppoptimizeruno.cxx +++ b/sdext/source/minimizer/pppoptimizeruno.cxx @@ -62,14 +62,14 @@ extern "C" sal_Int32 nPos; xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PPPOptimizer_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); + xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) ); const Sequence< OUString > & rSNL1 = PPPOptimizer_getSupportedServiceNames(); const OUString * pArray1 = rSNL1.getConstArray(); for ( nPos = rSNL1.getLength(); nPos--; ) xNewKey->createKey( pArray1[nPos] ); xNewKey = reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( PPPOptimizerDialog_getImplementationName() ); - xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) ); + xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) ); const Sequence< OUString > & rSNL2 = PPPOptimizerDialog_getSupportedServiceNames(); const OUString * pArray2 = rSNL2.getConstArray(); for ( nPos = rSNL2.getLength(); nPos--; ) |