filters

oowriter/conversion.h
1/* This file is part of the KOffice project
2 Copyright (C) 2002 Werner Trobin <trobin@kde.org>
3 Copyright (C) 2002 David Faure <faure@kde.org>
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef CONVERSION_H
21#define CONVERSION_H
22
23#include <tqstring.h>
24#include <tqpair.h>
25
26// Static methods for simple OO<->KWord conversions
27// (enums etc.)
28// import* means OO->KWord
29// export* means KWord->OO
30// Only put here the conversions that are specific to KWord.
31// Those that can be used in KPresenter<->ooimpress should go to OoUtils.
32
33namespace Conversion
34{
35 // Convert paragraph alignment value
36 TQString importAlignment( const TQString& );
37 TQString exportAlignment( const TQString& );
38
39 // Convert frame wrapping (run-around)
40 // KWord-1.3 knows runaround(int) and runaroundSide(TQString)
41 TQPair<int,TQString> importWrapping( const TQString& );
42 TQString exportWrapping( const TQPair<int,TQString>& runAroundAttribs );
43
44 // Convert overflow behavior ("what to do if the text is bigger than the frame")
45 int importOverflowBehavior( const TQString& oasisOverflowBehavior );
46 TQString exportOverflowBehavior( const TQString& kwordAutoCreateNewFrame );
47
48 // Convert numbering format (for a list) to a kword counter type
49 int importCounterType( const TQString& numFormat );
50
51 // Header-footer helpers
52 TQString headerTypeToFramesetName( const TQString& tagName, bool hasEvenOdd );
53 int headerTypeToFrameInfo( const TQString& tagName, bool hasEvenOdd );
54}
55
56#endif