Contents of /trunk/openoffice/patches/openoffice-3.2.1-system-graphite.patch
Parent Directory | Revision Log
Revision 1115 -
(show annotations)
(download)
Sun Aug 22 18:37:54 2010 UTC (14 years, 1 month ago) by niro
File size: 11615 byte(s)
Sun Aug 22 18:37:54 2010 UTC (14 years, 1 month ago) by niro
File size: 11615 byte(s)
-added
1 | --- configure.in.orig 2009-10-21 16:57:59.000000000 +0100 |
2 | +++ configure.in 2009-10-21 16:58:08.000000000 +0100 |
3 | @@ -4562,12 +4562,6 @@ |
4 | AC_MSG_RESULT([external]) |
5 | SYSTEM_GRAPHITE=YES |
6 | PKG_CHECK_MODULES( GRAPHITE, silgraphite ) |
7 | - AC_MSG_CHECKING([STL compatibility]) |
8 | - if test "$WITH_STLPORT" != "no"; then |
9 | - AC_MSG_ERROR([to use system graphite you need to use --without-stlport]) |
10 | - else |
11 | - AC_MSG_RESULT([OK]) |
12 | - fi |
13 | else |
14 | AC_MSG_RESULT([internal]) |
15 | SYSTEM_GRAPHITE=NO |
16 | diff -ru vcl.orig/inc/vcl/graphite_adaptors.hxx vcl/inc/vcl/graphite_adaptors.hxx |
17 | --- vcl.orig/inc/vcl/graphite_adaptors.hxx 2010-01-07 11:50:10.000000000 +0000 |
18 | +++ vcl/inc/vcl/graphite_adaptors.hxx 2010-01-11 16:00:47.000000000 +0000 |
19 | @@ -58,10 +58,11 @@ |
20 | #include "vcl/dllapi.h" |
21 | |
22 | // Libraries |
23 | +#include "pregraphitestl.h" |
24 | #include <graphite/GrClient.h> |
25 | #include <graphite/Font.h> |
26 | #include <graphite/ITextSource.h> |
27 | - |
28 | +#include "postgraphitestl.h" |
29 | |
30 | // Module type definitions and forward declarations. |
31 | // |
32 | @@ -121,7 +122,7 @@ |
33 | const grutils::GrFeatureParser * features() const { return mpFeatures; }; |
34 | |
35 | private: |
36 | - virtual void UniqueCacheInfo(std::wstring &, bool &, bool &); |
37 | + virtual void UniqueCacheInfo(sil_std::wstring &, bool &, bool &); |
38 | |
39 | FreetypeServerFont& mrFont; |
40 | FontProperties maFontProperties; |
41 | diff -ru vcl.orig/inc/vcl/graphite_features.hxx vcl/inc/vcl/graphite_features.hxx |
42 | --- vcl.orig/inc/vcl/graphite_features.hxx 2010-01-07 11:50:10.000000000 +0000 |
43 | +++ vcl/inc/vcl/graphite_features.hxx 2010-01-11 16:00:47.000000000 +0000 |
44 | @@ -32,10 +32,11 @@ |
45 | // Parse a string of features specified as ; separated pairs. |
46 | // e.g. |
47 | // 1001=1&2002=2&fav1=0 |
48 | - |
49 | +#include "pregraphitestl.h" |
50 | #include <graphite/GrClient.h> |
51 | #include <graphite/Font.h> |
52 | #include <graphite/GrFeature.h> |
53 | +#include "postgraphitestl.h" |
54 | |
55 | namespace grutils |
56 | { |
57 | diff -ru vcl.orig/inc/vcl/graphite_layout.hxx vcl/inc/vcl/graphite_layout.hxx |
58 | --- vcl.orig/inc/vcl/graphite_layout.hxx 2010-01-07 11:50:10.000000000 +0000 |
59 | +++ vcl/inc/vcl/graphite_layout.hxx 2010-01-11 16:00:47.000000000 +0000 |
60 | @@ -43,11 +43,13 @@ |
61 | #include <vector> |
62 | #include <utility> |
63 | // Libraries |
64 | +#include "pregraphitestl.h" |
65 | #include <graphite/GrClient.h> |
66 | #include <graphite/Font.h> |
67 | #include <graphite/GrConstants.h> |
68 | #include <graphite/GrAppData.h> |
69 | #include <graphite/SegmentAux.h> |
70 | +#include "postgraphitestl.h" |
71 | // Platform |
72 | #include <vcl/sallayout.hxx> |
73 | #include <vcl/dllapi.h> |
74 | diff -ru vcl.orig/source/glyphs/graphite_adaptors.cxx vcl/source/glyphs/graphite_adaptors.cxx |
75 | --- vcl.orig/source/glyphs/graphite_adaptors.cxx 2010-01-07 11:50:09.000000000 +0000 |
76 | +++ vcl/source/glyphs/graphite_adaptors.cxx 2010-01-11 16:00:47.000000000 +0000 |
77 | @@ -169,7 +169,7 @@ |
78 | mpFeatures = NULL; |
79 | } |
80 | |
81 | -void GraphiteFontAdaptor::UniqueCacheInfo(std::wstring & face_name_out, bool & bold_out, bool & italic_out) |
82 | +void GraphiteFontAdaptor::UniqueCacheInfo(sil_std::wstring & face_name_out, bool & bold_out, bool & italic_out) |
83 | { |
84 | face_name_out = maFontProperties.szFaceName; |
85 | bold_out = maFontProperties.fBold; |
86 | diff -ru vcl.orig/source/glyphs/graphite_cache.cxx vcl/source/glyphs/graphite_cache.cxx |
87 | --- vcl.orig/source/glyphs/graphite_cache.cxx 2010-01-07 11:50:09.000000000 +0000 |
88 | +++ vcl/source/glyphs/graphite_cache.cxx 2010-01-11 16:00:47.000000000 +0000 |
89 | @@ -36,8 +36,10 @@ |
90 | #include <tools/debug.hxx> |
91 | #include <vcl/sallayout.hxx> |
92 | |
93 | +#include "pregraphitestl.h" |
94 | #include <graphite/GrClient.h> |
95 | #include <graphite/Segment.h> |
96 | +#include "postgraphitestl.h" |
97 | |
98 | #include <rtl/ustring.hxx> |
99 | #include <vcl/graphite_layout.hxx> |
100 | diff -ru vcl.orig/source/glyphs/graphite_features.cxx vcl/source/glyphs/graphite_features.cxx |
101 | --- vcl.orig/source/glyphs/graphite_features.cxx 2010-01-07 11:50:09.000000000 +0000 |
102 | +++ vcl/source/glyphs/graphite_features.cxx 2010-01-11 16:00:47.000000000 +0000 |
103 | @@ -91,7 +91,7 @@ |
104 | gr::isocode aLang = maLang; |
105 | for (size_t i = pos; i < nFeatEnd; i++) |
106 | aLang.rgch[i-pos] = features[i]; |
107 | - std::pair<gr::LanguageIterator,gr::LanguageIterator> aSupported |
108 | + sil_std::pair<gr::LanguageIterator,gr::LanguageIterator> aSupported |
109 | = font.getSupportedLanguages(); |
110 | gr::LanguageIterator iL = aSupported.first; |
111 | while (iL != aSupported.second) |
112 | @@ -142,7 +142,7 @@ |
113 | if (lang[i] == '-') break; |
114 | aLang.rgch[i] = lang[i]; |
115 | } |
116 | - std::pair<gr::LanguageIterator,gr::LanguageIterator> aSupported |
117 | + sil_std::pair<gr::LanguageIterator,gr::LanguageIterator> aSupported |
118 | = font.getSupportedLanguages(); |
119 | gr::LanguageIterator iL = aSupported.first; |
120 | while (iL != aSupported.second) |
121 | @@ -189,7 +189,7 @@ |
122 | { |
123 | return false; |
124 | } |
125 | - std::pair< gr::FeatureSettingIterator, gr::FeatureSettingIterator > |
126 | + sil_std::pair< gr::FeatureSettingIterator, gr::FeatureSettingIterator > |
127 | validValues = font.getFeatureSettings(i); |
128 | gr::FeatureSettingIterator j = validValues.first; |
129 | while (j != validValues.second) |
130 | diff -ru vcl.orig/source/glyphs/graphite_layout.cxx vcl/source/glyphs/graphite_layout.cxx |
131 | --- vcl.orig/source/glyphs/graphite_layout.cxx 2010-01-07 11:50:09.000000000 +0000 |
132 | +++ vcl/source/glyphs/graphite_layout.cxx 2010-01-11 16:00:47.000000000 +0000 |
133 | @@ -66,11 +66,13 @@ |
134 | #include <unicode/uscript.h> |
135 | |
136 | // Graphite Libraries (must be after vcl headers on windows) |
137 | +#include "pregraphitestl.h" |
138 | #include <graphite/GrClient.h> |
139 | #include <graphite/Font.h> |
140 | #include <graphite/ITextSource.h> |
141 | #include <graphite/Segment.h> |
142 | #include <graphite/SegmentPainter.h> |
143 | +#include "postgraphitestl.h" |
144 | |
145 | #include <vcl/graphite_layout.hxx> |
146 | #include <vcl/graphite_features.hxx> |
147 | @@ -105,8 +107,8 @@ |
148 | |
149 | namespace |
150 | { |
151 | - typedef std::pair<gr::GlyphIterator, gr::GlyphIterator> glyph_range_t; |
152 | - typedef std::pair<gr::GlyphSetIterator, gr::GlyphSetIterator> glyph_set_range_t; |
153 | + typedef sil_std::pair<gr::GlyphIterator, gr::GlyphIterator> glyph_range_t; |
154 | + typedef sil_std::pair<gr::GlyphSetIterator, gr::GlyphSetIterator> glyph_set_range_t; |
155 | |
156 | inline long round(const float n) { |
157 | return long(n + (n < 0 ? -0.5 : 0.5)); |
158 | @@ -171,7 +173,7 @@ |
159 | bool bRtl, long &rWidth, float fScaling, std::vector<int> & rChar2Base, std::vector<int> & rGlyph2Char, std::vector<int> & rCharDxs) |
160 | { |
161 | // Create a glyph item for each of the glyph and append it to the base class glyph list. |
162 | - typedef std::pair< gr::GlyphSetIterator, gr::GlyphSetIterator > GrGlyphSet; |
163 | + typedef sil_std::pair< gr::GlyphSetIterator, gr::GlyphSetIterator > GrGlyphSet; |
164 | int nChar = rArgs.mnEndCharPos - rArgs.mnMinCharPos; |
165 | glyph_range_t iGlyphs = rSegment.glyphs(); |
166 | int nGlyphs = iGlyphs.second - iGlyphs.first; |
167 | @@ -586,7 +588,7 @@ |
168 | sal_Int32 hashCode(const grutils::GrFeatureParser * mpFeatures) |
169 | { |
170 | // is this sufficient? |
171 | - std::wstring aFace; |
172 | + sil_std::wstring aFace; |
173 | bool bBold; |
174 | bool bItalic; |
175 | UniqueCacheInfo(aFace, bBold, bItalic); |
176 | diff -ru vcl.orig/source/glyphs/graphite_textsrc.cxx vcl/source/glyphs/graphite_textsrc.cxx |
177 | --- vcl.orig/source/glyphs/graphite_textsrc.cxx 2010-01-07 11:50:09.000000000 +0000 |
178 | +++ vcl/source/glyphs/graphite_textsrc.cxx 2010-01-11 16:00:47.000000000 +0000 |
179 | @@ -138,16 +138,16 @@ |
180 | return unknown; |
181 | } |
182 | |
183 | -std::pair<gr::toffset, gr::toffset> TextSourceAdaptor::propertyRange(gr::toffset nCharIdx) |
184 | +sil_std::pair<gr::toffset, gr::toffset> TextSourceAdaptor::propertyRange(gr::toffset nCharIdx) |
185 | { |
186 | |
187 | if (nCharIdx < unsigned(maLayoutArgs.mnMinCharPos)) |
188 | - return std::make_pair(0, maLayoutArgs.mnMinCharPos); |
189 | + return sil_std::make_pair(0, maLayoutArgs.mnMinCharPos); |
190 | |
191 | if (nCharIdx < mnEnd) |
192 | - return std::make_pair(maLayoutArgs.mnMinCharPos, mnEnd); |
193 | + return sil_std::make_pair(maLayoutArgs.mnMinCharPos, mnEnd); |
194 | |
195 | - return std::make_pair(mnEnd, maLayoutArgs.mnLength); |
196 | + return sil_std::make_pair(mnEnd, maLayoutArgs.mnLength); |
197 | } |
198 | |
199 | size_t TextSourceAdaptor::getFontFeatures(gr::toffset, gr::FeatureSetting * settings) |
200 | @@ -159,7 +159,7 @@ |
201 | |
202 | bool TextSourceAdaptor::sameSegment(gr::toffset char_idx1, gr::toffset char_idx2) |
203 | { |
204 | - const std::pair<gr::toffset, gr::toffset> |
205 | + const sil_std::pair<gr::toffset, gr::toffset> |
206 | range1 = propertyRange(char_idx1), |
207 | range2 = propertyRange(char_idx2); |
208 | |
209 | diff -ru vcl.orig/source/glyphs/graphite_textsrc.hxx vcl/source/glyphs/graphite_textsrc.hxx |
210 | --- vcl.orig/source/glyphs/graphite_textsrc.hxx 2010-01-07 11:50:09.000000000 +0000 |
211 | +++ vcl/source/glyphs/graphite_textsrc.hxx 2010-01-11 16:00:47.000000000 +0000 |
212 | @@ -62,9 +62,11 @@ |
213 | #include "vcl/dllapi.h" |
214 | |
215 | // Libraries |
216 | +#include "pregraphitestl.h" |
217 | #include <graphite/GrClient.h> |
218 | #include <graphite/Font.h> |
219 | #include <graphite/ITextSource.h> |
220 | +#include "postgraphitestl.h" |
221 | |
222 | // Module type definitions and forward declarations. |
223 | // |
224 | @@ -91,7 +93,7 @@ |
225 | virtual float getVerticalOffset(gr::toffset ich); |
226 | virtual gr::isocode getLanguage(gr::toffset ich); |
227 | |
228 | - virtual std::pair<gr::toffset, gr::toffset> propertyRange(gr::toffset ich); |
229 | + virtual sil_std::pair<gr::toffset, gr::toffset> propertyRange(gr::toffset ich); |
230 | virtual size_t getFontFeatures(gr::toffset ich, gr::FeatureSetting * prgfset); |
231 | virtual bool sameSegment(gr::toffset ich1, gr::toffset ich2); |
232 | |
233 | diff -ru vcl.orig/util/makefile2.pmk vcl/util/makefile2.pmk |
234 | --- vcl.orig/util/makefile2.pmk 2010-01-07 11:50:11.000000000 +0000 |
235 | +++ vcl/util/makefile2.pmk 2010-01-11 16:00:47.000000000 +0000 |
236 | @@ -36,3 +36,10 @@ |
237 | .IF "$(GUIBASE)"=="aqua" |
238 | CFLAGSCXX+=$(OBJCXXFLAGS) |
239 | .ENDIF # "$(GUIBASE)"=="aqua" |
240 | + |
241 | +#building with stlport, but graphite was not built with stlport |
242 | +.IF "$(USE_SYSTEM_STL)"!="YES" |
243 | +.IF "$(SYSTEM_GRAPHITE)"=="YES" |
244 | +CDEFS += -DGRAPHITEADAPTSTL |
245 | +.ENDIF |
246 | +.ENDIF |
247 | --- /dev/null 2009-11-23 08:25:49.916291467 +0000 |
248 | +++ vcl/inc/pregraphitestl.h 2010-01-12 09:49:26.000000000 +0000 |
249 | @@ -0,0 +1,30 @@ |
250 | +#if defined(GRAPHITEADAPTSTL) && defined(std) |
251 | +# include <ostream> |
252 | +# include <istream> |
253 | +# include <fstream> |
254 | +# include <iostream> |
255 | +# include <vector> |
256 | +# include <algorithm> |
257 | +# define std_was_redefined_as_stlport std |
258 | +# undef std |
259 | +# define _STLP_OUTERMOST_HEADER_ID 0xdeadbeaf |
260 | +# pragma GCC visibility push(default) |
261 | +# include _STLP_NATIVE_HEADER(exception_defines.h) |
262 | +# include _STLP_NATIVE_HEADER(limits) |
263 | +# include _STLP_NATIVE_HEADER(memory) |
264 | +# include _STLP_NATIVE_HEADER(exception) |
265 | +# include _STLP_NATIVE_HEADER(iosfwd) |
266 | +# include _STLP_NATIVE_HEADER(algorithm) |
267 | +# include _STLP_NATIVE_HEADER(string) |
268 | +# include _STLP_NATIVE_HEADER(streambuf) |
269 | +# include _STLP_NATIVE_HEADER(ios) |
270 | +# include _STLP_NATIVE_HEADER(locale) |
271 | +# include _STLP_NATIVE_HEADER(stdexcept) |
272 | +# include _STLP_NATIVE_HEADER(ostream) |
273 | +# include _STLP_NATIVE_HEADER(istream) |
274 | +# include _STLP_NATIVE_HEADER(iostream) |
275 | +# include _STLP_NATIVE_HEADER(vector) |
276 | +# pragma GCC visibility pop |
277 | +#endif |
278 | +//sil_std resolves to the std that Graphite was built with |
279 | +namespace sil_std = std; |
280 | --- /dev/null 2009-11-23 08:25:49.916291467 +0000 |
281 | +++ vcl/inc/postgraphitestl.h 2010-01-12 10:46:40.000000000 +0000 |
282 | @@ -0,0 +1,9 @@ |
283 | +#ifdef std_was_redefined_as_stlport |
284 | +// put things back the way they were |
285 | +# define std std_was_redefined_as_stlport |
286 | +# undef _STLP_OUTERMOST_HEADER_ID |
287 | +// force config to be re-read |
288 | +# undef _STLP_NOTHROW_INHERENTLY |
289 | +# undef _STLP_CONFIG_H |
290 | +# include <stddef.h> |
291 | +#endif |