summaryrefslogtreecommitdiffstats
path: root/svx/source/svdraw/svdpagv.cxx
diff options
context:
space:
mode:
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