~ubuntu-branches/ubuntu/saucy/libwpd/saucy

« back to all changes in this revision

Viewing changes to src/lib/WP5SingleByteFunction.cpp

  • Committer: Package Import Robot
  • Author(s): Rene Engelhard
  • Date: 2011-11-29 23:31:13 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20111129233113-xdtwca9h0y6wdxst
Tags: 0.9.4-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
1
2
/* libwpd
2
3
 * Copyright (C) 2002 William Lachance (wrlach@gmail.com)
3
4
 * Copyright (C) 2002 Marc Maurer (uwog@uwog.net)
4
5
 * Copyright (C) 2004 Fridrich Strba (fridrich.strba@bluewin.ch)
5
 
 *  
 
6
 *
6
7
 * This library is free software; you can redistribute it and/or
7
8
 * modify it under the terms of the GNU Lesser General Public
8
9
 * License as published by the Free Software Foundation; either
20
21
 * For further information visit http://libwpd.sourceforge.net
21
22
 */
22
23
 
23
 
/* "This product is not manufactured, approved, or supported by 
 
24
/* "This product is not manufactured, approved, or supported by
24
25
 * Corel Corporation or Corel Corporation Limited."
25
26
 */
26
27
 
28
29
#include "WP5Listener.h"
29
30
#include "libwpd_internal.h"
30
31
 
31
 
WP5SingleByteFunction * WP5SingleByteFunction::constructSingleByteFunction(WPXInputStream * /* input */, WPXEncryption * /* encryption */, uint8_t groupID)
 
32
WP5SingleByteFunction *WP5SingleByteFunction::constructSingleByteFunction(WPXInputStream * /* input */, WPXEncryption * /* encryption */, uint8_t groupID)
32
33
{
33
34
 
34
 
        switch (groupID) 
 
35
        switch (groupID)
35
36
        {
36
37
        case 0x8c: // combination hard return/soft page
37
38
        case 0x90: // deletable return at EOL
38
39
        case 0x99: // dormant hard return
39
40
                return new WP5EOLFunction();
40
 
                
 
41
 
41
42
        case 0x93: // invisible return in line
42
43
        case 0x94: // invisible return EOL
43
44
        case 0x95: // invisible return EOP
45
46
 
46
47
        case 0xa0: // hard space
47
48
                return new WP5HardSpaceFunction();
48
 
                
 
49
 
49
50
        case 0xa9: // hard hyphen in line
50
51
        case 0xaa: // hard hyphen EOL
51
52
        case 0xab: // hard hyphen EOP
54
55
        case 0xac: // soft hyphen in line
55
56
        case 0xad: // soft hyphen EOL
56
57
        case 0xae: // soft hyphen EOP
57
 
                return new WP5SoftHyphenFunction();             
58
 
        
 
58
                return new WP5SoftHyphenFunction();
 
59
 
59
60
        default:
60
61
                // should not happen
61
62
                return 0;
87
88
        listener->insertCharacter((uint32_t) 0xad);
88
89
}
89
90
 
 
91
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */