[Libreoffice-commits] core.git: svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 9 07:27:27 UTC 2018
svx/source/svdraw/svdedtv1.cxx | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
New commits:
commit 9d93e030288aaa721761cb7991d1afdde6335777
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Nov 8 12:20:08 2018 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Nov 9 08:24:18 2018 +0100
tdf#121116: don't adapt start/end widths if they are set explicitly
after commit b8fe3f84a60ea73aed9748844aee80441eb0fc7d
Related: #i122121# moved automatic StartEnd adaption to svx
Change-Id: Ic4639834ffa55d110f232fbad5f140a8e76df3e9
Reviewed-on: https://gerrit.libreoffice.org/63071
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 433fbef97928..c7b8bf1de5c8 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1016,12 +1016,16 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
// #i38135#
bool bResetAnimationTimer(false);
+ const bool bLineStartWidthExplicitChange(SfxItemState::SET
+ == aAttr.GetItemState(XATTR_LINESTARTWIDTH));
+ const bool bLineEndWidthExplicitChange(SfxItemState::SET
+ == aAttr.GetItemState(XATTR_LINEENDWIDTH));
// check if LineWidth is part of the change
- const bool bLineWidthChange(SfxItemState::SET == aAttr.GetItemState(XATTR_LINEWIDTH));
+ const bool bAdaptStartEndWidths(!(bLineStartWidthExplicitChange && bLineEndWidthExplicitChange)
+ && SfxItemState::SET == aAttr.GetItemState(XATTR_LINEWIDTH));
sal_Int32 nNewLineWidth(0);
- sal_Int32 nOldLineWidth(0);
- if(bLineWidthChange)
+ if(bAdaptStartEndWidths)
{
nNewLineWidth = aAttr.Get(XATTR_LINEWIDTH).GetValue();
}
@@ -1067,7 +1071,8 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(pObj));
}
- if(bLineWidthChange)
+ sal_Int32 nOldLineWidth(0);
+ if (bAdaptStartEndWidths)
{
nOldLineWidth = pObj->GetMergedItem(XATTR_LINEWIDTH).GetValue();
}
@@ -1075,7 +1080,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
// set attributes at object
pObj->SetMergedItemSetAndBroadcast(aAttr, bReplaceAll);
- if(bLineWidthChange)
+ if(bAdaptStartEndWidths)
{
const SfxItemSet& rSet = pObj->GetMergedItemSet();
More information about the Libreoffice-commits
mailing list