Author: orw
Date: Fri Apr 26 12:20:19 2013
New Revision: 1476164
URL: http://svn.apache.org/r1476164
Log:
122156 122087: correct context notification regarding the text edit mode for
Drawing objects
Modified:
openoffice/trunk/main/sd/source/ui/view/sdview.cxx
openoffice/trunk/main/svx/source/sidebar/SelectionAnalyzer.cxx
openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx
Modified: openoffice/trunk/main/sd/source/ui/view/sdview.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/sdview.cxx?rev=1476164&r1=1476163&r2=1476164&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/sdview.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/sdview.cxx Fri Apr 26 12:20:19 2013
@@ -780,10 +780,6 @@ sal_Bool View::SdrBeginTextEdit(
pGivenOutlinerView, bDontDeleteOutliner,
bOnlyOneView, bGrabFocus);
- ContextChangeEventMultiplexer::NotifyContextChange(
- &GetViewShell()->GetViewShellBase(),
- ::sfx2::sidebar::EnumContext::Context_DrawText);
-
if (bReturn)
{
::Outliner* pOL = GetTextEditOutliner();
@@ -844,22 +840,18 @@ SdrEndTextEditKind View::SdrEndTextEdit(
}
}
-
GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent(
+ GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent(
sd::tools::EventMultiplexerEvent::EID_END_TEXT_EDIT,
(void*)xObj.get() );
- if( xObj.is() )
- {
- ContextChangeEventMultiplexer::NotifyContextChange(
- &GetViewShell()->GetViewShellBase(),
- ::sfx2::sidebar::EnumContext::Context_Default);
-
+ if( xObj.is() )
+ {
SdPage* pPage = dynamic_cast< SdPage* >( xObj->GetPage() );
- if( pPage )
- pPage->onEndTextEdit( xObj.get() );
- }
+ if( pPage )
+ pPage->onEndTextEdit( xObj.get() );
+ }
- return(eKind);
+ return(eKind);
}
// --------------------------------------------------------------------
Modified: openoffice/trunk/main/svx/source/sidebar/SelectionAnalyzer.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sidebar/SelectionAnalyzer.cxx?rev=1476164&r1=1476163&r2=1476164&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/sidebar/SelectionAnalyzer.cxx (original)
+++ openoffice/trunk/main/svx/source/sidebar/SelectionAnalyzer.cxx Fri Apr 26
12:20:19 2013
@@ -24,6 +24,7 @@
#include "svx/sidebar/SelectionAnalyzer.hxx"
#include "svx/svdmrkv.hxx"
#include "svx/svdobj.hxx"
+#include "svx/svdotext.hxx"
#include "svx/svdpage.hxx"
#include "svx/fmglob.hxx"
#include "svx/globl3d.hxx"
@@ -47,12 +48,19 @@ EnumContext::Context SelectionAnalyzer::
case 1:
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- const sal_uInt32 nInv = pObj->GetObjInventor();
- const sal_uInt16 nObjId = pObj->GetObjIdentifier();
- if (nInv == SdrInventor)
- eContext = GetContextForObjectId_SC(nObjId);
- else if (nInv == FmFormInventor)
- eContext = EnumContext::Context_Form;
+ if ( pObj->ISA(SdrTextObj) && ((SdrTextObj*)pObj)->IsInEditMode() )
+ {
+ eContext = EnumContext::Context_DrawText;
+ }
+ else
+ {
+ const sal_uInt32 nInv = pObj->GetObjInventor();
+ const sal_uInt16 nObjId = pObj->GetObjIdentifier();
+ if (nInv == SdrInventor)
+ eContext = GetContextForObjectId_SC(nObjId);
+ else if (nInv == FmFormInventor)
+ eContext = EnumContext::Context_Form;
+ }
break;
}
@@ -114,25 +122,32 @@ EnumContext::Context SelectionAnalyzer::
case 1:
{
SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- const sal_uInt32 nInv = pObj->GetObjInventor();
- sal_uInt16 nObjId = pObj->GetObjIdentifier();
- if (nInv == SdrInventor)
- {
- if (nObjId == OBJ_GRUP)
- {
- nObjId = GetObjectTypeFromGroup(pObj);
- if (nObjId == 0)
- nObjId = OBJ_GRUP;
- }
- eContext = GetContextForObjectId_SD(nObjId, bIsHandoutPage,
bIsNotesPage);
- }
- else if (nInv == E3dInventor)
+ if ( pObj->ISA(SdrTextObj) && ((SdrTextObj*)pObj)->IsInEditMode() )
{
- eContext = EnumContext::Context_3DObject;
+ eContext = EnumContext::Context_DrawText;
}
- else if (nInv == FmFormInventor)
+ else
{
- eContext = EnumContext::Context_Form;
+ const sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nObjId = pObj->GetObjIdentifier();
+ if (nInv == SdrInventor)
+ {
+ if (nObjId == OBJ_GRUP)
+ {
+ nObjId = GetObjectTypeFromGroup(pObj);
+ if (nObjId == 0)
+ nObjId = OBJ_GRUP;
+ }
+ eContext = GetContextForObjectId_SD(nObjId,
bIsHandoutPage, bIsNotesPage);
+ }
+ else if (nInv == E3dInventor)
+ {
+ eContext = EnumContext::Context_3DObject;
+ }
+ else if (nInv == FmFormInventor)
+ {
+ eContext = EnumContext::Context_Form;
+ }
}
break;
}
Modified: openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx?rev=1476164&r1=1476163&r2=1476164&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx (original)
+++ openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx Fri Apr 26 12:20:19 2013
@@ -689,12 +689,14 @@ sal_Bool SdrObjEditView::SdrBeginTextEdi
aMinTextEditArea.Move(aPvOfs.X(),aPvOfs.Y());
pTextEditCursorMerker=pWin->GetCursor();
- aHdl.SetMoveOutside(sal_True);
+ aHdl.SetMoveOutside(sal_True);
- // #i72757#
- // Since IsMarkHdlWhenTextEdit() is ignored, it is
necessary
- // to call AdjustMarkHdl() always.
- AdjustMarkHdl();
+ // #i72757#
+ // 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);
@@ -1027,10 +1029,12 @@ SdrEndTextEditKind SdrObjEditView::SdrEn
((SdrTextObj*)pTEObj)->SetTextAnimationAllowed(sal_True);
}
- // #i72757#
- // Since IsMarkHdlWhenTextEdit() is ignored, it is
necessary
- // to call AdjustMarkHdl() always.
- AdjustMarkHdl();
+ // #i72757#
+ // 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;)