From: Yury Usishchev Date: Tue, 23 Sep 2014 10:12:09 +0000 (+0400) Subject: Remove unused functions X-Git-Tag: accepted/tizen/common/20140925.172059~4 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=120c462b74858ad2316c748b8656f23ed32779ea Remove unused functions Change-Id: I91799f10ad84983e0a0e722e8605fc275b51d583 Signed-off-by: Yury Usishchev --- diff --git a/base/dali-toolkit/internal/builder/builder-impl.cpp b/base/dali-toolkit/internal/builder/builder-impl.cpp index ee8f8fc..23ea9f8 100644 --- a/base/dali-toolkit/internal/builder/builder-impl.cpp +++ b/base/dali-toolkit/internal/builder/builder-impl.cpp @@ -87,98 +87,6 @@ std::string ToString(const Rect& value) return ss.str(); } - -std::string PropertyValueToString( const Property::Value& value ) -{ - std::string ret; - - switch( value.GetType() ) - { - case Property::NONE: - { - ret = "NONE"; - break; - } ///< No type - case Property::BOOLEAN: - { - ret = value.Get() ? "True" : "False"; - break; - } - case Property::FLOAT: - { - - ret = ToString( value.Get() ); - break; - } - case Property::INTEGER: - { - ret = ToString( value.Get() ); - break; - } - case Property::UNSIGNED_INTEGER: - { - ret = ToString( value.Get() ); - break; - } - case Property::VECTOR2: - { - ret = ToString( value.Get() ); - break; - } - case Property::VECTOR3: - { - ret = ToString( value.Get() ); - break; - } - case Property::VECTOR4: - { - ret = ToString( value.Get() ); - break; - } - case Property::MATRIX3: - { - ret = ToString( value.Get() ); - break; - } - case Property::MATRIX: - { - ret = ToString( value.Get() ); - break; - } - case Property::RECTANGLE: - { - ret = ToString( value.Get< Rect >() ); - break; - } - case Property::ROTATION: - { - break; - } - case Property::STRING: - { - ret = value.Get(); - break; - } - case Property::ARRAY: - { - ret = std::string("Array Size=") + ToString( value.Get().size() ); - break; - } - case Property::MAP: - { - ret = std::string("Map Size=") + ToString( value.Get().size() ); - break; - } - case Property::TYPE_COUNT: - { - ret = ""; - break; - } - } - - return ret; -} - /* * Recursively collects all stylesin a node (An array of style names). * diff --git a/base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp b/base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp index 21d9840..d82cb4f 100644 --- a/base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp +++ b/base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp @@ -86,36 +86,6 @@ enum SelectionState SelectionFinished ///< Finished selected section }; -/** - * Whether the given style is the default style or not. - * @param[in] style The given style. - * @return \e true if the given style is the default. Otherwise it returns \e false. - */ -bool IsDefaultStyle( const TextStyle& style ) -{ - return DEFAULT_TEXT_STYLE == style; -} - -/** - * Whether the given styled text is using the default style or not. - * @param[in] textArray The given text. - * @return \e true if the given styled text is using the default style. Otherwise it returns \e false. - */ -bool IsTextDefaultStyle( const Toolkit::MarkupProcessor::StyledTextArray& textArray ) -{ - for( Toolkit::MarkupProcessor::StyledTextArray::const_iterator it = textArray.begin(), endIt = textArray.end(); it != endIt; ++it ) - { - const TextStyle& style( (*it).mStyle ); - - if( !IsDefaultStyle( style ) ) - { - return false; - } - } - - return true; -} - std::size_t FindVisibleCharacterLeft( std::size_t cursorPosition, const Toolkit::TextView::CharacterLayoutInfoContainer& characterLayoutInfoTable ) { for( Toolkit::TextView::CharacterLayoutInfoContainer::const_reverse_iterator it = characterLayoutInfoTable.rbegin() + characterLayoutInfoTable.size() - cursorPosition, endIt = characterLayoutInfoTable.rend(); diff --git a/optional/dali-toolkit/internal/controls/cluster/cluster-style-impl.cpp b/optional/dali-toolkit/internal/controls/cluster/cluster-style-impl.cpp index b9b9946..14ff051 100644 --- a/optional/dali-toolkit/internal/controls/cluster/cluster-style-impl.cpp +++ b/optional/dali-toolkit/internal/controls/cluster/cluster-style-impl.cpp @@ -292,11 +292,6 @@ unsigned int genRandom(unsigned int& seed, unsigned int offset) return seed; } -float genRandomFloat(unsigned int& seed, unsigned int offset) -{ - return static_cast(genRandom(seed, offset)) / 0xffffffff; -} - float genRandomFloat(unsigned int& seed, unsigned int offset, float min, float max) { const float f = static_cast(genRandom(seed, offset)) / 0xffffffff; diff --git a/optional/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp b/optional/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp index 9783240..3e23a8a 100644 --- a/optional/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp +++ b/optional/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp @@ -115,22 +115,6 @@ struct RenderTaskViewportSizeConstraint } }; -/** - * Returns relative border (0.0f...1.0f x 0.0f...1.0f) - * from an absolute pixel specified border. - * @param[in] absolute A border using absolute pixel coordinates - * @param[in] width The width of the texture - * @param[in] height The height of the texture. - * @return A border relative to the size of the Image texture dimensions. - */ -Vector4 GetRelativeBorder(Vector4 absolute, float width, float height) -{ - return Vector4( absolute.x / width, - absolute.y / height, - absolute.z / width, - absolute.w / height); -} - } namespace Dali