diff options
author | obo <obo@openoffice.org> | 2010-06-15 12:54:21 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-15 12:54:21 +0200 |
commit | a93ecbe1f0f5e65ccc64347ed564d39c923f0dd0 (patch) | |
tree | e6b624a0d3274882f7e7855f8812a99706b07bb5 /xmloff/source/draw/shapeexport.cxx | |
parent | 946651672cd26b5db588005f39deb2eecf82ca8a (diff) | |
parent | 6e5f7e581dc5b8edcb78dc92a4d0c89d81f2aef9 (diff) |
CWS-TOOLING: integrate CWS impressbi01
Diffstat (limited to 'xmloff/source/draw/shapeexport.cxx')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 20c7879416cf..d3dd99967ae9 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -83,6 +83,8 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp, // #88546# init to FALSE mbHandleProgressBar( sal_False ), msZIndex( RTL_CONSTASCII_USTRINGPARAM("ZOrder") ), + msPrintable( RTL_CONSTASCII_USTRINGPARAM("Printable") ), + msVisible( RTL_CONSTASCII_USTRINGPARAM("Visible") ), msEmptyPres( RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ), msModel( RTL_CONSTASCII_USTRINGPARAM("Model") ), msStartShape( RTL_CONSTASCII_USTRINGPARAM("StartShape") ), @@ -705,6 +707,39 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } } + // export draw:display (do not export in ODF 1.2 or older) + if( xSet.is() && ( mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) ) + { + if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape && + aShapeInfo.meShapeType != XmlShapeTypeHandoutShape ) + + try + { + sal_Bool bVisible = sal_True; + sal_Bool bPrintable = sal_True; + + xSet->getPropertyValue(msVisible) >>= bVisible; + xSet->getPropertyValue(msPrintable) >>= bPrintable; + + XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID; + const unsigned short nDisplay = (bVisible ? 2 : 0) | (bPrintable ? 1 : 0); + switch( nDisplay ) + { + case 0: eDisplayToken = XML_NONE; break; + case 1: eDisplayToken = XML_PRINTER; break; + case 2: eDisplayToken = XML_SCREEN; break; + // case 3: eDisplayToken = XML_ALWAYS break; this is the default + } + + if( eDisplayToken != XML_TOKEN_INVALID ) + mrExport.AddAttribute(XML_NAMESPACE_DRAW_EXT, XML_DISPLAY, eDisplayToken ); + } + catch( uno::Exception& ) + { + DBG_ERROR( "XMLShapeExport::exportShape(), exception caught!" ); + } + } + // #82003# test export count // #91587# ALWAYS increment since now ALL to be exported shapes are counted. if(mrExport.GetShapeExport()->IsHandleProgressBarEnabled()) |