Resolves: tdf#155076 set annotation cursor to Text on mouse enter

Change-Id: Ib3b1f90dd055ddd3b343f83d3118f090ea449b71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151362
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 62f65e2..d25fa9c 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -400,6 +400,13 @@ bool SidebarTextControl::MouseButtonUp(const MouseEvent& rMEvt)
    return bRet;
}

bool SidebarTextControl::MouseMove(const MouseEvent& rMEvt)
{
    if (rMEvt.IsEnterWindow())
        GetDrawingArea()->set_cursor(PointerStyle::Text);
    return WeldEditView::MouseMove(rMEvt);
}

IMPL_LINK( SidebarTextControl, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void )
{
    if ( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG )
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.hxx b/sw/source/uibase/docvw/SidebarTxtControl.hxx
index e0652aa..891d320 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.hxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.hxx
@@ -66,6 +66,7 @@ class SidebarTextControl : public WeldEditView
        virtual bool KeyInput(const KeyEvent& rKeyEvt) override;
        virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
        virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
        virtual bool MouseMove(const MouseEvent& rMEvt) override;

        void SetMapMode(const MapMode& rNewMapMode)
        {
diff --git a/sw/uiconfig/swriter/ui/annotation.ui b/sw/uiconfig/swriter/ui/annotation.ui
index d44c442..fc0e4c3 100644
--- a/sw/uiconfig/swriter/ui/annotation.ui
+++ b/sw/uiconfig/swriter/ui/annotation.ui
@@ -129,7 +129,7 @@
                  <object class="GtkDrawingArea" id="editview">
                    <property name="visible">True</property>
                    <property name="can-focus">True</property>
                    <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
                    <property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
                    <property name="hexpand">True</property>
                    <property name="vexpand">True</property>
                  </object>