[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - include/svx sd/source svx/source
matteocam
matteo.campanelli at gmail.com
Fri Jul 24 08:40:36 PDT 2015
include/svx/textchaincursor.hxx | 4 +++-
sd/source/ui/view/sdview.cxx | 8 ++++++++
svx/source/svdraw/textchaincursor.cxx | 4 ++--
3 files changed, 13 insertions(+), 3 deletions(-)
New commits:
commit 0fcd7e73bf81069289b6de5510fd39f9fc4697a1
Author: matteocam <matteo.campanelli at gmail.com>
Date: Fri Jul 24 17:38:14 2015 +0200
Handle Chaining after Paste in sd
Change-Id: I0891842228251a52a252a29adbaabbed3f8965ba
diff --git a/include/svx/textchaincursor.hxx b/include/svx/textchaincursor.hxx
index 7668773..61e6939 100644
--- a/include/svx/textchaincursor.hxx
+++ b/include/svx/textchaincursor.hxx
@@ -20,13 +20,15 @@
#ifndef INCLUDED_SVX_TEXTCHAINCURSOR_HXX
#define INCLUDED_SVX_TEXTCHAINCURSOR_HXX
+#include <svx/svxdllapi.h>
+
class SdrObjEditView;
class SdrTextObj;
class KeyEvent;
class SdrOutliner;
-class TextChainCursorManager
+class SVX_DLLPUBLIC TextChainCursorManager
{
public:
TextChainCursorManager(SdrObjEditView *pEditView, const SdrTextObj *pTextObj);
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index b424cf7..9f2a83f 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -41,6 +41,8 @@
#include <svx/svdoutl.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
+#include <svx/textchaincursor.hxx>
+
#include <svx/svdetc.hxx>
#include <editeng/editstat.hxx>
@@ -1206,6 +1208,7 @@ void View::OnBeginPasteOrDrop( PasteOrDropInfos* /*pInfos*/ )
get the correct style sheet. */
void View::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
{
+ /* Style Sheet handling */
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( GetTextEditObject() );
SdrOutliner* pOutliner = GetTextEditOutliner();
if( pOutliner && pTextObj && pTextObj->GetPage() )
@@ -1256,6 +1259,11 @@ void View::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
}
}
}
+
+ /* Chaining handling */
+ ImpChainingEventHdl(NULL);
+ TextChainCursorManager *pCursorManager = new TextChainCursorManager(this, pTextObj);
+ ImpMoveCursorAfterChainingEvent(pCursorManager);
}
bool View::ShouldToggleOn(
commit f0aa62053f06c226a6394419ec8c345c2c634a94
Author: matteocam <matteo.campanelli at gmail.com>
Date: Fri Jul 24 17:16:08 2015 +0200
Detect DEL by KeyFuncType::DELETE
Change-Id: I062360a104e9ed07ac4b693536df0c45f18078b3
diff --git a/svx/source/svdraw/textchaincursor.cxx b/svx/source/svdraw/textchaincursor.cxx
index 35a339e..9f4e000 100644
--- a/svx/source/svdraw/textchaincursor.cxx
+++ b/svx/source/svdraw/textchaincursor.cxx
@@ -68,7 +68,7 @@ void TextChainCursorManager::impDetectEvent(const KeyEvent& rKEvt,
KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction();
// We need to have this KeyFuncType
- if (eFunc != KeyFuncType::DONTKNOW)
+ if (eFunc != KeyFuncType::DONTKNOW && eFunc != KeyFuncType::DELETE)
{
*pOutCursorEvt = CursorChainingEvent::NULL_EVENT;
return;
@@ -94,7 +94,7 @@ void TextChainCursorManager::impDetectEvent(const KeyEvent& rKEvt,
}
// Possibility: Are we "pushing" at the end of the object?
- if (nCode == KEY_DELETE && bAtEndOfTextContent && pNextLink)
+ if (eFunc == KeyFuncType::DELETE && bAtEndOfTextContent && pNextLink)
{
*pOutCursorEvt = CursorChainingEvent::TO_NEXT_LINK;
// Selection unchanged: we are at the beginning of the box
More information about the Libreoffice-commits
mailing list