diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/inc/ViewShellBase.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 089368ab1542..7d1e7d53754f 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -123,6 +123,10 @@ public: */ virtual void GetState (SfxItemSet& rSet); + /* override these from SfxViewShell */ + virtual String GetSelectionText(sal_Bool); + virtual sal_Bool HasSelection(sal_Bool) const; + SvBorder GetBorder (bool bOuterResize); virtual void InnerResizePixel (const Point& rOrigin, const Size& rSize); virtual void OuterResizePixel (const Point& rOrigin, const Size& rSize); diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 764884112fae..d5d1ded0d196 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -489,7 +489,25 @@ void ViewShellBase::InitializeFramework (void) } +String ViewShellBase::GetSelectionText(sal_Bool bCompleteWords) +{ + ::boost::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); + DrawViewShell *const pDrawViewShell( + dynamic_cast<DrawViewShell*>(pMainShell.get())); + return (pDrawViewShell) + ? pDrawViewShell->GetSelectionText(bCompleteWords) + : SfxViewShell::GetSelectionText(bCompleteWords); +} +sal_Bool ViewShellBase::HasSelection(sal_Bool bText) const +{ + ::boost::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); + DrawViewShell *const pDrawViewShell( + dynamic_cast<DrawViewShell*>(pMainShell.get())); + return (pDrawViewShell) + ? pDrawViewShell->HasSelection(bText) + : SfxViewShell::HasSelection(bText); +} void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize) { |