diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-08-21 09:39:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-08-21 11:05:28 +0200 |
commit | 13ae66c0eb0ab03ac4a43c52dd2359fbaa7f5867 (patch) | |
tree | 48240e6ac377af8dfc4abde33d5b1c3ae1743127 /dtrans | |
parent | 414b93285f081cd1a0bfb0847fbd3943bf50093a (diff) |
loplugin:stringstatic (clang-cl)
Change-Id: I024c7437e876459e22a6f541405b87ac13e7dc99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101135
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/win32/dtobj/DataFmtTransl.cxx | 14 | ||||
-rw-r--r-- | dtrans/source/win32/ftransl/ftransl.cxx | 2 |
2 files changed, 5 insertions, 11 deletions
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index b8513c6e75d4..f0a1601f8dfb 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -47,12 +47,6 @@ const Type CPPUTYPE_OUSTRING = cppu::UnoType<OUString>::get(); const Type CPPUTYPE_SEQSALINT8 = cppu::UnoType<Sequence< sal_Int8>>::get(); const sal_Int32 MAX_CLIPFORMAT_NAME = 256; -const OUString TEXT_PLAIN_CHARSET ("text/plain;charset="); -const OUString HPNAME_OEM_ANSI_TEXT ("OEM/ANSI Text"); - -const OUString HTML_FORMAT_NAME_WINDOWS ("HTML Format"); -const OUString HTML_FORMAT_NAME_SOFFICE ("HTML (HyperText Markup Language)"); - CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext ) { m_XDataFormatTranslator = DataFormatTranslator::create( rxContext ); @@ -111,10 +105,10 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& a if ( isOemOrAnsiTextFormat( aClipformat ) ) { - aFlavor.MimeType = TEXT_PLAIN_CHARSET; + aFlavor.MimeType = "text/plain;charset="; aFlavor.MimeType += getTextCharsetFromLCID( lcid, aClipformat ); - aFlavor.HumanPresentableName = HPNAME_OEM_ANSI_TEXT; + aFlavor.HumanPresentableName = "OEM/ANSI Text"; aFlavor.DataType = CPPUTYPE_SEQSALINT8; } else if ( CF_INVALID != aClipformat ) @@ -222,13 +216,13 @@ bool CDataFormatTranslator::isTextFormat( CLIPFORMAT cf ) bool CDataFormatTranslator::isHTMLFormat( CLIPFORMAT cf ) { OUString clipFormatName = getClipboardFormatName( cf ); - return ( clipFormatName == HTML_FORMAT_NAME_WINDOWS ); + return ( clipFormatName == "HTML Format" ); } bool CDataFormatTranslator::isTextHtmlFormat( CLIPFORMAT cf ) { OUString clipFormatName = getClipboardFormatName( cf ); - return clipFormatName.equalsIgnoreAsciiCase( HTML_FORMAT_NAME_SOFFICE ); + return clipFormatName.equalsIgnoreAsciiCase( "HTML (HyperText Markup Language)" ); } OUString CDataFormatTranslator::getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat ) diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 991bc2d2c10f..0a40a5b75b72 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -34,7 +34,7 @@ #define CPPUTYPE_SEQSALINT8 cppu::UnoType<Sequence< sal_Int8 >>::get() #define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8 -const OUString Windows_FormatName ("windows_formatname"); +const char Windows_FormatName[] = "windows_formatname"; const css::uno::Type CppuType_ByteSequence = cppu::UnoType<css::uno::Sequence<sal_Int8>>::get(); const css::uno::Type CppuType_String = ::cppu::UnoType<OUString>::get(); |