[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - vcl/inc vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 25 05:31:24 PDT 2012
vcl/inc/vcl/button.hxx | 1 +
vcl/source/control/button.cxx | 16 ++++++++++++++++
2 files changed, 17 insertions(+)
New commits:
commit b731fb5140ccffe893992e7ed5f36e1a442d4aa0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Sep 25 13:30:57 2012 +0100
support has-default for buttons
Change-Id: I4b3b6bfa3fadaed0770b5e5254f5afc4c67de191
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx
index 31191f5..a613a01 100644
--- a/vcl/inc/vcl/button.hxx
+++ b/vcl/inc/vcl/button.hxx
@@ -200,6 +200,7 @@ public:
void SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; }
const Link& GetToggleHdl() const { return maToggleHdl; }
+ virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue);
virtual void take_properties(Window &rOther);
};
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 8395ff8..0b4fe60 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1747,6 +1747,22 @@ Size PushButton::GetOptimalSize(WindowSizeType eType) const
}
}
+bool PushButton::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
+{
+ if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("has-default")))
+ {
+ WinBits nBits = GetStyle();
+ nBits &= ~(WB_DEFBUTTON);
+ if (toBool(rValue))
+ nBits |= WB_DEFBUTTON;
+ SetStyle(nBits);
+ }
+ else
+ return Control::set_property(rKey, rValue);
+ return true;
+}
+
+
// =======================================================================
void OKButton::ImplInit( Window* pParent, WinBits nStyle )
More information about the Libreoffice-commits
mailing list