summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmlexpit.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-18 15:10:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-23 17:27:47 +0200
commit23e1fc277d5651babce17bb74408ef6505f101d2 (patch)
treeedf64a973766400f870095f4ecd25784bfea6ba5 /sw/source/filter/xml/xmlexpit.cxx
parent7f895dfbf5fb084d747e52db678d75e3273cd825 (diff)
loplugin: cstylecast, update PTR_CAST macro to use static_cast
I introduce a template method into the PTR_CAST machinery to maintain constness. There is now a FIXME in sd/../docshell.cxx because I needed to use a dynamic_cast there to work around the games it appears to be playing with OLE in-place activation. Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
Diffstat (limited to 'sw/source/filter/xml/xmlexpit.cxx')
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index cdd9cd0d0f19..40253feaeaf5 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -536,7 +536,7 @@ bool SvXMLExportItemMapper::QueryXMLValue(
case RES_BOX:
{
- SvxBoxItem* pBox = PTR_CAST(SvxBoxItem, &rItem);
+ const SvxBoxItem* pBox = PTR_CAST(SvxBoxItem, &rItem);
assert(pBox && "Wrong Which-ID");
if (pBox)
{
@@ -874,7 +874,7 @@ bool SvXMLExportItemMapper::QueryXMLValue(
case RES_KEEP:
{
- SvxFmtKeepItem* pFmtKeep = PTR_CAST(SvxFmtKeepItem, &rItem);
+ const SvxFmtKeepItem* pFmtKeep = PTR_CAST(SvxFmtKeepItem, &rItem);
assert(pFmtKeep && "Wrong Which-ID");
if (pFmtKeep)
{
@@ -888,7 +888,7 @@ bool SvXMLExportItemMapper::QueryXMLValue(
case RES_BACKGROUND:
{
- SvxBrushItem* pBrush = PTR_CAST(SvxBrushItem, &rItem);
+ const SvxBrushItem* pBrush = PTR_CAST(SvxBrushItem, &rItem);
OSL_ENSURE( pBrush != NULL, "Wrong Which-ID" );
// note: the graphic is only exported if nMemberId equals
@@ -1038,7 +1038,7 @@ bool SvXMLExportItemMapper::QueryXMLValue(
case RES_HORI_ORIENT:
{
- SwFmtHoriOrient* pHoriOrient = PTR_CAST(SwFmtHoriOrient, &rItem);
+ const SwFmtHoriOrient* pHoriOrient = PTR_CAST(SwFmtHoriOrient, &rItem);
assert(pHoriOrient && "Wrong Which-ID");
if (pHoriOrient)
{
@@ -1051,7 +1051,7 @@ bool SvXMLExportItemMapper::QueryXMLValue(
case RES_VERT_ORIENT:
{
- SwFmtVertOrient* pVertOrient = PTR_CAST(SwFmtVertOrient, &rItem);
+ const SwFmtVertOrient* pVertOrient = PTR_CAST(SwFmtVertOrient, &rItem);
assert(pVertOrient && "Wrong Which-ID");
SvXMLUnitConverter::convertEnum( aOut, pVertOrient->GetVertOrient(),
@@ -1062,7 +1062,7 @@ bool SvXMLExportItemMapper::QueryXMLValue(
case RES_FRM_SIZE:
{
- SwFmtFrmSize* pFrmSize = PTR_CAST(SwFmtFrmSize, &rItem);
+ const SwFmtFrmSize* pFrmSize = PTR_CAST(SwFmtFrmSize, &rItem);
OSL_ENSURE( pFrmSize != NULL, "Wrong Which-ID" );
bool bOutHeight = false;