~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to filters/kword/msword-odf/conversion.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
namespace Conversion
45
45
{
46
 
// UString -> QString conversion. Use .string() to get the QString.
47
 
// Always store the QString into a variable first, to avoid a deep copy.
 
46
    const int MS_SYMBOL_ENCODING[256] = {
 
47
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
48
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
49
        32, 33, 8704, 35, 8707, 37, 38, 8715, 40, 41, 8727, 43, 44, 8722, 46, 47,
 
50
        48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
 
51
        8773, 913, 914, 935, 916, 917, 934, 915, 919, 921, 977, 922, 923, 924, 925, 927,
 
52
        928, 920, 929, 931, 932, 933, 962, 937, 926, 936, 918, 91, 8756, 93, 8869, 95,
 
53
        8254, 945, 946, 967, 948, 949, 966, 947, 951, 953, 981, 954, 955, 956, 957, 959,
 
54
        960, 952, 961, 963, 964, 965, 982, 969, 958, 968, 950, 123, 124, 125, 8764, 0,
 
55
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
56
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
57
        0, 978, 8242, 8804, 8725, 8734, 402, 9827, 9830, 9829, 9824, 8596, 8592, 8593, 8594, 8595,
 
58
        176, 177, 8243, 8805, 215, 8733, 8706, 8729, 247, 8800, 8801, 8776, 8943, 0, 0, 8629,
 
59
        0, 8465, 8476, 8472, 8855, 8853, 8709, 8745, 8746, 8835, 8839, 8836, 8834, 8838, 8712, 8713,
 
60
        8736, 8711, 174, 169, 8482, 8719, 8730, 8901, 172, 8743, 8744, 8660, 8656, 8657, 8658, 8659,
 
61
        9674, 9001, 0, 0, 0, 8721, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
 
62
        0, 9002, 8747, 8992, 0, 8993, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 
63
    };
 
64
// UString -> QString conversion. 
48
65
inline QString string(const wvWare::UString& str)
49
66
{
50
 
    // Let's hope there's no copying of the QConstString happening...
51
 
    return QString::fromRawData(reinterpret_cast<const QChar*>(str.data()), str.length());
 
67
    // Do a deep copy.  We used to not do that, but it lead to several
 
68
    // memory corruption bugs that were difficult to find.
 
69
    //
 
70
    // FIXME: Get rid of UString altogether and port wv2 to QString.
 
71
    return QString(reinterpret_cast<const QChar*>(str.data()), str.length());
52
72
}
53
73
 
54
74
//special version of string() that replaces spaces with _20_,
90
110
// Return an ODF attribute for border characteristics from a BRC structure
91
111
QString setBorderAttributes(const wvWare::Word97::BRC& brc);
92
112
 
 
113
//get a  koffice:borderspecial value "style"
 
114
QString borderKOfficeAttributes(const wvWare::Word97::BRC& brc);
 
115
 
93
116
// Convert wv2's Header Type to a KWord frameInfo value
94
117
int headerTypeToFrameInfo(unsigned char type);
95
118