summaryrefslogtreecommitdiff
path: root/sfx2/source/bastyp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-01 13:10:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-01 13:25:08 +0000
commit9bdec0831afc45af45ea6d9350ef3372188b45cb (patch)
tree9f761fe2589569a7cd0fbafd6e5fcc4d350d4d64 /sfx2/source/bastyp
parent49c7bc5af291dbf6b34bcea82c9c0513f65b308b (diff)
loplugin:oncevar in sd..svgio
Change-Id: I58565460fcc3279c9771c6e1272d0af540b2c87c Reviewed-on: https://gerrit.libreoffice.org/30459 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/bastyp')
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx4
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx10
2 files changed, 4 insertions, 10 deletions
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index 967631000c37..0bbe5f71758e 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -51,7 +51,6 @@ using namespace ::com::sun::star;
static sal_Char const sHTML_SC_yes[] = "YES";
static sal_Char const sHTML_SC_no[] = "NO";
-static sal_Char const sHTML_MIME_text_html[] = "text/html; charset=";
void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
const sal_Char *pIndent,
@@ -89,8 +88,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const OUString& rBaseURL,
if( pCharSet )
{
- OUString aContentType(sHTML_MIME_text_html);
- aContentType += OUString(pCharSet, strlen(pCharSet), RTL_TEXTENCODING_UTF8);
+ OUString aContentType = "text/html; charset=" + OUString(pCharSet, strlen(pCharSet), RTL_TEXTENCODING_UTF8);
OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_content_type, aContentType, true,
eDestEnc, pNonConvertableChars );
}
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index ac5dd5affeb0..54024936ddeb 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -46,10 +46,6 @@
using namespace ::com::sun::star;
-const sal_Char sHTML_MIME_text[] = "text/";
-const sal_Char sHTML_MIME_application[] = "application/";
-const sal_Char sHTML_MIME_experimental[] = "x-";
-
// <INPUT TYPE=xxx>
static HTMLOptionEnum const aAreaShapeOptEnums[] =
{
@@ -279,14 +275,14 @@ void SfxHTMLParser::GetScriptType_Impl( SvKeyValueIterator *pHTTPHeader )
if( !aKV.GetValue().isEmpty() )
{
OUString aTmp( aKV.GetValue() );
- if( aTmp.startsWithIgnoreAsciiCase( sHTML_MIME_text ) )
+ if( aTmp.startsWithIgnoreAsciiCase( "text/" ) )
aTmp = aTmp.copy( 5 );
- else if( aTmp.startsWithIgnoreAsciiCase( sHTML_MIME_application ) )
+ else if( aTmp.startsWithIgnoreAsciiCase( "application/" ) )
aTmp = aTmp.copy( 12 );
else
break;
- if( aTmp.startsWithIgnoreAsciiCase( sHTML_MIME_experimental ) )
+ if( aTmp.startsWithIgnoreAsciiCase( "x-" ) ) // MIME-experimental
{
aTmp = aTmp.copy( 2 );
}