summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:08:37 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:29 +0100
commit44b9b27b1ad161191d254f5497e7eb0766854966 (patch)
treec3ddcfcdb6e4c64fa0d019d4d1d03759118b5f10
parent1bfdea75d23d79e8b0d2d7c1548d716d0ca27488 (diff)
Clean up C-style casts from pointers to void
Change-Id: I962bd44f2ef6204ed2ea51f79b752bd948f67209
-rw-r--r--xmloff/source/core/unoatrcn.cxx4
-rw-r--r--xmloff/source/draw/XMLImageMapExport.cxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx10
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx32
-rw-r--r--xmloff/source/style/XMLConstantsPropertyHandler.cxx2
-rw-r--r--xmloff/source/style/XMLPageExport.cxx2
-rw-r--r--xmloff/source/style/impastpl.cxx2
-rw-r--r--xmloff/source/style/prstylei.cxx2
-rw-r--r--xmloff/source/style/styleexp.cxx6
-rw-r--r--xmloff/source/style/xmlbahdl.cxx2
-rw-r--r--xmloff/source/style/xmlnume.cxx4
-rw-r--r--xmloff/source/style/xmlnumi.cxx2
-rw-r--r--xmloff/source/style/xmlstyle.cxx2
-rw-r--r--xmloff/source/text/XMLIndexMarkExport.cxx4
-rw-r--r--xmloff/source/text/XMLLineNumberingExport.cxx8
-rw-r--r--xmloff/source/text/XMLRedlineExport.cxx22
-rw-r--r--xmloff/source/text/XMLSectionExport.cxx30
-rw-r--r--xmloff/source/text/XMLTextColumnsExport.cxx4
-rw-r--r--xmloff/source/text/XMLTextHeaderFooterContext.cxx6
-rw-r--r--xmloff/source/text/XMLTextMasterPageContext.cxx2
-rw-r--r--xmloff/source/text/txtexppr.cxx8
-rw-r--r--xmloff/source/text/txtflde.cxx4
-rw-r--r--xmloff/source/text/txtftne.cxx2
-rw-r--r--xmloff/source/text/txtimppr.cxx2
-rw-r--r--xmloff/source/text/txtparae.cxx42
-rw-r--r--xmloff/source/text/txtprhdl.cxx12
-rw-r--r--xmloff/source/text/txtstyli.cxx2
27 files changed, 110 insertions, 110 deletions
diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx
index df29325e0644..1f4dfba3a76c 100644
--- a/xmloff/source/core/unoatrcn.cxx
+++ b/xmloff/source/core/unoatrcn.cxx
@@ -165,7 +165,7 @@ void SAL_CALL SvUnoAttributeContainer::replaceByName(const OUString& aName, cons
if( nAttr == USHRT_MAX )
throw container::NoSuchElementException();
- xml::AttributeData* pData = (xml::AttributeData*)aElement.getValue();
+ xml::AttributeData const * pData = static_cast<xml::AttributeData const *>(aElement.getValue());
sal_Int32 nPos = aName.indexOf( ':' );
if( nPos != -1L )
@@ -208,7 +208,7 @@ throw( lang::IllegalArgumentException, container::ElementExistException, lang::W
if( nAttr != USHRT_MAX )
throw container::ElementExistException();
- xml::AttributeData* pData = (xml::AttributeData*)aElement.getValue();
+ xml::AttributeData const * pData = static_cast<xml::AttributeData const *>(aElement.getValue());
sal_Int32 nPos = aName.indexOf( ':' );
if( nPos != -1L )
diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx
index b1a4b71d64e1..9ea9b5863e88 100644
--- a/xmloff/source/draw/XMLImageMapExport.cxx
+++ b/xmloff/source/draw/XMLImageMapExport.cxx
@@ -199,7 +199,7 @@ void XMLImageMapExport::ExportMapEntry(
// is-active
aAny = rPropertySet->getPropertyValue(msIsActive);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NOHREF, XML_NOHREF);
}
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 67854f74de93..e7ec2fbad58f 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1986,11 +1986,11 @@ void XMLShapeExport::ImpExportLineShape(
// get the two points
uno::Any aAny(xPropSet->getPropertyValue("Geometry"));
- drawing::PointSequenceSequence* pSourcePolyPolygon = (drawing::PointSequenceSequence*)aAny.getValue();
+ drawing::PointSequenceSequence const * pSourcePolyPolygon = static_cast<drawing::PointSequenceSequence const *>(aAny.getValue());
if(pSourcePolyPolygon)
{
- drawing::PointSequence* pOuterSequence = pSourcePolyPolygon->getArray();
+ drawing::PointSequence* pOuterSequence = const_cast<css::drawing::PointSequenceSequence *>(pSourcePolyPolygon)->getArray();
if(pOuterSequence)
{
drawing::PointSequence* pInnerSequence = pOuterSequence++;
@@ -2164,7 +2164,7 @@ void XMLShapeExport::ImpExportPolygonShape(
// get PolygonBezier
uno::Any aAny( xPropSet->getPropertyValue("Geometry") );
const basegfx::B2DPolyPolygon aPolyPolygon(
- basegfx::tools::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(*(drawing::PolyPolygonBezierCoords*)aAny.getValue()));
+ basegfx::tools::UnoPolyPolygonBezierCoordsToB2DPolyPolygon(*static_cast<drawing::PolyPolygonBezierCoords const *>(aAny.getValue())));
if(aPolyPolygon.count())
{
@@ -2185,7 +2185,7 @@ void XMLShapeExport::ImpExportPolygonShape(
// get non-bezier polygon
uno::Any aAny( xPropSet->getPropertyValue("Geometry") );
const basegfx::B2DPolyPolygon aPolyPolygon(
- basegfx::tools::UnoPointSequenceSequenceToB2DPolyPolygon(*(drawing::PointSequenceSequence*)aAny.getValue()));
+ basegfx::tools::UnoPointSequenceSequenceToB2DPolyPolygon(*static_cast<drawing::PointSequenceSequence const *>(aAny.getValue())));
if(!aPolyPolygon.areControlPointsUsed() && 1 == aPolyPolygon.count())
{
@@ -2579,7 +2579,7 @@ void XMLShapeExport::ImpExportConnectorShape(
if( xProps->getPropertyValue("PolyPolygonBezier") >>= aAny )
{
// get PolygonBezier
- drawing::PolyPolygonBezierCoords* pSourcePolyPolygon = (drawing::PolyPolygonBezierCoords*)aAny.getValue();
+ drawing::PolyPolygonBezierCoords const * pSourcePolyPolygon = static_cast<drawing::PolyPolygonBezierCoords const *>(aAny.getValue());
if(pSourcePolyPolygon && pSourcePolyPolygon->Coordinates.getLength())
{
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index 0db4b72f4aa3..e7516973d8f2 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -1290,27 +1290,27 @@ void XMLEnhancedCustomShapeContext::EndElement()
case EAS_Coordinates :
case EAS_GluePoints :
{
- uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair >& rSeq =
- *((uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair >*)
+ uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair > const & rSeq =
+ *static_cast<uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair > const *>(
aPathIter->Value.getValue());
for ( i = 0; i < rSeq.getLength(); i++ )
{
- CheckAndResolveEquationParameter( rSeq[ i ].First, pH );
- CheckAndResolveEquationParameter( rSeq[ i ].Second, pH );
+ CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>(rSeq[ i ].First), pH );
+ CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>(rSeq[ i ].Second), pH );
}
}
break;
case EAS_TextFrames :
{
- uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame >& rSeq =
- *((uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame >*)
+ uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > const & rSeq =
+ *static_cast<uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > const *>(
aPathIter->Value.getValue());
for ( i = 0; i < rSeq.getLength(); i++ )
{
- CheckAndResolveEquationParameter( rSeq[ i ].TopLeft.First, pH );
- CheckAndResolveEquationParameter( rSeq[ i ].TopLeft.Second, pH );
- CheckAndResolveEquationParameter( rSeq[ i ].BottomRight.First, pH );
- CheckAndResolveEquationParameter( rSeq[ i ].BottomRight.Second, pH );
+ CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>(rSeq[ i ].TopLeft.First), pH );
+ CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>(rSeq[ i ].TopLeft.Second), pH );
+ CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>(rSeq[ i ].BottomRight.First), pH );
+ CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>(rSeq[ i ].BottomRight.Second), pH );
}
}
break;
@@ -1335,18 +1335,18 @@ void XMLEnhancedCustomShapeContext::EndElement()
case EAS_RadiusRangeMinimum :
case EAS_RadiusRangeMaximum :
{
- CheckAndResolveEquationParameter( *((com::sun::star::drawing::EnhancedCustomShapeParameter*)
- pValues->Value.getValue()), pH );
+ CheckAndResolveEquationParameter( *const_cast<css::drawing::EnhancedCustomShapeParameter *>(static_cast<com::sun::star::drawing::EnhancedCustomShapeParameter const *>(
+ pValues->Value.getValue())), pH );
}
break;
case EAS_Position :
case EAS_Polar :
{
- CheckAndResolveEquationParameter( (*((com::sun::star::drawing::EnhancedCustomShapeParameterPair*)
- pValues->Value.getValue())).First, pH );
- CheckAndResolveEquationParameter( (*((com::sun::star::drawing::EnhancedCustomShapeParameterPair*)
- pValues->Value.getValue())).Second, pH );
+ CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>((*static_cast<com::sun::star::drawing::EnhancedCustomShapeParameterPair const *>(
+ pValues->Value.getValue())).First), pH );
+ CheckAndResolveEquationParameter( const_cast<css::drawing::EnhancedCustomShapeParameter &>((*static_cast<com::sun::star::drawing::EnhancedCustomShapeParameterPair const *>(
+ pValues->Value.getValue())).Second), pH );
}
break;
default:
diff --git a/xmloff/source/style/XMLConstantsPropertyHandler.cxx b/xmloff/source/style/XMLConstantsPropertyHandler.cxx
index 9a38098d5095..ca3843f25fe1 100644
--- a/xmloff/source/style/XMLConstantsPropertyHandler.cxx
+++ b/xmloff/source/style/XMLConstantsPropertyHandler.cxx
@@ -67,7 +67,7 @@ bool XMLConstantsPropertyHandler::exportXML(
if( rValue.hasValue() && (rValue.getValueTypeClass() == TypeClass_ENUM))
{
- nEnum = *((sal_Int32*)rValue.getValue());
+ nEnum = *static_cast<sal_Int32 const *>(rValue.getValue());
bRet = true;
}
else
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 0bd5d951e469..7713b664cefa 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -92,7 +92,7 @@ bool XMLPageExport::exportStyle(
if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
{
Any aAny = xPropSet->getPropertyValue( sIsPhysical );
- if( !*(sal_Bool *)aAny.getValue() )
+ if( !*static_cast<sal_Bool const *>(aAny.getValue()) )
return false;
}
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index 3147edad34db..b6e1b2ae176a 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -86,7 +86,7 @@ struct2string(void *data,
result.append(":");
result.append(compoundType->ppMemberNames[i]);
result.append("=");
- result.append(data2string(((char *)data)+compoundType->pMemberOffsets[i],
+ result.append(data2string(static_cast<char *>(data)+compoundType->pMemberOffsets[i],
compoundType->ppTypeRefs[i]));
}
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index bda107563879..47f19100bac0 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -367,7 +367,7 @@ void XMLPropStyleContext::CreateAndInsert( bool bOverwrite )
if( !bNew && xPropSetInfo->hasPropertyByName( msIsPhysical ) )
{
Any aAny = xPropSet->getPropertyValue( msIsPhysical );
- bNew = !*(sal_Bool *)aAny.getValue();
+ bNew = !*static_cast<sal_Bool const *>(aAny.getValue());
}
SetNew( bNew );
if( rName != GetName() )
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 2089fb08748c..43fbab803388 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -96,7 +96,7 @@ bool XMLStyleExport::exportStyle(
if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
{
aAny = xPropSet->getPropertyValue( sIsPhysical );
- if( !*(sal_Bool *)aAny.getValue() )
+ if( !*static_cast<sal_Bool const *>(aAny.getValue()) )
return false;
}
@@ -164,7 +164,7 @@ bool XMLStyleExport::exportStyle(
if( xPropSetInfo->hasPropertyByName( sIsAutoUpdate ) )
{
aAny = xPropSet->getPropertyValue( sIsAutoUpdate );
- if( *(sal_Bool *)aAny.getValue() )
+ if( *static_cast<sal_Bool const *>(aAny.getValue()) )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_AUTO_UPDATE,
XML_TRUE );
}
@@ -472,7 +472,7 @@ void XMLStyleExport::exportStyleFamily(
if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
{
Any aAny( xPropSet->getPropertyValue( sIsPhysical ) );
- if( !*(sal_Bool *)aAny.getValue() )
+ if( !*static_cast<sal_Bool const *>(aAny.getValue()) )
continue;
}
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index bee67a4a70bf..6c93da92755f 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -695,7 +695,7 @@ bool XMLIsTransparentPropHdl::exportXML( OUString& rStrExpValue, const Any& rVal
// MIB: This looks a bit strange, because bTransPropValue == bValue should
// do the same, but this only applies if 'true' is represented by the same
// 8 bit value in bValue and bTransPropValue. Who will ensure this?
- bool bValue = *(sal_Bool *)rValue.getValue();
+ bool bValue = *static_cast<sal_Bool const *>(rValue.getValue());
bool bIsTrans = bTransPropValue ? bValue : !bValue;
if( bIsTrans )
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index db278ab3d6c6..c658ed14add6 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -680,7 +680,7 @@ void SvxXMLNumRuleExport::exportNumberingRule(
xPropSetInfo->hasPropertyByName( sIsContinuousNumbering ) )
{
Any aAny( xPropSet->getPropertyValue( sIsContinuousNumbering ) );
- bContNumbering = *(sal_Bool *)aAny.getValue();
+ bContNumbering = *static_cast<sal_Bool const *>(aAny.getValue());
}
if( bContNumbering )
GetExport().AddAttribute( XML_NAMESPACE_TEXT,
@@ -708,7 +708,7 @@ bool SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
if( xPropSetInfo->hasPropertyByName( sIsPhysical ) )
{
aAny = xPropSet->getPropertyValue( sIsPhysical );
- if( !*(sal_Bool *)aAny.getValue() )
+ if( !*static_cast<sal_Bool const *>(aAny.getValue()) )
return false;
}
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 810a7244e5b3..bea31bfc5574 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -1191,7 +1191,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( bool bOverwrite )
if( !bNew && xPropSetInfo->hasPropertyByName( sIsPhysical ) )
{
Any aAny = xPropSet->getPropertyValue( sIsPhysical );
- bNew = !*(sal_Bool *)aAny.getValue();
+ bNew = !*static_cast<sal_Bool const *>(aAny.getValue());
}
if ( xPropSetInfo->hasPropertyByName( "Hidden" ) )
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index a4600a409c16..93ede0727a19 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -701,7 +701,7 @@ Reference < XAutoStyleFamily > SvXMLStylesContext::GetAutoStyles( sal_uInt16 nFa
if (xAutoStyleFamilies->hasByName(sName))
{
Any aAny = xAutoStyleFamilies->getByName( sName );
- xAutoStyles = *(Reference<XAutoStyleFamily>*)aAny.getValue();
+ xAutoStyles = *static_cast<Reference<XAutoStyleFamily> const *>(aAny.getValue());
if( bPara )
const_cast<SvXMLStylesContext *>(this)->mxParaAutoStyles = xAutoStyles;
else
diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx
index 60b97be81ba9..9004c7423fb6 100644
--- a/xmloff/source/text/XMLIndexMarkExport.cxx
+++ b/xmloff/source/text/XMLIndexMarkExport.cxx
@@ -92,7 +92,7 @@ void XMLIndexMarkExport::ExportIndexMark(
// collapsed/alternative text entry?
aAny = rPropSet->getPropertyValue(sIsCollapsed);
- if (*(sal_Bool *)aAny.getValue())
+ if (*static_cast<sal_Bool const *>(aAny.getValue()))
{
// collapsed entry: needs alternative text
nElementNo = 0;
@@ -108,7 +108,7 @@ void XMLIndexMarkExport::ExportIndexMark(
{
// start and end entries: has ID
aAny = rPropSet->getPropertyValue(sIsStart);
- nElementNo = *(sal_Bool *)aAny.getValue() ? 1 : 2;
+ nElementNo = *static_cast<sal_Bool const *>(aAny.getValue()) ? 1 : 2;
// generate ID
OUStringBuffer sBuf;
diff --git a/xmloff/source/text/XMLLineNumberingExport.cxx b/xmloff/source/text/XMLLineNumberingExport.cxx
index 7e89f1c62b1b..ae2732f98438 100644
--- a/xmloff/source/text/XMLLineNumberingExport.cxx
+++ b/xmloff/source/text/XMLLineNumberingExport.cxx
@@ -90,7 +90,7 @@ void XMLLineNumberingExport::Export()
// enable
aAny = xLineNumbering->getPropertyValue(sIsOn);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
XML_NUMBER_LINES, XML_FALSE);
@@ -98,7 +98,7 @@ void XMLLineNumberingExport::Export()
// count empty lines
aAny = xLineNumbering->getPropertyValue(sCountEmptyLines);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
XML_COUNT_EMPTY_LINES, XML_FALSE);
@@ -106,7 +106,7 @@ void XMLLineNumberingExport::Export()
// count in frames
aAny = xLineNumbering->getPropertyValue(sCountLinesInFrames);
- if (*(sal_Bool*)aAny.getValue())
+ if (*static_cast<sal_Bool const *>(aAny.getValue()))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
XML_COUNT_IN_TEXT_BOXES, XML_TRUE);
@@ -114,7 +114,7 @@ void XMLLineNumberingExport::Export()
// restart numbering
aAny = xLineNumbering->getPropertyValue(sRestartAtEachPage);
- if (*(sal_Bool*)aAny.getValue())
+ if (*static_cast<sal_Bool const *>(aAny.getValue()))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
XML_RESTART_ON_PAGE, XML_TRUE);
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index fa93ac9441d7..899f6a509b70 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -213,8 +213,8 @@ void XMLRedlineExport::ExportChangesListElements()
Reference<XPropertySet> aDocPropertySet( rExport.GetModel(),
uno::UNO_QUERY );
// redlining enabled?
- bool bEnabled = *(sal_Bool*)aDocPropertySet->getPropertyValue(
- sRecordChanges ).getValue();
+ bool bEnabled = *static_cast<sal_Bool const *>(aDocPropertySet->getPropertyValue(
+ sRecordChanges ).getValue());
// only export if we have redlines or attributes
if ( aEnumAccess->hasElements() || bEnabled )
@@ -248,7 +248,7 @@ void XMLRedlineExport::ExportChangesListElements()
// export only if not in header or footer
// (those must be exported with their XText)
aAny = xPropSet->getPropertyValue(sIsInHeaderFooter);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
// and finally, export change
ExportChangedRegion(xPropSet);
@@ -272,8 +272,8 @@ void XMLRedlineExport::ExportChangeAutoStyle(
Any aIsStart = rPropSet->getPropertyValue(sIsStart);
Any aIsCollapsed = rPropSet->getPropertyValue(sIsCollapsed);
- if ( *(sal_Bool*)aIsStart.getValue() ||
- *(sal_Bool*)aIsCollapsed.getValue() )
+ if ( *static_cast<sal_Bool const *>(aIsStart.getValue()) ||
+ *static_cast<sal_Bool const *>(aIsCollapsed.getValue()) )
pCurrentChangesList->push_back(rPropSet);
}
@@ -315,7 +315,7 @@ void XMLRedlineExport::ExportChangesListAutoStyles()
// export only if not in header or footer
// (those must be exported with their XText)
aAny = xPropSet->getPropertyValue(sIsInHeaderFooter);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
ExportChangeAutoStyle(xPropSet);
}
@@ -331,7 +331,7 @@ void XMLRedlineExport::ExportChangeInline(
// determine element name (depending on collapsed, start/end)
enum XMLTokenEnum eElement = XML_TOKEN_INVALID;
Any aAny = rPropSet->getPropertyValue(sIsCollapsed);
- bool bCollapsed = *(sal_Bool *)aAny.getValue();
+ bool bCollapsed = *static_cast<sal_Bool const *>(aAny.getValue());
if (bCollapsed)
{
eElement = XML_CHANGE;
@@ -339,7 +339,7 @@ void XMLRedlineExport::ExportChangeInline(
else
{
aAny = rPropSet->getPropertyValue(sIsStart);
- const bool bStart = *(sal_Bool *)aAny.getValue();
+ const bool bStart = *static_cast<sal_Bool const *>(aAny.getValue());
eElement = bStart ? XML_CHANGE_START : XML_CHANGE_END;
}
@@ -364,7 +364,7 @@ void XMLRedlineExport::ExportChangedRegion(
// merge-last-paragraph
Any aAny = rPropSet->getPropertyValue(sMergeLastPara);
- if( ! *(sal_Bool*)aAny.getValue() )
+ if( ! *static_cast<sal_Bool const *>(aAny.getValue()) )
rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_MERGE_LAST_PARAGRAPH,
XML_FALSE);
@@ -581,11 +581,11 @@ void XMLRedlineExport::ExportStartOrEndRedline(
}
else if (sIsCollapsed.equals(pValues[i].Name))
{
- bIsCollapsed = *(sal_Bool*)pValues[i].Value.getValue();
+ bIsCollapsed = *static_cast<sal_Bool const *>(pValues[i].Value.getValue());
}
else if (sIsStart.equals(pValues[i].Name))
{
- bIsStart = *(sal_Bool*)pValues[i].Value.getValue();
+ bIsStart = *static_cast<sal_Bool const *>(pValues[i].Value.getValue());
}
}
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index c2912a5e0c89..94049faab795 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -436,7 +436,7 @@ void XMLSectionExport::ExportRegularSectionStart(
// #97450# store hidden-status (of conditional sections only)
aAny = xPropSet->getPropertyValue(sIsCurrentlyVisible);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_IS_HIDDEN,
XML_TRUE);
@@ -447,14 +447,14 @@ void XMLSectionExport::ExportRegularSectionStart(
eDisplay = XML_NONE;
}
aAny = xPropSet->getPropertyValue(sIsVisible);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_DISPLAY, eDisplay);
}
// protect + protection key
aAny = xPropSet->getPropertyValue(sIsProtected);
- if (*(sal_Bool*)aAny.getValue())
+ if (*static_cast<sal_Bool const *>(aAny.getValue()))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTED, XML_TRUE);
}
@@ -538,7 +538,7 @@ void XMLSectionExport::ExportRegularSectionStart(
sItem);
aAny = xPropSet->getPropertyValue(sIsAutomaticUpdate);
- if (*(sal_Bool*)aAny.getValue())
+ if (*static_cast<sal_Bool const *>(aAny.getValue()))
{
GetExport().AddAttribute(XML_NAMESPACE_OFFICE,
XML_AUTOMATIC_UPDATE, XML_TRUE);
@@ -772,7 +772,7 @@ void XMLSectionExport::ExportBaseIndexStart(
{
// protect + protection key
Any aAny = rPropertySet->getPropertyValue(sIsProtected);
- if (*(sal_Bool*)aAny.getValue())
+ if (*static_cast<sal_Bool const *>(aAny.getValue()))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_PROTECTED, XML_TRUE);
}
@@ -816,7 +816,7 @@ void XMLSectionExport::ExportBaseIndexSource(
{
// document or chapter index?
aAny = rPropertySet->getPropertyValue(sCreateFromChapter);
- if (*(sal_Bool*)aAny.getValue())
+ if (*static_cast<sal_Bool const *>(aAny.getValue()))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
XML_INDEX_SCOPE, XML_CHAPTER);
@@ -824,7 +824,7 @@ void XMLSectionExport::ExportBaseIndexSource(
// tab-stops relative to margin?
aAny = rPropertySet->getPropertyValue(sIsRelativeTabstops);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
XML_RELATIVE_TAB_STOP_POSITION,
@@ -925,7 +925,7 @@ void XMLSectionExport::ExportTableAndIllustrationIndexSourceAttributes(
{
// use caption
Any aAny = rPropertySet->getPropertyValue(sCreateFromLabels);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
GetExport().AddAttribute(XML_NAMESPACE_TEXT,
XML_USE_CAPTION, XML_FALSE);
@@ -1295,7 +1295,7 @@ void XMLSectionExport::ExportIndexTemplateElement(
case TOK_TPARAM_TAB_RIGHT_ALIGNED:
bRightAligned =
- *(sal_Bool *)rValues[i].Value.getValue();
+ *static_cast<sal_Bool const *>(rValues[i].Value.getValue());
break;
case TOK_TPARAM_TAB_POSITION:
@@ -1305,7 +1305,7 @@ void XMLSectionExport::ExportIndexTemplateElement(
// #i21237#
case TOK_TPARAM_TAB_WITH_TAB:
- bWithTabStop = *(sal_Bool *)rValues[i].Value.getValue();
+ bWithTabStop = *static_cast<sal_Bool const *>(rValues[i].Value.getValue());
bWithTabStopOK = true;
break;
@@ -1602,7 +1602,7 @@ void XMLSectionExport::ExportBoolean(
OSL_ENSURE(eAttributeName != XML_TOKEN_INVALID, "Need attribute name");
Any aAny = rPropSet->getPropertyValue(sPropertyName);
- bool bTmp = *(sal_Bool*)aAny.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(aAny.getValue());
// value = value ^ bInvert
// omit if value == default
@@ -1658,14 +1658,14 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_SUFFIX, sTmp);
aAny = xPropSet->getPropertyValue(sIsNumberEntries);
- if (*(sal_Bool*)aAny.getValue())
+ if (*static_cast<sal_Bool const *>(aAny.getValue()))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
XML_NUMBERED_ENTRIES, XML_TRUE);
}
aAny = xPropSet->getPropertyValue(sIsSortByPosition);
- if (! *(sal_Bool*)aAny.getValue())
+ if (! *static_cast<sal_Bool const *>(aAny.getValue()))
{
rExport.AddAttribute(XML_NAMESPACE_TEXT,
XML_SORT_BY_POSITION, XML_FALSE);
@@ -1720,7 +1720,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
}
else if (rValue.Name == "IsSortAscending")
{
- bool bTmp = *(sal_Bool*)rValue.Value.getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rValue.Value.getValue());
rExport.AddAttribute(XML_NAMESPACE_TEXT,
XML_SORT_ASCENDING,
bTmp ? XML_TRUE : XML_FALSE);
@@ -1760,7 +1760,7 @@ bool XMLSectionExport::IsMuteSection(
{
Any aAny = xPropSet->getPropertyValue(sIsGlobalDocumentSection);
- if ( *(sal_Bool*)aAny.getValue() )
+ if ( *static_cast<sal_Bool const *>(aAny.getValue()) )
{
Reference<XDocumentIndex> xIndex;
if (! GetIndex(rSection, xIndex))
diff --git a/xmloff/source/text/XMLTextColumnsExport.cxx b/xmloff/source/text/XMLTextColumnsExport.cxx
index 1ced191e3ad2..ee797e2c6b70 100644
--- a/xmloff/source/text/XMLTextColumnsExport.cxx
+++ b/xmloff/source/text/XMLTextColumnsExport.cxx
@@ -72,7 +72,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
if( xPropSet.is() )
{
Any aAny = xPropSet->getPropertyValue( sIsAutomatic );
- if ( *(sal_Bool*)aAny.getValue() )
+ if ( *static_cast<sal_Bool const *>(aAny.getValue()) )
{
aAny = xPropSet->getPropertyValue( sAutomaticDistance );
sal_Int32 nDistance = 0;
@@ -92,7 +92,7 @@ void XMLTextColumnsExport::exportXML( const Any& rAny )
if( xPropSet.is() )
{
Any aAny = xPropSet->getPropertyValue( sSeparatorLineIsOn );
- if( *(sal_Bool *)aAny.getValue() )
+ if( *static_cast<sal_Bool const *>(aAny.getValue()) )
{
// style:width
aAny = xPropSet->getPropertyValue( sSeparatorLineWidth );
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index 40ac8087b7d3..f752e33b1a0c 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -61,7 +61,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport, sa
Any aAny;
aAny = xPropSet->getPropertyValue( sOn );
- bool bOn = *(sal_Bool *)aAny.getValue();
+ bool bOn = *static_cast<sal_Bool const *>(aAny.getValue());
if( bOn )
{
@@ -131,7 +131,7 @@ SvXMLImportContext *XMLTextHeaderFooterContext::CreateChildContext(
else
{
aAny = xPropSet->getPropertyValue( sOn );
- sal_Bool bOn = *(sal_Bool *)aAny.getValue();
+ sal_Bool bOn = *static_cast<sal_Bool const *>(aAny.getValue());
if( !bOn )
{
@@ -147,7 +147,7 @@ SvXMLImportContext *XMLTextHeaderFooterContext::CreateChildContext(
// If a header or footer is not shared, share it now.
aAny = xPropSet->getPropertyValue( sShareContent );
- sal_Bool bShared = *(sal_Bool *)aAny.getValue();
+ sal_Bool bShared = *static_cast<sal_Bool const *>(aAny.getValue());
if( !bShared )
{
bShared = sal_True;
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index 36ea03503e72..21eafe49df49 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -150,7 +150,7 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
if( !bNew && xPropSetInfo->hasPropertyByName( sIsPhysical ) )
{
aAny = xPropSet->getPropertyValue( sIsPhysical );
- bNew = !*(sal_Bool *)aAny.getValue();
+ bNew = !*static_cast<sal_Bool const *>(aAny.getValue());
}
SetNew( bNew );
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index 1300c3b3f0e8..0dd5312da225 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -140,7 +140,7 @@ void XMLTextExportPropertySetMapper::handleSpecialItem(
{
case CTF_DROPCAPWHOLEWORD:
DBG_ASSERT( !bDropWholeWord, "drop whole word is set already!" );
- pThis->bDropWholeWord = *(sal_Bool *)rProperty.maValue.getValue();
+ pThis->bDropWholeWord = *static_cast<sal_Bool const *>(rProperty.maValue.getValue());
break;
case CTF_DROPCAPCHARSTYLE:
DBG_ASSERT( sDropCharStyle.isEmpty(), "drop char style is set already!" );
@@ -994,7 +994,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
}
if( pWrapContourModeState &&
(!pWrapContourState ||
- !*(sal_Bool *)pWrapContourState ->maValue.getValue() ) )
+ !*static_cast<sal_Bool const *>(pWrapContourState ->maValue.getValue()) ) )
pWrapContourModeState->mnIndex = -1;
}
@@ -1012,7 +1012,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
if( pHoriOrientState && pHoriOrientMirroredState )
{
if( pHoriOrientMirrorState &&
- *(sal_Bool *)pHoriOrientMirrorState->maValue.getValue() )
+ *static_cast<sal_Bool const *>(pHoriOrientMirrorState->maValue.getValue()) )
pHoriOrientState->mnIndex = -1;
else
pHoriOrientMirroredState->mnIndex = -1;
@@ -1088,7 +1088,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
if( pShapeHoriOrientState && pShapeHoriOrientMirroredState )
{
if( pShapeHoriOrientMirrorState &&
- *(sal_Bool *)pShapeHoriOrientMirrorState->maValue.getValue() )
+ *static_cast<sal_Bool const *>(pShapeHoriOrientMirrorState->maValue.getValue()) )
pShapeHoriOrientState->mnIndex = -1;
else
pShapeHoriOrientMirroredState->mnIndex = -1;
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index aabd4beeb97b..13e3f21f1e99 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2988,7 +2988,7 @@ enum XMLTokenEnum XMLTextFieldExport::MapPageNumberName(
enum XMLTokenEnum eName = XML_TOKEN_INVALID;
PageNumberType ePage;
Any aAny = xPropSet->getPropertyValue(sPropertySubType);
- ePage = *(PageNumberType*)aAny.getValue();
+ ePage = *static_cast<PageNumberType const *>(aAny.getValue());
switch (ePage)
{
@@ -3531,7 +3531,7 @@ inline bool GetBoolProperty(
const Reference<XPropertySet> & xPropSet)
{
Any aAny = xPropSet->getPropertyValue(sPropName);
- bool bBool = *(sal_Bool *)aAny.getValue();
+ bool bBool = *static_cast<sal_Bool const *>(aAny.getValue());
return bBool;
}
diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx
index 4db45c9e2d7b..4f8fcafc889e 100644
--- a/xmloff/source/text/txtftne.cxx
+++ b/xmloff/source/text/txtftne.cxx
@@ -317,7 +317,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
aAny = rFootnoteConfig->getPropertyValue(
sPositionEndOfDoc);
GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_FOOTNOTES_POSITION,
- ( (*(sal_Bool *)aAny.getValue()) ?
+ ( (*static_cast<sal_Bool const *>(aAny.getValue())) ?
XML_DOCUMENT : XML_PAGE ) );
aAny = rFootnoteConfig->getPropertyValue(sFootnoteCounting);
diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
index ef38374ef98f..08cb3957c386 100644
--- a/xmloff/source/text/txtimppr.cxx
+++ b/xmloff/source/text/txtimppr.cxx
@@ -656,7 +656,7 @@ void XMLTextImportPropertyMapper::finished(
// #i5775# don't overwrite %transparency with binary transparency
if( ( pBackTransparency != NULL ) && ( pBackTransparent != NULL ) )
{
- if( ! *(sal_Bool*)(pBackTransparent->maValue.getValue()) )
+ if( ! *static_cast<sal_Bool const *>(pBackTransparent->maValue.getValue()) )
pBackTransparent->mnIndex = -1;
}
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 06562eec50c7..025bb0b5baa1 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -511,13 +511,13 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
xNumPropSet->getPropertySetInfo()
->hasPropertyByName( "IsAutomatic" ) )
{
- bAdd = *(sal_Bool *)xNumPropSet->getPropertyValue( "IsAutomatic" ).getValue();
+ bAdd = *static_cast<sal_Bool const *>(xNumPropSet->getPropertyValue( "IsAutomatic" ).getValue());
// Check on outline style (#i73361#)
if ( bAdd &&
xNumPropSet->getPropertySetInfo()
->hasPropertyByName( "NumberingIsOutline" ) )
{
- bAdd = !(*(sal_Bool *)xNumPropSet->getPropertyValue( "NumberingIsOutline" ).getValue());
+ bAdd = !(*static_cast<sal_Bool const *>(xNumPropSet->getPropertyValue( "NumberingIsOutline" ).getValue()));
}
}
else
@@ -626,13 +626,13 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
xNumPropSet->getPropertySetInfo()
->hasPropertyByName( "IsAutomatic" ) )
{
- bAdd = *(sal_Bool *)xNumPropSet->getPropertyValue( "IsAutomatic" ).getValue();
+ bAdd = *static_cast<sal_Bool const *>(xNumPropSet->getPropertyValue( "IsAutomatic" ).getValue());
// Check on outline style (#i73361#)
if ( bAdd &&
xNumPropSet->getPropertySetInfo()
->hasPropertyByName( "NumberingIsOutline" ) )
{
- bAdd = !(*(sal_Bool *)xNumPropSet->getPropertyValue( "NumberingIsOutline" ).getValue());
+ bAdd = !(*static_cast<sal_Bool const *>(xNumPropSet->getPropertyValue( "NumberingIsOutline" ).getValue()));
}
}
else
@@ -1475,13 +1475,13 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( bool bIsProgress )
}
Any aAny = xAutoStyleFamilies->getByName( sName );
- Reference< XAutoStyleFamily > xAutoStyles = *(Reference<XAutoStyleFamily>*)aAny.getValue();
+ Reference< XAutoStyleFamily > xAutoStyles = *static_cast<Reference<XAutoStyleFamily> const *>(aAny.getValue());
Reference < XEnumeration > xAutoStylesEnum( xAutoStyles->createEnumeration() );
while ( xAutoStylesEnum->hasMoreElements() )
{
aAny = xAutoStylesEnum->nextElement();
- Reference< XAutoStyle > xAutoStyle = *(Reference<XAutoStyle>*)aAny.getValue();
+ Reference< XAutoStyle > xAutoStyle = *static_cast<Reference<XAutoStyle> const *>(aAny.getValue());
Reference < XPropertySet > xPSet( xAutoStyle, uno::UNO_QUERY );
Add( nFamily, xPSet, 0, true );
}
@@ -1498,7 +1498,7 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( bool bIsProgress )
while ( xTextFieldsEnum->hasMoreElements() )
{
Any aAny = xTextFieldsEnum->nextElement();
- Reference< XTextField > xTextField = *(Reference<XTextField>*)aAny.getValue();
+ Reference< XTextField > xTextField = *static_cast<Reference<XTextField> const *>(aAny.getValue());
exportTextField( xTextField, bAutoStyles, bIsProgress,
!xAutoStylesSupp.is() );
try
@@ -1576,7 +1576,7 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( bool bIsProgress )
for( sal_Int32 i = 0; i < nCount; ++i )
{
Any aAny = xSections->getByIndex( i );
- Reference< XTextSection > xSection = *(Reference<XTextSection>*)aAny.getValue();
+ Reference< XTextSection > xSection = *static_cast<Reference<XTextSection> const *>(aAny.getValue());
Reference < XPropertySet > xPSet( xSection, uno::UNO_QUERY );
Add( XML_STYLE_FAMILY_TEXT_SECTION, xPSet );
}
@@ -1594,7 +1594,7 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( bool bIsProgress )
for( sal_Int32 i = 0; i < nCount; ++i )
{
Any aAny = xTables->getByIndex( i );
- Reference< XTextTable > xTable = *(Reference<XTextTable>*)aAny.getValue();
+ Reference< XTextTable > xTable = *static_cast<Reference<XTextTable> const *>(aAny.getValue());
exportTable( xTable, true, true );
}
}
@@ -1624,13 +1624,13 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( bool bIsProgress )
xNumPropSet->getPropertySetInfo()
->hasPropertyByName( "IsAutomatic" ) )
{
- bAdd = *(sal_Bool *)xNumPropSet->getPropertyValue( "IsAutomatic" ).getValue();
+ bAdd = *static_cast<sal_Bool const *>(xNumPropSet->getPropertyValue( "IsAutomatic" ).getValue());
// Check on outline style (#i73361#)
if ( bAdd &&
xNumPropSet->getPropertySetInfo()
->hasPropertyByName( "NumberingIsOutline" ) )
{
- bAdd = !(*(sal_Bool *)xNumPropSet->getPropertyValue( "NumberingIsOutline" ).getValue());
+ bAdd = !(*static_cast<sal_Bool const *>(xNumPropSet->getPropertyValue( "NumberingIsOutline" ).getValue()));
}
}
else
@@ -2517,13 +2517,13 @@ void XMLTextParagraphExport::exportTextMark(
// start, end, or point-reference?
sal_Int8 nElement;
- if( *(sal_Bool *)rPropSet->getPropertyValue(sIsCollapsed).getValue() )
+ if( *static_cast<sal_Bool const *>(rPropSet->getPropertyValue(sIsCollapsed).getValue()) )
{
nElement = 0;
}
else
{
- nElement = *(sal_Bool *)rPropSet->getPropertyValue(sIsStart).getValue() ? 1 : 2;
+ nElement = *static_cast<sal_Bool const *>(rPropSet->getPropertyValue(sIsStart).getValue()) ? 1 : 2;
}
// bookmark, bookmark-start: xml:id and RDFa for RDF metadata
@@ -2684,7 +2684,7 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
bool bSyncWidth = false;
if( xPropSetInfo->hasPropertyByName( sIsSyncWidthToHeight ) )
{
- bSyncWidth = *(sal_Bool *)rPropSet->getPropertyValue( sIsSyncWidthToHeight ).getValue();
+ bSyncWidth = *static_cast<sal_Bool const *>(rPropSet->getPropertyValue( sIsSyncWidthToHeight ).getValue());
if( bSyncWidth )
GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_REL_WIDTH,
XML_SCALE );
@@ -2712,7 +2712,7 @@ XMLShapeExportFlags XMLTextParagraphExport::addTextFrameAttributes(
bool bSyncHeight = false;
if( xPropSetInfo->hasPropertyByName( sIsSyncHeightToWidth ) )
{
- bSyncHeight = *(sal_Bool *)rPropSet->getPropertyValue( sIsSyncHeightToWidth ).getValue();
+ bSyncHeight = *static_cast<sal_Bool const *>(rPropSet->getPropertyValue( sIsSyncHeightToWidth ).getValue());
}
sal_Int16 nRelHeight = 0;
if( !bSyncHeight && xPropSetInfo->hasPropertyByName( sRelativeHeight ) )
@@ -2979,7 +2979,7 @@ void XMLTextParagraphExport::exportContour(
if( rPropSetInfo->hasPropertyByName( sIsPixelContour ) )
{
- bPixel = *(sal_Bool *)rPropSet->getPropertyValue( sIsPixelContour ).getValue();
+ bPixel = *static_cast<sal_Bool const *>(rPropSet->getPropertyValue( sIsPixelContour ).getValue());
}
// svg: width
@@ -3041,8 +3041,8 @@ void XMLTextParagraphExport::exportContour(
if( rPropSetInfo->hasPropertyByName( sIsAutomaticContour ) )
{
- bool bTmp = *(sal_Bool *)rPropSet->getPropertyValue(
- sIsAutomaticContour ).getValue();
+ bool bTmp = *static_cast<sal_Bool const *>(rPropSet->getPropertyValue(
+ sIsAutomaticContour ).getValue());
GetExport().AddAttribute( XML_NAMESPACE_DRAW,
XML_RECREATE_ON_EDIT, bTmp ? XML_TRUE : XML_FALSE );
}
@@ -3263,7 +3263,7 @@ bool XMLTextParagraphExport::addHyperlinkAttributes(
&& ( !rPropState.is()
|| PropertyState_DIRECT_VALUE == rPropState->getPropertyState( sServerMap ) ) )
{
- bServerMap = *(sal_Bool *) rPropSet->getPropertyValue( sServerMap ).getValue();
+ bServerMap = *static_cast<sal_Bool const *>(rPropSet->getPropertyValue( sServerMap ).getValue());
if ( bServerMap )
bExport = true;
}
@@ -3640,11 +3640,11 @@ void XMLTextParagraphExport::exportRuby(
bool bAutoStyles )
{
// early out: a collapsed ruby makes no sense
- if (*(sal_Bool*)rPropSet->getPropertyValue(sIsCollapsed).getValue())
+ if (*static_cast<sal_Bool const *>(rPropSet->getPropertyValue(sIsCollapsed).getValue()))
return;
// start value ?
- bool bStart = (*(sal_Bool*)rPropSet->getPropertyValue(sIsStart).getValue());
+ bool bStart = *static_cast<sal_Bool const *>(rPropSet->getPropertyValue(sIsStart).getValue());
if (bAutoStyles)
{
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 78d8215351b5..35db4681e692 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -351,7 +351,7 @@ bool XMLOpaquePropHdl_Impl::exportXML(
const Any& rValue,
const SvXMLUnitConverter& ) const
{
- if( *(sal_Bool *)rValue.getValue() )
+ if( *static_cast<sal_Bool const *>(rValue.getValue()) )
rStrExpValue = GetXMLToken( XML_FOREGROUND );
else
rStrExpValue = GetXMLToken( XML_BACKGROUND );
@@ -401,7 +401,7 @@ bool XMLContourModePropHdl_Impl::exportXML(
const Any& rValue,
const SvXMLUnitConverter& ) const
{
- if( *(sal_Bool *)rValue.getValue() )
+ if( *static_cast<sal_Bool const *>(rValue.getValue()) )
rStrExpValue = GetXMLToken( XML_OUTSIDE );
else
rStrExpValue = GetXMLToken( XML_FULL );
@@ -454,7 +454,7 @@ bool XMLParagraphOnlyPropHdl_Impl::exportXML(
const Any& rValue,
const SvXMLUnitConverter& ) const
{
- if( *(sal_Bool *)rValue.getValue() )
+ if( *static_cast<sal_Bool const *>(rValue.getValue()) )
rStrExpValue = GetXMLToken( XML_1 );
else
rStrExpValue = GetXMLToken( XML_NO_LIMIT );
@@ -580,7 +580,7 @@ bool XMLFrameProtectPropHdl_Impl::exportXML(
const Any& rValue,
const SvXMLUnitConverter& ) const
{
- if( *(sal_Bool *)rValue.getValue() )
+ if( *static_cast<sal_Bool const *>(rValue.getValue()) )
{
if( rStrExpValue.isEmpty() ||
IsXMLToken( rStrExpValue, XML_NONE ) )
@@ -823,7 +823,7 @@ bool XMLGrfMirrorPropHdl_Impl::exportXML(
const Any& rValue,
const SvXMLUnitConverter& ) const
{
- if( *(sal_Bool *)rValue.getValue() )
+ if( *static_cast<sal_Bool const *>(rValue.getValue()) )
{
if( rStrExpValue.isEmpty() ||
IsXMLToken( rStrExpValue, XML_NONE ) )
@@ -1099,7 +1099,7 @@ bool XMLTextSyncWidthHeightPropHdl_Impl::exportXML(
const SvXMLUnitConverter& ) const
{
bool bRet = false;
- if( *(sal_Bool *)rValue.getValue() )
+ if( *static_cast<sal_Bool const *>(rValue.getValue()) )
{
rStrExpValue = sValue;
bRet = true;
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index 5167c6b0b9a1..2d25f61b4571 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -499,7 +499,7 @@ void XMLTextStyleContext::FillPropertySet(
if ( nIndex != -1 )
{
Any& rAny = GetProperties()[nIndex].maValue;
- bool bVal = *(sal_Bool*)rAny.getValue();
+ bool bVal = *static_cast<sal_Bool const *>(rAny.getValue());
bHasCombinedCharactersLetter = bVal;
}