merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0057-libwps.diff
blob0e6ae39c093d0e6f18258802001ea31ed4af1cf4
1 --- /dev/null 2007-01-22 11:02:07.811249416 +0100
2 +++ libwps/makefile.mk 2006-12-18 17:48:06.000000000 +0100
3 @@ -0,0 +1,69 @@
4 +#*************************************************************************
5 +#
6 +# OpenOffice.org - a multi-platform office productivity suite
7 +#
8 +# $RCSfile: makefile.mk,v $
9 +#
10 +# $Revision: 1.1 $
12 +# last change: $Author: fridrich_strba $ $Date: 2006/12/18 16:48:06 $
14 +# The Contents of this file are made available subject to
15 +# the terms of GNU Lesser General Public License Version 2.1.
18 +# GNU Lesser General Public License Version 2.1
19 +# =============================================
20 +# Copyright 2005 by Sun Microsystems, Inc.
21 +# 901 San Antonio Road, Palo Alto, CA 94303, USA
23 +# This library is free software; you can redistribute it and/or
24 +# modify it under the terms of the GNU Lesser General Public
25 +# License version 2.1, as published by the Free Software Foundation.
27 +# This library is distributed in the hope that it will be useful,
28 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
29 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
30 +# Lesser General Public License for more details.
32 +# You should have received a copy of the GNU Lesser General Public
33 +# License along with this library; if not, write to the Free Software
34 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
35 +# MA 02111-1307 USA
37 +#*************************************************************************
39 +PRJ=.
41 +PRJNAME=wps
42 +TARGET=wps
44 +# --- Settings -----------------------------------------------------
46 +.INCLUDE : settings.mk
48 +# --- Files --------------------------------------------------------
50 +.IF "$(SYSTEM_LIBWPS)" == "YES"
51 +@all:
52 + @echo "Using system libwps..."
53 +.ENDIF
55 +# libwps depends on the libwpd framework
56 +.IF "$(SYSTEM_LIBWPD)" == "YES"
57 +INCPRE+=$(LIBWPD_CFLAGS)
58 +.ELSE
59 +INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd
60 +.ENDIF
62 +TARFILE_NAME=libwps-0.1.2
63 +#PATCH_FILE_NAME=$(TARFILE_NAME).diff
64 +BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
65 +BUILD_DIR=src/lib
67 +# --- Targets ------------------------------------------------------
69 +.INCLUDE : set_ext.mk
70 +.INCLUDE : target.mk
71 +.INCLUDE : tg_ext.mk
73 --- /dev/null 2007-01-22 11:02:07.811249416 +0100
74 +++ libwps/prj/d.lst 2006-12-18 17:48:07.000000000 +0100
75 @@ -0,0 +1,6 @@
76 +mkdir: %_DEST%\inc%_EXT%\libwps
77 +..\%__SRC%\misc\build\libwps*\src\lib\libwps.h %_DEST%\inc%_EXT%\libwps\
78 +..\%__SRC%\misc\build\libwps*\src\lib\WPSStream.h %_DEST%\inc%_EXT%\libwps\
79 +..\%__SRC%\misc\build\libwps*\src\lib\WPSDocument.h %_DEST%\inc%_EXT%\libwps\
80 +..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
81 +..\%__SRC%\slb\*.lib %_DEST%\lib%_EXT%\*.lib
82 --- /dev/null 2007-01-22 11:02:07.811249416 +0100
83 +++ libwps/prj/build.lst 2006-12-18 17:48:07.000000000 +0100
84 @@ -0,0 +1,3 @@
85 +lwps libwps : LIBWPD:libwpd soltools NULL
86 +lwps libwps usr1 - all lwps_mkout NULL
87 +lwps libwps nmake - all lwps_libwps NULL
88 --- /dev/null 2007-05-04 12:54:50.000000000 +0200
89 +++ libwps/libwps-0.1.1.diff 2007-12-02 21:10:41.000000000 +0100
90 @@ -0,0 +1,93 @@
91 +*** misc/libwps-0.1.1/src/lib/WPSListener.h Thu Nov 29 20:58:57 2007
92 +--- misc/build/libwps-0.1.1/src/lib/WPSListener.h Sun Dec 2 20:54:35 2007
93 +***************
94 +*** 39,45 ****
95 + virtual ~WPSListener();
97 + bool isUndoOn() { return m_isUndoOn; }
98 +! void setUndoOn(bool isUndoOn) { m_isUndoOn = isUndoOn; }
100 + std::list<WPSPageSpan> &m_pageList;
102 +--- 39,45 ----
103 + virtual ~WPSListener();
105 + bool isUndoOn() { return m_isUndoOn; }
106 +! void setUndoOn(bool undoOn) { m_isUndoOn = undoOn; }
108 + std::list<WPSPageSpan> &m_pageList;
110 +*** misc/libwps-0.1.1/src/lib/WPSContentListener.cpp Thu Nov 29 20:58:57 2007
111 +--- misc/build/libwps-0.1.1/src/lib/WPSContentListener.cpp Sun Dec 2 21:09:11 2007
112 +***************
113 +*** 36,62 ****
114 + #define LIBWPS_MAX std::max
115 + #endif
117 +- namespace {
119 +- WPXString doubleToString(const double value)
120 +- {
121 +- WPXString tempString;
122 +- tempString.sprintf("%.4f", value);
123 +- std::string decimalPoint(localeconv()->decimal_point);
124 +- if ((decimalPoint.size() == 0) || (decimalPoint == "."))
125 +- return tempString;
126 +- std::string stringValue(tempString.cstr());
127 +- if (!stringValue.empty())
128 +- {
129 +- std::string::size_type pos;
130 +- while ((pos = stringValue.find(decimalPoint)) != std::string::npos)
131 +- stringValue.replace(pos,decimalPoint.size(),".");
132 +- }
133 +- return WPXString(stringValue.c_str());
134 +- }
136 +- } // namespace
138 + _WPSContentParsingState::_WPSContentParsingState() :
139 + m_textAttributeBits(0),
140 + m_fontSize(12.0f/*WP6_DEFAULT_FONT_SIZE*/), // FIXME ME!!!!!!!!!!!!!!!!!!! HELP WP6_DEFAULT_FONT_SIZE
141 +--- 36,41 ----
142 +***************
143 +*** 578,585 ****
144 + _closePageSpan();
147 +- const float WPS_DEFAULT_SUPER_SUB_SCRIPT = 58.0f;
149 + void WPSContentListener::_openSpan()
151 + if (!m_ps->m_isParagraphOpened && !m_ps->m_isListElementOpened)
152 +--- 557,562 ----
153 +***************
154 +*** 622,639 ****
157 + WPXPropertyList propList;
158 +! if (attributeBits & WPS_SUPERSCRIPT_BIT) {
159 +! WPXString sSuperScript("super ");
160 +! sSuperScript.append(doubleToString(WPS_DEFAULT_SUPER_SUB_SCRIPT));
161 +! sSuperScript.append("%");
162 +! propList.insert("style:text-position", sSuperScript);
163 +! }
164 +! else if (attributeBits & WPS_SUBSCRIPT_BIT) {
165 +! WPXString sSubScript("sub ");
166 +! sSubScript.append(doubleToString(WPS_DEFAULT_SUPER_SUB_SCRIPT));
167 +! sSubScript.append("%");
168 +! propList.insert("style:text-position", sSubScript);
169 +! }
170 + if (attributeBits & WPS_ITALICS_BIT)
171 + propList.insert("fo:font-style", "italic");
172 + if (attributeBits & WPS_BOLD_BIT)
173 +--- 599,608 ----
176 + WPXPropertyList propList;
177 +! if (m_ps->m_textAttributeBits & WPS_SUPERSCRIPT_BIT)
178 +! propList.insert("style:text-position", "super 58%");
179 +! else if (m_ps->m_textAttributeBits & WPS_SUBSCRIPT_BIT)
180 +! propList.insert("style:text-position", "sub 58%");
181 + if (attributeBits & WPS_ITALICS_BIT)
182 + propList.insert("fo:font-style", "italic");
183 + if (attributeBits & WPS_BOLD_BIT)