summaryrefslogtreecommitdiff
path: root/embeddedobj/source/general/xcreator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'embeddedobj/source/general/xcreator.cxx')
-rw-r--r--embeddedobj/source/general/xcreator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx
index 4f301d407ce0..8ccff0c81074 100644
--- a/embeddedobj/source/general/xcreator.cxx
+++ b/embeddedobj/source/general/xcreator.cxx
@@ -31,6 +31,7 @@
#include <comphelper/processfactory.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/documentconstants.hxx>
#include <xcreator.hxx>
#include <dummyobject.hxx>
@@ -200,8 +201,14 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta
OSL_ENSURE( !aMediaType.isEmpty(), "No media type is specified for the object!" );
if ( !aMediaType.isEmpty() && aEmbedFactory.isEmpty() )
+ {
aEmbedFactory = m_aConfigHelper.GetFactoryNameByMediaType( aMediaType );
+ // If no factory is found, fall back to the FileFormatVersion=6200 filter, Base only has that.
+ if (aEmbedFactory.isEmpty() && aMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII)
+ aEmbedFactory = m_aConfigHelper.GetFactoryNameByMediaType(MIMETYPE_VND_SUN_XML_BASE_ASCII);
+ }
+
if ( !aEmbedFactory.isEmpty() )
{
uno::Reference< uno::XInterface > xFact = m_xContext->getServiceManager()->createInstanceWithContext(aEmbedFactory, m_xContext);