summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2013-03-06 12:45:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-14 16:34:42 +0100
commit9ddf14e46b0129e828e01cbf279eb46a9a583fd6 (patch)
treea244b577ec7ca2f655f3bdca0c19b4560f2979df /sdext
parentfacb4d5741e8f8f093bd288b32c40f9168cd911a (diff)
Resolves: #i82852# Presentation Minimizer: missing icon in info dialog
(cherry picked from commit 8fd66eeb883676c095c8360ef609e56b9bc055a3) Conflicts: sdext/source/minimizer/informationdialog.cxx sdext/source/minimizer/informationdialog.hxx Change-Id: I8f6ea8edf7c1b95fefa6c280a92030d628339e56
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/minimizer/informationdialog.cxx52
-rw-r--r--sdext/source/minimizer/informationdialog.hxx1
2 files changed, 14 insertions, 39 deletions
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx
index 92accb20a60b..babba10cfaf1 100644
--- a/sdext/source/minimizer/informationdialog.cxx
+++ b/sdext/source/minimizer/informationdialog.cxx
@@ -90,8 +90,15 @@ OUString InsertFixedText( InformationDialog& rInformationDialog, const OUString&
return rControlName;
}
-OUString InsertImage( InformationDialog& rInformationDialog, const OUString& rControlName, const OUString& rURL,
- sal_Int32 nPosX, sal_Int32 nPosY, sal_Int32 nWidth, sal_Int32 nHeight )
+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 ),
@@ -108,7 +115,7 @@ OUString InsertImage( InformationDialog& rInformationDialog, const OUString& rCo
Any( rURL ),
Any( nPosX ),
Any( nPosY ),
- Any( sal_True ),
+ Any( bScale ),
Any( nWidth ) };
sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
@@ -202,40 +209,6 @@ static OUString ImpValueOfInMB( const sal_Int64& rVal )
return aVal.makeStringAndClear();
}
-OUString InformationDialog::ImpGetStandardImage( const OUString& sPrivateURL )
-{
- OUString sURL;
- try
- {
- mxTempFile = Reference< XStream >( io::TempFile::create(mxMSF), UNO_QUERY_THROW );
- Reference< XPropertySet > xPropSet( mxTempFile, UNO_QUERY );
- Reference< XOutputStream > xOutputStream( mxTempFile->getOutputStream() );
- if ( xOutputStream.is() && xPropSet.is() )
- {
- Reference< graphic::XGraphicProvider > xGraphicProvider( graphic::GraphicProvider::create( mxMSF ) );
- Sequence< PropertyValue > aArgs( 1 );
- aArgs[ 0 ].Name = OUString("URL");
- aArgs[ 0 ].Value <<= sPrivateURL;
- Reference< graphic::XGraphic > xGraphic( xGraphicProvider->queryGraphic( aArgs ) );
- if ( xGraphic.is() )
- {
- OUString aDestMimeType( "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("Uri") ) >>= sURL;
- }
- }
- catch( Exception& )
- {
- }
- return sURL;
-}
-
void InformationDialog::InitDialog()
{
sal_Int32 nDialogHeight = DIALOG_HEIGHT;
@@ -325,7 +298,10 @@ void InformationDialog::InitDialog()
aInfoString = aInfoString.replaceAt( k, aTitlePlaceholder.getLength(), aTitle );
com::sun::star::uno::Reference< com::sun::star::awt::XItemListener > xItemListener;
- InsertImage( *this, OUString("aboutimage"), ImpGetStandardImage( OUString("private:standardimage/query") ), 5, 5, 25, 25 );
+ InsertImage( *this,
+ OUString( "aboutimage" ),
+ OUString( "private:standardimage/query" ),
+ 5, 5, 25, 25, sal_False );
InsertFixedText( *this, OUString("fixedtext"), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 );
if ( !maSaveAsURL.isEmpty() )
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 8486de362c0a..5de67e1aafd7 100644
--- a/sdext/source/minimizer/informationdialog.hxx
+++ b/sdext/source/minimizer/informationdialog.hxx
@@ -61,7 +61,6 @@ private :
com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > mxActionListener;
- OUString ImpGetStandardImage( const OUString& rPrivateURL );
void InitDialog();
sal_Int64 mnSourceSize;