From 0dfd9d29f8cecf494a74fa149673fefd39acdc44 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Fri, 20 May 2022 18:39:34 +0900 Subject: chart2: better readable DataTable properties definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib9cadee39f58b73782e6a3268d86b688183de1fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137157 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 14553d280ad76c3436d394e900002c63de7b6e51) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138439 Tested-by: Jenkins CollaboraOffice --- chart2/source/model/main/DataTable.cxx | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/chart2/source/model/main/DataTable.cxx b/chart2/source/model/main/DataTable.cxx index c1bc742df82c..aa2d27a6a619 100644 --- a/chart2/source/model/main/DataTable.cxx +++ b/chart2/source/model/main/DataTable.cxx @@ -34,20 +34,19 @@ enum DataTableProperty_Keys, }; -void lcl_AddPropertiesToVector(std::vector& rOutProperties) -{ - rOutProperties.emplace_back( - "HBorder", DataTableProperty_HorizontalBorder, cppu::UnoType::get(), - beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT); - rOutProperties.emplace_back( - "VBorder", DataTableProperty_VerticalBorder, cppu::UnoType::get(), - beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT); - rOutProperties.emplace_back("Outline", DataTableProperty_Outilne, cppu::UnoType::get(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT); - rOutProperties.emplace_back("Keys", DataTableProperty_Keys, cppu::UnoType::get(), - beans::PropertyAttribute::BOUND - | beans::PropertyAttribute::MAYBEDEFAULT); +void lcl_AddPropertiesToVector(std::vector& rProps) +{ + auto const nBound = beans::PropertyAttribute::BOUND; + auto const nMaybeDefault = beans::PropertyAttribute::MAYBEDEFAULT; + + rProps.emplace_back("HBorder", DataTableProperty_HorizontalBorder, cppu::UnoType::get(), + nBound | nMaybeDefault); + rProps.emplace_back("VBorder", DataTableProperty_VerticalBorder, cppu::UnoType::get(), + nBound | nMaybeDefault); + rProps.emplace_back("Outline", DataTableProperty_Outilne, cppu::UnoType::get(), + nBound | nMaybeDefault); + rProps.emplace_back("Keys", DataTableProperty_Keys, cppu::UnoType::get(), + nBound | nMaybeDefault); } struct StaticDataTableDefaults_Initializer -- cgit