2010-10-27 12:45:03 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 20:25:33 +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_NUMPAGES_HXX
|
|
|
|
#define INCLUDED_CUI_SOURCE_INC_NUMPAGES_HXX
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2011-05-06 22:45:19 -04:30
|
|
|
#include <vector>
|
2012-06-10 18:19:06 +02:00
|
|
|
#include <boost/ptr_container/ptr_vector.hpp>
|
2011-05-06 22:45:19 -04:30
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
#include <sfx2/tabdlg.hxx>
|
|
|
|
#include <vcl/group.hxx>
|
|
|
|
#include <vcl/fixed.hxx>
|
|
|
|
#include <vcl/menubtn.hxx>
|
|
|
|
#include <vcl/lstbox.hxx>
|
|
|
|
#include <vcl/edit.hxx>
|
|
|
|
#include <vcl/field.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/numdef.hxx>
|
2009-10-31 00:36:06 +01:00
|
|
|
#include <svtools/ctrlbox.hxx>
|
2015-05-06 15:14:20 +05:30
|
|
|
#include <vcl/dialog.hxx>
|
2014-02-25 18:04:51 +01:00
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
class SvxNumRule;
|
|
|
|
class SvxBmpNumValueSet;
|
|
|
|
class SvxNumValueSet;
|
|
|
|
class SvxBrushItem;
|
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
class SvxNumberingPreview : public vcl::Window
|
2013-01-02 17:15:54 +00:00
|
|
|
{
|
|
|
|
const SvxNumRule* pActNum;
|
2014-09-16 10:09:58 +02:00
|
|
|
vcl::Font aStdFont;
|
2013-01-02 17:15:54 +00:00
|
|
|
long nPageWidth;
|
2013-09-26 08:30:52 +02:00
|
|
|
const OUString* pOutlineNames;
|
2014-04-16 11:39:08 +02:00
|
|
|
bool bPosition;
|
2013-01-02 17:15:54 +00:00
|
|
|
sal_uInt16 nActLevel;
|
|
|
|
|
|
|
|
protected:
|
2015-04-28 11:00:54 +09:00
|
|
|
virtual void Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRect ) SAL_OVERRIDE;
|
2013-01-02 17:15:54 +00:00
|
|
|
|
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
SvxNumberingPreview(vcl::Window* pParent, WinBits nWinBits = WB_BORDER);
|
2013-01-02 17:15:54 +00:00
|
|
|
|
|
|
|
void SetNumRule(const SvxNumRule* pNum)
|
|
|
|
{pActNum = pNum; Invalidate();};
|
|
|
|
void SetPageWidth(long nPgWidth)
|
|
|
|
{nPageWidth = nPgWidth;}
|
2013-09-26 08:30:52 +02:00
|
|
|
void SetOutlineNames(const OUString* pNames)
|
2013-01-02 17:15:54 +00:00
|
|
|
{pOutlineNames = pNames;}
|
|
|
|
void SetPositionMode()
|
2014-04-16 11:39:08 +02:00
|
|
|
{ bPosition = true;}
|
2013-01-02 17:15:54 +00:00
|
|
|
void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;}
|
|
|
|
|
|
|
|
};
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2014-02-25 18:04:51 +01:00
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
struct SvxNumSettings_Impl
|
|
|
|
{
|
|
|
|
short nNumberType;
|
|
|
|
short nParentNumbering;
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString sPrefix;
|
|
|
|
OUString sSuffix;
|
|
|
|
OUString sBulletChar;
|
|
|
|
OUString sBulletFont;
|
2009-10-31 00:36:06 +01:00
|
|
|
SvxNumSettings_Impl() :
|
|
|
|
nNumberType(0),
|
|
|
|
nParentNumbering(0)
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
2012-06-10 18:19:06 +02:00
|
|
|
typedef boost::ptr_vector<SvxNumSettings_Impl> SvxNumSettingsArr_Impl;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
|
2014-02-25 18:04:51 +01:00
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
class SvxSingleNumPickTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<SvxNumValueSet> m_pExamplesVS;
|
2009-10-31 00:36:06 +01:00
|
|
|
SvxNumSettingsArr_Impl aNumSettingsArr;
|
|
|
|
SvxNumRule* pActNum;
|
|
|
|
SvxNumRule* pSaveNum;
|
2011-01-14 12:41:27 +01:00
|
|
|
sal_uInt16 nActNumLvl;
|
2014-04-16 11:39:08 +02:00
|
|
|
bool bModified : 1;
|
|
|
|
bool bPreset : 1;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-09-26 08:30:52 +02:00
|
|
|
OUString sNumCharFmtName;
|
2011-01-14 12:41:27 +01:00
|
|
|
sal_uInt16 nNumItemId;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-01-15 15:47:39 +02:00
|
|
|
protected:
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(NumSelectHdl_Impl, void *);
|
|
|
|
DECL_LINK(DoubleClickHdl_Impl, void *);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-01-15 15:47:39 +02:00
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
SvxSingleNumPickTabPage(vcl::Window* pParent,
|
2009-10-31 00:36:06 +01:00
|
|
|
const SfxItemSet& rSet);
|
2015-01-15 15:47:39 +02:00
|
|
|
virtual ~SvxSingleNumPickTabPage();
|
|
|
|
virtual void dispose() SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-04-17 13:51:33 +01:00
|
|
|
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
|
2014-06-11 14:34:46 +02:00
|
|
|
const SfxItemSet* rAttrSet);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
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) SAL_OVERRIDE;
|
2014-06-10 17:23:12 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
|
2014-06-11 10:35:24 +02:00
|
|
|
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-09-26 08:30:52 +02:00
|
|
|
void SetNumCharFmtName(const OUString& rName){sNumCharFmtName = rName;}
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-02-25 18:04:51 +01:00
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
class SvxBulletPickTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<SvxNumValueSet> m_pExamplesVS;
|
2009-10-31 00:36:06 +01:00
|
|
|
SvxNumRule* pActNum;
|
|
|
|
SvxNumRule* pSaveNum;
|
2011-01-14 12:41:27 +01:00
|
|
|
sal_uInt16 nActNumLvl;
|
2014-04-16 11:39:08 +02:00
|
|
|
bool bModified : 1;
|
|
|
|
bool bPreset : 1;
|
2011-01-14 12:41:27 +01:00
|
|
|
sal_uInt16 nNumItemId;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-09-26 08:30:52 +02:00
|
|
|
OUString sBulletCharFmtName;
|
2015-01-15 15:47:39 +02:00
|
|
|
protected:
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(NumSelectHdl_Impl, void *);
|
|
|
|
DECL_LINK(DoubleClickHdl_Impl, void *);
|
2015-01-15 15:47:39 +02:00
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
SvxBulletPickTabPage(vcl::Window* pParent,
|
2009-10-31 00:36:06 +01:00
|
|
|
const SfxItemSet& rSet);
|
2015-01-15 15:47:39 +02:00
|
|
|
virtual ~SvxBulletPickTabPage();
|
|
|
|
virtual void dispose() SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-04-17 13:51:33 +01:00
|
|
|
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
|
2014-06-11 14:34:46 +02:00
|
|
|
const SfxItemSet* rAttrSet);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
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) SAL_OVERRIDE;
|
2014-06-10 17:23:12 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
|
2014-06-11 10:35:24 +02:00
|
|
|
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-09-26 08:30:52 +02:00
|
|
|
void SetCharFmtName(const OUString& rName){sBulletCharFmtName = rName;}
|
2014-05-19 10:02:29 +02:00
|
|
|
virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#define NUM_VALUSET_COUNT 16
|
2012-08-06 10:51:21 +03:00
|
|
|
|
|
|
|
/// TabPage for complete numeration
|
2009-10-31 00:36:06 +01:00
|
|
|
class SvxNumPickTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<SvxNumValueSet> m_pExamplesVS;
|
2013-09-26 08:30:52 +02:00
|
|
|
OUString sNumCharFmtName;
|
|
|
|
OUString sBulletCharFmtName;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2012-04-15 17:50:21 +02:00
|
|
|
SvxNumSettingsArr_Impl aNumSettingsArrays[NUM_VALUSET_COUNT]; // is initialized with the five formats
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
SvxNumRule* pActNum;
|
|
|
|
SvxNumRule* pSaveNum;
|
2011-01-14 12:41:27 +01:00
|
|
|
sal_uInt16 nActNumLvl;
|
|
|
|
sal_uInt16 nNumItemId;
|
2014-04-16 11:39:08 +02:00
|
|
|
bool bModified : 1;
|
|
|
|
bool bPreset : 1;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
|
2015-01-15 15:47:39 +02:00
|
|
|
protected:
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(NumSelectHdl_Impl, void *);
|
|
|
|
DECL_LINK(DoubleClickHdl_Impl, void *);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-01-15 15:47:39 +02:00
|
|
|
public:
|
|
|
|
SvxNumPickTabPage(vcl::Window* pParent,
|
2009-10-31 00:36:06 +01:00
|
|
|
const SfxItemSet& rSet);
|
2015-01-15 15:47:39 +02:00
|
|
|
virtual ~SvxNumPickTabPage();
|
|
|
|
virtual void dispose() SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-04-17 13:51:33 +01:00
|
|
|
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
|
2014-06-11 14:34:46 +02:00
|
|
|
const SfxItemSet* rAttrSet);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
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) SAL_OVERRIDE;
|
2014-06-10 17:23:12 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
|
2014-06-11 10:35:24 +02:00
|
|
|
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-09-26 08:30:52 +02:00
|
|
|
void SetCharFmtNames(const OUString& rCharName, const OUString& rBulName)
|
2009-10-31 00:36:06 +01:00
|
|
|
{ sNumCharFmtName = rCharName;
|
|
|
|
sBulletCharFmtName = rBulName;}
|
2014-05-19 10:02:29 +02:00
|
|
|
virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-02-25 18:04:51 +01:00
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
class SvxBitmapPickTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<FixedText> m_pErrorText;
|
|
|
|
VclPtr<SvxBmpNumValueSet> m_pExamplesVS;
|
2015-05-06 15:14:20 +05:30
|
|
|
VclPtr<Button> m_pBtBrowseFile;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-09-20 09:49:51 +02:00
|
|
|
std::vector<OUString> aGrfNames;
|
2013-09-26 08:30:52 +02:00
|
|
|
OUString sNumCharFmtName;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
SvxNumRule* pActNum;
|
|
|
|
SvxNumRule* pSaveNum;
|
2011-01-14 12:41:27 +01:00
|
|
|
sal_uInt16 nActNumLvl;
|
|
|
|
sal_uInt16 nNumItemId;
|
2009-10-31 00:36:06 +01:00
|
|
|
SfxMapUnit eCoreUnit;
|
2014-04-16 11:39:08 +02:00
|
|
|
bool bModified : 1;
|
|
|
|
bool bPreset : 1;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-01-15 15:47:39 +02:00
|
|
|
protected:
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(NumSelectHdl_Impl, void *);
|
|
|
|
DECL_LINK(DoubleClickHdl_Impl, void *);
|
|
|
|
DECL_LINK(LinkBmpHdl_Impl, void *);
|
2015-05-06 15:14:20 +05:30
|
|
|
DECL_LINK(ClickAddBrowseHdl_Impl, void * );
|
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-01-15 15:47:39 +02:00
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
SvxBitmapPickTabPage(vcl::Window* pParent,
|
2009-10-31 00:36:06 +01:00
|
|
|
const SfxItemSet& rSet);
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~SvxBitmapPickTabPage();
|
2015-01-15 15:47:39 +02:00
|
|
|
virtual void dispose() SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-04-17 13:51:33 +01:00
|
|
|
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
|
2014-06-11 14:34:46 +02:00
|
|
|
const SfxItemSet* rAttrSet);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
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) SAL_OVERRIDE;
|
2014-06-10 17:23:12 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
|
2014-06-11 10:35:24 +02:00
|
|
|
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-09-26 08:30:52 +02:00
|
|
|
void SetNumCharFmtName(const OUString& rName){sNumCharFmtName = rName;}
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2014-02-25 18:04:51 +01:00
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
class SvxNumOptionsTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<ListBox> m_pLevelLB;
|
|
|
|
|
|
|
|
VclPtr<ListBox> m_pFmtLB;
|
|
|
|
|
|
|
|
VclPtr<FixedText> m_pSeparatorFT;
|
|
|
|
VclPtr<FixedText> m_pPrefixFT;
|
|
|
|
VclPtr<Edit> m_pPrefixED;
|
|
|
|
VclPtr<FixedText> m_pSuffixFT;
|
|
|
|
VclPtr<Edit> m_pSuffixED;
|
|
|
|
VclPtr<FixedText> m_pCharFmtFT;
|
|
|
|
VclPtr<ListBox> m_pCharFmtLB;
|
|
|
|
VclPtr<FixedText> m_pBulColorFT;
|
|
|
|
VclPtr<ColorListBox> m_pBulColLB;
|
|
|
|
VclPtr<FixedText> m_pBulRelSizeFT;
|
|
|
|
VclPtr<MetricField> m_pBulRelSizeMF;
|
|
|
|
VclPtr<FixedText> m_pAllLevelFT;
|
|
|
|
VclPtr<NumericField> m_pAllLevelNF;
|
|
|
|
VclPtr<FixedText> m_pStartFT;
|
|
|
|
VclPtr<NumericField> m_pStartED;
|
|
|
|
VclPtr<FixedText> m_pBulletFT;
|
|
|
|
VclPtr<PushButton> m_pBulletPB;
|
|
|
|
VclPtr<FixedText> m_pAlignFT;
|
|
|
|
VclPtr<ListBox> m_pAlignLB;
|
|
|
|
VclPtr<FixedText> m_pBitmapFT;
|
|
|
|
VclPtr<MenuButton> m_pBitmapMB;
|
2013-01-03 14:43:49 +00:00
|
|
|
sal_uInt16 m_nGalleryId;
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<FixedText> m_pWidthFT;
|
|
|
|
VclPtr<MetricField> m_pWidthMF;
|
|
|
|
VclPtr<FixedText> m_pHeightFT;
|
|
|
|
VclPtr<MetricField> m_pHeightMF;
|
|
|
|
VclPtr<CheckBox> m_pRatioCB;
|
|
|
|
VclPtr<FixedText> m_pOrientFT;
|
|
|
|
VclPtr<ListBox> m_pOrientLB;
|
2013-01-03 14:43:49 +00:00
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<VclContainer> m_pAllLevelsFrame;
|
|
|
|
VclPtr<CheckBox> m_pSameLevelCB;
|
2013-01-03 14:43:49 +00:00
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<SvxNumberingPreview> m_pPreviewWIN;
|
2013-01-03 14:43:49 +00:00
|
|
|
|
|
|
|
OUString m_sNumCharFmtName;
|
|
|
|
OUString m_sBulletCharFmtName;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
Timer aInvalidateTimer;
|
|
|
|
|
|
|
|
SvxNumRule* pActNum;
|
|
|
|
SvxNumRule* pSaveNum;
|
|
|
|
|
|
|
|
Size aInitSize[SVX_MAX_NUM];
|
|
|
|
|
2014-04-16 11:39:08 +02:00
|
|
|
bool bLastWidthModified : 1;
|
|
|
|
bool bModified : 1;
|
|
|
|
bool bPreset : 1;
|
|
|
|
bool bAutomaticCharStyles: 1;
|
|
|
|
bool bHTMLMode : 1;
|
|
|
|
bool bMenuButtonInitialized : 1;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-09-20 09:49:51 +02:00
|
|
|
std::vector<OUString> aGrfNames;
|
2014-09-16 10:09:58 +02:00
|
|
|
vcl::Font aActBulletFont;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2011-01-14 12:41:27 +01:00
|
|
|
sal_uInt8 nBullet;
|
|
|
|
sal_uInt16 nActNumLvl;
|
|
|
|
sal_uInt16 nNumItemId;
|
2009-10-31 00:36:06 +01:00
|
|
|
SfxMapUnit eCoreUnit;
|
|
|
|
|
|
|
|
void InitControls();
|
2012-08-06 10:51:21 +03:00
|
|
|
/** To switch between the numbering type
|
|
|
|
0 - Number;
|
|
|
|
1 - Bullet;
|
|
|
|
2 - Bitmap; */
|
2014-04-16 11:39:08 +02:00
|
|
|
void SwitchNumberType( sal_uInt8 nType, bool bBmp = false );
|
2009-10-31 00:36:06 +01:00
|
|
|
void CheckForStartValue_Impl(sal_uInt16 nNumberingType);
|
|
|
|
|
|
|
|
DECL_LINK( NumberTypeSelectHdl_Impl, ListBox * );
|
|
|
|
DECL_LINK( LevelHdl_Impl, ListBox * );
|
2015-05-07 23:03:22 +02:00
|
|
|
DECL_LINK_TYPED(PopupActivateHdl_Impl, Menu *, bool);
|
2015-04-30 16:58:33 +02:00
|
|
|
DECL_LINK_TYPED( GraphicHdl_Impl, MenuButton *, void );
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(BulletHdl_Impl, void *);
|
2009-10-31 00:36:06 +01:00
|
|
|
DECL_LINK( SizeHdl_Impl, MetricField * );
|
|
|
|
DECL_LINK( RatioHdl_Impl, CheckBox * );
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(CharFmtHdl_Impl, void *);
|
2009-10-31 00:36:06 +01:00
|
|
|
DECL_LINK( EditModifyHdl_Impl, Edit * );
|
|
|
|
DECL_LINK( AllLevelHdl_Impl, NumericField * );
|
|
|
|
DECL_LINK( OrientHdl_Impl, ListBox * );
|
|
|
|
DECL_LINK( SameLevelHdl_Impl, CheckBox * );
|
|
|
|
DECL_LINK( BulColorHdl_Impl, ColorListBox* );
|
|
|
|
DECL_LINK( BulRelSizeHdl_Impl, MetricField *);
|
2015-05-04 17:28:40 +02:00
|
|
|
DECL_LINK_TYPED(PreviewInvalidateHdl_Impl, Timer *, void);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
DECL_STATIC_LINK( SvxNumOptionsTabPage, GraphicArrivedHdl_Impl, SvxBrushItem* );
|
|
|
|
|
2015-01-15 15:47:39 +02:00
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
SvxNumOptionsTabPage(vcl::Window* pParent,
|
2009-10-31 00:36:06 +01:00
|
|
|
const SfxItemSet& rSet);
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~SvxNumOptionsTabPage();
|
2015-01-15 15:47:39 +02:00
|
|
|
virtual void dispose() SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-04-17 13:51:33 +01:00
|
|
|
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
|
2014-06-11 14:34:46 +02:00
|
|
|
const SfxItemSet* rAttrSet);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
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) SAL_OVERRIDE;
|
2014-06-10 17:23:12 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
|
2014-06-11 10:35:24 +02:00
|
|
|
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-01-03 14:43:49 +00:00
|
|
|
void SetCharFmts(const OUString& rNumName, const OUString& rBulletName)
|
|
|
|
{
|
|
|
|
m_sNumCharFmtName = rNumName;
|
|
|
|
m_sBulletCharFmtName = rBulletName;
|
|
|
|
}
|
2009-10-31 00:36:06 +01:00
|
|
|
void SetMetric(FieldUnit eSet);
|
|
|
|
|
2013-01-03 14:43:49 +00:00
|
|
|
ListBox& GetCharFmtListBox() {return *m_pCharFmtLB;}
|
2014-04-16 11:39:08 +02:00
|
|
|
void SetModified(bool bRepaint = true);
|
2014-05-19 10:02:29 +02:00
|
|
|
virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
|
2012-06-29 20:00:16 +02:00
|
|
|
|
|
|
|
/** Get the numberings provided by the i18n framework (CTL, Asian, ...) and
|
|
|
|
add them to the listbox. Extended numbering schemes present in the
|
|
|
|
resource and already in the listbox but not offered by the i18n
|
|
|
|
framework per configuration are removed.
|
|
|
|
|
|
|
|
@param nDoNotRemove
|
|
|
|
A value that shall not be removed, i.e. the ugly 0x88
|
|
|
|
(SVX_NUM_BITMAP|0x80)
|
|
|
|
Pass ::std::numeric_limits<sal_uInt16>::max() if there is no such
|
|
|
|
restriction.
|
|
|
|
*/
|
|
|
|
static void GetI18nNumbering( ListBox& rFmtLB, sal_uInt16 nDoNotRemove );
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2014-02-25 18:04:51 +01:00
|
|
|
|
2009-10-31 00:36:06 +01:00
|
|
|
class SvxNumPositionTabPage : public SfxTabPage
|
|
|
|
{
|
|
|
|
using TabPage::ActivatePage;
|
|
|
|
using TabPage::DeactivatePage;
|
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<ListBox> m_pLevelLB;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
// former set of controls shown for numbering rules containing list level
|
|
|
|
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<FixedText> m_pDistBorderFT;
|
|
|
|
VclPtr<MetricField> m_pDistBorderMF;
|
|
|
|
VclPtr<CheckBox> m_pRelativeCB;
|
|
|
|
VclPtr<FixedText> m_pIndentFT;
|
|
|
|
VclPtr<MetricField> m_pIndentMF;
|
|
|
|
VclPtr<FixedText> m_pDistNumFT;
|
|
|
|
VclPtr<MetricField> m_pDistNumMF;
|
|
|
|
VclPtr<FixedText> m_pAlignFT;
|
|
|
|
VclPtr<ListBox> m_pAlignLB;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
// new set of controls shown for numbering rules containing list level
|
|
|
|
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<FixedText> m_pLabelFollowedByFT;
|
|
|
|
VclPtr<ListBox> m_pLabelFollowedByLB;
|
|
|
|
VclPtr<FixedText> m_pListtabFT;
|
|
|
|
VclPtr<MetricField> m_pListtabMF;
|
|
|
|
VclPtr<FixedText> m_pAlign2FT;
|
|
|
|
VclPtr<ListBox> m_pAlign2LB;
|
|
|
|
VclPtr<FixedText> m_pAlignedAtFT;
|
|
|
|
VclPtr<MetricField> m_pAlignedAtMF;
|
|
|
|
VclPtr<FixedText> m_pIndentAtFT;
|
|
|
|
VclPtr<MetricField> m_pIndentAtMF;
|
2013-01-02 17:15:54 +00:00
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<PushButton> m_pStandardPB;
|
2013-01-02 17:15:54 +00:00
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
VclPtr<SvxNumberingPreview> m_pPreviewWIN;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
SvxNumRule* pActNum;
|
|
|
|
SvxNumRule* pSaveNum;
|
|
|
|
|
2011-01-14 12:41:27 +01:00
|
|
|
sal_uInt16 nActNumLvl;
|
|
|
|
sal_uInt16 nNumItemId;
|
2009-10-31 00:36:06 +01:00
|
|
|
SfxMapUnit eCoreUnit;
|
|
|
|
|
2014-04-16 11:39:08 +02:00
|
|
|
bool bModified : 1;
|
|
|
|
bool bPreset : 1;
|
|
|
|
bool bInInintControl : 1; // workaround for Modify-error, is said to be corrected from 391 on
|
2009-10-31 00:36:06 +01:00
|
|
|
bool bLabelAlignmentPosAndSpaceModeActive;
|
|
|
|
|
|
|
|
void InitControls();
|
|
|
|
|
|
|
|
DECL_LINK( LevelHdl_Impl, ListBox * );
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(EditModifyHdl_Impl, void *);
|
2009-10-31 00:36:06 +01:00
|
|
|
DECL_LINK( DistanceHdl_Impl, MetricField * );
|
|
|
|
DECL_LINK( RelativeHdl_Impl, CheckBox * );
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(StandardHdl_Impl, void *);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
void InitPosAndSpaceMode();
|
|
|
|
void ShowControlsDependingOnPosAndSpaceMode();
|
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(LabelFollowedByHdl_Impl, void *);
|
2009-10-31 00:36:06 +01:00
|
|
|
DECL_LINK( ListtabPosHdl_Impl, MetricField* );
|
|
|
|
DECL_LINK( AlignAtHdl_Impl, MetricField* );
|
|
|
|
DECL_LINK( IndentAtHdl_Impl, MetricField* );
|
|
|
|
|
|
|
|
public:
|
2014-09-23 11:20:40 +02:00
|
|
|
SvxNumPositionTabPage(vcl::Window* pParent,
|
2009-10-31 00:36:06 +01:00
|
|
|
const SfxItemSet& rSet);
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~SvxNumPositionTabPage();
|
2015-01-15 15:47:39 +02:00
|
|
|
virtual void dispose() SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
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) SAL_OVERRIDE;
|
2014-06-10 17:23:12 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
|
2014-06-11 10:35:24 +02:00
|
|
|
virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-04-17 13:51:33 +01:00
|
|
|
static VclPtr<SfxTabPage> Create( vcl::Window* pParent,
|
2014-06-11 14:34:46 +02:00
|
|
|
const SfxItemSet* rAttrSet);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
void SetMetric(FieldUnit eSet);
|
2014-04-16 11:39:08 +02:00
|
|
|
void SetModified(bool bRepaint = true);
|
2014-05-19 10:02:29 +02:00
|
|
|
virtual void PageCreated(const SfxAllItemSet& aSet) SAL_OVERRIDE;
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-27 12:45:03 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|