Kaydet (Commit) 63577383 authored tarafından Noel Grandin's avatar Noel Grandin

no need for the ImplGetPropertyValue(sal_Unicode*) overload

and no need to convert backwards and forwards between sal_Unicode* and
OUString

Change-Id: I417f5a59d58f80a41f877f8397bf2985dd08fa62
Reviewed-on: https://gerrit.libreoffice.org/38125Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ca145c73
...@@ -224,7 +224,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ...@@ -224,7 +224,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
} }
rObj.SetAngle( rObj.ImplGetInt32PropertyValue( OUString( "RotateAngle" ) )); rObj.SetAngle( rObj.ImplGetInt32PropertyValue( OUString( "RotateAngle" ) ));
if( ( rObj.ImplGetPropertyValue( OUString( "IsFontwork" ) ) && if( ( rObj.ImplGetPropertyValue( "IsFontwork" ) &&
::cppu::any2bool( rObj.GetUsrAny() ) ) || ::cppu::any2bool( rObj.GetUsrAny() ) ) ||
rObj.GetType() == "drawing.Measure" ) rObj.GetType() == "drawing.Measure" )
{ {
...@@ -328,7 +328,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ...@@ -328,7 +328,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
{ {
CircleKind eCircleKind = CircleKind_FULL; CircleKind eCircleKind = CircleKind_FULL;
PolyStyle ePolyKind = PolyStyle(); PolyStyle ePolyKind = PolyStyle();
if ( rObj.ImplGetPropertyValue( OUString( "CircleKind" ) ) ) if ( rObj.ImplGetPropertyValue( "CircleKind" ) )
{ {
eCircleKind = *o3tl::doAccess<CircleKind>(rObj.GetUsrAny()); eCircleKind = *o3tl::doAccess<CircleKind>(rObj.GetUsrAny());
switch ( eCircleKind ) switch ( eCircleKind )
...@@ -363,10 +363,10 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ...@@ -363,10 +363,10 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
else else
{ {
sal_Int32 nStartAngle, nEndAngle; sal_Int32 nStartAngle, nEndAngle;
if ( !rObj.ImplGetPropertyValue( OUString( "CircleStartAngle" ) ) ) if ( !rObj.ImplGetPropertyValue( "CircleStartAngle" ) )
break; break;
nStartAngle = *o3tl::doAccess<sal_Int32>(rObj.GetUsrAny()); nStartAngle = *o3tl::doAccess<sal_Int32>(rObj.GetUsrAny());
if( !rObj.ImplGetPropertyValue( OUString( "CircleEndAngle" ) ) ) if( !rObj.ImplGetPropertyValue( "CircleEndAngle" ) )
break; break;
nEndAngle = *o3tl::doAccess<sal_Int32>(rObj.GetUsrAny()); nEndAngle = *o3tl::doAccess<sal_Int32>(rObj.GetUsrAny());
...@@ -614,7 +614,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ...@@ -614,7 +614,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
'D' == rObj.GetType()[9] ) // drawing.3D 'D' == rObj.GetType()[9] ) // drawing.3D
{ {
// SceneObject, CubeObject, SphereObject, LatheObject, ExtrudeObject, PolygonObject // SceneObject, CubeObject, SphereObject, LatheObject, ExtrudeObject, PolygonObject
if ( !rObj.ImplGetPropertyValue( OUString( "Bitmap" ) ) ) if ( !rObj.ImplGetPropertyValue( "Bitmap" ) )
break; break;
mpEscherEx->OpenContainer( ESCHER_SpContainer ); mpEscherEx->OpenContainer( ESCHER_SpContainer );
...@@ -646,7 +646,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, ...@@ -646,7 +646,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
aPropOpt.CreateShadowProperties( rObj.mXPropSet ); aPropOpt.CreateShadowProperties( rObj.mXPropSet );
if( SDRLAYER_NOTFOUND != mpEscherEx->GetHellLayerId() && if( SDRLAYER_NOTFOUND != mpEscherEx->GetHellLayerId() &&
rObj.ImplGetPropertyValue( OUString( "LayerID" ) ) && rObj.ImplGetPropertyValue( "LayerID" ) &&
*o3tl::doAccess<sal_uInt16>(rObj.GetUsrAny()) == sal_uInt8(mpEscherEx->GetHellLayerId()) ) *o3tl::doAccess<sal_uInt16>(rObj.GetUsrAny()) == sal_uInt8(mpEscherEx->GetHellLayerId()) )
{ {
aPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x200020 ); aPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x200020 );
...@@ -1161,17 +1161,17 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx ) ...@@ -1161,17 +1161,17 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
SetRect(rEx.ImplMapPoint(aOldP), rEx.ImplMapSize(aOldS)); SetRect(rEx.ImplMapPoint(aOldP), rEx.ImplMapSize(aOldS));
} }
if( ImplGetPropertyValue( OUString("IsPresentationObject")) ) if( ImplGetPropertyValue( "IsPresentationObject" ) )
mbPresObj = ::cppu::any2bool( mAny ); mbPresObj = ::cppu::any2bool( mAny );
if( mbPresObj && ImplGetPropertyValue( OUString("IsEmptyPresentationObject") ) ) if( mbPresObj && ImplGetPropertyValue( "IsEmptyPresentationObject" ) )
mbEmptyPresObj = ::cppu::any2bool( mAny ); mbEmptyPresObj = ::cppu::any2bool( mAny );
mbValid = true; mbValid = true;
} }
} }
bool ImplEESdrObject::ImplGetPropertyValue( const sal_Unicode* rString ) bool ImplEESdrObject::ImplGetPropertyValue( const OUString& rString )
{ {
bool bRetValue = false; bool bRetValue = false;
if( mbValid ) if( mbValid )
......
...@@ -54,8 +54,7 @@ public: ...@@ -54,8 +54,7 @@ public:
ImplEESdrObject( ImplEESdrWriter& rEx, const css::uno::Reference< css::drawing::XShape >& rShape ); ImplEESdrObject( ImplEESdrWriter& rEx, const css::uno::Reference< css::drawing::XShape >& rShape );
~ImplEESdrObject(); ~ImplEESdrObject();
bool ImplGetPropertyValue( const sal_Unicode* pString ); bool ImplGetPropertyValue( const OUString& rString );
bool ImplGetPropertyValue( const OUString& rString ) { return ImplGetPropertyValue(rString.getStr()); }
sal_Int32 ImplGetInt32PropertyValue( const sal_Unicode* pStr ) sal_Int32 ImplGetInt32PropertyValue( const sal_Unicode* pStr )
{ return ImplGetPropertyValue( pStr ) ? *o3tl::doAccess<sal_Int32>(mAny) : 0; } { return ImplGetPropertyValue( pStr ) ? *o3tl::doAccess<sal_Int32>(mAny) : 0; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment