[Libreoffice-commits] core.git: include/sfx2 sfx2/source

Caolán McNamara caolanm at redhat.com
Mon Oct 10 14:27:11 UTC 2016


 include/sfx2/sfx.hrc         |    2 +-
 sfx2/source/view/view.src    |    5 ++---
 sfx2/source/view/viewfrm.cxx |    8 +++++---
 3 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit e8393d4d91d714b691b101a2062c3e2e7333929b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 10 15:23:02 2016 +0100

    de-src standalong PushButton
    
    Change-Id: I6f062e04377fc74ec2fea3ea4390943b715e06d1

diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc
index 82a9e757..89a7f6d 100644
--- a/include/sfx2/sfx.hrc
+++ b/include/sfx2/sfx.hrc
@@ -144,7 +144,7 @@
 #define STR_PASSWD_MIN_LEN                  (RID_SFX_START+124)
 #define STR_NONCHECKEDOUT_DOCUMENT          (RID_SFX_START+125)
 #define BT_CHECKOUT                         (RID_SFX_START+126)
-#define BT_READONLY_EDIT                    (RID_SFX_START+127)
+#define STR_READONLY_EDIT                   (RID_SFX_START+127)
 #define STR_READONLY_DOCUMENT               (RID_SFX_START+128)
 #define STR_PASSWD_MIN_LEN1                 (RID_SFX_START+129)
 #define STR_MODULENOTINSTALLED              (RID_SFX_START+130)
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
index 8f0d6c6..845510a 100644
--- a/sfx2/source/view/view.src
+++ b/sfx2/source/view/view.src
@@ -127,10 +127,9 @@ PushButton BT_CHECKOUT
     Size = MAP_APPFONT( 30 , 0 );
     Text[ en-US ] = "Check Out";
 };
-PushButton BT_READONLY_EDIT
+
+String STR_READONLY_EDIT
 {
-    Pos = MAP_APPFONT( 0 , 0 );
-    Size = MAP_APPFONT( 70 , 0 );
     Text[ en-US ] = "Edit Document";
 };
 
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index ef4f10d..588a4eb 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1224,9 +1224,11 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
                     SfxInfoBarWindow* pInfoBar = AppendInfoBar("readonly", SfxResId(STR_READONLY_DOCUMENT));
                     if (pInfoBar)
                     {
-                        VclPtrInstance<PushButton> pBtn( &GetWindow(), SfxResId(BT_READONLY_EDIT));
-                        pBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler));
-                        pInfoBar->addButton(pBtn);
+                        VclPtrInstance<PushButton> xBtn(&GetWindow());
+                        xBtn->SetText(SfxResId(STR_READONLY_EDIT));
+                        xBtn->SetSizePixel(xBtn->GetOptimalSize());
+                        xBtn->SetClickHdl(LINK(this, SfxViewFrame, SwitchReadOnlyHandler));
+                        pInfoBar->addButton(xBtn);
                     }
                 }
 


More information about the Libreoffice-commits mailing list