summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorKhaled Hosny <khaled@libreoffice.org>2023-06-19 17:08:45 +0300
committerخالد حسني <khaled@libreoffice.org>2023-06-19 21:52:25 +0200
commitd80d89d98183ee0c1a232b975107c319001f3fbc (patch)
tree0ad48da5eb1240e6d2f9b527979ac4b0a76ec720 /xmloff
parentc276b859c56a173daeb3070a0b3a8cbbffa1822d (diff)
embeddedfontshelper: use u16string_view instead of char pointer
Change-Id: I7a6088c570ebd0680cc1b2603b946192a19bef26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153268 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/style/XMLFontStylesContext.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index a3c5e6fb31d6..0ec4d287cf92 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -466,7 +466,7 @@ SvXMLImport::~SvXMLImport() noexcept
}
bool SvXMLImport::addEmbeddedFont(const css::uno::Reference< css::io::XInputStream >& stream,
- const OUString& fontName, const char* extra,
+ const OUString& fontName, std::u16string_view extra,
std::vector<unsigned char> const & key, bool eot)
{
if (!mxEmbeddedFontHelper)
diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx
index dd495ce928c6..71fe2ad5149b 100644
--- a/xmloff/source/style/XMLFontStylesContext.cxx
+++ b/xmloff/source/style/XMLFontStylesContext.cxx
@@ -291,7 +291,7 @@ void XMLFontStyleContextFontFaceUri::handleEmbeddedFont( const OUString& url, bo
uno::Reference< io::XInputStream > inputStream;
inputStream.set( storage->openStreamElement( url.copy( url.indexOf( '/' ) + 1 ), ::embed::ElementModes::READ ),
UNO_QUERY_THROW );
- if (GetImport().addEmbeddedFont(inputStream, fontName, "?", std::vector< unsigned char >(), eot))
+ if (GetImport().addEmbeddedFont(inputStream, fontName, u"?", std::vector< unsigned char >(), eot))
GetImport().NotifyContainsEmbeddedFont();
inputStream->closeInput();
}
@@ -303,7 +303,7 @@ void XMLFontStyleContextFontFaceUri::handleEmbeddedFont( const ::css::uno::Seque
{
const uno::Reference< io::XInputStream > xInput( new comphelper::SequenceInputStream( rData ) );
const OUString fontName = font.familyName();
- if (GetImport().addEmbeddedFont(xInput, fontName, "?", std::vector< unsigned char >(), eot))
+ if (GetImport().addEmbeddedFont(xInput, fontName, u"?", std::vector< unsigned char >(), eot))
GetImport().NotifyContainsEmbeddedFont();
xInput->closeInput();
}