/* -*- 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_CUITABAREA_HXX #define INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define NO_BUTTON_SELECTED -1 class SdrModel; class SvxBitmapCtl; class SvxColorListBox; /************************************************************************/ class ButtonBox { private: sal_Int32 mnCurrentButton; std::vector< VclPtr > maButtonList; std::map< VclPtr, sal_Int32 > maButtonToPos; void SelectButtonImpl( sal_Int32 nPos ) { if(mnCurrentButton != NO_BUTTON_SELECTED) { maButtonList[mnCurrentButton]->SetPressed(false); } mnCurrentButton = nPos; maButtonList[mnCurrentButton]->SetPressed(true); }; public: ButtonBox() { mnCurrentButton = NO_BUTTON_SELECTED; }; void AddButton(VclPtr pButton) { maButtonList.push_back(pButton); maButtonToPos.insert( std::make_pair(pButton, maButtonList.size() - 1) ); } sal_Int32 GetCurrentButtonPos() { return mnCurrentButton; } sal_Int32 GetButtonPos( VclPtr pButton ) { std::map< VclPtr, sal_Int32 >::const_iterator aBtnPos = maButtonToPos.find(pButton); if(aBtnPos != maButtonToPos.end()) return aBtnPos->second; else return -1; } void SelectButton( VclPtr pButton) { sal_Int32 nPos = GetButtonPos(pButton); if(nPos != -1) SelectButtonImpl(nPos); } }; enum class PageType { Area, Gradient, Hatch, Bitmap, Shadow, Transparence, }; class SvxAreaTabDialog final : public SfxTabDialog { sal_uInt16 m_nAreaTabPage; sal_uInt16 m_nShadowTabPage; sal_uInt16 m_nTransparenceTabPage; SdrModel* mpDrawModel; XColorListRef mpColorList; XColorListRef mpNewColorList; XGradientListRef mpGradientList; XGradientListRef mpNewGradientList; XHatchListRef mpHatchingList; XHatchListRef mpNewHatchingList; XBitmapListRef mpBitmapList; XBitmapListRef mpNewBitmapList; XPatternListRef mpPatternList; XPatternListRef mpNewPatternList; ChangeType mnColorListState; ChangeType mnBitmapListState; ChangeType mnPatternListState; ChangeType mnGradientListState; ChangeType mnHatchingListState; virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; virtual short Ok() override; DECL_LINK( CancelHdlImpl, Button*, void ); void SavePalettes(); public: SvxAreaTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow ); void SetNewColorList( XColorListRef const & pColorList ) { mpNewColorList = pColorList; } const XColorListRef& GetNewColorList() const { return mpNewColorList; } }; /************************************************************************/ class SvxTransparenceTabPage : public SvxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; static const sal_uInt16 pTransparenceRanges[]; const SfxItemSet& rOutAttrs; PageType nPageType; sal_uInt16 nDlgType; // main selection VclPtr m_pRbtTransOff; VclPtr m_pRbtTransLinear; VclPtr m_pRbtTransGradient; /// linear transparency VclPtr m_pMtrTransparent; // gradient transparency VclPtr m_pGridGradient; VclPtr m_pLbTrgrGradientType; VclPtr m_pFtTrgrCenterX; VclPtr m_pMtrTrgrCenterX; VclPtr m_pFtTrgrCenterY; VclPtr m_pMtrTrgrCenterY; VclPtr m_pFtTrgrAngle; VclPtr m_pMtrTrgrAngle; VclPtr m_pMtrTrgrBorder; VclPtr m_pMtrTrgrStartValue; VclPtr m_pMtrTrgrEndValue; // preview VclPtr m_pCtlBitmapPreview; VclPtr m_pCtlXRectPreview; bool bBitmap; XFillAttrSetItem aXFillAttr; SfxItemSet& rXFSet; DECL_LINK(ClickTransOffHdl_Impl, Button*, void ); DECL_LINK(ClickTransLinearHdl_Impl, Button*, void ); DECL_LINK(ClickTransGradientHdl_Impl, Button*, void ); DECL_LINK(ModifyTransparentHdl_Impl, Edit&, void); DECL_LINK(ModifiedTrgrEditHdl_Impl, Edit&, void); DECL_LINK(ModifiedTrgrListBoxHdl_Impl, ListBox&, void); void ModifiedTrgrHdl_Impl(void const *); void ActivateLinear(bool bActivate); void ActivateGradient(bool bActivate); void SetControlState_Impl(css::awt::GradientStyle eXGS); bool InitPreview ( const SfxItemSet& rSet ); void InvalidatePreview (bool bEnable = true ); public: SvxTransparenceTabPage(vcl::Window* pParent, const SfxItemSet& rInAttrs); virtual ~SvxTransparenceTabPage() override; virtual void dispose() override; static VclPtr Create(vcl::Window*, const SfxItemSet*); static const sal_uInt16* GetRanges() { return pTransparenceRanges; } virtual bool FillItemSet(SfxItemSet*) override; virtual void Reset(const SfxItemSet*) override; virtual void ChangesApplied() override; virtual void ActivatePage(const SfxItemSet& rSet) override; virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override; virtual void PointChanged(vcl::Window* pWindow, RectPoint eRP) override; void SetPageType(PageType nInType) { nPageType = nInType; } void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; } virtual void PageCreated(const SfxAllItemSet& aSet) override; }; /************************************************************************/ class SvxAreaTabPage : public SvxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; static const sal_uInt16 pAreaRanges[]; private: ScopedVclPtr m_pFillTabPage; VclPtr m_pFillTab; VclPtr m_pBtnNone; VclPtr m_pBtnColor; VclPtr m_pBtnGradient; VclPtr m_pBtnHatch; VclPtr m_pBtnBitmap; VclPtr m_pBtnPattern; ButtonBox maBox; XColorListRef m_pColorList; XGradientListRef m_pGradientList; XHatchListRef m_pHatchingList; XBitmapListRef m_pBitmapList; XPatternListRef m_pPatternList; // Placeholders for pointer-based entries; these will be inited // to point to these so that the page is usable without that // SvxAreaTabDialog has to call the setter methods (e.g. SetColorChgd). // Without that the pages used in SvxAreaTabDialog are not usable ChangeType maFixed_ChangeType; ChangeType* m_pnColorListState; ChangeType* m_pnBitmapListState; ChangeType* m_pnPatternListState; ChangeType* m_pnGradientListState; ChangeType* m_pnHatchingListState; XFillAttrSetItem m_aXFillAttr; SfxItemSet& m_rXFSet; DECL_LINK(SelectFillTypeHdl_Impl, Button*, void); template< typename TabPage > bool FillItemSet_Impl( SfxItemSet* ); template< typename TabPage > void Reset_Impl( const SfxItemSet* ); template< typename TabPage > DeactivateRC DeactivatePage_Impl( SfxItemSet* pSet ); public: SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxAreaTabPage() override; virtual void dispose() override; static VclPtr Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges() { return pAreaRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; } void SetGradientList( XGradientListRef const & pGrdLst) { m_pGradientList = pGrdLst; } void SetHatchingList( XHatchListRef const & pHtchLst) { m_pHatchingList = pHtchLst; } void SetBitmapList( XBitmapListRef const & pBmpLst) { m_pBitmapList = pBmpLst; } void SetPatternList( XPatternListRef const &pPtrnLst ) { m_pPatternList = pPtrnLst; } virtual void PageCreated(const SfxAllItemSet& aSet) override; void CreatePage(sal_Int32 nId, SfxTabPage* pTab); void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; } void SetGrdChgd( ChangeType* pIn ) { m_pnGradientListState = pIn; } void SetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; } void SetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; } void SetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; } }; class SvxShadowTabPage : public SvxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; static const sal_uInt16 pShadowRanges[]; private: VclPtr m_pTsbShowShadow; VclPtr m_pGridShadow; VclPtr m_pCtlPosition; VclPtr m_pMtrDistance; VclPtr m_pLbShadowColor; VclPtr m_pMtrTransparent; VclPtr m_pCtlXRectPreview; const SfxItemSet& m_rOutAttrs; XColorListRef m_pColorList; ChangeType* m_pnColorListState; PageType m_nPageType; sal_uInt16 m_nDlgType; XFillAttrSetItem m_aXFillAttr; SfxItemSet& m_rXFSet; MapUnit m_ePoolUnit; DECL_LINK( ClickShadowHdl_Impl, Button*, void ); DECL_LINK( ModifyShadowHdl_Impl, Edit&, void ); DECL_LINK( SelectShadowHdl_Impl, SvxColorListBox&, void ); public: SvxShadowTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxShadowTabPage() override; virtual void dispose() override; static VclPtr Create( vcl::Window*, const SfxItemSet* ); static const sal_uInt16* GetRanges() { return pShadowRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; } void SetPageType( PageType nInType ) { m_nPageType = nInType; } void SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; } void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; } virtual void PageCreated(const SfxAllItemSet& aSet) override; }; /************************************************************************/ class SvxGradientTabPage : public SfxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; private: VclPtr m_pLbGradientType; VclPtr m_pFtCenter; VclPtr m_pMtrCenterX; VclPtr m_pMtrCenterY; VclPtr m_pFtAngle; VclPtr m_pMtrAngle; VclPtr m_pMtrBorder; VclPtr m_pSliderBorder; VclPtr m_pLbColorFrom; VclPtr m_pMtrColorFrom; VclPtr m_pLbColorTo; VclPtr m_pMtrColorTo; VclPtr m_pGradientLB; VclPtr m_pMtrIncrement; VclPtr m_pCbIncrement; VclPtr m_pSliderIncrement; VclPtr m_pCtlPreview; VclPtr m_pBtnAdd; VclPtr m_pBtnModify; const SfxItemSet& m_rOutAttrs; XColorListRef m_pColorList; XGradientListRef m_pGradientList; ChangeType* m_pnGradientListState; ChangeType* m_pnColorListState; XFillGradientItem m_aXGradientItem; XFillAttrSetItem m_aXFillAttr; SfxItemSet& m_rXFSet; DECL_LINK( ClickAddHdl_Impl, Button*, void ); DECL_LINK( ClickModifyHdl_Impl, Button*, void ); DECL_LINK( ChangeGradientHdl, ValueSet*, void ); void ChangeGradientHdl_Impl(); DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void ); DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void ); DECL_LINK( ModifiedEditHdl_Impl, Edit&, void ); DECL_LINK( ModifiedColorListBoxHdl_Impl, SvxColorListBox&, void ); DECL_LINK( ModifiedListBoxHdl_Impl, ListBox&, void ); DECL_LINK( ChangeAutoStepHdl_Impl, CheckBox&, void ); DECL_LINK( ModifiedSliderHdl_Impl, Slider*, void ); void ModifiedHdl_Impl(void const *); void SetControlState_Impl( css::awt::GradientStyle eXGS ); sal_Int32 SearchGradientList(const OUString& rGradientName); public: SvxGradientTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxGradientTabPage() override; virtual void dispose() override; void Construct(); static VclPtr Create( vcl::Window*, const SfxItemSet* ); virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; } void SetGradientList( XGradientListRef const & pGrdLst) { m_pGradientList = pGrdLst; } void SetGrdChgd( ChangeType* pIn ) { m_pnGradientListState = pIn; } void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; } }; /************************************************************************/ class SvxHatchTabPage : public SvxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; private: VclPtr m_pMtrDistance; VclPtr m_pMtrAngle; VclPtr m_pSliderAngle; VclPtr m_pLbLineType; VclPtr m_pLbLineColor; VclPtr m_pCbBackgroundColor; VclPtr m_pLbBackgroundColor; VclPtr m_pHatchLB; VclPtr m_pCtlPreview; VclPtr m_pBtnAdd; VclPtr m_pBtnModify; const SfxItemSet& m_rOutAttrs; XColorListRef m_pColorList; XHatchListRef m_pHatchingList; ChangeType* m_pnHatchingListState; ChangeType* m_pnColorListState; XFillHatchItem m_aXHatchItem; XFillAttrSetItem m_aXFillAttr; SfxItemSet& m_rXFSet; MapUnit m_ePoolUnit; DECL_LINK( ChangeHatchHdl, ValueSet*, void ); void ChangeHatchHdl_Impl(); DECL_LINK( ModifiedEditHdl_Impl, Edit&, void ); DECL_LINK( ModifiedListBoxHdl_Impl, ListBox&, void ); DECL_LINK( ModifiedColorListBoxHdl_Impl, SvxColorListBox&, void ); DECL_LINK( ToggleHatchBackgroundColor_Impl, CheckBox&, void ); DECL_LINK( ModifiedBackgroundHdl_Impl, SvxColorListBox&, void ); DECL_LINK( ModifiedSliderHdl_Impl, Slider*, void ); void ModifiedHdl_Impl(void const *); DECL_LINK( ClickAddHdl_Impl, Button*, void ); DECL_LINK( ClickModifyHdl_Impl, Button*, void ); DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void ); DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void ); sal_Int32 SearchHatchList(const OUString& rHatchName); public: SvxHatchTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxHatchTabPage() override; virtual void dispose() override; void Construct(); static VclPtr Create( vcl::Window*, const SfxItemSet* ); virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; } void SetHatchingList( XHatchListRef const & pHtchLst) { m_pHatchingList = pHtchLst; } void SetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; } void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; } virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; }; /************************************************************************/ class SvxBitmapTabPage : public SvxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; static const sal_uInt16 pBitmapRanges[]; private: VclPtr m_pBitmapLB; VclPtr m_pBitmapStyleLB; VclPtr m_pSizeBox; VclPtr m_pTsbScale; VclPtr m_pBitmapWidth; VclPtr m_pBitmapHeight; VclPtr m_pPositionBox; VclPtr m_pPositionLB; VclPtr m_pPositionOffBox; VclPtr m_pPositionOffX; VclPtr m_pPositionOffY; VclPtr m_pTileOffBox; VclPtr m_pTileOffLB; VclPtr m_pTileOffset; VclPtr m_pBtnImport; VclPtr m_pCtlBitmapPreview; const SfxItemSet& m_rOutAttrs; XBitmapListRef m_pBitmapList; ChangeType* m_pnBitmapListState; XFillBitmapItem m_aXBitmapItem; double m_fObjectWidth; double m_fObjectHeight; bool m_bLogicalSize; XFillAttrSetItem m_aXFillAttr; SfxItemSet& m_rXFSet; const SdrView* mpView; MapUnit mePoolUnit; FieldUnit meFieldUnit; Size rBitmapSize; Size rFilledSize; Size rZoomedSize; sal_Int64 nFilledWidthPercent; sal_Int64 nFilledHeightPercent; sal_Int64 nZoomedWidthPercent; sal_Int64 nZoomedHeightPercent; DECL_LINK( ModifyBitmapHdl, ValueSet*, void ); DECL_LINK( ClickScaleHdl, Button*, void ); DECL_LINK( ModifyBitmapStyleHdl, ListBox&, void ); DECL_LINK( ModifyBitmapSizeHdl, Edit&, void ); DECL_LINK( ModifyBitmapPositionHdl, ListBox&, void ); DECL_LINK( ModifyPositionOffsetHdl, Edit&, void ); DECL_LINK( ModifyTileOffsetHdl, Edit&, void ); DECL_LINK( ClickRenameHdl, SvxPresetListBox*, void ); DECL_LINK( ClickDeleteHdl, SvxPresetListBox*, void ); DECL_LINK( ClickImportHdl, Button*, void ); void ClickBitmapHdl_Impl(); void CalculateBitmapPresetSize(); sal_Int32 SearchBitmapList(const OUString& rBitmapName); public: SvxBitmapTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxBitmapTabPage() override; virtual void dispose() override; void Construct(); static VclPtr Create( vcl::Window*, const SfxItemSet* ); virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetBitmapList( const XBitmapListRef& pBmpLst) { m_pBitmapList = pBmpLst; } void SetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; } }; /************************************************************************/ class SvxPatternTabPage : public SvxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; private: VclPtr m_pCtlPixel; VclPtr m_pLbColor; VclPtr m_pLbBackgroundColor; VclPtr m_pPatternLB; VclPtr m_pCtlPreview; VclPtr m_pBtnAdd; VclPtr m_pBtnModify; SvxBitmapCtl* m_pBitmapCtl; const SfxItemSet& m_rOutAttrs; XColorListRef m_pColorList; XPatternListRef m_pPatternList; ChangeType* m_pnPatternListState; ChangeType* m_pnColorListState; XFillBitmapItem m_aXPatternItem; XFillAttrSetItem m_aXFillAttr; SfxItemSet& m_rXFSet; DECL_LINK( ClickAddHdl_Impl, Button*, void ); DECL_LINK( ClickModifyHdl_Impl, Button*, void ); DECL_LINK( ChangePatternHdl_Impl, ValueSet*, void ); DECL_LINK( ChangeColorHdl_Impl, SvxColorListBox&, void ); DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void ); DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void ); sal_Int32 SearchPatternList(const OUString& rPatternName); public: SvxPatternTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxPatternTabPage() override; virtual void dispose() override; void Construct(); static VclPtr Create( vcl::Window*, const SfxItemSet* ); virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; virtual void PointChanged( vcl::Window* pWindow, RectPoint eRP ) override; void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; } void SetPatternList( XPatternListRef const & pPatternList) { m_pPatternList = pPatternList; } void SetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; } void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; } void ChangeColor_Impl(); }; /************************************************************************/ enum class ColorModel { RGB, CMYK }; class SvxColorTabPage : public SfxTabPage { using TabPage::ActivatePage; using TabPage::DeactivatePage; private: VclPtr mpTopDlg; PaletteManager maPaletteManager; VclPtr m_pSelectPalette; VclPtr m_pValSetColorList; VclPtr m_pValSetRecentList; VclPtr m_pCtlPreviewOld; VclPtr m_pCtlPreviewNew; VclPtr m_pRbRGB; VclPtr m_pRbCMYK; VclPtr m_pRGBcustom; VclPtr m_pRGBpreset; VclPtr m_pRcustom; VclPtr m_pRpreset; VclPtr m_pGcustom; VclPtr m_pGpreset; VclPtr m_pBcustom; VclPtr m_pBpreset; VclPtr m_pHexpreset; VclPtr m_pHexcustom; VclPtr m_pCMYKcustom; VclPtr m_pCMYKpreset; VclPtr m_pCcustom; VclPtr m_pCpreset; VclPtr m_pYcustom; VclPtr m_pYpreset; VclPtr m_pMcustom; VclPtr m_pMpreset; VclPtr m_pKcustom; VclPtr m_pKpreset; VclPtr m_pBtnAdd; VclPtr m_pBtnDelete; VclPtr m_pBtnWorkOn; const SfxItemSet& rOutAttrs; XColorListRef pColorList; ChangeType* pnColorListState; XFillColorItem aXFillColorItem; XFillAttrSetItem aXFillAttr; SfxItemSet& rXFSet; ColorModel eCM; Color aPreviousColor; Color aCurrentColor; static void ConvertColorValues (Color& rColor, ColorModel eModell); static void RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK ); static void CmykToRgb_Impl( Color& rColor, const sal_uInt16 nKey ); sal_uInt16 ColorToPercent_Impl( sal_uInt16 nColor ); sal_uInt16 PercentToColor_Impl( sal_uInt16 nPercent ); void ImpColorCountChanged(); void FillPaletteLB(); DECL_LINK( ClickAddHdl_Impl, Button*, void ); DECL_LINK( ClickWorkOnHdl_Impl, Button*, void ); DECL_LINK( ClickDeleteHdl_Impl, Button*, void ); DECL_LINK( SelectPaletteLBHdl, ListBox&, void ); DECL_LINK( SelectValSetHdl_Impl, ValueSet*, void ); DECL_LINK( SelectColorModeHdl_Impl, RadioButton&, void ); void ChangeColor(const Color &rNewColor, bool bUpdatePreset = true); void SetColorModel(ColorModel eModel); void ChangeColorModel(); void UpdateColorValues( bool bUpdatePreset = true ); DECL_LINK( ModifiedHdl_Impl, Edit&, void ); void UpdateModified(); css::uno::Reference< css::uno::XComponentContext > m_context; static sal_Int32 FindInCustomColors( OUString const & aColorName ); sal_Int32 FindInPalette( const Color& rColor ); public: SvxColorTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); virtual ~SvxColorTabPage() override; virtual void dispose() override; void Construct(); static VclPtr Create( vcl::Window*, const SfxItemSet* ); virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; void SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef ); void SetColorList( const XColorListRef& pColList ); void SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; } virtual void FillUserData() override; }; #endif // INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */