diff options
Diffstat (limited to 'sd/source/ui/view/sdview2.cxx')
-rw-r--r-- | sd/source/ui/view/sdview2.cxx | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 69790987b299..ba1b2cc226d7 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -211,17 +211,28 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateSelectionDat return pTransferable; } -void View::UpdateSelectionClipboard( bool bForceDeselect ) +void View::UpdateSelectionClipboard() // false case { - if( mpViewSh && mpViewSh->GetActiveWindow() ) + if (!mpViewSh) + return; + if (!mpViewSh->GetActiveWindow()) + return; + if (GetMarkedObjectList().GetMarkCount()) + CreateSelectionDataObject( this ); + else + ClearSelectionClipboard(); +} + +void View::ClearSelectionClipboard() // true case +{ + if (!mpViewSh) + return; + if (!mpViewSh->GetActiveWindow()) + return; + if (SD_MOD()->pTransferSelection && SD_MOD()->pTransferSelection->GetView() == this) { - if( !bForceDeselect && GetMarkedObjectList().GetMarkCount() ) - CreateSelectionDataObject( this ); - else if( SD_MOD()->pTransferSelection && ( SD_MOD()->pTransferSelection->GetView() == this ) ) - { - TransferableHelper::ClearPrimarySelection(); - SD_MOD()->pTransferSelection = nullptr; - } + TransferableHelper::ClearPrimarySelection(); + SD_MOD()->pTransferSelection = nullptr; } } |