diff options
author | obo <obo@openoffice.org> | 2010-06-15 12:54:21 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-15 12:54:21 +0200 |
commit | a93ecbe1f0f5e65ccc64347ed564d39c923f0dd0 (patch) | |
tree | e6b624a0d3274882f7e7855f8812a99706b07bb5 /svx | |
parent | 946651672cd26b5db588005f39deb2eecf82ca8a (diff) | |
parent | 6e5f7e581dc5b8edcb78dc92a4d0c89d81f2aef9 (diff) |
CWS-TOOLING: integrate CWS impressbi01
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svdstr.hrc | 2 | ||||
-rw-r--r-- | svx/inc/svx/svddef.hxx | 3 | ||||
-rw-r--r-- | svx/inc/svx/svdobj.hxx | 11 | ||||
-rw-r--r-- | svx/inc/svx/sxopitm.hxx | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | svx/inc/svx/unoshprp.hxx | 1 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofgroup.cxx | 69 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx | 13 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 11 | ||||
-rw-r--r-- | svx/source/svdraw/sdrhittesthelper.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv1.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 39 | ||||
-rw-r--r-- | svx/source/svdraw/svdoedge.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdpagv.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdstr.src | 5 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 18 |
17 files changed, 144 insertions, 56 deletions
diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc index f1c19b4e0895..f1bc8cfdae19 100644 --- a/svx/inc/svdstr.hrc +++ b/svx/inc/svdstr.hrc @@ -674,7 +674,7 @@ #define SIP_SA_CIRCRESERVE1 (SIP_Begin + 177) #define SIP_SA_CIRCRESERVE2 (SIP_Begin + 178) #define SIP_SA_CIRCRESERVE3 (SIP_Begin + 179) -//BFS01#define SIP_SDRATTRSET_CIRC (SIP_Begin + 180) +#define SIP_SA_OBJVISIBLE (SIP_Begin + 180) #define SIP_SA_OBJMOVEPROTECT (SIP_Begin + 181) #define SIP_SA_OBJSIZEPROTECT (SIP_Begin + 182) #define SIP_SA_OBJPRINTABLE (SIP_Begin + 183) diff --git a/svx/inc/svx/svddef.hxx b/svx/inc/svx/svddef.hxx index a758e9c1dba7..a9e5d175680c 100644 --- a/svx/inc/svx/svddef.hxx +++ b/svx/inc/svx/svddef.hxx @@ -203,7 +203,8 @@ #define SDRATTR_TRANSFORMREF2X (SDRATTR_NOTPERSIST_FIRST+32) /* 1212 long, def=0 */ #define SDRATTR_TRANSFORMREF2Y (SDRATTR_NOTPERSIST_FIRST+33) /* 1213 long, def=0 */ #define SDRATTR_TEXTDIRECTION (SDRATTR_NOTPERSIST_FIRST+34) /* 1214 V4+++ long, def=0 */ -#define SDRATTR_NOTPERSIST_LAST (SDRATTR_TEXTDIRECTION) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */ +#define SDRATTR_OBJVISIBLE (SDRATTR_NOTPERSIST_FIRST+35) +#define SDRATTR_NOTPERSIST_LAST (SDRATTR_OBJVISIBLE) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */ // kein SetItem hierfuer #define SDRATTR_GRAF_FIRST (SDRATTR_NOTPERSIST_LAST+1) /* 1229 V4+++*/ diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx index cf7ca2eda5ee..40cc992e96d9 100644 --- a/svx/inc/svx/svdobj.hxx +++ b/svx/inc/svx/svdobj.hxx @@ -283,6 +283,7 @@ public: BOOL bSizProt; BOOL bNoPrint; BOOL bClosedObj; + bool mbVisible; SdrLayerID mnLayerID; public: @@ -469,10 +470,10 @@ protected: unsigned bGrouped : 1; // Member eines GroupObjektes? // Die folgende Flags werden gestreamt - unsigned bMovProt : 1; // Position geschuetzt - unsigned bSizProt : 1; // Groesse geschuetzt - unsigned bNoPrint : 1; // Nicht drucken - + unsigned bMovProt : 1; // If true, the position is protected + unsigned bSizProt : 1; // If true, the size is protected + unsigned bNoPrint : 1; // If true, the object is not printed. + unsigned mbVisible : 1; // If false, the object is not visible on screen (but maybe on printer, depending on bNoprint // Wenn bEmptyPresObj TRUE ist, handelt es sich um ein // Praesentationsobjekt, dem noch kein Inhalt zugewiesen // wurde. Default ist das Flag auf FALSE. Die Verwaltung @@ -1020,6 +1021,8 @@ public: sal_Bool IsResizeProtect() const { return bSizProt; } void SetPrintable(sal_Bool bPrn); sal_Bool IsPrintable() const { return !bNoPrint; } + void SetVisible(sal_Bool bVisible); + sal_Bool IsVisible() const { return mbVisible; } void SetEmptyPresObj(sal_Bool bEpt) { bEmptyPresObj=bEpt; } sal_Bool IsEmptyPresObj() const { return bEmptyPresObj; } void SetNotVisibleAsMaster(sal_Bool bFlg) { bNotVisibleAsMaster=bFlg; } diff --git a/svx/inc/svx/sxopitm.hxx b/svx/inc/svx/sxopitm.hxx index 947660e71cc0..dd402c3a0915 100644 --- a/svx/inc/svx/sxopitm.hxx +++ b/svx/inc/svx/sxopitm.hxx @@ -39,4 +39,10 @@ public: SdrObjPrintableItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJPRINTABLE,rIn) {} }; +class SdrObjVisibleItem: public SdrYesNoItem { +public: + SdrObjVisibleItem(bool bOn=true): SdrYesNoItem(SDRATTR_OBJVISIBLE,bOn) {} + SdrObjVisibleItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJVISIBLE,rIn) {} +}; + #endif diff --git a/svx/inc/svx/unoshprp.hxx b/svx/inc/svx/unoshprp.hxx index 27196079db07..fcf86488f7a3 100755..100644 --- a/svx/inc/svx/unoshprp.hxx +++ b/svx/inc/svx/unoshprp.hxx @@ -325,6 +325,7 @@ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT , &::getBooleanCppuType(), 0, 0}, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_NAME), SDRATTR_OBJECTNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_PRINTABLE), SDRATTR_OBJPRINTABLE , &::getBooleanCppuType(), 0, 0}, \ + { MAP_CHAR_LEN("Visible"), SDRATTR_OBJVISIBLE , &::getBooleanCppuType(), 0, 0}, \ { MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT , &::getBooleanCppuType(), 0, 0},\ { MAP_CHAR_LEN("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ { MAP_CHAR_LEN("UINamePlural"), OWN_ATTR_UINAME_PLURAL , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \ diff --git a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx index 47c2cccbd02d..392b8e923212 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx @@ -57,51 +57,56 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGroup::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const { - const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount()); + drawinglayer::primitive2d::Primitive2DSequence xRetval; - if(nSubHierarchyCount) + // check model-view visibility + if(isPrimitiveVisible(rDisplayInfo)) { - const sal_Bool bDoGhostedDisplaying( - GetObjectContact().DoVisualizeEnteredGroup() - && !GetObjectContact().isOutputToPrinter() - && GetObjectContact().getActiveViewContact() == &GetViewContact()); + const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount()); - if(bDoGhostedDisplaying) + if(nSubHierarchyCount) { - rDisplayInfo.ClearGhostedDrawMode(); - } + const sal_Bool bDoGhostedDisplaying( + GetObjectContact().DoVisualizeEnteredGroup() + && !GetObjectContact().isOutputToPrinter() + && GetObjectContact().getActiveViewContact() == &GetViewContact()); - // create object hierarchy - drawinglayer::primitive2d::Primitive2DSequence xRetval(getPrimitive2DSequenceSubHierarchy(rDisplayInfo)); + if(bDoGhostedDisplaying) + { + rDisplayInfo.ClearGhostedDrawMode(); + } - if(xRetval.hasElements()) - { - // get ranges - const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D()); - const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D)); - const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport()); + // create object hierarchy + xRetval = getPrimitive2DSequenceSubHierarchy(rDisplayInfo); - // check geometrical visibility - if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange)) + if(xRetval.hasElements()) { - // not visible, release - xRetval.realloc(0); + // get ranges + const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D()); + const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D)); + const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport()); + + // check geometrical visibility + if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange)) + { + // not visible, release + xRetval.realloc(0); + } } - } - if(bDoGhostedDisplaying) + if(bDoGhostedDisplaying) + { + rDisplayInfo.SetGhostedDrawMode(); + } + } + else { - rDisplayInfo.SetGhostedDrawMode(); + // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence + // which creates the replacement primitives for an empty group + xRetval = ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo); } - - return xRetval; - } - else - { - // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence - // which creates the replacement primitives for an empty group - return ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo); } + return xRetval; } } // end of namespace contact } // end of namespace sdr diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx index 8447fe639a28..485afe35f9c1 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx @@ -68,10 +68,17 @@ namespace sdr return false; } - // Test if print output but not printable - if(GetObjectContact().isOutputToPrinter() && !rObject.IsPrintable()) + if(GetObjectContact().isOutputToPrinter() ) { - return false; + // Test if print output but not printable + if( !rObject.IsPrintable()) + return false; + } + else + { + // test is object is not visible on screen + if( !rObject.IsVisible() ) + return false; } // Test for hidden object on MasterPage diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 40b9aa5153ec..1da80b6c245e 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -1314,12 +1314,12 @@ namespace sdr { namespace contact { { // the layer of our object SdrLayerID nObjectLayer = _rUnoObject.GetLayer(); - // is the layer we're residing in visible in this view? - bool bIsObjectLayerVisible = _rPageView.isLayerVisible( nObjectLayer ); + // is the object we're residing in visible in this view? + bool bIsObjectVisible = _rUnoObject.IsVisible() && _rPageView.isLayerVisible( nObjectLayer ); - if ( _bForce || ( bIsObjectLayerVisible != _bIsCurrentlyVisible ) ) + if ( _bForce || ( bIsObjectVisible != _bIsCurrentlyVisible ) ) { - _rControl.setVisible( bIsObjectLayerVisible ); + _rControl.setVisible( bIsObjectVisible ); } } } @@ -1870,7 +1870,8 @@ namespace sdr { namespace contact { if(pSdrPageView) { - const bool bIsLayerVisible(pSdrPageView->GetVisibleLayers().IsSet(getSdrObject().GetLayer())); + const SdrObject& rObject = getSdrObject(); + const bool bIsLayerVisible( rObject.IsVisible() && pSdrPageView->GetVisibleLayers().IsSet(rObject.GetLayer())); if(rControl.isVisible() != bIsLayerVisible) { diff --git a/svx/source/svdraw/sdrhittesthelper.cxx b/svx/source/svdraw/sdrhittesthelper.cxx index 473c09b10f5d..58eef58a9fd6 100644 --- a/svx/source/svdraw/sdrhittesthelper.cxx +++ b/svx/source/svdraw/sdrhittesthelper.cxx @@ -60,7 +60,7 @@ SdrObject* SdrObjectPrimitiveHit( } else { - if(!pVisiLayer || pVisiLayer->IsSet(rObject.GetLayer())) + if( rObject.IsVisible() && (!pVisiLayer || pVisiLayer->IsSet(rObject.GetLayer()))) { // single object, 3d object, empty scene or empty group. Check if // it's a single 3D object diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index d831906fa94c..3a3935f819f8 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -189,6 +189,7 @@ SdrItemPool::SdrItemPool( mppLocalPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrObjMoveProtectItem; mppLocalPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrObjSizeProtectItem; mppLocalPoolDefaults[SDRATTR_OBJPRINTABLE -SDRATTR_START]=new SdrObjPrintableItem; + mppLocalPoolDefaults[SDRATTR_OBJVISIBLE -SDRATTR_START]=new SdrObjVisibleItem; mppLocalPoolDefaults[SDRATTR_LAYERID -SDRATTR_START]=new SdrLayerIdItem; mppLocalPoolDefaults[SDRATTR_LAYERNAME -SDRATTR_START]=new SdrLayerNameItem; mppLocalPoolDefaults[SDRATTR_OBJECTNAME -SDRATTR_START]=new SdrObjectNameItem; @@ -546,6 +547,7 @@ void SdrItemPool::TakeItemName(sal_uInt16 nWhich, String& rItemName) case SDRATTR_OBJMOVEPROTECT : nResId = SIP_SA_OBJMOVEPROTECT;break; case SDRATTR_OBJSIZEPROTECT : nResId = SIP_SA_OBJSIZEPROTECT;break; case SDRATTR_OBJPRINTABLE : nResId = SIP_SA_OBJPRINTABLE;break; + case SDRATTR_OBJVISIBLE : nResId = SIP_SA_OBJVISIBLE;break; case SDRATTR_LAYERID : nResId = SIP_SA_LAYERID;break; case SDRATTR_LAYERNAME : nResId = SIP_SA_LAYERNAME;break; case SDRATTR_OBJECTNAME : nResId = SIP_SA_OBJECTNAME;break; diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 48870cda0e02..1ac6d0b89945 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -760,6 +760,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH BOOL bMovProtect=FALSE,bMovProtectDC=FALSE; BOOL bSizProtect=FALSE,bSizProtectDC=FALSE; BOOL bPrintable =TRUE ,bPrintableDC=FALSE; + BOOL bVisible = TRUE, bVisibleDC=FALSE; SdrLayerID nLayerId=0; BOOL bLayerDC=FALSE; XubString aObjName; BOOL bObjNameDC=FALSE,bObjNameSet=FALSE; long nSnapPosX=0; BOOL bSnapPosXDC=FALSE; @@ -781,6 +782,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH bMovProtect=pObj->IsMoveProtect(); bSizProtect=pObj->IsResizeProtect(); bPrintable =pObj->IsPrintable(); + bVisible = pObj->IsVisible(); Rectangle aSnapRect2(pObj->GetSnapRect()); Rectangle aLogicRect2(pObj->GetLogicRect()); nSnapPosX=aSnapRect2.Left(); @@ -798,6 +800,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH if (!bMovProtectDC && bMovProtect!=pObj->IsMoveProtect()) bMovProtectDC=TRUE; if (!bSizProtectDC && bSizProtect!=pObj->IsResizeProtect()) bSizProtectDC=TRUE; if (!bPrintableDC && bPrintable !=pObj->IsPrintable()) bPrintableDC=TRUE; + if (!bVisibleDC && bVisible !=pObj->IsVisible()) bVisibleDC=TRUE; if (!bRotAngleDC && nRotAngle !=pObj->GetRotateAngle()) bRotAngleDC=TRUE; if (!bShrAngleDC && nShrAngle !=pObj->GetShearAngle()) bShrAngleDC=TRUE; if (!bSnapWdtDC || !bSnapHgtDC || !bSnapPosXDC || !bSnapPosYDC || !bLogicWdtDiff || !bLogicHgtDiff) { @@ -837,6 +840,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH rAttr.Put(SdrRotateOneItem()); rAttr.Put(SdrHorzShearOneItem()); rAttr.Put(SdrVertShearOneItem()); + if (nMarkAnz>1) { rAttr.Put(SdrResizeXAllItem()); rAttr.Put(SdrResizeYAllItem()); diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index a15cf8c8b2ac..fffcac00e46c 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -1226,6 +1226,10 @@ void SdrMarkView::CheckMarked() } bRaus=bRaus || pPV->GetLockedLayers().IsSet(nLay) || // Layer gesperrt? !pPV->GetVisibleLayers().IsSet(nLay); // Layer nicht sichtbar? + + if( !bRaus ) + bRaus = !pObj->IsVisible(); // not visible objects can not be marked + if (!bRaus) { // Joe am 9.3.1997: Gruppierte Objekten koennen nun auch // markiert werden. Nach EnterGroup muessen aber die Objekte @@ -1629,7 +1633,7 @@ void SdrMarkView::SetMarkHdlSizePixel(USHORT nSiz) #define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage wird gerade durchsucht */ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const { - if((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster()) + if(((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster()) || (!pObj->IsVisible())) { return NULL; } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index b594b0404706..b9d3e24592ee 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -235,6 +235,7 @@ SdrObjGeoData::SdrObjGeoData(): bSizProt(FALSE), bNoPrint(FALSE), bClosedObj(FALSE), + mbVisible(true), mnLayerID(0) { DBG_CTOR(SdrObjGeoData,NULL); @@ -414,6 +415,7 @@ SdrObject::SdrObject() bEmptyPresObj =FALSE; bNotVisibleAsMaster=FALSE; bClosedObj =FALSE; + mbVisible = true; // #i25616# mbLineIsOutsideGeometry = sal_False; @@ -1049,6 +1051,7 @@ void SdrObject::operator=(const SdrObject& rObj) bSizProt=rObj.bSizProt; bMovProt=rObj.bMovProt; bNoPrint=rObj.bNoPrint; + mbVisible=rObj.mbVisible; bMarkProt=rObj.bMarkProt; //EmptyPresObj wird nicht kopiert: nun doch! (25-07-1995, Joe) bEmptyPresObj =rObj.bEmptyPresObj; @@ -1920,6 +1923,7 @@ void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const rGeo.bMovProt =bMovProt ; rGeo.bSizProt =bSizProt ; rGeo.bNoPrint =bNoPrint ; + rGeo.mbVisible =mbVisible ; rGeo.bClosedObj =bClosedObj ; rGeo.mnLayerID = mnLayerID; @@ -1946,6 +1950,7 @@ void SdrObject::RestGeoData(const SdrObjGeoData& rGeo) bMovProt =rGeo.bMovProt ; bSizProt =rGeo.bSizProt ; bNoPrint =rGeo.bNoPrint ; + mbVisible =rGeo.mbVisible ; bClosedObj =rGeo.bClosedObj ; mnLayerID = rGeo.mnLayerID; @@ -2153,6 +2158,11 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr) SetPrintable(b); } + if (rAttr.GetItemState(SDRATTR_OBJVISIBLE,TRUE,&pPoolItem)==SFX_ITEM_SET) { + bool b=((const SdrObjVisibleItem*)pPoolItem)->GetValue(); + SetVisible(b); + } + SdrLayerID nLayer=SDRLAYER_NOTFOUND; if (rAttr.GetItemState(SDRATTR_LAYERID,TRUE,&pPoolItem)==SFX_ITEM_SET) { nLayer=((const SdrLayerIdItem*)pPoolItem)->GetValue(); @@ -2214,6 +2224,7 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, FASTBOOL bMerge) const lcl_SetItem(rAttr,bMerge,SdrObjMoveProtectItem(IsMoveProtect())); lcl_SetItem(rAttr,bMerge,SdrObjSizeProtectItem(IsResizeProtect())); lcl_SetItem(rAttr,bMerge,SdrObjPrintableItem(IsPrintable())); + lcl_SetItem(rAttr,bMerge,SdrObjVisibleItem(IsVisible())); lcl_SetItem(rAttr,bMerge,SdrRotateAngleItem(GetRotateAngle())); lcl_SetItem(rAttr,bMerge,SdrShearAngleItem(GetShearAngle())); lcl_SetItem(rAttr,bMerge,SdrOneSizeWidthItem(rSnap.GetWidth()-1)); @@ -2692,11 +2703,29 @@ void SdrObject::SetResizeProtect(sal_Bool bProt) void SdrObject::SetPrintable(sal_Bool bPrn) { - bNoPrint=!bPrn; - SetChanged(); - if (IsInserted() && pModel!=NULL) { - SdrHint aHint(*this); - pModel->Broadcast(aHint); + if( bPrn == bNoPrint ) + { + bNoPrint=!bPrn; + SetChanged(); + if (IsInserted() && pModel!=NULL) + { + SdrHint aHint(*this); + pModel->Broadcast(aHint); + } + } +} + +void SdrObject::SetVisible(sal_Bool bVisible) +{ + if( bVisible != mbVisible ) + { + mbVisible = bVisible; + SetChanged(); + if (IsInserted() && pModel!=NULL) + { + SdrHint aHint(*this); + pModel->Broadcast(aHint); + } } } diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 6482c28befb9..3d254aeb39c4 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -2105,7 +2105,7 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV, // Problem: Gruppenobjekt mit verschiedenen Layern liefert LayerID 0 !!!! no--; SdrObject* pObj=pOL->GetObj(no); - if (rVisLayer.IsSet(pObj->GetLayer()) && // nur sichtbare Objekte + if (rVisLayer.IsSet(pObj->GetLayer()) && pObj->IsVisible() && // only visible objects (pThis==NULL || pObj!=(SdrObject*)pThis) && // nicht an mich selbst connecten pObj->IsNode()) { diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 6239708394bd..bad1401c2305 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -754,6 +754,12 @@ sal_Bool SdrPageView::IsObjMarkable(SdrObject* pObj) const return sal_False; } + // only visible are markable + if( !pObj->IsVisible() ) + { + return sal_False; + } + // #112440# if(pObj->ISA(SdrObjGroup)) { diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src index ee6cbaea9632..1317a0e1328d 100644 --- a/svx/source/svdraw/svdstr.src +++ b/svx/source/svdraw/svdstr.src @@ -2395,6 +2395,11 @@ String SIP_SA_OBJPRINTABLE Text [ en-US ] = "Object, printable"; }; +String SIP_SA_OBJVISIBLE +{ + Text [ en-US ] = "Object, visible"; +}; + String SIP_SA_LAYERID { Text [ en-US ] = "Level ID"; diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 13b8e758ce12..d860f4973fd2 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2771,6 +2771,16 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper } break; } + case SDRATTR_OBJVISIBLE: + { + sal_Bool bVisible = sal_Bool(); + if( rValue >>= bVisible ) + { + mpObj->SetVisible(bVisible); + return true; + } + break; + } case SDRATTR_OBJSIZEPROTECT: { sal_Bool bResizeProtect = sal_Bool(); @@ -3147,11 +3157,15 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper } case SDRATTR_OBJPRINTABLE: - rValue = uno::makeAny( (sal_Bool) mpObj->IsPrintable() ); + rValue <<= static_cast<sal_Bool>( mpObj->IsPrintable() ); + break; + + case SDRATTR_OBJVISIBLE: + rValue <<= static_cast<sal_Bool>( mpObj->IsVisible() ); break; case SDRATTR_OBJSIZEPROTECT: - rValue = uno::makeAny( (sal_Bool)mpObj->IsResizeProtect() ); + rValue <<= static_cast<sal_Bool>( mpObj->IsResizeProtect() ); break; case OWN_ATTR_PAGE_NUMBER: |