Branch libreoffice-5-0-4
[LibreOffice.git] / include / svx / numvset.hxx
blob0d84894385d779c8b0f576521821576c9566caaf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SVX_NUMVSET_HXX
20 #define INCLUDED_SVX_NUMVSET_HXX
22 #include <vcl/idle.hxx>
23 #include <svtools/valueset.hxx>
24 #include <limits.h>
25 #include <com/sun/star/uno/Reference.h>
26 #include <com/sun/star/uno/Sequence.h>
27 #include <com/sun/star/lang/Locale.hpp>
28 #include <svx/svxdllapi.h>
30 namespace com{namespace sun{ namespace star{
31 namespace container{
32 class XIndexAccess;
34 namespace beans{
35 struct PropertyValue;
37 namespace text{
38 class XNumberingFormatter;
40 }}}
42 class SvxBrushItem;
43 class SvxNumRule;
44 struct SvxBmpItemInfo
46 SvxBrushItem* pBrushItem;
47 sal_uInt16 nItemId;
50 class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
52 sal_uInt16 nPageType;
53 bool bHTMLMode;
54 Rectangle aOrgRect;
55 VclPtr<VirtualDevice> pVDev;
57 com::sun::star::uno::Reference<com::sun::star::text::XNumberingFormatter> xFormatter;
58 com::sun::star::lang::Locale aLocale;
60 com::sun::star::uno::Sequence<
61 com::sun::star::uno::Sequence<
62 com::sun::star::beans::PropertyValue> > aNumSettings;
64 com::sun::star::uno::Sequence<
65 com::sun::star::uno::Reference<
66 com::sun::star::container::XIndexAccess> > aOutlineSettings;
68 public:
69 SvxNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP);
70 void init(sal_uInt16 nType);
71 virtual ~SvxNumValueSet();
72 virtual void dispose() SAL_OVERRIDE;
74 virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
76 void SetHTMLMode(bool bSet) {bHTMLMode = bSet;}
77 void SetNumberingSettings(
78 const css::uno::Sequence<
79 css::uno::Sequence<css::beans::PropertyValue> >& aNum,
80 css::uno::Reference<css::text::XNumberingFormatter>& xFormatter,
81 const css::lang::Locale& rLocale );
83 void SetOutlineNumberingSettings(
84 css::uno::Sequence<
85 css::uno::Reference<css::container::XIndexAccess> >& rOutline,
86 css::uno::Reference<css::text::XNumberingFormatter>& xFormatter,
87 const css::lang::Locale& rLocale);
90 class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
92 Idle aFormatIdle;
93 bool bGrfNotFound;
95 void init();
97 protected:
98 DECL_LINK_TYPED(FormatHdl_Impl, Idle *, void);
100 void SetGrfNotFound(bool bSet) {bGrfNotFound = bSet;}
101 bool IsGrfNotFound()const {return bGrfNotFound;}
103 Idle& GetFormatIdle() {return aFormatIdle;}
105 public:
106 SvxBmpNumValueSet(vcl::Window* pParent, WinBits nWinBits = WB_TABSTOP);
107 virtual ~SvxBmpNumValueSet();
108 virtual void dispose() SAL_OVERRIDE;
110 virtual void UserDraw( const UserDrawEvent& rUDEvt ) SAL_OVERRIDE;
114 #endif
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */