diff options
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/storagehelper.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 4551326b9b46..5905c7867aca 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -698,6 +698,19 @@ uno::Reference< io::XStream > OStorageHelper::GetStreamAtPackageURL( return nullptr; } +OUString OStorageHelper::GetODFVersionFromStorage(uno::Reference<embed::XStorage> xStorage) +{ + OUString aODFVersion; + try + { + uno::Reference<beans::XPropertySet> xPropSet(xStorage, uno::UNO_QUERY_THROW); + xPropSet->getPropertyValue("Version") >>= aODFVersion; + } + catch (uno::Exception&) + { + } + return aODFVersion; +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |