summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-08-14 22:24:37 +0200
committerJan Holesovsky <kendy@collabora.com>2014-08-14 22:25:52 +0200
commit8e8383612e2cf860acfc0fd3f5620da55d4ef35a (patch)
treedacac0b12e1917c41ba99eaca2de944c1dfff341 /svx/source
parent3e46f2c5a03134b0e819fad98e31b4a7e9925c33 (diff)
Go even further in the scope reduction, we are 100% sure mpClone is NULL.
Change-Id: Id5facbc817ecc0b89689dcba30672a6538e70945
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svddrgmt.cxx27
1 files changed, 12 insertions, 15 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index b28c8a90b0f4..c3d7f9791190 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1349,23 +1349,20 @@ void SdrDragObjOwn::MoveSdrDrag(const Point& rNoSnapPnt)
}
// create a new clone and modify to current drag state
- if(!mpClone)
- {
- mpClone = pObj->getFullDragClone();
- mpClone->applySpecialDrag(DragStat());
+ mpClone = pObj->getFullDragClone();
+ mpClone->applySpecialDrag(DragStat());
- // #120999# AutoGrowWidth may change for SdrTextObj due to the automatism used
- // with bDisableAutoWidthOnDragging, so not only geometry changes but
- // also this (pretty indirect) property change is possible. If it gets
- // changed, it needs to be copied to the original since nothing will
- // happen when it only changes in the drag clone
- const bool bOldAutoGrowWidth(((SdrOnOffItem&)pObj->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
- const bool bNewAutoGrowWidth(((SdrOnOffItem&)mpClone->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
+ // #120999# AutoGrowWidth may change for SdrTextObj due to the automatism used
+ // with bDisableAutoWidthOnDragging, so not only geometry changes but
+ // also this (pretty indirect) property change is possible. If it gets
+ // changed, it needs to be copied to the original since nothing will
+ // happen when it only changes in the drag clone
+ const bool bOldAutoGrowWidth(((SdrOnOffItem&)pObj->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
+ const bool bNewAutoGrowWidth(((SdrOnOffItem&)mpClone->GetMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH)).GetValue());
- if(bOldAutoGrowWidth != bNewAutoGrowWidth)
- {
- GetDragObj()->SetMergedItem(makeSdrTextAutoGrowWidthItem(bNewAutoGrowWidth));
- }
+ if (bOldAutoGrowWidth != bNewAutoGrowWidth)
+ {
+ GetDragObj()->SetMergedItem(makeSdrTextAutoGrowWidthItem(bNewAutoGrowWidth));
}
Show();