summaryrefslogtreecommitdiff
path: root/vcl/source/window/layout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/layout.cxx')
-rw-r--r--vcl/source/window/layout.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 36ebf51a74ff..4c98d7a88ad5 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2859,19 +2859,27 @@ void VclDrawingArea::StartDrag(sal_Int8, const Point&)
OUString VclDrawingArea::GetSurroundingText() const
{
+ if (!m_aGetSurroundingHdl.IsSet())
+ return Control::GetSurroundingText();
OUString sSurroundingText;
- if (m_aGetSurroundingHdl.Call(sSurroundingText) != -1)
- return sSurroundingText;
- return Control::GetSurroundingText();
+ m_aGetSurroundingHdl.Call(sSurroundingText);
+ return sSurroundingText;
}
Selection VclDrawingArea::GetSurroundingTextSelection() const
{
+ if (!m_aGetSurroundingHdl.IsSet())
+ return Control::GetSurroundingTextSelection();
OUString sSurroundingText;
int nCursor = m_aGetSurroundingHdl.Call(sSurroundingText);
- if (nCursor != -1)
- return Selection(nCursor, nCursor);
- return Control::GetSurroundingTextSelection();
+ return Selection(nCursor, nCursor);
+}
+
+bool VclDrawingArea::DeleteSurroundingText(const Selection& rSelection)
+{
+ if (!m_aDeleteSurroundingHdl.IsSet())
+ return Control::DeleteSurroundingText(rSelection);
+ return m_aDeleteSurroundingHdl.Call(rSelection);
}
VclHPaned::~VclHPaned()