From 260caebf8a2382bcde1fb9ff74ceb1b940654e6f Mon Sep 17 00:00:00 2001 From: Ilhan Yesil Date: Tue, 8 May 2018 14:17:56 +0200 Subject: tdf#45789 [API CHANGE] Automatic row height in reports The controls have now an AutoGrow flag which is saved as style:min-row-height instead of style:row-height on style:table-row-properties in content.xml. In this case the table row height will be allowed to grow to accommodate the content. Note: in the conceptual model of reportdesigner this is a per-control property but in the current implementation, it is a per-row property in the ODF file. Thus, as soon as one control in the row has the AutoGrow property set, they all do. Change-Id: I95c25599e06af0f2f12e72a7cfc0881206f02039 Reviewed-on: https://gerrit.libreoffice.org/53977 Reviewed-by: Lionel Elie Mamane Tested-by: Jenkins --- reportdesign/inc/ReportHelperDefines.hxx | 2 ++ reportdesign/inc/helpids.h | 1 + reportdesign/inc/strings.hrc | 1 + reportdesign/inc/strings.hxx | 2 ++ 4 files changed, 6 insertions(+) (limited to 'reportdesign/inc') diff --git a/reportdesign/inc/ReportHelperDefines.hxx b/reportdesign/inc/ReportHelperDefines.hxx index 86f5c7a18e2c..5eeb0b40c1cf 100644 --- a/reportdesign/inc/ReportHelperDefines.hxx +++ b/reportdesign/inc/ReportHelperDefines.hxx @@ -45,6 +45,8 @@ virtual void SAL_CALL setPositionY(::sal_Int32 the_value) override; \ virtual ::sal_Int32 SAL_CALL getWidth() override; \ virtual void SAL_CALL setWidth(::sal_Int32 the_value) override; \ + virtual sal_Bool SAL_CALL getAutoGrow() override; \ + virtual void SAL_CALL setAutoGrow(sal_Bool the_value) override; \ virtual ::sal_Int16 SAL_CALL getControlBorder() override; \ virtual void SAL_CALL setControlBorder(::sal_Int16 the_value) override; \ virtual ::sal_Int32 SAL_CALL getControlBorderColor() override; \ diff --git a/reportdesign/inc/helpids.h b/reportdesign/inc/helpids.h index 9f481d4eb389..ba35fde1abbf 100644 --- a/reportdesign/inc/helpids.h +++ b/reportdesign/inc/helpids.h @@ -75,6 +75,7 @@ #define HID_RPT_PROP_RPT_POSITIONY "REPORTDESIGN_HID_RPT_PROP_RPT_POSITIONY" #define HID_RPT_PROP_RPT_WIDTH "REPORTDESIGN_HID_RPT_PROP_RPT_WIDTH" #define HID_RPT_PROP_RPT_HEIGHT "REPORTDESIGN_HID_RPT_PROP_RPT_HEIGHT" +#define HID_RPT_PROP_RPT_AUTOGROW "REPORTDESIGN_HID_RPT_PROP_RPT_AUTOGROW" #define HID_RPT_START_TITLE "REPORTDESIGN_HID_RPT_START_TITLE" #define HID_RPT_START_IMAGE "REPORTDESIGN_HID_RPT_START_IMAGE" #define HID_RPT_PROP_DEEPTRAVERSING "REPORTDESIGN_HID_RPT_PROP_DEEPTRAVERSING" diff --git a/reportdesign/inc/strings.hrc b/reportdesign/inc/strings.hrc index bcabc42faa08..0856156447d0 100644 --- a/reportdesign/inc/strings.hrc +++ b/reportdesign/inc/strings.hrc @@ -47,6 +47,7 @@ #define RID_STR_POSITIONY NC_("RID_STR_POSITIONY", "Position Y") #define RID_STR_WIDTH NC_("RID_STR_WIDTH", "Width") #define RID_STR_HEIGHT NC_("RID_STR_HEIGHT", "Height") +#define RID_STR_AUTOGROW NC_("RID_STR_AUTOGROW", "Auto Grow") #define RID_STR_INITIALFORMULA NC_("RID_STR_INITIALFORMULA", "Initial value") #define RID_STR_PRESERVEIRI NC_("RID_STR_PRESERVEIRI", "Preserve as Link") #define RID_STR_FORMULA NC_("RID_STR_FORMULA", "Formula") diff --git a/reportdesign/inc/strings.hxx b/reportdesign/inc/strings.hxx index 06d88c360909..917e6898775e 100644 --- a/reportdesign/inc/strings.hxx +++ b/reportdesign/inc/strings.hxx @@ -73,6 +73,8 @@ #define PROPERTY_WIDTH "Width" #define PROPERTY_POSITIONX "PositionX" #define PROPERTY_POSITIONY "PositionY" +#define PROPERTY_AUTOGROW "AutoGrow" +#define PROPERTY_MINHEIGHT "MinHeight" #define PROPERTY_DATAFIELD "DataField" #define PROPERTY_PARAADJUST "ParaAdjust" #define PROPERTY_FONTDESCRIPTOR "FontDescriptor" -- cgit