summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-22 13:19:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-22 16:20:41 +0100
commit366e35799d8c4d9ef871edbb592747b0f4d7ef70 (patch)
tree2d8a08168ce0df23bd2496d22cea07893ead84a8 /embeddedobj
parent74b77481b43225fe2e8fd8edd2fb30a863a0b1e1 (diff)
fuzzing: common case of embedded charts in docx
Change-Id: Idc6fdc221ce60e33e6b9fcb1689840dd96570d6b Reviewed-on: https://gerrit.libreoffice.org/45089 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index 07bc635a44a4..ab171e3a478b 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -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)