Fixed a bug: when the SlideNumber placeholder field does not exist at all in the master page the 'element' attribute of the related PlaceholderShape object is null, so the 'element' attribute has to be checked in thePlaceholderShape.setVisibility method.

This commit is contained in:
Marco Cecchetti 2012-03-07 17:24:01 +01:00
parent 0d396171b6
commit 9fb6c48b85

View file

@ -1309,17 +1309,21 @@ PlaceholderShape.prototype.setTextContent = function( sText )
PlaceholderShape.prototype.setVisibility = function( nVisibility )
{
if( !this.element )
{
return;
}
this.element.setAttribute( 'visibility', aVisibilityAttributeValue[nVisibility] );
};
PlaceholderShape.prototype.show = function()
{
this.element.setAttribute( 'visibility', 'visible' );
this.setVisibility( VISIBLE );
};
PlaceholderShape.prototype.hide = function()
{
this.element.setAttribute( 'visibility', 'hidden' );
this.setVisibility( HIDDEN );
};
/* private methods */