diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-30 13:57:02 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2018-05-31 11:00:23 +0200 |
commit | d4c1975fc0411cdd30ea96fa188ac77c099bd58e (patch) | |
tree | 90d7515911e0630df4688ae910c8f63c7301a402 | |
parent | 59fd3e52a2d213f6858b83d36c99b1a970ef0835 (diff) |
tdf#117864 TransferableHelper::GetSystemClipboard requires a focus window
Change-Id: Ibd9b9218cf12e80db1fc9a70bdbab38d3df950f7
Reviewed-on: https://gerrit.libreoffice.org/55075
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | chart2/source/controller/main/ChartController_Tools.cxx | 3 | ||||
-rw-r--r-- | chart2/source/controller/sidebar/ChartSeriesPanel.cxx | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index d06524480847..ae1d02a106fa 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -522,7 +522,8 @@ void ChartController::executeDispatch_Copy() } if ( xTransferable.is() ) { - Reference< datatransfer::clipboard::XClipboard > xClipboard( TransferableHelper::GetSystemClipboard() ); + SolarMutexGuard aSolarGuard; + Reference<datatransfer::clipboard::XClipboard> xClipboard(GetChartWindow()->GetClipboard()); if ( xClipboard.is() ) { xClipboard->setContents( xTransferable, Reference< datatransfer::clipboard::XClipboardOwner >() ); diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index 023f548b485a..fb64cb64b5ac 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -267,6 +267,10 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel) OUString aCID; aAny >>= aCID; + + if (aCID.isEmpty()) + return OUString(); + #ifdef DBG_UTIL ObjectType eType = ObjectIdentifier::getObjectType(aCID); assert(eType == OBJECTTYPE_DATA_SERIES); |