diff options
author | Caolán McNamara <cmc@openoffice.org> | 2009-12-17 13:56:08 +0000 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2009-12-17 13:56:08 +0000 |
commit | 723b53e66635c03bc4dc4bb0d945867c91672e12 (patch) | |
tree | 0e0889681066b4dc52b5933c858532bf936bfb81 /vcl/source/glyphs | |
parent | f8ada8f2a93659e27928f3b5244c813de2c3847b (diff) |
cmcfixes69: #i106157#: workaround graphite stl/stlport issues
Diffstat (limited to 'vcl/source/glyphs')
-rw-r--r-- | vcl/source/glyphs/graphite_adaptors.cxx | 2 | ||||
-rw-r--r-- | vcl/source/glyphs/graphite_cache.cxx | 2 | ||||
-rw-r--r-- | vcl/source/glyphs/graphite_features.cxx | 6 | ||||
-rw-r--r-- | vcl/source/glyphs/graphite_layout.cxx | 10 | ||||
-rw-r--r-- | vcl/source/glyphs/graphite_textsrc.cxx | 10 | ||||
-rw-r--r-- | vcl/source/glyphs/graphite_textsrc.hxx | 4 |
6 files changed, 20 insertions, 14 deletions
diff --git a/vcl/source/glyphs/graphite_adaptors.cxx b/vcl/source/glyphs/graphite_adaptors.cxx index 34e2f5f5bbe3..6c9d97e356b1 100644 --- a/vcl/source/glyphs/graphite_adaptors.cxx +++ b/vcl/source/glyphs/graphite_adaptors.cxx @@ -171,7 +171,7 @@ GraphiteFontAdaptor::~GraphiteFontAdaptor() throw() mpFeatures = NULL; } -void GraphiteFontAdaptor::UniqueCacheInfo(std::wstring & face_name_out, bool & bold_out, bool & italic_out) +void GraphiteFontAdaptor::UniqueCacheInfo(sil_std::wstring & face_name_out, bool & bold_out, bool & italic_out) { face_name_out = maFontProperties.szFaceName; bold_out = maFontProperties.fBold; diff --git a/vcl/source/glyphs/graphite_cache.cxx b/vcl/source/glyphs/graphite_cache.cxx index 8c514c611d2c..a2c245e21774 100644 --- a/vcl/source/glyphs/graphite_cache.cxx +++ b/vcl/source/glyphs/graphite_cache.cxx @@ -36,8 +36,10 @@ #include <tools/debug.hxx> #include <vcl/sallayout.hxx> +#include "pregraphitestl.h" #include <graphite/GrClient.h> #include <graphite/Segment.h> +#include "postgraphitestl.h" #include <rtl/ustring.hxx> #include <vcl/graphite_layout.hxx> diff --git a/vcl/source/glyphs/graphite_features.cxx b/vcl/source/glyphs/graphite_features.cxx index dae1bfc2866e..b26397aa43e5 100644 --- a/vcl/source/glyphs/graphite_features.cxx +++ b/vcl/source/glyphs/graphite_features.cxx @@ -91,7 +91,7 @@ GrFeatureParser::GrFeatureParser(gr::Font & font, const std::string features, co gr::isocode aLang = maLang; for (size_t i = pos; i < nFeatEnd; i++) aLang.rgch[i-pos] = features[i]; - std::pair<gr::LanguageIterator,gr::LanguageIterator> aSupported + sil_std::pair<gr::LanguageIterator,gr::LanguageIterator> aSupported = font.getSupportedLanguages(); gr::LanguageIterator iL = aSupported.first; while (iL != aSupported.second) @@ -142,7 +142,7 @@ void GrFeatureParser::setLang(gr::Font & font, const std::string & lang) if (lang[i] == '-') break; aLang.rgch[i] = lang[i]; } - std::pair<gr::LanguageIterator,gr::LanguageIterator> aSupported + sil_std::pair<gr::LanguageIterator,gr::LanguageIterator> aSupported = font.getSupportedLanguages(); gr::LanguageIterator iL = aSupported.first; while (iL != aSupported.second) @@ -189,7 +189,7 @@ bool GrFeatureParser::isValid(gr::Font & font, gr::FeatureSetting & setting) { return false; } - std::pair< gr::FeatureSettingIterator, gr::FeatureSettingIterator > + sil_std::pair< gr::FeatureSettingIterator, gr::FeatureSettingIterator > validValues = font.getFeatureSettings(i); gr::FeatureSettingIterator j = validValues.first; while (j != validValues.second) diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index 86dee2749efa..0ef8b8ec098f 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -66,11 +66,13 @@ #include <unicode/uscript.h> // Graphite Libraries (must be after vcl headers on windows) +#include "pregraphitestl.h" #include <graphite/GrClient.h> #include <graphite/Font.h> #include <graphite/ITextSource.h> #include <graphite/Segment.h> #include <graphite/SegmentPainter.h> +#include "postgraphitestl.h" #include <vcl/graphite_layout.hxx> #include <vcl/graphite_features.hxx> @@ -105,8 +107,8 @@ FILE * grLog() namespace { - typedef std::pair<gr::GlyphIterator, gr::GlyphIterator> glyph_range_t; - typedef std::pair<gr::GlyphSetIterator, gr::GlyphSetIterator> glyph_set_range_t; + typedef sil_std::pair<gr::GlyphIterator, gr::GlyphIterator> glyph_range_t; + typedef sil_std::pair<gr::GlyphSetIterator, gr::GlyphSetIterator> glyph_set_range_t; inline long round(const float n) { return long(n + (n < 0 ? -0.5 : 0.5)); @@ -171,7 +173,7 @@ GraphiteLayout::Glyphs::fill_from(gr::Segment & rSegment, ImplLayoutArgs &rArgs, bool bRtl, long &rWidth, float fScaling, std::vector<int> & rChar2Base, std::vector<int> & rGlyph2Char, std::vector<int> & rCharDxs) { // Create a glyph item for each of the glyph and append it to the base class glyph list. - typedef std::pair< gr::GlyphSetIterator, gr::GlyphSetIterator > GrGlyphSet; + typedef sil_std::pair< gr::GlyphSetIterator, gr::GlyphSetIterator > GrGlyphSet; int nChar = rArgs.mnEndCharPos - rArgs.mnMinCharPos; glyph_range_t iGlyphs = rSegment.glyphs(); int nGlyphs = iGlyphs.second - iGlyphs.first; @@ -586,7 +588,7 @@ public: sal_Int32 hashCode(const grutils::GrFeatureParser * mpFeatures) { // is this sufficient? - std::wstring aFace; + sil_std::wstring aFace; bool bBold; bool bItalic; UniqueCacheInfo(aFace, bBold, bItalic); diff --git a/vcl/source/glyphs/graphite_textsrc.cxx b/vcl/source/glyphs/graphite_textsrc.cxx index adc2ae99c4f8..cbbd386e734a 100644 --- a/vcl/source/glyphs/graphite_textsrc.cxx +++ b/vcl/source/glyphs/graphite_textsrc.cxx @@ -138,16 +138,16 @@ gr::isocode TextSourceAdaptor::getLanguage(gr::toffset) return unknown; } -std::pair<gr::toffset, gr::toffset> TextSourceAdaptor::propertyRange(gr::toffset nCharIdx) +sil_std::pair<gr::toffset, gr::toffset> TextSourceAdaptor::propertyRange(gr::toffset nCharIdx) { if (nCharIdx < unsigned(maLayoutArgs.mnMinCharPos)) - return std::make_pair(0, maLayoutArgs.mnMinCharPos); + return sil_std::make_pair(0, maLayoutArgs.mnMinCharPos); if (nCharIdx < mnEnd) - return std::make_pair(maLayoutArgs.mnMinCharPos, mnEnd); + return sil_std::make_pair(maLayoutArgs.mnMinCharPos, mnEnd); - return std::make_pair(mnEnd, maLayoutArgs.mnLength); + return sil_std::make_pair(mnEnd, maLayoutArgs.mnLength); } size_t TextSourceAdaptor::getFontFeatures(gr::toffset, gr::FeatureSetting * settings) @@ -159,7 +159,7 @@ size_t TextSourceAdaptor::getFontFeatures(gr::toffset, gr::FeatureSetting * sett bool TextSourceAdaptor::sameSegment(gr::toffset char_idx1, gr::toffset char_idx2) { - const std::pair<gr::toffset, gr::toffset> + const sil_std::pair<gr::toffset, gr::toffset> range1 = propertyRange(char_idx1), range2 = propertyRange(char_idx2); diff --git a/vcl/source/glyphs/graphite_textsrc.hxx b/vcl/source/glyphs/graphite_textsrc.hxx index 6f701988bb01..62d951c3f950 100644 --- a/vcl/source/glyphs/graphite_textsrc.hxx +++ b/vcl/source/glyphs/graphite_textsrc.hxx @@ -62,9 +62,11 @@ #include "vcl/dllapi.h" // Libraries +#include "pregraphitestl.h" #include <graphite/GrClient.h> #include <graphite/Font.h> #include <graphite/ITextSource.h> +#include "postgraphitestl.h" // Module type definitions and forward declarations. // @@ -91,7 +93,7 @@ public: virtual float getVerticalOffset(gr::toffset ich); virtual gr::isocode getLanguage(gr::toffset ich); - virtual std::pair<gr::toffset, gr::toffset> propertyRange(gr::toffset ich); + virtual sil_std::pair<gr::toffset, gr::toffset> propertyRange(gr::toffset ich); virtual size_t getFontFeatures(gr::toffset ich, gr::FeatureSetting * prgfset); virtual bool sameSegment(gr::toffset ich1, gr::toffset ich2); |