summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <od@openoffice.org>2010-09-13 14:42:35 +0200
committerOliver-Rainer Wittmann <od@openoffice.org>2010-09-13 14:42:35 +0200
commit0f59984e2db5dcec24e4154850e5cec8cca1482a (patch)
tree152e8aa767af5faf7e3ae8200929475ec2592ae0 /sw
parent7edaf190e2b18fe5dd9b7dd8d8e7e24b2ff26520 (diff)
sw33bf09: #i113730# - method <SwDrawContact::_Changed(..)>: on insert/remove of child assure that group objects containing control objects are on the control layer
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/draw/dcontact.cxx33
1 files changed, 31 insertions, 2 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 2e19d482fc70..766c3ca86377 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -1396,6 +1396,37 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
DisconnectFromLayout( false );
break;
}
+ case SDRUSERCALL_CHILD_INSERTED :
+ case SDRUSERCALL_CHILD_REMOVED :
+ {
+ // --> AW, OD 2010-09-13 #i113730#
+ // force layer of controls for group objects containing control objects
+ if(dynamic_cast< SdrObjGroup* >(maAnchoredDrawObj.DrawObj()))
+ {
+ if(::CheckControlLayer(maAnchoredDrawObj.DrawObj()))
+ {
+ const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess();
+ const SdrLayerID aCurrentLayer(maAnchoredDrawObj.DrawObj()->GetLayer());
+ const SdrLayerID aControlLayerID(pIDDMA->GetControlsId());
+ const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId());
+
+ if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID)
+ {
+ if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() ||
+ aCurrentLayer == pIDDMA->GetInvisibleHeavenId() )
+ {
+ maAnchoredDrawObj.DrawObj()->SetLayer(aInvisibleControlLayerID);
+ }
+ else
+ {
+ maAnchoredDrawObj.DrawObj()->SetLayer(aControlLayerID);
+ }
+ }
+ }
+ }
+ // fallthrough intended here
+ // <--
+ }
case SDRUSERCALL_MOVEONLY:
case SDRUSERCALL_RESIZE:
case SDRUSERCALL_CHILD_MOVEONLY :
@@ -1403,8 +1434,6 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
case SDRUSERCALL_CHILD_CHGATTR :
case SDRUSERCALL_CHILD_DELETE :
case SDRUSERCALL_CHILD_COPY :
- case SDRUSERCALL_CHILD_INSERTED :
- case SDRUSERCALL_CHILD_REMOVED :
{
// --> OD 2004-08-04 #i31698# - improvement:
// get instance <SwAnchoredDrawObject> only once