[Libreoffice-commits] core.git: sd/source
Justin Luth
justin_luth at sil.org
Thu Dec 29 06:00:31 UTC 2016
sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 87fce022c65c1d2aed1ca59967137d77d936043c
Author: Justin Luth <justin_luth at sil.org>
Date: Wed Dec 28 21:57:32 2016 +0300
SD SlsClipboard: cleanup and preparation for tdf64588
Isolating the patch itself from reorganization/optimization
of variables. No logic change intended.
Change-Id: I9e9008d57b4948372af138fb47224ebcf9c48ceb
Reviewed-on: https://gerrit.libreoffice.org/32480
Reviewed-by: Justin Luth <justin_luth at sil.org>
Tested-by: Justin Luth <justin_luth at sil.org>
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index b9bcb07..cb73c3d 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -386,6 +386,9 @@ void Clipboard::CreateSlideTransferable (
model::PageEnumeration aSelectedPages
(model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mrSlideSorter.GetModel()));
+ SdDrawDocument* const pDocument = mrSlideSorter.GetModel().GetDocument();
+ DrawDocShell* const pDataDocSh = pDocument ? pDocument->GetDocSh() : nullptr;
+
while (aSelectedPages.HasMoreElements())
{
model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
@@ -417,7 +420,6 @@ void Clipboard::CreateSlideTransferable (
if (!aBookmarkList.empty())
{
mrSlideSorter.GetView().BrkAction();
- SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
SdTransferable* pTransferable = TransferableData::CreateTransferable (
pDocument,
nullptr,
@@ -436,9 +438,8 @@ void Clipboard::CreateSlideTransferable (
pTransferable->GetWorkDocument()->GetDocSh()
->FillTransferableObjectDescriptor (aObjDesc);
- if (pDocument->GetDocSh() != nullptr)
- aObjDesc.maDisplayName = pDocument->GetDocSh()
- ->GetMedium()->GetURLObject().GetURLNoPass();
+ if (pDataDocSh != nullptr)
+ aObjDesc.maDisplayName = pDataDocSh->GetMedium()->GetURLObject().GetURLNoPass();
vcl::Window* pActionWindow = pWindow;
if (pActionWindow == nullptr)
More information about the Libreoffice-commits
mailing list