~ubuntu-branches/ubuntu/utopic/inkscape/utopic-proposed

« back to all changes in this revision

Viewing changes to src/io/uristream.cpp

  • Committer: Package Import Robot
  • Author(s): Alex Valavanis
  • Date: 2014-08-19 19:10:32 UTC
  • mfrom: (1.6.5) (2.5.14 sid)
  • Revision ID: package-import@ubuntu.com-20140819191032-2eca1qihaszjk9i6
Tags: 0.48.5-2ubuntu1
* Merge with Debian Unstable (LP: #1358863). Fixes several Ubuntu bugs:
  - Illustrator CS SVG won't load: namespace URIs in entities (LP: #166371)
  - inkscape crashed with SIGSEGV in
    sp_dtw_color_profile_event() (LP: #966441)
  - inkscape crashed with SIGSEGV (LP: #1051017)
  - inkscape crashed with SIGSEGV in Inkscape::Preferences::_getNode()
    (LP: #1163241)
  - save a copy reverts to save as (LP: #529843)
  - Extension to braille not working on Xubuntu 12.10 (LP: #1090865)
* Remaining changes:
  - debian/control:
    + Set Ubuntu Developer as maintainer,
    + build-depend on dh-translation to handle Ubuntu translation,
    + demote pstoedit from Recommends to Suggests (because it's in universe),
  - debian/patches/0006_add_unity_quicklist_support.patch: add.
  - debian/patches/series: update.
  - debian/rules:
    + add dh_translation to handle Ubuntu translation
* Drop debian/patches/librevenge.patch (superseded by
    debian/patches/0006-Update_to_new_libwpg.patch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
 *
105
105
 */
106
106
UriInputStream::UriInputStream(Inkscape::URI &source)
107
 
                    throw (StreamException): uri(source)
 
107
   : uri(source)
108
108
{
109
109
    //get information from uri
110
110
    char const *schemestr = uri.getScheme();
146
146
 *
147
147
 */
148
148
UriInputStream::UriInputStream(FILE *source, Inkscape::URI &uri)
149
 
    throw (StreamException): inf(source),
150
 
                             uri(uri)
 
149
    : inf(source),
 
150
      uri(uri)
151
151
{
152
152
    scheme = SCHEME_FILE;
153
153
    if (!inf) {
160
160
/**
161
161
 *
162
162
 */
163
 
UriInputStream::~UriInputStream() throw(StreamException)
 
163
UriInputStream::~UriInputStream()
164
164
{
165
165
    close();
166
166
}
170
170
 * this input stream without blocking by the next caller of a method for
171
171
 * this input stream.
172
172
 */
173
 
int UriInputStream::available() throw(StreamException)
 
173
int UriInputStream::available()
174
174
{
175
175
    return 0;
176
176
}
180
180
 *  Closes this input stream and releases any system resources
181
181
 *  associated with the stream.
182
182
 */
183
 
void UriInputStream::close() throw(StreamException)
 
183
void UriInputStream::close()
184
184
{
185
185
    if (closed)
186
186
        return;
207
207
/**
208
208
 * Reads the next byte of data from the input stream.  -1 if EOF
209
209
 */
210
 
int UriInputStream::get() throw(StreamException)
 
210
int UriInputStream::get()
211
211
{
212
212
    int retVal = -1;
213
213
    if (!closed)
249
249
 *
250
250
 */
251
251
UriReader::UriReader(Inkscape::URI &uri)
252
 
                    throw (StreamException)
253
252
{
254
253
    inputStream = new UriInputStream(uri);
255
254
}
257
256
/**
258
257
 *
259
258
 */
260
 
UriReader::~UriReader() throw (StreamException)
 
259
UriReader::~UriReader()
261
260
{
262
261
    delete inputStream;
263
262
}
265
264
/**
266
265
 *
267
266
 */
268
 
int UriReader::available() throw(StreamException)
 
267
int UriReader::available()
269
268
{
270
269
    return inputStream->available();
271
270
}
273
272
/**
274
273
 *
275
274
 */
276
 
void UriReader::close() throw(StreamException)
 
275
void UriReader::close()
277
276
{
278
277
    inputStream->close();
279
278
}
281
280
/**
282
281
 *
283
282
 */
284
 
gunichar UriReader::get() throw(StreamException)
 
283
gunichar UriReader::get()
285
284
{
286
285
    gunichar ch = (gunichar)inputStream->get();
287
286
    return ch;
296
295
 * Temporary kludge
297
296
 */
298
297
UriOutputStream::UriOutputStream(FILE* fp, Inkscape::URI &destination)
299
 
                    throw (StreamException): closed(false),
300
 
                                             ownsFile(false),
301
 
                                             outf(fp),
302
 
                                             uri(destination),
303
 
                                             scheme(SCHEME_FILE)
 
298
    : closed(false),
 
299
      ownsFile(false),
 
300
      outf(fp),
 
301
      uri(destination),
 
302
      scheme(SCHEME_FILE)
304
303
{
305
304
    if (!outf) {
306
305
        Glib::ustring err = "UriOutputStream given null file ";
312
311
 *
313
312
 */
314
313
UriOutputStream::UriOutputStream(Inkscape::URI &destination)
315
 
                    throw (StreamException): closed(false),
316
 
                                             ownsFile(true),
317
 
                                             outf(NULL),
318
 
                                             uri(destination),
319
 
                                             scheme(SCHEME_FILE)
 
314
    : closed(false),
 
315
      ownsFile(true),
 
316
      outf(NULL),
 
317
      uri(destination),
 
318
      scheme(SCHEME_FILE)
320
319
{
321
320
    //get information from uri
322
321
    char const *schemestr = uri.getScheme();
353
352
/**
354
353
 *
355
354
 */
356
 
UriOutputStream::~UriOutputStream() throw(StreamException)
 
355
UriOutputStream::~UriOutputStream()
357
356
{
358
357
    close();
359
358
}
362
361
 * Closes this output stream and releases any system resources
363
362
 * associated with this stream.
364
363
 */
365
 
void UriOutputStream::close() throw(StreamException)
 
364
void UriOutputStream::close()
366
365
{
367
366
    if (closed)
368
367
        return;
391
390
 *  Flushes this output stream and forces any buffered output
392
391
 *  bytes to be written out.
393
392
 */
394
 
void UriOutputStream::flush() throw(StreamException)
 
393
void UriOutputStream::flush()
395
394
{
396
395
    if (closed)
397
396
        return;
415
414
/**
416
415
 * Writes the specified byte to this output stream.
417
416
 */
418
 
void UriOutputStream::put(int ch) throw(StreamException)
 
417
void UriOutputStream::put(int ch)
419
418
{
420
419
    if (closed)
421
420
        return;
453
452
 *
454
453
 */
455
454
UriWriter::UriWriter(Inkscape::URI &uri)
456
 
                    throw (StreamException)
457
455
{
458
456
    outputStream = new UriOutputStream(uri);
459
457
}
461
459
/**
462
460
 *
463
461
 */
464
 
UriWriter::~UriWriter() throw (StreamException)
 
462
UriWriter::~UriWriter()
465
463
{
466
464
    delete outputStream;
467
465
}
469
467
/**
470
468
 *
471
469
 */
472
 
void UriWriter::close() throw(StreamException)
 
470
void UriWriter::close()
473
471
{
474
472
    outputStream->close();
475
473
}
477
475
/**
478
476
 *
479
477
 */
480
 
void UriWriter::flush() throw(StreamException)
 
478
void UriWriter::flush()
481
479
{
482
480
    outputStream->flush();
483
481
}
485
483
/**
486
484
 *
487
485
 */
488
 
void UriWriter::put(gunichar ch) throw(StreamException)
 
486
void UriWriter::put(gunichar ch)
489
487
{
490
488
    int ich = (int)ch;
491
489
    outputStream->put(ich);