summaryrefslogtreecommitdiffstats
path: root/svx/source/svdraw/svdpagv.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:54 +0000
commitadb203bc05e3e36173cbd46b9951f79821a81799 (patch)
tree6e6739df9b3f0a567330a0dd7ee0e03ae70876a3 /svx/source/svdraw/svdpagv.cxx
parentAdding debian version 4:24.2.0-3. (diff)
downloadlibreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.tar.xz
libreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.zip
Merging upstream version 4:24.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'svx/source/svdraw/svdpagv.cxx')
-rw-r--r--svx/source/svdraw/svdpagv.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 86210865e7..4e5d7a4728 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -557,15 +557,22 @@ void SdrPageView::AdjHdl()
GetView().AdjustMarkHdl();
}
-void SdrPageView::SetLayer(const OUString& rName, SdrLayerIDSet& rBS, bool bJa)
+// return true if changed, false if unchanged
+bool SdrPageView::SetLayer(const OUString& rName, SdrLayerIDSet& rBS, bool bJa)
{
- if(!GetPage())
- return;
+ if (!GetPage())
+ return false;
SdrLayerID nID = GetPage()->GetLayerAdmin().GetLayerID(rName);
- if(SDRLAYER_NOTFOUND != nID)
- rBS.Set(nID, bJa);
+ if (SDRLAYER_NOTFOUND == nID)
+ return false;
+
+ if (rBS.IsSet(nID) == bJa)
+ return false;
+
+ rBS.Set(nID, bJa);
+ return true;
}
bool SdrPageView::IsLayer(const OUString& rName, const SdrLayerIDSet& rBS) const