summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2019-09-27 14:12:39 +0200
committerXisco FaulĂ­ <xiscofauli@libreoffice.org>2019-09-28 14:22:30 +0200
commita955330e052cc12c622982f38c5f5d138484013a (patch)
tree413ae8e3d1d0eae2e7e806a75fb9ea13b503ba18 /sd
parent99782b52c3cc25a32661c382ca98a32f6ec87003 (diff)
tdf#125585 write default layer status for OLE objects
The layer status is taken from the active view, when saving the document. But embedded documents have no view. Error was, that for all layers value 'false' was written in that case. With this patch the defaults (visible, printable, not locked) (true, true, false) are written. Change-Id: I2388ce31cc208fba075083889ec1bb2f874ef482 Reviewed-on: https://gerrit.libreoffice.org/79701 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 12f9a9f341fd8f8a98f7cd98f296a8729d279e0d) Reviewed-on: https://gerrit.libreoffice.org/79785 Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/unolayer.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx
index d1750c7eaca8..a7a4f46a9823 100644
--- a/sd/source/ui/unoidl/unolayer.cxx
+++ b/sd/source/ui/unoidl/unolayer.cxx
@@ -264,6 +264,15 @@ bool SdLayer::get( LayerAttribute what ) throw()
case LOCKED: return pFrameView->GetLockedLayers().IsSet(pLayer->GetID());
}
}
+
+ // no view at all, e.g. Draw embedded as OLE in text document, ODF default values
+ switch(what)
+ {
+ case VISIBLE: return true;
+ case PRINTABLE: return true;
+ case LOCKED: return false;
+ }
+
}
return false; //TODO: uno::Exception?
}