diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-05-02 14:36:05 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-05-02 14:36:05 +0000 |
commit | 9b39037b633545cec82c501d601cd93cf7d27ea9 (patch) | |
tree | 7bc5e473966e7b38e6a810238617345acb4f0511 /svx | |
parent | 940aa35207a1b30b7c5ebc2279ab2ef1caea1fe2 (diff) |
INTEGRATION: CWS sfxcleanup (1.18.300); FILE MERGED
2006/03/22 14:11:37 mba 1.18.300.1: #i132394#: move Adjustment conversion to the only place where it is needed
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/unodraw/unonrule.cxx | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/svx/source/unodraw/unonrule.cxx b/svx/source/unodraw/unonrule.cxx index f2f8935e6c88..19f218178620 100644 --- a/svx/source/unodraw/unonrule.cxx +++ b/svx/source/unodraw/unonrule.cxx @@ -4,9 +4,9 @@ * * $RCSfile: unonrule.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: rt $ $Date: 2005-09-09 01:06:15 $ + * last change: $Author: rt $ $Date: 2006-05-02 15:36:05 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,6 +40,9 @@ #include <brshitem.hxx> #endif +#ifndef _COM_SUN_STAR_TEXT_HORIORIENTATION_HPP_ +#include <com/sun/star/text/HoriOrientation.hpp> +#endif #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ #include <com/sun/star/lang/XUnoTunnel.hpp> #endif @@ -90,6 +93,41 @@ using namespace ::rtl; using namespace ::vos; using namespace ::std; +const SvxAdjust aUnoToSvxAdjust[] = +{ + SVX_ADJUST_LEFT, + SVX_ADJUST_RIGHT, + SVX_ADJUST_CENTER, + SVX_ADJUST_LEFT, + SVX_ADJUST_LEFT, + SVX_ADJUST_LEFT, + SVX_ADJUST_BLOCK +}; + +const unsigned short aSvxToUnoAdjust[] = +{ + text::HoriOrientation::LEFT, + text::HoriOrientation::RIGHT, + text::HoriOrientation::FULL, + text::HoriOrientation::CENTER, + text::HoriOrientation::FULL, + text::HoriOrientation::LEFT +}; + +SvxAdjust ConvertUnoAdjust( unsigned short nAdjust ) +{ + DBG_ASSERT( nAdjust <= 7, "Enum hat sich geaendert! [CL]" ); + return aUnoToSvxAdjust[nAdjust]; +} + +unsigned short ConvertUnoAdjust( SvxAdjust eAdjust ) +{ + DBG_ASSERT( eAdjust <= 6, "Enum hat sich geaendert! [CL]" ); + return aSvxToUnoAdjust[eAdjust]; +} + + + /****************************************************************** * SvxUnoNumberingRules ******************************************************************/ |