34#include <svx/svxids.hrc>
38#include <svx/dialogs.hrc>
40#include <osl/diagnose.h>
46 const OUString *pTitle,
48 const OUString& sDefPage)
50 "modules/swriter/ui/paradialog.ui",
51 "ParagraphPropertiesDialog",
52 &rCoreSet, nullptr != pTitle)
54 , m_bDrawParaDlg(bDraw)
66 OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH),
"GetTabPageCreatorFunc fail!");
67 OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH),
"GetTabPageRangesFunc fail!");
68 AddTabPage(
"labelTP_PARA_STD", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH),
69 pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH) );
71 OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH),
"GetTabPageCreatorFunc fail!");
72 OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH),
"GetTabPageRangesFunc fail!");
73 AddTabPage(
"labelTP_PARA_ALIGN", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH),
74 pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH));
78 OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH),
"GetTabPageCreatorFunc fail!");
79 OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH),
"GetTabPageRangesFunc fail!");
80 AddTabPage(
"textflow", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH),
81 pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH));
89 OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN),
"GetTabPageCreatorFunc fail!");
90 OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN),
"GetTabPageRangesFunc fail!");
91 AddTabPage(
"labelTP_PARA_ASIAN", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN),
92 pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
101 OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR),
"GetTabPageCreatorFunc fail!");
102 OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR),
"GetTabPageRangesFunc fail!");
103 AddTabPage(
"labelTP_TABULATOR", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
127 AddTabPage(
"area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
128 AddTabPage(
"transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
136 OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ),
"GetTabPageCreatorFunc fail!");
137 OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ),
"GetTabPageRangesFunc fail!");
138 AddTabPage(
"labelTP_BORDER", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
141 if (!sDefPage.isEmpty())
155 if (rId ==
"labelTP_BORDER")
157 aSet.
Put (
SfxUInt16Item(SID_SWMODE_TYPE,
static_cast<sal_uInt16
>(SwBorderModes::PARA)));
160 else if (rId ==
"labelTP_PARA_STD")
169 aSet.
Put(
SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x0002|0x0004|0x0008|0x0010));
170 aSet.
Put(
SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, constTwips_0_5mm));
175 else if (rId ==
"labelTP_PARA_ALIGN")
179 aSet.
Put(
SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,
true));
183 else if (rId ==
"textflow")
190 aSet.
Put(
SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,
true));
194 else if (rId ==
"labelTP_DROPCAPS")
198 else if (rId ==
"labelTP_NUMPARA")
210 std::set<OUString> aNames;
213 aNames.insert(pBase->
GetName());
214 pBase = pPool->
Next();
216 aNames.erase(
SwResId(STR_POOLNUMRULE_NOLIST));
217 for (
const auto& rName : aNames)
226 else if (rId ==
"area")
229 <SID_COLOR_TABLE, SID_PATTERN_LIST,
230 SID_OFFER_IMPORT, SID_OFFER_IMPORT> aNew(*aSet.
GetPool());
239 else if (rId ==
"transparence")
Reference< XExecutableDialog > m_xDialog
SfxItemPool * GetPool() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
SfxStyleSheetBase * Next()
const OUString & GetName() const
void SetCurPageId(const OUString &rName)
void AddTabPage(const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
void RemoveTabPage(const OUString &rName)
SfxItemSet * GetInputSetImpl()
virtual void PageCreated(const SfxAllItemSet &aSet)
static SvxAbstractDialogFactory * Create()
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
static WhichRangesContainer GetRanges()
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
const SwRect & GetAnyCurRect(CurRectType eType, const Point *pPt=nullptr, const css::uno::Reference< css::embed::XEmbeddedObject > &=css::uno::Reference< css::embed::XEmbeddedObject >()) const
void PageCreated(const OUString &rId, SfxTabPage &rPage) override
virtual ~SwParaDlg() override
SwParaDlg(weld::Window *pParent, SwView &rVw, const SfxItemSet &, sal_uInt8 nDialogMode, const OUString *pCollName, bool bDraw=false, const OUString &sDefPage={})
static WhichRangesContainer GetRanges()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
void Width(tools::Long nNew)
Represents the style of a paragraph.
bool IsAssignedToListLevelOfOutlineStyle() const
SwWrtShell & GetWrtShell() const
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
SelectionType GetSelectionType() const
void append_text(const OUString &rStr)
@ PagePrt
Rect of current PrtArea of page.
FrameTypeFlags
values can be combined via logical or
bool IsAsianTypographyEnabled()
bool IsPrintLayoutExtension()
constexpr auto toTwips(N number, Length from)
OUString SwResId(TranslateId aId)
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)