2010-10-27 12:45:03 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-10-04 11:25:41 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2013-10-28 03:46:16 +01:00
|
|
|
#ifndef INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX
|
|
|
|
#define INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2012-02-13 20:36:53 +01:00
|
|
|
#include <svtools/valueset.hxx>
|
|
|
|
#include <svx/dlgctrl.hxx>
|
2019-06-22 14:45:44 +02:00
|
|
|
#include <svx/xflasit.hxx>
|
2009-10-31 00:36:06 +01:00
|
|
|
#include <svx/tabarea.hxx>
|
2016-05-27 16:16:12 +05:30
|
|
|
#include <svx/hexcolorcontrol.hxx>
|
2013-04-16 08:41:07 +00:00
|
|
|
#include <svx/SvxColorValueSet.hxx>
|
2016-07-04 16:44:31 +05:30
|
|
|
#include <svx/SvxPresetListBox.hxx>
|
2016-08-02 23:53:38 +05:30
|
|
|
#include <svx/PaletteManager.hxx>
|
2016-08-12 04:22:28 +05:30
|
|
|
#include <svx/svdview.hxx>
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-08-22 16:48:05 +05:30
|
|
|
#define NO_BUTTON_SELECTED -1
|
|
|
|
|
2018-06-19 15:02:49 +01:00
|
|
|
class ColorListBox;
|
2012-02-13 20:36:53 +01:00
|
|
|
class SdrModel;
|
2016-07-17 21:12:14 +01:00
|
|
|
class SvxBitmapCtl;
|
2016-11-05 20:28:27 +00:00
|
|
|
class SvxColorListBox;
|
2012-02-13 20:36:53 +01:00
|
|
|
|
2016-08-22 16:48:05 +05:30
|
|
|
/************************************************************************/
|
|
|
|
class ButtonBox
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
sal_Int32 mnCurrentButton;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::vector<weld::ToggleButton*> maButtonList;
|
|
|
|
std::map<weld::ToggleButton*, sal_Int32 > maButtonToPos;
|
2016-08-22 16:48:05 +05:30
|
|
|
void SelectButtonImpl( sal_Int32 nPos )
|
|
|
|
{
|
|
|
|
if(mnCurrentButton != NO_BUTTON_SELECTED)
|
|
|
|
{
|
2018-06-19 15:02:49 +01:00
|
|
|
maButtonList[mnCurrentButton]->set_active(false);
|
2016-08-22 16:48:05 +05:30
|
|
|
}
|
|
|
|
mnCurrentButton = nPos;
|
2018-06-19 15:02:49 +01:00
|
|
|
maButtonList[mnCurrentButton]->set_active(true);
|
2016-08-22 16:48:05 +05:30
|
|
|
};
|
|
|
|
public:
|
|
|
|
ButtonBox()
|
|
|
|
{
|
|
|
|
mnCurrentButton = NO_BUTTON_SELECTED;
|
|
|
|
};
|
2018-06-19 15:02:49 +01:00
|
|
|
void AddButton(weld::ToggleButton* pButton)
|
2016-08-22 16:48:05 +05:30
|
|
|
{
|
|
|
|
maButtonList.push_back(pButton);
|
|
|
|
maButtonToPos.insert( std::make_pair(pButton, maButtonList.size() - 1) );
|
|
|
|
}
|
2019-09-04 16:07:56 +02:00
|
|
|
sal_Int32 GetCurrentButtonPos() const { return mnCurrentButton; }
|
2018-06-19 15:02:49 +01:00
|
|
|
sal_Int32 GetButtonPos(weld::ToggleButton* pButton)
|
2016-08-22 16:48:05 +05:30
|
|
|
{
|
2018-06-19 15:02:49 +01:00
|
|
|
std::map<weld::ToggleButton*, sal_Int32>::const_iterator aBtnPos = maButtonToPos.find(pButton);
|
2016-08-22 16:48:05 +05:30
|
|
|
if(aBtnPos != maButtonToPos.end())
|
|
|
|
return aBtnPos->second;
|
|
|
|
else
|
|
|
|
return -1;
|
|
|
|
}
|
2018-06-19 15:02:49 +01:00
|
|
|
void SelectButton(weld::ToggleButton* pButton)
|
2016-08-22 16:48:05 +05:30
|
|
|
{
|
|
|
|
sal_Int32 nPos = GetButtonPos(pButton);
|
|
|
|
if(nPos != -1)
|
|
|
|
SelectButtonImpl(nPos);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-08-17 15:30:15 +02:00
|
|
|
enum class PageType
|
|
|
|
{
|
|
|
|
Area,
|
|
|
|
Gradient,
|
|
|
|
Hatch,
|
|
|
|
Bitmap,
|
|
|
|
Shadow,
|
|
|
|
Transparence,
|
|
|
|
};
|
|
|
|
|
2018-09-09 17:17:44 +01:00
|
|
|
class SvxAreaTabDialog final : public SfxTabDialogController
|
2009-10-31 00:36:06 +01:00
|
|
|
{
|
|
|
|
SdrModel* mpDrawModel;
|
|
|
|
|
2011-09-26 22:00:40 +01:00
|
|
|
XColorListRef mpColorList;
|
|
|
|
XColorListRef mpNewColorList;
|
2011-09-23 14:05:07 +01:00
|
|
|
XGradientListRef mpGradientList;
|
|
|
|
XGradientListRef mpNewGradientList;
|
|
|
|
XHatchListRef mpHatchingList;
|
|
|
|
XHatchListRef mpNewHatchingList;
|
|
|
|
XBitmapListRef mpBitmapList;
|
|
|
|
XBitmapListRef mpNewBitmapList;
|
2016-06-07 16:58:20 +05:30
|
|
|
XPatternListRef mpPatternList;
|
|
|
|
XPatternListRef mpNewPatternList;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2011-09-26 22:00:40 +01:00
|
|
|
ChangeType mnColorListState;
|
2009-10-31 00:36:06 +01:00
|
|
|
ChangeType mnBitmapListState;
|
2016-06-07 16:58:20 +05:30
|
|
|
ChangeType mnPatternListState;
|
2009-10-31 00:36:06 +01:00
|
|
|
ChangeType mnGradientListState;
|
|
|
|
ChangeType mnHatchingListState;
|
|
|
|
|
2018-09-09 17:17:44 +01:00
|
|
|
virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual short Ok() override;
|
2018-09-09 17:17:44 +01:00
|
|
|
DECL_LINK(CancelHdlImpl, weld::Button&, void);
|
2009-10-31 00:36:06 +01:00
|
|
|
void SavePalettes();
|
|
|
|
|
|
|
|
public:
|
2018-09-09 17:17:44 +01:00
|
|
|
SvxAreaTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-07-07 15:56:37 +02:00
|
|
|
void SetNewColorList( XColorListRef const & pColorList )
|
2015-08-17 09:14:21 +02:00
|
|
|
{ mpNewColorList = pColorList; }
|
2016-04-13 15:42:27 +02:00
|
|
|
const XColorListRef& GetNewColorList() const { return mpNewColorList; }
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2011-09-11 17:53:40 +02:00
|
|
|
/************************************************************************/
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-09-20 16:58:21 +01:00
|
|
|
class SvxTransparenceTabPage : public SfxTabPage
|
2009-10-31 00:36:06 +01:00
|
|
|
{
|
2015-03-20 10:44:16 +02:00
|
|
|
static const sal_uInt16 pTransparenceRanges[];
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
const SfxItemSet& rOutAttrs;
|
|
|
|
|
2016-08-17 15:30:15 +02:00
|
|
|
PageType nPageType;
|
2014-03-19 16:17:02 +00:00
|
|
|
sal_uInt16 nDlgType;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-06-12 11:22:15 +01:00
|
|
|
bool bBitmap;
|
|
|
|
|
|
|
|
XFillAttrSetItem aXFillAttr;
|
|
|
|
SfxItemSet& rXFSet;
|
|
|
|
|
2018-09-29 11:58:10 +01:00
|
|
|
SvxXRectPreview m_aCtlBitmapPreview;
|
|
|
|
SvxXRectPreview m_aCtlXRectPreview;
|
2018-06-12 11:22:15 +01:00
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
// main selection
|
2018-06-12 11:22:15 +01:00
|
|
|
std::unique_ptr<weld::RadioButton> m_xRbtTransOff;
|
|
|
|
std::unique_ptr<weld::RadioButton> m_xRbtTransLinear;
|
|
|
|
std::unique_ptr<weld::RadioButton> m_xRbtTransGradient;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2012-08-06 10:51:21 +03:00
|
|
|
/// linear transparency
|
2018-06-12 11:22:15 +01:00
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrTransparent;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
// gradient transparency
|
2018-06-12 11:22:15 +01:00
|
|
|
std::unique_ptr<weld::Widget> m_xGridGradient;
|
2018-09-14 15:07:17 +01:00
|
|
|
std::unique_ptr<weld::ComboBox> m_xLbTrgrGradientType;
|
2018-06-12 11:22:15 +01:00
|
|
|
std::unique_ptr<weld::Label> m_xFtTrgrCenterX;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrCenterX;
|
|
|
|
std::unique_ptr<weld::Label> m_xFtTrgrCenterY;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrCenterY;
|
|
|
|
std::unique_ptr<weld::Label> m_xFtTrgrAngle;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrAngle;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrBorder;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrStartValue;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrTrgrEndValue;
|
|
|
|
std::unique_ptr<weld::Widget> m_xCtlBitmapBorder;
|
|
|
|
std::unique_ptr<weld::Widget> m_xCtlXRectBorder;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
// preview
|
2018-06-12 11:22:15 +01:00
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlBitmapPreview;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlXRectPreview;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-06-12 11:22:15 +01:00
|
|
|
DECL_LINK(ClickTransOffHdl_Impl, weld::ToggleButton&, void);
|
|
|
|
DECL_LINK(ClickTransLinearHdl_Impl, weld::ToggleButton&, void);
|
|
|
|
DECL_LINK(ClickTransGradientHdl_Impl, weld::ToggleButton&, void );
|
|
|
|
DECL_LINK(ModifyTransparentHdl_Impl, weld::MetricSpinButton&, void);
|
|
|
|
DECL_LINK(ModifiedTrgrEditHdl_Impl, weld::MetricSpinButton&, void);
|
2018-09-14 15:07:17 +01:00
|
|
|
DECL_LINK(ModifiedTrgrListBoxHdl_Impl, weld::ComboBox&, void);
|
|
|
|
void ModifiedTrgrHdl_Impl(const weld::ComboBox*);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2014-04-16 11:39:08 +02:00
|
|
|
void ActivateLinear(bool bActivate);
|
|
|
|
void ActivateGradient(bool bActivate);
|
2014-12-05 20:09:01 +02:00
|
|
|
void SetControlState_Impl(css::awt::GradientStyle eXGS);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2014-04-16 11:39:08 +02:00
|
|
|
bool InitPreview ( const SfxItemSet& rSet );
|
|
|
|
void InvalidatePreview (bool bEnable = true );
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
public:
|
2019-09-24 14:10:48 +01:00
|
|
|
SvxTransparenceTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvxTransparenceTabPage() override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*);
|
2015-03-20 10:44:16 +02:00
|
|
|
static const sal_uInt16* GetRanges() { return pTransparenceRanges; }
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool FillItemSet(SfxItemSet*) override;
|
|
|
|
virtual void Reset(const SfxItemSet*) override;
|
|
|
|
virtual void ChangesApplied() override;
|
|
|
|
virtual void ActivatePage(const SfxItemSet& rSet) override;
|
2016-06-05 15:15:56 +02:00
|
|
|
virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-08-17 15:30:15 +02:00
|
|
|
void SetPageType(PageType nInType) { nPageType = nInType; }
|
2011-03-09 16:20:50 -06:00
|
|
|
void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; }
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void PageCreated(const SfxAllItemSet& aSet) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2011-09-11 17:53:40 +02:00
|
|
|
/************************************************************************/
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-09-20 16:58:21 +01:00
|
|
|
class SvxAreaTabPage : public SfxTabPage
|
2009-10-31 00:36:06 +01:00
|
|
|
{
|
2015-03-20 10:44:16 +02:00
|
|
|
static const sal_uInt16 pAreaRanges[];
|
2009-10-31 00:36:06 +01:00
|
|
|
private:
|
2019-09-20 20:29:36 +01:00
|
|
|
std::unique_ptr<SfxTabPage> m_xFillTabPage;
|
2016-08-22 16:48:05 +05:30
|
|
|
ButtonBox maBox;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-17 09:14:21 +02:00
|
|
|
XColorListRef m_pColorList;
|
|
|
|
XGradientListRef m_pGradientList;
|
|
|
|
XHatchListRef m_pHatchingList;
|
|
|
|
XBitmapListRef m_pBitmapList;
|
2016-08-22 16:48:05 +05:30
|
|
|
XPatternListRef m_pPatternList;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2014-03-19 16:17:02 +00:00
|
|
|
// 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;
|
|
|
|
|
2015-08-17 09:14:21 +02:00
|
|
|
ChangeType* m_pnColorListState;
|
|
|
|
ChangeType* m_pnBitmapListState;
|
2016-08-22 16:48:05 +05:30
|
|
|
ChangeType* m_pnPatternListState;
|
2015-08-17 09:14:21 +02:00
|
|
|
ChangeType* m_pnGradientListState;
|
|
|
|
ChangeType* m_pnHatchingListState;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-17 09:14:21 +02:00
|
|
|
XFillAttrSetItem m_aXFillAttr;
|
|
|
|
SfxItemSet& m_rXFSet;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2019-03-19 19:04:04 -08:00
|
|
|
bool m_bBtnClicked = false;
|
|
|
|
|
2018-06-19 15:02:49 +01:00
|
|
|
protected:
|
|
|
|
std::unique_ptr<weld::Container> m_xFillTab;
|
|
|
|
std::unique_ptr<weld::ToggleButton> m_xBtnNone;
|
|
|
|
std::unique_ptr<weld::ToggleButton> m_xBtnColor;
|
|
|
|
std::unique_ptr<weld::ToggleButton> m_xBtnGradient;
|
|
|
|
std::unique_ptr<weld::ToggleButton> m_xBtnHatch;
|
|
|
|
std::unique_ptr<weld::ToggleButton> m_xBtnBitmap;
|
|
|
|
std::unique_ptr<weld::ToggleButton> m_xBtnPattern;
|
|
|
|
|
2019-02-28 09:20:40 +00:00
|
|
|
void SetOptimalSize(weld::DialogController* pController);
|
2019-02-27 11:41:54 +00:00
|
|
|
|
2019-01-22 18:50:23 -09:00
|
|
|
void SelectFillType( weld::ToggleButton& rButton, const SfxItemSet* _pSet = nullptr );
|
2019-09-20 20:29:36 +01:00
|
|
|
SfxTabPage* GetFillTabPage() { return m_xFillTabPage.get(); }
|
2019-01-22 18:50:23 -09:00
|
|
|
|
2019-09-04 16:07:56 +02:00
|
|
|
bool IsBtnClicked() const { return m_bBtnClicked; }
|
2019-03-19 19:04:04 -08:00
|
|
|
|
2018-06-19 15:02:49 +01:00
|
|
|
private:
|
|
|
|
DECL_LINK(SelectFillTypeHdl_Impl, weld::ToggleButton&, void);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-08-22 16:48:05 +05:30
|
|
|
template< typename TabPage >
|
|
|
|
bool FillItemSet_Impl( SfxItemSet* );
|
|
|
|
template< typename TabPage >
|
|
|
|
void Reset_Impl( const SfxItemSet* );
|
|
|
|
template< typename TabPage >
|
|
|
|
DeactivateRC DeactivatePage_Impl( SfxItemSet* pSet );
|
2018-06-19 15:02:49 +01:00
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
public:
|
2019-09-24 14:10:48 +01:00
|
|
|
SvxAreaTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvxAreaTabPage() override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
|
2015-03-20 10:44:16 +02:00
|
|
|
static const sal_uInt16* GetRanges() { return pAreaRanges; }
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* ) override;
|
|
|
|
virtual void Reset( const SfxItemSet * ) override;
|
|
|
|
virtual void ActivatePage( const SfxItemSet& rSet ) override;
|
2016-06-05 15:15:56 +02:00
|
|
|
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-07-07 15:56:37 +02:00
|
|
|
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
|
|
|
|
void SetGradientList( XGradientListRef const & pGrdLst)
|
2015-08-17 09:14:21 +02:00
|
|
|
{ m_pGradientList = pGrdLst; }
|
2016-07-07 15:56:37 +02:00
|
|
|
void SetHatchingList( XHatchListRef const & pHtchLst)
|
2015-08-17 09:14:21 +02:00
|
|
|
{ m_pHatchingList = pHtchLst; }
|
2016-07-07 15:56:37 +02:00
|
|
|
void SetBitmapList( XBitmapListRef const & pBmpLst) { m_pBitmapList = pBmpLst; }
|
2016-08-22 16:48:05 +05:30
|
|
|
void SetPatternList( XPatternListRef const &pPtrnLst ) { m_pPatternList = pPtrnLst; }
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void PageCreated(const SfxAllItemSet& aSet) override;
|
2016-11-11 18:10:42 +01:00
|
|
|
void CreatePage(sal_Int32 nId, SfxTabPage* pTab);
|
2015-08-17 09:14:21 +02:00
|
|
|
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; }
|
2016-08-04 13:42:24 +05:30
|
|
|
void SetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; }
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class SvxShadowTabPage : public SvxTabPage
|
|
|
|
{
|
2015-03-20 10:44:16 +02:00
|
|
|
static const sal_uInt16 pShadowRanges[];
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
private:
|
2015-08-18 09:08:47 +02:00
|
|
|
const SfxItemSet& m_rOutAttrs;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-18 09:08:47 +02:00
|
|
|
XColorListRef m_pColorList;
|
|
|
|
ChangeType* m_pnColorListState;
|
2016-08-17 15:30:15 +02:00
|
|
|
PageType m_nPageType;
|
2015-08-18 09:08:47 +02:00
|
|
|
sal_uInt16 m_nDlgType;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-18 09:08:47 +02:00
|
|
|
XFillAttrSetItem m_aXFillAttr;
|
|
|
|
SfxItemSet& m_rXFSet;
|
2016-08-19 09:31:35 +01:00
|
|
|
MapUnit m_ePoolUnit;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-09-18 15:00:10 +01:00
|
|
|
SvxRectCtl m_aCtlPosition;
|
2018-09-09 16:18:24 +01:00
|
|
|
SvxXShadowPreview m_aCtlXRectPreview;
|
|
|
|
std::unique_ptr<weld::CheckButton> m_xTsbShowShadow;
|
|
|
|
std::unique_ptr<weld::Widget> m_xGridShadow;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance;
|
|
|
|
std::unique_ptr<ColorListBox> m_xLbShadowColor;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrTransparent;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlPosition;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlXRectPreview;
|
|
|
|
|
|
|
|
DECL_LINK(ClickShadowHdl_Impl, weld::ToggleButton&, void);
|
|
|
|
DECL_LINK(ModifyShadowHdl_Impl, weld::MetricSpinButton&, void);
|
|
|
|
DECL_LINK(SelectShadowHdl_Impl, ColorListBox&, void);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
public:
|
2019-09-24 14:10:48 +01:00
|
|
|
SvxShadowTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvxShadowTabPage() override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
|
2015-03-20 10:44:16 +02:00
|
|
|
static const sal_uInt16* GetRanges() { return pShadowRanges; }
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* ) override;
|
|
|
|
virtual void Reset( const SfxItemSet * ) override;
|
|
|
|
virtual void ActivatePage( const SfxItemSet& rSet ) override;
|
2016-06-05 15:15:56 +02:00
|
|
|
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
|
2018-05-02 12:39:43 +01:00
|
|
|
virtual void PointChanged( weld::DrawingArea* pWindow, RectPoint eRP ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-07-07 15:56:37 +02:00
|
|
|
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
|
2016-08-17 15:30:15 +02:00
|
|
|
void SetPageType( PageType nInType ) { m_nPageType = nInType; }
|
2015-08-18 09:08:47 +02:00
|
|
|
void SetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
|
|
|
|
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void PageCreated(const SfxAllItemSet& aSet) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2011-09-11 17:53:40 +02:00
|
|
|
/************************************************************************/
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
class SvxGradientTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
private:
|
2015-08-19 09:15:57 +02:00
|
|
|
const SfxItemSet& m_rOutAttrs;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-19 09:15:57 +02:00
|
|
|
XColorListRef m_pColorList;
|
|
|
|
XGradientListRef m_pGradientList;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-19 09:15:57 +02:00
|
|
|
ChangeType* m_pnGradientListState;
|
|
|
|
ChangeType* m_pnColorListState;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-19 09:15:57 +02:00
|
|
|
XFillAttrSetItem m_aXFillAttr;
|
|
|
|
SfxItemSet& m_rXFSet;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-09-29 11:58:10 +01:00
|
|
|
SvxXRectPreview m_aCtlPreview;
|
2018-09-14 15:07:17 +01:00
|
|
|
std::unique_ptr<weld::ComboBox> m_xLbGradientType;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::Label> m_xFtCenter;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrCenterX;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrCenterY;
|
|
|
|
std::unique_ptr<weld::Label> m_xFtAngle;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrAngle;
|
2019-04-03 12:21:08 +09:00
|
|
|
std::unique_ptr<weld::Scale> m_xSliderAngle;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrBorder;
|
|
|
|
std::unique_ptr<weld::Scale> m_xSliderBorder;
|
|
|
|
std::unique_ptr<ColorListBox> m_xLbColorFrom;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrColorFrom;
|
|
|
|
std::unique_ptr<ColorListBox> m_xLbColorTo;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrColorTo;
|
2018-10-01 20:03:31 +01:00
|
|
|
std::unique_ptr<SvxPresetListBox> m_xGradientLB;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::SpinButton> m_xMtrIncrement;
|
|
|
|
std::unique_ptr<weld::CheckButton> m_xCbIncrement;
|
|
|
|
std::unique_ptr<weld::Button> m_xBtnAdd;
|
|
|
|
std::unique_ptr<weld::Button> m_xBtnModify;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xGradientLBWin;
|
|
|
|
|
|
|
|
DECL_LINK( ClickAddHdl_Impl, weld::Button&, void );
|
|
|
|
DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
|
|
|
|
DECL_LINK( ChangeGradientHdl, SvtValueSet*, void );
|
2016-07-05 18:39:36 +05:30
|
|
|
void ChangeGradientHdl_Impl();
|
2018-10-01 20:03:31 +01:00
|
|
|
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
|
|
|
|
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
|
2018-06-19 15:02:49 +01:00
|
|
|
DECL_LINK( ModifiedEditHdl_Impl, weld::SpinButton&, void );
|
|
|
|
DECL_LINK( ModifiedMetricHdl_Impl, weld::MetricSpinButton&, void );
|
|
|
|
DECL_LINK( ModifiedColorListBoxHdl_Impl, ColorListBox&, void );
|
2018-09-14 15:07:17 +01:00
|
|
|
DECL_LINK( ModifiedListBoxHdl_Impl, weld::ComboBox&, void );
|
2018-06-19 15:02:49 +01:00
|
|
|
DECL_LINK( ChangeAutoStepHdl_Impl, weld::ToggleButton&, void );
|
|
|
|
DECL_LINK( ModifiedSliderHdl_Impl, weld::Scale&, void );
|
2017-07-31 15:13:12 +02:00
|
|
|
void ModifiedHdl_Impl(void const *);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2014-12-05 20:09:01 +02:00
|
|
|
void SetControlState_Impl( css::awt::GradientStyle eXGS );
|
2016-06-17 16:13:56 +02:00
|
|
|
sal_Int32 SearchGradientList(const OUString& rGradientName);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
public:
|
2019-09-24 14:10:48 +01:00
|
|
|
SvxGradientTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvxGradientTabPage() override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
void Construct();
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* ) override;
|
|
|
|
virtual void Reset( const SfxItemSet * ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void ActivatePage( const SfxItemSet& rSet ) override;
|
2016-06-05 15:15:56 +02:00
|
|
|
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-07-07 15:56:37 +02:00
|
|
|
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
|
|
|
|
void SetGradientList( XGradientListRef const & pGrdLst)
|
2015-08-19 09:15:57 +02:00
|
|
|
{ m_pGradientList = pGrdLst; }
|
|
|
|
void SetGrdChgd( ChangeType* pIn ) { m_pnGradientListState = pIn; }
|
|
|
|
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2011-09-11 17:53:40 +02:00
|
|
|
/************************************************************************/
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-09-20 16:58:21 +01:00
|
|
|
class SvxHatchTabPage : public SfxTabPage
|
2009-10-31 00:36:06 +01:00
|
|
|
{
|
|
|
|
private:
|
2015-08-31 09:08:19 +02:00
|
|
|
const SfxItemSet& m_rOutAttrs;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-31 09:08:19 +02:00
|
|
|
XColorListRef m_pColorList;
|
|
|
|
XHatchListRef m_pHatchingList;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-31 09:08:19 +02:00
|
|
|
ChangeType* m_pnHatchingListState;
|
|
|
|
ChangeType* m_pnColorListState;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-31 09:08:19 +02:00
|
|
|
XFillAttrSetItem m_aXFillAttr;
|
|
|
|
SfxItemSet& m_rXFSet;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-08-19 09:31:35 +01:00
|
|
|
MapUnit m_ePoolUnit;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-09-29 11:58:10 +01:00
|
|
|
SvxXRectPreview m_aCtlPreview;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMtrAngle;
|
|
|
|
std::unique_ptr<weld::Scale> m_xSliderAngle;
|
2018-09-14 15:07:17 +01:00
|
|
|
std::unique_ptr<weld::ComboBox> m_xLbLineType;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<ColorListBox> m_xLbLineColor;
|
|
|
|
std::unique_ptr<weld::CheckButton> m_xCbBackgroundColor;
|
|
|
|
std::unique_ptr<ColorListBox> m_xLbBackgroundColor;
|
2018-10-01 20:03:31 +01:00
|
|
|
std::unique_ptr<SvxPresetListBox> m_xHatchLB;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::Button> m_xBtnAdd;
|
|
|
|
std::unique_ptr<weld::Button> m_xBtnModify;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xHatchLBWin;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
|
|
|
|
|
|
|
|
DECL_LINK(ChangeHatchHdl, SvtValueSet*, void);
|
2016-07-04 16:44:31 +05:30
|
|
|
void ChangeHatchHdl_Impl();
|
2018-06-19 15:02:49 +01:00
|
|
|
DECL_LINK( ModifiedEditHdl_Impl, weld::MetricSpinButton&, void );
|
2018-09-14 15:07:17 +01:00
|
|
|
DECL_LINK( ModifiedListBoxHdl_Impl, weld::ComboBox&, void );
|
2018-06-19 15:02:49 +01:00
|
|
|
DECL_LINK( ModifiedColorListBoxHdl_Impl, ColorListBox&, void );
|
|
|
|
DECL_LINK( ToggleHatchBackgroundColor_Impl, weld::ToggleButton&, void );
|
|
|
|
DECL_LINK( ModifiedBackgroundHdl_Impl, ColorListBox&, void );
|
|
|
|
DECL_LINK( ModifiedSliderHdl_Impl, weld::Scale&, void );
|
2017-07-31 15:13:12 +02:00
|
|
|
void ModifiedHdl_Impl(void const *);
|
2018-06-19 15:02:49 +01:00
|
|
|
DECL_LINK( ClickAddHdl_Impl, weld::Button&, void );
|
|
|
|
DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
|
2018-10-01 20:03:31 +01:00
|
|
|
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
|
|
|
|
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-06-17 16:13:56 +02:00
|
|
|
sal_Int32 SearchHatchList(const OUString& rHatchName);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
public:
|
2019-09-24 14:10:48 +01:00
|
|
|
SvxHatchTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvxHatchTabPage() override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
void Construct();
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* ) override;
|
|
|
|
virtual void Reset( const SfxItemSet * ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void ActivatePage( const SfxItemSet& rSet ) override;
|
2016-06-05 15:15:56 +02:00
|
|
|
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-07-07 15:56:37 +02:00
|
|
|
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
|
|
|
|
void SetHatchingList( XHatchListRef const & pHtchLst)
|
2015-08-31 09:08:19 +02:00
|
|
|
{ m_pHatchingList = pHtchLst; }
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-08-31 09:08:19 +02:00
|
|
|
void SetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; }
|
|
|
|
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2011-09-11 17:53:40 +02:00
|
|
|
/************************************************************************/
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-09-20 16:58:21 +01:00
|
|
|
class SvxBitmapTabPage : public SfxTabPage
|
2016-07-26 22:54:24 +05:30
|
|
|
{
|
2016-08-12 04:22:28 +05:30
|
|
|
static const sal_uInt16 pBitmapRanges[];
|
2016-07-26 22:54:24 +05:30
|
|
|
private:
|
|
|
|
|
|
|
|
const SfxItemSet& m_rOutAttrs;
|
|
|
|
|
|
|
|
XBitmapListRef m_pBitmapList;
|
|
|
|
ChangeType* m_pnBitmapListState;
|
|
|
|
|
2016-08-12 04:22:28 +05:30
|
|
|
double m_fObjectWidth;
|
|
|
|
double m_fObjectHeight;
|
2018-03-31 14:48:13 +02:00
|
|
|
bool m_bLogicalSize;
|
2016-07-26 22:54:24 +05:30
|
|
|
|
|
|
|
XFillAttrSetItem m_aXFillAttr;
|
|
|
|
SfxItemSet& m_rXFSet;
|
2016-08-12 04:22:28 +05:30
|
|
|
const SdrView* mpView;
|
2016-08-19 09:31:35 +01:00
|
|
|
MapUnit mePoolUnit;
|
2018-03-31 14:48:13 +02:00
|
|
|
FieldUnit meFieldUnit;
|
2016-08-12 04:22:28 +05:30
|
|
|
Size rBitmapSize;
|
|
|
|
Size rFilledSize;
|
|
|
|
Size rZoomedSize;
|
2018-06-19 15:02:49 +01:00
|
|
|
|
2018-09-29 11:58:10 +01:00
|
|
|
SvxXRectPreview m_aCtlBitmapPreview;
|
2018-10-01 20:03:31 +01:00
|
|
|
std::unique_ptr<SvxPresetListBox> m_xBitmapLB;
|
2018-09-14 15:07:17 +01:00
|
|
|
std::unique_ptr<weld::ComboBox> m_xBitmapStyleLB;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::Container> m_xSizeBox;
|
|
|
|
std::unique_ptr<weld::CheckButton> m_xTsbScale;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xBitmapWidth;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xBitmapHeight;
|
|
|
|
std::unique_ptr<weld::Container> m_xPositionBox;
|
2018-09-14 15:07:17 +01:00
|
|
|
std::unique_ptr<weld::ComboBox> m_xPositionLB;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::Container> m_xPositionOffBox;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xPositionOffX;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xPositionOffY;
|
|
|
|
std::unique_ptr<weld::Container> m_xTileOffBox;
|
2018-09-14 15:07:17 +01:00
|
|
|
std::unique_ptr<weld::ComboBox> m_xTileOffLB;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xTileOffset;
|
|
|
|
std::unique_ptr<weld::Button> m_xBtnImport;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlBitmapPreview;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xBitmapLBWin;
|
|
|
|
|
|
|
|
DECL_LINK( ModifyBitmapHdl, SvtValueSet*, void );
|
|
|
|
DECL_LINK( ClickScaleHdl, weld::Button&, void );
|
2018-09-14 15:07:17 +01:00
|
|
|
DECL_LINK( ModifyBitmapStyleHdl, weld::ComboBox&, void );
|
2018-06-19 15:02:49 +01:00
|
|
|
DECL_LINK( ModifyBitmapSizeHdl, weld::MetricSpinButton&, void );
|
2018-09-14 15:07:17 +01:00
|
|
|
DECL_LINK( ModifyBitmapPositionHdl, weld::ComboBox&, void );
|
2018-06-19 15:02:49 +01:00
|
|
|
DECL_LINK( ModifyPositionOffsetHdl, weld::MetricSpinButton&, void );
|
|
|
|
DECL_LINK( ModifyTileOffsetHdl, weld::MetricSpinButton&, void );
|
2018-10-01 20:03:31 +01:00
|
|
|
DECL_LINK( ClickRenameHdl, SvxPresetListBox*, void );
|
|
|
|
DECL_LINK( ClickDeleteHdl, SvxPresetListBox*, void );
|
2018-06-19 15:02:49 +01:00
|
|
|
DECL_LINK( ClickImportHdl, weld::Button&, void );
|
2016-07-26 22:54:24 +05:30
|
|
|
void ClickBitmapHdl_Impl();
|
2016-08-12 04:22:28 +05:30
|
|
|
void CalculateBitmapPresetSize();
|
2016-07-26 22:54:24 +05:30
|
|
|
sal_Int32 SearchBitmapList(const OUString& rBitmapName);
|
2019-01-23 22:13:21 -09:00
|
|
|
sal_Int32 SearchBitmapList(const GraphicObject& rGraphicObject);
|
2016-07-26 22:54:24 +05:30
|
|
|
|
|
|
|
public:
|
2019-09-24 14:10:48 +01:00
|
|
|
SvxBitmapTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvxBitmapTabPage() override;
|
2016-07-26 22:54:24 +05:30
|
|
|
|
|
|
|
void Construct();
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
|
2016-07-26 22:54:24 +05:30
|
|
|
|
|
|
|
virtual bool FillItemSet( SfxItemSet* ) override;
|
|
|
|
virtual void Reset( const SfxItemSet * ) override;
|
|
|
|
virtual void ActivatePage( const SfxItemSet& rSet ) override;
|
|
|
|
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
|
|
|
|
|
2016-07-27 09:43:34 +02:00
|
|
|
void SetBitmapList( const XBitmapListRef& pBmpLst) { m_pBitmapList = pBmpLst; }
|
2016-07-26 22:54:24 +05:30
|
|
|
void SetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
|
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************/
|
|
|
|
|
2016-06-07 16:58:20 +05:30
|
|
|
class SvxPatternTabPage : public SvxTabPage
|
2009-10-31 00:36:06 +01:00
|
|
|
{
|
|
|
|
private:
|
2015-09-03 08:37:09 +02:00
|
|
|
const SfxItemSet& m_rOutAttrs;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-09-03 08:37:09 +02:00
|
|
|
XColorListRef m_pColorList;
|
2016-06-07 16:58:20 +05:30
|
|
|
XPatternListRef m_pPatternList;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-06-07 16:58:20 +05:30
|
|
|
ChangeType* m_pnPatternListState;
|
2015-09-03 08:37:09 +02:00
|
|
|
ChangeType* m_pnColorListState;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-09-03 08:37:09 +02:00
|
|
|
XFillAttrSetItem m_aXFillAttr;
|
|
|
|
SfxItemSet& m_rXFSet;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-09-29 11:58:10 +01:00
|
|
|
SvxXRectPreview m_aCtlPreview;
|
2018-08-30 09:43:59 +01:00
|
|
|
std::unique_ptr<SvxPixelCtl> m_xCtlPixel;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<ColorListBox> m_xLbColor;
|
|
|
|
std::unique_ptr<ColorListBox> m_xLbBackgroundColor;
|
2018-10-01 20:03:31 +01:00
|
|
|
std::unique_ptr<SvxPresetListBox> m_xPatternLB;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::Button> m_xBtnAdd;
|
|
|
|
std::unique_ptr<weld::Button> m_xBtnModify;
|
2018-08-30 09:43:59 +01:00
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlPixelWin;
|
2018-06-19 15:02:49 +01:00
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlPreview;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xPatternLBWin;
|
|
|
|
std::unique_ptr<SvxBitmapCtl> m_xBitmapCtl;
|
|
|
|
|
|
|
|
DECL_LINK( ClickAddHdl_Impl, weld::Button&, void );
|
|
|
|
DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
|
|
|
|
DECL_LINK( ChangePatternHdl_Impl, SvtValueSet*, void );
|
|
|
|
DECL_LINK( ChangeColorHdl_Impl, ColorListBox&, void );
|
2018-10-01 20:03:31 +01:00
|
|
|
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
|
|
|
|
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-08-22 16:48:05 +05:30
|
|
|
sal_Int32 SearchPatternList(const OUString& rPatternName);
|
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
public:
|
2019-09-24 14:10:48 +01:00
|
|
|
SvxPatternTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvxPatternTabPage() override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
void Construct();
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* ) override;
|
|
|
|
virtual void Reset( const SfxItemSet * ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void ActivatePage( const SfxItemSet& rSet ) override;
|
2016-06-05 15:15:56 +02:00
|
|
|
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-05-02 12:39:43 +01:00
|
|
|
virtual void PointChanged( weld::DrawingArea*, RectPoint eRP ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-07-07 15:56:37 +02:00
|
|
|
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
|
|
|
|
void SetPatternList( XPatternListRef const & pPatternList) { m_pPatternList = pPatternList; }
|
2016-06-07 16:58:20 +05:30
|
|
|
void SetPtrnChgd( ChangeType* pIn ) { m_pnPatternListState = pIn; }
|
2015-09-03 08:37:09 +02:00
|
|
|
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
|
2016-06-07 16:58:20 +05:30
|
|
|
void ChangeColor_Impl();
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2013-01-29 23:54:20 +00:00
|
|
|
/************************************************************************/
|
|
|
|
|
2016-08-17 15:34:33 +02:00
|
|
|
enum class ColorModel
|
|
|
|
{
|
|
|
|
RGB,
|
2016-08-22 16:48:05 +05:30
|
|
|
CMYK
|
2016-08-17 15:34:33 +02:00
|
|
|
};
|
|
|
|
|
2013-01-29 23:54:20 +00:00
|
|
|
class SvxColorTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
private:
|
2009-10-31 00:36:06 +01:00
|
|
|
const SfxItemSet& rOutAttrs;
|
|
|
|
|
2011-09-26 22:00:40 +01:00
|
|
|
XColorListRef pColorList;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2011-09-26 22:00:40 +01:00
|
|
|
ChangeType* pnColorListState;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
XFillAttrSetItem aXFillAttr;
|
|
|
|
SfxItemSet& rXFSet;
|
|
|
|
|
|
|
|
ColorModel eCM;
|
|
|
|
|
2016-05-27 16:16:12 +05:30
|
|
|
Color aPreviousColor;
|
2013-10-04 12:34:30 +02:00
|
|
|
Color aCurrentColor;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2018-06-18 21:30:10 +01:00
|
|
|
css::uno::Reference< css::uno::XComponentContext > m_context;
|
|
|
|
|
|
|
|
PaletteManager maPaletteManager;
|
2018-09-29 11:58:10 +01:00
|
|
|
SvxXRectPreview m_aCtlPreviewOld;
|
|
|
|
SvxXRectPreview m_aCtlPreviewNew;
|
2018-06-18 21:30:10 +01:00
|
|
|
std::unique_ptr<ColorValueSet> m_xValSetColorList;
|
|
|
|
std::unique_ptr<ColorValueSet> m_xValSetRecentList;
|
2018-09-14 15:07:17 +01:00
|
|
|
std::unique_ptr<weld::ComboBox> m_xSelectPalette;
|
2018-06-18 21:30:10 +01:00
|
|
|
std::unique_ptr<weld::RadioButton> m_xRbRGB;
|
|
|
|
std::unique_ptr<weld::RadioButton> m_xRbCMYK;
|
|
|
|
std::unique_ptr<weld::Widget> m_xRGBcustom;
|
|
|
|
std::unique_ptr<weld::Widget> m_xRGBpreset;
|
|
|
|
std::unique_ptr<weld::Entry> m_xRpreset;
|
|
|
|
std::unique_ptr<weld::Entry> m_xGpreset;
|
|
|
|
std::unique_ptr<weld::Entry> m_xBpreset;
|
|
|
|
std::unique_ptr<weld::SpinButton> m_xRcustom;
|
|
|
|
std::unique_ptr<weld::SpinButton> m_xGcustom;
|
|
|
|
std::unique_ptr<weld::SpinButton> m_xBcustom;
|
|
|
|
std::unique_ptr<weld::HexColorControl> m_xHexpreset;
|
|
|
|
std::unique_ptr<weld::HexColorControl> m_xHexcustom;
|
|
|
|
std::unique_ptr<weld::Widget> m_xCMYKcustom;
|
|
|
|
std::unique_ptr<weld::Widget> m_xCMYKpreset;
|
|
|
|
std::unique_ptr<weld::Entry> m_xCpreset;
|
|
|
|
std::unique_ptr<weld::Entry> m_xYpreset;
|
|
|
|
std::unique_ptr<weld::Entry> m_xMpreset;
|
|
|
|
std::unique_ptr<weld::Entry> m_xKpreset;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xCcustom;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xYcustom;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xMcustom;
|
|
|
|
std::unique_ptr<weld::MetricSpinButton> m_xKcustom;
|
|
|
|
std::unique_ptr<weld::Button> m_xBtnAdd;
|
|
|
|
std::unique_ptr<weld::Button> m_xBtnDelete;
|
|
|
|
std::unique_ptr<weld::Button> m_xBtnWorkOn;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlPreviewOld;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xCtlPreviewNew;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xValSetColorListWin;
|
|
|
|
std::unique_ptr<weld::CustomWeld> m_xValSetRecentListWin;
|
|
|
|
|
2015-04-24 15:57:34 +02:00
|
|
|
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 );
|
2011-01-14 12:41:27 +01:00
|
|
|
sal_uInt16 ColorToPercent_Impl( sal_uInt16 nColor );
|
|
|
|
sal_uInt16 PercentToColor_Impl( sal_uInt16 nPercent );
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-04-16 08:41:07 +00:00
|
|
|
void ImpColorCountChanged();
|
2016-08-02 23:53:38 +05:30
|
|
|
void FillPaletteLB();
|
2014-02-25 18:04:51 +01:00
|
|
|
|
2018-06-18 21:30:10 +01:00
|
|
|
DECL_LINK(ClickAddHdl_Impl, weld::Button&, void);
|
|
|
|
DECL_LINK(ClickWorkOnHdl_Impl, weld::Button&, void);
|
|
|
|
DECL_LINK(ClickDeleteHdl_Impl, weld::Button&, void);
|
2012-04-15 17:50:21 +02:00
|
|
|
|
2018-09-14 15:07:17 +01:00
|
|
|
DECL_LINK(SelectPaletteLBHdl, weld::ComboBox&, void);
|
2018-06-18 21:30:10 +01:00
|
|
|
DECL_LINK( SelectValSetHdl_Impl, SvtValueSet*, void );
|
|
|
|
DECL_LINK( SelectColorModeHdl_Impl, weld::ToggleButton&, void );
|
2016-11-07 16:44:27 +01:00
|
|
|
void ChangeColor(const Color &rNewColor, bool bUpdatePreset = true);
|
2016-05-27 16:16:12 +05:30
|
|
|
void SetColorModel(ColorModel eModel);
|
|
|
|
void ChangeColorModel();
|
2016-11-07 16:44:27 +01:00
|
|
|
void UpdateColorValues( bool bUpdatePreset = true );
|
2018-06-18 21:30:10 +01:00
|
|
|
DECL_LINK(SpinValueHdl_Impl, weld::SpinButton&, void);
|
|
|
|
DECL_LINK(MetricSpinValueHdl_Impl, weld::MetricSpinButton&, void);
|
|
|
|
DECL_LINK(ModifiedHdl_Impl, weld::Entry&, void);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2011-09-26 22:00:40 +01:00
|
|
|
void UpdateModified();
|
2017-02-16 22:29:10 +01:00
|
|
|
|
|
|
|
static sal_Int32 FindInCustomColors( OUString const & aColorName );
|
|
|
|
sal_Int32 FindInPalette( const Color& rColor );
|
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
public:
|
2019-09-24 14:10:48 +01:00
|
|
|
SvxColorTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvxColorTabPage() override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
void Construct();
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* ) override;
|
|
|
|
virtual void Reset( const SfxItemSet * ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void ActivatePage( const SfxItemSet& rSet ) override;
|
2016-06-05 15:15:56 +02:00
|
|
|
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-11-09 14:56:41 +02:00
|
|
|
void SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef );
|
2016-04-12 11:02:36 +02:00
|
|
|
void SetColorList( const XColorListRef& pColList );
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
|
2011-09-26 22:00:40 +01:00
|
|
|
void SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2019-09-04 16:07:56 +02:00
|
|
|
void SetCtlPreviewOld( const SfxItemSet& rAttrs ) { m_aCtlPreviewOld.SetAttributes( rAttrs ); }
|
2019-01-22 18:50:23 -09:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void FillUserData() override;
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2013-10-28 03:46:16 +01:00
|
|
|
#endif // INCLUDED_CUI_SOURCE_INC_CUITABAREA_HXX
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2010-10-27 12:45:03 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|