diff options
author | ka <kai.ahrens@oracle.com> | 2011-02-04 14:49:25 +0100 |
---|---|---|
committer | ka <kai.ahrens@oracle.com> | 2011-02-04 14:49:25 +0100 |
commit | d1da85e8f5d3b6a0c5d1fdcc4fedb0eff5e90b65 (patch) | |
tree | 6358b11432f38f7ac5a8870546eb4a682388820e /svtools | |
parent | 99ff7a9fb521895d6ba18ca4ca92d7eb0c3524fd (diff) |
ka102: SVG import implementation
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/AllLangResTarget_svt.mk | 2 | ||||
-rw-r--r-- | svtools/Library_svt.mk | 44 | ||||
-rw-r--r-- | svtools/inc/svtools/filter.hxx | 4 | ||||
-rw-r--r-- | svtools/inc/svtools/grfmgr.hxx | 20 | ||||
-rw-r--r-- | svtools/source/graphic/descriptor.cxx | 1 | ||||
-rw-r--r-- | svtools/source/graphic/descriptor.hxx | 2 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 14 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 2 |
8 files changed, 46 insertions, 43 deletions
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk index c41bc9d6b29e..442d6398a3fc 100644 --- a/svtools/AllLangResTarget_svt.mk +++ b/svtools/AllLangResTarget_svt.mk @@ -60,7 +60,7 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\ svtools/source/dialogs/prnsetup.src \ svtools/source/dialogs/so3res.src \ svtools/source/dialogs/wizardmachine.src \ - svtools/source/filter.vcl/filter/exportdialog.src \ + svtools/source/filter/exportdialog.src \ svtools/source/java/javaerror.src \ svtools/source/misc/ehdl.src \ svtools/source/misc/helpagent.src \ diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index fb0fae66ca12..3d429ff1ebe3 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -177,27 +177,27 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/edit/textwindowpeer \ svtools/source/edit/txtattr \ svtools/source/edit/xtextedt \ - svtools/source/filter.vcl/filter/FilterConfigCache \ - svtools/source/filter.vcl/filter/FilterConfigItem \ - svtools/source/filter.vcl/filter/SvFilterOptionsDialog \ - svtools/source/filter.vcl/filter/exportdialog \ - svtools/source/filter.vcl/filter/filter \ - svtools/source/filter.vcl/filter/filter2 \ - svtools/source/filter.vcl/filter/sgfbram \ - svtools/source/filter.vcl/filter/sgvmain \ - svtools/source/filter.vcl/filter/sgvspln \ - svtools/source/filter.vcl/filter/sgvtext \ - svtools/source/filter.vcl/igif/decode \ - svtools/source/filter.vcl/igif/gifread \ - svtools/source/filter.vcl/ixbm/xbmread \ - svtools/source/filter.vcl/ixpm/xpmread \ - svtools/source/filter.vcl/jpeg/jpeg \ - svtools/source/filter.vcl/wmf/emfwr \ - svtools/source/filter.vcl/wmf/enhwmf \ - svtools/source/filter.vcl/wmf/winmtf \ - svtools/source/filter.vcl/wmf/winwmf \ - svtools/source/filter.vcl/wmf/wmf \ - svtools/source/filter.vcl/wmf/wmfwr \ + svtools/source/filter/FilterConfigCache \ + svtools/source/filter/FilterConfigItem \ + svtools/source/filter/SvFilterOptionsDialog \ + svtools/source/filter/exportdialog \ + svtools/source/filter/filter \ + svtools/source/filter/filter2 \ + svtools/source/filter/sgfbram \ + svtools/source/filter/sgvmain \ + svtools/source/filter/sgvspln \ + svtools/source/filter/sgvtext \ + svtools/source/filter/igif/decode \ + svtools/source/filter/igif/gifread \ + svtools/source/filter/ixbm/xbmread \ + svtools/source/filter/ixpm/xpmread \ + svtools/source/filter/jpeg/jpeg \ + svtools/source/filter/wmf/emfwr \ + svtools/source/filter/wmf/enhwmf \ + svtools/source/filter/wmf/winmtf \ + svtools/source/filter/wmf/winwmf \ + svtools/source/filter/wmf/wmf \ + svtools/source/filter/wmf/wmfwr \ svtools/source/graphic/descriptor \ svtools/source/graphic/graphic \ svtools/source/graphic/graphicunofactory \ @@ -287,7 +287,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ )) $(eval $(call gb_Library_add_cobjects,svt,\ - svtools/source/filter.vcl/jpeg/jpegc \ + svtools/source/filter/jpeg/jpegc \ )) ifeq ($(OS),LINUX) diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx index 8c6f014d4219..74e7f6456e71 100644 --- a/svtools/inc/svtools/filter.hxx +++ b/svtools/inc/svtools/filter.hxx @@ -83,6 +83,7 @@ class Graphic; #define IMP_JPEG "SVIJPEG" #define IMP_XBM "SVIXBM" #define IMP_XPM "SVIXPM" +#define IMP_SVG "SVISVG" #define EXP_BMP "SVBMP" #define EXP_SVMETAFILE "SVMETAFILE" #define EXP_WMF "SVWMF" @@ -101,6 +102,7 @@ class Graphic; #define TIF_SHORTNAME "TIF" #define WMF_SHORTNAME "WMF" #define EMF_SHORTNAME "EMF" +#define SVG_SHORTNAME "SVG" // ------------------------------------ // - Info-Klasse fuer alle von uns @@ -132,6 +134,7 @@ class Graphic; #define GFF_WMF ( (USHORT)0x00f6 ) #define GFF_SGV ( (USHORT)0x00f7 ) #define GFF_EMF ( (USHORT)0x00f8 ) +#define GFF_SVG ( (USHORT)0x00f9 ) #define GFF_XXX ( (USHORT)0xffff ) // --------------------- @@ -177,6 +180,7 @@ class SVT_DLLPUBLIC GraphicDescriptor BOOL ImpDetectWMF( SvStream& rStm, BOOL bExtendedInfo ); BOOL ImpDetectSGV( SvStream& rStm, BOOL bExtendedInfo ); BOOL ImpDetectEMF( SvStream& rStm, BOOL bExtendedInfo ); + BOOL ImpDetectSVG( SvStream& rStm, BOOL bExtendedInfo ); GraphicDescriptor( const GraphicDescriptor& ); GraphicDescriptor& operator=( const GraphicDescriptor& ); diff --git a/svtools/inc/svtools/grfmgr.hxx b/svtools/inc/svtools/grfmgr.hxx index 3ed608c1525d..d358d5c3329a 100644 --- a/svtools/inc/svtools/grfmgr.hxx +++ b/svtools/inc/svtools/grfmgr.hxx @@ -213,14 +213,15 @@ private: ULONG mnAnimationLoopCount; void* mpDummy1; void* mpDummy2; - BOOL mbAutoSwapped : 1; - BOOL mbTransparent : 1; - BOOL mbAnimated : 1; - BOOL mbEPS : 1; - BOOL mbIsInSwapIn : 1; - BOOL mbIsInSwapOut : 1; - BOOL mbAlpha : 1; - BOOL mbDummyFlag8 : 1; + BOOL mbAutoSwapped : 1; + BOOL mbTransparent : 1; + BOOL mbAnimated : 1; + BOOL mbEPS : 1; + BOOL mbIsInSwapIn : 1; + BOOL mbIsInSwapOut : 1; + BOOL mbAlpha : 1; + BOOL mbIsRenderGraphic : 1; + BOOL mbHasRenderGraphic : 1; void SVT_DLLPRIVATE ImplConstruct(); void SVT_DLLPRIVATE ImplAssignGraphicData(); @@ -402,6 +403,8 @@ public: BOOL IsAlpha() const { return mbAlpha; } BOOL IsAnimated() const { return mbAnimated; } BOOL IsEPS() const { return mbEPS; } + BOOL IsRenderGraphic() const { return mbIsRenderGraphic; } + BOOL HasRenderGraphic() const { return mbHasRenderGraphic; } void ResetAnimationLoopCount(); List* GetAnimationInfoList() const; @@ -568,4 +571,3 @@ public: }; #endif // _GRFMGR_HXX - diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 5db73e6cc2f3..b82f4c8eb4aa 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -169,6 +169,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const ::rtl::OUString* pURL case( GFF_WMF ): pMimeType = MIMETYPE_WMF; cType = graphic::GraphicType::VECTOR; break; case( GFF_SGV ): pMimeType = MIMETYPE_SGV; cType = graphic::GraphicType::VECTOR; break; case( GFF_EMF ): pMimeType = MIMETYPE_EMF; cType = graphic::GraphicType::VECTOR; break; + case( GFF_SVG ): pMimeType = MIMETYPE_SVG; cType = graphic::GraphicType::VECTOR; break; default: break; diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx index bed7c64c0411..8f1e730b1bbc 100644 --- a/svtools/source/graphic/descriptor.hxx +++ b/svtools/source/graphic/descriptor.hxx @@ -123,7 +123,7 @@ private: ::rtl::OUString maMimeType; Size maSizePixel; Size maSize100thMM; - USHORT mnBitsPerPixel; + USHORT mnBitsPerPixel; bool mbTransparent; bool mbAlpha; bool mbAnimated; diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 221354cc6665..791caa29e421 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -190,15 +190,10 @@ void GraphicObject::ImplAssignGraphicData() mbTransparent = maGraphic.IsTransparent(); mbAlpha = maGraphic.IsAlpha(); mbAnimated = maGraphic.IsAnimated(); + mbEPS = maGraphic.IsEPS(); + mbIsRenderGraphic = maGraphic.IsRenderGraphic(); + mbHasRenderGraphic = maGraphic.HasRenderGraphic(); mnAnimationLoopCount = ( mbAnimated ? maGraphic.GetAnimationLoopCount() : 0 ); - - if( maGraphic.GetType() == GRAPHIC_GDIMETAFILE ) - { - const GDIMetaFile& rMtf = GetGraphic().GetGDIMetaFile(); - mbEPS = ( rMtf.GetActionCount() >= 1 ) && ( META_EPS_ACTION == rMtf.GetAction( 0 )->GetType() ); - } - else - mbEPS = FALSE; } // ----------------------------------------------------------------------------- @@ -447,7 +442,7 @@ void GraphicObject::Assign( const SvDataCopyStream& rCopyStream ) ByteString GraphicObject::GetUniqueID() const { - if ( !IsInSwapIn() && IsEPS() ) + if ( !IsInSwapIn() && ( IsEPS() || IsRenderGraphic() ) ) const_cast<GraphicObject*>(this)->FireSwapInRequest(); ByteString aRet; @@ -1379,4 +1374,3 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const ::rtl::OUString & return GraphicObject( aGraphic ); } } - diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 7e1255aabc56..7e459c7f44cf 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -869,6 +869,8 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut, // FALLTHROUGH intended case META_GRADIENTEX_ACTION: // FALLTHROUGH intended + case META_RENDERGRAPHIC_ACTION: + // FALLTHROUGH intended // OutDev state changes that _do_ affect bitmap // output |