tdf#124953: Use rangelist's combined range top-left address...
[LibreOffice.git] / include / svx / numvset.hxx
blobcab7968c895a2e6d0cda77683b25d4e799bb2274
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;
45 enum class NumberingPageType
47 BULLET,
48 SINGLENUM,
49 OUTLINE,
50 BITMAP
53 class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
55 NumberingPageType ePageType;
56 tools::Rectangle aOrgRect;
57 VclPtr<VirtualDevice> pVDev;
59 css::uno::Reference<css::text::XNumberingFormatter> xFormatter;
60 css::lang::Locale aLocale;
62 css::uno::Sequence<
63 css::uno::Sequence<
64 css::beans::PropertyValue> > aNumSettings;
66 css::uno::Sequence<
67 css::uno::Reference<
68 css::container::XIndexAccess> > aOutlineSettings;
70 public:
71 SvxNumValueSet(vcl::Window* pParent, WinBits nWinBits);
72 void init(NumberingPageType eType);
73 virtual ~SvxNumValueSet() override;
74 virtual void dispose() override;
76 virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
78 void SetNumberingSettings(
79 const css::uno::Sequence<
80 css::uno::Sequence<css::beans::PropertyValue> >& aNum,
81 css::uno::Reference<css::text::XNumberingFormatter> const & xFormatter,
82 const css::lang::Locale& rLocale );
84 void SetOutlineNumberingSettings(
85 css::uno::Sequence<
86 css::uno::Reference<css::container::XIndexAccess> > const & rOutline,
87 css::uno::Reference<css::text::XNumberingFormatter> const & xFormatter,
88 const css::lang::Locale& rLocale);
91 class SVX_DLLPUBLIC NumValueSet : public SvtValueSet
93 NumberingPageType ePageType;
94 tools::Rectangle aOrgRect;
95 VclPtr<VirtualDevice> pVDev;
97 css::uno::Reference<css::text::XNumberingFormatter> xFormatter;
98 css::lang::Locale aLocale;
100 css::uno::Sequence<
101 css::uno::Sequence<
102 css::beans::PropertyValue> > aNumSettings;
104 css::uno::Sequence<
105 css::uno::Reference<
106 css::container::XIndexAccess> > aOutlineSettings;
108 public:
109 NumValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow);
110 void init(NumberingPageType eType);
111 virtual ~NumValueSet() override;
113 virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
115 void SetNumberingSettings(
116 const css::uno::Sequence<
117 css::uno::Sequence<css::beans::PropertyValue> >& aNum,
118 css::uno::Reference<css::text::XNumberingFormatter> const & xFormatter,
119 const css::lang::Locale& rLocale );
121 void SetOutlineNumberingSettings(
122 css::uno::Sequence<
123 css::uno::Reference<css::container::XIndexAccess> > const & rOutline,
124 css::uno::Reference<css::text::XNumberingFormatter> const & xFormatter,
125 const css::lang::Locale& rLocale);
129 class SVX_DLLPUBLIC SvxBmpNumValueSet final : public NumValueSet
131 Idle aFormatIdle;
132 bool bGrfNotFound;
134 DECL_LINK(FormatHdl_Impl, Timer *, void);
136 public:
137 SvxBmpNumValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow);
138 void init();
139 virtual ~SvxBmpNumValueSet() override;
141 virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
144 #endif
146 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */