[Libreoffice-commits] .: filter/source

Marco Cecchetti mcecchetti at kemper.freedesktop.org
Wed Mar 7 08:39:57 PST 2012


 filter/source/svg/presentation_engine.js |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 9fb6c48b8573283aa6653825e244f59e6a34cec2
Author: Marco Cecchetti <mrcekets at gmail.com>
Date:   Wed Mar 7 17:24:01 2012 +0100

    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.

diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js
index aa2835a..252955d 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -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 */


More information about the Libreoffice-commits mailing list