From b73db446ac9681fdfc4ad602c6da7ce3e36a8588 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 5 Nov 2015 14:16:35 +0200 Subject: java: combine nested if statements Change-Id: I0457b81668e9427a3c8d6a4af93438b7fb2bb7ba --- swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'swext/mediawiki') diff --git a/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java b/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java index f583447f885f..4ef08950c11b 100644 --- a/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java +++ b/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java @@ -130,24 +130,18 @@ public class EditPageParser extends HTMLEditorKit.ParserCallback else if ( t == HTML.Tag.TEXTAREA ) { String sName = ( String ) a.getAttribute( HTML.Attribute.NAME ); - if ( sName != null ) + if ( sName != null && sName.equalsIgnoreCase( "wpTextbox1" ) ) { - if ( sName.equalsIgnoreCase( "wpTextbox1" ) ) - { - m_nWikiArticleStart = pos; - } + m_nWikiArticleStart = pos; } } else if ( t == HTML.Tag.DIV ) { String sId = ( String ) a.getAttribute( HTML.Attribute.ID ); sClass = ( String ) a.getAttribute( HTML.Attribute.CLASS ); - if ( sId != null ) + if ( sId != null && sId.equalsIgnoreCase( "contentSub" ) ) { - if ( sId.equalsIgnoreCase( "contentSub" ) ) - { - m_bHTMLStartFound = true; - } + m_bHTMLStartFound = true; } if ( sClass != null ) { -- cgit