Merge "Completely remove use of Adaptor class" into tizen
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Wed, 24 Sep 2014 13:45:46 +0000 (06:45 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 24 Sep 2014 13:45:46 +0000 (06:45 -0700)
1  2 
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();
    }
  }