summaryrefslogtreecommitdiff
path: root/vcl/generic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:29:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:29:41 +0200
commitf6ec07a3963a401dc736baa9bdd2ed3c7325bb66 (patch)
tree9cad620eb2cd5846464cf151b10949a8e36e5200 /vcl/generic
parent9f356d3e66127bf14fe957962e8451dbd27c8ac8 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I07bf1403e6b992807541a499b786d47f835b2f81
Diffstat (limited to 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/parseAFM.cxx2
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx2
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx2
-rw-r--r--vcl/generic/glyphs/scrptrun.h4
-rw-r--r--vcl/generic/print/prtsetup.cxx14
-rw-r--r--vcl/generic/print/text_gfx.cxx2
6 files changed, 13 insertions, 13 deletions
diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index e6427389f191..82cb46f3f6a3 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -267,7 +267,7 @@ static char *token( FileInputStream* stream, int& rLen )
ch = stream->getChar();
}
- if (ch == -1 && idx < 1) return ((char *)NULL);
+ if (ch == -1 && idx < 1) return (nullptr);
if (idx >= 1 && ch != ':' && ch != -1) stream->ungetChar();
if (idx < 1 ) ident[idx++] = ch; /* single-character token */
ident[idx] = 0;
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index d6a2116321f8..5688aac71867 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -1581,7 +1581,7 @@ bool ServerFont::GetGlyphOutline( sal_GlyphId aGlyphId,
aFuncs.cubic_to = &FT_cubic_to;
aFuncs.shift = 0;
aFuncs.delta = 0;
- rc = FT_Outline_Decompose( &rOutline, &aFuncs, (void*)&aPolyArg );
+ rc = FT_Outline_Decompose( &rOutline, &aFuncs, static_cast<void*>(&aPolyArg) );
aPolyArg.ClosePolygon(); // close last polygon
FT_Done_Glyph( pGlyphFT );
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 8d1c6f543d01..43550f2d4b15 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -135,7 +135,7 @@ static hb_blob_t *getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
hb_blob_t* pBlob = NULL;
if (pBuffer != NULL)
- pBlob = hb_blob_create(reinterpret_cast<const char*>(pBuffer), nLength, HB_MEMORY_MODE_READONLY, (void*) pBuffer, NULL);
+ pBlob = hb_blob_create(reinterpret_cast<const char*>(pBuffer), nLength, HB_MEMORY_MODE_READONLY, const_cast<unsigned char *>(pBuffer), NULL);
return pBlob;
}
diff --git a/vcl/generic/glyphs/scrptrun.h b/vcl/generic/glyphs/scrptrun.h
index 625ca7b63215..4b44b6ba6b71 100644
--- a/vcl/generic/glyphs/scrptrun.h
+++ b/vcl/generic/glyphs/scrptrun.h
@@ -88,7 +88,7 @@ public:
UBool next();
/**
- * ICU "poor man's RTTI", returns a UClassID for the actual class.
+s * ICU "poor man's RTTI", returns a UClassID for the actual class.
*
* @stable ICU 2.2
*/
@@ -99,7 +99,7 @@ public:
*
* @stable ICU 2.2
*/
- static inline UClassID getStaticClassID() { return (UClassID)&fgClassID; }
+ static inline UClassID getStaticClassID() { return static_cast<UClassID>(const_cast<char *>(&fgClassID)); }
private:
diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx
index 9d74f048ae3a..e024f08fd13e 100644
--- a/vcl/generic/print/prtsetup.cxx
+++ b/vcl/generic/print/prtsetup.cxx
@@ -45,22 +45,22 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con
if( m_aJobData.m_aContext.checkConstraints( pKey, pValue ) )
{
- if( rBox.GetEntryPos( (void*)pValue ) == LISTBOX_ENTRY_NOTFOUND )
+ if( rBox.GetEntryPos( static_cast<void const *>(pValue) ) == LISTBOX_ENTRY_NOTFOUND )
{
nPos = rBox.InsertEntry( aOptionText, LISTBOX_APPEND );
- rBox.SetEntryData( nPos, (void*)pValue );
+ rBox.SetEntryData( nPos, const_cast<PPDValue *>(pValue) );
}
}
else
{
- if( ( nPos = rBox.GetEntryPos( (void*)pValue ) ) != LISTBOX_ENTRY_NOTFOUND )
+ if( ( nPos = rBox.GetEntryPos( static_cast<void const *>(pValue) ) ) != LISTBOX_ENTRY_NOTFOUND )
rBox.RemoveEntry( nPos );
}
}
pValue = m_aJobData.m_aContext.getValue( pKey );
if (pValue && !pValue->m_bCustomOption)
{
- if( ( nPos = rBox.GetEntryPos( (void*)pValue ) ) != LISTBOX_ENTRY_NOTFOUND )
+ if( ( nPos = rBox.GetEntryPos( static_cast<void const *>(pValue) ) ) != LISTBOX_ENTRY_NOTFOUND )
rBox.SelectEntryPos( nPos );
}
else
@@ -370,7 +370,7 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent )
{
OUString aEntry( m_pParent->m_aJobData.m_pParser->translateKey( pKey->getKey() ) );
sal_uInt16 nPos = m_pPPDKeyBox->InsertEntry( aEntry );
- m_pPPDKeyBox->SetEntryData( nPos, (void*)pKey );
+ m_pPPDKeyBox->SetEntryData( nPos, const_cast<PPDKey *>(pKey) );
}
}
}
@@ -485,11 +485,11 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey )
else
aEntry = OUString(m_pParent->m_aJobData.m_pParser->translateOption( pKey->getKey(), pValue->m_aOption));
sal_uInt16 nPos = m_pPPDValueBox->InsertEntry( aEntry );
- m_pPPDValueBox->SetEntryData( nPos, (void*)pValue );
+ m_pPPDValueBox->SetEntryData( nPos, const_cast<PPDValue *>(pValue) );
}
}
pValue = m_pParent->m_aJobData.m_aContext.getValue( pKey );
- m_pPPDValueBox->SelectEntryPos( m_pPPDValueBox->GetEntryPos( (void*)pValue ) );
+ m_pPPDValueBox->SelectEntryPos( m_pPPDValueBox->GetEntryPos( static_cast<void const *>(pValue) ) );
if (pValue->m_bCustomOption)
{
m_pCustomValue = pValue;
diff --git a/vcl/generic/print/text_gfx.cxx b/vcl/generic/print/text_gfx.cxx
index a30a2b3d621a..6b4e10f6d88f 100644
--- a/vcl/generic/print/text_gfx.cxx
+++ b/vcl/generic/print/text_gfx.cxx
@@ -701,7 +701,7 @@ PrinterGfx::writeResources( osl::File* pFile, std::list< OString >& rSuppliedFon
if (pFile->setPos(osl_Pos_Current, -1) == osl::FileBase::E_None)
{
sal_uInt64 uBytes(1);
- pFile->read((void *)(&lastchar), uBytes, uBytes);
+ pFile->read(static_cast<void *>(&lastchar), uBytes, uBytes);
}
if (lastchar != '\n')