/* -*- 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_CUI_SOURCE_INC_PAGE_HXX #define INCLUDED_CUI_SOURCE_INC_PAGE_HXX #include #include #include #include #include #include #include #include #include #include #include // class SvxPageDescPage ------------------------------------------------- /* [Description] TabPage for page settings (size, margins, ...) [Items] : : : : : : : : : : : : : : : : : : : : : : : */ typedef sal_uInt16 MarginPosition; class SvxPageDescPage : public SfxTabPage { friend class VclPtr; using TabPage::ActivatePage; using TabPage::DeactivatePage; static const sal_uInt16 pRanges[]; private: // paper format VclPtr m_pPaperSizeBox; VclPtr m_pPaperWidthEdit; VclPtr m_pPaperHeightEdit; VclPtr m_pOrientationFT; VclPtr m_pPortraitBtn; VclPtr m_pLandscapeBtn; VclPtr m_pBspWin; VclPtr m_pTextFlowLbl; VclPtr m_pTextFlowBox; VclPtr m_pPaperTrayBox; // Margins VclPtr m_pLeftMarginLbl; VclPtr m_pLeftMarginEdit; VclPtr m_pRightMarginLbl; VclPtr m_pRightMarginEdit; VclPtr m_pTopMarginEdit; VclPtr m_pBottomMarginEdit; // layout settings VclPtr m_pPageText; VclPtr m_pLayoutBox; VclPtr m_pNumberFormatBox; //Extras Calc VclPtr m_pTblAlignFT; VclPtr m_pHorzBox; VclPtr m_pVertBox; // Impress and Draw VclPtr m_pAdaptBox; //Register Writer VclPtr m_pRegisterCB; VclPtr m_pRegisterFT; VclPtr m_pRegisterLB; OUString sStandardRegister; VclPtr m_pInsideLbl; VclPtr m_pOutsideLbl; VclPtr m_pPrintRangeQueryText; long nFirstLeftMargin; long nFirstRightMargin; long nFirstTopMargin; long nFirstBottomMargin; long nLastLeftMargin; long nLastRightMargin; long nLastTopMargin; long nLastBottomMargin; bool bLandscape; bool bBorderModified; SvxModeType eMode; Paper ePaperStart; MarginPosition m_nPos; VclPtr mpDefPrinter; bool mbDelPrinter : 1; bool mbEnableDrawingLayerFillStyles : 1; void Init_Impl(); DECL_LINK( LayoutHdl_Impl, ListBox&, void); DECL_LINK( PaperBinHdl_Impl, Control&, void); DECL_LINK( SwapOrientation_Impl, Button*, void ); void SwapFirstValues_Impl( bool bSet ); DECL_LINK( BorderModify_Impl, Edit&, void); void InitHeadFoot_Impl( const SfxItemSet& rSet ); DECL_LINK( CenterHdl_Impl, Button*, void); void UpdateExample_Impl( bool bResetbackground = false ); DECL_LINK( PaperSizeSelect_Impl, ListBox&, void ); DECL_LINK( PaperSizeModify_Impl, Edit&, void); DECL_LINK( FrameDirectionModify_Impl, ListBox&, void ); void ResetBackground_Impl( const SfxItemSet& rSet ); DECL_LINK( RangeHdl_Impl, Control&, void ); void CalcMargin_Impl(); DECL_LINK( RegisterModify, Button*, void ); // page direction /** Disables vertical page direction entries in the text flow listbox. */ void DisableVerticalPageDir(); bool IsPrinterRangeOverflow( MetricField& rField, long nFirstMargin, long nLastMargin, MarginPosition nPos ); void CheckMarginEdits( bool _bClear ); bool IsMarginOutOfRange(); SvxPageDescPage( vcl::Window* pParent, const SfxItemSet& rSet ); protected: virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; public: static VclPtr Create( vcl::Window* pParent, const SfxItemSet* rSet ); // returns the range of the Which values static const sal_uInt16* GetRanges() { return pRanges; } virtual bool FillItemSet( SfxItemSet* rOutSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; virtual void FillUserData() override; virtual ~SvxPageDescPage() override; virtual void dispose() override; void SetPaperFormatRanges( Paper eStart ) { ePaperStart = eStart; } void SetCollectionList(const std::vector &aList); virtual void PageCreated(const SfxAllItemSet& aSet) override; }; #endif // INCLUDED_CUI_SOURCE_INC_PAGE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */