summaryrefslogtreecommitdiff
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
parent41516fd6140d69ccfc3707d94fe75f7c47ecf0d4 (diff)
parentbc30330c6c67ce22d9b95ac617b4982c2d4cbd6d (diff)
CWS-TOOLING: integrate CWS impressbi01
Notes
Notes: split repo tag: filters_ooo/DEV300_m83
-rw-r--r--filter/inc/filter/msfilter/escherex.hxx1
-rw-r--r--filter/source/msfilter/escherex.cxx28
-rw-r--r--filter/source/msfilter/eschesdo.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx7
-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
7 files changed, 52 insertions, 1 deletions
diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx
index b98f5dc85147..51058e2eabd8 100644
--- a/filter/inc/filter/msfilter/escherex.hxx
+++ b/filter/inc/filter/msfilter/escherex.hxx
@@ -1197,6 +1197,7 @@ class MSFILTER_DLLPUBLIC EscherPropertyContainer
void Commit( SvStream& rSt, sal_uInt16 nVersion = 3, sal_uInt16 nRecType = ESCHER_OPT );
+ sal_Bool CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape );
sal_Bool CreateOLEGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXOleObject );
/** Creates a complex ESCHER_Prop_fillBlip containing the BLIP directly (for Excel charts). */
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index ff5be3476da7..2ad33b1e6195 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1101,6 +1101,32 @@ void EscherPropertyContainer::ImplCreateGraphicAttributes( const ::com::sun::sta
}
}
+sal_Bool EscherPropertyContainer::CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape )
+{
+ uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY );
+ if ( aXPropSet.is() )
+ {
+ sal_Bool bVal = false;
+ ::com::sun::star::uno::Any aAny;
+ sal_uInt32 nShapeAttr = 0;
+ EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ), sal_True );
+ if ( aAny >>= bVal )
+ {
+ if ( !bVal )
+ nShapeAttr |= 0x20002; // set fHidden = true
+ }
+ EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) ), sal_True );
+ if ( aAny >>= bVal )
+ {
+ if ( !bVal )
+ nShapeAttr |= 0x10000; // set fPrint = false;
+ }
+ if ( nShapeAttr )
+ AddOpt( ESCHER_Prop_fPrint, nShapeAttr );
+ }
+ return sal_True;
+}
+
sal_Bool EscherPropertyContainer::CreateOLEGraphicProperties(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape )
{
@@ -4199,7 +4225,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
nRule = GetClosestPoint( aPoly, aRefPoint );
if ( aType == "drawing.Ellipse" )
- nRule <<= 1; // In PPT hat eine Ellipse 8 Möglichkeiten sich zu connecten
+ nRule <<= 1; // In PPT hat eine Ellipse 8 M?glichkeiten sich zu connecten
}
}
return nRule;
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index facc6e799d04..950a32cd0645 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -729,6 +729,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( rObj.GetAngle() )
ImplFlipBoundingBox( rObj, aPropOpt );
+ aPropOpt.CreateShapeProperties( rObj.GetShapeRef() );
mpEscherEx->Commit( aPropOpt, rObj.GetRect() );
if( mpEscherEx->GetGroupLevel() > 1 )
mpEscherEx->AddChildAnchor( rObj.GetRect() );
@@ -826,6 +827,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
rObj.GetRect() );
}
rObj.SetAngle( nAngle );
+ aPropOpt.CreateShapeProperties( rObj.GetShapeRef() );
mpEscherEx->Commit( aPropOpt, rObj.GetRect() );
// write the childanchor
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index c96dab01c9c1..05411501218e 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5416,6 +5416,13 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
pRet =
ProcessObj( rSt, aObjData, pClientData, aTextRect, pRet);
+ if ( pRet )
+ {
+ sal_Int32 nGroupProperties( GetPropertyValue( DFF_Prop_fPrint ) );
+ pRet->SetVisible( ( nGroupProperties & 2 ) == 0 );
+ pRet->SetPrintable( ( nGroupProperties & 1 ) != 0 );
+ }
+
if ( mbTracing )
mpTracer->RemoveAttribute( aObjData.nSpFlags & SP_FGROUP
? rtl::OUString::createFromAscii( "GroupShape" )
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() );