summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-01-12 15:31:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-12 21:09:02 +0100
commit695afb787681c9f288856a1a00fe6041614172d2 (patch)
tree4cf2116325c73b0b20e8515d4bdcb1be5f60e3fc /embeddedobj
parent1b131be9e5a5a5e172bfcd3e1fa577d7ddb3033a (diff)
loplugin:stringview (clang-cl)
Change-Id: I64177842c3f77a5ae43574a18f389b64f61bc868 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109176 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/msole/xdialogcreator.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx
index 415039c3f1fc..2d162cf9608e 100644
--- a/embeddedobj/source/msole/xdialogcreator.cxx
+++ b/embeddedobj/source/msole/xdialogcreator.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/embed/EmbeddedObjectCreator.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/EntryInitModes.hpp>
@@ -189,7 +193,8 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia
}
else
{
- OUString aFileName = OStringToOUString( OString( szFile ), osl_getThreadTextEncoding() );
+ OUString aFileName
+ = OStringToOUString( std::string_view( szFile ), osl_getThreadTextEncoding() );
OUString aFileURL;
if ( osl::FileBase::getFileURLFromSystemPath( aFileName, aFileURL ) != osl::FileBase::E_None )
throw uno::RuntimeException();