diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-10 15:23:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-10 15:23:53 +0100 |
commit | e8393d4d91d714b691b101a2062c3e2e7333929b (patch) | |
tree | f6ed6fdccc522da44e1f7f2e99821fa81373d028 | |
parent | 9f7f5b5f911c4e76c88258f6ee3e7d51484f195b (diff) |
de-src standalong PushButton
Change-Id: I6f062e04377fc74ec2fea3ea4390943b715e06d1
-rw-r--r-- | include/sfx2/sfx.hrc | 2 | ||||
-rw-r--r-- | sfx2/source/view/view.src | 5 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 8 |
3 files changed, 8 insertions, 7 deletions
diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc index 82a9e757bc54..89a7f6d01eee 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 8f0d6c6fdca5..845510a79262 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 ef4f10d22a82..588a4eb0e8a3 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); } } |