Kaydet (Commit) f02e866f authored tarafından Olivier Hallot's avatar Olivier Hallot

More RTL_CONSTASCII_USTRINGPARAM removals

/sd/.../grf and html
üst df80de1f
......@@ -269,7 +269,7 @@ sal_Bool SdGRFFilter::Export()
uno::Reference< lang::XMultiServiceFactory >
xSMgr( ::comphelper::getProcessServiceFactory() );
uno::Reference< uno::XInterface > xComponent
( xSMgr->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GraphicExportFilter" ) ) ),
( xSMgr->createInstance( "com.sun.star.drawing.GraphicExportFilter" ),
uno::UNO_QUERY );
if ( xComponent.is() )
{
......@@ -315,8 +315,8 @@ sal_Bool SdGRFFilter::Export()
beans::PropertyValues aArgs;
TransformItems( SID_SAVEASDOC, *pSet, aArgs );
rtl::OUString sInteractionHandler( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) );
rtl::OUString sFilterName( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) );
rtl::OUString sInteractionHandler( "InteractionHandler" );
rtl::OUString sFilterName( "FilterName" );
rtl::OUString sShortName( rGraphicFilter.GetExportFormatShortName( nFilter ) );
sal_Bool bFilterNameFound = sal_False;
......@@ -383,7 +383,7 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su
{
Reference< XMultiServiceFactory > xSM( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
Reference< XGraphicProvider > xProvider( xSM->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.graphic.GraphicProvider" ) ) ), UNO_QUERY_THROW );
Reference< XGraphicProvider > xProvider( xSM->createInstance( "com.sun.star.graphic.GraphicProvider" ), UNO_QUERY_THROW );
Reference< XPropertySet > xShapeSet( xShape, UNO_QUERY_THROW );
// detect mime type of graphic
......@@ -391,13 +391,13 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su
OUString sGraphicURL;
// first try to detect from graphic object
Reference< XPropertySet > xGraphicSet( xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ) ), UNO_QUERY_THROW );
xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicURL" ) ) ) >>= sGraphicURL;
Reference< XPropertySet > xGraphicSet( xShapeSet->getPropertyValue( "Graphic" ), UNO_QUERY_THROW );
xShapeSet->getPropertyValue( "GraphicURL" ) >>= sGraphicURL;
bool bIsLinked = !sGraphicURL.isEmpty() && (sGraphicURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.GraphicObject:") ) != 0);
bool bIsLinked = !sGraphicURL.isEmpty() && sGraphicURL.equals("vnd.sun.star.GraphicObject:");
if( !bIsLinked )
xGraphicSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MimeType" ) ) ) >>= aMimeType;
xGraphicSet->getPropertyValue( "MimeType" ) >>= aMimeType;
if( bIsLinked || aMimeType == "image/x-vclgraphic" || aMimeType.isEmpty() )
{
......@@ -405,19 +405,19 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su
OUString aURL( sGraphicURL );
if( aURL.isEmpty() )
xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicStreamURL" ) ) ) >>= aURL;
xShapeSet->getPropertyValue( "GraphicStreamURL" ) >>= aURL;
{
Reference< XInputStream > xGraphStream( xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicStream" ) ) ), UNO_QUERY );
Reference< XInputStream > xGraphStream( xShapeSet->getPropertyValue( "GraphicStream" ), UNO_QUERY );
PropertyValues aDesc(2);
aDesc[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
aDesc[0].Name = "URL";
aDesc[0].Value <<= aURL;
aDesc[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "InputStream" ) );
aDesc[1].Name = "InputStream";
aDesc[1].Value <<= xGraphStream;
Reference< XPropertySet > xDescSet( xProvider->queryGraphicDescriptor( aDesc ), UNO_QUERY_THROW );
xDescSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MimeType" ) ) ) >>= aMimeType;
xDescSet->getPropertyValue( "MimeType" ) >>= aMimeType;
}
}
......@@ -429,26 +429,26 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su
// png for non animated pixel
// svm for vector format
sal_Int8 nGraphicType = 0;
xGraphicSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicType" ) ) ) >>= nGraphicType;
xGraphicSet->getPropertyValue( "GraphicType" ) >>= nGraphicType;
switch( nGraphicType )
{
case ::com::sun::star::graphic::GraphicType::VECTOR:
aMimeType = OUString(RTL_CONSTASCII_USTRINGPARAM( "image/x-svm" ) );
aMimeType = "image/x-svm";
break;
case ::com::sun::star::graphic::GraphicType::PIXEL:
{
sal_Bool bAnimated = sal_False;
xGraphicSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Animated" ) ) ) >>= bAnimated;
xGraphicSet->getPropertyValue( "Animated" ) >>= bAnimated;
if( bAnimated )
{
aMimeType = OUString(RTL_CONSTASCII_USTRINGPARAM( "image/gif" ) );
aMimeType = "image/gif";
break;
}
}
default:
aMimeType = OUString(RTL_CONSTASCII_USTRINGPARAM( "image/png" ) );
aMimeType = "image/png";
break;
}
}
......@@ -503,7 +503,7 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su
}
if( aDefaultFormatName.isEmpty() )
aDefaultFormatName = OUString( RTL_CONSTASCII_USTRINGPARAM( "PNG - Portable Network Graphic" ) );
aDefaultFormatName = "PNG - Portable Network Graphic";
xFltMgr->setCurrentFilter( aDefaultFormatName );
......@@ -519,21 +519,21 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su
Reference< XInputStream > xGraphStream;
if( aMimeType == aExportMimeType )
xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "GraphicStream" ) ) ) >>= xGraphStream;
xShapeSet->getPropertyValue( "GraphicStream" ) >>= xGraphStream;
if( xGraphStream.is() )
{
Reference< XSimpleFileAccess2 > xFileAccess( xSM->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" ) ) ), UNO_QUERY_THROW );
Reference< XSimpleFileAccess2 > xFileAccess( xSM->createInstance("com.sun.star.ucb.SimpleFileAccess" ), UNO_QUERY_THROW );
xFileAccess->writeFile( sPath, xGraphStream );
}
else
{
PropertyValues aDesc(2);
aDesc[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
aDesc[0].Name = "URL";
aDesc[0].Value <<= sPath;
aDesc[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "MimeType" ) );
aDesc[1].Name = "MimeType";
aDesc[1].Value <<= aExportMimeType;
Reference< XGraphic > xGraphic( xShapeSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ) ), UNO_QUERY_THROW );
Reference< XGraphic > xGraphic( xShapeSet->getPropertyValue( "Graphic" ), UNO_QUERY_THROW );
xProvider->storeGraphic( xGraphic, aDesc );
}
}
......
......@@ -118,13 +118,13 @@ Reference< XInterface >
::rtl::OUString SdHtmlOptionsDialog_getImplementationName()
throw( RuntimeException )
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.draw.SdHtmlOptionsDialog" ) );
return ::rtl::OUString( "com.sun.star.comp.draw.SdHtmlOptionsDialog" );
}
#define SERVICE_NAME "com.sun.star.ui.dialog.FilterOptionsDialog"
sal_Bool SAL_CALL SdHtmlOptionsDialog_supportsService( const ::rtl::OUString& ServiceName )
throw( RuntimeException )
{
return ServiceName == SERVICE_NAME;
return ServiceName.equals("com.sun.star.ui.dialog.FilterOptionsDialog");
}
Sequence< ::rtl::OUString > SAL_CALL SdHtmlOptionsDialog_getSupportedServiceNames()
......@@ -132,10 +132,9 @@ Sequence< ::rtl::OUString > SAL_CALL SdHtmlOptionsDialog_getSupportedServiceName
{
Sequence< ::rtl::OUString > aRet(1);
::rtl::OUString* pArray = aRet.getArray();
pArray[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ) );
pArray[0] = ::rtl::OUString("com.sun.star.ui.dialog.FilterOptionsDialog");
return aRet;
}
#undef SERVICE_NAME
// -----------------------------------------------------------------------------
......@@ -203,7 +202,7 @@ Sequence< PropertyValue > SdHtmlOptionsDialog::getPropertyValues()
maMediaDescriptor.realloc( ++nCount );
// the "FilterData" Property is an Any that will contain our PropertySequence of Values
maMediaDescriptor[ i ].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterData" ) );
maMediaDescriptor[ i ].Name = "FilterData";
maMediaDescriptor[ i ].Value <<= maFilterDataSequence;
return maMediaDescriptor;
}
......@@ -269,12 +268,12 @@ void SdHtmlOptionsDialog::setSourceDocument( const Reference< XComponent >& xDoc
( xDoc, UNO_QUERY );
if ( xServiceInfo.is() )
{
if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) )
if ( xServiceInfo->supportsService( "com.sun.star.presentation.PresentationDocument" ) )
{
meDocType = DOCUMENT_TYPE_IMPRESS;
return;
}
else if ( xServiceInfo->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) )
else if ( xServiceInfo->supportsService( "com.sun.star.drawing.DrawingDocument" ) )
{
meDocType = DOCUMENT_TYPE_DRAW;
return;
......
......@@ -397,12 +397,12 @@ HtmlExport::HtmlExport(
mpThumbnailFiles(NULL),
mpPageNames(NULL),
mpTextFiles(NULL),
maIndexUrl(RTL_CONSTASCII_USTRINGPARAM("index")),
maIndexUrl("index"),
meScript( SCRIPT_ASP ),
maHTMLHeader( RTL_CONSTASCII_USTRINGPARAM(
maHTMLHeader(
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\r\n"
" \"http://www.w3.org/TR/html4/transitional.dtd\">\r\n"
"<html>\r\n<head>\r\n" ) ),
"<html>\r\n<head>\r\n" ),
mpButtonSet( new ButtonSet() )
{
bool bChange = mpDoc->IsChanged();
......@@ -953,10 +953,10 @@ bool HtmlExport::SavePresentation()
if( xStorable.is() )
{
uno::Sequence< beans::PropertyValue > aProperties( 2 );
aProperties[ 0 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Overwrite"));
aProperties[ 0 ].Name = "Overwrite";
aProperties[ 0 ].Value <<= (sal_Bool)sal_True;
aProperties[ 1 ].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName"));
aProperties[ 1 ].Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("impress8"));
aProperties[ 1 ].Name = "FilterName";
aProperties[ 1 ].Value <<= rtl::OUString("impress8");
xStorable->storeToURL( aURL, aProperties );
mpDocSh->EnableSetModified( false );
......@@ -984,7 +984,7 @@ bool HtmlExport::CreateImagesForPresPages( bool bThumbnail)
if( !xMSF.is() )
return false;
Reference< XExporter > xGraphicExporter( xMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicExportFilter") ) ), UNO_QUERY );
Reference< XExporter > xGraphicExporter( xMSF->createInstance( "com.sun.star.drawing.GraphicExportFilter" ), UNO_QUERY );
Reference< XFilter > xFilter( xGraphicExporter, UNO_QUERY );
DBG_ASSERT( xFilter.is(), "no com.sun.star.drawing.GraphicExportFilter?" );
......@@ -992,29 +992,29 @@ bool HtmlExport::CreateImagesForPresPages( bool bThumbnail)
return false;
Sequence< PropertyValue > aFilterData(((meFormat==FORMAT_JPG)&&(mnCompression != -1))? 3 : 2);
aFilterData[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("PixelWidth") );
aFilterData[0].Name = "PixelWidth";
aFilterData[0].Value <<= (sal_Int32)(bThumbnail ? PUB_THUMBNAIL_WIDTH : mnWidthPixel );
aFilterData[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("PixelHeight") );
aFilterData[1].Name = "PixelHeight";
aFilterData[1].Value <<= (sal_Int32)(bThumbnail ? PUB_THUMBNAIL_HEIGHT : mnHeightPixel);
if((meFormat==FORMAT_JPG)&&(mnCompression != -1))
{
aFilterData[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("Quality") );
aFilterData[2].Name = "Quality";
aFilterData[2].Value <<= (sal_Int32)mnCompression;
}
Sequence< PropertyValue > aDescriptor( 3 );
aDescriptor[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("URL") );
aDescriptor[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("FilterName") );
aDescriptor[0].Name = "URL";
aDescriptor[1].Name = "FilterName";
OUString sFormat;
if( meFormat == FORMAT_PNG )
sFormat = OUString( RTL_CONSTASCII_USTRINGPARAM("PNG") );
sFormat = "PNG";
else if( meFormat == FORMAT_GIF )
sFormat = OUString( RTL_CONSTASCII_USTRINGPARAM("GIF") );
sFormat = "GIF";
else
sFormat = OUString( RTL_CONSTASCII_USTRINGPARAM("JPG") );
sFormat = "JPG";
aDescriptor[1].Value <<= sFormat;
aDescriptor[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("FilterData") );
aDescriptor[2].Name = "FilterData";
aDescriptor[2].Value <<= aFilterData;
for (sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
......@@ -2022,10 +2022,12 @@ bool HtmlExport::CreateNotesPages()
aStr.AppendAscii( "</body>\r\n</html>" );
String aFileName( RTL_CONSTASCII_USTRINGPARAM("note") );
aFileName += String::CreateFromInt32(nSdPage);
OUString aFileName( "note" );
aFileName += OUString::valueOf(nSdPage);
bOk = WriteHtml( aFileName, true, aStr );
if (mpProgress)
mpProgress->SetState(++mnPagesWritten);
}
......@@ -2088,8 +2090,8 @@ bool HtmlExport::CreateOutlinePages()
aStr.AppendAscii( "</body>\r\n</html>" );
String aFileName( RTL_CONSTASCII_USTRINGPARAM("outline") );
aFileName += String::CreateFromInt32(nPage);
OUString aFileName( "outline" );
aFileName += OUString::valueOf(nPage);
bOk = WriteHtml( aFileName, true, aStr );
if (mpProgress)
......@@ -2896,7 +2898,7 @@ bool HtmlExport::CopyScript( const String& rPath, const String& rSource, const S
INetURLObject aURL( SvtPathOptions().GetConfigPath() );
String aScript;
aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM("webcast") ) );
aURL.Append( rtl::OUString("webcast") );
aURL.Append( rSource );
meEC.SetContext( STR_HTMLEXP_ERROR_OPEN_FILE, rSource );
......@@ -3005,10 +3007,10 @@ bool HtmlExport::CreatePERLScripts()
return false;
}
if(!CopyScript(maExportPath, String( RTL_CONSTASCII_USTRINGPARAM("edit.pl")), maIndex, true ))
if(!CopyScript(maExportPath, rtl::OUString("edit.pl"), maIndex, true ))
return false;
if(!CopyScript(maExportPath, String( RTL_CONSTASCII_USTRINGPARAM("index.pl")), maIndexUrl, true ))
if(!CopyScript(maExportPath, rtl::OUString("index.pl"), maIndexUrl, true ))
return false;
return true;
......@@ -3325,8 +3327,8 @@ sal_Bool HtmlErrorContext::GetString( sal_uLong, String& rCtxStr )
rCtxStr = String( SdResId( mnResId ) );
rCtxStr.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM("$(URL1)")), maURL1 );
rCtxStr.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM("$(URL2)")), maURL2 );
rCtxStr.SearchAndReplace( rtl::OUString("$(URL1)"), maURL1 );
rCtxStr.SearchAndReplace( rtl::OUString("$(URL2)"), maURL2 );
return true;
}
......
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