summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-15 12:54:21 +0200
committerobo <obo@openoffice.org>2010-06-15 12:54:21 +0200
commit33750471297793a14d19f783208f7d8019903570 (patch)
treeda8aa545250535486464ee0849a68ceacd9c80af /oox
parent41516fd6140d69ccfc3707d94fe75f7c47ecf0d4 (diff)
parentbc30330c6c67ce22d9b95ac617b4982c2d4cbd6d (diff)
CWS-TOOLING: integrate CWS impressbi01
Notes
split repo tag: filters_ooo/DEV300_m83
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/drawingml/shape.hxx2
-rw-r--r--oox/source/drawingml/shape.cxx8
-rw-r--r--oox/source/drawingml/shapecontext.cxx5
3 files changed, 15 insertions, 0 deletions
diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx
index c052e084e506..f4228ab24790 100644
--- a/oox/inc/oox/drawingml/shape.hxx
+++ b/oox/inc/oox/drawingml/shape.hxx
@@ -126,6 +126,7 @@ public:
void setName( const rtl::OUString& rName ) { msName = rName; }
::rtl::OUString getName( ) { return msName; }
void setId( const rtl::OUString& rId ) { msId = rId; }
+ void setHidden( sal_Bool bHidden ) { mbHidden = bHidden; }
void setSubType( sal_Int32 nSubType ) { mnSubType = nSubType; }
sal_Int32 getSubType() const { return mnSubType; }
void setSubTypeIndex( sal_uInt32 nSubTypeIndex ) { mnSubTypeIndex = nSubTypeIndex; }
@@ -206,6 +207,7 @@ private:
sal_Int32 mnRotation;
sal_Bool mbFlipH;
sal_Bool mbFlipV;
+ sal_Bool mbHidden;
};
::rtl::OUString GetShapeType( sal_Int32 nType );
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index ee10393165ec..50ded9b2753b 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -95,6 +95,7 @@ Shape::Shape( const sal_Char* pServiceName )
, mnRotation( 0 )
, mbFlipH( false )
, mbFlipV( false )
+, mbHidden( false )
{
if ( pServiceName )
msServiceName = OUString::createFromAscii( pServiceName );
@@ -183,6 +184,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape )
mnRotation = rReferencedShape.mnRotation;
mbFlipH = rReferencedShape.mbFlipH;
mbFlipV = rReferencedShape.mbFlipV;
+ mbHidden = rReferencedShape.mbHidden;
}
// for group shapes, the following method is also adding each child
@@ -370,6 +372,12 @@ Reference< XShape > Shape::createAndInsert(
}
rxShapes->add( mxShape );
+ if ( mbHidden )
+ {
+ const OUString sHidden( CREATE_OUSTRING( "NumberingLevel" ) );
+ xSet->setPropertyValue( sHidden, Any( mbHidden ) );
+ }
+
Reference< document::XActionLockable > xLockable( mxShape, UNO_QUERY );
if( xLockable.is() )
xLockable->addActionLock();
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
index a5a1f16f5935..a5f3b1598447 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNamed.hpp>
+#include "oox/helper/attributelist.hxx"
#include "oox/drawingml/shapecontext.hxx"
#include "oox/drawingml/shapestylecontext.hxx"
#include "oox/core/namespaces.hxx"
@@ -85,9 +86,13 @@ Reference< XFastContextHandler > ShapeContext::createFastChildContext( sal_Int32
// case XML_drElemPr:
// break;
case XML_cNvPr:
+ {
+ AttributeList aAttribs( xAttribs );
+ mpShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) );
mpShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
mpShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
break;
+ }
case XML_ph:
mpShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );