1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SW_SOURCE_UIBASE_INC_CPTION_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_CPTION_HXX
22 #include <sfx2/basedlgs.hxx>
24 #include <com/sun/star/container/XNameAccess.hpp>
27 #include "optload.hxx"
32 class SwCaptionDialog final
: public SfxDialogController
35 TextFilterAutoConvert m_aTextFilter
;
36 SwView
& m_rView
; // search per active, avoid View
37 std::unique_ptr
<SwFieldMgr
> m_pMgr
; // pointer to save the include
39 OUString m_sCharacterStyle
;
40 bool m_bCopyAttributes
;
41 bool m_bOrderNumberingFirst
; //#i61007# order of captions
43 css::uno::Reference
<css::container::XNameAccess
> m_xNameAccess
;
45 SwCaptionPreview m_aPreview
;
46 std::unique_ptr
<weld::Entry
> m_xTextEdit
;
47 std::unique_ptr
<weld::ComboBox
> m_xCategoryBox
;
48 std::unique_ptr
<weld::Label
> m_xFormatText
;
49 std::unique_ptr
<weld::ComboBox
> m_xFormatBox
;
50 //#i61007# order of captions
51 std::unique_ptr
<weld::Label
> m_xNumberingSeparatorFT
;
52 std::unique_ptr
<weld::Entry
> m_xNumberingSeparatorED
;
53 std::unique_ptr
<weld::Label
> m_xSepText
;
54 std::unique_ptr
<weld::Entry
> m_xSepEdit
;
55 std::unique_ptr
<weld::ComboBox
> m_xPosBox
;
56 std::unique_ptr
<weld::Button
> m_xOKButton
;
57 std::unique_ptr
<weld::Button
> m_xAutoCaptionButton
;
58 std::unique_ptr
<weld::Button
> m_xOptionButton
;
59 std::unique_ptr
<weld::CustomWeld
> m_xPreview
;
61 DECL_LINK(SelectListBoxHdl
, weld::ComboBox
&, void);
62 DECL_LINK(ModifyEntryHdl
, weld::Entry
&, void);
63 DECL_LINK(ModifyComboHdl
, weld::ComboBox
&, void);
64 DECL_LINK(OptionHdl
, weld::Button
&, void);
65 DECL_LINK(CaptionHdl
, weld::Button
&, void);
66 DECL_LINK(OKHdl
, weld::Button
&, void);
72 void ApplyCaptionOrder(); //#i61007# order of captions
74 static OUString s_aSepTextSave
; // Save caption separator text
76 SwCaptionDialog(weld::Window
* pParent
, SwView
& rV
);
77 virtual short run() override
;
78 virtual ~SwCaptionDialog() override
;
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */