summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2018-09-03 02:42:44 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2018-09-07 14:50:40 +0200
commitb38065ea941375bf4f78f13314e84f4a875545d9 (patch)
treec1158d1ae8dd205cbbfdfe1c45a034286fc831fb /oox
parentce4245a73114800972711b789a946575b804cea3 (diff)
tdf#108691, tdf#119639 Don't print hidden objects in XLS(X)
In Excel hidden drawing objects aren't printed. When not hidden, printing is controlled by a separate 'Print object' setting. Only rely visibility setting for now, but properly: visible means also printed, hidden means not printed. Ie. import visible property also as printable, and only output visible property in XLS(X) formats. For the future, in XLSX format printability is controlled by attribute 'fPrintsWithSheet' of element 'clientData', don't know about XLS, there fUsefPrint/fPrint bits don't appear to be used anymore (see note in tdf#119639). Change-Id: I728107b30056f7bf073f2fefddece1bef1eb2e7a Reviewed-on: https://gerrit.libreoffice.org/59915 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 6b5f9ac79b0e..0f5437dc9519 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -842,6 +842,9 @@ Reference< XShape > const & Shape::createAndInsert(
SAL_INFO("oox.drawingml", "Shape::createAndInsert: invisible shape with id='" << msId << "'");
const OUString sVisible( "Visible" );
xSet->setPropertyValue( sVisible, Any( false ) );
+ // In Excel hidden means not printed, let's use visibility for now until that's handled separately
+ const OUString sPrintable( "Printable" );
+ xSet->setPropertyValue( sPrintable, Any( false ) );
}
ActionLockGuard const alg(mxShape);