KOffice – TDE office suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

conversion.h 2.1KB

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