diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-07-04 12:25:38 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-07-04 12:25:38 +0000 |
commit | 648ab155dd7388b6858028892e8eb94d1d32c1a4 (patch) | |
tree | 7c198f6d41293971385a792338dc47c33a00bc1a /sw/source/core/unocore/unodraw.cxx | |
parent | fb7184f1ac0ba1ec932360f12dc103e8124c05b9 (diff) |
INTEGRATION: CWS aig02 (1.48.34); FILE MERGED
2003/07/02 11:59:18 od 1.48.34.2: #108784# further adjustments for support of drawing objects in header/footer
2003/06/26 18:10:06 od 1.48.34.1: #108784# - further adjustments for support of drawing objects in header/footer
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 3b28214b4c65..d4f303aaa996 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unodraw.cxx,v $ * - * $Revision: 1.48 $ + * $Revision: 1.49 $ * - * last change: $Author: vg $ $Date: 2003-05-22 08:43:55 $ + * last change: $Author: vg $ $Date: 2003-07-04 13:25:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -631,10 +631,12 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) pSvxShape->setPosition(aMM100Pos); SdrObject* pObj = pSvxShape->GetSdrObject(); + // OD 25.06.2003 #108784# - set layer of new drawing object to corresponding + // invisible layer. if(FmFormInventor != pObj->GetObjInventor()) - pObj->SetLayer( bOpaque ? pDoc->GetHeavenId() : pDoc->GetHellId() ); + pObj->SetLayer( bOpaque ? pDoc->GetInvisibleHeavenId() : pDoc->GetInvisibleHellId() ); else - pObj->SetLayer(pDoc->GetControlsId()); + pObj->SetLayer(pDoc->GetInvisibleControlsId()); SwPaM* pPam = new SwPaM(pDoc->GetNodes().GetEndOfContent()); SwUnoInternalPaM* pInternalPam = 0; @@ -1052,11 +1054,19 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a if(pSvxShape) { SdrObject* pObj = pSvxShape->GetSdrObject(); + // OD 25.06.2003 #108784# - set layer of new drawing + // object to corresponding invisible layer. + bool bIsVisible = pDoc->IsVisibleLayerId( pObj->GetLayer() ); if(FmFormInventor != pObj->GetObjInventor()) - pObj->SetLayer( *(sal_Bool*)aValue.getValue() ? - pDoc->GetHeavenId() : pDoc->GetHellId() ); + { + pObj->SetLayer( *(sal_Bool*)aValue.getValue() + ? ( bIsVisible ? pDoc->GetHeavenId() : pDoc->GetInvisibleHeavenId() ) + : ( bIsVisible ? pDoc->GetHellId() : pDoc->GetInvisibleHellId() )); + } else - pObj->SetLayer(pDoc->GetControlsId()); + { + pObj->SetLayer( bIsVisible ? pDoc->GetControlsId() : pDoc->GetInvisibleControlsId()); + } } @@ -1170,7 +1180,10 @@ uno::Any SwXShape::getPropertyValue(const OUString& rPropertyName) if(pSvxShape) { SdrObject* pObj = pSvxShape->GetSdrObject(); - sal_Bool bOpaque = pObj->GetLayer() != pFmt->GetDoc()->GetHellId(); + // OD 02.07.2003 #108784# - consider invisible layers + sal_Bool bOpaque = + ( pObj->GetLayer() != pFmt->GetDoc()->GetHellId() && + pObj->GetLayer() != pFmt->GetDoc()->GetInvisibleHellId() ); aRet.setValue(&bOpaque, ::getBooleanCppuType()); } } @@ -1767,13 +1780,18 @@ void SwXGroupShape::add( const Reference< XShape >& xShape ) throw (RuntimeExcep if(pObj) { SwDoc* pDoc = pFmt->GetDoc(); + // OD 25.06.2003 #108784# - set layer of new drawing + // object to corresponding invisible layer. if( FmFormInventor != pObj->GetObjInventor()) { - pObj->SetLayer( pSwShape->pImpl->GetOpaque() ? - pDoc->GetHeavenId() : pDoc->GetHellId() ); + pObj->SetLayer( pSwShape->pImpl->GetOpaque() + ? pDoc->GetInvisibleHeavenId() + : pDoc->GetInvisibleHellId() ); } else - pObj->SetLayer(pDoc->GetControlsId()); + { + pObj->SetLayer(pDoc->GetInvisibleControlsId()); + } } } pSwShape->m_bDescriptor = sal_False; |