/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_SWUICNTTAB_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_SWUICNTTAB_HXX #include #include #include #include #include #include #include #include #include "toxmgr.hxx" #include #include #include #include #include "cnttab.hxx" #include class IndexEntryResource; class IndexEntrySupplierWrapper; class SwTOXEdit; class SwTOXButton; class SwTOXEntryTabPage; class SwOneExampleFrame; class SwWrtShell; namespace com{namespace sun{namespace star{ namespace text{ class XTextSection; class XDocumentIndex; } }}} struct SwIndexSections_Impl { css::uno::Reference< css::text::XTextSection > xContainerSection; css::uno::Reference< css::text::XDocumentIndex > xDocumentIndex; }; class SwMultiTOXTabDialog : public SfxTabDialog { VclPtr m_pExampleContainerWIN; VclPtr m_pShowExampleCB; SwTOXMgr* m_pMgr; SwWrtShell& m_rWrtShell; sal_uInt16 m_nSelectId; sal_uInt16 m_nColumnId; sal_uInt16 m_nBackGroundId; sal_uInt16 m_nEntriesId; SwOneExampleFrame* m_pExampleFrame; SwTOXDescription** m_pDescriptionArray; SwForm** m_pFormArray; SwIndexSections_Impl** m_pxIndexSectionsArray; SwTOXBase* m_pParamTOXBase; CurTOXType m_eCurrentTOXType; OUString m_sUserDefinedIndex; sal_uInt16 m_nTypeCount; sal_uInt16 m_nInitialTOXType; bool m_bEditTOX; bool m_bExampleCreated; bool m_bGlobalFlag; virtual short Ok() override; SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX); DECL_LINK(CreateExample_Hdl, SwOneExampleFrame&, void); DECL_LINK(ShowPreviewHdl, Button*, void); public: SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, SwTOXBase* pCurTOX, sal_uInt16 nToxType, bool bGlobal); virtual ~SwMultiTOXTabDialog() override; virtual void dispose() override; virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; SwForm* GetForm(CurTOXType eType); const CurTOXType& GetCurrentTOXType() const { return m_eCurrentTOXType;} void SetCurrentTOXType(const CurTOXType& eSet) { m_eCurrentTOXType = eSet; } bool IsTOXEditMode() const { return m_bEditTOX;} SwWrtShell& GetWrtShell() {return m_rWrtShell;} SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes); void CreateOrUpdateExample( TOXTypes nTOXIndex, sal_uInt16 nPage = 0, sal_uInt16 nCurLevel = USHRT_MAX); static bool IsNoNum(SwWrtShell& rSh, const OUString& rName); }; class SwTOXSelectTabPage : public SfxTabPage { VclPtr m_pTitleED; VclPtr m_pTypeFT; VclPtr m_pTypeLB; VclPtr m_pReadOnlyCB; VclPtr m_pAreaFrame; VclPtr m_pAreaLB; VclPtr m_pLevelFT; //content, user VclPtr m_pLevelNF; //content, user //content VclPtr m_pCreateFrame; // content, user, illustration VclPtr m_pFromHeadingsCB; VclPtr m_pAddStylesCB; VclPtr m_pAddStylesPB; //user VclPtr m_pFromTablesCB; VclPtr m_pFromFramesCB; VclPtr m_pFromGraphicsCB; VclPtr m_pFromOLECB; VclPtr m_pLevelFromChapterCB; //illustration + table VclPtr m_pFromCaptionsRB; VclPtr m_pFromObjectNamesRB; //illustration and tables VclPtr m_pCaptionSequenceFT; VclPtr m_pCaptionSequenceLB; VclPtr m_pDisplayTypeFT; VclPtr m_pDisplayTypeLB; //all but illustration and table VclPtr m_pTOXMarksCB; //index only VclPtr m_pIdxOptionsFrame; VclPtr m_pCollectSameCB; VclPtr m_pUseFFCB; VclPtr m_pUseDashCB; VclPtr m_pCaseSensitiveCB; VclPtr m_pInitialCapsCB; VclPtr m_pKeyAsEntryCB; VclPtr m_pFromFileCB; VclPtr m_pAutoMarkPB; // object only VclPtr m_pFromObjCLB; VclPtr m_pFromObjFrame; VclPtr m_pSequenceCB; VclPtr m_pBracketLB; VclPtr m_pAuthorityFrame; //all VclPtr m_pSortFrame; VclPtr m_pLanguageLB; VclPtr m_pSortAlgorithmLB; IndexEntryResource* pIndexRes; OUString aStyleArr[MAXLEVEL]; OUString sAutoMarkURL; OUString sAutoMarkType; OUString sAddStyleUser; OUString sAddStyleContent; const IndexEntrySupplierWrapper* pIndexEntryWrapper; bool m_bWaitingInitialSettings; DECL_LINK(TOXTypeHdl, ListBox&, void ); DECL_LINK(AddStylesHdl, Button*, void ); DECL_LINK(MenuEnableHdl, Menu*, bool); DECL_LINK(MenuExecuteHdl, Menu*, bool); DECL_LINK(LanguageListBoxHdl, ListBox&, void); void LanguageHdl(ListBox const *); DECL_LINK(CheckBoxHdl, Button*, void ); DECL_LINK(RadioButtonHdl, Button*, void); DECL_LINK(ModifyHdl, Edit&, void); DECL_LINK(ModifyListBoxHdl, ListBox&, void); void ApplyTOXDescription(); void FillTOXDescription(); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; public: SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& rAttrSet); virtual ~SwTOXSelectTabPage() override; virtual void dispose() override; virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet* ) override; virtual void ActivatePage( const SfxItemSet& ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; static VclPtr Create( TabPageParent pParent, const SfxItemSet* rAttrSet); void SelectType(TOXTypes eSet); //preset TOXType, GlobalDoc void SetWrtShell(SwWrtShell const & rSh); }; class SwTokenWindow : public VclHBox, public VclBuilderContainer { typedef std::vector >::iterator ctrl_iterator; typedef std::vector >::const_iterator ctrl_const_iterator; typedef std::vector >::reverse_iterator ctrl_reverse_iterator; typedef std::vector >::const_reverse_iterator ctrl_const_reverse_iterator; VclPtr