2010-10-14 08:30:41 +02: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 .
|
|
|
|
*/
|
2014-04-18 22:44:05 +02:00
|
|
|
#ifndef INCLUDED_SW_SOURCE_CORE_UIBASE_INC_NUM_HXX
|
|
|
|
#define INCLUDED_SW_SOURCE_CORE_UIBASE_INC_NUM_HXX
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
#include <sfx2/tabdlg.hxx>
|
|
|
|
#include <vcl/menubtn.hxx>
|
|
|
|
#include <vcl/field.hxx>
|
|
|
|
#include <vcl/fixed.hxx>
|
2012-12-03 12:01:18 +00:00
|
|
|
#include <vcl/layout.hxx>
|
2000-09-18 16:15:01 +00:00
|
|
|
#include <svtools/stdctrl.hxx>
|
|
|
|
#include <vcl/button.hxx>
|
|
|
|
#include <vcl/lstbox.hxx>
|
|
|
|
#include <vcl/edit.hxx>
|
|
|
|
#include <svx/stddlg.hxx>
|
|
|
|
#include <numprevw.hxx>
|
|
|
|
#include "numrule.hxx"
|
|
|
|
|
|
|
|
class SwWrtShell;
|
|
|
|
class SvxBrushItem;
|
|
|
|
class SwOutlineTabDialog;
|
|
|
|
|
|
|
|
struct SwBmpItemInfo
|
|
|
|
{
|
|
|
|
SvxBrushItem* pBrushItem;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nItemId;
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define NUM_PAGETYPE_BULLET 0
|
|
|
|
#define NUM_PAGETYPE_SINGLENUM 1
|
|
|
|
#define NUM_PAGETYPE_NUM 2
|
|
|
|
#define NUM_PAGETYPE_BMP 3
|
|
|
|
#define PAGETYPE_USER_START 10
|
|
|
|
|
|
|
|
class SwNumPositionTabPage : public SfxTabPage
|
|
|
|
{
|
2012-12-03 12:01:18 +00:00
|
|
|
ListBox* m_pLevelLB;
|
|
|
|
VclFrame* m_pPositionFrame;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2008-03-05 16:23:02 +00:00
|
|
|
// former set of controls shown for numbering rules containing list level
|
|
|
|
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
|
2012-12-03 12:01:18 +00:00
|
|
|
FixedText* m_pDistBorderFT;
|
|
|
|
MetricField* m_pDistBorderMF;
|
|
|
|
CheckBox* m_pRelativeCB;
|
|
|
|
FixedText* m_pIndentFT;
|
|
|
|
MetricField* m_pIndentMF;
|
|
|
|
FixedText* m_pDistNumFT;
|
|
|
|
MetricField* m_pDistNumMF;
|
|
|
|
FixedText* m_pAlignFT;
|
|
|
|
ListBox* m_pAlignLB;
|
2008-03-05 16:23:02 +00:00
|
|
|
|
|
|
|
// new set of controls shown for numbering rules containing list level
|
|
|
|
// attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
|
2012-12-03 12:01:18 +00:00
|
|
|
FixedText* m_pLabelFollowedByFT;
|
|
|
|
ListBox* m_pLabelFollowedByLB;
|
|
|
|
FixedText* m_pListtabFT;
|
|
|
|
MetricField* m_pListtabMF;
|
|
|
|
FixedText* m_pAlign2FT;
|
|
|
|
ListBox* m_pAlign2LB;
|
|
|
|
FixedText* m_pAlignedAtFT;
|
|
|
|
MetricField* m_pAlignedAtMF;
|
|
|
|
FixedText* m_pIndentAtFT;
|
|
|
|
MetricField* m_pIndentAtMF;
|
2008-03-05 16:23:02 +00:00
|
|
|
|
2012-12-03 12:01:18 +00:00
|
|
|
PushButton* m_pStandardPB;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2012-12-03 12:01:18 +00:00
|
|
|
NumberingPreview* m_pPreviewWIN;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
SwNumRule* pActNum;
|
|
|
|
SwNumRule* pSaveNum;
|
|
|
|
SwWrtShell* pWrtSh;
|
|
|
|
|
|
|
|
SwOutlineTabDialog* pOutlineDlg;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_uInt16 nActNumLvl;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool bModified : 1;
|
|
|
|
sal_Bool bPreset : 1;
|
2011-04-21 18:12:29 +02:00
|
|
|
sal_Bool bInInintControl : 1; // work around modify-error; should be resolved from 391 on
|
2008-03-05 16:23:02 +00:00
|
|
|
bool bLabelAlignmentPosAndSpaceModeActive;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
void InitControls();
|
|
|
|
|
|
|
|
DECL_LINK( LevelHdl, ListBox * );
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(EditModifyHdl, void *);
|
2000-09-18 16:15:01 +00:00
|
|
|
DECL_LINK( DistanceHdl, MetricField * );
|
|
|
|
DECL_LINK( RelativeHdl, CheckBox * );
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(StandardHdl, void *);
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2008-03-05 16:23:02 +00:00
|
|
|
void InitPosAndSpaceMode();
|
|
|
|
void ShowControlsDependingOnPosAndSpaceMode();
|
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(LabelFollowedByHdl_Impl, void *);
|
2008-03-05 16:23:02 +00:00
|
|
|
DECL_LINK( ListtabPosHdl_Impl, MetricField* );
|
|
|
|
DECL_LINK( AlignAtHdl_Impl, MetricField* );
|
|
|
|
DECL_LINK( IndentAtHdl_Impl, MetricField* );
|
|
|
|
|
2008-05-06 14:23:51 +00:00
|
|
|
using SfxTabPage::ActivatePage;
|
|
|
|
using SfxTabPage::DeactivatePage;
|
2007-09-27 11:05:39 +00:00
|
|
|
|
2007-10-22 14:20:57 +00:00
|
|
|
public:
|
|
|
|
|
2007-09-27 11:05:39 +00:00
|
|
|
SwNumPositionTabPage(Window* pParent,
|
2000-09-18 16:15:01 +00:00
|
|
|
const SfxItemSet& rSet);
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~SwNumPositionTabPage();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual void ActivatePage(const SfxItemSet& rSet) SAL_OVERRIDE;
|
|
|
|
virtual int DeactivatePage(SfxItemSet *pSet) SAL_OVERRIDE;
|
|
|
|
virtual bool FillItemSet( SfxItemSet& rSet ) SAL_OVERRIDE;
|
|
|
|
virtual void Reset( const SfxItemSet& rSet ) SAL_OVERRIDE;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
static SfxTabPage* Create( Window* pParent,
|
|
|
|
const SfxItemSet& rAttrSet);
|
|
|
|
|
|
|
|
void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;}
|
|
|
|
void SetWrtShell(SwWrtShell* pSh);
|
2011-11-24 00:52:00 +01:00
|
|
|
#ifdef DBG_UTIL
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetModified(sal_Bool bRepaint = sal_True);
|
2000-09-18 16:15:01 +00:00
|
|
|
#else
|
2011-01-17 15:06:54 +01:00
|
|
|
void SetModified(sal_Bool bRepaint = sal_True)
|
|
|
|
{ bModified = sal_True;
|
2000-09-18 16:15:01 +00:00
|
|
|
if(bRepaint)
|
|
|
|
{
|
2012-12-03 13:36:07 +00:00
|
|
|
m_pPreviewWIN->SetLevel(nActNumLvl);
|
|
|
|
m_pPreviewWIN->Invalidate();
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
class SwSvxNumBulletTabDialog : public SfxTabDialog
|
|
|
|
{
|
|
|
|
SwWrtShell& rWrtSh;
|
2013-01-07 13:50:57 +00:00
|
|
|
sal_uInt16 m_nSingleNumPageId;
|
|
|
|
sal_uInt16 m_nBulletPageId;
|
|
|
|
sal_uInt16 m_nOptionsPageId;
|
|
|
|
sal_uInt16 m_nPositionPageId;
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
protected:
|
2014-03-27 18:12:18 +01:00
|
|
|
virtual short Ok() SAL_OVERRIDE;
|
|
|
|
virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage) SAL_OVERRIDE;
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(RemoveNumberingHdl, void *);
|
2000-09-18 16:15:01 +00:00
|
|
|
public:
|
|
|
|
SwSvxNumBulletTabDialog(Window* pParent,
|
|
|
|
const SfxItemSet* pSwItemSet,
|
|
|
|
SwWrtShell &);
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~SwSvxNumBulletTabDialog();
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
2014-04-18 22:44:05 +02:00
|
|
|
#endif // INCLUDED_SW_SOURCE_CORE_UIBASE_INC_NUM_HXX
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|