tdf#129300 If it would create no change, don't force it
otherwise a bogus "change" from the parent style is shown in the organizer
this dates to...
commit 755ad6834625488c5d31d4bacc9370eae7ffd8f3
Date: Tue Oct 5 11:15:56 2010 -0400
Ported calc-distributed-cell-text-*.diff from ooo-build.
Change-Id: I49fc654a232d3c0f43f8add9a9f9fee34a6c5add
Reviewed-on: https://gerrit.libreoffice.org/84895
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index e79a396..cdd87f0 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -90,6 +90,11 @@ void lcl_SetJustifyMethodToItemSet(SfxItemSet& rSet, sal_uInt16 nWhichJM, const
if (rLB.get_active() == nListPos)
eJM = SvxCellJustifyMethod::Distribute;
// tdf#129300 If it would create no change, don't force it
const SvxJustifyMethodItem& rOldItem = static_cast<const SvxJustifyMethodItem&>(rSet.Get(nWhichJM));
if (rOldItem.GetValue() == eJM)
return;
SvxJustifyMethodItem aItem(eJM, nWhichJM);
rSet.Put(aItem);
}