1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 /* 3 * This file is part of the LibreOffice project. 4 * 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/. 8 * 9 * This file incorporates work covered by the following license notice: 10 * 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 . 18 */ 19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_CPTION_HXX 20 #define INCLUDED_SW_SOURCE_UIBASE_INC_CPTION_HXX 21 22 #include <sfx2/basedlgs.hxx> 23 24 #include <com/sun/star/container/XNameAccess.hpp> 25 26 #include "wrtsh.hxx" 27 #include "optload.hxx" 28 29 class SwFieldMgr; 30 class SwView; 31 32 class SwCaptionDialog : public SfxDialogController 33 { 34 OUString m_sNone; 35 TextFilterAutoConvert m_aTextFilter; 36 SwView& rView; // search per active, avoid View 37 std::unique_ptr<SwFieldMgr> pMgr; // pointer to save the include 38 39 OUString sCharacterStyle; 40 bool bCopyAttributes; 41 bool bOrderNumberingFirst; //#i61007# order of captions 42 43 css::uno::Reference<css::container::XNameAccess> xNameAccess; 44 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::Label> m_xPosText; 56 std::unique_ptr<weld::ComboBox> m_xPosBox; 57 std::unique_ptr<weld::Button> m_xOKButton; 58 std::unique_ptr<weld::Button> m_xAutoCaptionButton; 59 std::unique_ptr<weld::Button> m_xOptionButton; 60 std::unique_ptr<weld::CustomWeld> m_xPreview; 61 62 DECL_LINK(SelectListBoxHdl, weld::ComboBox&, void); 63 DECL_LINK(ModifyEntryHdl, weld::Entry&, void); 64 DECL_LINK(ModifyComboHdl, weld::ComboBox&, void); 65 DECL_LINK(OptionHdl, weld::Button&, void); 66 DECL_LINK(CaptionHdl, weld::Button&, void); 67 68 void Apply(); 69 70 void ModifyHdl(); 71 void DrawSample(); 72 void ApplyCaptionOrder(); //#i61007# order of captions 73 74 static OUString our_aSepTextSave; // Save caption separator text 75 public: 76 SwCaptionDialog(weld::Window* pParent, SwView& rV); 77 virtual short run() override; 78 virtual ~SwCaptionDialog() override; 79 }; 80 81 #endif 82 83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 84