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

convert include/svx/xoutbmp.hxx from String to OUString

Change-Id: Idfb879c75cce06d9be4459f054169926a56b0199
üst 863faa0c
...@@ -51,12 +51,12 @@ public: ...@@ -51,12 +51,12 @@ public:
static Graphic MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nMirrorFlags ); static Graphic MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nMirrorFlags );
static Animation MirrorAnimation( const Animation& rAnimation, sal_Bool bHMirr, sal_Bool bVMirr ); static Animation MirrorAnimation( const Animation& rAnimation, sal_Bool bHMirr, sal_Bool bVMirr );
static sal_uInt16 WriteGraphic( const Graphic& rGraphic, String& rFileName, static sal_uInt16 WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
const String& rFilterName, const sal_uIntPtr nFlags = 0L, const OUString& rFilterName, const sal_uIntPtr nFlags = 0L,
const Size* pMtfSize_100TH_MM = NULL ); const Size* pMtfSize_100TH_MM = NULL );
static sal_uLong GraphicToBase64(const Graphic& rGraphic,OUString& rOUString); static sal_uLong GraphicToBase64(const Graphic& rGraphic,OUString& rOUString);
static sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL, static sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL,
GraphicFilter& rFilter, const sal_uInt16 nFormat, GraphicFilter& rFilter, const sal_uInt16 nFormat,
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL ); const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL );
......
...@@ -577,8 +577,10 @@ void ScHTMLExport::WriteBody() ...@@ -577,8 +577,10 @@ void ScHTMLExport::WriteBody()
{ {
// Save graphic as (JPG) file // Save graphic as (JPG) file
aGrfNm = aStreamPath; aGrfNm = aStreamPath;
sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, aGrfNm, OUString aTmp(aGrfNm);
String("JPG"), XOUTBMP_USE_NATIVE_IF_POSSIBLE ); sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, aTmp,
OUString("JPG"), XOUTBMP_USE_NATIVE_IF_POSSIBLE );
aGrfNm = aTmp;
if( !nErr ) // Contains errors, as we have nothing to output if( !nErr ) // Contains errors, as we have nothing to output
{ {
aGrfNm = URIHelper::SmartRel2Abs( aGrfNm = URIHelper::SmartRel2Abs(
......
...@@ -190,10 +190,10 @@ void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf, ...@@ -190,10 +190,10 @@ void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf,
if( aStreamPath.Len() > 0 ) if( aStreamPath.Len() > 0 )
{ {
// Save as a PNG // Save as a PNG
String aGrfNm( aStreamPath ); OUString aGrfNm( aStreamPath );
nXOutFlags |= XOUTBMP_USE_NATIVE_IF_POSSIBLE; nXOutFlags |= XOUTBMP_USE_NATIVE_IF_POSSIBLE;
sal_uInt16 nErr = XOutBitmap::WriteGraphic( rGrf, aGrfNm, sal_uInt16 nErr = XOutBitmap::WriteGraphic( rGrf, aGrfNm,
String( "PNG" ), nXOutFlags ); OUString( "PNG" ), nXOutFlags );
// If it worked, create a URL for the IMG tag // If it worked, create a URL for the IMG tag
if( !nErr ) if( !nErr )
......
...@@ -102,15 +102,14 @@ void ExternalToolEdit::Edit( GraphicObject* pGraphicObject ) ...@@ -102,15 +102,14 @@ void ExternalToolEdit::Edit( GraphicObject* pGraphicObject )
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter(); GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
sal_uInt16 nFilter(rGraphicFilter.GetExportFormatNumber(fExtension)); sal_uInt16 nFilter(rGraphicFilter.GetExportFormatNumber(fExtension));
String aFilter(rGraphicFilter.GetExportFormatShortName(nFilter)); OUString aFilter(rGraphicFilter.GetExportFormatShortName(nFilter));
String sPath(aTempFileName);
// Write the Graphic to the file now // Write the Graphic to the file now
XOutBitmap::WriteGraphic(aGraphic, sPath, aFilter, XOUTBMP_USE_NATIVE_IF_POSSIBLE | XOUTBMP_DONT_EXPAND_FILENAME); XOutBitmap::WriteGraphic(aGraphic, aTempFileName, aFilter, XOUTBMP_USE_NATIVE_IF_POSSIBLE | XOUTBMP_DONT_EXPAND_FILENAME);
// There is a possiblity that sPath extnesion might have been changed if the // There is a possiblity that sPath extension might have been changed if the
// provided extension is not writable // provided extension is not writable
m_aFileName = OUString(sPath); m_aFileName = aTempFileName;
//Create a thread //Create a thread
......
...@@ -187,9 +187,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString& ...@@ -187,9 +187,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString&
} }
OUString aFilter( rGraphicFilter.GetExportFormatShortName( nFilter ) ); OUString aFilter( rGraphicFilter.GetExportFormatShortName( nFilter ) );
String aFilterString( aFilter ); XOutBitmap::WriteGraphic( rGraphic, sPath, aFilter,
String aPathString( sPath );
XOutBitmap::WriteGraphic( rGraphic, aPathString, aFilterString,
XOUTBMP_DONT_EXPAND_FILENAME | XOUTBMP_DONT_EXPAND_FILENAME |
XOUTBMP_DONT_ADD_EXTENSION | XOUTBMP_DONT_ADD_EXTENSION |
XOUTBMP_USE_NATIVE_IF_POSSIBLE ); XOUTBMP_USE_NATIVE_IF_POSSIBLE );
......
...@@ -113,8 +113,8 @@ Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nM ...@@ -113,8 +113,8 @@ Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nM
return aRetGraphic; return aRetGraphic;
} }
sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName, sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
const String& rFilterName, const sal_uIntPtr nFlags, const OUString& rFilterName, const sal_uIntPtr nFlags,
const Size* pMtfSize_100TH_MM ) const Size* pMtfSize_100TH_MM )
{ {
if( rGraphic.GetType() != GRAPHIC_NONE ) if( rGraphic.GetType() != GRAPHIC_NONE )
...@@ -147,7 +147,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName, ...@@ -147,7 +147,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName,
if(aSvgDataPtr.get() if(aSvgDataPtr.get()
&& aSvgDataPtr->getSvgDataArrayLength() && aSvgDataPtr->getSvgDataArrayLength()
&& rFilterName.EqualsIgnoreCaseAscii("svg")) && rFilterName.equalsIgnoreAsciiCase("svg"))
{ {
if(!(nFlags & XOUTBMP_DONT_ADD_EXTENSION)) if(!(nFlags & XOUTBMP_DONT_ADD_EXTENSION))
{ {
......
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