From: Kimmo Hoikka Date: Wed, 24 Sep 2014 13:45:46 +0000 (-0700) Subject: Merge "Completely remove use of Adaptor class" into tizen X-Git-Tag: accepted/tizen/common/20140925.172059~3 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=d75e2f3c09d1667c853a5683f0d98b4f8d47e457;hp=-c Merge "Completely remove use of Adaptor class" into tizen --- d75e2f3c09d1667c853a5683f0d98b4f8d47e457 diff --combined base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp index d82cb4f,74da01e..69e02a8 --- 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,6 -86,36 +86,6 @@@ enum SelectionStat 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(); @@@ -1042,13 -1072,10 +1042,10 @@@ void TextInput::OnKeyInputFocusGained( mClipboard = Clipboard::Get(); // Store handle to clipboard // Now in edit mode we can accept string to paste from clipboard - if( Adaptor::IsAvailable() ) + ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() ); + if ( notifier ) { - ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() ); - if ( notifier ) - { - notifier.ContentSelectedSignal().Connect( this, &TextInput::OnClipboardTextSelected ); - } + notifier.ContentSelectedSignal().Connect( this, &TextInput::OnClipboardTextSelected ); } } @@@ -1092,19 -1119,16 +1089,16 @@@ void TextInput::OnKeyInputFocusLost( mClipboard.Reset(); // No longer in edit mode so do not want to receive string from clipboard - if( Adaptor::IsAvailable() ) + ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() ); + if ( notifier ) { - ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() ); - if ( notifier ) - { - notifier.ContentSelectedSignal().Disconnect( this, &TextInput::OnClipboardTextSelected ); - } - Clipboard clipboard = Clipboard::Get(); + notifier.ContentSelectedSignal().Disconnect( this, &TextInput::OnClipboardTextSelected ); + } - if ( clipboard ) - { - clipboard.HideClipboard(); - } + Clipboard clipboard = Clipboard::Get(); + if ( clipboard ) + { + clipboard.HideClipboard(); } }