summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-08-19 09:10:42 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-08-19 09:31:06 +0200
commit0e16b40d8b68f73731b4aa9059d0f98d0489fed0 (patch)
tree73092889efb0e57cdc180025503e863f26c6ebfe /oox
parent69f4abe1248f9919f242920b463c4d5f4965211f (diff)
Drop GetSdrObjectFromXShape and use SdrObject::getSdrObjectFromXShape
Change-Id: I0d233878ee49fcdc1338ec3bd700e5482d558163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120694 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx2
-rw-r--r--oox/source/export/drawingml.cxx10
-rw-r--r--oox/source/export/shapes.cxx6
-rw-r--r--oox/source/vml/vmlshape.cxx6
4 files changed, 12 insertions, 12 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index b1567e09ef33..b4079c7b6831 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1695,7 +1695,7 @@ void Shape::keepDiagramCompatibilityInfo()
if (mpDiagramData)
{
- if (SdrObject* pObj = GetSdrObjectFromXShape(mxShape))
+ if (SdrObject* pObj = SdrObject::getSdrObjectFromXShape(mxShape))
pObj->SetDiagramData(mpDiagramData);
}
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index ebcc11ceae3a..e9492fde0b48 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1293,7 +1293,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia,
void DrawingML::WriteMediaNonVisualProperties(const css::uno::Reference<css::drawing::XShape>& xShape)
{
- SdrMediaObj* pMediaObj = dynamic_cast<SdrMediaObj*>(GetSdrObjectFromXShape(xShape));
+ SdrMediaObj* pMediaObj = dynamic_cast<SdrMediaObj*>(SdrObject::getSdrObjectFromXShape(xShape));
if (!pMediaObj)
return;
@@ -1718,7 +1718,7 @@ namespace
{
bool IsTopGroupObj(const uno::Reference<drawing::XShape>& xShape)
{
- SdrObject* pObject = GetSdrObjectFromXShape(xShape);
+ SdrObject* pObject = SdrObject::getSdrObjectFromXShape(xShape);
if (!pObject)
return false;
@@ -1795,7 +1795,7 @@ void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sa
aSize.Height = 1000;
if (!bSuppressRotation)
{
- SdrObject* pShape = GetSdrObjectFromXShape( rXShape );
+ SdrObject* pShape = SdrObject::getSdrObjectFromXShape(rXShape);
nRotation = pShape ? pShape->GetRotateAngle() : 0_deg100;
if ( GetDocumentType() != DOCUMENT_DOCX )
{
@@ -3401,7 +3401,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
// tdf#112312: only custom shapes obey the TextAutoGrowHeight option
bool bTextAutoGrowHeight = false;
uno::Reference<drawing::XShape> xShape(rXIface, uno::UNO_QUERY);
- auto pSdrObjCustomShape = xShape.is() ? dynamic_cast<SdrObjCustomShape*>(GetSdrObjectFromXShape(xShape)) : nullptr;
+ auto pSdrObjCustomShape = xShape.is() ? dynamic_cast<SdrObjCustomShape*>(SdrObject::getSdrObjectFromXShape(xShape)) : nullptr;
if (pSdrObjCustomShape && GetProperty(rXPropSet, "TextAutoGrowHeight"))
{
mAny >>= bTextAutoGrowHeight;
@@ -3453,7 +3453,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
return;
uno::Reference<drawing::XShape> xShape(rXIface, uno::UNO_QUERY);
- SdrObject* pSdrObject = xShape.is() ? GetSdrObjectFromXShape(xShape) : nullptr;
+ SdrObject* pSdrObject = xShape.is() ? SdrObject::getSdrObjectFromXShape(xShape) : nullptr;
const SdrTextObj* pTxtObj = dynamic_cast<SdrTextObj*>( pSdrObject );
if (pTxtObj && mpTextExport)
{
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index c53cc494b594..3d03af800a13 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -730,8 +730,8 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
ShapeFlag nMirrorFlags = ShapeFlag::NONE;
MSO_SPT eShapeType = EscherPropertyContainer::GetCustomShapeType( xShape, nMirrorFlags, sShapeType );
- OSL_ENSURE(nullptr != dynamic_cast< SdrObjCustomShape* >(GetSdrObjectFromXShape(xShape)), "Not a SdrObjCustomShape (!)");
- SdrObjCustomShape& rSdrObjCustomShape(static_cast< SdrObjCustomShape& >(*GetSdrObjectFromXShape(xShape)));
+ OSL_ENSURE(nullptr != dynamic_cast< SdrObjCustomShape* >(SdrObject::getSdrObjectFromXShape(xShape)), "Not a SdrObjCustomShape (!)");
+ SdrObjCustomShape& rSdrObjCustomShape(static_cast< SdrObjCustomShape& >(*SdrObject::getSdrObjectFromXShape(xShape)));
const bool bIsDefaultObject(
EscherPropertyContainer::IsDefaultObject(
rSdrObjCustomShape,
@@ -2184,7 +2184,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
mpFS->singleElementNS( mnXmlNamespace, XML_embed );
// pic element
- SdrObject* pSdrOLE2( GetSdrObjectFromXShape( xShape ) );
+ SdrObject* pSdrOLE2(SdrObject::getSdrObjectFromXShape(xShape));
// The spec doesn't allow <p:pic> here, but PowerPoint requires it.
bool bEcma = mpFB->getVersion() == oox::core::ECMA_DIALECT;
if (bEcma)
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 8da6af119df1..2e2abfd5c32b 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -707,7 +707,7 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
}
Reference< XShape > xShape = mrDrawing.createAndInsertXShape( maService, rxShapes, aShapeRect );
- SdrObject* pShape = GetSdrObjectFromXShape( xShape );
+ SdrObject* pShape = SdrObject::getSdrObjectFromXShape(xShape);
if( pShape && getShapeType() >= 0 )
{
OUString aShapeType = EnhancedCustomShapeTypeNames::Get( static_cast< MSO_SPT >(getShapeType()) );
@@ -1074,7 +1074,7 @@ namespace
{
if (!rTypeModel.maFlip.isEmpty())
{
- if (SdrObject* pShape = GetSdrObjectFromXShape(rxShape))
+ if (SdrObject* pShape = SdrObject::getSdrObjectFromXShape(rxShape))
{
if (rTypeModel.maFlip.startsWith("x"))
doMirrorX(pShape);
@@ -1088,7 +1088,7 @@ namespace
{
if (!rTypeModel.maRotation.isEmpty())
{
- if (SdrObject* pShape = GetSdrObjectFromXShape(rxShape))
+ if (SdrObject* pShape = SdrObject::getSdrObjectFromXShape(rxShape))
{
// The needed factor -1 for opposite direction and factor 100 for Degree100 is
// contained in method decodeRotation().