xref: /AOO41X/main/svx/inc/svx/swframevalidation.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SVXSWFRAMEVALIDATION_HXX
28 #define _SVXSWFRAMEVALIDATION_HXX
29 #include <sal/types.h>
30 #include <tools/gen.hxx>
31 #include <limits.h>
32 
33 /* -----------------03.03.2004 16:31-----------------
34     struct to determine min/max values for fly frame positioning in Writer
35  --------------------------------------------------*/
36 struct SvxSwFrameValidation
37 {
38     sal_Int16           nAnchorType; //com::sun::star::text::TextContentAnchorType
39     sal_Int16           nHoriOrient; //com::sun::star::text::HoriOrientation
40     sal_Int16           nVertOrient; //com::sun::star::text::VertOrientation
41     sal_Int16           nHRelOrient; //com::sun::star::text::RelOrientation
42     sal_Int16           nVRelOrient; //com::sun::star::text::RelOrientation
43     bool                bAutoHeight;
44     bool                bAutoWidth;
45     bool                bMirror;
46     bool                bFollowTextFlow;
47 
48     sal_Int32 nHPos;
49     sal_Int32 nMaxHPos;
50     sal_Int32 nMinHPos;
51 
52     sal_Int32 nVPos;
53     sal_Int32 nMaxVPos;
54     sal_Int32 nMinVPos;
55 
56     sal_Int32 nWidth;
57     sal_Int32 nMinWidth;
58     sal_Int32 nMaxWidth;
59 
60     sal_Int32 nHeight;
61     sal_Int32 nMinHeight;
62     sal_Int32 nMaxHeight;
63 
64     Size    aPercentSize;   // Size fuer 100%-Wert
65 
66     SvxSwFrameValidation() :
67         bAutoHeight(false),
68         bAutoWidth(false),
69         bMirror(false),
70         bFollowTextFlow( false ),
71         nHPos(0),
72         nMaxHPos(SAL_MAX_INT32),
73         nMinHPos(0),
74         nVPos(0),
75         nMaxVPos(SAL_MAX_INT32),
76         nMinVPos(0),
77         nWidth( 283 * 4 ), //2.0 cm
78         nMinWidth(0),
79         nMaxWidth(SAL_MAX_INT32),
80         nHeight( 283 ), //0.5 cm
81         nMaxHeight(SAL_MAX_INT32)
82     {
83     }
84 };
85 
86 #endif
87 
88