/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * 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 .
*/
// Table borders cannot get any shade in Writer if (rId == "labelTP_BORDER")
{
aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
rPage.PageCreated(aSet);
} elseif (rId == "labelTP_PARA_STD")
{
aSet.Put(SfxUInt16Item(SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH, static_cast< sal_uInt16 >(rSh.GetAnyCurRect(CurRectType::PagePrt).Width()) ));
if (!m_bDrawParaDlg)
{ // See SvxStdParagraphTabPage::PageCreated: enable RegisterMode, AutoFirstLine, NegativeMode, ContextualMode
constexpr tools::Long constTwips_0_5mm = o3tl::toTwips(5, o3tl::Length::mm10);
aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x0002|0x0004|0x0008|0x0010));
aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, constTwips_0_5mm));
}
rPage.PageCreated(aSet);
} elseif (rId == "labelTP_PARA_ALIGN")
{ if (!m_bDrawParaDlg)
{
aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,true));
rPage.PageCreated(aSet);
}
} elseif (rId == "textflow")
{ // pagebreak only when the cursor is in the body-area and not in a table const FrameTypeFlags eType = rSh.GetFrameType(nullptr,true); if( !(FrameTypeFlags::BODY & eType) ||
rSh.GetSelectionType() & SelectionType::Table )
{
aSet.Put(SfxBoolItem(SID_DISABLE_SVXEXTPARAGRAPHTABPAGE_PAGEBREAK,true));
rPage.PageCreated(aSet);
}
} elseif (rId == "labelTP_DROPCAPS")
{ static_cast<SwDropCapsPage&>(rPage).SetFormat(false);
} elseif (rId == "labelTP_NUMPARA")
{
SwTextFormatColl* pTmpColl = rSh.GetCurTextFormatColl(); if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() )
{ static_cast<SwParagraphNumTabPage&>(rPage).DisableOutline() ;
}
static_cast<SwParagraphNumTabPage&>(rPage).EnableNewStart();
weld::ComboBox& rBox = static_cast<SwParagraphNumTabPage&>(rPage).GetStyleBox();
SfxStyleSheetBasePool* pPool = m_rView.GetDocShell()->GetStyleSheetPool(); const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Pseudo);
std::set<OUString> aNames; while(pBase)
{
aNames.insert(pBase->GetName());
pBase = pPool->Next();
}
aNames.erase(SwResId(STR_POOLNUMRULE_NOLIST)); for (constauto& rName : aNames)
rBox.append_text(rName);
} // inits for Area and Transparency TabPages // The selection attribute lists (XPropertyList derivates, e.g. XColorList for // the color table) need to be added as items (e.g. SvxColorTableItem) to make // these pages find the needed attributes for fill style suggestions. // These are added in SwDocStyleSheet::GetItemSet() for the SfxStyleFamily::Para on // demand, but could also be directly added from the DrawModel. elseif (rId == "area")
{
SfxItemSetFixed
<SID_COLOR_TABLE, SID_PATTERN_LIST,
SID_OFFER_IMPORT, SID_OFFER_IMPORT> aNew(*aSet.GetPool());
aNew.Put(*GetInputSetImpl());
// add flag for direct graphic content selection
aNew.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.