/* -*- 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_OPTPAGE_HXX #define INCLUDED_SW_SOURCE_UIBASE_INC_OPTPAGE_HXX #include #include #include #include #include #include #include #include #include class SfxPrinter; class SwStdFontConfig; class SwWrtShell; class FontList; // Tools->Options->Writer->View // Tools->Options->Writer/Web->View class SwContentOptPage : public SfxTabPage { VclPtr m_pCrossCB; VclPtr m_pHMetric; VclPtr m_pVRulerCBox; VclPtr m_pVRulerRightCBox; VclPtr m_pVMetric; VclPtr m_pSmoothCBox; VclPtr m_pGrfCB; VclPtr m_pTableCB; VclPtr m_pDrwCB; VclPtr m_pFieldNameCB; VclPtr m_pPostItCB; VclPtr m_pSettingsFrame; VclPtr m_pSettingsLabel; VclPtr m_pMetricLabel; VclPtr m_pMetricLB; DECL_LINK(VertRulerHdl, CheckBox*); public: SwContentOptPage( vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SwContentOptPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE; virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE; }; // TabPage printer settings additions class SwAddPrinterTabPage : public SfxTabPage { VclPtr m_pGrfCB; VclPtr m_pCtrlFieldCB; VclPtr m_pBackgroundCB; VclPtr m_pBlackFontCB; VclPtr m_pPrintHiddenTextCB; VclPtr m_pPrintTextPlaceholderCB; VclPtr m_pPagesFrame; VclPtr m_pLeftPageCB; VclPtr m_pRightPageCB; VclPtr m_pProspectCB; VclPtr m_pProspectCB_RTL; VclPtr m_pCommentsFrame; VclPtr m_pNoRB; VclPtr m_pOnlyRB; VclPtr m_pEndRB; VclPtr m_pEndPageRB; VclPtr m_pInMarginsRB; VclPtr m_pPrintEmptyPagesCB; VclPtr m_pPaperFromSetupCB; VclPtr m_pFaxLB; OUString sNone; bool bAttrModified; bool bPreview; DECL_LINK(AutoClickHdl, void *); DECL_LINK(SelectHdl, void *); public: SwAddPrinterTabPage(vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SwAddPrinterTabPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE; virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE; void SetFax(const std::vector& ); void SetPreview(bool bPrev); virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; class SwStdFontTabPage : public SfxTabPage { friend class VclPtr; VclPtr pLabelFT; VclPtr pStandardBox; VclPtr pStandardHeightLB; VclPtr pTitleBox ; VclPtr pTitleHeightLB; VclPtr pListBox ; VclPtr pListHeightLB; VclPtr pLabelBox ; VclPtr pLabelHeightLB; VclPtr pIdxBox ; VclPtr pIndexHeightLB; VclPtr pStandardPB; OUString sShellStd; OUString sShellTitle; OUString sShellList; OUString sShellLabel; OUString sShellIndex; VclPtr pPrt; FontList* pFontList; SwStdFontConfig* pFontConfig; SwWrtShell* pWrtShell; LanguageType eLanguage; // only defaults were there? they were signed with the boxes bool bListDefault :1; bool bSetListDefault :1; bool bLabelDefault :1; bool bSetLabelDefault :1; bool bIdxDefault :1; bool bSetIdxDefault :1; bool bDeletePrinter :1; bool bListHeightDefault :1; bool bSetListHeightDefault :1; bool bLabelHeightDefault :1; bool bSetLabelHeightDefault :1; bool bIndexHeightDefault :1; bool bSetIndexHeightDefault :1; sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL] OUString sScriptWestern; OUString sScriptAsian; OUString sScriptComplex; DECL_LINK(StandardHdl, void *); DECL_LINK(ModifyHdl, ComboBox * ); DECL_LINK(ModifyHeightHdl, FontSizeBox * ); DECL_LINK(LoseFocusHdl, ComboBox * ); SwStdFontTabPage(vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SwStdFontTabPage(); virtual void dispose() SAL_OVERRIDE; public: static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE; virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE; void SetFontMode(sal_uInt8 nGroup) { nFontGroup = nGroup; } virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE; }; class SwTableOptionsTabPage : public SfxTabPage { VclPtr pHeaderCB; VclPtr pRepeatHeaderCB; VclPtr pDontSplitCB; VclPtr pBorderCB; VclPtr pNumFormattingCB; VclPtr pNumFormatFormattingCB; VclPtr pNumAlignmentCB; VclPtr pRowMoveMF; VclPtr pColMoveMF; VclPtr pRowInsertMF; VclPtr pColInsertMF; VclPtr pFixRB; VclPtr pFixPropRB; VclPtr pVarRB; SwWrtShell* pWrtShell; bool bHTMLMode; DECL_LINK(CheckBoxHdl, void *); public: SwTableOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SwTableOptionsTabPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet(SfxItemSet* rSet) SAL_OVERRIDE; virtual void Reset(const SfxItemSet* rSet) SAL_OVERRIDE; void SetWrtShell(SwWrtShell* pSh) { pWrtShell = pSh; } virtual void PageCreated( const SfxAllItemSet& aSet) SAL_OVERRIDE; }; // TabPage for ShadowCrsr class SwShdwCrsrOptionsTabPage : public SfxTabPage { //nonprinting characters VclPtr m_pParaCB; VclPtr m_pSHyphCB; VclPtr m_pSpacesCB; VclPtr m_pHSpacesCB; VclPtr m_pTabCB; VclPtr m_pBreakCB; VclPtr m_pCharHiddenCB; VclPtr m_pFieldHiddenCB; VclPtr m_pFieldHiddenParaCB; VclPtr m_pDirectCursorFrame; VclPtr m_pOnOffCB; VclPtr m_pFillMarginRB; VclPtr m_pFillIndentRB; VclPtr m_pFillTabRB; VclPtr m_pFillSpaceRB; VclPtr m_pCursorProtFrame; VclPtr m_pCrsrInProtCB; VclPtr m_pIgnoreProtCB; VclPtr m_pMathBaselineAlignmentCB; SwWrtShell * m_pWrtShell; public: SwShdwCrsrOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SwShdwCrsrOptionsTabPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; void SetWrtShell(SwWrtShell* pSh) { m_pWrtShell = pSh; } virtual void PageCreated( const SfxAllItemSet& aSet ) SAL_OVERRIDE; }; // mark preview class SwMarkPreview : public vcl::Window { Size m_aInitialSize; Color m_aBgCol; // background Color m_aTransCol; // transparency Color m_aMarkCol; // marks Color m_aLineCol; // general lines Color m_aShadowCol; // shadow Color m_aTextCol; // text Color m_aPrintAreaCol; // frame for print area Rectangle aPage; Rectangle aLeftPagePrtArea; Rectangle aRightPagePrtArea; sal_uInt16 nMarkPos; void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE; void PaintPage(vcl::RenderContext& rRenderContext, const Rectangle &rRect); void InitColors(); protected: virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; public: SwMarkPreview(vcl::Window* pParent, WinBits nWinBits); virtual ~SwMarkPreview(); inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; } inline void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; } virtual Size GetOptimalSize() const SAL_OVERRIDE; }; // redlining options class SwRedlineOptionsTabPage : public SfxTabPage { VclPtr pInsertLB; VclPtr pInsertColorLB; VclPtr pInsertedPreviewWN; VclPtr pDeletedLB; VclPtr pDeletedColorLB; VclPtr pDeletedPreviewWN; VclPtr pChangedLB; VclPtr pChangedColorLB; VclPtr pChangedPreviewWN; VclPtr pMarkPosLB; VclPtr pMarkColorLB; VclPtr pMarkPreviewWN; OUString sAuthor; OUString sNone; DECL_LINK(AttribHdl, ListBox* pLB); DECL_LINK(ChangedMaskPrevHdl, void* = 0); DECL_LINK(ColorHdl, ColorListBox* pColorLB); static void InitFontStyle(SvxFontPrevWindow& rExampleWin); public: SwRedlineOptionsTabPage(vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SwRedlineOptionsTabPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; }; // TabPage test settings for SW #ifdef DBG_UTIL class SwTestTabPage : public SfxTabPage { public: SwTestTabPage(vcl::Window* pParent, const SfxItemSet& rSet); virtual ~SwTestTabPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr Create(vcl::Window* pParent, const SfxItemSet* rAttrSet); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; private: VclPtr m_pTest1CBox; VclPtr m_pTest2CBox; VclPtr m_pTest3CBox; VclPtr m_pTest4CBox; VclPtr m_pTest5CBox; VclPtr m_pTest6CBox; VclPtr m_pTest7CBox; VclPtr m_pTest8CBox; VclPtr m_pTest9CBox; VclPtr m_pTest10CBox; bool bAttrModified; void Init(); DECL_LINK(AutoClickHdl, void*); }; #endif // DBG_UTIL class SwCompareOptionsTabPage : public SfxTabPage { VclPtr m_pAutoRB; VclPtr m_pWordRB; VclPtr m_pCharRB; VclPtr m_pRsidCB; VclPtr m_pIgnoreCB; VclPtr m_pLenNF; VclPtr m_pStoreRsidCB; DECL_LINK(ComparisonHdl, void *); DECL_LINK(IgnoreHdl, void *); public: SwCompareOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); virtual ~SwCompareOptionsTabPage(); virtual void dispose() SAL_OVERRIDE; static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rAttrSet ); virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE; virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE; }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */