From 32eac27a2c22aae63941479482ef21e8d75a5122 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 21 Sep 2018 17:09:42 +0100 Subject: weld AlignmentTabPage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I253a01b053efe836b0657f9a711cecd060b6782b Reviewed-on: https://gerrit.libreoffice.org/60883 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- include/svtools/valueset.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/svtools') diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 6804a9622c90..7bd827eca220 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -421,6 +421,7 @@ private: long mnUserItemWidth; long mnUserItemHeight; sal_uInt16 mnSelItemId; + int mnSavedItemId; sal_uInt16 mnHighItemId; sal_uInt16 mnCols; sal_uInt16 mnCurCol; @@ -581,6 +582,17 @@ public: return mbEdgeBlending; } void SetEdgeBlending(bool bNew); + + void SaveValue() + { + mnSavedItemId = IsNoSelection() ? -1 : GetSelectedItemId(); + } + + bool IsValueChangedFromSaved() const + { + int nItemId = IsNoSelection() ? -1 : GetSelectedItemId(); + return mnSavedItemId != nItemId; + } }; -- cgit