diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:07:45 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:27 +0100 |
commit | 2828d92eee63a4a5306ef64482bc7d1db3459406 (patch) | |
tree | 0fe6e09f55f278bf9c32d36e9375fb7258b6ed0a /sw/source/filter/xml | |
parent | 85f28ec44a2c169c91dac9346e9c71feda6a6cab (diff) |
Clean up C-style casts from pointers to void
Change-Id: I2ec58d0bfe13fae4fc2141f9b017b5a72e0ba2c2
Diffstat (limited to 'sw/source/filter/xml')
-rw-r--r-- | sw/source/filter/xml/XMLRedlineImportHelper.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/xml/swxml.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/xml/wrtxml.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexp.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlimp.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltble.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltexti.cxx | 4 |
7 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 2bf19fd5a95b..5534068aeb3d 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -273,12 +273,12 @@ XMLRedlineImportHelper::XMLRedlineImportHelper( } // get redline mode - bShowChanges = *(sal_Bool*) + bShowChanges = *static_cast<sal_Bool const *>( ( bHandleShowChanges ? xModelPropertySet : xImportInfoPropertySet ) - ->getPropertyValue( sShowChanges ).getValue(); - bRecordChanges = *(sal_Bool*) + ->getPropertyValue( sShowChanges ).getValue()); + bRecordChanges = *static_cast<sal_Bool const *>( ( bHandleRecordChanges ? xModelPropertySet : xImportInfoPropertySet ) - ->getPropertyValue( sRecordChanges ).getValue(); + ->getPropertyValue( sRecordChanges ).getValue()); { Any aAny = (bHandleProtectionKey ? xModelPropertySet : xImportInfoPropertySet ) diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index b3854f81234f..9b028d38690f 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -343,7 +343,7 @@ sal_Int32 ReadThroughComponent( Any aAny = xProps->getPropertyValue("Encrypted"); bool bEncrypted = aAny.getValueType() == ::getBooleanCppuType() && - *(sal_Bool *)aAny.getValue(); + *static_cast<sal_Bool const *>(aAny.getValue()); uno::Reference <io::XInputStream> xInputStream = xStream->getInputStream(); @@ -905,10 +905,10 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c // restore redline mode from import info property set sal_Int16 nRedlineMode = nsRedlineMode_t::REDLINE_SHOW_INSERT; aAny = xInfoSet->getPropertyValue( sShowChanges ); - if ( *(sal_Bool*)aAny.getValue() ) + if ( *static_cast<sal_Bool const *>(aAny.getValue()) ) nRedlineMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE; aAny = xInfoSet->getPropertyValue( sRecordChanges ); - if ( *(sal_Bool*)aAny.getValue() || (aKey.getLength() > 0) ) + if ( *static_cast<sal_Bool const *>(aAny.getValue()) || (aKey.getLength() > 0) ) nRedlineMode |= nsRedlineMode_t::REDLINE_ON; else nRedlineMode |= nsRedlineMode_t::REDLINE_NONE; diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 221e4fb9022b..61eaa7f775ee 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -406,7 +406,7 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >& nRedlineMode = pDoc->getIDocumentRedlineAccess().GetRedlineMode(); nRedlineMode &= ~nsRedlineMode_t::REDLINE_SHOW_MASK; nRedlineMode |= nsRedlineMode_t::REDLINE_SHOW_INSERT; - if ( *(sal_Bool*)aAny.getValue() ) + if ( *static_cast<sal_Bool const *>(aAny.getValue()) ) nRedlineMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE; pDoc->getIDocumentRedlineAccess().SetRedlineMode((RedlineMode_t)( nRedlineMode )); diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 237ab8e8bf1a..07a35f94524a 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -388,8 +388,8 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps) const OUString sShowChanges( "ShowChanges" ); if( xInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ) ) { - bShowRedlineChanges = *(sal_Bool*) xInfoSet-> - getPropertyValue( sShowChanges ).getValue(); + bShowRedlineChanges = *static_cast<sal_Bool const *>(xInfoSet-> + getPropertyValue( sShowChanges ).getValue()); } } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index a7747541d405..c1f846334ac3 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1044,13 +1044,13 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps) } else if ( pValue->Name == "ShowRedlineChanges" ) { - bShowRedlineChanges = *(sal_Bool *)(pValue->Value.getValue()); + bShowRedlineChanges = *static_cast<sal_Bool const *>(pValue->Value.getValue()); bChangeShowRedline = true; } // Headers and footers are not displayed in BrowseView anymore else if ( pValue->Name == "InBrowseMode" ) { - bBrowseMode = *(sal_Bool *)(pValue->Value.getValue()); + bBrowseMode = *static_cast<sal_Bool const *>(pValue->Value.getValue()); bChangeBrowseMode = true; } pValue++; diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 2efe361f7693..e700b133cf88 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -816,7 +816,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox, // cell protection aAny = xCellPropertySet->getPropertyValue(sIsProtected); - if (*(sal_Bool*)aAny.getValue()) + if (*static_cast<sal_Bool const *>(aAny.getValue())) { AddAttribute( XML_NAMESPACE_TABLE, XML_PROTECTED, XML_TRUE ); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index a9307b60a993..5a70eb307cc9 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -802,13 +802,13 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra { case CTF_FRAME_DISPLAY_SCROLLBAR: { - bool bYes = *(sal_Bool *)rProp.maValue.getValue(); + bool bYes = *static_cast<sal_Bool const *>(rProp.maValue.getValue()); eScrollMode = bYes ? ScrollingYes : ScrollingNo; } break; case CTF_FRAME_DISPLAY_BORDER: { - bHasBorder = *(sal_Bool *)rProp.maValue.getValue(); + bHasBorder = *static_cast<sal_Bool const *>(rProp.maValue.getValue()); bIsBorderSet = true; } break; |