/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
switch (nSlotId)
{ case SID_DELETE: case FN_BACKSPACE: if (pSh->GetSelectedObjCount())
{ if (pSdrView->HasMarkedPoints())
pSh->GetView().GetViewFrame().GetDispatcher()->Execute(SID_BEZIER_DELETE); else
{
pSh->DelSelectedObj(); if (pSh->IsSelFrameMode())
{
pSh->LeaveSelFrameMode();
pSh->NoEdit();
}
GetView().AttrChangedNotify(nullptr); // Shell change if applicable...
}
} break;
case FN_ESCAPE: if (pSdrView->HasMarkedPoints())
pSdrView->UnmarkAllPoints(); else
{ if ( pSh->IsDrawCreate() )
{
GetView().GetDrawFuncPtr()->BreakCreate();
GetView().AttrChangedNotify(nullptr); // Shell change if applicable...
} elseif ( pSh->HasSelection() || GetView().IsDrawMode() )
{
GetView().LeaveDrawCreate();
pSh->EnterStdMode();
GetView().AttrChangedNotify(nullptr); // Shell change if applicable...
}
} break;
case SID_BEZIER_MOVE: case SID_BEZIER_INSERT:
{
GetView().GetEditWin().SetBezierMode(nSlotId); static sal_uInt16 aInva[] =
{
SID_BEZIER_INSERT,
SID_BEZIER_MOVE,
0
};
GetView().GetViewFrame().GetBindings().Invalidate(aInva);
} break;
case SID_BEZIER_DELETE: case SID_BEZIER_CUTLINE: case SID_BEZIER_CONVERT: case SID_BEZIER_EDGE: case SID_BEZIER_SMOOTH: case SID_BEZIER_SYMMTR: case SID_BEZIER_CLOSE: case SID_BEZIER_ELIMINATE_POINTS:
{ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
if (rMarkList.GetMark(0) && !pSdrView->IsAction())
{ switch (nSlotId)
{ case SID_BEZIER_DELETE:
pSdrView->DeleteMarkedPoints(); break;
case SID_BEZIER_CUTLINE:
{
pSdrView->RipUpAtMarkedPoints();
pSh->CheckUnboundObjects();
} break;
case SID_BEZIER_CONVERT:
{
pSdrView->SetMarkedSegmentsKind(SdrPathSegmentKind::Toggle); break;
}
case SID_BEZIER_EDGE: case SID_BEZIER_SMOOTH: case SID_BEZIER_SYMMTR:
{
SdrPathSmoothKind eKind = SdrPathSmoothKind::Asymmetric;
switch (nSlotId)
{ case SID_BEZIER_EDGE: eKind = SdrPathSmoothKind::Angular; break; case SID_BEZIER_SMOOTH: eKind = SdrPathSmoothKind::Asymmetric; break; case SID_BEZIER_SYMMTR: eKind = SdrPathSmoothKind::Symmetric; break;
}
SdrPathSmoothKind eSmooth = pSdrView->GetMarkedPointsSmooth(); if (eKind != eSmooth)
{
pSdrView->SetMarkedPointsSmooth(eKind);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.