[Libreoffice-commits] .: sd/source sw/source

Tomaž Vajngerl tvajngerl at kemper.freedesktop.org
Sun Jul 1 10:31:35 PDT 2012


 sd/source/ui/inc/DrawViewShell.hxx |    2 +-
 sd/source/ui/view/drviews2.cxx     |    9 ++++-----
 sw/source/ui/docvw/romenu.cxx      |    2 +-
 sw/source/ui/shells/grfsh.cxx      |    5 +----
 4 files changed, 7 insertions(+), 11 deletions(-)

New commits:
commit 160f62dff2f040ceaf306819d0c67fb111037b2d
Author: Tomaž Vajngerl <quikee at gmail.com>
Date:   Sun Jul 1 19:17:39 2012 +0200

    Svx and sw code cleanup
    
    Change-Id: Ie93861f32ac23379dc1f0fd973612645e776cc1e

diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 7384091..35f3520 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -216,7 +216,7 @@ public:
     void            FuTemporary(SfxRequest& rReq);
     void            FuPermanent(SfxRequest& rReq);
     void            FuSupport(SfxRequest& rReq);
-    void                FuSupportRotate(SfxRequest& rReq);
+    void            FuSupportRotate(SfxRequest& rReq);
     void            FuTable(SfxRequest& rReq);
 
     void            AttrExec (SfxRequest& rReq);
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index a33b12b..c4630c2 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -714,23 +714,22 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             {
                 WaitObject aWait( (Window*)GetActiveWindow() );
 
-                // switch on undo for the next operations
-                mpDrawView->BegUndo(
-                    String(
-                    SdResId (nSId==SID_CONVERT_TO_METAFILE ? STR_UNDO_CONVERT_TO_METAFILE : STR_UNDO_CONVERT_TO_BITMAP)));
-
                 // create SdrGrafObj from metafile/bitmap
                 Graphic aGraphic;
                 switch (nSId)
                 {
                     case SID_CONVERT_TO_METAFILE:
                     {
+                        // switch on undo for the next operations
+                        mpDrawView->BegUndo( String( SdResId( STR_UNDO_CONVERT_TO_METAFILE )));
                         GDIMetaFile aMetaFile(mpDrawView->GetAllMarkedMetaFile ());
                         aGraphic = Graphic(aMetaFile);
                     }
                     break;
                     case SID_CONVERT_TO_BITMAP:
                     {
+                        // switch on undo for the next operations
+                        mpDrawView->BegUndo( String( SdResId( STR_UNDO_CONVERT_TO_BITMAP )));
                         Bitmap aBitmap (mpDrawView->GetAllMarkedBitmap ());
                         aGraphic = Graphic(aBitmap);
                     }
diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx
index 607145c..e0e519a 100644
--- a/sw/source/ui/docvw/romenu.cxx
+++ b/sw/source/ui/docvw/romenu.cxx
@@ -79,7 +79,7 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rD
                             _pItem->ISA(SfxBoolItem) &&
                             ((SfxBoolItem*)_pItem)->GetValue());
             //remove full screen entry when not in full screen mode
-            if(SID_WIN_FULLSCREEN == nSID && !IsItemChecked(SID_WIN_FULLSCREEN) )
+            if( SID_WIN_FULLSCREEN == nSID && !IsItemChecked(SID_WIN_FULLSCREEN) )
                 EnableItem(nMID, sal_False);
         }
     }
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index 984568c..2e9884c 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -555,13 +555,10 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
                 bDisable = sal_True;
             break;
         case SID_SAVE_GRAPHIC:
-            if( rSh.GetGraphicType() == GRAPHIC_NONE )
-                bDisable = sal_True;
-        break;
         case SID_EXTERNAL_EDIT:
             if( rSh.GetGraphicType() == GRAPHIC_NONE )
                 bDisable = sal_True;
-        break;
+            break;
         case SID_COLOR_SETTINGS:
         {
             if ( bParentCntProt || !bIsGrfCntnt )


More information about the Libreoffice-commits mailing list