summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-19 15:10:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:54 +0100
commitbf50bd977288333aa77b25d59eaf92c0b604e3c3 (patch)
treed3685d8732f97335cd5273d9b3e171ae616ce70d
parentfe9d002ef55e30aa3629f4e1951beb18ebb692b0 (diff)
Some more loplugin:cstylecast: writerfilter
Change-Id: Ic8e24c5a956424883856d99fe94527cc1dff5797
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx4
-rw-r--r--writerfilter/source/dmapper/LoggedResources.cxx4
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx18
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
4 files changed, 14 insertions, 14 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 461c138d78ba..223e3f14d5c9 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2822,7 +2822,7 @@ void DomainMapper::lcl_endCharacterGroup()
void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len)
{
//TODO: Determine the right text encoding (FIB?)
- OUString sText( (const sal_Char*) data_, len, RTL_TEXTENCODING_MS_1252 );
+ OUString sText( reinterpret_cast<const char*>(data_), len, RTL_TEXTENCODING_MS_1252 );
#ifdef DEBUG_WRITERFILTER
dmapper_logger->startElement("text");
dmapper_logger->chars(sText);
@@ -2945,7 +2945,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
{
OUString sText;
OUStringBuffer aBuffer = OUStringBuffer(len);
- aBuffer.append( (const sal_Unicode *) data_, len);
+ aBuffer.append( reinterpret_cast<const sal_Unicode *>(data_), len);
sText = aBuffer.makeStringAndClear();
if (m_pImpl->isSdtEndDeferred())
diff --git a/writerfilter/source/dmapper/LoggedResources.cxx b/writerfilter/source/dmapper/LoggedResources.cxx
index 9f430a4116d2..da058beeedfb 100644
--- a/writerfilter/source/dmapper/LoggedResources.cxx
+++ b/writerfilter/source/dmapper/LoggedResources.cxx
@@ -167,7 +167,7 @@ void LoggedStream::text(const sal_uInt8 * data, size_t len)
#ifdef DEBUG_WRITERFILTER
mHelper.startElement("text");
- OUString sText( (const sal_Char*) data, len, RTL_TEXTENCODING_MS_1252 );
+ OUString sText( reinterpret_cast<const char*>(data), len, RTL_TEXTENCODING_MS_1252 );
mHelper.startElement("data");
mHelper.chars(sText);
@@ -189,7 +189,7 @@ void LoggedStream::utext(const sal_uInt8 * data, size_t len)
OUString sText;
OUStringBuffer aBuffer = OUStringBuffer(len);
- aBuffer.append( (const sal_Unicode *) data, len);
+ aBuffer.append( reinterpret_cast<const sal_Unicode *>(data), len);
sText = aBuffer.makeStringAndClear();
mHelper.chars(sText);
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index cbe6af5aaebb..9a56d0b2ca2e 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -560,13 +560,13 @@ void OOXMLFastContextHandler::lockField()
void OOXMLFastContextHandler::ftnednref()
{
if (isForwardEvents())
- mpStream->utext((const sal_uInt8*)&uFtnEdnRef, 1);
+ mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uFtnEdnRef), 1);
}
void OOXMLFastContextHandler::ftnednsep()
{
if (isForwardEvents())
- mpStream->utext((const sal_uInt8*)&uFtnEdnSep, 1);
+ mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uFtnEdnSep), 1);
}
void OOXMLFastContextHandler::ftnedncont()
@@ -578,31 +578,31 @@ void OOXMLFastContextHandler::ftnedncont()
void OOXMLFastContextHandler::pgNum()
{
if (isForwardEvents())
- mpStream->utext((const sal_uInt8*)&uPgNum, 1);
+ mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uPgNum), 1);
}
void OOXMLFastContextHandler::tab()
{
if (isForwardEvents())
- mpStream->utext((const sal_uInt8*)&uTab, 1);
+ mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uTab), 1);
}
void OOXMLFastContextHandler::cr()
{
if (isForwardEvents())
- mpStream->utext((const sal_uInt8*)&uCR, 1);
+ mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uCR), 1);
}
void OOXMLFastContextHandler::noBreakHyphen()
{
if (isForwardEvents())
- mpStream->utext((const sal_uInt8*)&uNoBreakHyphen, 1);
+ mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uNoBreakHyphen), 1);
}
void OOXMLFastContextHandler::softHyphen()
{
if (isForwardEvents())
- mpStream->utext((const sal_uInt8*)&uSoftHyphen, 1);
+ mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uSoftHyphen), 1);
}
void OOXMLFastContextHandler::handleLastParagraphInSection()
@@ -619,7 +619,7 @@ void OOXMLFastContextHandler::endOfParagraph()
if (! mpParserState->isInCharacterGroup())
startCharacterGroup();
if (isForwardEvents())
- mpStream->utext((const sal_uInt8*)&uCR, 1);
+ mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uCR), 1);
mpParserState->getDocument()->incrementProgress();
}
@@ -1423,7 +1423,7 @@ void OOXMLFastContextHandlerTextTableRow::endRow()
startCharacterGroup();
if (isForwardEvents())
- mpStream->utext((const sal_uInt8*)&uCR, 1);
+ mpStream->utext(reinterpret_cast<const sal_uInt8*>(&uCR), 1);
endCharacterGroup();
endParagraphGroup();
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 311904003bfc..5ef3834f8f98 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2377,7 +2377,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
case RTF_CHFTNSEP:
{
static const sal_Unicode uFtnEdnSep = 0x3;
- Mapper().utext((const sal_uInt8*)&uFtnEdnSep, 1);
+ Mapper().utext(reinterpret_cast<const sal_uInt8*>(&uFtnEdnSep), 1);
}
break;
default: