/* Convert office drag actions as defined in <type>css::datatransfer::dnd::DNDConstants</type> intosystemconformdragactions.
*/ unsignedint OfficeToSystemDragActions(sal_Int8 dragActions)
{ unsignedint actions = NSDragOperationNone;
if (dragActions & DNDConstants::ACTION_COPY)
{
actions |= NSDragOperationCopy;
}
if (dragActions & DNDConstants::ACTION_MOVE)
{
actions |= NSDragOperationMove;
}
if (dragActions & DNDConstants::ACTION_LINK)
{
actions |= NSDragOperationLink;
}
return actions;
}
/* Convert system conform drag actions into office conform dragactionsasdefinedin <type>css::datatransfer::dnd::DNDConstants</type>.
*/
sal_Int8 SystemToOfficeDragActions(unsignedint dragActions)
{
sal_Int8 actions = DNDConstants::ACTION_NONE;
if (dragActions & NSDragOperationCopy)
{
actions |= DNDConstants::ACTION_COPY;
}
if (dragActions & NSDragOperationMove)
{
actions |= DNDConstants::ACTION_MOVE;
}
if (dragActions & NSDragOperationLink)
{
actions |= DNDConstants::ACTION_LINK;
}
// We map NSDragOperationGeneric to ACTION_DEFAULT to // signal that we have to decide for a drag action if (dragActions & NSDragOperationGeneric)
{
actions |= DNDConstants::ACTION_DEFAULT;
}
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.