Files
libreoffice/cui/source/inc/cuitabarea.hxx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

741 lines
29 KiB
C++
Raw Normal View History

2010-10-27 12:45:03 +01:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: clarify Option->Language UI option Patch contributed by Herbert Duerr http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117709#: add missing string resource Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172348 cws mba34issues01: #i117716#: fix missing resources my removing unused code Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172345 re-add Crystal, Tango, Oxygen icon theme listings. correct method signature Patch contributed by Jean-Louis 'Hans' Fuchs http://svn.apache.org/viewvc?view=revision&revision=1306725 i#119063 - correct serf integration Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1300521 i#119036 - adapt serf integration -- use transfer-encoding 'chunked' on HTTPS -- switch transfer-encoding between 'chunked' and none on 413 HTTP status code -- refactoring -- improve user experience of certification dialog - only shown once Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1299727 118569: Use whole certification chain for verification. Patch contributed by Andre Fischer http://svn.apache.org/viewvc?view=revision&revision=1295493 serf integration: improve credential input handling Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1294557 warning-free ucb/source/ucp/webdav Patch contributed by Pavel Janik http://svn.apache.org/viewvc?view=revision&revision=1294086 some refactoring to PROPPATCH and PROPFIND requests Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1293281 i#118569: Replace neon with serf Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1292832 http://svn.apache.org/viewvc?view=revision&revision=1292794 remove OS/2 conditionals for now. re-enable webdav unit tests.
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 .
*/
#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>
#include <svx/xflasit.hxx>
2009-10-31 00:36:06 +01:00
#include <svx/tabarea.hxx>
#include <svx/hexcolorcontrol.hxx>
#include <svx/SvxColorValueSet.hxx>
#include <svx/SvxPresetListBox.hxx>
#include <svx/PaletteManager.hxx>
#include <svx/svdview.hxx>
2009-10-31 00:36:06 +01:00
#define NO_BUTTON_SELECTED -1
class ColorListBox;
2012-02-13 20:36:53 +01:00
class SdrModel;
class SvxBitmapCtl;
class SvxColorListBox;
2012-02-13 20:36:53 +01:00
/************************************************************************/
class ButtonBox
{
private:
sal_Int32 mnCurrentButton;
std::vector<weld::ToggleButton*> maButtonList;
std::map<weld::ToggleButton*, sal_Int32 > maButtonToPos;
void SelectButtonImpl( sal_Int32 nPos )
{
if(mnCurrentButton != NO_BUTTON_SELECTED)
{
maButtonList[mnCurrentButton]->set_active(false);
}
mnCurrentButton = nPos;
maButtonList[mnCurrentButton]->set_active(true);
};
public:
ButtonBox()
{
mnCurrentButton = NO_BUTTON_SELECTED;
};
void AddButton(weld::ToggleButton* pButton)
{
maButtonList.push_back(pButton);
maButtonToPos.insert( std::make_pair(pButton, maButtonList.size() - 1) );
}
sal_Int32 GetCurrentButtonPos() const { return mnCurrentButton; }
sal_Int32 GetButtonPos(weld::ToggleButton* pButton)
{
std::map<weld::ToggleButton*, sal_Int32>::const_iterator aBtnPos = maButtonToPos.find(pButton);
if(aBtnPos != maButtonToPos.end())
return aBtnPos->second;
else
return -1;
}
void SelectButton(weld::ToggleButton* pButton)
{
sal_Int32 nPos = GetButtonPos(pButton);
if(nPos != -1)
SelectButtonImpl(nPos);
}
};
enum class PageType
{
Area,
Gradient,
Hatch,
Bitmap,
Shadow,
Transparence,
};
class SvxAreaTabDialog final : public SfxTabDialogController
2009-10-31 00:36:06 +01:00
{
SdrModel* mpDrawModel;
XColorListRef mpColorList;
XColorListRef mpNewColorList;
XGradientListRef mpGradientList;
XGradientListRef mpNewGradientList;
XHatchListRef mpHatchingList;
XHatchListRef mpNewHatchingList;
XBitmapListRef mpBitmapList;
XBitmapListRef mpNewBitmapList;
XPatternListRef mpPatternList;
XPatternListRef mpNewPatternList;
2009-10-31 00:36:06 +01:00
ChangeType mnColorListState;
2009-10-31 00:36:06 +01:00
ChangeType mnBitmapListState;
ChangeType mnPatternListState;
2009-10-31 00:36:06 +01:00
ChangeType mnGradientListState;
ChangeType mnHatchingListState;
virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
2009-10-31 00:36:06 +01:00
virtual short Ok() override;
DECL_LINK(CancelHdlImpl, weld::Button&, void);
2009-10-31 00:36:06 +01:00
void SavePalettes();
public:
SvxAreaTabDialog(weld::Window* pParent, const SfxItemSet* pAttr, SdrModel* pModel, bool bShadow);
2009-10-31 00:36:06 +01:00
void SetNewColorList( XColorListRef const & pColorList )
{ mpNewColorList = pColorList; }
const XColorListRef& GetNewColorList() const { return mpNewColorList; }
2009-10-31 00:36:06 +01:00
};
/************************************************************************/
2009-10-31 00:36:06 +01:00
class SvxTransparenceTabPage : public SfxTabPage
2009-10-31 00:36:06 +01:00
{
static const sal_uInt16 pTransparenceRanges[];
2009-10-31 00:36:06 +01:00
const SfxItemSet& rOutAttrs;
PageType nPageType;
Merge back branch alg_writerframes to trunk (cherry picked from commit b635b4fa4e42053d30ab639643d2236a20243f62) Conflicts: comphelper/inc/comphelper/TypeGeneration.hxx comphelper/source/property/TypeGeneration.cxx cui/source/factory/dlgfact.hxx cui/source/inc/cuitabarea.hxx cui/source/tabpages/tabarea.cxx cui/source/tabpages/tabarea.hrc cui/source/tabpages/tabarea.src cui/source/tabpages/tparea.cxx drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx drawinglayer/source/texture/texture.cxx editeng/inc/editeng/unotext.hxx editeng/source/items/frmitems.cxx include/drawinglayer/texture/texture.hxx include/editeng/brushitem.hxx include/svx/sdr/primitive2d/sdrdecompositiontools.hxx include/svx/svxids.hrc include/xmloff/xmltypes.hxx reportdesign/source/ui/misc/UITools.cxx sc/source/ui/drawfunc/drawsh.cxx sfx2/source/dialog/tabdlg.cxx svl/source/undo/undo.cxx svx/inc/svx/unoshprp.hxx sw/Library_sw.mk sw/inc/doc.hxx sw/inc/format.hxx sw/inc/frmfmt.hxx sw/inc/swatrset.hxx sw/inc/unomap.hxx sw/inc/unoprnms.hxx sw/source/core/access/accpara.cxx sw/source/core/attr/format.cxx sw/source/core/attr/swatrset.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/notxtfrm.cxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/txtfly.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/uibase/app/docst.cxx sw/source/core/uibase/app/docstyle.cxx sw/source/core/uibase/shells/drawdlg.cxx sw/source/core/uibase/shells/frmsh.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unostyle.cxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/fmtui/tmpdlg.src sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmpage.src sw/source/ui/inc/frmsh.hxx xmloff/source/text/txtprhdl.cxx xmloff/source/text/txtprmap.cxx Change-Id: Id3ffaa83bb5594d287f1ac8f2c1c9cf55c70946d
2014-03-19 16:17:02 +00:00
sal_uInt16 nDlgType;
2009-10-31 00:36:06 +01:00
bool bBitmap;
XFillAttrSetItem aXFillAttr;
SfxItemSet& rXFSet;
SvxXRectPreview m_aCtlBitmapPreview;
SvxXRectPreview m_aCtlXRectPreview;
2009-10-31 00:36:06 +01:00
// main selection
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
/// linear transparency
std::unique_ptr<weld::MetricSpinButton> m_xMtrTransparent;
2009-10-31 00:36:06 +01:00
// gradient transparency
std::unique_ptr<weld::Widget> m_xGridGradient;
std::unique_ptr<weld::ComboBox> m_xLbTrgrGradientType;
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
std::unique_ptr<weld::CustomWeld> m_xCtlBitmapPreview;
std::unique_ptr<weld::CustomWeld> m_xCtlXRectPreview;
2009-10-31 00:36:06 +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);
DECL_LINK(ModifiedTrgrListBoxHdl_Impl, weld::ComboBox&, void);
void ModifiedTrgrHdl_Impl(const weld::ComboBox*);
2009-10-31 00:36:06 +01:00
void ActivateLinear(bool bActivate);
void ActivateGradient(bool bActivate);
void SetControlState_Impl(css::awt::GradientStyle eXGS);
2009-10-31 00:36:06 +01:00
bool InitPreview ( const SfxItemSet& rSet );
void InvalidatePreview (bool bEnable = true );
2009-10-31 00:36:06 +01:00
public:
SvxTransparenceTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
virtual ~SvxTransparenceTabPage() override;
2009-10-31 00:36:06 +01:00
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*);
static const sal_uInt16* GetRanges() { return pTransparenceRanges; }
2009-10-31 00:36:06 +01:00
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;
2009-10-31 00:36:06 +01:00
void SetPageType(PageType nInType) { nPageType = nInType; }
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 * commit 'ooo/DEV300_m101': (185 commits) masterfix DEV300: #i10000# usage of L10N build_type masterfix: #i10000# INT16 -> sal_Int16 fixed compile errors after resync to m100, part2 gridsort: post-rebase fixes CWS gnumake3: found another tools integer type removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw native359: #i114398# changing mac langpack icon native359: #i115669# fixing package description for solaris packages gnumake3: remove comphelper version; fix including extract.hxx locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by <jcpoulard> sb138: #i116659# timely termination of OnLogRotateThread accfixes: removed include of obsolete header file accfixes: removed obsolete file removetooltypes01: #i112600# Fix build problems on non-pro accfixes: moved some shared strings to svx part2 accfixes: moved some shared strings to svx accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module) removetooltypes01: #i112600# Remove tools types for Mac specific parts fixed tab order in BasicIDE, Library dialog tab page added some accessible names in BasicIDE ... Conflicts: UnoControls/source/base/registercontrols.cxx accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx automation/inc/automation/communi.hxx automation/inc/automation/simplecm.hxx automation/source/communi/communi.cxx automation/source/inc/rcontrol.hxx automation/source/miniapp/servuid.hxx automation/source/server/XMLParser.cxx automation/source/server/cmdbasestream.cxx automation/source/server/profiler.hxx automation/source/server/recorder.cxx automation/source/server/retstrm.hxx automation/source/server/server.cxx automation/source/server/sta_list.cxx automation/source/server/statemnt.cxx automation/source/server/statemnt.hxx automation/source/simplecm/packethandler.cxx automation/source/simplecm/simplecm.cxx automation/source/simplecm/tcpio.cxx automation/source/simplecm/tcpio.hxx automation/source/testtool/comm_bas.hxx automation/source/testtool/cretstrm.hxx automation/source/testtool/httprequest.cxx automation/source/testtool/httprequest.hxx automation/source/testtool/objtest.cxx automation/source/testtool/objtest.hxx basctl/source/basicide/baside2.cxx basctl/source/basicide/baside2.hxx basctl/source/basicide/baside2b.cxx basctl/source/basicide/baside3.cxx basctl/source/basicide/basides1.cxx basctl/source/basicide/basides2.cxx basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.src basctl/source/basicide/basobj3.cxx basctl/source/basicide/bastype2.cxx basctl/source/basicide/bastype3.cxx basctl/source/basicide/bastypes.cxx basctl/source/basicide/brkdlg.cxx basctl/source/basicide/iderdll.cxx basctl/source/basicide/macrodlg.cxx basctl/source/basicide/moduldl2.cxx basctl/source/basicide/moduldlg.cxx basctl/source/basicide/objdlg.cxx basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/tbxctl.cxx basctl/source/basicide/tbxctl.hxx basctl/source/basicide/tbxctl.src basctl/source/dlged/dlged.cxx basctl/source/dlged/dlgedfunc.cxx basctl/source/dlged/dlgedobj.cxx basctl/source/inc/basidesh.hxx basctl/source/inc/bastypes.hxx basctl/source/inc/dlgedmod.hxx basctl/source/inc/dlgedpage.hxx crashrep/prj/build.lst cui/inc/pch/precompiled_cui.hxx cui/source/customize/acccfg.cxx cui/source/customize/acccfg.hrc cui/source/customize/acccfg.src cui/source/customize/cfg.cxx cui/source/customize/cfgutil.cxx cui/source/customize/macropg.cxx cui/source/customize/macropg.src cui/source/customize/selector.cxx cui/source/dialogs/SpellDialog.cxx cui/source/dialogs/commonlingui.cxx cui/source/dialogs/cuicharmap.cxx cui/source/dialogs/cuifmsearch.cxx cui/source/dialogs/cuigaldlg.cxx cui/source/dialogs/cuigrfflt.cxx cui/source/dialogs/hldocntp.cxx cui/source/dialogs/hldoctp.cxx cui/source/dialogs/hlinettp.cxx cui/source/dialogs/hlmailtp.cxx cui/source/dialogs/hlmarkwn.cxx cui/source/dialogs/hlmarkwn.src cui/source/dialogs/hltpbase.cxx cui/source/dialogs/iconcdlg.cxx cui/source/dialogs/passwdomdlg.cxx cui/source/dialogs/pastedlg.cxx cui/source/dialogs/scriptdlg.cxx cui/source/dialogs/thesdlg.cxx cui/source/dialogs/zoom.cxx cui/source/factory/dlgfact.hxx cui/source/inc/SpellDialog.hxx cui/source/inc/autocdlg.hxx cui/source/inc/backgrnd.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cfg.hxx cui/source/inc/cfgutil.hxx cui/source/inc/cuigaldlg.hxx cui/source/inc/cuigrfflt.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/hldocntp.hxx cui/source/inc/hltpbase.hxx cui/source/inc/iconcdlg.hxx cui/source/inc/numpages.hxx cui/source/inc/page.hxx cui/source/inc/postdlg.hxx cui/source/inc/scriptdlg.hxx cui/source/inc/transfrm.hxx cui/source/inc/zoom.hxx cui/source/options/cfgchart.cxx cui/source/options/cuisrchdlg.cxx cui/source/options/dbregister.cxx cui/source/options/dbregister.src cui/source/options/fontsubs.cxx cui/source/options/internationaloptions.cxx cui/source/options/optasian.cxx cui/source/options/optchart.cxx cui/source/options/optcolor.cxx cui/source/options/optcolor.src cui/source/options/optfltr.cxx cui/source/options/optfltr.src cui/source/options/optgdlg.cxx cui/source/options/optgdlg.src cui/source/options/optgenrl.cxx cui/source/options/opthtml.cxx cui/source/options/optimprove.cxx cui/source/options/optinet2.cxx cui/source/options/optinet2.hxx cui/source/options/optjava.cxx cui/source/options/optlingu.cxx cui/source/options/optsave.cxx cui/source/options/optsave.hxx cui/source/options/treeopt.cxx cui/source/options/webconninfo.cxx cui/source/tabpages/autocdlg.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/dstribut.cxx cui/source/tabpages/grfpage.cxx cui/source/tabpages/macroass.cxx cui/source/tabpages/measure.cxx cui/source/tabpages/numfmt.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/page.cxx cui/source/tabpages/paragrph.cxx cui/source/tabpages/swpossizetabpage.cxx cui/source/tabpages/tabarea.src cui/source/tabpages/textanim.cxx cui/source/tabpages/textattr.cxx cui/source/tabpages/tparea.cxx cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tpgradnt.cxx cui/source/tabpages/tphatch.cxx cui/source/tabpages/tpline.cxx cui/source/tabpages/tplnedef.cxx cui/source/tabpages/tplneend.cxx cui/source/tabpages/tpshadow.cxx cui/source/tabpages/transfrm.cxx embedserv/source/embed/register.cxx extensions/inc/pch/precompiled_extensions.hxx extensions/inc/propctrlr.hrc extensions/source/abpilot/abpservices.cxx extensions/source/bibliography/bibload.cxx extensions/source/bibliography/datman.cxx extensions/source/bibliography/general.cxx extensions/source/dbpilots/dbpservices.cxx extensions/source/inc/componentmodule.cxx extensions/source/nsplugin/source/so_env.cxx extensions/source/ole/oleobjw.cxx extensions/source/ole/oleobjw.hxx extensions/source/oooimprovement/invite_job.cxx extensions/source/oooimprovement/onlogrotate_job.cxx extensions/source/plugin/base/service.cxx extensions/source/plugin/inc/plugin/unx/mediator.hxx extensions/source/plugin/inc/plugin/unx/plugcon.hxx extensions/source/plugin/unx/mediator.cxx extensions/source/plugin/unx/nppapi.cxx extensions/source/plugin/unx/plugcon.cxx extensions/source/preload/services.cxx extensions/source/propctrlr/formmetadata.cxx extensions/source/propctrlr/pcrservices.cxx extensions/source/resource/resource.cxx extensions/source/scanner/sane.hxx extensions/source/scanner/sanedlg.cxx extensions/source/scanner/scanunx.cxx extensions/source/scanner/scanwin.cxx extensions/source/scanner/twain.cxx extensions/source/scanner/twain.hxx extensions/source/update/check/updatecheckconfig.cxx extensions/test/stm/datatest.cxx extensions/test/stm/marktest.cxx extensions/test/stm/pipetest.cxx extensions/test/stm/testfactreg.cxx extensions/workben/testpgp.cxx forms/qa/complex/forms/CheckOGroupBoxModel.java forms/qa/makefile.mk forms/source/component/Button.cxx forms/source/component/Button.hxx forms/source/component/ListBox.cxx forms/source/inc/forms_module_impl.hxx forms/source/misc/services.cxx forms/source/solar/control/navtoolbar.cxx javainstaller2/prj/build.lst javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java lingucomponent/prj/build.lst lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx lingucomponent/source/spellcheck/spell/sreg.cxx lingucomponent/source/spellcheck/spell/sspellimp.cxx package/source/manifest/ManifestExport.cxx package/source/manifest/UnoRegister.cxx package/source/xstor/owriteablestream.cxx package/source/xstor/owriteablestream.hxx package/source/xstor/xstorage.hxx package/source/zippackage/ZipPackageFolder.cxx package/source/zippackage/ZipPackageStream.cxx setup_native/source/mac/ooo/DS_Store setup_native/source/win32/customactions/shellextensions/registerextensions.cxx xmlsecurity/prj/build.lst xmlsecurity/source/component/registerservices.cxx xmlsecurity/source/dialogs/stbcontrl.cxx xmlsecurity/source/framework/xsec_framework.cxx xmlsecurity/source/xmlsec/xsec_xmlsec.cxx xmlsecurity/tools/demo/util.hxx xmlsecurity/workben/signaturetest.cxx
2011-03-09 16:20:50 -06:00
void SetDlgType(sal_uInt16 nInType) { nDlgType = nInType; }
virtual void PageCreated(const SfxAllItemSet& aSet) override;
2009-10-31 00:36:06 +01:00
};
/************************************************************************/
2009-10-31 00:36:06 +01:00
class SvxAreaTabPage : public SfxTabPage
2009-10-31 00:36:06 +01:00
{
static const sal_uInt16 pAreaRanges[];
2009-10-31 00:36:06 +01:00
private:
std::unique_ptr<SfxTabPage> m_xFillTabPage;
ButtonBox maBox;
2009-10-31 00:36:06 +01:00
XColorListRef m_pColorList;
XGradientListRef m_pGradientList;
XHatchListRef m_pHatchingList;
XBitmapListRef m_pBitmapList;
XPatternListRef m_pPatternList;
2009-10-31 00:36:06 +01:00
Merge back branch alg_writerframes to trunk (cherry picked from commit b635b4fa4e42053d30ab639643d2236a20243f62) Conflicts: comphelper/inc/comphelper/TypeGeneration.hxx comphelper/source/property/TypeGeneration.cxx cui/source/factory/dlgfact.hxx cui/source/inc/cuitabarea.hxx cui/source/tabpages/tabarea.cxx cui/source/tabpages/tabarea.hrc cui/source/tabpages/tabarea.src cui/source/tabpages/tparea.cxx drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx drawinglayer/source/texture/texture.cxx editeng/inc/editeng/unotext.hxx editeng/source/items/frmitems.cxx include/drawinglayer/texture/texture.hxx include/editeng/brushitem.hxx include/svx/sdr/primitive2d/sdrdecompositiontools.hxx include/svx/svxids.hrc include/xmloff/xmltypes.hxx reportdesign/source/ui/misc/UITools.cxx sc/source/ui/drawfunc/drawsh.cxx sfx2/source/dialog/tabdlg.cxx svl/source/undo/undo.cxx svx/inc/svx/unoshprp.hxx sw/Library_sw.mk sw/inc/doc.hxx sw/inc/format.hxx sw/inc/frmfmt.hxx sw/inc/swatrset.hxx sw/inc/unomap.hxx sw/inc/unoprnms.hxx sw/source/core/access/accpara.cxx sw/source/core/attr/format.cxx sw/source/core/attr/swatrset.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/notxtfrm.cxx sw/source/core/inc/frame.hxx sw/source/core/inc/frmtool.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/txtfly.cxx sw/source/core/txtnode/fntcache.cxx sw/source/core/uibase/app/docst.cxx sw/source/core/uibase/app/docstyle.cxx sw/source/core/uibase/shells/drawdlg.cxx sw/source/core/uibase/shells/frmsh.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unomap.cxx sw/source/core/unocore/unoprnms.cxx sw/source/core/unocore/unostyle.cxx sw/source/ui/fmtui/tmpdlg.cxx sw/source/ui/fmtui/tmpdlg.src sw/source/ui/frmdlg/frmdlg.cxx sw/source/ui/frmdlg/frmpage.src sw/source/ui/inc/frmsh.hxx xmloff/source/text/txtprhdl.cxx xmloff/source/text/txtprmap.cxx Change-Id: Id3ffaa83bb5594d287f1ac8f2c1c9cf55c70946d
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;
ChangeType* m_pnColorListState;
ChangeType* m_pnBitmapListState;
ChangeType* m_pnPatternListState;
ChangeType* m_pnGradientListState;
ChangeType* m_pnHatchingListState;
2009-10-31 00:36:06 +01:00
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
2009-10-31 00:36:06 +01:00
bool m_bBtnClicked = false;
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;
void SetOptimalSize(weld::DialogController* pController);
void SelectFillType( weld::ToggleButton& rButton, const SfxItemSet* _pSet = nullptr );
SfxTabPage* GetFillTabPage() { return m_xFillTabPage.get(); }
bool IsBtnClicked() const { return m_bBtnClicked; }
private:
DECL_LINK(SelectFillTypeHdl_Impl, weld::ToggleButton&, void);
2009-10-31 00:36:06 +01:00
template< typename TabPage >
bool FillItemSet_Impl( SfxItemSet* );
template< typename TabPage >
void Reset_Impl( const SfxItemSet* );
template< typename TabPage >
DeactivateRC DeactivatePage_Impl( SfxItemSet* pSet );
2009-10-31 00:36:06 +01:00
public:
SvxAreaTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
virtual ~SvxAreaTabPage() override;
2009-10-31 00:36:06 +01:00
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pAreaRanges; }
2009-10-31 00:36:06 +01:00
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
2009-10-31 00:36:06 +01:00
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; }
2009-10-31 00:36:06 +01:00
};
class SvxShadowTabPage : public SvxTabPage
{
static const sal_uInt16 pShadowRanges[];
2009-10-31 00:36:06 +01:00
private:
const SfxItemSet& m_rOutAttrs;
2009-10-31 00:36:06 +01:00
XColorListRef m_pColorList;
ChangeType* m_pnColorListState;
PageType m_nPageType;
sal_uInt16 m_nDlgType;
2009-10-31 00:36:06 +01:00
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
MapUnit m_ePoolUnit;
2009-10-31 00:36:06 +01:00
SvxRectCtl m_aCtlPosition;
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:
SvxShadowTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
virtual ~SvxShadowTabPage() override;
2009-10-31 00:36:06 +01:00
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
static const sal_uInt16* GetRanges() { return pShadowRanges; }
2009-10-31 00:36:06 +01:00
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( weld::DrawingArea* pWindow, RectPoint eRP ) override;
2009-10-31 00:36:06 +01:00
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;
2009-10-31 00:36:06 +01:00
};
/************************************************************************/
2009-10-31 00:36:06 +01:00
class SvxGradientTabPage : public SfxTabPage
{
private:
const SfxItemSet& m_rOutAttrs;
2009-10-31 00:36:06 +01:00
XColorListRef m_pColorList;
XGradientListRef m_pGradientList;
2009-10-31 00:36:06 +01:00
ChangeType* m_pnGradientListState;
ChangeType* m_pnColorListState;
2009-10-31 00:36:06 +01:00
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
2009-10-31 00:36:06 +01:00
SvxXRectPreview m_aCtlPreview;
std::unique_ptr<weld::ComboBox> m_xLbGradientType;
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;
std::unique_ptr<weld::Scale> m_xSliderAngle;
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;
std::unique_ptr<SvxPresetListBox> m_xGradientLB;
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 );
void ChangeGradientHdl_Impl();
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ModifiedEditHdl_Impl, weld::SpinButton&, void );
DECL_LINK( ModifiedMetricHdl_Impl, weld::MetricSpinButton&, void );
DECL_LINK( ModifiedColorListBoxHdl_Impl, ColorListBox&, void );
DECL_LINK( ModifiedListBoxHdl_Impl, weld::ComboBox&, void );
DECL_LINK( ChangeAutoStepHdl_Impl, weld::ToggleButton&, void );
DECL_LINK( ModifiedSliderHdl_Impl, weld::Scale&, void );
void ModifiedHdl_Impl(void const *);
2009-10-31 00:36:06 +01:00
void SetControlState_Impl( css::awt::GradientStyle eXGS );
sal_Int32 SearchGradientList(const OUString& rGradientName);
2009-10-31 00:36:06 +01:00
public:
SvxGradientTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
virtual ~SvxGradientTabPage() override;
2009-10-31 00:36:06 +01:00
void Construct();
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
2009-10-31 00:36:06 +01:00
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
2009-10-31 00:36:06 +01:00
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; }
2009-10-31 00:36:06 +01:00
};
/************************************************************************/
2009-10-31 00:36:06 +01:00
class SvxHatchTabPage : public SfxTabPage
2009-10-31 00:36:06 +01:00
{
private:
const SfxItemSet& m_rOutAttrs;
2009-10-31 00:36:06 +01:00
XColorListRef m_pColorList;
XHatchListRef m_pHatchingList;
2009-10-31 00:36:06 +01:00
ChangeType* m_pnHatchingListState;
ChangeType* m_pnColorListState;
2009-10-31 00:36:06 +01:00
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
2009-10-31 00:36:06 +01:00
MapUnit m_ePoolUnit;
2009-10-31 00:36:06 +01:00
SvxXRectPreview m_aCtlPreview;
std::unique_ptr<weld::MetricSpinButton> m_xMtrDistance;
std::unique_ptr<weld::MetricSpinButton> m_xMtrAngle;
std::unique_ptr<weld::Scale> m_xSliderAngle;
std::unique_ptr<weld::ComboBox> m_xLbLineType;
std::unique_ptr<ColorListBox> m_xLbLineColor;
std::unique_ptr<weld::CheckButton> m_xCbBackgroundColor;
std::unique_ptr<ColorListBox> m_xLbBackgroundColor;
std::unique_ptr<SvxPresetListBox> m_xHatchLB;
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);
void ChangeHatchHdl_Impl();
DECL_LINK( ModifiedEditHdl_Impl, weld::MetricSpinButton&, void );
DECL_LINK( ModifiedListBoxHdl_Impl, weld::ComboBox&, void );
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 );
void ModifiedHdl_Impl(void const *);
DECL_LINK( ClickAddHdl_Impl, weld::Button&, void );
DECL_LINK( ClickModifyHdl_Impl, weld::Button&, void );
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
2009-10-31 00:36:06 +01:00
sal_Int32 SearchHatchList(const OUString& rHatchName);
2009-10-31 00:36:06 +01:00
public:
SvxHatchTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
virtual ~SvxHatchTabPage() override;
2009-10-31 00:36:06 +01:00
void Construct();
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
2009-10-31 00:36:06 +01:00
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
2009-10-31 00:36:06 +01:00
void SetColorList( XColorListRef const & pColorList ) { m_pColorList = pColorList; }
void SetHatchingList( XHatchListRef const & pHtchLst)
{ m_pHatchingList = pHtchLst; }
2009-10-31 00:36:06 +01:00
void SetHtchChgd( ChangeType* pIn ) { m_pnHatchingListState = pIn; }
void SetColorChgd( ChangeType* pIn ) { m_pnColorListState = pIn; }
2009-10-31 00:36:06 +01:00
};
/************************************************************************/
2009-10-31 00:36:06 +01:00
class SvxBitmapTabPage : public SfxTabPage
{
static const sal_uInt16 pBitmapRanges[];
private:
const SfxItemSet& m_rOutAttrs;
XBitmapListRef m_pBitmapList;
ChangeType* m_pnBitmapListState;
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;
SvxXRectPreview m_aCtlBitmapPreview;
std::unique_ptr<SvxPresetListBox> m_xBitmapLB;
std::unique_ptr<weld::ComboBox> m_xBitmapStyleLB;
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;
std::unique_ptr<weld::ComboBox> m_xPositionLB;
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;
std::unique_ptr<weld::ComboBox> m_xTileOffLB;
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 );
DECL_LINK( ModifyBitmapStyleHdl, weld::ComboBox&, void );
DECL_LINK( ModifyBitmapSizeHdl, weld::MetricSpinButton&, void );
DECL_LINK( ModifyBitmapPositionHdl, weld::ComboBox&, void );
DECL_LINK( ModifyPositionOffsetHdl, weld::MetricSpinButton&, void );
DECL_LINK( ModifyTileOffsetHdl, weld::MetricSpinButton&, void );
DECL_LINK( ClickRenameHdl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl, SvxPresetListBox*, void );
DECL_LINK( ClickImportHdl, weld::Button&, void );
void ClickBitmapHdl_Impl();
void CalculateBitmapPresetSize();
sal_Int32 SearchBitmapList(const OUString& rBitmapName);
sal_Int32 SearchBitmapList(const GraphicObject& rGraphicObject);
public:
SvxBitmapTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
virtual ~SvxBitmapTabPage() override;
void Construct();
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, 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 SetBitmapList( const XBitmapListRef& pBmpLst) { m_pBitmapList = pBmpLst; }
void SetBmpChgd( ChangeType* pIn ) { m_pnBitmapListState = pIn; }
};
/************************************************************************/
class SvxPatternTabPage : public SvxTabPage
2009-10-31 00:36:06 +01:00
{
private:
const SfxItemSet& m_rOutAttrs;
2009-10-31 00:36:06 +01:00
XColorListRef m_pColorList;
XPatternListRef m_pPatternList;
2009-10-31 00:36:06 +01:00
ChangeType* m_pnPatternListState;
ChangeType* m_pnColorListState;
2009-10-31 00:36:06 +01:00
XFillAttrSetItem m_aXFillAttr;
SfxItemSet& m_rXFSet;
2009-10-31 00:36:06 +01:00
SvxXRectPreview m_aCtlPreview;
std::unique_ptr<SvxPixelCtl> m_xCtlPixel;
std::unique_ptr<ColorListBox> m_xLbColor;
std::unique_ptr<ColorListBox> m_xLbBackgroundColor;
std::unique_ptr<SvxPresetListBox> m_xPatternLB;
std::unique_ptr<weld::Button> m_xBtnAdd;
std::unique_ptr<weld::Button> m_xBtnModify;
std::unique_ptr<weld::CustomWeld> m_xCtlPixelWin;
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 );
DECL_LINK( ClickRenameHdl_Impl, SvxPresetListBox*, void );
DECL_LINK( ClickDeleteHdl_Impl, SvxPresetListBox*, void );
2009-10-31 00:36:06 +01:00
sal_Int32 SearchPatternList(const OUString& rPatternName);
2009-10-31 00:36:06 +01:00
public:
SvxPatternTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
virtual ~SvxPatternTabPage() override;
2009-10-31 00:36:06 +01:00
void Construct();
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
2009-10-31 00:36:06 +01:00
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
2009-10-31 00:36:06 +01:00
virtual void PointChanged( weld::DrawingArea*, RectPoint eRP ) override;
2009-10-31 00:36:06 +01:00
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();
2009-10-31 00:36:06 +01:00
};
/************************************************************************/
enum class ColorModel
{
RGB,
CMYK
};
class SvxColorTabPage : public SfxTabPage
{
private:
2009-10-31 00:36:06 +01:00
const SfxItemSet& rOutAttrs;
XColorListRef pColorList;
2009-10-31 00:36:06 +01:00
ChangeType* pnColorListState;
2009-10-31 00:36:06 +01:00
XFillAttrSetItem aXFillAttr;
SfxItemSet& rXFSet;
ColorModel eCM;
Color aPreviousColor;
Color aCurrentColor;
2009-10-31 00:36:06 +01:00
css::uno::Reference< css::uno::XComponentContext > m_context;
PaletteManager maPaletteManager;
SvxXRectPreview m_aCtlPreviewOld;
SvxXRectPreview m_aCtlPreviewNew;
std::unique_ptr<ColorValueSet> m_xValSetColorList;
std::unique_ptr<ColorValueSet> m_xValSetRecentList;
std::unique_ptr<weld::ComboBox> m_xSelectPalette;
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;
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 );
2009-10-31 00:36:06 +01:00
void ImpColorCountChanged();
void FillPaletteLB();
DECL_LINK(ClickAddHdl_Impl, weld::Button&, void);
DECL_LINK(ClickWorkOnHdl_Impl, weld::Button&, void);
DECL_LINK(ClickDeleteHdl_Impl, weld::Button&, void);
DECL_LINK(SelectPaletteLBHdl, weld::ComboBox&, void);
DECL_LINK( SelectValSetHdl_Impl, SvtValueSet*, void );
DECL_LINK( SelectColorModeHdl_Impl, weld::ToggleButton&, void );
void ChangeColor(const Color &rNewColor, bool bUpdatePreset = true);
void SetColorModel(ColorModel eModel);
void ChangeColorModel();
void UpdateColorValues( bool bUpdatePreset = true );
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
void UpdateModified();
static sal_Int32 FindInCustomColors( OUString const & aColorName );
sal_Int32 FindInPalette( const Color& rColor );
2009-10-31 00:36:06 +01:00
public:
SvxColorTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
virtual ~SvxColorTabPage() override;
2009-10-31 00:36:06 +01:00
void Construct();
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
2009-10-31 00:36:06 +01:00
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
2009-10-31 00:36:06 +01:00
void SetPropertyList( XPropertyListType t, const XPropertyListRef &xRef );
void SetColorList( const XColorListRef& pColList );
2009-10-31 00:36:06 +01:00
void SetColorChgd( ChangeType* pIn ) { pnColorListState = pIn; }
2009-10-31 00:36:06 +01:00
void SetCtlPreviewOld( const SfxItemSet& rAttrs ) { m_aCtlPreviewOld.SetAttributes( rAttrs ); }
virtual void FillUserData() override;
2009-10-31 00:36:06 +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: */