summaryrefslogtreecommitdiff
path: root/svx/source/accessibility
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-20 13:30:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-20 17:59:20 +0200
commitf44bd7bb0ce23535f5e0ced7966677f4fff943fc (patch)
tree4e1801a7713e31b2b0f8f9d4fd586d5873511d2e /svx/source/accessibility
parentb1ef3c043d66e7cd529fc4fb13a3d2e8fdb4f2ee (diff)
loplugin:referencecasting in svx
Change-Id: I2f6bc2467fa7689d186bc2bc45d2071ea0a38e63 Reviewed-on: https://gerrit.libreoffice.org/75998 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/accessibility')
-rw-r--r--svx/source/accessibility/AccessibleControlShape.cxx10
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx7
-rw-r--r--svx/source/accessibility/ShapeTypeHandler.cxx15
3 files changed, 13 insertions, 19 deletions
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 8b7de6c3a3bd..4c4c87601a3b 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -313,9 +313,8 @@ OUString AccessibleControlShape::CreateAccessibleBaseName()
break;
default:
sName = "UnknownAccessibleControlShape";
- Reference< XShapeDescriptor > xDescriptor (mxShape, UNO_QUERY);
- if (xDescriptor.is())
- sName += ": " + xDescriptor->getShapeType();
+ if (mxShape.is())
+ sName += ": " + mxShape->getShapeType();
}
return sName;
@@ -345,11 +344,10 @@ OUString
default:
aDG.Initialize ("Unknown accessible control shape");
- Reference< XShapeDescriptor > xDescriptor (mxShape, UNO_QUERY);
- if (xDescriptor.is())
+ if (mxShape.is())
{
aDG.AppendString ("service name=");
- aDG.AppendString (xDescriptor->getShapeType());
+ aDG.AppendString (mxShape->getShapeType());
}
}
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index bdd5bfaeca33..e08a5c2b0a6e 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -305,10 +305,9 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes (
}
// Add the visible shapes for which only the XShapes exist.
- uno::Reference<container::XIndexAccess> xShapeAccess (mxShapeList, uno::UNO_QUERY);
- if (xShapeAccess.is())
+ if (mxShapeList.is())
{
- sal_Int32 nShapeCount = xShapeAccess->getCount();
+ sal_Int32 nShapeCount = mxShapeList->getCount();
raDescriptorList.reserve( nShapeCount );
awt::Point aPos;
awt::Size aSize;
@@ -316,7 +315,7 @@ void ChildrenManagerImpl::CreateListOfVisibleShapes (
uno::Reference<drawing::XShape> xShape;
for (sal_Int32 i=0; i<nShapeCount; ++i)
{
- xShapeAccess->getByIndex(i) >>= xShape;
+ mxShapeList->getByIndex(i) >>= xShape;
aPos = xShape->getPosition();
aSize = xShape->getSize();
diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index b00fe30c8e3b..ac830cd7b05c 100644
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -94,9 +94,8 @@ ShapeTypeId ShapeTypeHandler::GetTypeId (const OUString& aServiceName) const
*/
ShapeTypeId ShapeTypeHandler::GetTypeId (const uno::Reference<drawing::XShape>& rxShape) const
{
- uno::Reference<drawing::XShapeDescriptor> xDescriptor (rxShape, uno::UNO_QUERY);
- if (xDescriptor.is())
- return GetTypeId (xDescriptor->getShapeType());
+ if (rxShape.is())
+ return GetTypeId (rxShape->getShapeType());
else
return -1;
}
@@ -185,9 +184,8 @@ long ShapeTypeHandler::GetSlotId (const OUString& aServiceName) const
// method.
long ShapeTypeHandler::GetSlotId (const uno::Reference<drawing::XShape>& rxShape) const
{
- uno::Reference<drawing::XShapeDescriptor> xDescriptor (rxShape, uno::UNO_QUERY);
- if (xDescriptor.is())
- return GetSlotId (xDescriptor->getShapeType());
+ if (rxShape.is())
+ return GetSlotId (rxShape->getShapeType());
else
return 0;
}
@@ -292,9 +290,8 @@ OUString ShapeTypeHandler::CreateAccessibleBaseName (const uno::Reference<drawin
default:
pResourceId = nullptr;
sName = "UnknownAccessibleShape";
- uno::Reference<drawing::XShapeDescriptor> xDescriptor (rxShape, uno::UNO_QUERY);
- if (xDescriptor.is())
- sName += ": " + xDescriptor->getShapeType();
+ if (rxShape.is())
+ sName += ": " + rxShape->getShapeType();
break;
}