From edb3ee1991fd95afb1e21d7bcd4603307cfe31af Mon Sep 17 00:00:00 2001 From: "taeyoon0.lee" Date: Wed, 11 Oct 2017 18:04:23 +0900 Subject: [PATCH 1/1] Revert "[4.0] Fix text outline property related native TCT" This reverts commit 5c413e9b53670f574b9dd09078cac702834643ed. Change-Id: Idcc45515c66e4f272fc8ddc79b44347981656ab0 --- .../src/dali-toolkit/utc-Dali-TextEditor.cpp | 7 ---- .../src/dali-toolkit/utc-Dali-TextField.cpp | 7 ---- .../src/dali-toolkit/utc-Dali-TextLabel.cpp | 7 ---- dali-toolkit/internal/text/text-controller-impl.h | 2 - dali-toolkit/internal/text/text-controller.cpp | 10 ----- dali-toolkit/internal/text/text-controller.h | 12 ------ dali-toolkit/internal/text/text-effects-style.cpp | 45 ++++++---------------- 7 files changed, 12 insertions(+), 78 deletions(-) diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp index 48b6fa3..59925df 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp @@ -732,13 +732,6 @@ int UtcDaliTextEditorSetPropertyP(void) DALI_TEST_EQUALS( editor.GetProperty( TextEditor::Property::INPUT_EMBOSS ), std::string("Emboss input properties"), TEST_LOCATION ); // Check the outline property - - // Test string type first - // This is purely to maintain backward compatibility, but we don't support string as the outline property type. - editor.SetProperty( TextEditor::Property::OUTLINE, "Outline properties" ); - DALI_TEST_EQUALS( editor.GetProperty( TextEditor::Property::OUTLINE ), std::string("Outline properties"), TEST_LOCATION ); - - // Then test the property map type Property::Map outlineMapSet; Property::Map outlineMapGet; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp index 007508b..df0a150 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp @@ -829,13 +829,6 @@ int UtcDaliTextFieldSetPropertyP(void) DALI_TEST_EQUALS( field.GetProperty( TextField::Property::INPUT_EMBOSS ), std::string("Emboss input properties"), TEST_LOCATION ); // Check the outline property - - // Test string type first - // This is purely to maintain backward compatibility, but we don't support string as the outline property type. - field.SetProperty( TextField::Property::OUTLINE, "Outline properties" ); - DALI_TEST_EQUALS( field.GetProperty( TextField::Property::OUTLINE ), std::string("Outline properties"), TEST_LOCATION ); - - // Then test the property map type Property::Map outlineMapSet; Property::Map outlineMapGet; diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp index ec4b100..1130c39 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp @@ -446,13 +446,6 @@ int UtcDaliToolkitTextLabelSetPropertyP(void) DALI_TEST_EQUALS( label.GetProperty( TextLabel::Property::EMBOSS ), std::string("Emboss properties"), TEST_LOCATION ); // Check the outline property - - // Test string type first - // This is purely to maintain backward compatibility, but we don't support string as the outline property type. - label.SetProperty( TextLabel::Property::OUTLINE, "Outline properties" ); - DALI_TEST_EQUALS( label.GetProperty( TextLabel::Property::OUTLINE ), std::string("Outline properties"), TEST_LOCATION ); - - // Then test the property map type Property::Map outlineMapSet; Property::Map outlineMapGet; diff --git a/dali-toolkit/internal/text/text-controller-impl.h b/dali-toolkit/internal/text/text-controller-impl.h index 44d1a7d..23188f5 100644 --- a/dali-toolkit/internal/text/text-controller-impl.h +++ b/dali-toolkit/internal/text/text-controller-impl.h @@ -324,7 +324,6 @@ struct Controller::Impl mAutoScrollDirectionRTL( false ), mUnderlineSetByString( false ), mShadowSetByString( false ), - mOutlineSetByString( false ), mFontStyleSetByString( false ), mShouldClearFocusOnEscape( true ) { @@ -746,7 +745,6 @@ public: bool mUnderlineSetByString:1; ///< Set when underline is set by string (legacy) instead of map bool mShadowSetByString:1; ///< Set when shadow is set by string (legacy) instead of map - bool mOutlineSetByString:1; ///< Set when outline is set by string (legacy) instead of map bool mFontStyleSetByString:1; ///< Set when font style is set by string (legacy) instead of map bool mShouldClearFocusOnEscape:1; ///< Whether text control should clear key input focus }; diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index 4137326..4cc9d90 100755 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -1750,16 +1750,6 @@ void Controller::ShadowSetByString( bool setByString ) mImpl->mShadowSetByString = setByString; } -bool Controller::IsOutlineSetByString() -{ - return mImpl->mOutlineSetByString; -} - -void Controller::OutlineSetByString( bool setByString ) -{ - mImpl->mOutlineSetByString = setByString; -} - bool Controller::IsFontStyleSetByString() { return mImpl->mFontStyleSetByString; diff --git a/dali-toolkit/internal/text/text-controller.h b/dali-toolkit/internal/text/text-controller.h index fc75596..b02bb68 100755 --- a/dali-toolkit/internal/text/text-controller.h +++ b/dali-toolkit/internal/text/text-controller.h @@ -461,18 +461,6 @@ public: // Configure the text controller. void ShadowSetByString( bool setByString ); /** - * @brief Query if outline settings were provided by string or map - * @return bool true if set by string - */ - bool IsOutlineSetByString(); - - /** - * Set method outline setting were set by - * @param[in] bool, true if set by string - */ - void OutlineSetByString( bool setByString ); - - /** * @brief Query if font style settings were provided by string or map * @return bool true if set by string */ diff --git a/dali-toolkit/internal/text/text-effects-style.cpp b/dali-toolkit/internal/text/text-effects-style.cpp index ea1b3cf..8b71d30 100755 --- a/dali-toolkit/internal/text/text-effects-style.cpp +++ b/dali-toolkit/internal/text/text-effects-style.cpp @@ -507,26 +507,13 @@ bool SetOutlineProperties( ControllerPtr controller, const Property::Value& valu bool empty = true; - if ( propertiesMap.Empty() ) - { - // Map empty so check if a string provided - // This is purely to maintain backward compatibility, but we don't parse the string to be a property map. - const std::string propertyString = value.Get(); - - // Stores the default outline's properties string to be recovered by the GetOutlineProperties() function. - controller->SetDefaultOutlineProperties( propertyString ); - - controller->OutlineSetByString( true ); - } - else + if ( !propertiesMap.Empty() ) { empty = ParseOutlineProperties( propertiesMap, colorDefined, color, widthDefined, width ); - - controller->OutlineSetByString( false ); } if( !empty ) @@ -576,30 +563,22 @@ void GetOutlineProperties( ControllerPtr controller, Property::Value& value, Eff { case EffectStyle::DEFAULT: { - if ( controller->IsOutlineSetByString() ) - { - value = controller->GetDefaultOutlineProperties(); - break; - } - else - { - const Vector4& color = controller->GetOutlineColor(); - const float width = controller->GetOutlineWidth(); + const Vector4& color = controller->GetOutlineColor(); + const float width = controller->GetOutlineWidth(); - Property::Map map; + Property::Map map; - std::string colorStr; - Vector4ToColorString( color, colorStr ); - map.Insert( COLOR_KEY, colorStr ); + std::string colorStr; + Vector4ToColorString( color, colorStr ); + map.Insert( COLOR_KEY, colorStr ); - std::string widthStr; - FloatToString( width, widthStr ); - map.Insert( WIDTH_KEY, widthStr ); + std::string widthStr; + FloatToString( width, widthStr ); + map.Insert( WIDTH_KEY, widthStr ); - value = map; + value = map; - break; - } + break; } case EffectStyle::INPUT: { -- 2.7.4