summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2024-03-13 07:35:09 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-03-13 22:11:40 +0100
commitaba13d6b4b2d586b356e7b98a23a7796e30c37ec (patch)
tree3a1ee26fb59e409c99d0e0c07c3db6c96ac379a4 /svx
parent98b06ed3583fcc1f720ceb919cdd57ede7952a71 (diff)
tdf#152878 switch off replacment image in picture frame
RTF documents may contain shapes of the type "Picture frame" ({\sn shapeType}{\sv 75}) that are imported as SdrGraphObj This change prevents the display of a replacement picture if there is no picture set. Change-Id: Ia3a576ddcb2a3bbffae859102d274d4ecd214f6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164755 Tested-by: Jenkins Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/unoshap2.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index c583bbb7111c..1c286966c2ef 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1217,6 +1217,8 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
bOk = true;
}
}
+ if (bOk)
+ GetSdrObject()->SetEmptyPresObj(false);
break;
}
@@ -1232,6 +1234,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
if( HasSdrObject() )
{
static_cast<SdrGrafObj*>(GetSdrObject())->SetGrafStreamURL( aStreamURL );
+ GetSdrObject()->SetEmptyPresObj(false);
}
bOk = true;
}
@@ -1264,6 +1267,8 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
}
}
}
+ if (bOk)
+ GetSdrObject()->SetEmptyPresObj(false);
break;
}
@@ -1273,6 +1278,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
if( xGraphic.is() )
{
static_cast< SdrGrafObj*>( GetSdrObject() )->SetGraphic( xGraphic );
+ GetSdrObject()->SetEmptyPresObj(false);
bOk = true;
}
break;
@@ -1377,6 +1383,17 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
break;
}
+ case OWN_ATTR_OBJ_ISEMPTYPRESOBJ:
+ {
+ bool bIsEmptyPresObj;
+ if (rValue >>= bIsEmptyPresObj)
+ {
+ GetSdrObject()->SetEmptyPresObj(bIsEmptyPresObj);
+ bOk = true;
+ }
+ break;
+ }
+
case OWN_ATTR_SIGNATURELINE_IS_SIGNED:
{
bool bIsSigned;
@@ -1542,6 +1559,12 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte
break;
}
+ case OWN_ATTR_OBJ_ISEMPTYPRESOBJ:
+ {
+ rValue <<= GetSdrObject()->IsEmptyPresObj();
+ break;
+ }
+
case OWN_ATTR_QRCODE:
{
css::drawing::BarCode* ptr = static_cast<SdrGrafObj*>(GetSdrObject())->getQrCode();