summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-10 18:55:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-10 18:55:19 +0200
commite4eb0f6ecee2d82966c0da156185415e5886f60f (patch)
treee302dcadd718ebc13a6ca3a1bc65ab05b0cfbdc8 /filter
parent9741e7a437da478ceb05a6122ee3e4a111d60d18 (diff)
Clean up uses of Any::getValue() in filter
Change-Id: I4cd1b554be56d4d43db4108925397a8498781491
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx9
-rw-r--r--filter/source/msfilter/escherex.cxx76
-rw-r--r--filter/source/msfilter/eschesdo.cxx17
-rw-r--r--filter/source/msfilter/eschesdo.hxx3
-rw-r--r--filter/source/xsltfilter/OleHandler.cxx2
5 files changed, 54 insertions, 53 deletions
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index 2d364c48e580..c26056804307 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <o3tl/any.hxx>
#include <vcl/bitmapex.hxx>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
@@ -65,7 +68,7 @@ CGMImpressOutAct::CGMImpressOutAct( CGM& rCGM, const uno::Reference< frame::XMod
maXMultiServiceFactory.set( rModel, uno::UNO_QUERY);
if( maXMultiServiceFactory.is() )
{
- maXDrawPage = *static_cast<uno::Reference< drawing::XDrawPage > const *>(maXDrawPages->getByIndex( 0 ).getValue());
+ maXDrawPage = *o3tl::doAccess<uno::Reference<drawing::XDrawPage>>(maXDrawPages->getByIndex( 0 ));
if ( ImplInitPage() )
bStatRet = true;
}
@@ -397,7 +400,7 @@ void CGMImpressOutAct::EndGroup()
uno::Reference< drawing::XShapes > aXShapes = drawing::ShapeCollection::create(comphelper::getProcessComponentContext());
for ( sal_uInt32 i = nFirstIndex; i < nCurrentCount; i++ )
{
- uno::Reference< drawing::XShape > aXShape = *static_cast<uno::Reference< drawing::XShape > const *>(maXShapes->getByIndex( i ).getValue());
+ uno::Reference< drawing::XShape > aXShape = *o3tl::doAccess<uno::Reference<drawing::XShape>>(maXShapes->getByIndex( i ));
if (aXShape.is() )
{
aXShapes->add( aXShape );
@@ -840,7 +843,7 @@ void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFla
{
if ( nFinalTextCount )
{
- uno::Reference< drawing::XShape > aShape = *static_cast<uno::Reference< drawing::XShape > const *>(maXShapes->getByIndex( nFinalTextCount - 1 ).getValue());
+ uno::Reference< drawing::XShape > aShape = *o3tl::doAccess<uno::Reference<drawing::XShape>>(maXShapes->getByIndex( nFinalTextCount - 1 ));
if ( aShape.is() )
{
uno::Reference< text::XText > xText;
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index a926899a8b9a..e4d7c4b26c1c 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -18,6 +18,7 @@
*/
#include "eschesdo.hxx"
+#include <o3tl/any.hxx>
#include <svx/svdxcgv.hxx>
#include <svx/svdomedia.hxx>
#include <svx/xflftrit.hxx>
@@ -437,7 +438,7 @@ void EscherPropertyContainer::CreateGradientProperties(
if (bTransparentGradient && EscherPropertyValueHelper::GetPropertyValue(
aAny, rXPropSet, "FillTransparenceGradient" ) )
{
- pGradient = static_cast<css::awt::Gradient const *>(aAny.getValue());
+ pGradient = o3tl::doAccess<css::awt::Gradient>(aAny);
css::uno::Any aAnyTemp;
const rtl::OUString aPropName( "FillStyle" );
@@ -453,8 +454,8 @@ void EscherPropertyContainer::CreateGradientProperties(
if ( EscherPropertyValueHelper::GetPropertyValue(
aAnyTemp, rXPropSet, "FillColor" ) )
{
- const_cast<css::awt::Gradient *>(pGradient)->StartColor = ImplGetColor( *static_cast<sal_uInt32 const *>(aAnyTemp.getValue()), false );
- const_cast<css::awt::Gradient *>(pGradient)->EndColor = ImplGetColor( *static_cast<sal_uInt32 const *>(aAnyTemp.getValue()), false );
+ const_cast<css::awt::Gradient *>(pGradient)->StartColor = ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAnyTemp), false );
+ const_cast<css::awt::Gradient *>(pGradient)->EndColor = ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAnyTemp), false );
}
}
// gradient and transparency.
@@ -462,7 +463,7 @@ void EscherPropertyContainer::CreateGradientProperties(
{
if ( EscherPropertyValueHelper::GetPropertyValue(
aAny, rXPropSet, "FillGradient" ) )
- pGradient = static_cast<css::awt::Gradient const *>(aAny.getValue());
+ pGradient = o3tl::doAccess<css::awt::Gradient>(aAny);
}
}
@@ -471,7 +472,7 @@ void EscherPropertyContainer::CreateGradientProperties(
else if ( EscherPropertyValueHelper::GetPropertyValue(
aAny, rXPropSet, "FillGradient" ) )
{
- pGradient = static_cast<css::awt::Gradient const *>(aAny.getValue());
+ pGradient = o3tl::doAccess<css::awt::Gradient>(aAny);
}
if ( pGradient )
@@ -540,7 +541,7 @@ void EscherPropertyContainer::CreateGradientProperties(
if (bTransparentGradient && EscherPropertyValueHelper::GetPropertyValue(
aAny, rXPropSet, "FillTransparenceGradient" ) )
{
- pGradient = static_cast<css::awt::Gradient const *>(aAny.getValue());
+ pGradient = o3tl::doAccess<css::awt::Gradient>(aAny);
if ( pGradient )
{
sal_uInt32 nBlue = GetGradientColor( pGradient, nFirstColor ) >> 16;
@@ -622,7 +623,7 @@ void EscherPropertyContainer::CreateFillProperties(
if ( EscherPropertyValueHelper::GetPropertyValue(
aAny, rXPropSet, "FillColor" ) )
{
- sal_uInt32 nFillColor = ImplGetColor( *static_cast<sal_uInt32 const *>(aAny.getValue()) );
+ sal_uInt32 nFillColor = ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny) );
nFillBackColor = nFillColor ^ 0xffffff;
AddOpt( ESCHER_Prop_fillColor, nFillColor );
}
@@ -639,7 +640,7 @@ void EscherPropertyContainer::CreateFillProperties(
{
sal_uInt16 nTransparency = ( EscherPropertyValueHelper::GetPropertyValue(
aAny, rXPropSet, "FillTransparence", true ) )
- ? *static_cast<sal_Int16 const *>(aAny.getValue()) : 0;
+ ? *o3tl::doAccess<sal_Int16>(aAny) : 0;
if ( nTransparency )
AddOpt( ESCHER_Prop_fillOpacity, ( ( 100 - nTransparency ) << 16 ) / 100 );
}
@@ -825,7 +826,7 @@ void EscherPropertyContainer::CreateTextProperties(
{
sal_uInt16 nAngle = EscherPropertyValueHelper::GetPropertyValue(
aAny, rXPropSet, "RotateAngle", true ) ?
- (sal_uInt16)( ( *static_cast<sal_Int32 const *>(aAny.getValue()) ) + 5 ) / 10 : 0;
+ (sal_uInt16)( ( *o3tl::doAccess<sal_Int32>(aAny) ) + 5 ) / 10 : 0;
if (nAngle==900)
{
AddOpt( ESCHER_Prop_txflTextFlow, ESCHER_txflBtoT );
@@ -865,7 +866,7 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart,
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, sLineName ) )
{
- OUString aArrowStartName = *static_cast<OUString const *>(aAny.getValue());
+ OUString aArrowStartName = *o3tl::doAccess<OUString>(aAny);
sal_Int16 nWhich = bLineStart ? XATTR_LINESTART : XATTR_LINEEND;
OUString aApiName = SvxUnogetApiNameForItem(nWhich, aArrowStartName);
@@ -1018,7 +1019,7 @@ void EscherPropertyContainer::CreateLineProperties(
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "LineDash" ) )
{
ESCHER_LineDashing eDash = ESCHER_LineSolid;
- css::drawing::LineDash const * pLineDash = static_cast<css::drawing::LineDash const *>(aAny.getValue());
+ auto pLineDash = o3tl::doAccess<css::drawing::LineDash>(aAny);
sal_Int32 nDistance = pLineDash->Distance << 1;
switch ( pLineDash->Style )
{
@@ -1074,14 +1075,14 @@ void EscherPropertyContainer::CreateLineProperties(
}
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "LineColor" ) )
{
- sal_uInt32 nLineColor = ImplGetColor( *static_cast<sal_uInt32 const *>(aAny.getValue()) );
+ sal_uInt32 nLineColor = ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny) );
AddOpt( ESCHER_Prop_lineColor, nLineColor );
AddOpt( ESCHER_Prop_lineBackColor, nLineColor ^ 0xffffff );
}
}
sal_uInt32 nLineSize = ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "LineWidth" ) )
- ? *static_cast<sal_uInt32 const *>(aAny.getValue()) : 0;
+ ? *o3tl::doAccess<sal_uInt32>(aAny) : 0;
if ( nLineSize > 1 )
AddOpt( ESCHER_Prop_lineWidth, nLineSize * 360 ); // 100TH MM -> PT , 1PT = 12700 EMU
@@ -1441,8 +1442,8 @@ bool EscherPropertyContainer::CreateGraphicProperties(
sal_uInt16 nAngle = 0;
if ( rSource == "MetaFile" )
{
- css::uno::Sequence<sal_Int8> aSeq = *static_cast<css::uno::Sequence<sal_Int8> const *>(aAny.getValue());
- const sal_Int8* pAry = aSeq.getArray();
+ auto & aSeq = *o3tl::doAccess<css::uno::Sequence<sal_Int8>>(aAny);
+ const sal_Int8* pAry = aSeq.getConstArray();
sal_uInt32 nAryLen = aSeq.getLength();
// the metafile is already rotated
@@ -1480,11 +1481,11 @@ bool EscherPropertyContainer::CreateGraphicProperties(
}
else if ( rSource == "FillBitmapURL" )
{
- aGraphicUrl = *static_cast<OUString const *>(aAny.getValue());
+ aGraphicUrl = *o3tl::doAccess<OUString>(aAny);
}
else if ( rSource == "GraphicURL" )
{
- aGraphicUrl = *static_cast<OUString const *>(aAny.getValue());
+ aGraphicUrl = *o3tl::doAccess<OUString>(aAny);
bCreateFillStyles = true;
}
else if ( rSource == "FillHatch" )
@@ -1495,7 +1496,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
Color aBackColor;
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillColor" ) )
{
- aBackColor = ImplGetColor( *static_cast<sal_uInt32 const *>(aAny.getValue()), false );
+ aBackColor = ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny), false );
}
bool bFillBackground = false;
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "FillBackground", true ) )
@@ -1549,7 +1550,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
else
{
nAngle = bRotate && EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "RotateAngle", true )
- ? (sal_uInt16)( ( *static_cast<sal_Int32 const *>(aAny.getValue()) ) + 5 ) / 10
+ ? (sal_uInt16)( ( *o3tl::doAccess<sal_Int32>(aAny) ) + 5 ) / 10
: 0;
}
@@ -1791,8 +1792,8 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Any&
if ( rAny.getValueType() == cppu::UnoType<css::drawing::PolyPolygonBezierCoords>::get())
{
- css::drawing::PolyPolygonBezierCoords const * pSourcePolyPolygon
- = static_cast<css::drawing::PolyPolygonBezierCoords const *>(rAny.getValue());
+ auto pSourcePolyPolygon
+ = o3tl::doAccess<css::drawing::PolyPolygonBezierCoords>(rAny);
sal_uInt16 nOuterSequenceCount = (sal_uInt16)pSourcePolyPolygon->Coordinates.getLength();
// get pointer of inner sequences
@@ -1838,10 +1839,8 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Any&
}
}
}
- else if ( rAny.getValueType() == cppu::UnoType<css::drawing::PointSequenceSequence>::get() )
+ else if ( auto pSourcePolyPolygon = o3tl::tryAccess<css::drawing::PointSequenceSequence>(rAny) )
{
- css::drawing::PointSequenceSequence const * pSourcePolyPolygon
- = static_cast<css::drawing::PointSequenceSequence const *>(rAny.getValue());
sal_uInt16 nOuterSequenceCount = (sal_uInt16)pSourcePolyPolygon->getLength();
// get pointer to inner sequences
@@ -1876,11 +1875,8 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Any&
}
}
}
- else if ( rAny.getValueType() == cppu::UnoType<css::drawing::PointSequence>::get() )
+ else if ( auto pInnerSequence = o3tl::tryAccess<css::drawing::PointSequence>(rAny) )
{
- css::drawing::PointSequence const * pInnerSequence =
- static_cast<css::drawing::PointSequence const *>(rAny.getValue());
-
bNoError = pInnerSequence != nullptr;
if ( bNoError )
{
@@ -2232,10 +2228,10 @@ bool EscherPropertyContainer::CreateConnectorProperties(
aAny >>= eCt;
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgeStartPoint ) )
{
- aStartPoint = *static_cast<css::awt::Point const *>(aAny.getValue());
+ aStartPoint = *o3tl::doAccess<css::awt::Point>(aAny);
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgeEndPoint ) )
{
- aEndPoint = *static_cast<css::awt::Point const *>(aAny.getValue());
+ aEndPoint = *o3tl::doAccess<css::awt::Point>(aAny);
rShapeFlags = SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_HAVESPT | SHAPEFLAG_CONNECTOR;
rGeoRect = css::awt::Rectangle( aStartPoint.X, aStartPoint.Y,
@@ -2348,13 +2344,13 @@ void EscherPropertyContainer::CreateShadowProperties(
{
nShadowFlags |= 2;
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowColor" ) )
- AddOpt( ESCHER_Prop_shadowColor, ImplGetColor( *static_cast<sal_uInt32 const *>(aAny.getValue()) ) );
+ AddOpt( ESCHER_Prop_shadowColor, ImplGetColor( *o3tl::doAccess<sal_uInt32>(aAny) ) );
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowXDistance" ) )
- AddOpt( ESCHER_Prop_shadowOffsetX, *static_cast<sal_Int32 const *>(aAny.getValue()) * 360 );
+ AddOpt( ESCHER_Prop_shadowOffsetX, *o3tl::doAccess<sal_Int32>(aAny) * 360 );
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowYDistance" ) )
- AddOpt( ESCHER_Prop_shadowOffsetY, *static_cast<sal_Int32 const *>(aAny.getValue()) * 360 );
+ AddOpt( ESCHER_Prop_shadowOffsetY, *o3tl::doAccess<sal_Int32>(aAny) * 360 );
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "ShadowTransparence" ) )
- AddOpt( ESCHER_Prop_shadowOpacity, 0x10000 - (((sal_uInt32)*static_cast<sal_uInt16 const *>(aAny.getValue())) * 655 ) );
+ AddOpt( ESCHER_Prop_shadowOpacity, 0x10000 - (((sal_uInt32)*o3tl::doAccess<sal_uInt16>(aAny)) * 655 ) );
}
}
}
@@ -2971,7 +2967,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
uno::Any aFillColor2;
if ( EscherPropertyValueHelper::GetPropertyValue( aFillColor2, aXPropSet, "FillColor2", true ) )
{
- sal_uInt32 nFillColor = ImplGetColor( *static_cast<sal_uInt32 const *>(aFillColor2.getValue()) );
+ sal_uInt32 nFillColor = ImplGetColor( *o3tl::doAccess<sal_uInt32>(aFillColor2) );
AddOpt( DFF_Prop_c3DExtrusionColor, nFillColor );
}
}
@@ -4529,8 +4525,8 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
{
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aPropertySet, "PolyPolygon" ) )
{
- css::drawing::PointSequenceSequence const * pSourcePolyPolygon =
- static_cast<css::drawing::PointSequenceSequence const *>(aAny.getValue());
+ auto pSourcePolyPolygon =
+ o3tl::doAccess<css::drawing::PointSequenceSequence>(aAny);
sal_Int32 nOuterSequenceCount = pSourcePolyPolygon->getLength();
css::drawing::PointSequence const * pOuterSequence = pSourcePolyPolygon->getConstArray();
@@ -4571,8 +4567,8 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
{
if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aPropertySet2, "PolyPolygonBezier" ) )
{
- css::drawing::PolyPolygonBezierCoords const * pSourcePolyPolygon =
- static_cast<css::drawing::PolyPolygonBezierCoords const *>(aAny.getValue());
+ auto pSourcePolyPolygon =
+ o3tl::doAccess<css::drawing::PolyPolygonBezierCoords>(aAny);
sal_Int32 nOuterSequenceCount = pSourcePolyPolygon->Coordinates.getLength();
// Zeiger auf innere sequences holen
@@ -4715,7 +4711,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
aPoly[ 3 ] = Point( aRect.Right(), aCenter.Y() );
sal_Int32 nAngle = ( EscherPropertyValueHelper::GetPropertyValue( aAny, aPropertySet, "RotateAngle", true ) )
- ? *static_cast<sal_Int32 const *>(aAny.getValue()) : 0;
+ ? *o3tl::doAccess<sal_Int32>(aAny) : 0;
if ( nAngle )
aPoly.Rotate( aRect.TopLeft(), (sal_uInt16)( ( nAngle + 5 ) / 10 ) );
nRule = GetClosestPoint( aPoly, aRefPoint );
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 4d2a3099ebad..1cbb28a886b1 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -18,6 +18,7 @@
*/
#include "eschesdo.hxx"
+#include <o3tl/any.hxx>
#include <svx/svdobj.hxx>
#include <svx/unoapi.hxx>
#include <svx/svdoashp.hxx>
@@ -211,8 +212,8 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
for( sal_uInt32 n = 0, nCnt = xXIndexAccess->getCount();
n < nCnt; ++n )
{
- ImplEESdrObject aObj( *this, *static_cast<Reference< XShape > const *>(
- xXIndexAccess->getByIndex( n ).getValue()) );
+ ImplEESdrObject aObj( *this, *o3tl::doAccess<Reference<XShape>>(
+ xXIndexAccess->getByIndex( n )) );
if( aObj.IsValid() )
{
aObj.SetOOXML(bOOxmlExport);
@@ -332,7 +333,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
PolyStyle ePolyKind = PolyStyle();
if ( rObj.ImplGetPropertyValue( OUString( "CircleKind" ) ) )
{
- eCircleKind = *( static_cast<CircleKind const *>(rObj.GetUsrAny().getValue()) );
+ eCircleKind = *o3tl::doAccess<CircleKind>(rObj.GetUsrAny());
switch ( eCircleKind )
{
case CircleKind_SECTION :
@@ -367,10 +368,10 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
sal_Int32 nStartAngle, nEndAngle;
if ( !rObj.ImplGetPropertyValue( OUString( "CircleStartAngle" ) ) )
break;
- nStartAngle = *( static_cast<sal_Int32 const *>(rObj.GetUsrAny().getValue()) );
+ nStartAngle = *o3tl::doAccess<sal_Int32>(rObj.GetUsrAny());
if( !rObj.ImplGetPropertyValue( OUString( "CircleEndAngle" ) ) )
break;
- nEndAngle = *( static_cast<sal_Int32 const *>(rObj.GetUsrAny().getValue()) );
+ nEndAngle = *o3tl::doAccess<sal_Int32>(rObj.GetUsrAny());
Point aStart, aEnd, aCenter;
aStart.X() = (sal_Int32)( ( cos( (double)( nStartAngle *
@@ -653,7 +654,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( USHRT_MAX != mpEscherEx->GetHellLayerId() &&
rObj.ImplGetPropertyValue( OUString( "LayerID" ) ) &&
- (*static_cast<sal_uInt16 const *>(rObj.GetUsrAny().getValue()) ) == mpEscherEx->GetHellLayerId() )
+ *o3tl::doAccess<sal_uInt16>(rObj.GetUsrAny()) == mpEscherEx->GetHellLayerId() )
{
aPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x200020 );
}
@@ -838,8 +839,8 @@ void ImplEESdrWriter::ImplWritePage(
mXStatusIndicator->setValue( nValue );
}
- ImplEESdrObject aObj( *this, *static_cast<Reference< XShape > const *>(
- mXShapes->getByIndex( n ).getValue()) );
+ ImplEESdrObject aObj( *this, *o3tl::doAccess<Reference<XShape>>(
+ mXShapes->getByIndex( n )) );
if( aObj.IsValid() )
{
ImplWriteShape( aObj, rSolverContainer );
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index 448df68982e2..13e37ed6679b 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -19,6 +19,7 @@
#ifndef INCLUDED_FILTER_SOURCE_MSFILTER_ESCHESDO_HXX
#define INCLUDED_FILTER_SOURCE_MSFILTER_ESCHESDO_HXX
#include <filter/msfilter/escherex.hxx>
+#include <o3tl/any.hxx>
#include <svx/unopage.hxx>
#include <vcl/mapmod.hxx>
@@ -57,7 +58,7 @@ public:
bool ImplGetPropertyValue( const OUString& rString ) { return ImplGetPropertyValue(rString.getStr()); }
sal_Int32 ImplGetInt32PropertyValue( const sal_Unicode* pStr )
- { return ImplGetPropertyValue( pStr ) ? *static_cast<sal_Int32 const *>(mAny.getValue()) : 0; }
+ { return ImplGetPropertyValue( pStr ) ? *o3tl::doAccess<sal_Int32>(mAny) : 0; }
sal_Int32 ImplGetInt32PropertyValue( const OUString& rStr )
{ return ImplGetInt32PropertyValue(rStr.getStr()); }
diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index d79cd01713a1..6564d2ea88a9 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -102,7 +102,7 @@ namespace XSLT
return "Not Found:";// + streamName;
}
;
- Reference<XInputStream> subStream(*static_cast<Reference< XInterface > const *>(m_storage->getByName(streamName).getValue()), UNO_QUERY);
+ Reference<XInputStream> subStream(m_storage->getByName(streamName), UNO_QUERY);
if (!subStream.is())
{
return "Not Found:";// + streamName;