summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/AllLangResTarget_svt.mk2
-rw-r--r--svtools/Library_svt.mk46
-rw-r--r--svtools/inc/svtools/filter.hxx52
-rw-r--r--svtools/inc/svtools/grfmgr.hxx34
-rw-r--r--svtools/source/filter/FilterConfigCache.cxx (renamed from svtools/source/filter.vcl/filter/FilterConfigCache.cxx)3
-rw-r--r--svtools/source/filter/FilterConfigCache.hxx (renamed from svtools/source/filter.vcl/filter/FilterConfigCache.hxx)0
-rw-r--r--svtools/source/filter/FilterConfigItem.cxx (renamed from svtools/source/filter.vcl/filter/FilterConfigItem.cxx)0
-rw-r--r--svtools/source/filter/SvFilterOptionsDialog.cxx (renamed from svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx)0
-rw-r--r--svtools/source/filter/SvFilterOptionsDialog.hxx (renamed from svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx)0
-rw-r--r--svtools/source/filter/exportdialog.cxx (renamed from svtools/source/filter.vcl/filter/exportdialog.cxx)1
-rw-r--r--[-rwxr-xr-x]svtools/source/filter/exportdialog.hrc (renamed from svtools/source/filter.vcl/filter/exportdialog.hrc)0
-rw-r--r--svtools/source/filter/exportdialog.hxx (renamed from svtools/source/filter.vcl/filter/exportdialog.hxx)0
-rw-r--r--svtools/source/filter/exportdialog.src (renamed from svtools/source/filter.vcl/filter/exportdialog.src)0
-rw-r--r--svtools/source/filter/filter.cxx (renamed from svtools/source/filter.vcl/filter/filter.cxx)120
-rw-r--r--svtools/source/filter/filter2.cxx (renamed from svtools/source/filter.vcl/filter/filter2.cxx)19
-rw-r--r--svtools/source/filter/igif/decode.cxx (renamed from svtools/source/filter.vcl/igif/decode.cxx)0
-rw-r--r--svtools/source/filter/igif/decode.hxx (renamed from svtools/source/filter.vcl/igif/decode.hxx)0
-rw-r--r--svtools/source/filter/igif/gifread.cxx (renamed from svtools/source/filter.vcl/igif/gifread.cxx)0
-rw-r--r--svtools/source/filter/ixbm/xbmread.cxx (renamed from svtools/source/filter.vcl/ixbm/xbmread.cxx)0
-rw-r--r--svtools/source/filter/ixpm/rgbtable.hxx (renamed from svtools/source/filter.vcl/ixpm/rgbtable.hxx)0
-rw-r--r--svtools/source/filter/ixpm/xpmread.cxx (renamed from svtools/source/filter.vcl/ixpm/xpmread.cxx)0
-rw-r--r--svtools/source/filter/jpeg/jpeg.cxx (renamed from svtools/source/filter.vcl/jpeg/jpeg.cxx)4
-rw-r--r--svtools/source/filter/jpeg/jpeg.h (renamed from svtools/source/filter.vcl/jpeg/jpeg.h)0
-rw-r--r--svtools/source/filter/jpeg/jpegc.c (renamed from svtools/source/filter.vcl/jpeg/jpegc.c)0
-rw-r--r--svtools/source/filter/sgf.ini (renamed from svtools/source/filter.vcl/filter/sgf.ini)0
-rw-r--r--svtools/source/filter/sgfbram.cxx (renamed from svtools/source/filter.vcl/filter/sgfbram.cxx)0
-rw-r--r--svtools/source/filter/sgvmain.cxx (renamed from svtools/source/filter.vcl/filter/sgvmain.cxx)0
-rw-r--r--svtools/source/filter/sgvspln.cxx (renamed from svtools/source/filter.vcl/filter/sgvspln.cxx)0
-rw-r--r--svtools/source/filter/sgvtext.cxx (renamed from svtools/source/filter.vcl/filter/sgvtext.cxx)0
-rw-r--r--svtools/source/filter/wmf/emfwr.cxx (renamed from svtools/source/filter.vcl/wmf/emfwr.cxx)27
-rw-r--r--svtools/source/filter/wmf/emfwr.hxx (renamed from svtools/source/filter.vcl/wmf/emfwr.hxx)0
-rw-r--r--svtools/source/filter/wmf/enhwmf.cxx (renamed from svtools/source/filter.vcl/wmf/enhwmf.cxx)2
-rw-r--r--svtools/source/filter/wmf/winmtf.cxx (renamed from svtools/source/filter.vcl/wmf/winmtf.cxx)2
-rw-r--r--svtools/source/filter/wmf/winmtf.hxx (renamed from svtools/source/filter.vcl/wmf/winmtf.hxx)3
-rw-r--r--svtools/source/filter/wmf/winwmf.cxx (renamed from svtools/source/filter.vcl/wmf/winwmf.cxx)2
-rw-r--r--svtools/source/filter/wmf/wmf.cxx (renamed from svtools/source/filter.vcl/wmf/wmf.cxx)0
-rw-r--r--svtools/source/filter/wmf/wmfwr.cxx (renamed from svtools/source/filter.vcl/wmf/wmfwr.cxx)28
-rw-r--r--svtools/source/filter/wmf/wmfwr.hxx (renamed from svtools/source/filter.vcl/wmf/wmfwr.hxx)4
-rw-r--r--svtools/source/graphic/descriptor.cxx1
-rw-r--r--svtools/source/graphic/grfmgr.cxx17
-rw-r--r--svtools/source/graphic/grfmgr2.cxx4
-rw-r--r--svtools/source/uno/unoiface.cxx1
42 files changed, 253 insertions, 119 deletions
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk
index 0311c80d1316..0cc0bab23326 100644
--- a/svtools/AllLangResTarget_svt.mk
+++ b/svtools/AllLangResTarget_svt.mk
@@ -57,7 +57,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 fea3ca79e43f..3c666bfeb548 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_Library_add_precompiled_header,svt,$(SRCDIR)/svtools/inc/pch/pr
$(eval $(call gb_Library_set_componentfile,svt,svtools/util/svt))
$(eval $(call gb_Library_set_include,svt,\
+ -I$(OUTDIR)/inc/external/jpeg \
$$(INCLUDE) \
-I$(WORKDIR)/inc/svtools \
-I$(WORKDIR)/inc/ \
@@ -43,7 +44,6 @@ $(eval $(call gb_Library_set_include,svt,\
-I$(realpath $(SRCDIR)/svtools/source/inc) \
-I$(realpath $(SRCDIR)/svtools/inc/pch) \
-I$(OUTDIR)/inc/offuh \
- -I$(OUTDIR)/inc \
))
$(eval $(call gb_Library_set_defs,svt,\
@@ -174,27 +174,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 \
@@ -290,7 +290,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),WNT)
diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx
index 105783013bdc..ed2bbd55f7d4 100644
--- a/svtools/inc/svtools/filter.hxx
+++ b/svtools/inc/svtools/filter.hxx
@@ -84,6 +84,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"
@@ -102,6 +103,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
@@ -133,6 +135,7 @@ class Graphic;
#define GFF_WMF ( (sal_uInt16)0x00f6 )
#define GFF_SGV ( (sal_uInt16)0x00f7 )
#define GFF_EMF ( (sal_uInt16)0x00f8 )
+#define GFF_SVG ( (sal_uInt16)0x00f9 )
#define GFF_XXX ( (sal_uInt16)0xffff )
// ---------------------
@@ -154,30 +157,31 @@ class SVT_DLLPUBLIC GraphicDescriptor
void ImpConstruct();
- sal_Bool ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectPCD( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectXBM( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectXPM( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectPBM( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectPGM( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectPPM( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectRAS( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectTGA( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectEPS( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectDXF( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectMET( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectPCT( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectSGF( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectWMF( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectSGV( SvStream& rStm, sal_Bool bExtendedInfo );
- sal_Bool ImpDetectEMF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPCD( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectXBM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectXPM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPBM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPGM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPPM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectRAS( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectTGA( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectEPS( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectDXF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectMET( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPCT( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSGF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectWMF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSGV( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectEMF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSVG( SvStream& rStm, sal_Bool bExtendedInfo );
GraphicDescriptor( const GraphicDescriptor& );
GraphicDescriptor& operator=( const GraphicDescriptor& );
diff --git a/svtools/inc/svtools/grfmgr.hxx b/svtools/inc/svtools/grfmgr.hxx
index d3fcc9800c88..c99ea7a55bcd 100644
--- a/svtools/inc/svtools/grfmgr.hxx
+++ b/svtools/inc/svtools/grfmgr.hxx
@@ -214,14 +214,16 @@ private:
sal_uLong mnAnimationLoopCount;
void* mpDummy1;
void* mpDummy2;
- sal_Bool mbAutoSwapped : 1;
- sal_Bool mbTransparent : 1;
- sal_Bool mbAnimated : 1;
- sal_Bool mbEPS : 1;
- sal_Bool mbIsInSwapIn : 1;
- sal_Bool mbIsInSwapOut : 1;
- sal_Bool mbAlpha : 1;
- sal_Bool mbDummyFlag8 : 1;
+ sal_Bool mbAutoSwapped : 1;
+ sal_Bool mbTransparent : 1;
+ sal_Bool mbAnimated : 1;
+ sal_Bool mbEPS : 1;
+ sal_Bool mbIsInSwapIn : 1;
+ sal_Bool mbIsInSwapOut : 1;
+ sal_Bool mbAlpha : 1;
+ sal_Bool mbDummyFlag8 : 1;
+ sal_Bool mbIsRenderGraphic : 1;
+ sal_Bool mbHasRenderGraphic : 1;
void SVT_DLLPRIVATE ImplConstruct();
void SVT_DLLPRIVATE ImplAssignGraphicData();
@@ -397,12 +399,14 @@ public:
GraphicType GetType() const { return meType; }
const Size& GetPrefSize() const { return maPrefSize; }
const MapMode& GetPrefMapMode() const { return maPrefMapMode; }
- sal_uLong GetSizeBytes() const { return mnSizeBytes; }
- sal_uLong GetChecksum() const;
- sal_Bool IsTransparent() const { return mbTransparent; }
- sal_Bool IsAlpha() const { return mbAlpha; }
- sal_Bool IsAnimated() const { return mbAnimated; }
- sal_Bool IsEPS() const { return mbEPS; }
+ sal_uLong GetSizeBytes() const { return mnSizeBytes; }
+ sal_uLong GetChecksum() const;
+ sal_Bool IsTransparent() const { return mbTransparent; }
+ sal_Bool IsAlpha() const { return mbAlpha; }
+ sal_Bool IsAnimated() const { return mbAnimated; }
+ sal_Bool IsEPS() const { return mbEPS; }
+ sal_Bool IsRenderGraphic() const { return mbIsRenderGraphic; }
+ sal_Bool HasRenderGraphic() const { return mbHasRenderGraphic; }
void ResetAnimationLoopCount();
List* GetAnimationInfoList() const;
@@ -570,4 +574,4 @@ public:
#endif // _GRFMGR_HXX
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx b/svtools/source/filter/FilterConfigCache.cxx
index c142aa1ce95d..50bc9a028309 100644
--- a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx
+++ b/svtools/source/filter/FilterConfigCache.cxx
@@ -57,7 +57,7 @@ const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameLi
const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameList[] =
{
- IMP_SVMETAFILE, IMP_WMF, IMP_EMF, IMP_SVSGF, IMP_SVSGV,
+ IMP_SVMETAFILE, IMP_WMF, IMP_EMF, IMP_SVSGF, IMP_SVSGV, IMP_SVG,
EXP_SVMETAFILE, EXP_WMF, EXP_EMF, EXP_SVG, NULL
};
@@ -304,6 +304,7 @@ const char* FilterConfigCache::InternalFilterListForSvxLight[] =
"xbm","1","SVIXBM",
"xpm","1","SVIXPM",
"xpm","2","exp",
+ "svg","1","SVISVG",
"svg","2","SVESVG",
NULL
};
diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.hxx b/svtools/source/filter/FilterConfigCache.hxx
index b1579bec092a..b1579bec092a 100644
--- a/svtools/source/filter.vcl/filter/FilterConfigCache.hxx
+++ b/svtools/source/filter/FilterConfigCache.hxx
diff --git a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx b/svtools/source/filter/FilterConfigItem.cxx
index fddeec1f0482..fddeec1f0482 100644
--- a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
+++ b/svtools/source/filter/FilterConfigItem.cxx
diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx
index 6f78dd19fb6e..6f78dd19fb6e 100644
--- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.cxx
diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx b/svtools/source/filter/SvFilterOptionsDialog.hxx
index 6cc10d98d6a7..6cc10d98d6a7 100644
--- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx
+++ b/svtools/source/filter/SvFilterOptionsDialog.hxx
diff --git a/svtools/source/filter.vcl/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 12415a943b91..64d0365f0493 100644
--- a/svtools/source/filter.vcl/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -1510,4 +1510,3 @@ IMPL_LINK( ExportDialog, OK, void *, EMPTYARG )
return 0;
}
-
diff --git a/svtools/source/filter.vcl/filter/exportdialog.hrc b/svtools/source/filter/exportdialog.hrc
index e230bcd2c5c3..e230bcd2c5c3 100755..100644
--- a/svtools/source/filter.vcl/filter/exportdialog.hrc
+++ b/svtools/source/filter/exportdialog.hrc
diff --git a/svtools/source/filter.vcl/filter/exportdialog.hxx b/svtools/source/filter/exportdialog.hxx
index 20a9ac3ea832..20a9ac3ea832 100644
--- a/svtools/source/filter.vcl/filter/exportdialog.hxx
+++ b/svtools/source/filter/exportdialog.hxx
diff --git a/svtools/source/filter.vcl/filter/exportdialog.src b/svtools/source/filter/exportdialog.src
index c9e87989a314..c9e87989a314 100644
--- a/svtools/source/filter.vcl/filter/exportdialog.src
+++ b/svtools/source/filter/exportdialog.src
diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter/filter.cxx
index 5ea07d2017f2..2a64a576feb6 100644
--- a/svtools/source/filter.vcl/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -40,6 +40,7 @@
#include <vcl/salctype.hxx>
#include <vcl/pngread.hxx>
#include <vcl/pngwrite.hxx>
+#include <vcl/svgread.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
#include <osl/file.hxx>
@@ -551,7 +552,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
for ( nOffset = 0; ( nOffset <= 512 ) && ( ( nStreamPos + nOffset + 14 ) <= nStreamLen ); nOffset += 512 )
{
short y1,x1,y2,x2;
- bool bdBoxOk = true;
+ sal_Bool bdBoxOk = sal_True;
rStream.Seek( nStreamPos + nOffset);
// size of the pict in version 1 pict ( 2bytes) : ignored
@@ -564,7 +565,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if (x1 > x2 || y1 > y2 || // bad bdbox
(x1 == x2 && y1 == y2) || // 1 pixel picture
x2-x1 > 2048 || y2-y1 > 2048 ) // picture anormaly big
- bdBoxOk = false;
+ bdBoxOk = sal_False;
// read version op
rStream.Read( sBuf,3 );
@@ -673,10 +674,22 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
return sal_True;
}
+ //--------------------------- SVG ------------------------------------
+ if( !bTest || ( rFormatExtension.CompareToAscii( "SVG", 3 ) == COMPARE_EQUAL ) )
+ {
+ bSomethingTested=sal_True;
+
+ // just a simple test for the extension
+ if( rFormatExtension.CompareToAscii( "SVG", 3 ) == COMPARE_EQUAL )
+ return sal_True;
+ }
+
//--------------------------- TGA ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL ) )
{
bSomethingTested = sal_True;
+
+ // just a simple test for the extension
if( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL )
return sal_True;
}
@@ -685,6 +698,8 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if( !bTest || ( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL ) )
{
bSomethingTested = sal_True;
+
+ // just a simple test for the extension
if( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL )
return sal_True;
}
@@ -1482,6 +1497,27 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath,
else
eLinkType = GFX_LINK_TYPE_NATIVE_JPG;
}
+ else if( aFilterName.EqualsIgnoreCaseAscii( IMP_SVG ) )
+ {
+ if( rGraphic.GetContext() == (GraphicReader*) 1 )
+ rGraphic.SetContext( NULL );
+
+ vcl::SVGReader aSVGReader( rIStream );
+ GDIMetaFile aSVGMtf;
+
+ if( 0 == aSVGReader.Read( aSVGMtf ).GetActionCount() )
+ nStatus = GRFILTER_FILTERERROR;
+ else
+ rGraphic = Graphic( aSVGMtf );
+
+ // Dont set any GfxLink here, since the MetaRenderGraphicAction
+ // inside the just read MetaFile contains excatly this native data;
+ // setting a ǴfxLink would also affect other program parts, since
+ // GfxLinks are preferably written to the file format in general,
+ // which would be a bad idea in case of SVG files, since earlier
+ // implementations are not able to handle native SVG data in any
+ // case. (KA 01/19/2011)
+ }
else if( aFilterName.EqualsIgnoreCaseAscii( IMP_XBM ) )
{
if( rGraphic.GetContext() == (GraphicReader*) 1 )
@@ -1744,7 +1780,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
// Maximalen Speicherbedarf fuer das Bildes holen:
// if( GetOptionsConfig() )
-// nMaxMem = (sal_uInt32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32();
+// nMaxMem = (UINT32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32();
// else
nMaxMem = 1024;
@@ -1822,7 +1858,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
aMTF.SetPrefSize( aGraphic.GetPrefSize() );
aMTF.SetPrefMapMode( aGraphic.GetPrefMapMode() );
}
- rOStm << aMTF;
+ aMTF.Write( rOStm, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
if( rOStm.GetError() )
nStatus = GRFILTER_IOERROR;
}
@@ -1939,44 +1975,69 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
}
else if( aFilterName.EqualsIgnoreCaseAscii( EXP_SVG ) )
{
- try
+ sal_Bool bDone = sal_False;
+
+ // do we have a native SVG RenderGraphic, whose data can be written directly?
+ if( ( GRAPHIC_GDIMETAFILE == eType ) && aGraphic.IsRenderGraphic() )
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
+ const ::vcl::RenderGraphic aRenderGraphic( aGraphic.GetRenderGraphic() );
- if( xMgr.is() )
+ if( aRenderGraphic.GetGraphicDataLength() &&
+ aRenderGraphic.GetGraphicDataMimeType().equalsIgnoreAsciiCase(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "image/svg+xml" ) ) ) )
{
- ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > xSaxWriter( xMgr->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) ), ::com::sun::star::uno::UNO_QUERY );
+ rOStm.Write( aRenderGraphic.GetGraphicData().get(),
+ aRenderGraphic.GetGraphicDataLength() );
- ::com::sun::star::uno::Reference< ::com::sun::star::svg::XSVGWriter > xSVGWriter( xMgr->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svg.SVGWriter" )) ), ::com::sun::star::uno::UNO_QUERY );
+ if( rOStm.GetError() )
+ {
+ nStatus = GRFILTER_IOERROR;
+ }
+ }
+ }
- if( xSaxWriter.is() && xSVGWriter.is() )
+ if( !bDone )
+ {
+ // do the normal GDIMetaFile export instead
+ try
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
+
+ if( xMgr.is() )
{
- ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xActiveDataSource(
- xSaxWriter, ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > xSaxWriter( xMgr->createInstance(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) ), ::com::sun::star::uno::UNO_QUERY );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::svg::XSVGWriter > xSVGWriter( xMgr->createInstance(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svg.SVGWriter" )) ), ::com::sun::star::uno::UNO_QUERY );
- if( xActiveDataSource.is() )
+ if( xSaxWriter.is() && xSVGWriter.is() )
{
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xStmIf(
- static_cast< ::cppu::OWeakObject* >( new ImpFilterOutputStream( rOStm ) ) );
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xActiveDataSource(
+ xSaxWriter, ::com::sun::star::uno::UNO_QUERY );
- SvMemoryStream aMemStm( 65535, 65535 );
+ if( xActiveDataSource.is() )
+ {
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xStmIf(
+ static_cast< ::cppu::OWeakObject* >( new ImpFilterOutputStream( rOStm ) ) );
+
+ SvMemoryStream aMemStm( 65535, 65535 );
- aMemStm.SetCompressMode( COMPRESSMODE_FULL );
- ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( aMemStm );
+ aMemStm.SetCompressMode( COMPRESSMODE_FULL );
+ ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( aMemStm );
- xActiveDataSource->setOutputStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >(
- xStmIf, ::com::sun::star::uno::UNO_QUERY ) );
- ::com::sun::star::uno::Sequence< sal_Int8 > aMtfSeq( (sal_Int8*) aMemStm.GetData(), aMemStm.Tell() );
- xSVGWriter->write( xSaxWriter, aMtfSeq );
+ xActiveDataSource->setOutputStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >(
+ xStmIf, ::com::sun::star::uno::UNO_QUERY ) );
+ ::com::sun::star::uno::Sequence< sal_Int8 > aMtfSeq( (sal_Int8*) aMemStm.GetData(), aMemStm.Tell() );
+ xSVGWriter->write( xSaxWriter, aMtfSeq );
+ }
}
}
}
- }
- catch( ::com::sun::star::uno::Exception& )
- {
- nStatus = GRFILTER_IOERROR;
+ catch( ::com::sun::star::uno::Exception& )
+ {
+ nStatus = GRFILTER_IOERROR;
+ }
}
}
else
@@ -2123,6 +2184,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData )
case( CVT_TIF ): aShortName = TIF_SHORTNAME; break;
case( CVT_WMF ): aShortName = WMF_SHORTNAME; break;
case( CVT_EMF ): aShortName = EMF_SHORTNAME; break;
+ case( CVT_SVG ): aShortName = SVG_SHORTNAME; break;
default:
break;
@@ -2193,4 +2255,4 @@ int GraphicFilter::LoadGraphic( const String &rPath, const String &rFilterName,
return nRes;
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svtools/source/filter.vcl/filter/filter2.cxx b/svtools/source/filter/filter2.cxx
index 55b02d39c19f..d34825312470 100644
--- a/svtools/source/filter.vcl/filter/filter2.cxx
+++ b/svtools/source/filter/filter2.cxx
@@ -115,6 +115,7 @@ sal_Bool GraphicDescriptor::Detect( sal_Bool bExtendedInfo )
else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = sal_True;
else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = sal_True;
else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectSVG( rStm, bExtendedInfo ) ) bRet = sal_True;
else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = sal_True;
else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = sal_True;
else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = sal_True;
@@ -1300,6 +1301,21 @@ sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool )
|*
\************************************************************************/
+sal_Bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, sal_Bool /*bExtendedInfo*/ )
+{
+ sal_Bool bRet = aPathExt.CompareToAscii( "svg", 3 ) == COMPARE_EQUAL;
+ if (bRet)
+ nFormat = GFF_SVG;
+
+ return bRet;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
String GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat )
{
ByteString aKeyName;
@@ -1330,9 +1346,10 @@ String GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat )
case( GFF_SVM ) : aKeyName = "svm"; break;
case( GFF_WMF ) : aKeyName = "wmf"; break;
case( GFF_EMF ) : aKeyName = "emf"; break;
+ case( GFF_SVG ) : aKeyName = "svg"; break;
}
return String( aKeyName, RTL_TEXTENCODING_ASCII_US );
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svtools/source/filter.vcl/igif/decode.cxx b/svtools/source/filter/igif/decode.cxx
index 03a69414cd4b..03a69414cd4b 100644
--- a/svtools/source/filter.vcl/igif/decode.cxx
+++ b/svtools/source/filter/igif/decode.cxx
diff --git a/svtools/source/filter.vcl/igif/decode.hxx b/svtools/source/filter/igif/decode.hxx
index 3dd6328839d9..3dd6328839d9 100644
--- a/svtools/source/filter.vcl/igif/decode.hxx
+++ b/svtools/source/filter/igif/decode.hxx
diff --git a/svtools/source/filter.vcl/igif/gifread.cxx b/svtools/source/filter/igif/gifread.cxx
index 8de8c6c01148..8de8c6c01148 100644
--- a/svtools/source/filter.vcl/igif/gifread.cxx
+++ b/svtools/source/filter/igif/gifread.cxx
diff --git a/svtools/source/filter.vcl/ixbm/xbmread.cxx b/svtools/source/filter/ixbm/xbmread.cxx
index 0870eecb7187..0870eecb7187 100644
--- a/svtools/source/filter.vcl/ixbm/xbmread.cxx
+++ b/svtools/source/filter/ixbm/xbmread.cxx
diff --git a/svtools/source/filter.vcl/ixpm/rgbtable.hxx b/svtools/source/filter/ixpm/rgbtable.hxx
index 738c3f33460c..738c3f33460c 100644
--- a/svtools/source/filter.vcl/ixpm/rgbtable.hxx
+++ b/svtools/source/filter/ixpm/rgbtable.hxx
diff --git a/svtools/source/filter.vcl/ixpm/xpmread.cxx b/svtools/source/filter/ixpm/xpmread.cxx
index c218cff1630f..c218cff1630f 100644
--- a/svtools/source/filter.vcl/ixpm/xpmread.cxx
+++ b/svtools/source/filter/ixpm/xpmread.cxx
diff --git a/svtools/source/filter.vcl/jpeg/jpeg.cxx b/svtools/source/filter/jpeg/jpeg.cxx
index 609e4684513e..14a6988893c4 100644
--- a/svtools/source/filter.vcl/jpeg/jpeg.cxx
+++ b/svtools/source/filter/jpeg/jpeg.cxx
@@ -113,7 +113,7 @@ extern "C" void init_destination (j_compress_ptr cinfo)
dest->pub.free_in_buffer = BUF_SIZE;
}
-extern "C" int empty_output_buffer (j_compress_ptr cinfo)
+extern "C" boolean empty_output_buffer (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
@@ -218,7 +218,7 @@ long StreamRead( SvStream* pSvStm, void* pBuffer, long nBufferSize )
return nRead;
}
-extern "C" int fill_input_buffer (j_decompress_ptr cinfo)
+extern "C" boolean fill_input_buffer (j_decompress_ptr cinfo)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
size_t nbytes;
diff --git a/svtools/source/filter.vcl/jpeg/jpeg.h b/svtools/source/filter/jpeg/jpeg.h
index a77c335d4b66..a77c335d4b66 100644
--- a/svtools/source/filter.vcl/jpeg/jpeg.h
+++ b/svtools/source/filter/jpeg/jpeg.h
diff --git a/svtools/source/filter.vcl/jpeg/jpegc.c b/svtools/source/filter/jpeg/jpegc.c
index 06c7d4f69964..06c7d4f69964 100644
--- a/svtools/source/filter.vcl/jpeg/jpegc.c
+++ b/svtools/source/filter/jpeg/jpegc.c
diff --git a/svtools/source/filter.vcl/filter/sgf.ini b/svtools/source/filter/sgf.ini
index 7444e40c8836..7444e40c8836 100644
--- a/svtools/source/filter.vcl/filter/sgf.ini
+++ b/svtools/source/filter/sgf.ini
diff --git a/svtools/source/filter.vcl/filter/sgfbram.cxx b/svtools/source/filter/sgfbram.cxx
index 8559cbee30eb..8559cbee30eb 100644
--- a/svtools/source/filter.vcl/filter/sgfbram.cxx
+++ b/svtools/source/filter/sgfbram.cxx
diff --git a/svtools/source/filter.vcl/filter/sgvmain.cxx b/svtools/source/filter/sgvmain.cxx
index 404e2b5b01a1..404e2b5b01a1 100644
--- a/svtools/source/filter.vcl/filter/sgvmain.cxx
+++ b/svtools/source/filter/sgvmain.cxx
diff --git a/svtools/source/filter.vcl/filter/sgvspln.cxx b/svtools/source/filter/sgvspln.cxx
index 0ed81a50d534..0ed81a50d534 100644
--- a/svtools/source/filter.vcl/filter/sgvspln.cxx
+++ b/svtools/source/filter/sgvspln.cxx
diff --git a/svtools/source/filter.vcl/filter/sgvtext.cxx b/svtools/source/filter/sgvtext.cxx
index 5eb0b5e5c1f4..5eb0b5e5c1f4 100644
--- a/svtools/source/filter.vcl/filter/sgvtext.cxx
+++ b/svtools/source/filter/sgvtext.cxx
diff --git a/svtools/source/filter.vcl/wmf/emfwr.cxx b/svtools/source/filter/wmf/emfwr.cxx
index d556e889d2ad..bf5838d3267f 100644
--- a/svtools/source/filter.vcl/wmf/emfwr.cxx
+++ b/svtools/source/filter/wmf/emfwr.cxx
@@ -34,6 +34,7 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <vcl/lineinfo.hxx>
+#include <vcl/rendergraphicrasterizer.hxx>
// -----------
// - Defines -
@@ -1186,7 +1187,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_BMP_ACTION:
{
const MetaBmpAction* pA = (const MetaBmpAction *) pAction;
- ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), pA->GetBitmap().GetSizePixel(), WIN_SRCCOPY );
+ ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), maVDev.PixelToLogic( pA->GetBitmap().GetSizePixel() ), WIN_SRCCOPY );
}
break;
@@ -1217,8 +1218,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
aBmp.Replace( aMsk, COL_WHITE );
aMsk.Invert();
- ImplWriteBmpRecord( aMsk, pA->GetPoint(), aMsk.GetSizePixel(), WIN_SRCPAINT );
- ImplWriteBmpRecord( aBmp, pA->GetPoint(), aBmp.GetSizePixel(), WIN_SRCAND );
+ ImplWriteBmpRecord( aMsk, pA->GetPoint(), maVDev.PixelToLogic( aMsk.GetSizePixel() ), WIN_SRCPAINT );
+ ImplWriteBmpRecord( aBmp, pA->GetPoint(), maVDev.PixelToLogic( aBmp.GetSizePixel() ), WIN_SRCAND );
}
else
ImplWriteBmpRecord( aBmp, pA->GetPoint(), aBmp.GetSizePixel(), WIN_SRCCOPY );
@@ -1407,6 +1408,26 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
+ case( META_RENDERGRAPHIC_ACTION ):
+ {
+ const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pAction;
+ const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() );
+ const BitmapEx aBmpEx( aRasterizer.Rasterize( maVDev.LogicToPixel( pA->GetSize() ) ) );
+ Bitmap aBmp( aBmpEx.GetBitmap() );
+ Bitmap aMsk( aBmpEx.GetMask() );
+
+ if( !!aMsk )
+ {
+ aBmp.Replace( aMsk, COL_WHITE );
+ aMsk.Invert();
+ ImplWriteBmpRecord( aMsk, pA->GetPoint(), pA->GetSize(), WIN_SRCPAINT );
+ ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCAND );
+ }
+ else
+ ImplWriteBmpRecord( aBmp, pA->GetPoint(), pA->GetSize(), WIN_SRCCOPY );
+ }
+ break;
+
default:
OSL_FAIL( ( ByteString( "EMFWriter::ImplWriteActions: unsupported MetaAction #" ) += ByteString::CreateFromInt32( nType ) ).GetBuffer() );
break;
diff --git a/svtools/source/filter.vcl/wmf/emfwr.hxx b/svtools/source/filter/wmf/emfwr.hxx
index ee3b723ace3e..ee3b723ace3e 100644
--- a/svtools/source/filter.vcl/wmf/emfwr.hxx
+++ b/svtools/source/filter/wmf/emfwr.hxx
diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx
index 91cabcf430a3..7956064b909e 100644
--- a/svtools/source/filter.vcl/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -1530,4 +1530,4 @@ EnhWMFReader::~EnhWMFReader()
};
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx
index b0625567d5d6..252f217de365 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.cxx
+++ b/svtools/source/filter/wmf/winmtf.cxx
@@ -2226,4 +2226,4 @@ void WinMtfOutput::PassEMFPlus( void* pBuffer, sal_uInt32 nLength )
mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS", 0, static_cast<const sal_uInt8*>(pBuffer), nLength ) );
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter/wmf/winmtf.hxx
index bd2293fe108b..dc05969c7d5a 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.hxx
+++ b/svtools/source/filter/wmf/winmtf.hxx
@@ -793,5 +793,4 @@ public:
#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx
index c7d33a824adf..e989c2dd8904 100644
--- a/svtools/source/filter.vcl/wmf/winwmf.cxx
+++ b/svtools/source/filter/wmf/winwmf.cxx
@@ -1429,4 +1429,4 @@ WMFReader::~WMFReader()
delete pEMFStream;
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svtools/source/filter.vcl/wmf/wmf.cxx b/svtools/source/filter/wmf/wmf.cxx
index d78ce2d160bb..d78ce2d160bb 100644
--- a/svtools/source/filter.vcl/wmf/wmf.cxx
+++ b/svtools/source/filter/wmf/wmf.cxx
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter/wmf/wmfwr.cxx
index 2e507f835e68..1f018cc61f13 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.cxx
+++ b/svtools/source/filter/wmf/wmfwr.cxx
@@ -30,6 +30,7 @@
#include "precompiled_svtools.hxx"
#include <vcl/salbtype.hxx>
+#include <vcl/rendergraphicrasterizer.hxx>
#include "wmfwr.hxx"
#include <unotools/fontcvt.hxx>
#include "emfwr.hxx"
@@ -289,6 +290,7 @@ void WMFWriter::CountActionsAndBitmaps( const GDIMetaFile & rMTF )
case META_BMPEX_ACTION:
case META_BMPEXSCALE_ACTION:
case META_BMPEXSCALEPART_ACTION:
+ case META_RENDERGRAPHIC_ACTION:
nNumberOfBitmaps++;
break;
}
@@ -1761,6 +1763,32 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
OSL_FAIL( "Unsupported action: MetaMoveClipRegionAction!" );
}
break;
+
+ case( META_RENDERGRAPHIC_ACTION ):
+ {
+ const MetaRenderGraphicAction* pA = (const MetaRenderGraphicAction*) pMA;
+ const ::vcl::RenderGraphicRasterizer aRasterizer( pA->GetRenderGraphic() );
+ const BitmapEx aBmpEx( aRasterizer.Rasterize( pVirDev->LogicToPixel( pA->GetSize(), aSrcMapMode ) ) );
+ Bitmap aBmp( aBmpEx.GetBitmap() );
+ Bitmap aMsk( aBmpEx.GetMask() );
+
+ if( !!aMsk )
+ {
+ aBmp.Replace( aMsk, COL_WHITE );
+ aMsk.Invert();
+ WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aMsk, W_SRCPAINT );
+ WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp, W_SRCAND );
+ }
+ else
+ WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), aBmp );
+ }
+ break;
+
+ default:
+ {
+ DBG_ERROR( "Unsupported meta action!" );
+ }
+ break;
}
nWrittenActions++;
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.hxx b/svtools/source/filter/wmf/wmfwr.hxx
index 42aa647d78c2..75cf46c0bcb3 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.hxx
+++ b/svtools/source/filter/wmf/wmfwr.hxx
@@ -133,7 +133,7 @@ private:
void MayCallback();
// Berechnet anhand der obigen 5 Parameter eine Prozentzahl
- // und macht dann ggf. einen Callback. Setzt bStatus auf sal_False wenn User abbrechen
+ // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen
// moechte.
void CountActionsAndBitmaps(const GDIMetaFile & rMTF);
@@ -155,7 +155,7 @@ private:
void UpdateRecordHeader();
// berichtig die Groesse des Records nach dem Schreiben der Parameter, wenn
// nSizeWords bei Aufruf von WriteRecordHeader(..) unbekannt war.
- // fuegt ggf. noch ein sal_uInt8 0 ein damit Anzahl Bytes immer gerade.
+ // fuegt ggf. noch ein BYTE 0 ein damit Anzahl Bytes immer gerade.
void WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
void WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx
index 5a2ed9d9df1b..623c698bcae8 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -170,6 +170,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/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 9e7d635b9731..ef53bf3a98c5 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -157,15 +157,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 = sal_False;
}
void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const ByteString* pID, const GraphicObject* pCopyObj )
@@ -388,7 +383,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;
@@ -644,7 +639,7 @@ sal_Bool GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
const GraphicAttr aGrfAttr( pGrfAttr ? *pGrfAttr : GetAttr() );
// Notify PDF writer about linked graphic (if any)
- bool bWritingPdfLinkedGraphic( false );
+ sal_Bool bWritingPdfLinkedGraphic( sal_False );
Point aPt( rPt );
Size aSz( rSz );
Rectangle aCropRect;
@@ -1238,4 +1233,4 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const ::rtl::OUString &
}
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index dc21aba0c216..1115635157a8 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -869,6 +869,8 @@ sal_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
@@ -2382,4 +2384,4 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx,
}
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index e58a4789428b..d2cf9cbf12cf 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -81,6 +81,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
if ( pParent )
{
pWindow = new MultiLineEdit( pParent, nWinBits|WB_IGNORETAB);
+ static_cast< MultiLineEdit* >( pWindow )->DisableSelectionOnFocus();
*ppNewComp = new VCLXMultiLineEdit;
}
else