summaryrefslogtreecommitdiffstats
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx8
-rw-r--r--svx/source/sdr/properties/textproperties.cxx60
-rw-r--r--svx/source/svdraw/svdpntv.cxx7
3 files changed, 41 insertions, 34 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index a401246277..2a2d049e18 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -838,6 +838,14 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject(
basegfx::B3DVector aLight2Vector(aSecondLightDirection.DirectionX, -aSecondLightDirection.DirectionY, aSecondLightDirection.DirectionZ);
aLight2Vector.normalize();
+ // tdf#160421 a single flip inverts the light directions currently (March 2024). So invert
+ // their directions here for rendering.
+ if (bIsMirroredX != bIsMirroredY)
+ {
+ aLight1Vector *= -1.0;
+ aLight2Vector *= -1.0;
+ }
+
// Light Intensity
// For "FirstLight" the 3D-Scene light "1" is regularly used. In case of surface "Matte"
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index 55b366bdc0..17f63d044d 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -554,50 +554,44 @@ namespace sdr::properties
if(!rObj.HasText())
return;
+ SfxHintId nId(rHint.GetId());
const svx::ITextProvider& rTextProvider(getTextProvider());
- if(dynamic_cast<const SfxStyleSheet *>(&rBC) != nullptr)
- {
- SfxHintId nId(rHint.GetId());
- if(SfxHintId::DataChanged == nId)
+ if(SfxHintId::DataChanged == nId && dynamic_cast<const SfxStyleSheet *>(&rBC) != nullptr)
+ {
+ sal_Int32 nText = rTextProvider.getTextCount();
+ while (nText--)
{
- sal_Int32 nText = rTextProvider.getTextCount();
- while (nText--)
- {
- OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
- if( pParaObj )
- pParaObj->ClearPortionInfo();
- }
- rObj.SetTextSizeDirty();
-
- if(rObj.IsTextFrame() && rObj.NbcAdjustTextFrameWidthAndHeight())
- {
- // here only repaint wanted
- rObj.ActionChanged();
- //rObj.BroadcastObjectChange();
- }
+ OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
+ if( pParaObj )
+ pParaObj->ClearPortionInfo();
+ }
+ rObj.SetTextSizeDirty();
- // #i101556# content of StyleSheet has changed -> new version
- maVersion++;
+ if(rObj.IsTextFrame() && rObj.NbcAdjustTextFrameWidthAndHeight())
+ {
+ // here only repaint wanted
+ rObj.ActionChanged();
+ //rObj.BroadcastObjectChange();
}
- if(SfxHintId::Dying == nId)
+ // #i101556# content of StyleSheet has changed -> new version
+ maVersion++;
+ }
+ else if(SfxHintId::Dying == nId && dynamic_cast<const SfxStyleSheet *>(&rBC) != nullptr)
+ {
+ sal_Int32 nText = rTextProvider.getTextCount();
+ while (nText--)
{
- sal_Int32 nText = rTextProvider.getTextCount();
- while (nText--)
- {
- OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
- if( pParaObj )
- pParaObj->ClearPortionInfo();
- }
+ OutlinerParaObject* pParaObj = rTextProvider.getText( nText )->GetOutlinerParaObject();
+ if( pParaObj )
+ pParaObj->ClearPortionInfo();
}
}
- else if(dynamic_cast<const SfxStyleSheetBasePool *>(&rBC) != nullptr)
+ else if (nId == SfxHintId::StyleSheetModified && dynamic_cast<const SfxStyleSheetBasePool *>(&rBC) != nullptr)
{
const SfxStyleSheetModifiedHint* pExtendedHint = dynamic_cast<const SfxStyleSheetModifiedHint*>(&rHint);
-
- if(pExtendedHint
- && SfxHintId::StyleSheetModified == pExtendedHint->GetId())
+ if (pExtendedHint)
{
const OUString& aOldName(pExtendedHint->GetOldName());
OUString aNewName(pExtendedHint->GetStyleSheet()->GetName());
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index f092887250..780227f4a1 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -858,7 +858,12 @@ void SdrPaintView::InvalidateAllWin(const tools::Rectangle& rRect)
void SdrPaintView::InvalidateOneWin(OutputDevice& rDevice)
{
// do not erase background, that causes flicker (!)
- rDevice.GetOwnerWindow()->Invalidate(InvalidateFlags::NoErase);
+ // tdf#160444 check device's owner window is a nullptr
+ // Since commit 563f7077f1dbce31ff95ee8d2e8d17b629693db1, the
+ // device's owner window gets deleted before this object is
+ // deleted.
+ if (rDevice.GetOwnerWindow())
+ rDevice.GetOwnerWindow()->Invalidate(InvalidateFlags::NoErase);
}
void SdrPaintView::InvalidateOneWin(OutputDevice& rDevice, const tools::Rectangle& rRect)