From 51d270b4a9b931065fb8f0dc0acbb546298cff3b Mon Sep 17 00:00:00 2001 From: seleznevae Date: Sat, 12 Jan 2019 14:00:12 +0300 Subject: [PATCH] [C] Changed some cpp API function names --- docs/index.md | 4 ++-- lib/fort.hpp | 4 ++-- tests/bb_tests_cpp/test_table_properties.cpp | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/index.md b/docs/index.md index 725569e..6af72fc 100644 --- a/docs/index.md +++ b/docs/index.md @@ -83,9 +83,9 @@ These pages contain the API documentation of **libfort** - simple library to cre - @link fort::table::set_cell_row_type set_cell_row_type @endlink -- set row type - @link fort::table::set_cell_empty_str_height set_cell_empty_str_height @endlink -- set height for empty cell - @link fort::table::set_cell_content_fg_color set_cell_content_fg_color @endlink -- set content foreground color - - @link fort::table::set_cell_cell_bg_color set_cell_cell_bg_color @endlink -- set cell background color + - @link fort::table::set_cell_bg_color set_cell_bg_color @endlink -- set cell background color - @link fort::table::set_cell_content_bg_color set_cell_content_bg_color @endlink -- set content background color - - @link fort::table::set_cell_cell_text_style set_cell_cell_text_style @endlink -- set cell text style + - @link fort::table::set_cell_text_style set_cell_text_style @endlink -- set cell text style - @link fort::table::set_cell_content_text_style set_cell_content_text_style @endlink -- set content text style - @link fort::table::table_cell fort::table::table_cell @endlink -- table cell diff --git a/lib/fort.hpp b/lib/fort.hpp index 0a29d66..bd7598f 100644 --- a/lib/fort.hpp +++ b/lib/fort.hpp @@ -278,7 +278,7 @@ public: * - true: Success; cell property was changed. * - false: In case of error. */ - bool set_cell_cell_bg_color(enum fort::color value) + bool set_cell_bg_color(enum fort::color value) { return set_property(FT_CPROP_CELL_BG_COLOR, static_cast(value)); } @@ -306,7 +306,7 @@ public: * - true: Success; cell property was changed. * - false: In case of error. */ - bool set_cell_cell_text_style(enum fort::text_style value) + bool set_cell_text_style(enum fort::text_style value) { return set_property(FT_CPROP_CELL_TEXT_STYLE, static_cast(value)); } diff --git a/tests/bb_tests_cpp/test_table_properties.cpp b/tests/bb_tests_cpp/test_table_properties.cpp index 47b5de2..18a438d 100644 --- a/tests/bb_tests_cpp/test_table_properties.cpp +++ b/tests/bb_tests_cpp/test_table_properties.cpp @@ -584,7 +584,7 @@ void test_cpp_table_text_styles(void) WHEN("Simple table with one cell and background cell color") { fort::table table; - table[0][0].set_cell_cell_bg_color(fort::color::yellow); + table[0][0].set_cell_bg_color(fort::color::yellow); table << 42; std::string table_str = table.to_string(); @@ -633,7 +633,7 @@ void test_cpp_table_text_styles(void) WHEN("Simple table with one cell and cell style") { fort::table table; - table[0][0].set_cell_cell_text_style(fort::text_style::underlined); + table[0][0].set_cell_text_style(fort::text_style::underlined); table << 42; std::string table_str = table.to_string(); @@ -649,8 +649,8 @@ void test_cpp_table_text_styles(void) WHEN("Simple table with one cell and multiple cell style") { fort::table table; - table[0][0].set_cell_cell_text_style(fort::text_style::underlined); - table[0][0].set_cell_cell_text_style(fort::text_style::bold); + table[0][0].set_cell_text_style(fort::text_style::underlined); + table[0][0].set_cell_text_style(fort::text_style::bold); table << 42; std::string table_str = table.to_string(); @@ -667,7 +667,7 @@ void test_cpp_table_text_styles(void) fort::table table; table[0][0].set_cell_content_fg_color(fort::color::yellow); - table[0][0].set_cell_cell_bg_color(fort::color::red); + table[0][0].set_cell_bg_color(fort::color::red); table[0][0].set_cell_content_text_style(fort::text_style::underlined); table << 42;