From: Chulheon Date: Wed, 3 Jul 2013 12:53:17 +0000 (+0900) Subject: fixed bug(N_SE-44524) X-Git-Tag: accepted/tizen/20130924.144426~1^2~195^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d2507ae596a305c0ce4d977e801261c07e44806;p=platform%2Fframework%2Fnative%2Fuifw.git fixed bug(N_SE-44524) Change-Id: I4c6f251a848434614dfd607322413a0115459706 --- diff --git a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp index 6f5baee..b0e46f9 100644 --- a/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp +++ b/src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp @@ -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) { diff --git a/src/ui/controls/FUiCtrl_EditPresenter.cpp b/src/ui/controls/FUiCtrl_EditPresenter.cpp index 30384b1..d654fc0 100755 --- a/src/ui/controls/FUiCtrl_EditPresenter.cpp +++ b/src/ui/controls/FUiCtrl_EditPresenter.cpp @@ -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* diff --git a/src/ui/inc/FUiCtrl_EditPresenter.h b/src/ui/inc/FUiCtrl_EditPresenter.h index a55821e..73de884 100755 --- a/src/ui/inc/FUiCtrl_EditPresenter.h +++ b/src/ui/inc/FUiCtrl_EditPresenter.h @@ -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);