Kaydet (Commit) 3dd1e0f8 authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann

122156 122087: correct context notification regarding the text edit mode for…

122156 122087: correct context notification regarding the text edit mode for Drawing objects - take two
üst bd198b65
......@@ -75,6 +75,19 @@ public:
virtual void DeleteMarked();
virtual sal_Bool SdrBeginTextEdit(
SdrObject* pObj,
SdrPageView* pPV = 0L,
::Window* pWin = 0L,
sal_Bool bIsNewObj = sal_False,
SdrOutliner* pGivenOutliner = 0L,
OutlinerView* pGivenOutlinerView = 0L,
sal_Bool bDontDeleteOutliner = sal_False,
sal_Bool bOnlyOneView = sal_False,
sal_Bool bGrabFocus = sal_True);
virtual SdrEndTextEditKind SdrEndTextEdit( sal_Bool bDontDeleteReally = sal_False );
void DrawMarks( OutputDevice* pOut ) const;
void MarkDropObj( SdrObject* pObj );
......
......@@ -587,6 +587,60 @@ void ScDrawView::MarkListHasChanged()
}
sal_Bool ScDrawView::SdrBeginTextEdit(
SdrObject* pObj,
SdrPageView* pPV,
::Window* pWinL,
sal_Bool bIsNewObj,
SdrOutliner* pGivenOutliner,
OutlinerView* pGivenOutlinerView,
sal_Bool bDontDeleteOutliner,
sal_Bool bOnlyOneView,
sal_Bool bGrabFocus )
{
const sal_Bool bRet = FmFormView::SdrBeginTextEdit(
pObj, pPV, pWinL, bIsNewObj,
pGivenOutliner, pGivenOutlinerView, bDontDeleteOutliner,
bOnlyOneView, bGrabFocus );
ScTabViewShell* pViewSh = pViewData->GetViewShell();
if ( pViewSh->GetViewFrame() )
{
SfxFrame& rFrame = pViewSh->GetViewFrame()->GetFrame();
uno::Reference< frame::XController > xController = rFrame.GetController();
if (xController.is())
{
ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
if (pImp)
pImp->SelectionChanged();
}
}
return bRet;
}
SdrEndTextEditKind ScDrawView::SdrEndTextEdit( sal_Bool bDontDeleteReally )
{
const SdrEndTextEditKind eRet = FmFormView::SdrEndTextEdit( bDontDeleteReally );
ScTabViewShell* pViewSh = pViewData->GetViewShell();
if ( pViewSh->GetViewFrame() )
{
SfxFrame& rFrame = pViewSh->GetViewFrame()->GetFrame();
uno::Reference< frame::XController > xController = rFrame.GetController();
if (xController.is())
{
ScTabViewObj* pImp = ScTabViewObj::getImplementation( xController );
if (pImp)
pImp->SelectionChanged();
}
}
return eRet;
}
void __EXPORT ScDrawView::ModelHasChanged()
{
SdrObject* pEditObj = GetTextEditObject();
......
......@@ -97,6 +97,7 @@
#include <drawinglayer/primitive2d/textprimitive2d.hxx>
#include <svx/unoapi.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include "DrawController.hxx"
#include <numeric>
......@@ -780,6 +781,11 @@ sal_Bool View::SdrBeginTextEdit(
pGivenOutlinerView, bDontDeleteOutliner,
bOnlyOneView, bGrabFocus);
if ( mpViewSh )
{
mpViewSh->GetViewShellBase().GetDrawController().FireSelectionChangeListener();
}
if (bReturn)
{
::Outliner* pOL = GetTextEditOutliner();
......@@ -846,6 +852,11 @@ SdrEndTextEditKind View::SdrEndTextEdit(sal_Bool bDontDeleteReally )
if( xObj.is() )
{
if ( mpViewSh )
{
mpViewSh->GetViewShellBase().GetDrawController().FireSelectionChangeListener();
}
SdPage* pPage = dynamic_cast< SdPage* >( xObj->GetPage() );
if( pPage )
pPage->onEndTextEdit( xObj.get() );
......
......@@ -695,8 +695,6 @@ sal_Bool SdrObjEditView::SdrBeginTextEdit(
// Since IsMarkHdlWhenTextEdit() is ignored, it is necessary
// to call AdjustMarkHdl() always.
AdjustMarkHdl();
// Call <MarkListHasChanged()> as it also handles context changes for sidebar
MarkListHasChanged();
pTextEditOutlinerView=ImpMakeOutlinerView(pWin,!bEmpty,pGivenOutlinerView);
......@@ -1033,8 +1031,6 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool bDontDeleteReally)
// Since IsMarkHdlWhenTextEdit() is ignored, it is necessary
// to call AdjustMarkHdl() always.
AdjustMarkHdl();
// Call <MarkListHasChanged()> as it also handles context changes for sidebar
MarkListHasChanged();
}
// alle OutlinerViews loeschen
for (sal_uIntPtr i=pTEOutliner->GetViewCount(); i>0;)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment