summaryrefslogtreecommitdiff
path: root/writerfilter/source/filter/WriterFilterDetection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/filter/WriterFilterDetection.cxx')
-rw-r--r--writerfilter/source/filter/WriterFilterDetection.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx
index d47447e4ea4e..4be325b74945 100644
--- a/writerfilter/source/filter/WriterFilterDetection.cxx
+++ b/writerfilter/source/filter/WriterFilterDetection.cxx
@@ -121,7 +121,11 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
}
else
{
- uno::Reference< embed::XStorage > xDocStorage = comphelper::OStorageHelper::GetStorageFromURL(
+ uno::Reference< embed::XStorage > xDocStorage;
+ if( sURL.equalsAscii( "private:stream" ) )
+ xDocStorage = comphelper::OStorageHelper::GetStorageFromInputStream( xInputStream );
+ else
+ xDocStorage = comphelper::OStorageHelper::GetStorageFromURL(
sURL, embed::ElementModes::READ );
if( xDocStorage.is() )
{
@@ -132,6 +136,9 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
if(pNames[nName].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "word" )))
{
bWord = true;
+ if( !sTypeName.getLength() )
+ sTypeName = ::rtl::OUString(
+ RTL_CONSTASCII_STRINGPARAM( "writer_MS_Word_2007" ), RTL_TEXTENCODING_ASCII_US);
break;
}
}