~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to libcore/parser/TypesParser.cpp

  • Committer: Package Import Robot
  • Author(s): Micah Gersten
  • Date: 2012-03-04 03:19:06 UTC
  • mfrom: (1.1.18) (3.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20120304031906-p6q5rnb0xhgpof7o
Tags: 0.8.10-3ubuntu1
* Merge from Debian testing (FFe: LP: #940876), remaining changes:
  - Use mozilla-flashplugin as the alternative for now
  - Change xulrunner-dev build dep to firefox-dev
* Drop the plugin API porting patch, this has been fixed upstream
  - drop debian/patches*
* Drop the following change as we want Adobe's player to take priority
  if it's installed
  - Set alternative priority to 50 so that it matches Adobe Flash's priority

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// TypesParser.cpp: read SWF types from a stream
2
2
// 
3
 
//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
4
 
//   2011 Free Software Foundation, Inc
 
3
//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
 
4
//   Free Software Foundation, Inc
5
5
// 
6
6
// This program is free software; you can redistribute it and/or modify
7
7
// it under the terms of the GNU General Public License as published by
142
142
        // want to actually swap the values if the proprietary player
143
143
        // does so. TODO: check it out.
144
144
        IF_VERBOSE_MALFORMED_SWF(
145
 
            log_swferror("Invalid rectangle: "
146
 
                "minx=%g maxx=%g miny=%g maxy=%g", minx, maxx, miny, maxy);
 
145
            log_swferror(_("Invalid rectangle: "
 
146
                           "minx=%g maxx=%g miny=%g maxy=%g"), minx, maxx, miny, maxy);
147
147
        );
148
148
        return SWFRect();
149
149
    } 
158
158
    const SWF::FillType type = static_cast<SWF::FillType>(in.read_u8());
159
159
        
160
160
    IF_VERBOSE_PARSE(
161
 
        log_parse("  FillStyle read type = 0x%X", +type);
 
161
        log_parse(_("  FillStyle read type = 0x%X"), +type);
162
162
    );
163
163
 
164
164
    switch (type) {
204
204
            
205
205
            const boost::uint8_t num_gradients = grad_props & 0xF;
206
206
            IF_VERBOSE_PARSE(
207
 
               log_parse("  gradients count: %d", +num_gradients);
 
207
                log_parse(_("  gradients count: %d"), +num_gradients);
208
208
            );
209
209
        
210
210
            if (!num_gradients) {
263
263
                        break;
264
264
                    default: 
265
265
                        IF_VERBOSE_MALFORMED_SWF(
266
 
                            log_swferror("Illegal spread mode in gradient "
267
 
                                "definition.");
 
266
                            log_swferror(_("Illegal spread mode in gradient "
 
267
                                           "definition."));
268
268
                        );
269
269
                }
270
270
        
280
280
                        break;
281
281
                    default:
282
282
                        IF_VERBOSE_MALFORMED_SWF(
283
 
                            log_swferror("Illegal interpolation mode in "
284
 
                                "gradient definition.");
 
283
                            log_swferror(_("Illegal interpolation mode in "
 
284
                                           "gradient definition."));
285
285
                        );
286
286
                }
287
287
            }
405
405
    }
406
406
 
407
407
    IF_VERBOSE_PARSE(
408
 
        log_parse("  color: %s", color);
 
408
        log_parse(_("  color: %s"), color);
409
409
    );
410
410
    return std::make_pair(SolidFill(color), morph);
411
411
}