summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/guisaveas.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-28 17:56:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-29 16:42:33 +0100
commit042033f1e6da22616cb76c8d950c20c9efecbad5 (patch)
tree26b3f1f42d067506f44550b410f3fb9640616a5b /sfx2/source/doc/guisaveas.cxx
parentccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff)
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2/source/doc/guisaveas.cxx')
-rw-r--r--sfx2/source/doc/guisaveas.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index ad94a17e4231..18a3bd42b907 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -76,6 +76,7 @@
#include <alienwarn.hxx>
#include <memory>
+#include <string_view>
#include <officecfg/Office/Common.hxx>
@@ -147,28 +148,28 @@ sal_uInt16 getSlotIDFromMode( sal_Int16 nStoreMode )
}
-sal_Int16 getStoreModeFromSlotName( const OUString& aSlotName )
+sal_Int16 getStoreModeFromSlotName( std::u16string_view aSlotName )
{
sal_Int16 nResult = 0;
- if ( aSlotName == "ExportTo" )
+ if ( aSlotName == u"ExportTo" )
nResult = EXPORT_REQUESTED;
- else if ( aSlotName == "ExportToPDF" )
+ else if ( aSlotName == u"ExportToPDF" )
nResult = EXPORT_REQUESTED | PDFEXPORT_REQUESTED;
- else if ( aSlotName == "ExportDirectToPDF" )
+ else if ( aSlotName == u"ExportDirectToPDF" )
nResult = EXPORT_REQUESTED | PDFEXPORT_REQUESTED | PDFDIRECTEXPORT_REQUESTED;
- else if ( aSlotName == "ExportToEPUB" )
+ else if ( aSlotName == u"ExportToEPUB" )
nResult = EXPORT_REQUESTED | EPUBEXPORT_REQUESTED;
- else if ( aSlotName == "ExportDirectToEPUB" )
+ else if ( aSlotName == u"ExportDirectToEPUB" )
nResult = EXPORT_REQUESTED | EPUBEXPORT_REQUESTED | EPUBDIRECTEXPORT_REQUESTED;
- else if ( aSlotName == "Save" )
+ else if ( aSlotName == u"Save" )
nResult = SAVE_REQUESTED;
- else if ( aSlotName == "SaveAs" )
+ else if ( aSlotName == u"SaveAs" )
nResult = SAVEAS_REQUESTED;
- else if ( aSlotName == "SaveAsRemote" )
+ else if ( aSlotName == u"SaveAsRemote" )
nResult = SAVEASREMOTE_REQUESTED;
else
throw task::ErrorCodeIOException(
- ("getStoreModeFromSlotName(\"" + aSlotName
+ (OUString::Concat("getStoreModeFromSlotName(\"") + aSlotName
+ "): ERRCODE_IO_INVALIDPARAMETER"),
uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_IO_INVALIDPARAMETER) );
@@ -1293,7 +1294,7 @@ namespace
void LaunchPDFViewer(const INetURLObject& rURL)
{
// Launch PDF viewer
- FilterConfigItem aItem( "Office.Common/Filter/PDF/Export/" );
+ FilterConfigItem aItem( u"Office.Common/Filter/PDF/Export/" );
bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", false );
if ( aViewPDF )
@@ -1305,7 +1306,7 @@ namespace
}
bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xModel,
- const OUString& aSlotName,
+ std::u16string_view aSlotName,
uno::Sequence< beans::PropertyValue >& aArgsSequence,
bool bPreselectPassword,
SignatureState nDocumentSignatureState )