summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/qa/cppunit/general.cxx6
-rw-r--r--embeddedobj/source/msole/oleembed.cxx2
-rw-r--r--embeddedobj/source/msole/ownview.cxx6
-rw-r--r--embeddedobj/source/msole/ownview.hxx6
4 files changed, 12 insertions, 8 deletions
diff --git a/embeddedobj/qa/cppunit/general.cxx b/embeddedobj/qa/cppunit/general.cxx
index b1a28828391c..815656519c83 100644
--- a/embeddedobj/qa/cppunit/general.cxx
+++ b/embeddedobj/qa/cppunit/general.cxx
@@ -69,7 +69,7 @@ CPPUNIT_TEST_FIXTURE(EmbeddedobjGeneralTest, testInsertFileConfig)
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
comphelper::EmbeddedObjectContainer aContainer(xStorage);
OUString aFileName
- = m_directories.getURLFromSrc("embeddedobj/qa/cppunit/data/insert-file-config.doc");
+ = m_directories.getURLFromSrc(u"embeddedobj/qa/cppunit/data/insert-file-config.doc");
uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) };
OUString aName("Object 1");
uno::Reference<embed::XEmbeddedObject> xObject
@@ -102,7 +102,7 @@ CPPUNIT_TEST_FIXTURE(EmbeddedobjGeneralTest, testInsertFileConfigVsdx)
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
comphelper::EmbeddedObjectContainer aContainer(xStorage);
OUString aFileName
- = m_directories.getURLFromSrc("embeddedobj/qa/cppunit/data/insert-file-config.vsdx");
+ = m_directories.getURLFromSrc(u"embeddedobj/qa/cppunit/data/insert-file-config.vsdx");
uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) };
OUString aName("Object 1");
uno::Reference<embed::XEmbeddedObject> xObject
@@ -135,7 +135,7 @@ CPPUNIT_TEST_FIXTURE(EmbeddedobjGeneralTest, testInsertFileConfigPdf)
uno::Reference<embed::XStorage> xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
comphelper::EmbeddedObjectContainer aContainer(xStorage);
OUString aFileName
- = m_directories.getURLFromSrc("embeddedobj/qa/cppunit/data/insert-file-config.pdf");
+ = m_directories.getURLFromSrc(u"embeddedobj/qa/cppunit/data/insert-file-config.pdf");
uno::Sequence<beans::PropertyValue> aMedium{ comphelper::makePropertyValue("URL", aFileName) };
OUString aName("Object 1");
uno::Reference<embed::XEmbeddedObject> xObject
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 1d5da382a8f7..890457af909f 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -263,7 +263,7 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >&
// the stream must be seekable
uno::Reference< io::XSeekable > xSeekable( xStream, uno::UNO_QUERY_THROW );
xSeekable->seek( 0 );
- m_aFilterName = OwnView_Impl::GetFilterNameFromExtentionAndInStream( m_xContext, OUString(), xStream->getInputStream() );
+ m_aFilterName = OwnView_Impl::GetFilterNameFromExtentionAndInStream( m_xContext, std::u16string_view(), xStream->getInputStream() );
if ( !m_aFilterName.isEmpty()
&& ( m_aFilterName == "Calc MS Excel 2007 XML" || m_aFilterName == "Impress MS PowerPoint 2007 XML" || m_aFilterName == "MS Word 2007 XML"
diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx
index 9cb811b7c672..75a41d0a1ac9 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -179,7 +179,7 @@ bool OwnView_Impl::CreateModel( bool bUseNative )
OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const OUString& aNameWithExtention,
+ std::u16string_view aNameWithExtention,
const uno::Reference< io::XInputStream >& xInputStream )
{
if ( !xInputStream.is() )
@@ -191,9 +191,9 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream(
OUString aTypeName;
- if ( !aNameWithExtention.isEmpty() )
+ if ( !aNameWithExtention.empty() )
{
- OUString aURLToAnalyze = "file:///" + aNameWithExtention;
+ OUString aURLToAnalyze = OUString::Concat("file:///") + aNameWithExtention;
aTypeName = xTypeDetection->queryTypeByURL( aURLToAnalyze );
}
diff --git a/embeddedobj/source/msole/ownview.hxx b/embeddedobj/source/msole/ownview.hxx
index 5277602bb198..d939aff86013 100644
--- a/embeddedobj/source/msole/ownview.hxx
+++ b/embeddedobj/source/msole/ownview.hxx
@@ -19,6 +19,10 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/util/XCloseListener.hpp>
#include <com/sun/star/document/XEventListener.hpp>
#include <com/sun/star/frame/XModel.hpp>
@@ -57,7 +61,7 @@ private:
public:
static OUString GetFilterNameFromExtentionAndInStream(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const OUString& aNameWithExtention,
+ std::u16string_view aNameWithExtention,
const css::uno::Reference< css::io::XInputStream >& xInputStream );
OwnView_Impl( const css::uno::Reference< css::uno::XComponentContext >& xContext,