2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-21 22:06:52 +00: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-23 19:08:11 +02:00
|
|
|
#ifndef INCLUDED_SVX_HDFT_HXX
|
|
|
|
#define INCLUDED_SVX_HDFT_HXX
|
2007-04-11 14:57:24 +00:00
|
|
|
|
|
|
|
#include <sfx2/tabdlg.hxx>
|
|
|
|
|
|
|
|
#include <vcl/fixed.hxx>
|
|
|
|
#include <vcl/field.hxx>
|
|
|
|
#include <vcl/group.hxx>
|
2013-05-28 11:47:28 +01:00
|
|
|
#include <vcl/layout.hxx>
|
|
|
|
|
2007-04-11 14:57:24 +00:00
|
|
|
#include <svx/pagectrl.hxx>
|
2013-11-09 15:28:54 -06:00
|
|
|
#include <svx/svxdllapi.h>
|
2007-04-11 14:57:24 +00:00
|
|
|
|
2011-09-15 10:54:46 +02:00
|
|
|
namespace svx
|
|
|
|
{
|
2014-09-23 11:20:40 +02:00
|
|
|
SVX_DLLPUBLIC bool ShowBorderBackgroundDlg( vcl::Window* pParent, SfxItemSet* pBBSet,
|
2011-09-15 10:54:46 +02:00
|
|
|
bool bEnableBackgroundSelector );
|
|
|
|
}
|
|
|
|
|
2007-04-11 14:57:24 +00:00
|
|
|
// class SvxHFPage ------------------------------------------------------
|
|
|
|
|
2014-06-02 15:00:50 +00:00
|
|
|
class SVX_DLLPUBLIC SvxHFPage : public SfxTabPage
|
2007-04-11 14:57:24 +00:00
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
|
2014-06-02 15:00:50 +00:00
|
|
|
private:
|
|
|
|
//UUUU
|
|
|
|
void EnableDrawingLayerFillStyles(bool bNew) { mbEnableDrawingLayerFillStyles = bNew; }
|
|
|
|
|
2007-04-11 14:57:24 +00:00
|
|
|
public:
|
|
|
|
|
2014-06-10 17:23:12 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* rOutSet ) SAL_OVERRIDE;
|
2014-06-11 10:35:24 +02:00
|
|
|
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
|
2007-04-11 14:57:24 +00:00
|
|
|
|
|
|
|
virtual ~SvxHFPage();
|
2015-01-13 14:52:40 +02:00
|
|
|
virtual void dispose() SAL_OVERRIDE;
|
2007-04-11 14:57:24 +00:00
|
|
|
|
2014-06-02 15:00:50 +00:00
|
|
|
void DisableDeleteQueryBox() { mbDisableQueryBox = true; }
|
|
|
|
void EnableBackgroundSelector(bool bNew) { mbEnableBackgroundSelector = bNew; }
|
|
|
|
|
|
|
|
//UUUU
|
|
|
|
virtual void PageCreated(const SfxAllItemSet&) SAL_OVERRIDE;
|
|
|
|
|
2007-04-11 14:57:24 +00:00
|
|
|
void EnableDynamicSpacing();
|
|
|
|
|
|
|
|
protected:
|
2015-03-04 11:17:25 +02:00
|
|
|
static const sal_uInt16 pRanges[];
|
|
|
|
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void ActivatePage( const SfxItemSet& rSet ) SAL_OVERRIDE;
|
2015-04-27 16:43:07 +02:00
|
|
|
virtual sfxpg DeactivatePage( SfxItemSet* pSet = 0 ) SAL_OVERRIDE;
|
2007-04-11 14:57:24 +00:00
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId );
|
2013-03-01 00:44:20 -03:00
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<FixedText> m_pPageLbl;
|
|
|
|
VclPtr<CheckBox> m_pTurnOnBox;
|
|
|
|
VclPtr<CheckBox> m_pCntSharedBox;
|
|
|
|
VclPtr<CheckBox> m_pCntSharedFirstBox;
|
|
|
|
VclPtr<FixedText> m_pLMLbl;
|
|
|
|
VclPtr<MetricField> m_pLMEdit;
|
|
|
|
VclPtr<FixedText> m_pRMLbl;
|
|
|
|
VclPtr<MetricField> m_pRMEdit;
|
|
|
|
VclPtr<FixedText> m_pDistFT;
|
|
|
|
VclPtr<MetricField> m_pDistEdit;
|
|
|
|
VclPtr<CheckBox> m_pDynSpacingCB;
|
|
|
|
VclPtr<FixedText> m_pHeightFT;
|
|
|
|
VclPtr<MetricField> m_pHeightEdit;
|
|
|
|
VclPtr<CheckBox> m_pHeightDynBtn;
|
|
|
|
VclPtr<SvxPageWindow> m_pBspWin;
|
|
|
|
VclPtr<PushButton> m_pBackgroundBtn;
|
2013-03-01 00:44:20 -03:00
|
|
|
|
|
|
|
sal_uInt16 nId;
|
|
|
|
SfxItemSet* pBBSet;
|
2014-06-02 15:00:50 +00:00
|
|
|
/// bitfield
|
|
|
|
bool mbDisableQueryBox : 1;
|
|
|
|
bool mbEnableBackgroundSelector : 1;
|
|
|
|
bool mbEnableDrawingLayerFillStyles : 1;
|
2007-04-11 14:57:24 +00:00
|
|
|
|
|
|
|
void InitHandler();
|
|
|
|
DECL_LINK( TurnOnHdl, CheckBox*);
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(DistModify, void *);
|
|
|
|
DECL_LINK(HeightModify, void *);
|
|
|
|
DECL_LINK(BorderModify, void *);
|
|
|
|
DECL_LINK(BackgroundHdl, void *);
|
2007-04-11 14:57:24 +00:00
|
|
|
|
|
|
|
void UpdateExample();
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(RangeHdl, void *);
|
2007-04-11 14:57:24 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
SVX_DLLPRIVATE void ResetBackground_Impl( const SfxItemSet& rSet );
|
|
|
|
};
|
|
|
|
|
|
|
|
// class SvxHeaderPage ---------------------------------------------------
|
|
|
|
|
|
|
|
class SVX_DLLPUBLIC SvxHeaderPage : public SvxHFPage
|
|
|
|
{
|
|
|
|
public:
|
2015-04-17 13:51:33 +01:00
|
|
|
static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
|
2015-03-04 11:17:25 +02:00
|
|
|
// returns the Which values to the range
|
2015-04-17 13:51:33 +01:00
|
|
|
static const sal_uInt16* GetRanges() { return pRanges; }
|
|
|
|
SVX_DLLPRIVATE SvxHeaderPage( vcl::Window* pParent, const SfxItemSet& rSet );
|
2007-04-11 14:57:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// class SvxFooterPage ---------------------------------------------------
|
|
|
|
|
|
|
|
class SVX_DLLPUBLIC SvxFooterPage : public SvxHFPage
|
|
|
|
{
|
|
|
|
public:
|
2015-04-17 13:51:33 +01:00
|
|
|
static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
|
|
|
|
static const sal_uInt16* GetRanges() { return pRanges; }
|
2014-09-23 11:20:40 +02:00
|
|
|
SVX_DLLPRIVATE SvxFooterPage( vcl::Window* pParent, const SfxItemSet& rSet );
|
2007-04-11 14:57:24 +00:00
|
|
|
};
|
|
|
|
|
2013-05-28 11:47:28 +01:00
|
|
|
class SVX_DLLPUBLIC DeleteHeaderDialog : public MessageDialog
|
|
|
|
{
|
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
DeleteHeaderDialog(vcl::Window *pParent)
|
2013-05-28 11:47:28 +01:00
|
|
|
: MessageDialog(pParent, "DeleteHeaderDialog",
|
|
|
|
"svx/ui/deleteheaderdialog.ui")
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class SVX_DLLPUBLIC DeleteFooterDialog : public MessageDialog
|
|
|
|
{
|
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
DeleteFooterDialog(vcl::Window *pParent)
|
2013-05-28 11:47:28 +01:00
|
|
|
: MessageDialog(pParent, "DeleteFooterDialog",
|
|
|
|
"svx/ui/deletefooterdialog.ui")
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2007-04-11 14:57:24 +00:00
|
|
|
#endif
|
|
|
|
|
2010-10-27 13:11:31 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|