summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source')
-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--[-rwxr-xr-x]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--[-rwxr-xr-x]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)119
-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)8
-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)13
-rw-r--r--svtools/source/filter/wmf/winmtf.cxx (renamed from svtools/source/filter.vcl/wmf/winmtf.cxx)1
-rw-r--r--svtools/source/filter/wmf/winmtf.hxx (renamed from svtools/source/filter.vcl/wmf/winmtf.hxx)2
-rw-r--r--svtools/source/filter/wmf/winwmf.cxx (renamed from svtools/source/filter.vcl/wmf/winwmf.cxx)1
-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.cxx16
-rw-r--r--svtools/source/graphic/grfmgr2.cxx3
-rw-r--r--svtools/source/uno/unoiface.cxx1
38 files changed, 182 insertions, 65 deletions
diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx b/svtools/source/filter/FilterConfigCache.cxx
index 48408609cf98..979eba91767d 100644
--- a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx
+++ b/svtools/source/filter/FilterConfigCache.cxx
@@ -56,7 +56,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
};
@@ -303,6 +303,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 2c6b7361e540..2c6b7361e540 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 8d7752ddd7df..8d7752ddd7df 100755..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 1c4eeeff1bbf..1c4eeeff1bbf 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 027fac99c2e8..027fac99c2e8 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 701619d31f6c..472fe327329d 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 100755..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 9c2c28dfbe3b..78d97cc25c5c 100644
--- a/svtools/source/filter.vcl/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -39,6 +39,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>
@@ -555,7 +556,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
@@ -568,7 +569,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 );
@@ -677,10 +678,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;
}
@@ -689,6 +702,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;
}
@@ -1486,6 +1501,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 )
@@ -1748,7 +1784,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;
@@ -1826,7 +1862,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;
}
@@ -1943,44 +1979,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::createFromAscii( "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::createFromAscii( "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::createFromAscii( "com.sun.star.xml.sax.Writer" ) ), ::com::sun::star::uno::UNO_QUERY );
- if( xActiveDataSource.is() )
+ ::com::sun::star::uno::Reference< ::com::sun::star::svg::XSVGWriter > xSVGWriter( xMgr->createInstance(
+ ::rtl::OUString::createFromAscii( "com.sun.star.svg.SVGWriter" ) ), ::com::sun::star::uno::UNO_QUERY );
+
+ 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 ) ) );
- aMemStm.SetCompressMode( COMPRESSMODE_FULL );
- ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( aMemStm );
+ SvMemoryStream aMemStm( 65535, 65535 );
- 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 );
+ 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 );
+ }
}
}
}
- }
- catch( ::com::sun::star::uno::Exception& )
- {
- nStatus = GRFILTER_IOERROR;
+ catch( ::com::sun::star::uno::Exception& )
+ {
+ nStatus = GRFILTER_IOERROR;
+ }
}
}
else
@@ -2127,6 +2188,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;
@@ -2196,4 +2258,3 @@ int GraphicFilter::LoadGraphic( const String &rPath, const String &rFilterName,
return nRes;
}
-
diff --git a/svtools/source/filter.vcl/filter/filter2.cxx b/svtools/source/filter/filter2.cxx
index 9b655c732036..58fafc47c0f2 100644
--- a/svtools/source/filter.vcl/filter/filter2.cxx
+++ b/svtools/source/filter/filter2.cxx
@@ -114,6 +114,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;
@@ -1301,6 +1302,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;
@@ -1331,9 +1347,8 @@ 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 );
}
-
-
diff --git a/svtools/source/filter.vcl/igif/decode.cxx b/svtools/source/filter/igif/decode.cxx
index ddea94a5555e..ddea94a5555e 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 e85cc30eaf9e..e85cc30eaf9e 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 16318e5b143e..16318e5b143e 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 5084f7267e46..5084f7267e46 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 054e1e86b064..054e1e86b064 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 425ed6323bcc..425ed6323bcc 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 dff6ec8ff51f..6f157a248ddc 100644
--- a/svtools/source/filter.vcl/jpeg/jpeg.cxx
+++ b/svtools/source/filter/jpeg/jpeg.cxx
@@ -34,8 +34,8 @@ extern "C"
{
#include "stdio.h"
#include "jpeg.h"
- #include "jpeglib.h"
- #include "jerror.h"
+ #include "jpeg/jpeglib.h"
+ #include "jpeg/jerror.h"
}
#define _JPEGPRIVATE
@@ -112,7 +112,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;
@@ -217,7 +217,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 ca9b294d2f9d..ca9b294d2f9d 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 8d3a82a86ef3..8d3a82a86ef3 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 9b981f8c0d94..9b981f8c0d94 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 3b0f3ebd2912..3b0f3ebd2912 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 aac7e1f04e0a..aac7e1f04e0a 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 f0130b21c9d6..f0130b21c9d6 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 d82f11cdce5a..99ca92c76abb 100644
--- a/svtools/source/filter.vcl/wmf/emfwr.cxx
+++ b/svtools/source/filter/wmf/emfwr.cxx
@@ -33,6 +33,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:
DBG_ERROR( ( 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 8c65e91e5f73..8c65e91e5f73 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 29128ffd7904..ec7fec9fdb1e 100644
--- a/svtools/source/filter.vcl/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -1268,13 +1268,13 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
sal_Bool EnhWMFReader::ReadHeader()
{
- sal_uInt32 nUINT32, nHeaderSize, nPalEntries;
+ sal_uInt32 nsal_uInt32, nHeaderSize, nPalEntries;
sal_Int32 nLeft, nTop, nRight, nBottom;
// METAFILEHEADER SPARE ICH MIR HIER
// Einlesen des METAHEADER
- *pWMF >> nUINT32 >> nHeaderSize;
- if ( nUINT32 != 1 ) // Typ
+ *pWMF >> nsal_uInt32 >> nHeaderSize;
+ if ( nsal_uInt32 != 1 ) // Typ
return sal_False;
// bound size
@@ -1293,12 +1293,12 @@ sal_Bool EnhWMFReader::ReadHeader()
rclFrame.Right() = nRight;
rclFrame.Bottom() = nBottom;
- *pWMF >> nUINT32; // signature
+ *pWMF >> nsal_uInt32; // signature
- if ( nUINT32 != 0x464d4520 )
+ if ( nsal_uInt32 != 0x464d4520 )
return sal_False;
- *pWMF >> nUINT32; // nVersion
+ *pWMF >> nsal_uInt32; // nVersion
*pWMF >> nEndPos; // size of metafile
nEndPos += nStartPos;
@@ -1340,4 +1340,3 @@ EnhWMFReader::~EnhWMFReader()
{
};
-
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter/wmf/winmtf.cxx
index feff21933ab6..30fc670ac22f 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.cxx
+++ b/svtools/source/filter/wmf/winmtf.cxx
@@ -2200,4 +2200,3 @@ void WinMtfOutput::AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile )
{
rGDIMetaFile.Play( *mpGDIMetaFile, 0xFFFFFFFF );
}
-
diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter/wmf/winmtf.hxx
index 299d297c90bc..ca7b62b38ef3 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.hxx
+++ b/svtools/source/filter/wmf/winmtf.hxx
@@ -773,5 +773,3 @@ public:
};
#endif
-
-
diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter/wmf/winwmf.cxx
index 880841cd36f8..feb1a2895793 100644
--- a/svtools/source/filter.vcl/wmf/winwmf.cxx
+++ b/svtools/source/filter/wmf/winwmf.cxx
@@ -1428,4 +1428,3 @@ WMFReader::~WMFReader()
if( pEMFStream )
delete pEMFStream;
}
-
diff --git a/svtools/source/filter.vcl/wmf/wmf.cxx b/svtools/source/filter/wmf/wmf.cxx
index 4e84cd920b56..4e84cd920b56 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 36b84316271b..26bda76a11d9 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.cxx
+++ b/svtools/source/filter/wmf/wmfwr.cxx
@@ -29,6 +29,7 @@
#include "precompiled_svtools.hxx"
#include <vcl/salbtype.hxx>
+#include <vcl/rendergraphicrasterizer.hxx>
#include "wmfwr.hxx"
#include <unotools/fontcvt.hxx>
#include "emfwr.hxx"
@@ -318,6 +319,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;
}
@@ -1796,6 +1798,32 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
DBG_ERROR( "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 c5830b3bab8f..a76b39ad154f 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.hxx
+++ b/svtools/source/filter/wmf/wmfwr.hxx
@@ -132,7 +132,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);
@@ -154,7 +154,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 6c808baa169d..395d3dfea0de 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/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 77a582e5ae20..9241cbd04d51 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 = sal_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;
@@ -751,7 +746,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;
@@ -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 9c86c7e44130..4a6fb67187bc 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
@@ -2379,4 +2381,3 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx,
}
}
}
-
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index a60a210e8fa7..18af2c696a8c 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -80,6 +80,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