update dev300-m58
[ooovba.git] / libwps / libwps-0.1.1.diff
blob6977cf33ceec1d73890675ff21606ddee940bf5b
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
3 ***************
4 *** 39,45 ****
5 virtual ~WPSListener();
7 bool isUndoOn() { return m_isUndoOn; }
8 ! void setUndoOn(bool isUndoOn) { m_isUndoOn = isUndoOn; }
10 std::list<WPSPageSpan> &m_pageList;
12 --- 39,45 ----
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
22 ***************
23 *** 36,62 ****
24 #define LIBWPS_MAX std::max
25 #endif
27 - namespace {
29 - WPXString doubleToString(const double value)
30 - {
31 - WPXString tempString;
32 - tempString.sprintf("%.4f", value);
33 - std::string decimalPoint(localeconv()->decimal_point);
34 - if ((decimalPoint.size() == 0) || (decimalPoint == "."))
35 - return tempString;
36 - std::string stringValue(tempString.cstr());
37 - if (!stringValue.empty())
38 - {
39 - std::string::size_type pos;
40 - while ((pos = stringValue.find(decimalPoint)) != std::string::npos)
41 - stringValue.replace(pos,decimalPoint.size(),".");
42 - }
43 - return WPXString(stringValue.c_str());
44 - }
46 - } // namespace
48 _WPSContentParsingState::_WPSContentParsingState() :
49 m_textAttributeBits(0),
50 m_fontSize(12.0f/*WP6_DEFAULT_FONT_SIZE*/), // FIXME ME!!!!!!!!!!!!!!!!!!! HELP WP6_DEFAULT_FONT_SIZE
51 --- 36,41 ----
52 ***************
53 *** 578,585 ****
54 _closePageSpan();
57 - const float WPS_DEFAULT_SUPER_SUB_SCRIPT = 58.0f;
59 void WPSContentListener::_openSpan()
61 if (!m_ps->m_isParagraphOpened && !m_ps->m_isListElementOpened)
62 --- 557,562 ----
63 ***************
64 *** 622,639 ****
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);
73 ! }
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);
79 ! }
80 if (attributeBits & WPS_ITALICS_BIT)
81 propList.insert("fo:font-style", "italic");
82 if (attributeBits & WPS_BOLD_BIT)
83 --- 599,608 ----
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)