Revision: 6531
http://languagetool.svn.sourceforge.net/languagetool/?rev=6531&view=rev
Author: dnaber
Date: 2012-02-19 12:20:14 +0000 (Sun, 19 Feb 2012)
Log Message:
-----------
tiny cleanup, making method non-public
Modified Paths:
--------------
trunk/JLanguageTool/src/java/org/languagetool/openoffice/Main.java
Modified: trunk/JLanguageTool/src/java/org/languagetool/openoffice/Main.java
===================================================================
--- trunk/JLanguageTool/src/java/org/languagetool/openoffice/Main.java
2012-02-19 11:48:01 UTC (rev 6530)
+++ trunk/JLanguageTool/src/java/org/languagetool/openoffice/Main.java
2012-02-19 12:20:14 UTC (rev 6531)
@@ -407,12 +407,9 @@
* LibO shortens menuitems with more than ~100 characters by dropping text in
the middle
* that isn't really sensible, so we shorten the text here in order to
preserve the important parts
*/
- public String shortenComment(String comment) {
- final int maxCommentLength;
- maxCommentLength = 100;
-
+ String shortenComment(String comment) {
+ final int maxCommentLength = 100;
if(comment.length() > maxCommentLength) {
-
// if there is text in brackets, drop it (beginning at the end)
while (comment.lastIndexOf(" [") > 0
&& comment.lastIndexOf("]") > comment.lastIndexOf(" [")
@@ -424,12 +421,11 @@
&& comment.length() > maxCommentLength) {
comment = comment.substring(0,comment.lastIndexOf(" (")) +
comment.substring(comment.lastIndexOf(")")+1);
}
-
// in case it's still not short enough, shorten at the end
- if(comment.length() > maxCommentLength) comment =
comment.substring(0,maxCommentLength-1) + "…";
-
+ if(comment.length() > maxCommentLength) {
+ comment = comment.substring(0,maxCommentLength-1) + "…";
+ }
}
-
return comment;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Languagetool-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-cvs