fix bug 4376, 'Litehtml breaks locale'
[claws.git] / src / plugins / litehtml_viewer / litehtml / el_space.cpp
1 #include "html.h"
2 #include "document.h"
3 #include "el_space.h"
4
5 litehtml::el_space::el_space(const tchar_t* text, const std::shared_ptr<litehtml::document>& doc) : el_text(text, doc)
6 {
7 }
8
9 litehtml::el_space::~el_space()
10 {
11
12 }
13
14 bool litehtml::el_space::is_white_space() const
15 {
16         white_space ws = get_white_space();
17         if(     ws == white_space_normal || 
18                 ws == white_space_nowrap ||
19                 ws == white_space_pre_line )
20         {
21                 return true;
22         }
23         return false;
24 }
25
26 bool litehtml::el_space::is_break() const
27 {
28         white_space ws = get_white_space();
29         if(     ws == white_space_pre ||
30                 ws == white_space_pre_line ||
31                 ws == white_space_pre_wrap)
32         {
33                 if(m_text == _t("\n"))
34                 {
35                         return true;
36                 }
37         }
38         return false;
39 }