[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/edit_text_character.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/edit_text_character.cpp |
Date: |
Wed, 13 Jun 2007 16:52:00 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/06/13 16:52:00
Modified files:
. : ChangeLog
server : edit_text_character.cpp
Log message:
* server/edit_text_character.cpp (format_text): implement no
word wra
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3528&r2=1.3529
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character.cpp?cvsroot=gnash&r1=1.66&r2=1.67
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3528
retrieving revision 1.3529
diff -u -b -r1.3528 -r1.3529
--- ChangeLog 13 Jun 2007 16:40:44 -0000 1.3528
+++ ChangeLog 13 Jun 2007 16:52:00 -0000 1.3529
@@ -1,5 +1,6 @@
2007-06-13 Sandro Santilli <address@hidden>
+ * server/edit_text_character.cpp (format_text): implement no word wra
* server/FreetypeGlyphsProvider.{cpp,h}: document coordinate space of
getGlyph output values and implement proper scaling between freetype
glyph EM units and our 1024 EM square.
Index: server/edit_text_character.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character.cpp,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- server/edit_text_character.cpp 12 Jun 2007 12:33:21 -0000 1.66
+++ server/edit_text_character.cpp 13 Jun 2007 16:52:00 -0000 1.67
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: edit_text_character.cpp,v 1.66 2007/06/12 12:33:21 strk Exp $ */
+/* $Id: edit_text_character.cpp,v 1.67 2007/06/13 16:52:00 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -858,8 +858,8 @@
//assert(extra_space >= 0.0f);
if (extra_space <= 0.0f)
{
- log_error(_("TextField text doesn't fit in its boundaries: "
- "width %g, margin %d"),
+ log_debug(_("TextField text doesn't fit in its boundaries: "
+ "width %g, margin %d - nothing to align"),
m_def->width(), m_def->get_right_margin());
return 0.0f;
}
@@ -1153,12 +1153,17 @@
if ( ! m_def->do_word_wrap() )
{
- static bool warned=false;
- if ( ! warned )
+ // TODO: scan more glyphs till newline and
continue
+ bool newlinefound = false;
+ while (code =
utf8::decode_next_unicode_character(&text))
{
- log_unimpl("edit_text_character: no
word wrap");
- warned=true;
+ if (code == 13 || code == 10)
+ {
+ newlinefound = true;
+ break;
+ }
}
+ if ( ! newlinefound ) break;
}
// Insert newline.