summaryrefslogtreecommitdiffstats
path: root/sd/source/ui/view/drviews7.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2008-02-26 06:27:15 +0000
committerOliver Bolte <obo@openoffice.org>2008-02-26 06:27:15 +0000
commitf0792125ffcfc7c41d3e4dcef0a9d0ce9c5c690b (patch)
tree3be2e27ff176ab7a54debd7616d13dca4fe85900 /sd/source/ui/view/drviews7.cxx
parentINTEGRATION: CWS cropmaster2000_DEV300 (1.50.74); FILE MERGED (diff)
downloadcore-f0792125ffcfc7c41d3e4dcef0a9d0ce9c5c690b.tar.gz
core-f0792125ffcfc7c41d3e4dcef0a9d0ce9c5c690b.zip
INTEGRATION: CWS cropmaster2000_DEV300 (1.73.116); FILE MERGED
2007/12/10 18:06:21 cl 1.73.116.4: RESYNC: (1.73-1.74); FILE MERGED 2007/12/10 17:49:27 cl 1.73.116.3: #i83933# disable cropping if no single graphic is selected 2007/12/05 20:21:14 cl 1.73.116.2: #i83933# added croping 2007/11/24 19:00:15 cl 1.73.116.1: #i83933# added interactive graphic cropping
Diffstat (limited to 'sd/source/ui/view/drviews7.cxx')
-rw-r--r--sd/source/ui/view/drviews7.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 5de638d93260..104760a2d0df 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: drviews7.cxx,v $
*
- * $Revision: 1.74 $
+ * $Revision: 1.75 $
*
- * last change: $Author: ihi $ $Date: 2007-11-26 17:03:31 $
+ * last change: $Author: obo $ $Date: 2008-02-26 07:27:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1131,6 +1131,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem( SID_OBJECT_ROTATE );
rSet.DisableItem( SID_OBJECT_SHEAR );
rSet.DisableItem( SID_OBJECT_MIRROR );
+ rSet.DisableItem( SID_OBJECT_CROP );
+ rSet.DisableItem( SID_ATTR_GRAF_CROP );
rSet.DisableItem( SID_OBJECT_TRANSPARENCE );
rSet.DisableItem( SID_OBJECT_GRADIENT );
rSet.DisableItem( SID_OBJECT_CROOK_ROTATE );
@@ -1420,6 +1422,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
// disabled, if the marked objects not able to handle
// these attributes
//
+
+ bool bSingleGraphicSelected = false;
+
if (!mpDrawView->AreObjectsMarked())
{
rSet.DisableItem (SID_CONVERT_TO_METAFILE);
@@ -1437,7 +1442,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
BOOL bFoundNoGraphicObj = FALSE;
BOOL bFoundAny = FALSE;
- for (int i=0; i < (int) aMarkList.GetMarkCount() && !bFoundAny; i++)
+// const int nMarkCount = (int) aMarkList.GetMarkCount();
+ for (ULONG i=0; i < nMarkCount && !bFoundAny; i++)
{
SdrObject* pObj= aMarkList.GetMark(i)->GetMarkedSdrObj();
UINT16 nId = pObj->GetObjIdentifier();
@@ -1463,6 +1469,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
bFoundNoGraphicObj = TRUE;
break;
case OBJ_GRAF :
+ bSingleGraphicSelected = nMarkCount == 1;
switch ( ((SdrGrafObj*)pObj)->GetGraphicType() )
{
case GRAPHIC_BITMAP :
@@ -1511,6 +1518,12 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
}
+ if( !bSingleGraphicSelected )
+ {
+ rSet.DisableItem (SID_OBJECT_CROP);
+ rSet.DisableItem (SID_ATTR_GRAF_CROP);
+ }
+
// #96090# moved SID_UNDO to ViewShell::GetMenuState()
// #96090# moved SID_REDO to ViewShell::GetMenuState()
// #96090# moved SID_GETUNDOSTRINGS to ViewShell::GetMenuState()