[Libreoffice-commits] .: 2 commits - sd/source
David Tardon
dtardon at kemper.freedesktop.org
Wed Nov 10 21:51:23 PST 2010
sd/source/ui/view/drviewsj.cxx | 38 ++------------------------------------
1 file changed, 2 insertions(+), 36 deletions(-)
New commits:
commit febb7eaf5f8943c0304a34974e86fa45215b19b5
Author: David Tardon <dtardon at redhat.com>
Date: Thu Nov 11 06:26:17 2010 +0100
remove repeated test
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 350e9c2..65e93ae 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -289,12 +289,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTLINE_TEXT_AUTOFIT ) )
{
- bool bSet = false;
- const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- if( rMarkList.GetMarkCount() == 1 )
- {
- SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
+ SdrObject* const pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ bool const bSet = ((const SdrTextFitToSizeTypeItem*)pObj->GetMergedItemSet().GetItem(SDRATTR_TEXT_FITTOSIZE))->GetValue() != SDRTEXTFIT_NONE;
}
rSet.Put(SfxBoolItem(SID_OUTLINE_TEXT_AUTOFIT, bSet));
}
commit ffe843b8f798d7979ca38863a53b1f6c23b8049a
Author: julien <serval2412 at yahoo.fr>
Date: Thu Nov 11 06:18:59 2010 +0100
remove commented lines
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index f4fc9d9..350e9c2 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -98,8 +98,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MEASURE_DLG ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_DLG ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_NEW_ROUTING ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE_FAST ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_SHEAR ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_1BIT_THRESHOLD ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_1BIT_MATRIX ) ||
@@ -160,12 +158,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
{
rSet.DisableItem(SID_UNGROUP);
}
-/*
- if (!pObj->ISA(SdrObjGroup) && !pObj->ISA(SdrGrafObj) && !pObj->ISA(SdrOle2Obj))
- {
- rSet.DisableItem( SID_NAME_GROUP );
- }
-*/
if (!pObj->ISA(SdrGrafObj) ||
((SdrGrafObj*) pObj)->GetGraphicType() != GRAPHIC_BITMAP ||
((SdrGrafObj*) pObj)->IsLinkedGraphic())
@@ -322,8 +314,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
if(nMarkCount <= 2)
rSet.DisableItem(SID_DISTRIBUTE_DLG);
-// rSet.ClearItem( SID_BEZIER_EDIT );
-// rSet.DisableItem( SID_BEZIER_EDIT );
rSet.DisableItem( SID_LINEEND_POLYGON );
rSet.DisableItem( SID_ENTER_GROUP );
// Jetzt (28.10.96) muessen Namen fuer Objekte eindeutig sein
@@ -332,22 +322,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
rSet.DisableItem( SID_OBJECT_TITLE_DESCRIPTION );
rSet.DisableItem( SID_MODIFY_FIELD );
- if( 1 )
-// if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_FILL_STYLE ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_UNGROUP ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_MEASURE_DLG ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONNECTION_DLG ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COMBINE ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_SHEAR ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_CONVERT_TO_3D_LATHE_FAST ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_LEFT ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_CENTER ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_RIGHT ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_UP ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_MIDDLE ) ||
-// SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) )
{
BOOL bText = FALSE;
BOOL bLine = FALSE;
@@ -415,7 +389,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
*/
if( bLine && !bText && !bDrawObj &&!b3dObj)
{
- //rSet.DisableItem( SID_ATTRIBUTES_AREA );
rSet.DisableItem( SID_ATTR_FILL_STYLE );
}
if( !bEdgeObj )
@@ -509,8 +482,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
// kein Objekt selektiert
else
{
-// rSet.ClearItem( SID_BEZIER_EDIT );
-
rSet.DisableItem( SID_ENTER_GROUP );
rSet.DisableItem( SID_CUT );
rSet.DisableItem( SID_COPY );
@@ -532,7 +503,6 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
rSet.DisableItem( SID_BEHIND_OBJ );
rSet.DisableItem( SID_CONVERT );
-// rSet.DisableItem( SID_BEZIER_EDIT );
rSet.DisableItem( SID_SIZE_OPTIMAL );
rSet.DisableItem( SID_LINEEND_POLYGON );
rSet.DisableItem( SID_COPYOBJECTS );
More information about the Libreoffice-commits
mailing list