diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2013-03-06 12:45:15 +0000 |
---|---|---|
committer | Ariel Constenla-Haile <arielch@apache.org> | 2013-03-06 12:45:15 +0000 |
commit | 8fd66eeb883676c095c8360ef609e56b9bc055a3 (patch) | |
tree | 365b6e2ab0ae81241a4c9f890317ab3f5d2661a4 /sdext | |
parent | 75833fdb6ede664fdcef38a16ecf1f8d3f3adc7d (diff) |
i82852 - Presentation Minimizer: missing icon in information dialog
Notes
Notes:
merged as: 9ddf14e46b0129e828e01cbf279eb46a9a583fd6
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/minimizer/informationdialog.cxx | 53 | ||||
-rw-r--r-- | sdext/source/minimizer/informationdialog.hxx | 1 |
2 files changed, 14 insertions, 40 deletions
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx index 7535e1ae1d30..7074adf1e4d6 100644 --- a/sdext/source/minimizer/informationdialog.cxx +++ b/sdext/source/minimizer/informationdialog.cxx @@ -92,8 +92,15 @@ rtl::OUString InsertFixedText( InformationDialog& rInformationDialog, const rtl: return rControlName; } -rtl::OUString InsertImage( InformationDialog& rInformationDialog, const OUString& rControlName, const OUString& rURL, - sal_Int32 nPosX, sal_Int32 nPosY, sal_Int32 nWidth, sal_Int32 nHeight ) +rtl::OUString InsertImage( + InformationDialog& rInformationDialog, + const OUString& rControlName, + const OUString& rURL, + sal_Int32 nPosX, + sal_Int32 nPosY, + sal_Int32 nWidth, + sal_Int32 nHeight, + sal_Bool bScale ) { OUString pNames[] = { TKGet( TK_Border ), @@ -110,7 +117,7 @@ rtl::OUString InsertImage( InformationDialog& rInformationDialog, const OUString Any( rURL ), Any( nPosX ), Any( nPosY ), - Any( sal_True ), + Any( bScale ), Any( nWidth ) }; sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString ); @@ -204,41 +211,6 @@ static OUString ImpValueOfInMB( const sal_Int64& rVal ) return aVal.makeStringAndClear(); } -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 ); - 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 ); - Sequence< PropertyValue > aArgs( 1 ); - aArgs[ 0 ].Name = OUString::createFromAscii( "URL" ); - aArgs[ 0 ].Value <<= sPrivateURL; - Reference< graphic::XGraphic > xGraphic( xGraphicProvider->queryGraphic( aArgs ) ); - if ( xGraphic.is() ) - { - OUString aDestMimeType( RTL_CONSTASCII_USTRINGPARAM( "image/png" ) ); - Sequence< PropertyValue > aArgs2( 2 ); - aArgs2[ 0 ].Name = TKGet( TK_MimeType ); // the GraphicProvider is using "MimeType", the GraphicExporter "MediaType"... - aArgs2[ 0 ].Value <<= aDestMimeType; - aArgs2[ 1 ].Name = TKGet( TK_OutputStream ); - aArgs2[ 1 ].Value <<= xOutputStream; - xGraphicProvider->storeGraphic( xGraphic, aArgs2 ); - } - xPropSet->getPropertyValue( OUString::createFromAscii( "Uri" ) ) >>= sURL; - } - } - catch( Exception& ) - { - } - return sURL; -} - void InformationDialog::InitDialog() { sal_Int32 nDialogHeight = DIALOG_HEIGHT; @@ -331,7 +303,10 @@ 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 ); + InsertImage( *this, + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "aboutimage" ) ), + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:standardimage/query" ) ), + 5, 5, 25, 25, sal_False ); InsertFixedText( *this, rtl::OUString( rtl::OUString::createFromAscii( "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 ); diff --git a/sdext/source/minimizer/informationdialog.hxx b/sdext/source/minimizer/informationdialog.hxx index 033baeb63dea..0edafc1eea62 100644 --- a/sdext/source/minimizer/informationdialog.hxx +++ b/sdext/source/minimizer/informationdialog.hxx @@ -65,7 +65,6 @@ private : com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > mxActionListener; - rtl::OUString ImpGetStandardImage( const rtl::OUString& rPrivateURL ); void InitDialog(); sal_Int64 mnSourceSize; |