Kaydet (Commit) 366e3579 authored tarafından Caolán McNamara's avatar Caolán McNamara

fuzzing: common case of embedded charts in docx

Change-Id: Idc6fdc221ce60e33e6b9fcb1689840dd96570d6b
Reviewed-on: https://gerrit.libreoffice.org/45089Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 74b77481
......@@ -56,6 +56,7 @@
#include <comphelper/namedvaluecollection.hxx>
#include <tools/diagnose_ex.h>
#include <unotools/configmgr.hxx>
#include "persistence.hxx"
using namespace ::com::sun::star;
......@@ -440,9 +441,15 @@ OUString OCommonEmbeddedObject::GetFilterName( sal_Int32 nVersion ) const
OUString aFilterName = GetPresetFilterName();
if ( aFilterName.isEmpty() )
{
OUString sDocumentServiceName = GetDocumentServiceName();
if (utl::ConfigManager::IsFuzzing() && nVersion == SOFFICE_FILEFORMAT_CURRENT &&
sDocumentServiceName == "com.sun.star.chart2.ChartDocument")
{
return "chart8";
}
try {
::comphelper::MimeConfigurationHelper aHelper( m_xContext );
aFilterName = aHelper.GetDefaultFilterFromServiceName( GetDocumentServiceName(), nVersion );
aFilterName = aHelper.GetDefaultFilterFromServiceName(sDocumentServiceName, nVersion);
// If no filter is found, fall back to the FileFormatVersion=6200 filter, Base only has that.
if (aFilterName.isEmpty() && nVersion == SOFFICE_FILEFORMAT_CURRENT)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment