summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2012-06-11 08:38:23 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-04-14 21:33:59 +0100
commit4fa8df7320f6bdc8333f5936537d2ed93e8892ce (patch)
tree3b3d06d3ba0dd698e1fb168171e4de1b4d60c12a /svx
parent9bc0ca091b7037f7c8f4782103a81b7287bc1de3 (diff)
Resolves: #i119735# missing css.svg.SVGWriter when using GraphicProvider
missing implementation for com.sun.star.svg.SVGWriter when using GraphicProvider Adapted patch provided by Sven Jacobi (thanks), added some fixes/cleanups to make it work with all kind of graphics (SVG, Bitmap, Metafile) (cherry picked from commit 891011181285d7ad54984ffd05ed44d825a70647) Conflicts: filter/inc/filter/msfilter/msdffimp.hxx filter/source/graphicfilter/epict/epict.cxx filter/source/svg/svgexport.cxx filter/source/svg/svguno.cxx filter/source/svg/svgwriter.cxx filter/source/svg/svgwriter.hxx svtools/source/filter/filter.cxx Change-Id: Ie53f995614060a00c709f620f89d132913a25c5c
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdxcgv.cxx12
-rw-r--r--svx/source/unodraw/unoshap4.cxx14
-rw-r--r--svx/source/unodraw/unoshape.cxx14
3 files changed, 6 insertions, 34 deletions
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 72268f682058..6ed282dd17e2 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -504,16 +504,8 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked) co
{
Graphic aGraphic( pGrafObj->GetTransformedGraphic() );
- if( aGraphic.GetType() == GRAPHIC_BITMAP )
- {
- const Point aPos;
-
- aMtf.AddAction( new MetaBmpExScaleAction( aPos, aBoundSize, aGraphic.GetBitmapEx() ) );
- aMtf.SetPrefMapMode( aMap );
- aMtf.SetPrefSize( aBoundSize );
- }
- else
- aMtf = aGraphic.GetGDIMetaFile();
+ // #119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically
+ aMtf = aGraphic.GetGDIMetaFile();
}
}
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index bacf34b392a0..6c3d9228536b 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -236,18 +236,8 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro
}
if ( !bIsWMF )
{
- GDIMetaFile aMtf;
- if ( pGraphic->GetType() != GRAPHIC_BITMAP )
- aMtf = pObj->GetGraphic()->GetGDIMetaFile();
- else
- {
- VirtualDevice aVirDev;
- aMtf.Record( &aVirDev );
- pGraphic->Draw( &aVirDev, Point(), pGraphic->GetPrefSize() );
- aMtf.Stop();
- aMtf.SetPrefSize( pGraphic->GetPrefSize() );
- aMtf.SetPrefMapMode( pGraphic->GetPrefMapMode() );
- }
+ // #i119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically
+ GDIMetaFile aMtf(pObj->GetGraphic()->GetGDIMetaFile());
SvMemoryStream aDestStrm( 65535, 65535 );
ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False );
const uno::Sequence<sal_Int8> aSeq(
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index a60030dd70df..245d1016c06b 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2942,18 +2942,8 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
}
if ( !bIsWMF )
{
- GDIMetaFile aMtf;
- if ( pGraphic->GetType() != GRAPHIC_BITMAP )
- aMtf = pObj->GetGraphic()->GetGDIMetaFile();
- else
- {
- VirtualDevice aVirDev;
- aMtf.Record( &aVirDev );
- pGraphic->Draw( &aVirDev, Point(), pGraphic->GetPrefSize() );
- aMtf.Stop();
- aMtf.SetPrefSize( pGraphic->GetPrefSize() );
- aMtf.SetPrefMapMode( pGraphic->GetPrefMapMode() );
- }
+ // #119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically
+ GDIMetaFile aMtf(pObj->GetGraphic()->GetGDIMetaFile());
SvMemoryStream aDestStrm( 65535, 65535 );
ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False );
const uno::Sequence<sal_Int8> aSeq(