diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index b80dff4479ee..db91adcb9e7b 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -54,6 +54,8 @@ #include #include #include +#include +#include constexpr OUString TM_SETTING_MANAGER = u"TemplateManager"_ustr; constexpr OUString TM_SETTING_LASTFOLDER = u"LastFolder"_ustr; @@ -1037,15 +1039,18 @@ void SfxTemplateManagerDlg::OnTemplateImportCategory(std::u16string_view sCatego /* Based on OnTemplateImportCategory */ void SfxTemplateManagerDlg::OnTemplateImportGmxCategory(std::u16string_view sCategory) { - // Convertir std::u16string_view a std::u16string std::u16string sCategoryStr(sCategory); - std::wstring_convert, char16_t> convert; - std::string categoryUTF8 = convert.to_bytes(sCategoryStr); - std::cout << "La categoría es:" << categoryUTF8 <(sCategoryStr.data()), sCategoryStr.size()); + // Convertir std::u16string_view a std::u16string + std::string category; + unicodeString.toUTF8String(category); + std::cout << "La categoría es:" << category <