Update ooo320-m1
[ooovba.git] / svx / inc / numvset.hxx
blob04b3fffae28c79eb2c2038506c5373527ba27646
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: numvset.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_NUMVSET_HXX
31 #define _SVX_NUMVSET_HXX
34 // include ---------------------------------------------------------------
37 #include <svtools/valueset.hxx>
38 #include <limits.h>
39 #include <com/sun/star/uno/Reference.h>
40 #include <com/sun/star/uno/Sequence.h>
41 #include <com/sun/star/lang/Locale.hpp>
42 #include "svx/svxdllapi.h"
44 namespace com{namespace sun{ namespace star{
45 namespace container{
46 class XIndexAccess;
48 namespace beans{
49 struct PropertyValue;
51 namespace text{
52 class XNumberingFormatter;
54 }}}
56 class SvxBrushItem;
57 class SvxNumRule;
58 struct SvxBmpItemInfo
60 SvxBrushItem* pBrushItem;
61 USHORT nItemId;
64 /*-----------------09/09/97 01:05pm-----------------
66 --------------------------------------------------*/
67 class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
69 Color aLineColor;
70 USHORT nPageType;
71 BOOL bHTMLMode;
72 Rectangle aOrgRect;
73 VirtualDevice* pVDev;
75 com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter;
76 com::sun::star::lang::Locale aLocale;
78 com::sun::star::uno::Sequence<
79 com::sun::star::uno::Sequence<
80 com::sun::star::beans::PropertyValue> > aNumSettings;
82 com::sun::star::uno::Sequence<
83 com::sun::star::uno::Reference<
84 com::sun::star::container::XIndexAccess> > aOutlineSettings;
85 public:
86 SvxNumValueSet( Window* pParent, const ResId& rResId, USHORT nType );
87 ~SvxNumValueSet();
89 virtual void UserDraw( const UserDrawEvent& rUDEvt );
91 void SetHTMLMode(BOOL bSet) {bHTMLMode = bSet;}
92 void SetNumberingSettings(
93 const com::sun::star::uno::Sequence<
94 com::sun::star::uno::Sequence<
95 com::sun::star::beans::PropertyValue> >& aNum,
96 com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter,
97 const com::sun::star::lang::Locale& rLocale );
99 void SetOutlineNumberingSettings(
100 com::sun::star::uno::Sequence<
101 com::sun::star::uno::Reference<
102 com::sun::star::container::XIndexAccess> >& rOutline,
103 com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter>& xFormatter,
104 const com::sun::star::lang::Locale& rLocale);
107 /*-----------------13.02.97 09.32-------------------
109 --------------------------------------------------*/
111 class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
113 String sBullets;
114 Timer aFormatTimer;
115 BOOL bGrfNotFound;
117 protected:
118 DECL_LINK(FormatHdl_Impl, Timer*);
120 void SetGrfNotFound(BOOL bSet) {bGrfNotFound = bSet;}
121 BOOL IsGrfNotFound()const {return bGrfNotFound;}
123 Timer& GetFormatTimer() {return aFormatTimer;}
125 public:
126 SvxBmpNumValueSet( Window* pParent, const ResId& rResId/*, const List& rStrNames*/);
127 ~SvxBmpNumValueSet();
129 virtual void UserDraw( const UserDrawEvent& rUDEvt );
132 /*-----------------02.12.97 10:31-------------------
134 --------------------------------------------------*/
136 class SvxNumberingPreview : public Window
138 const SvxNumRule* pActNum;
139 Font aStdFont;
140 long nPageWidth;
141 const String* pOutlineNames;
142 BOOL bPosition;
143 UINT16 nActLevel;
145 protected:
146 virtual void Paint( const Rectangle& rRect );
148 public:
149 SvxNumberingPreview(Window* pParent, const ResId& rResId ) :
150 Window(pParent, rResId),
151 pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(FALSE), nActLevel(USHRT_MAX)
152 { SetBorderStyle( WINDOW_BORDER_MONO ); }
154 void SetNumRule(const SvxNumRule* pNum)
155 {pActNum = pNum; Invalidate();};
156 void SetPageWidth(long nPgWidth)
157 {nPageWidth = nPgWidth;}
158 void SetOutlineNames(const String* pNames)
159 {pOutlineNames = pNames;}
160 void SetPositionMode()
161 { bPosition = TRUE;}
162 void SetLevel(USHORT nSet) {nActLevel = nSet;}
167 #endif