summaryrefslogtreecommitdiff
path: root/svx/source/form/fmobj.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-01-22 14:14:15 +0000
committerOliver Bolte <obo@openoffice.org>2007-01-22 14:14:15 +0000
commit8f931a38eef29234077cc626f9ef494b8024fee4 (patch)
treeb177d18051da6db8c1e79301d664684903396c4f /svx/source/form/fmobj.cxx
parent38f09ed43f38f5648adbc73a635ae354e0749f90 (diff)
INTEGRATION: CWS aw039 (1.20.40); FILE MERGED
2006/12/18 11:54:30 aw 1.20.40.1: #i72535# corrected layer getting/setting for FmFormObjs again
Diffstat (limited to 'svx/source/form/fmobj.cxx')
-rw-r--r--svx/source/form/fmobj.cxx35
1 files changed, 13 insertions, 22 deletions
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index cb45bdbf2838..e148bc37b8d2 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: fmobj.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: vg $ $Date: 2006-11-23 10:12:23 $
+ * last change: $Author: obo $ $Date: 2007-01-22 15:14:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -630,30 +630,21 @@ sal_Int32 FmFormObj::getType() const
SdrLayerID FmFormObj::GetLayer() const
{
- if(GetPage())
- {
- // use the SdrLayerAdmin from the page, it's parent is the model one
- const SdrLayerAdmin& rAdmin(GetPage()->GetLayerAdmin());
- return rAdmin.GetLayerID(rAdmin.GetControlLayerName(), TRUE);
- }
- else if(GetModel())
- {
- // use the SdrLayerAdmin from the model. No parents to visit.
- const SdrLayerAdmin& rAdmin(GetModel()->GetLayerAdmin());
- return rAdmin.GetLayerID(rAdmin.GetControlLayerName(), FALSE);
- }
-
- // return parent's knowledge when no page and no model. Without page and model
- // there is no SdrLayerAdmin for this object anyways, so return member.
+ // #i72535#
+ // i70852 was too radical, in SW obects (and thus, FormControls, too)
+ // get moved to invisible layers to hide them (e.g. in hidden sections).
+ // This means that form controls ARE allowed to be on other layers than
+ // the form control layer ATM and that being member of form control layer
+ // is no criteria to find all FormControls of a document.
+ // To fix, use parent functionality
return SdrUnoObj::GetLayer();
}
-void FmFormObj::NbcSetLayer(SdrLayerID /*nLayer*/)
+void FmFormObj::NbcSetLayer(SdrLayerID nLayer)
{
- // nothing to do, Layer cannot be changed for FmFormObj. Parents
- // do not need to be called, SdrUnoObj::NbcSetLayer will not do
- // it's special handling, but call SdrObject::NbcSetLayer which
- // will not change since it also uses GetLayer() to test for change
+ // #i72535#
+ // See above. To fix, use parent functionality
+ return SdrUnoObj::NbcSetLayer(nLayer);
}
// eof