summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-11-02 19:39:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-11-02 20:30:29 +0100
commit4d863fd8e38748607636d0033262baa62a3e9eb2 (patch)
treede15f5cd695199cfd56f1893bbb31cf06fc044d1 /oox
parent1a4151dcdf45a0fa946b6ddf5e1b5cca37d24619 (diff)
tdf#54857 elide more dynamic_cast
Change-Id: I42bef355eeef15e3733a5ee57b0569887cfa5e84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142183 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx6
-rw-r--r--oox/source/export/vmlexport.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index e8d5bef246c4..8939a5415683 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3117,7 +3117,7 @@ bool DrawingML::WriteParagraphProperties(const Reference<XTextContent>& rParagra
SvxShapeText* pTextShape = dynamic_cast<SvxShapeText*>(rXShapePropSet.get());
if (pTextShape)
{
- SdrTextObj* pTextObject = dynamic_cast<SdrTextObj*>(pTextShape->GetSdrObject());
+ SdrTextObj* pTextObject = DynCastSdrTextObj(pTextShape->GetSdrObject());
if (pTextObject)
{
const auto nFontScaleY = pTextObject->GetFontScaleY();
@@ -3796,7 +3796,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
SvxShapeText* pTextShape = dynamic_cast<SvxShapeText*>(rXIface.get());
if (pTextShape)
{
- SdrTextObj* pTextObject = dynamic_cast<SdrTextObj*>(pTextShape->GetSdrObject());
+ SdrTextObj* pTextObject = DynCastSdrTextObj(pTextShape->GetSdrObject());
if (pTextObject)
nFontScale = pTextObject->GetFontScaleY() * 1000;
}
@@ -3828,7 +3828,7 @@ void DrawingML::WriteText(const Reference<XInterface>& rXIface, bool bBodyPr, bo
return;
SdrObject* pSdrObject = xShape.is() ? SdrObject::getSdrObjectFromXShape(xShape) : nullptr;
- const SdrTextObj* pTxtObj = dynamic_cast<SdrTextObj*>( pSdrObject );
+ const SdrTextObj* pTxtObj = DynCastSdrTextObj( pSdrObject );
if (pTxtObj && mpTextExport)
{
std::optional<OutlinerParaObject> pParaObj;
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index bda301201ad2..4fa1e6cf7764 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1389,7 +1389,7 @@ sal_Int32 VMLExport::StartShape()
OString const textboxStyle(m_TextboxStyle.makeStringAndClear());
// now check if we have some editeng text (not associated textbox) and we have a text exporter registered
- const SdrTextObj* pTxtObj = dynamic_cast<const SdrTextObj*>( m_pSdrObject );
+ const SdrTextObj* pTxtObj = DynCastSdrTextObj( m_pSdrObject );
if (pTxtObj && m_pTextExport && msfilter::util::HasTextBoxContent(m_nShapeType) && !IsWaterMarkShape(m_pSdrObject->GetName()) && !lcl_isTextBox(m_pSdrObject))
{
std::optional<OutlinerParaObject> pParaObj;