diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-05-27 20:47:31 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-05-27 20:47:31 +0200 |
commit | 9e5584a82633442467a53ccc08c3380070178a38 (patch) | |
tree | 03ecad6d69523ff70217dd583ac757500135697d /vcl/source/gdi/impgraph.cxx | |
parent | 9d4ec37cb09142515a5bc1fdc06beee1f8b0642a (diff) | |
parent | 73b79fe869dee44b26d79d9e448fa95544a375e7 (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m106'
Conflicts:
cppcanvas/source/mtfrenderer/implrenderer.cxx
i18npool/inc/i18npool/lang.h
i18npool/source/isolang/isolang.cxx
svtools/source/filter/exportdialog.cxx
svtools/source/graphic/grfmgr.cxx
vcl/aqua/source/dtrans/aqua_service.cxx
vcl/aqua/source/window/salframe.cxx
vcl/inc/sft.hxx
vcl/inc/unx/pspgraphics.h
vcl/inc/vcl/cursor.hxx
vcl/inc/vcl/gdimtf.hxx
vcl/inc/vcl/settings.hxx
vcl/prj/d.lst
vcl/source/app/settings.cxx
vcl/source/control/edit.cxx
vcl/source/gdi/gdimtf.cxx
vcl/source/window/cursor.cxx
vcl/source/window/window.cxx
vcl/unx/generic/fontmanager/fontconfig.cxx
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
vcl/unx/kde4/KDESalGraphics.cxx
Diffstat (limited to 'vcl/source/gdi/impgraph.cxx')
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 64 |
1 files changed, 61 insertions, 3 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index bf99364a0f64..9d995f361329 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -28,22 +28,26 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" + #include <tools/vcompat.hxx> #include <tools/urlobj.hxx> #include <tools/debug.hxx> +#include <tools/stream.hxx> + #include <ucbhelper/content.hxx> + #include <unotools/ucbstreamhelper.hxx> #include <unotools/tempfile.hxx> #include <vcl/outdev.hxx> #include <vcl/virdev.hxx> -#include <tools/debug.hxx> -#include <tools/stream.hxx> -#include <vcl/impgraph.hxx> #include <vcl/gfxlink.hxx> #include <vcl/cvtgrf.hxx> #include <vcl/salbtype.hxx> #include <vcl/graph.hxx> #include <vcl/metaact.hxx> + +#include <impgraph.hxx> + #include <com/sun/star/ucb/CommandAbortedException.hpp> // ----------- @@ -479,6 +483,48 @@ sal_Bool ImpGraphic::ImplIsAnimated() const // ------------------------------------------------------------------------ +sal_Bool ImpGraphic::ImplIsEPS() const +{ + return( ( meType == GRAPHIC_GDIMETAFILE ) && + ( maMetaFile.GetActionSize() > 0 ) && + ( maMetaFile.GetAction( 0 )->GetType() == META_EPS_ACTION ) ); +} + +// ------------------------------------------------------------------------ + +sal_Bool ImpGraphic::ImplIsRenderGraphic() const +{ + return( ( GRAPHIC_GDIMETAFILE == meType ) && + ( 1 == maMetaFile.GetActionSize() ) && + ( META_RENDERGRAPHIC_ACTION == maMetaFile.GetAction( 0 )->GetType() ) ); +} + +// ------------------------------------------------------------------------ + +sal_Bool ImpGraphic::ImplHasRenderGraphic() const +{ + sal_Bool bRet = sal_False; + + if( GRAPHIC_GDIMETAFILE == meType ) + { + GDIMetaFile& rMtf = const_cast< ImpGraphic* >( this )->maMetaFile; + + for( MetaAction* pAct = rMtf.FirstAction(); pAct && !bRet; pAct = rMtf.NextAction() ) + { + if( META_RENDERGRAPHIC_ACTION == pAct->GetType() ) + { + bRet = sal_True; + } + } + + rMtf.WindStart(); + } + + return( bRet ); +} + +// ------------------------------------------------------------------------ + Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters) const { Bitmap aRetBmp; @@ -591,6 +637,18 @@ Animation ImpGraphic::ImplGetAnimation() const // ------------------------------------------------------------------------ +::vcl::RenderGraphic ImpGraphic::ImplGetRenderGraphic() const +{ + ::vcl::RenderGraphic aRet; + + if( ImplIsRenderGraphic() ) + aRet = static_cast< MetaRenderGraphicAction* >( maMetaFile.GetAction( 0 ) )->GetRenderGraphic(); + + return( aRet ); +} + +// ------------------------------------------------------------------------ + const GDIMetaFile& ImpGraphic::ImplGetGDIMetaFile() const { return maMetaFile; |