[Libreoffice-commits] core.git: svx/source
Alex Henrie
alexhenrie24 at gmail.com
Fri Mar 7 10:40:14 PST 2014
svx/source/core/extedit.cxx | 2 +-
svx/source/core/graphichelper.cxx | 3 +++
svx/source/xoutdev/_xoutbmp.cxx | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 156b5a15878394576dd008c5a07160721d333ab7
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Wed Mar 5 15:06:17 2014 -0700
Do not convert SVGs to JPEGs when editing with external tool
This patch adds support for opening SVGs in the user's default SVG
viewer/editor. If the image cannot be exported to SVG directly, it is
exported as PNG instead. In no case will an SVG or an unrecognized
format be lossy-converted to JPEG.
Change-Id: I46dc8548c3cfb4d24a4a0078d4e3d7eee8367b1c
diff --git a/svx/source/core/extedit.cxx b/svx/source/core/extedit.cxx
index 9dd2e7e..853ae77 100644
--- a/svx/source/core/extedit.cxx
+++ b/svx/source/core/extedit.cxx
@@ -100,7 +100,7 @@ void ExternalToolEdit::Edit( GraphicObject* pGraphicObject )
//Write Graphic to the Temp File
GraphicFilter& rGraphicFilter = GraphicFilter::GetGraphicFilter();
- sal_uInt16 nFilter(rGraphicFilter.GetExportFormatNumber(fExtension));
+ sal_uInt16 nFilter(rGraphicFilter.GetExportFormatNumberForShortName(fExtension));
OUString aFilter(rGraphicFilter.GetExportFormatShortName(nFilter));
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index d914121..4878872 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -84,6 +84,9 @@ void GraphicHelper::GetPreferredExtension( OUString& rExtension, const Graphic&
case GFX_LINK_TYPE_NATIVE_BMP:
aExtension = "bmp";
break;
+ case GFX_LINK_TYPE_NATIVE_SVG:
+ aExtension = "svg";
+ break;
default:
break;
}
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 1521c7a..bdf732a 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -231,7 +231,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
if( GRFILTER_FORMAT_NOTFOUND == nFilter )
{
- nFilter = rFilter.GetExportFormatNumberForShortName( FORMAT_JPG );
+ nFilter = rFilter.GetExportFormatNumberForShortName( FORMAT_PNG );
if( GRFILTER_FORMAT_NOTFOUND == nFilter )
nFilter = rFilter.GetExportFormatNumberForShortName( FORMAT_BMP );
More information about the Libreoffice-commits
mailing list