filters
conversion.h
00001 /* This file is part of the KOffice project 00002 Copyright (C) 2002 Werner Trobin <trobin@kde.org> 00003 Copyright (C) 2002 David Faure <faure@kde.org> 00004 00005 This program is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; see the file COPYING. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef CONVERSION_H 00021 #define CONVERSION_H 00022 00023 #include <qstring.h> 00024 #include <qpair.h> 00025 00026 // Static methods for simple OO<->KWord conversions 00027 // (enums etc.) 00028 // import* means OO->KWord 00029 // export* means KWord->OO 00030 // Only put here the conversions that are specific to KWord. 00031 // Those that can be used in KPresenter<->ooimpress should go to OoUtils. 00032 00033 namespace Conversion 00034 { 00035 // Convert paragraph alignment value 00036 QString importAlignment( const QString& ); 00037 QString exportAlignment( const QString& ); 00038 00039 // Convert frame wrapping (run-around) 00040 // KWord-1.3 knows runaround(int) and runaroundSide(QString) 00041 QPair<int,QString> importWrapping( const QString& ); 00042 QString exportWrapping( const QPair<int,QString>& runAroundAttribs ); 00043 00044 // Convert overflow behavior ("what to do if the text is bigger than the frame") 00045 int importOverflowBehavior( const QString& oasisOverflowBehavior ); 00046 QString exportOverflowBehavior( const QString& kwordAutoCreateNewFrame ); 00047 00048 // Convert numbering format (for a list) to a kword counter type 00049 int importCounterType( const QString& numFormat ); 00050 00051 // Header-footer helpers 00052 QString headerTypeToFramesetName( const QString& tagName, bool hasEvenOdd ); 00053 int headerTypeToFrameInfo( const QString& tagName, bool hasEvenOdd ); 00054 } 00055 00056 #endif