tdf#164213: don't activate OLE objects in read-only mode
Similar to the check done in SwEditWin::MouseButtonDown. Change-Id: I1a1b8966502a6b1557d424f28cfc1c1ecdf4b65e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177930 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
aefc769e62
commit
5950fe86b8
2 changed files with 5 additions and 3 deletions
|
@ -640,7 +640,8 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt)
|
|||
SdrInventor nInv = pObj->GetObjInventor();
|
||||
SdrObjKind nSdrObjKind = pObj->GetObjIdentifier();
|
||||
|
||||
if (nInv == SdrInventor::Default && nSdrObjKind == SdrObjKind::OLE2)
|
||||
if (nInv == SdrInventor::Default && nSdrObjKind == SdrObjKind::OLE2
|
||||
&& !mpDocSh->IsReadOnly())
|
||||
{
|
||||
// activate OLE-object
|
||||
SfxInt16Item aItem(SID_OBJECT, 0);
|
||||
|
@ -649,7 +650,8 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt)
|
|||
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
|
||||
{ &aItem });
|
||||
}
|
||||
else if (nInv == SdrInventor::Default && nSdrObjKind == SdrObjKind::Graphic && pObj->IsEmptyPresObj() )
|
||||
else if (nInv == SdrInventor::Default && nSdrObjKind == SdrObjKind::Graphic
|
||||
&& pObj->IsEmptyPresObj() && !mpDocSh->IsReadOnly())
|
||||
{
|
||||
mpViewShell->GetViewFrame()->
|
||||
GetDispatcher()->Execute( SID_INSERT_GRAPHIC,
|
||||
|
|
|
@ -232,7 +232,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
|
|||
bReturn = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (!mpDocSh->IsReadOnly())
|
||||
{
|
||||
// activate OLE object on RETURN for selected object
|
||||
// activate text edit on RETURN for selected object
|
||||
|
|
Loading…
Reference in a new issue