27 #include <rtl/ustrbuf.hxx>
34 #include <drawdoc.hxx>
54 #include <strings.hrc>
77 #define cTABSTYLE u't'
78 #define cCELLSTYLE u'b'
90 class SwImplShellAction
93 std::unique_ptr<CurrShell> pCurrSh;
95 explicit SwImplShellAction(
SwDoc& rDoc );
96 ~SwImplShellAction() COVERITY_NOEXCEPT_FALSE;
97 SwImplShellAction(
const SwImplShellAction&) =
delete;
98 SwImplShellAction& operator=(
const SwImplShellAction&) =
delete;
103 SwImplShellAction::SwImplShellAction(
SwDoc& rDoc )
117 SwImplShellAction::~SwImplShellAction() COVERITY_NOEXCEPT_FALSE
129 const OUString& rName,
131 bool bCreate =
true )
134 if (!rName.isEmpty())
137 if( !pFormat && rName ==
SwResId(STR_POOLCHR_STANDARD))
143 if( !pFormat && bCreate )
154 pStyle->SetPhysical(
true);
157 pStyle->PresetParent( p->
GetName() );
159 pStyle->PresetParent( OUString() );
162 pStyle->SetPhysical(
false);
170 const OUString& rName,
172 bool bCreate =
true )
176 if (!rName.isEmpty())
179 if( !pColl && bCreate )
191 pStyle->SetPhysical(
true);
195 pStyle->PresetParent( OUString() );
198 pStyle->PresetFollow(rNext.
GetName());
201 pStyle->SetPhysical(
false);
208 const OUString& rName,
210 bool bCreate =
true )
213 if( !rName.isEmpty() )
216 if( !pFormat && bCreate )
228 pStyle->SetPhysical(
true);
232 pStyle->PresetParent( OUString() );
235 pStyle->SetPhysical(
false);
242 const OUString& rName,
244 bool bCreate =
true )
248 if (!rName.isEmpty())
251 if( !pDesc && bCreate )
263 pStyle->SetPhysical(
true);
267 pStyle->PresetParent( OUString() );
270 pStyle->SetPhysical(
false);
276 const OUString& rName,
278 bool bCreate =
true )
282 if (!rName.isEmpty())
285 if( !pRule && bCreate )
297 pStyle->SetPhysical(
true);
298 pStyle->PresetParent( OUString() );
301 pStyle->SetPhysical(
false);
310 if (!rName.isEmpty())
313 if (!pFormat && bCreate)
324 pStyle->SetPhysical(
true);
325 pStyle->PresetParent(OUString());
328 pStyle->SetPhysical(
false);
341 for (
size_t i=0;
i < rTableStyles.
size() && !pFormat; ++
i)
344 for (
size_t nBoxFormat=0; nBoxFormat < aTableTemplateMap.size() && !pFormat; ++nBoxFormat)
346 const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
348 OUString sBoxFormatName;
351 if (rName == sBoxFormatName)
352 pFormat = &rBoxFormat;
371 std::u16string_view rName)
378 case SfxStyleFamily::Char:
381 case SfxStyleFamily::Para:
384 case SfxStyleFamily::Frame:
387 case SfxStyleFamily::Page:
390 case SfxStyleFamily::Pseudo:
393 case SfxStyleFamily::Table:
396 case SfxStyleFamily::Cell:
403 const OUString sSrch = OUStringChar(cStyle) + rName;
405 UniqueHash::const_iterator it = maUnique.find(sSrch);
406 if (it != maUnique.end())
408 sal_uInt32 nIdx = it->second;
409 assert (nIdx < maImpl.size());
410 assert (maImpl.size() == maUnique.size());
420 for (
size_t i = 0;
i < maImpl.size();
i++)
421 maUnique[maImpl[
i]] =
i;
422 assert (maImpl.size() == maUnique.size());
426 std::u16string_view rName)
428 sal_uInt32 nTmpPos = FindName( eFam, rName );
429 if( nTmpPos < maImpl.size() )
430 maImpl.erase(maImpl.begin() + nTmpPos);
434 assert (maImpl.size() == maUnique.size());
440 const OUString
aStr = OUStringChar(cChar) + rStr;
442 UniqueHash::const_iterator it = maUnique.find(aStr);
443 if (it != maUnique.end())
446 maUnique[aStr] =
static_cast<sal_uInt32
>(maImpl.size());
447 maImpl.push_back(aStr);
456 pCharFormat(nullptr),
458 pFrameFormat(nullptr),
461 pTableFormat(nullptr),
472 SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
473 SID_ATTR_PAGE, SID_ATTR_PAGE_EXT1,
474 SID_ATTR_PAGE_HEADERSET, SID_ATTR_PAGE_FOOTERSET,
475 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_MODEL,
478 SID_COLOR_TABLE, SID_PATTERN_LIST,
479 SID_SWREGISTER_COLLECTION, SID_SWREGISTER_COLLECTION,
480 SID_ATTR_PARA_PAGENUM, SID_ATTR_PARA_PAGENUM,
481 SID_SWREGISTER_MODE, SID_SWREGISTER_MODE,
482 SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
483 SID_ATTR_NUMBERING_RULE, SID_ATTR_NUMBERING_RULE,
484 SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE,
513 case SfxStyleFamily::Char:
521 case SfxStyleFamily::Para:
529 case SfxStyleFamily::Pseudo:
558 case SfxStyleFamily::Char:
563 case SfxStyleFamily::Para:
568 case SfxStyleFamily::Pseudo:
589 case SfxStyleFamily::Char:
598 case SfxStyleFamily::Para:
607 case SfxStyleFamily::Frame:
616 case SfxStyleFamily::Page:
627 case SfxStyleFamily::Pseudo:
638 case SfxStyleFamily::Table:
641 if ( pTableAutoFormat )
671 case SfxStyleFamily::Char:
673 bRet = pFormat && pFormat->
IsHidden( );
676 case SfxStyleFamily::Para:
678 bRet = pFormat && pFormat->
IsHidden( );
681 case SfxStyleFamily::Frame:
683 bRet = pFormat && pFormat->
IsHidden( );
686 case SfxStyleFamily::Page:
689 bRet = pPgDesc && pPgDesc->
IsHidden( );
692 case SfxStyleFamily::Pseudo:
698 case SfxStyleFamily::Table:
701 bRet = pTableAutoFormat && pTableAutoFormat->
IsHidden( );
720 case SfxStyleFamily::Char:
725 case SfxStyleFamily::Para:
730 case SfxStyleFamily::Frame:
735 case SfxStyleFamily::Page:
736 case SfxStyleFamily::Pseudo:
739 static const OUString
sEmpty;
780 case SfxStyleFamily::Para :
781 case SfxStyleFamily::Page :
return true;
782 case SfxStyleFamily::Frame:
783 case SfxStyleFamily::Char :
784 case SfxStyleFamily::Pseudo:
return false;
786 OSL_ENSURE(
false,
"unknown style family");
797 case SfxStyleFamily::Char :
798 case SfxStyleFamily::Para :
799 case SfxStyleFamily::Frame: bRet =
true;
811 case SfxStyleFamily::Para :
812 case SfxStyleFamily::Char :
813 case SfxStyleFamily::Frame: bRet =
true;
825 const OUString sPlus(
" + ");
826 if ( SfxStyleFamily::Page ==
nFamily )
832 OUStringBuffer aDesc;
838 switch ( pItem->Which() )
841 case SID_ATTR_PAGE_SIZE:
842 case SID_ATTR_PAGE_MAXSIZE:
843 case SID_ATTR_PAGE_PAPERBIN:
844 case SID_ATTR_BORDER_INNER:
848 OUString aItemPresentation;
851 *pItem, eUnit, aItemPresentation, aIntlWrapper ) )
853 if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
855 aDesc.append(aItemPresentation);
861 return aDesc.makeStringAndClear();
864 if ( SfxStyleFamily::Frame ==
nFamily || SfxStyleFamily::Para ==
nFamily || SfxStyleFamily::Char ==
nFamily )
870 OUStringBuffer aDesc;
874 bool bHasWesternFontPrefix =
false;
875 bool bHasCJKFontPrefix =
false;
876 bool bHasCTLFontPrefix =
false;
889 switch ( pItem->Which() )
891 case SID_ATTR_AUTO_STYLE_UPDATE:
896 OUString aItemPresentation;
899 *pItem, eUnit, aItemPresentation, aIntlWrapper ) )
901 bool bIsDefault =
false;
902 switch ( pItem->Which() )
907 bIsDefault = (drawing::FillStyle_SOLID == eFillStyle);
913 bIsDefault = (drawing::FillStyle_GRADIENT == eFillStyle);
919 bIsDefault = (drawing::FillStyle_HATCH == eFillStyle);
925 bIsDefault = (drawing::FillStyle_BITMAP == eFillStyle);
931 bIsDefault = !bUseFloatTransparence;
937 bIsDefault = bUseFloatTransparence;
941 case SID_ATTR_PARA_PAGENUM:
942 sPageNum = aItemPresentation;
944 case SID_ATTR_PARA_MODEL:
945 sModel = aItemPresentation;
948 sBreak = aItemPresentation;
957 if(!bHasCJKFontPrefix)
959 aItemPresentation =
SwResId(STR_CJK_FONT) + aItemPresentation;
960 bHasCJKFontPrefix =
true;
970 if(!bHasCTLFontPrefix)
972 aItemPresentation =
SwResId(STR_CTL_FONT) + aItemPresentation;
973 bHasCTLFontPrefix =
true;
981 if(!bHasWesternFontPrefix)
983 aItemPresentation =
SwResId(STR_WESTERN_FONT) + aItemPresentation;
984 bHasWesternFontPrefix =
true;
992 if ( !aDesc.isEmpty() && !aItemPresentation.isEmpty() )
994 aDesc.append(aItemPresentation);
1002 if (!sModel.isEmpty())
1004 if (!aDesc.isEmpty())
1005 aDesc.append(sPlus);
1006 aDesc.append(
SwResId(STR_PAGEBREAK)).append(sPlus).append(sModel);
1007 if (sPageNum !=
"0")
1009 aDesc.append(sPlus).append(
SwResId(STR_PAGEOFFSET)).append(sPageNum);
1012 else if (!sBreak.isEmpty())
1014 if (!aDesc.isEmpty())
1015 aDesc.append(sPlus);
1016 aDesc.append(sBreak);
1018 return aDesc.makeStringAndClear();
1021 if( SfxStyleFamily::Pseudo ==
nFamily )
1032 if( rStr.isEmpty() )
1046 case SfxStyleFamily::Char :
1060 case SfxStyleFamily::Para :
1062 OSL_ENSURE(
pColl,
"Collection missing!");
1074 case SfxStyleFamily::Frame:
1088 case SfxStyleFamily::Page :
1089 OSL_ENSURE(
pDesc,
"PageDesc missing!");
1096 const OUString aOldName(aPageDesc.
GetName());
1109 case SfxStyleFamily::Pseudo:
1110 OSL_ENSURE(
pNumRule,
"NumRule missing!");
1116 if (!aOldName.isEmpty())
1118 if ( aOldName != rStr &&
1140 OSL_ENSURE(
false,
"unknown style family");
1157 SwFormat* pFormat =
nullptr, *pParent =
nullptr;
1160 case SfxStyleFamily::Char :
1161 OSL_ENSURE(
pCharFormat,
"SwCharFormat missing!" );
1162 if(
nullptr != ( pFormat =
pCharFormat ) && !rStr.isEmpty() )
1166 case SfxStyleFamily::Para :
1167 OSL_ENSURE(
pColl,
"Collection missing!");
1168 if(
nullptr != ( pFormat =
pColl ) && !rStr.isEmpty() )
1172 case SfxStyleFamily::Frame:
1174 if(
nullptr != ( pFormat =
pFrameFormat ) && !rStr.isEmpty() )
1178 case SfxStyleFamily::Page:
1179 case SfxStyleFamily::Pseudo:
1182 OSL_ENSURE(
false,
"unknown style family");
1190 SwImplShellAction aTmp( rDoc );
1211 SwImplShellAction aTmpSh( rDoc );
1214 case SfxStyleFamily::Para :
1216 OSL_ENSURE(
pColl,
"Collection missing!");
1227 case SfxStyleFamily::Page :
1229 OSL_ENSURE(
pDesc,
"PageDesc missing!");
1232 const SwPageDesc* pFollowDesc = !rStr.isEmpty()
1246 case SfxStyleFamily::Char:
1247 case SfxStyleFamily::Frame:
1248 case SfxStyleFamily::Pseudo:
1251 OSL_ENSURE(
false,
"unknown style family");
1262 std::vector<SfxItemSet const*> sets;
1264 while (
SfxItemSet const*
const pParent = sets.back()->GetParent())
1266 sets.push_back(pParent);
1269 std::unique_ptr<SfxItemSet> pRet(
new SfxItemSet(*sets.back()));
1271 for (
auto iter = sets.rbegin(); iter != sets.rend(); ++iter)
1280 if (SfxStyleFamily::Page ==
nFamily || SfxStyleFamily::Pseudo ==
nFamily || SfxStyleFamily::Table ==
nFamily)
1282 SAL_WARN(
"sw.ui",
"GetItemSetForPreview not implemented for page or number or table style");
1283 return std::unique_ptr<SfxItemSet>();
1291 std::unique_ptr<SfxItemSet> pRet;
1307 case SfxStyleFamily::Char:
1309 case SfxStyleFamily::Para:
1311 case SfxStyleFamily::Frame:
1328 case SfxStyleFamily::Char:
1329 case SfxStyleFamily::Para:
1330 case SfxStyleFamily::Frame:
1338 aBoxInfo.
SetValid( SvxBoxInfoItemValidFlags::DISABLE );
1340 if(
nFamily == SfxStyleFamily::Char )
1349 else if (
nFamily == SfxStyleFamily::Para )
1351 OSL_ENSURE(
pColl,
"Where's Collection");
1382 case SfxStyleFamily::Page :
1390 OSL_ENSURE(
pDesc,
"No PageDescriptor");
1395 case SfxStyleFamily::Pseudo:
1397 OSL_ENSURE(
pNumRule,
"No NumRule");
1404 OSL_ENSURE(
false,
"unknown style family");
1414 if (
nFamily != SfxStyleFamily::Para )
1419 OSL_ENSURE(
pColl,
"<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - missing paragraph style");
1424 "<SwDocStyleSheet::MergeIndentAttrsOfListStyle(..)> - list level indents are applicable at paragraph style, but no list style found. Serious defect." );
1426 if (sNumRule.isEmpty())
1445 const bool bResetIndentAttrsAtParagraphStyle )
1451 SwImplShellAction aTmpSh( rDoc );
1453 OSL_ENSURE( &rSet != &
aCoreSet,
"SetItemSet with own Set is not allowed" );
1463 std::unique_ptr<SwPageDesc> pNewDsc;
1464 size_t nPgDscPos = 0;
1468 case SfxStyleFamily::Char :
1475 case SfxStyleFamily::Para :
1477 OSL_ENSURE(
pColl,
"Where's Collection");
1479 if(SfxItemState::SET == rSet.
GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,
false, &pAutoUpdate ))
1486 reinterpret_cast<const SfxPoolItem**>(&pCondItem) ))
1487 pCondItem =
nullptr;
1496 const OUString sStyle = pCondItem->
GetStyle(
i );
1497 if (sStyle.isEmpty())
1526 const OUString sStyle = pCondItem->
GetStyle(
i );
1527 if (sStyle.isEmpty())
1533 pCmds[
i ].nCnd, pCmds[
i ].nSubCond ) );
1540 if ( bResetIndentAttrsAtParagraphStyle &&
1556 if (!sNumRule.isEmpty())
1576 case SfxStyleSearchBits::SwText:
1579 case SfxStyleSearchBits::SwChapter:
1582 case SfxStyleSearchBits::SwList:
1585 case SfxStyleSearchBits::SwIndex:
1588 case SfxStyleSearchBits::SwExtra:
1591 case SfxStyleSearchBits::SwHtml:
1599 case SfxStyleFamily::Frame:
1603 if(SfxItemState::SET == rSet.
GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,
false, &pAutoUpdate ))
1611 case SfxStyleFamily::Page :
1613 OSL_ENSURE(
pDesc,
"Where's PageDescriptor");
1623 pFormat = &pNewDsc->GetMaster();
1628 case SfxStyleFamily::Pseudo:
1630 OSL_ENSURE(
pNumRule,
"Where's NumRule");
1636 switch( rSet.
GetItemState( SID_ATTR_NUMBERING_RULE,
false, &pItem ))
1638 case SfxItemState::SET:
1647 case SfxItemState::DONTCARE:
1663 OSL_ENSURE(
false,
"unknown style family");
1666 if( pFormat && rSet.
Count())
1685 if(SfxStyleFamily::Frame ==
nFamily)
1726 case SfxStyleFamily::Char:
1729 for(
size_t n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1735 case SfxStyleFamily::Para:
1738 for(
size_t n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1744 case SfxStyleFamily::Frame:
1747 for(
size_t n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1754 case SfxStyleFamily::Page:
1763 case SfxStyleFamily::Pseudo:
1766 for(
size_t n = 0, nCnt = rTable.
size();
n < nCnt; ++
n )
1778 return std::find( rArr.begin(), rArr.end(), p ) != rArr.end();
1786 case SfxStyleFamily::Char:
1788 std::deque<sal_uInt16> aDelArr;
1790 for( n = 0, nCnt = rTable.
size(); n < nCnt; ++n )
1793 aDelArr.push_front( n );
1795 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1800 case SfxStyleFamily::Para :
1802 std::deque<sal_uInt16> aDelArr;
1804 for( n = 0, nCnt = rTable.
size(); n < nCnt; ++n )
1807 aDelArr.push_front( n );
1809 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1814 case SfxStyleFamily::Frame:
1816 std::deque<SwFrameFormat*> aDelArr;
1818 for( n = 0, nCnt = rTable.
size(); n < nCnt; ++n )
1821 aDelArr.push_front( rTable[ n ] );
1823 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1828 case SfxStyleFamily::Page:
1830 std::deque<size_t> aDelArr;
1834 aDelArr.push_front( n );
1836 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1841 case SfxStyleFamily::Pseudo:
1843 std::deque<SwNumRule*> aDelArr;
1845 for( n = 0, nCnt = rTable.
size(); n < nCnt; ++n )
1848 aDelArr.push_front( rTable[ n ] );
1850 for( n = 0, nCnt = aDelArr.size(); n < nCnt; ++n )
1860 FillStyleType const eFType, std::unique_ptr<SfxItemSet> *
const o_ppFlatSet)
1867 bool bDeleteInfo =
false;
1869 std::vector<void*> aDelArr;
1874 case SfxStyleFamily::Char:
1888 if( !bCreate && !pFormat )
1902 case SfxStyleFamily::Para:
1927 case SfxStyleFamily::Frame:
1938 if( !bCreate && !pFormat )
1947 case SfxStyleFamily::Page:
1950 if( bFillOnlyInfo && !
pDesc )
1960 nPoolId =
pDesc->GetPoolFormatId();
1962 if(
pDesc->GetPoolHlpFileId() != UCHAR_MAX )
1969 SetMask( (
USER_FMT & nPoolId) ? SfxStyleSearchBits::UserDefined : SfxStyleSearchBits::Auto );
1976 case SfxStyleFamily::Pseudo:
1998 SetMask( (
USER_FMT & nPoolId) ? SfxStyleSearchBits::UserDefined : SfxStyleSearchBits::Auto );
2006 case SfxStyleFamily::Table:
2012 case SfxStyleFamily::Cell:
2019 if( SfxStyleFamily::Char ==
nFamily ||
2020 SfxStyleFamily::Para ==
nFamily ||
2021 SfxStyleFamily::Frame ==
nFamily )
2028 _nMask |= SfxStyleSearchBits::ReadOnly;
2030 _nMask |= SfxStyleSearchBits::UserDefined;
2034 case COLL_TEXT_BITS: _nMask |= SfxStyleSearchBits::SwText;
break;
2035 case COLL_DOC_BITS : _nMask |= SfxStyleSearchBits::SwChapter;
break;
2039 case COLL_HTML_BITS: _nMask |= SfxStyleSearchBits::SwHtml;
break;
2044 OSL_ENSURE(
bPhysical,
"Format not found" );
2053 _nMask |= SfxStyleSearchBits::SwCondColl;
2064 if( bDeleteInfo && bFillOnlyInfo )
2081 case SfxStyleFamily::Char :
2089 case SfxStyleFamily::Para :
2094 if(
nMask & SfxStyleSearchBits::SwCondColl )
2101 case SfxStyleFamily::Frame:
2108 case SfxStyleFamily::Page :
2116 case SfxStyleFamily::Pseudo:
2125 pRule->SetAutoRule(
false );
2126 if(
aName.isEmpty() )
2135 case SfxStyleFamily::Table:
2136 if (
aName.isEmpty())
2183 OSL_ENSURE(
pNumRule,
"Where is the NumRule");
2207 default:
nFamily = SfxStyleFamily::Char;
break;
2209 aName = rName.copy(1);
2247 case SfxStyleFamily::Char : pMod =
pCharFormat;
break;
2248 case SfxStyleFamily::Para : pMod =
pColl;
break;
2249 case SfxStyleFamily::Frame: pMod =
pFrameFormat;
break;
2250 case SfxStyleFamily::Page : pMod =
pDesc;
break;
2252 case SfxStyleFamily::Pseudo:
2255 case SfxStyleFamily::Table:
2259 OSL_ENSURE(
false,
"unknown style family");
2262 return rDoc.
IsUsed( *pMod );
2273 sal_uInt16 nPoolId = 0;
2274 unsigned char nFileId = UCHAR_MAX;
2276 rFile =
"swrhlppi.hlp";
2278 const SwFormat* pTmpFormat =
nullptr;
2281 case SfxStyleFamily::Char :
2291 case SfxStyleFamily::Para:
2301 case SfxStyleFamily::Frame:
2311 case SfxStyleFamily::Page:
2319 nId =
pDesc->GetPoolHelpId();
2320 nFileId =
pDesc->GetPoolHlpFileId();
2321 nPoolId =
pDesc->GetPoolFormatId();
2324 case SfxStyleFamily::Pseudo:
2338 OSL_ENSURE(
false,
"unknown style family");
2349 if( UCHAR_MAX != nFileId )
2372 sal_uInt16 nHId =
static_cast< sal_uInt16
>(nId);
2377 case SfxStyleFamily::Char : pTmpFormat =
pCharFormat;
break;
2378 case SfxStyleFamily::Para : pTmpFormat =
pColl;
break;
2379 case SfxStyleFamily::Frame: pTmpFormat =
pFrameFormat;
break;
2380 case SfxStyleFamily::Page :
2385 case SfxStyleFamily::Pseudo:
2391 OSL_ENSURE(
false,
"unknown style family");
2431 OSL_ENSURE(
false ,
"Create in SW-Stylesheet-Pool not possible" );
2438 OSL_ENSURE(
false,
"Create in SW-Stylesheet-Pool not possible" );
2444 return std::make_unique<SwStyleSheetIterator>(*
this, eFam, _nMask);
2457 bool bBroadcast =
true;
2458 SwImplShellAction aTmpSh( rDoc );
2462 case SfxStyleFamily::Char:
2469 case SfxStyleFamily::Para:
2476 case SfxStyleFamily::Frame:
2483 case SfxStyleFamily::Page :
2489 case SfxStyleFamily::Pseudo:
2497 case SfxStyleFamily::Table:
2504 OSL_ENSURE(
false,
"unknown style family");
2513 const OUString &rStyle,
const OUString &rParent )
2515 SwFormat* pFormat =
nullptr, *pParent =
nullptr;
2518 case SfxStyleFamily::Char :
2519 if(
nullptr != ( pFormat =
lcl_FindCharFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
2523 case SfxStyleFamily::Para :
2524 if(
nullptr != ( pFormat =
lcl_FindParaFormat( rDoc, rStyle ) ) && !rParent.isEmpty() )
2528 case SfxStyleFamily::Frame:
2533 case SfxStyleFamily::Page:
2534 case SfxStyleFamily::Pseudo:
2538 OSL_ENSURE(
false,
"unknown style family");
2546 SwImplShellAction aTmpSh( rDoc );
2555 if( SfxStyleFamily::Para == eFam )
2556 mxStyleSheet->PresetFollow( static_cast<SwTextFormatColl*>(pFormat)->
2557 GetNextTextFormatColl().GetName() );
2575 if( SfxStyleSearchBits::All == nSMask )
2576 nSMask = SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined | SfxStyleSearchBits::Used;
2578 nSMask &= SfxStyleSearchBits::Used | SfxStyleSearchBits::UserDefined |
2579 SfxStyleSearchBits::SwCondColl | SfxStyleSearchBits::SwHtml;
2580 if( nSMask == SfxStyleSearchBits::Auto )
2581 nSMask = SfxStyleSearchBits::SwHtml;
2584 const bool bSearchUsed = ( n != SfxStyleSearchBits::All && n & SfxStyleSearchBits::Used );
2596 case SfxStyleFamily::Char:
2600 case SfxStyleFamily::Para:
2604 case SfxStyleFamily::Frame:
2608 case SfxStyleFamily::Page:
2612 case SfxStyleFamily::Pseudo:
2617 (( nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2625 case SfxStyleFamily::Table:
2626 case SfxStyleFamily::Cell:
2629 OSL_ENSURE(
false,
"unknown style family");
2634 if( pMod && !bSearchUsed )
2636 const sal_uInt16
nId = SfxStyleFamily::Page == eFam
2637 ?
static_cast<const SwPageDesc*
>(pMod)->GetPoolFormatId()
2638 :
static_cast<const SwFormat*
>(pMod)->GetPoolFormatId();
2640 if( ( nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2699 bool bSearchHidden(
nMask & SfxStyleSearchBits::Hidden );
2700 bool bOnlyHidden =
nMask == SfxStyleSearchBits::Hidden;
2703 bool bAll = ( nSrchMask & SfxStyleSearchBits::AllVisible ) == SfxStyleSearchBits::AllVisible;
2709 for(
size_t i = 0;
i < nArrLen;
i++ )
2713 const bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(*pFormat));
2717 if ( nSrchMask == SfxStyleSearchBits::Hidden && !pFormat->
IsHidden( ) )
2726 if( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2744 ?
SwResId(STR_POOLCHR_STANDARD)
2753 bIsSearchUsed, bSearchHidden, bOnlyHidden,
2767 bIsSearchUsed, bSearchHidden, bOnlyHidden,
2768 SwGetPoolIdFromName::ChrFmt,
cCHAR);
2779 if( SfxStyleSearchBits::AllVisible == ( nSMask & SfxStyleSearchBits::AllVisible ) )
2780 nSMask = SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined |
2781 SfxStyleSearchBits::Used;
2783 nSMask &= SfxStyleSearchBits::Used | SfxStyleSearchBits::UserDefined |
2784 SfxStyleSearchBits::SwCondColl | SfxStyleSearchBits::SwHtml;
2785 if( nSMask == SfxStyleSearchBits::Auto )
2786 nSMask = SfxStyleSearchBits::SwHtml;
2790 for(
size_t i = 0;
i < nArrLen;
i++ )
2794 const bool bUsed = bOrganizer || rDoc.
IsUsed(*pColl);
2798 if ( nSMask == SfxStyleSearchBits::Hidden && !pColl->
IsHidden( ) )
2801 if( !(bIsSearchUsed && bUsed ))
2805 if (tmpMask == SfxStyleSearchBits::UserDefined)
2809 else if (tmpMask == SfxStyleSearchBits::SwText)
2813 else if (tmpMask == SfxStyleSearchBits::SwChapter)
2817 else if (tmpMask == SfxStyleSearchBits::SwList)
2821 else if (tmpMask == SfxStyleSearchBits::SwIndex)
2825 else if (tmpMask == SfxStyleSearchBits::SwExtra)
2829 else if (tmpMask == (SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined)
2830 || tmpMask == SfxStyleSearchBits::SwHtml)
2837 bool bContinue =
true;
2861 else if (tmpMask == SfxStyleSearchBits::SwCondColl)
2875 bAll = ( nSMask & SfxStyleSearchBits::AllVisible ) == SfxStyleSearchBits::AllVisible;
2876 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwText )
2879 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwChapter )
2882 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwList )
2885 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwIndex )
2888 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwExtra )
2891 if ( bAll || (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwCondColl )
2893 if( !bIsSearchUsed ||
2899 (nSMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::SwHtml ||
2900 (nSMask & ~SfxStyleSearchBits::Used) ==
2901 (SfxStyleSearchBits::SwHtml | SfxStyleSearchBits::UserDefined) )
2904 bIsSearchUsed, bSearchHidden, bOnlyHidden, SwGetPoolIdFromName::TxtColl,
cPARA ) ;
2908 static sal_uInt16 aPoolIds[] = {
2926 sal_uInt16* pPoolIds = aPoolIds;
2945 for(
size_t i = 0;
i < nArrLen;
i++ )
2949 bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.
IsUsed(*pFormat));
2953 if ( nSrchMask == SfxStyleSearchBits::Hidden && !pFormat->
IsHidden( ) )
2959 if( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2981 for(
size_t i = 0;
i < nCount; ++
i)
2985 bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.
IsUsed(rDesc));
2988 if ( ( !bSearchHidden && rDesc.
IsHidden() ) ||
2989 ( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
2996 if ( nSrchMask == SfxStyleSearchBits::Hidden && !rDesc.
IsHidden( ) )
3010 for(
size_t i = 0;
i < rNumTable.
size(); ++
i)
3015 if ( nSrchMask == SfxStyleSearchBits::Hidden && !rRule.
IsHidden( ) )
3018 bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(rRule));
3021 if( ( !bSearchHidden && rRule.
IsHidden() ) ||
3022 ( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
3041 for(
size_t i = 0;
i < rTableStyles.
size(); ++
i)
3045 bool bUsed = bIsSearchUsed && (bOrganizer || rDoc.
IsUsed(rTableStyle));
3048 if(nSrchMask == SfxStyleSearchBits::Hidden && !rTableStyle.
IsHidden())
3051 if( (!bSearchHidden && rTableStyle.
IsHidden() ) ||
3052 ( (nSrchMask & ~SfxStyleSearchBits::Used) == SfxStyleSearchBits::UserDefined
3070 for(
size_t i = 0;
i < rTableStyles.
size(); ++
i)
3073 for(
size_t nBoxFormat = 0; nBoxFormat < aTableTemplateMap.size(); ++nBoxFormat)
3075 const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
3077 OUString sBoxFormatName;
3085 for(
size_t i = 0;
i < rCellStyles.
size(); ++
i)
3138 bool bTestUsed,
bool bTestHidden,
bool bOnlyHidden,
3143 for (
const auto &
i : rList)
3145 bool bHidden =
false;
3153 bHidden = pFormat && pFormat->
IsHidden( );
3160 bHidden = pFormat && pFormat->
IsHidden( );
3167 bHidden = pFormat && pFormat->
IsHidden( );
3174 bHidden = pPgDesc && pPgDesc->
IsHidden( );
3180 bUsed = pRule && rDoc.
IsUsed(*pRule);
3181 bHidden = pRule && pRule->
IsHidden( );
3185 OSL_ENSURE(
false,
"unknown PoolFormat-Id" );
3188 bool bMatchHidden = ( bTestHidden && ( bHidden || !bOnlyHidden ) ) || ( !bTestHidden && ( !bHidden || bUsed ) );
3189 if ( ( !bTestUsed && bMatchHidden ) || ( bTestUsed && bUsed ) )
3214 if( pStyleSheetHint &&
3215 SfxHintId::StyleSheetErased == pStyleSheetHint->
GetId() )
virtual SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)=0
SwTextFormatColl * MakeTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
Create the FormatCollections.
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
virtual OUString GetDescription(MapUnit eUnit) override
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
virtual bool IsUsed() const override
bool IsUsed(const sw::BroadcastingModify &) const
const sal_uInt16 COLL_LISTS_BITS
SwStyleSheetIterator(SwDocStyleSheetPool &rBase, SfxStyleFamily eFam, SfxStyleSearchBits n)
int GetAssignedOutlineStyleLevel() const
const sal_uInt16 COLL_DOC_BITS
void PresetNameAndFamily(const OUString &rName)
virtual SfxItemSet & GetItemSet() override
Represents the style of a paragraph.
virtual bool GetPresentation(const SfxPoolItem &rItem, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
static const std::vector< OUString > & GetListsUINameArray()
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
static SwTextFormatColl * lcl_FindParaFormat(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
virtual bool IsPoolFormatUsed(sal_uInt16 nId) const =0
SwCharFormat * FindCharFormatByName(std::u16string_view rName) const
void SetDefDist(sal_uInt16 nNew)
SwTableAutoFormat * GetTableFormat()
virtual void SetHelpId(const OUString &r, sal_uLong nId) override
SAL_DLLPRIVATE bool FillStyleSheet(FillStyleType eFType, std::unique_ptr< SfxItemSet > *o_ppFlatSet=nullptr)
void SetNumRule(const SwNumRule &rRule)
SwCharFormat * MakeCharFormat(const OUString &rFormatName, SwCharFormat *pDerivedFrom, bool bBroadcast=false)
SwDocShell * GetDocShell()
static bool lcl_Contains(const std::vector< void * > &rArr, const void *p)
virtual SfxStyleSheetBase * First() override
static const std::vector< OUString > & GetFrameFormatUINameArray()
const sal_uInt16 COLL_GET_RANGE_BITS
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
void DelPageDesc(const OUString &rName, bool bBroadcast=false)
void SetMinDist(bool bNew)
static const std::vector< OUString > & GetHTMLUINameArray()
virtual void SetModified()=0
Must be called manually at changes of format.
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
SwFrameFormat * MakeFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom, bool bBroadcast=false, bool bAuto=true)
virtual bool HasParentSupport() const override
OUString MakeParagraphStyleListString() const
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat IDs.
void InvalidateIterator()
virtual SwUndoId EndUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Closes undo block.
const sal_uInt16 COLL_HTML_BITS
void GetGrabBagItem(css::uno::Any &rVal) const
void GetGrabBagItem(css::uno::Any &rVal) const
virtual bool SetFollow(const OUString &rStr) override
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true)
sal_uInt16 GetPoolParent(sal_uInt16 nId)
Query defined parent of a POOL-ID Returns 0 if standard USHRT_MAX if no parent the parent in all othe...
bool IsPoolUserFormat(sal_uInt16 nId)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
virtual bool HasFollowSupport() const override
virtual const OUString & GetFollow() const override
const OUString & GetName() const
virtual void SetHidden(bool bHidden) override
void RenameFormat(SwFormat &rFormat, const OUString &sNewName, bool bBroadcast=false)
sal_uInt16 GetPoolHelpId() const
Query and set Help-IDs for document styles.
OUString GetUniqueNumRuleName(const OUString *pChkStr=nullptr, bool bAutoNum=true) const
bool IsCJKFontEnabled() const
void SetHidden(bool bValue)
IDocumentUndoRedo & GetIDocumentUndoRedo()
static void lcl_SaveStyles(SfxStyleFamily nFamily, std::vector< void * > &rArr, SwDoc &rDoc)
static SwCharFormat * lcl_FindCharFormat(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
bool IsCTLFontEnabled() const
SfxStyleFamily GetFamily() const
virtual SwFrameFormat * GetFrameFormatFromPool(sal_uInt16 nId)=0
Return required automatic format.
const SwCellStyleTable & GetCellStyles() const
bool HasWriterListeners() const
SwFrameFormat * FindFrameFormatByName(std::u16string_view rName) const
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
SfxStyleSearchBits GetMask() const
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
static const std::vector< OUString > & GetPageDescUINameArray()
static const CommandStruct * GetCmds()
static std::unique_ptr< SfxItemSet > lcl_SwFormatToFlatItemSet(SwFormat const *const pFormat)
void SetFollow(const SwPageDesc *pNew)
XPatternListRef GetPatternList() const
const OUString & GetName() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
SwDocStyleSheetPool(SwDoc &, bool bOrganizer)
void DelCharFormat(size_t nFormat, bool bBroadcast=false)
Delete the formats.
Used by the UI to modify the document model.
static const std::vector< OUString > & GetDocUINameArray()
SfxStyleFamily nSearchFamily
SfxStyleSheetBase * GetStyleSheet() const
virtual SfxStyleSheetBase * operator[](sal_Int32 nIdx) override
void SetGrabBagItem(const css::uno::Any &rVal)
const SfxPoolItem * NextItem()
bool IsAssignedToListLevelOfOutlineStyle() const
void SetMask(SfxStyleSearchBits mask)
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
const SwCharFormat * GetDfltCharFormat() const
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
const OUString & GetName() const
virtual ~SwDocStyleSheetPool() override
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat-Id.
rtl::Reference< SwDocStyleSheet > mxIterSheet
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
void SetNextTextFormatColl(SwTextFormatColl &rNext)
Inline implementations.
virtual SfxStyleSheetBase * Next() override
SwFrameFormat * GetFrameFormat()
#define FN_PARAM_FTN_INFO
virtual bool SetFollow(const OUString &)
virtual void DoUndo(bool const bDoUndo)=0
Enable/Disable Undo.
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
virtual const OUString & GetParent() const override
const SwPageDesc * GetPageDesc()
const sal_uInt16 COLL_REGISTER_BITS
bool RenameNumRule(const OUString &aOldName, const OUString &aNewName, bool bBroadcast=false)
virtual bool IsEnableSetModified() const =0
SwCharFormat * GetCharFormat()
const sal_uInt16 POOLGRP_NOCOLLID
POOLCOLL-IDs: +-—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+ !User! Range ! 0 ! Offset ! +-—+—+...
virtual bool DoesUndo() const =0
Is Undo enabled?
virtual bool SetParent(SfxStyleFamily eFam, const OUString &rStyle, const OUString &rParent) override
void PresetParent(const OUString &rName)
static void lcl_DeleteInfoStyles(SfxStyleFamily nFamily, std::vector< void * > const &rArr, SwDoc &rDoc)
virtual SwPageDesc * GetPageDescFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return required automatic page style.
SvxNumRule MakeSvxNumRule() const
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
SwPageDesc * FindPageDesc(const OUString &rName, size_t *pPos=nullptr) const
SwTableAutoFormat * pTableFormat
void DelTextFormatColl(size_t nFormat, bool bBroadcast=false)
static SwTableAutoFormat * lcl_FindTableStyle(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
Table of Contents - heading.
virtual SfxStyleSheetBase * Find(const OUString &rStr) override
SwNumRule * FindNumRulePtr(const OUString &rName) const
virtual sal_uLong GetHelpId(OUString &rFile) override
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SwBoxAutoFormat * GetBoxFormat(std::u16string_view sName) const
If found returns a ptr to a BoxFormat. If not found returns nullptr.
virtual SwUndoId StartUndo(SwUndoId const eUndoId, SwRewriter const *const pRewriter)=0
Opens undo block.
const SfxItemSet * GetParent() const
void InsertCondition(const SwCollCondition &rCond)
void Broadcast(const SfxHint &rHint)
constexpr TypedWhichId< XFillTransparenceItem > XATTR_FILLTRANSPARENCE(XATTR_FILL_FIRST+5)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
virtual bool IsPoolPageDescUsed(sal_uInt16 nId) const =0
static SwFrameFormat * lcl_FindFrameFormat(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
size_t SetDocPattern(const OUString &rPatternName)
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
virtual bool IsModified() const =0
Changes of document?
const SwPageDesc & GetPageDesc(const size_t i) const
SwEditShell const * GetEditShell() const
static const SwNumRule * lcl_FindNumRule(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
virtual bool IsPoolTextCollUsed(sal_uInt16 nId) const =0
Check whether this "auto-collection" is used in document.
void SetGrabBagItem(const css::uno::Any &rVal)
void AppendStyleList(const std::vector< OUString > &rLst, bool bUsed, bool bTestHidden, bool bOnlyHidden, SwGetPoolIdFromName nSection, char cType)
SfxStyleSheetBasePool * m_pPool
SwPageDesc * MakePageDesc(const OUString &rName, const SwPageDesc *pCpy=nullptr, bool bRegardLanguage=true, bool bBroadcast=false)
virtual void Notify(SfxBroadcaster &, const SfxHint &) override
const OUString & GetValue() const
SwCharFormat * pCharFormat
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
virtual SfxStyleSheetBase * Create(const OUString &, SfxStyleFamily, SfxStyleSearchBits nMask) override
size_t GetPageDescCnt() const
XGradientListRef GetGradientList() const
void MergeIndentAttrsOfListStyle(SfxItemSet &rSet)
new method for paragraph styles to merge indent attributes of applied list style into the given item ...
void AddRule(SwUndoArg eWhat, const OUString &rWith)
virtual bool SetParent(const OUString &rStr) override
const SwNumRule * pNumRule
virtual std::unique_ptr< SfxItemSet > GetItemSetForPreview() override
#define COND_COMMAND_COUNT
IDocumentState const & getIDocumentState() const
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
void ChgPageDesc(const OUString &rName, const SwPageDesc &)
const SwNumRule * GetNumRule()
void PresetFollow(const OUString &rName)
sal_uInt8 GetPoolHlpFileId() const
const OUString * GetDocPattern(size_t nPos) const
void SetItemSet(const SfxItemSet &rSet, const bool bResetIndentAttrsAtParagraphStyle=false)
add optional parameter , default value false, which indicates that...
SwDocStyleSheet(SwDoc &rDoc, SwDocStyleSheetPool &rPool)
void DeleteAssignmentToListLevelOfOutlineStyle()
void SetHidden(bool const bValue)
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
OUString SwResId(const char *pId)
sal_uInt16 GetWhichByPos(sal_uInt16 nPos) const
void SetPhysical(bool bPhys)
SAL_DLLPRIVATE void Create()
Make empty shell a real StyleSheet (Core).
virtual SfxStyleSheetBase & Make(const OUString &, SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All) override
std::unique_ptr< SwTableAutoFormat > DelTableStyle(const OUString &rName, bool bBroadcast=false)
void ResetAttrAtFormat(const sal_uInt16 nWhichId, SwFormat &rChangedFormat)
void push_back(Value const &rVal)
SwFrameFormat * pFrameFormat
const SwPageDesc * GetFollow() const
const SwFrameFormat * GetDfltFrameFormat() const
void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
FillStyleType
Fill StyleSheet with data.
void SetParent(const SfxItemSet *pNew)
virtual SwNumRule * GetNumRuleFromPool(sal_uInt16 nId)=0
constexpr sal_uInt16 RES_UNKNOWNATR_BEGIN(RES_BOXATR_END)
sal_uInt16 GetCurPos() const
SvtBroadcaster & GetNotifier()
static const std::vector< OUString > & GetNumRuleUINameArray()
virtual ~SwStyleSheetIterator() override
SwTableAutoFormatTable & GetTableStyles()
Return the available table styles.
const SwNumFormat & Get(sal_uInt16 i) const
const sal_uInt16 USER_FMT
POLLCOLL-groups:
constexpr sal_uInt16 RES_FRMATR_END(131)
SwTextFormatColl * FindTextFormatCollByName(std::u16string_view rName) const
static const SwPageDesc * lcl_FindPageDesc(SwDoc &rDoc, const OUString &rName, SwDocStyleSheet *pStyle=nullptr, bool bCreate=true)
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static const std::vector< OUString > & GetHTMLChrFormatUINameArray()
constexpr sal_uInt16 RES_UNKNOWNATR_END(152)
void CopyPageDesc(const SwPageDesc &rSrcDesc, SwPageDesc &rDstDesc, bool bCopyPoolIds=true)
Copy the complete PageDesc - beyond document and "deep"! Optionally copying of PoolFormatId, -HlpId can be prevented.
void Broadcast(const SfxHint &rHint)
static const std::vector< OUString > & GetChrFormatUINameArray()
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
static const std::vector< OUString > & GetExtraUINameArray()
XHatchListRef GetHatchList() const
SwTextFormatColl * GetCollection()
const SwCharFormats * GetCharFormats() const
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
bool AreListLevelIndentsApplicable() const
SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode()
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
static const SwBoxAutoFormat * lcl_FindCellStyle(SwDoc &rDoc, std::u16string_view rName, SwDocStyleSheet *pStyle)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All) override
#define SAL_WARN_IF(condition, area, stream)
virtual bool IsHidden() const override
const SwTextFormatColls * GetTextFormatColls() const
virtual ~SwDocStyleSheet() override
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
SwConditionTextFormatColl * MakeCondTextFormatColl(const OUString &rFormatName, SwTextFormatColl *pDerivedFrom, bool bBroadcast=false)
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
rtl::Reference< SwDocStyleSheet > mxStyleSheet
const SwNumRuleTable & GetNumRuleTable() const
SfxStyleSheetIterator * GetCachedIterator()
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
static const std::vector< OUString > & GetRegisterUINameArray()
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
bool bOrganizer
Organizer.
void SetSvxRule(const SvxNumRule &, SwDoc *pDoc)
static const OUString & GetUIName(const OUString &rName, SwGetPoolIdFromName)
virtual bool HasClearParentSupport() const override
bool SetName(const OUString &rNewName)
sal_uInt16 MakeNumRule(const OUString &rName, const SwNumRule *pCpy=nullptr, bool bBroadcast=false, const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode=SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(158)
constexpr TypedWhichId< SvxLRSpaceItem > RES_LR_SPACE(91)
OUString GetStyle(sal_uInt16 nPos) const
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
constexpr sal_uInt16 RES_CHRATR_END(46)
void ChgFormat(SwFormat &rFormat, const SfxItemSet &rSet)
XBitmapListRef GetBitmapList() const
void DelFrameFormat(SwFrameFormat *pFormat, bool bBroadcast=false)
virtual sal_Int32 Count() override
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
virtual void SetEnableSetModified(bool bEnableSetModified)=0
void CheckForUniqueItemForLineFillNameOrIndex(SfxItemSet &rSet)
#define SAL_WARN(area, stream)
bool HasTableStyles() const
Counts table styles without triggering lazy-load of them.
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
const sal_uInt16 COLL_TEXT_BITS
XColorListRef GetColorList() const
bool DelNumRule(const OUString &rName, bool bBroadCast=false)
virtual bool SetName(const OUString &rNewName, bool bReindexNow=true) override
const SwFrameFormats * GetFrameFormats() const
bool IsInvalidItem(const SfxPoolItem *pItem)
void PreDelPageDesc(SwPageDesc const *pDel)
All descriptors whose Follow point to the to-be-deleted have to be adapted.
void StartAllAction()
For all views of this document.
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
IDocumentListsAccess const & getIDocumentListsAccess() const
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
virtual OUString GetUsedBy() override
static const std::vector< OUString > & GetTextUINameArray()
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
SfxStyleSheetBasePool * pBasePool
void RegisterToFormat(SwFormat &)
SwTableAutoFormat * MakeTableStyle(const OUString &rName, bool bBroadcast=false)
rtl::Reference< SwDocStyleSheet > mxStyleSheet
void InvalidateIterator()
const SfxPoolItem * GetCurItem() const
SwTextFormatColl & GetNextTextFormatColl() const
const sal_uInt16 COLL_EXTRA_BITS
virtual OUString GetDescription(MapUnit eMetric)
void ChgNumRuleFormats(const SwNumRule &rRule)
const SwBoxAutoFormat * pBoxFormat
virtual void ResetModified()=0
virtual void Remove(SfxStyleSheetBase *pStyle) override