From b5e8afda4728f360401c52f3c8c2c92bad9d2136 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Fri, 2 Nov 2018 09:24:19 -0400 Subject: LOK: custom widgets: check size of API structures Change-Id: Iff50f7aeb471870230e9e822657deed6aefad268 --- vcl/inc/WidgetThemeLibrary.hxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vcl/inc') diff --git a/vcl/inc/WidgetThemeLibrary.hxx b/vcl/inc/WidgetThemeLibrary.hxx index cfd10522b30d..488781496cad 100644 --- a/vcl/inc/WidgetThemeLibrary.hxx +++ b/vcl/inc/WidgetThemeLibrary.hxx @@ -21,6 +21,7 @@ namespace vcl { struct WidgetDrawStyle { + uint32_t nSize; Color maFaceColor; Color maLightColor; Color maLightBorderColor; @@ -39,7 +40,8 @@ struct WidgetDrawStyle struct ControlDrawParameters { ControlDrawParameters(cairo_t* i_pCairo, ControlPart i_ePart, ControlState i_eState) - : pCairo(i_pCairo) + : nSize(sizeof(ControlDrawParameters)) + , pCairo(i_pCairo) , ePart(i_ePart) , eState(i_eState) , eButtonValue(ButtonValue::DontKnow) @@ -48,6 +50,7 @@ struct ControlDrawParameters { } + uint32_t nSize; cairo_t* pCairo; ControlPart ePart; ControlState eState; @@ -92,7 +95,7 @@ struct _WidgetThemeLibrary bool (*drawListNet)(ControlDrawParameters const& rParameters, long nWidth, long nHeight); bool (*drawListHeader)(ControlDrawParameters const& rParameters, long nWidth, long nHeight); - bool (*updateSettings)(WidgetDrawStyle& rSettings); + bool (*updateSettings)(WidgetDrawStyle& rStyle); }; extern "C" vcl::WidgetThemeLibrary* CreateWidgetThemeLibrary(); -- cgit