1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: numvset.hxx,v $
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>
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
{
52 class XNumberingFormatter
;
60 SvxBrushItem
* pBrushItem
;
64 /*-----------------09/09/97 01:05pm-----------------
66 --------------------------------------------------*/
67 class SVX_DLLPUBLIC SvxNumValueSet
: public ValueSet
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
;
86 SvxNumValueSet( Window
* pParent
, const ResId
& rResId
, USHORT nType
);
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
118 DECL_LINK(FormatHdl_Impl
, Timer
*);
120 void SetGrfNotFound(BOOL bSet
) {bGrfNotFound
= bSet
;}
121 BOOL
IsGrfNotFound()const {return bGrfNotFound
;}
123 Timer
& GetFormatTimer() {return aFormatTimer
;}
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
;
141 const String
* pOutlineNames
;
146 virtual void Paint( const Rectangle
& rRect
);
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()
162 void SetLevel(USHORT nSet
) {nActLevel
= nSet
;}