fixed bug(N_SE-44524)
authorChulheon <ch.jeong47@samsung.com>
Wed, 3 Jul 2013 12:53:17 +0000 (21:53 +0900)
committerChulheon <ch.jeong47@samsung.com>
Wed, 3 Jul 2013 12:53:17 +0000 (21:53 +0900)
Change-Id: I4c6f251a848434614dfd607322413a0115459706

src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp
src/ui/controls/FUiCtrl_EditPresenter.cpp
src/ui/inc/FUiCtrl_EditPresenter.h

index 6f5baee..b0e46f9 100644 (file)
@@ -936,6 +936,23 @@ _EditCopyPasteHandler::CheckReverseStatus(void)
        _ControlOrientation orientation = pEdit->GetOrientation();
        FloatRectangle rect = GetBoundsF();
        FloatRectangle cursorAbsBounds = __pCopyPasteManager->GetCursorBoundsF(true);
+       float clipboardHeight = 0.0f;
+       FloatRectangle keypadBounds(0.0f, 0.0f, 0.0f, 0.0f);
+       float adjustHeight = 0.0f;
+
+       _EditPresenter* pEditPresenter = pEdit->GetPresenter();
+       SysTryReturnVoidResult(NID_UI_CTRL, pEditPresenter, E_INVALID_STATE, "pEditPresenter is null.\n");
+
+       clipboardHeight = pEditPresenter->GetClipboardHeight();
+       pEditPresenter->GetKeypadBoundsEx(keypadBounds);
+       if (clipboardHeight > keypadBounds.height)
+       {
+               adjustHeight = clipboardHeight;
+       }
+       else
+       {
+               adjustHeight = keypadBounds.height;
+       }
 
        if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
        {
@@ -946,6 +963,10 @@ _EditCopyPasteHandler::CheckReverseStatus(void)
                screenSize.width = pControlManager->GetScreenSizeF().height;
                screenSize.height = pControlManager->GetScreenSizeF().width;
        }
+       if (adjustHeight > 0.0f)
+       {
+               screenSize.height -= adjustHeight;
+       }
 
        if (__singleHandler)
        {
index 30384b1..d654fc0 100755 (executable)
@@ -175,7 +175,7 @@ _EditPresenter::_EditPresenter(void)
        , __titleBounds()
        , __clientBounds()
        , __previousCursorBounds()
-       , __keypadBounds()
+       , __keypadBounds(0.0f, 0.0f, 0.0f,0.0f)
        , __pTextObject(null)
        , __pGuideTextObject(null)
        , __pTitleTextObject(null)
@@ -486,6 +486,16 @@ _EditPresenter::OnInputConnectionPanelBoundsChanged(InputConnection& source, con
 
        __pEdit->SendKeypadEvent(GetKeypadAction(), CORE_KEYPAD_EVENT_STATUS_BOUNDS_CHANGED);
 
+       if (__isCopyPasteManagerExist)
+       {
+               DrawText();
+               if (__pCopyPasteManager->GetCopyPastePopup())
+               {
+                       __pCopyPasteManager->CreateCopyPastePopup();
+               }
+               __pCopyPasteManager->Show();
+       }
+
        return;
 }
 
@@ -7056,7 +7066,7 @@ _EditPresenter::DeleteFullscreenKeypad(void)
 }
 
 result
-_EditPresenter::GetKeypadBounds(FloatRectangle& bounds) const
+_EditPresenter::GetKeypadBounds(FloatRectangle& bounds)
 {
        if (__pInputConnection == null)
        {
@@ -7072,6 +7082,7 @@ _EditPresenter::GetKeypadBounds(FloatRectangle& bounds) const
        SysTryReturnResult(NID_UI_CTRL, pXformer, E_SYSTEM, "Coordinate system load failed.");
 
        bounds = pXformer->Transform(bounds);
+       __keypadBounds = bounds;
 
        return E_SUCCESS;
 }
@@ -9656,14 +9667,14 @@ _EditPresenter::CalculateMaximumFlexibleHeight(void)
        return maxHeight;
 }
 
-bool
-_EditPresenter::SetKeypadBounds(const FloatRectangle& bounds)
+void
+_EditPresenter::GetKeypadBoundsEx(Tizen::Graphics::FloatRectangle& bounds) const
 {
-       __keypadBounds.x = bounds.x;
-       __keypadBounds.y = bounds.y;
-       __keypadBounds.width = bounds.width;
-       __keypadBounds.height = bounds.height;
-       return true;
+       bounds.x = __keypadBounds.x;
+       bounds.y = __keypadBounds.y;
+       bounds.width = __keypadBounds.width;
+       bounds.height = __keypadBounds.height;
+       return;
 }
 
 _Form*
index a55821e..73de884 100755 (executable)
@@ -193,7 +193,6 @@ public:
        result SetKeypadCommandButton(CommandButtonPosition position, const Tizen::Base::String& text, int actionId);
        _Toolbar* GetKeypadCommandButton(void) const;
        result SetKeypadCommandButtonVisible(bool visible);
-       bool SetKeypadBounds(const Tizen::Graphics::FloatRectangle& bounds);
        result SetText(const Tizen::Base::String& text);
        result SetTextAlignment(HorizontalAlignment alignment);
        result SetTextBounds(Tizen::Graphics::Rectangle& bounds);
@@ -225,7 +224,8 @@ public:
        float GetTextSizeF(void) const;
        unsigned long GetInputModeCategory(void) const;
        CoreKeypadAction GetKeypadAction(void) const;
-       result GetKeypadBounds(Tizen::Graphics::FloatRectangle& bounds) const;
+       result GetKeypadBounds(Tizen::Graphics::FloatRectangle& bounds);
+       void GetKeypadBoundsEx(Tizen::Graphics::FloatRectangle& bounds) const;
        float GetClipboardHeight(void) const;
        bool CheckKeypadExist(_ControlOrientation orientation);
        bool IsKeypadRotating(_ControlOrientation orientation);