1 *** misc/libwps-0.1.1/src/lib/WPSListener.h Thu Nov 29 20:58:57 2007
2 --- misc/build/libwps-0.1.1/src/lib/WPSListener.h Sun Dec 2 20:54:35 2007
5 virtual ~WPSListener();
7 bool isUndoOn() { return m_isUndoOn; }
8 ! void setUndoOn(bool isUndoOn) { m_isUndoOn = isUndoOn; }
10 std::list<WPSPageSpan> &m_pageList;
13 virtual ~WPSListener();
15 bool isUndoOn() { return m_isUndoOn; }
16 ! void setUndoOn(bool undoOn) { m_isUndoOn = undoOn; }
18 std::list<WPSPageSpan> &m_pageList;
20 *** misc/libwps-0.1.1/src/lib/WPSContentListener.cpp Thu Nov 29 20:58:57 2007
21 --- misc/build/libwps-0.1.1/src/lib/WPSContentListener.cpp Sun Dec 2 21:09:11 2007
24 #define LIBWPS_MAX std::max
29 - WPXString doubleToString(const double value)
31 - WPXString tempString;
32 - tempString.sprintf("%.4f", value);
33 - std::string decimalPoint(localeconv()->decimal_point);
34 - if ((decimalPoint.size() == 0) || (decimalPoint == "."))
36 - std::string stringValue(tempString.cstr());
37 - if (!stringValue.empty())
39 - std::string::size_type pos;
40 - while ((pos = stringValue.find(decimalPoint)) != std::string::npos)
41 - stringValue.replace(pos,decimalPoint.size(),".");
43 - return WPXString(stringValue.c_str());
48 _WPSContentParsingState::_WPSContentParsingState() :
49 m_textAttributeBits(0),
50 m_fontSize(12.0f/*WP6_DEFAULT_FONT_SIZE*/), // FIXME ME!!!!!!!!!!!!!!!!!!! HELP WP6_DEFAULT_FONT_SIZE
57 - const float WPS_DEFAULT_SUPER_SUB_SCRIPT = 58.0f;
59 void WPSContentListener::_openSpan()
61 if (!m_ps->m_isParagraphOpened && !m_ps->m_isListElementOpened)
67 WPXPropertyList propList;
68 ! if (attributeBits & WPS_SUPERSCRIPT_BIT) {
69 ! WPXString sSuperScript("super ");
70 ! sSuperScript.append(doubleToString(WPS_DEFAULT_SUPER_SUB_SCRIPT));
71 ! sSuperScript.append("%");
72 ! propList.insert("style:text-position", sSuperScript);
74 ! else if (attributeBits & WPS_SUBSCRIPT_BIT) {
75 ! WPXString sSubScript("sub ");
76 ! sSubScript.append(doubleToString(WPS_DEFAULT_SUPER_SUB_SCRIPT));
77 ! sSubScript.append("%");
78 ! propList.insert("style:text-position", sSubScript);
80 if (attributeBits & WPS_ITALICS_BIT)
81 propList.insert("fo:font-style", "italic");
82 if (attributeBits & WPS_BOLD_BIT)
86 WPXPropertyList propList;
87 ! if (m_ps->m_textAttributeBits & WPS_SUPERSCRIPT_BIT)
88 ! propList.insert("style:text-position", "super 58%");
89 ! else if (m_ps->m_textAttributeBits & WPS_SUBSCRIPT_BIT)
90 ! propList.insert("style:text-position", "sub 58%");
91 if (attributeBits & WPS_ITALICS_BIT)
92 propList.insert("fo:font-style", "italic");
93 if (attributeBits & WPS_BOLD_BIT)