diff options
author | Oliver Specht <os@openoffice.org> | 2002-10-17 12:23:51 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2002-10-17 12:23:51 +0000 |
commit | fec40810d6c16a019efd86bd8a669f277cbf9534 (patch) | |
tree | 35c2aa1315e981a733c332c017c274bf1914ef07 /sw/source/ui/frmdlg | |
parent | 6376b3740519e64da5813a840bf56366b98da61f (diff) |
#104295# names of horizontal alignment in vertical frames corrected
Diffstat (limited to 'sw/source/ui/frmdlg')
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 59 |
1 files changed, 38 insertions, 21 deletions
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 4dedb24a3a51..a24fb93bded7 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: frmpage.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: os $ $Date: 2002-09-27 11:50:44 $ + * last change: $Author: os $ $Date: 2002-10-17 13:23:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -590,19 +590,6 @@ void lcl_SetTwipValue(MetricField& rMetric, long nValue) ---------------------------------------------------------------------------*/ USHORT lcl_ChangeResIdToVerticalOrRTL(USHORT nResId, BOOL bVertical, BOOL bRTL) { - //exchange horizontal strings with vertical strings and vice versa - ResIdPair_Impl aHoriVertIds[] = - { - {STR_LEFT, STR_TOP}, - {STR_RIGHT, STR_BOTTOM}, - {STR_CENTER_HORI, STR_CENTER_VERT}, - {STR_FROMTOP, STR_FROMRIGHT}, - {STR_REL_PG_LEFT, STR_REL_PG_TOP}, - {STR_REL_PG_RIGHT, STR_REL_PG_BOTTOM} , - {STR_REL_FRM_LEFT, STR_REL_FRM_TOP}, - {STR_REL_FRM_RIGHT, STR_REL_FRM_BOTTOM}, - {0, 0} - }; //special handling of STR_FROMLEFT if(STR_FROMLEFT == nResId) { @@ -613,17 +600,47 @@ USHORT lcl_ChangeResIdToVerticalOrRTL(USHORT nResId, BOOL bVertical, BOOL bRTL) } if(bVertical) { + //exchange horizontal strings with vertical strings and vice versa + static const ResIdPair_Impl aHoriIds[] = + { + {STR_LEFT, STR_TOP}, + {STR_RIGHT, STR_BOTTOM}, + {STR_CENTER_HORI, STR_CENTER_VERT}, + {STR_FROMTOP, STR_FROMRIGHT}, + {STR_REL_PG_LEFT, STR_REL_PG_TOP}, + {STR_REL_PG_RIGHT, STR_REL_PG_BOTTOM} , + {STR_REL_FRM_LEFT, STR_REL_FRM_TOP}, + {STR_REL_FRM_RIGHT, STR_REL_FRM_BOTTOM}, + {0, 0} + }; + static const ResIdPair_Impl aVertIds[] = + { + {STR_TOP, STR_RIGHT}, + {STR_BOTTOM, STR_LEFT }, + {STR_CENTER_VERT, STR_CENTER_HORI}, + {STR_FROMTOP, STR_FROMRIGHT }, + {STR_REL_PG_TOP, STR_REL_PG_LEFT }, + {STR_REL_PG_BOTTOM, STR_REL_PG_RIGHT } , + {STR_REL_FRM_TOP, STR_REL_FRM_LEFT }, + {STR_REL_FRM_BOTTOM, STR_REL_FRM_RIGHT }, + {0, 0} + }; USHORT nIndex = 0; - while(aHoriVertIds[nIndex].nHori) + while(aHoriIds[nIndex].nHori) { - if(aHoriVertIds[nIndex].nHori == nResId) + if(aHoriIds[nIndex].nHori == nResId) { - nResId = aHoriVertIds[nIndex].nVert; - break; + nResId = aHoriIds[nIndex].nVert; + return nResId; } - else if(aHoriVertIds[nIndex].nVert == nResId) + nIndex++; + } + nIndex = 0; + while(aVertIds[nIndex].nHori) + { + if(aVertIds[nIndex].nHori == nResId) { - nResId = aHoriVertIds[nIndex].nHori; + nResId = aVertIds[nIndex].nVert; break; } nIndex++; |