20 #include <config_wasm_strip.h>
24 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <com/sun/star/container/XNameAccess.hpp>
27 #include <com/sun/star/frame/XModel.hpp>
31 #include <osl/diagnose.h>
60 #include <drawdoc.hxx>
72 #include <uiitems.hxx>
81 #include <strings.hrc>
82 #include <AccessibilityCheck.hxx>
105 std::unique_ptr<SfxUInt16Item> pFamilyItem;
109 nActualFamily =
static_cast<SfxStyleFamily>(pFamilyItem->GetValue());
120 case SID_STYLE_APPLY:
138 case SID_STYLE_FAMILY1:
145 aName =
SwResId(STR_POOLCHR_STANDARD);
150 case SID_STYLE_FAMILY2:
166 nMask = SfxStyleSearchBits::SwHtml;
171 nMask = SfxStyleSearchBits::SwIndex ;
178 nMask = SfxStyleSearchBits::SwExtra;
180 nMask = SfxStyleSearchBits::SwText;
189 case SID_STYLE_FAMILY3:
204 case SID_STYLE_FAMILY4:
211 if( n < pShell->GetPageDescCnt() )
218 case SID_STYLE_FAMILY5:
227 case SID_STYLE_FAMILY6:
237 case SID_STYLE_WATERCAN:
244 case SID_STYLE_UPDATE_BY_EXAMPLE:
246 ? SfxStyleFamily::Frame != nActualFamily
247 : ( SfxStyleFamily::Frame == nActualFamily ||
248 SfxStyleFamily::Page == nActualFamily ||
250 (SfxStyleFamily::Table == nActualFamily && !pShell->
GetTableAutoFormat(aTableAutoFormat))) )
256 case SID_STYLE_NEW_BY_EXAMPLE:
258 ? SfxStyleFamily::Frame != nActualFamily
259 : SfxStyleFamily::Frame == nActualFamily) ||
261 (SfxStyleFamily::Table == nActualFamily && !pShell->
GetTableAutoFormat(aTableAutoFormat)) )
267 case SID_CLASSIFICATION_APPLY:
271 case SID_CLASSIFICATION_DIALOG:
284 OSL_FAIL(
"Invalid SlotId");
293 sal_uInt16 nSlot = rReq.
GetSlot();
300 if( pArgs && SfxItemState::SET == pArgs->
GetItemState( SID_STYLE_FAMILY,
307 if( SfxItemState::SET == pArgs->
GetItemState( SID_STYLE_NEW,
309 sName = static_cast<const SfxStringItem*>(pItem)->GetValue();
310 if( SfxItemState::SET == pArgs->
GetItemState( SID_STYLE_MASK,
312 nMask = static_cast<SfxStyleSearchBits>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
314 if( SfxItemState::SET == pArgs->
GetItemState( SID_STYLE_REFERENCE,
316 sParent = static_cast<const SfxStringItem*>(pItem)->GetValue();
321 Edit(rReq.
GetFrameWeld(), sName, sParent, nFamily, nMask,
true, OString(),
nullptr, &rReq, nSlot);
325 case SID_STYLE_APPLY:
336 if ( pFamilyItem && pNameItem )
338 uno::Reference< style::XStyleFamiliesSupplier >
xModel(
GetModel(), uno::UNO_QUERY);
341 uno::Reference< container::XNameAccess > xStyles;
342 uno::Reference< container::XNameAccess > xCont = xModel->getStyleFamilies();
343 xCont->getByName(pFamilyItem->GetValue()) >>= xStyles;
344 uno::Reference< beans::XPropertySet > xInfo;
345 xStyles->getByName( pNameItem->
GetValue() ) >>= xInfo;
347 xInfo->getPropertyValue(
"DisplayName") >>= aUIName;
348 if ( !aUIName.isEmpty() )
351 catch (
const uno::Exception&)
360 case SID_STYLE_DELETE:
363 case SID_STYLE_WATERCAN:
364 case SID_STYLE_FAMILY:
365 case SID_STYLE_UPDATE_BY_EXAMPLE:
366 case SID_STYLE_NEW_BY_EXAMPLE:
377 case SID_STYLE_NEW_BY_EXAMPLE:
389 case SID_STYLE_UPDATE_BY_EXAMPLE:
407 if( SfxItemState::SET == pArgs->
GetItemState(nSlot,
false, &pItem ))
408 aParam = static_cast<const SfxStringItem*>(pItem)->GetValue();
410 if( SfxItemState::SET == pArgs->
GetItemState(SID_STYLE_FAMILY,
412 nFamily = static_cast<SfxStyleFamily>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
414 if( SfxItemState::SET == pArgs->
GetItemState(SID_STYLE_FAMILYNAME,
false, &pItem ))
417 if(aFamily ==
"CharacterStyles")
418 nFamily = SfxStyleFamily::Char;
420 if(aFamily ==
"ParagraphStyles")
421 nFamily = SfxStyleFamily::Para;
423 if(aFamily ==
"PageStyles")
424 nFamily = SfxStyleFamily::Page;
426 if(aFamily ==
"FrameStyles")
427 nFamily = SfxStyleFamily::Frame;
429 if(aFamily ==
"NumberingStyles")
430 nFamily = SfxStyleFamily::Pseudo;
432 if(aFamily ==
"TableStyles")
433 nFamily = SfxStyleFamily::Table;
436 if( SfxItemState::SET == pArgs->
GetItemState(SID_STYLE_MASK,
438 nMask = static_cast<SfxStyleSearchBits>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
440 pActShell = pShell = static_cast<SwWrtShell*>(pShellItem->GetValue());
442 if( nSlot == SID_STYLE_UPDATE_BY_EXAMPLE && aParam.isEmpty() )
446 case SfxStyleFamily::Para:
453 case SfxStyleFamily::Frame:
460 case SfxStyleFamily::Char:
467 case SfxStyleFamily::Pseudo:
470 aParam = pExName->GetValue();
473 case SfxStyleFamily::Table:
476 aParam = pExName->GetValue();
484 if (!aParam.isEmpty() || nSlot == SID_STYLE_WATERCAN )
486 sal_uInt16 nRet = 0xffff;
487 bool bReturns =
false;
492 Edit(rReq.
GetFrameWeld(), aParam, OUString(), nFamily, nMask,
false, OString(), pActShell);
494 case SID_STYLE_DELETE:
499 Hide(aParam, nFamily, nSlot == SID_STYLE_HIDE);
501 case SID_STYLE_APPLY:
506 case SID_STYLE_WATERCAN:
507 nRet =
static_cast<sal_uInt16
>(
DoWaterCan(aParam, nFamily));
510 case SID_STYLE_UPDATE_BY_EXAMPLE:
513 case SID_STYLE_NEW_BY_EXAMPLE:
518 OSL_FAIL(
"Invalid SlotId");
552 , m_xBasePool(xBasePool)
553 , m_bModified(bModified)
564 bool DocIsModified()
const
581 SwWrtShell* pWrtShell = m_rDocSh.GetWrtShell();
582 SwDoc* pDoc = m_rDocSh.GetDoc();
583 SwView* pView = m_rDocSh.GetView();
587 if( SfxStyleFamily::Para == m_nFamily )
589 SfxItemSet aSet( *m_pDlg->GetOutputItemSet() );
594 m_xTmp->SetItemSet( aSet,
true );
598 if(SfxStyleFamily::Page == m_nFamily)
600 static const sal_uInt16 aInval[] = {
601 SID_IMAGE_ORIENTATION,
606 SfxItemSet aTmpSet( *m_pDlg->GetOutputItemSet() );
607 if( SfxStyleFamily::Char == m_nFamily )
612 m_xTmp->SetItemSet( aTmpSet );
614 if( SfxStyleFamily::Page == m_nFamily &&
SvtCTLOptions().IsCTLFontEnabled() )
617 if( aTmpSet.GetItemState( m_rDocSh.GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION,
false ) ,
true, &pItem ) == SfxItemState::SET )
621 if (m_nFamily == SfxStyleFamily::Page)
623 if (
const SfxGrabBagItem* pGrabBagItem = aTmpSet.GetItemIfSet(SID_ATTR_CHAR_GRABBAG))
626 auto it = pGrabBagItem->GetGrabBag().find(
"GutterAtTop");
627 if (it != pGrabBagItem->GetGrabBag().end())
629 it->second >>= bGutterAtTop;
633 if (bOldGutterAtTop != bGutterAtTop)
642 if (m_nFamily == SfxStyleFamily::Frame)
659 if(SfxStyleFamily::Frame == m_nFamily || SfxStyleFamily::Para == m_nFamily)
662 SfxItemSet aTmpSet(*m_pDlg->GetOutputItemSet());
665 m_xTmp->SetItemSet(aTmpSet);
669 if(SfxStyleFamily::Page == m_nFamily)
673 m_xBasePool->Broadcast(
SfxStyleSheetHint(SfxHintId::StyleSheetCreated, *m_xTmp));
675 m_xBasePool->Broadcast(
SfxStyleSheetHint(SfxHintId::StyleSheetModified, *m_xTmp));
691 void syncEndnoteOrientation(
const uno::Reference< style::XStyleFamiliesSupplier >& xStyleFamSupp)
693 if (!xStyleFamSupp.is())
695 SAL_WARN(
"sw.ui",
"Ref to XStyleFamiliesSupplier is null.");
698 uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamSupp->getStyleFamilies();
700 if (!xStyleFamilies.is())
703 uno::Reference<container::XNameAccess> xPageStyles(xStyleFamilies->getByName(
"PageStyles"),
706 if (!xPageStyles.is())
709 uno::Reference<css::style::XStyle> xEndnotePageStyle(xPageStyles->getByName(
"Endnote"),
712 if (!xEndnotePageStyle.is())
716 uno::Reference<css::style::XStyle> xDefaultPageStyle(xPageStyles->getByName(
"Standard"),
718 if (!xDefaultPageStyle.is())
721 if (xEndnotePageStyle->isUserDefined() || !xEndnotePageStyle->isInUse())
724 uno::Reference<beans::XPropertySet> xEndnotePagePropSet(xPageStyles->getByName(
"Endnote"), uno::UNO_QUERY);
725 uno::Reference<beans::XPropertySet> xDefaultPagePropSet(xPageStyles->getByName(
"Standard"), uno::UNO_QUERY);
727 if (!xEndnotePagePropSet.is() || !xDefaultPagePropSet.is())
729 SAL_WARN(
"sw.ui",
"xEndnotePagePropSet or xDefaultPagePropSet is null.");
733 auto const bIsDefLandScape = *o3tl::doAccess<bool>(
734 xDefaultPagePropSet->getPropertyValue(
"IsLandscape"));
735 auto const bIsEndLandScape = *o3tl::doAccess<bool>(
736 xEndnotePagePropSet->getPropertyValue(
"IsLandscape"));
738 if (bIsDefLandScape == bIsEndLandScape)
741 auto const nWidth = xEndnotePagePropSet->getPropertyValue(
"Width");
742 auto const nHeight = xEndnotePagePropSet->getPropertyValue(
"Height");
744 xEndnotePagePropSet->setPropertyValue(
"IsLandscape", css::uno::toAny(bIsDefLandScape));
745 xEndnotePagePropSet->setPropertyValue(
"Width", nHeight);
746 xEndnotePagePropSet->setPropertyValue(
"Height", nWidth);
752 const OUString &rName,
753 const OUString &rParent,
757 const OString& sPage,
763 const bool bBasic = pReq && pReq->
IsAPI();
766 bool bModified =
m_xDoc->getIDocumentState().IsModified();
779 if( SfxStyleSearchBits::All != nMask && SfxStyleSearchBits::AllVisible != nMask && SfxStyleSearchBits::Used != nMask )
780 nMask |= SfxStyleSearchBits::UserDefined;
782 nMask = SfxStyleSearchBits::UserDefined;
784 if ( nFamily == SfxStyleFamily::Para || nFamily == SfxStyleFamily::Char || nFamily == SfxStyleFamily::Frame )
789 pStyle = &
m_xBasePool->Make( rName, nFamily, nMask );
793 pStyle = &
m_xBasePool->Make( rName, nFamily, nMask );
800 case SfxStyleFamily::Para:
802 if(!rParent.isEmpty())
823 case SfxStyleFamily::Char:
825 if(!rParent.isEmpty())
847 case SfxStyleFamily::Frame :
849 if(!rParent.isEmpty())
876 SAL_WARN_IF( !pStyle,
"sw.ui",
"Style not found" );
884 if( SfxStyleFamily::Para == nFamily )
889 xTmp->MergeIndentAttrsOfListStyle( rSet );
893 else if( SfxStyleFamily::Char == nFamily )
898 if(SfxStyleFamily::Page == nFamily || SfxStyleFamily::Para == nFamily)
911 std::optional<SfxGrabBagItem> oGrabBag;
914 oGrabBag.emplace(*pItem);
918 oGrabBag.emplace(SID_ATTR_CHAR_GRABBAG);
922 oGrabBag->GetGrabBag()[
"GutterAtTop"] <<= bGutterAtTop;
927 if (nFamily == SfxStyleFamily::Frame)
952 SAL_WARN(
"sw.ui",
"no parent for dialog supplied, assuming document frame is good enough");
956 *xTmp, nFamily, sPage, pCurrShell, bNew));
957 auto pApplyStyleHelper = std::make_shared<ApplyStyle>(*
this, bNew, xTmp, nFamily, pDlg.get(),
m_xBasePool, bModified);
958 pDlg->SetApplyHdl(
LINK(pApplyStyleHelper.
get(), ApplyStyle, ApplyHdl));
960 std::shared_ptr<SfxRequest> pRequest;
963 pRequest = std::make_shared<SfxRequest>(*pReq);
967 bool bIsDefaultPage = nFamily == SfxStyleFamily::Page
968 && rName ==
SwResId(STR_POOLPAGE_STANDARD)
972 pDlg->StartExecuteAsync([bIsDefaultPage, bNew, nFamily, nSlot, nNewStyleUndoId, pApplyStyleHelper, pRequest, xTmp,
this](sal_Int32 nResult){
974 pApplyStyleHelper->apply();
980 case SfxStyleFamily::Para:
982 if(!xTmp->GetParent().isEmpty())
988 std::make_unique<SwUndoTextFormatCollCreate>(xTmp->GetCollection(), pColl, *
GetDoc()));
993 case SfxStyleFamily::Char:
995 if(!xTmp->GetParent().isEmpty())
1001 std::make_unique<SwUndoCharFormatCreate>(xTmp->GetCharFormat(), pCFormat, *
GetDoc()));
1006 case SfxStyleFamily::Frame:
1008 if(!xTmp->GetParent().isEmpty())
1014 std::make_unique<SwUndoFrameFormatCreate>(xTmp->GetFrameFormat(), pFFormat, *
GetDoc()));
1029 bool bDocModified = pApplyStyleHelper->DocIsModified();
1036 m_xDoc->GetIDocumentUndoRedo().ClearRedo();
1040 m_xDoc->getIDocumentState().ResetModified();
1044 if (nSlot == SID_STYLE_NEW && nFamily == SfxStyleFamily::Page)
1051 pApplyStyleHelper->m_pDlg.disposeAndClear();
1055 if (bIsDefaultPage && bDocModified)
1057 uno::Reference< style::XStyleFamiliesSupplier > xStyleFamSupp(
GetModel(), uno::UNO_QUERY);
1059 if (!xStyleFamSupp.is())
1061 SAL_WARN(
"sw.ui",
"Ref to XStyleFamiliesSupplier is null.");
1065 syncEndnoteOrientation(xStyleFamSupp);
1076 if( SfxStyleFamily::Para == nFamily )
1085 if(SfxStyleFamily::Page == nFamily)
1091 m_xDoc->getIDocumentState().SetModified();
1094 m_xDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
1124 xTmp->SetHidden( bHidden );
1137 SAL_WARN_IF( !pStyle,
"sw.ui",
"Style not found" );
1140 return SfxStyleFamily::None;
1150 case SfxStyleFamily::Char:
1157 case SfxStyleFamily::Para:
1165 case SfxStyleFamily::Frame:
1171 case SfxStyleFamily::Page:
1176 case SfxStyleFamily::Pseudo:
1181 if (pNumRule->
GetName() ==
"No List")
1187 pSh->
SetCurNumRule( *pNumRule,
false, sListIdForStyle,
true );
1190 case SfxStyleFamily::Table:
1196 OSL_FAIL(
"Unknown family");
1212 if( rName.isEmpty() )
1216 aTemplate.
eType = nFamily;
1223 SAL_WARN_IF( !pStyle,
"sw.ui",
"Where's the StyleSheet" );
1225 if(!pStyle)
return nFamily;
1229 case SfxStyleFamily::Char:
1232 case SfxStyleFamily::Para:
1235 case SfxStyleFamily::Frame:
1238 case SfxStyleFamily::Page:
1241 case SfxStyleFamily::Pseudo:
1246 OSL_FAIL(
"Unknown family");
1261 assert( pCurrWrtShell );
1271 case SfxStyleFamily::Para:
1290 case SfxStyleFamily::Frame:
1311 case SfxStyleFamily::Char:
1324 case SfxStyleFamily::Pseudo:
1338 case SfxStyleFamily::Table:
1357 m_xDoc->BroadcastStyleOperation(rName, nFamily, SfxHintId::StyleSheetModified);
1371 if( SfxStyleSearchBits::All == nMask || SfxStyleSearchBits::Used == nMask )
1372 nMask = SfxStyleSearchBits::UserDefined;
1374 nMask |= SfxStyleSearchBits::UserDefined;
1376 if (nFamily == SfxStyleFamily::Para || nFamily == SfxStyleFamily::Char || nFamily == SfxStyleFamily::Frame)
1390 case SfxStyleFamily::Para:
1403 switch( nMask & static_cast<SfxStyleSearchBits>(0x0fff) )
1405 case SfxStyleSearchBits::SwText:
1408 case SfxStyleSearchBits::SwChapter:
1411 case SfxStyleSearchBits::SwList:
1414 case SfxStyleSearchBits::SwIndex:
1417 case SfxStyleSearchBits::SwExtra:
1420 case SfxStyleSearchBits::SwHtml:
1427 if (
GetDoc()->GetIDocumentUndoRedo().DoesUndo())
1430 std::make_unique<SwUndoTextFormatCollCreate>(pColl, pDerivedFrom, *
GetDoc()));
1437 case SfxStyleFamily::Frame:
1451 if (
GetDoc()->GetIDocumentUndoRedo().DoesUndo())
1454 std::make_unique<SwUndoFrameFormatCreate>(pFrame, pFFormat, *
GetDoc()));
1462 case SfxStyleFamily::Char:
1473 if (
GetDoc()->GetIDocumentUndoRedo().DoesUndo())
1478 std::make_unique<SwUndoCharFormatCreate>(
1479 pChar, pDerivedFrom ? pDerivedFrom :
GetDoc()->GetDfltCharFormat(),
1488 case SfxStyleFamily::Page:
1513 case SfxStyleFamily::Pseudo:
1522 OUString sOrigRule( aRule.
GetName() );
1535 case SfxStyleFamily::Table:
1552 m_xDoc->BroadcastStyleOperation(rName, nFamily, SfxHintId::StyleSheetCreated);
1557 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
1560 return aCheck.getIssueCollection();
1568 return m_xDoc->GetDocColors();
1593 if( dynamic_cast<const SwDocShell*>( &rSource) !=
nullptr)
1598 if(!bPreserveCurrentDocument)
1599 static_cast<SwDocShell&
>(rSource).
m_xDoc->getIDocumentFieldsAccess().SetFixFields(
nullptr);
1608 m_xDoc->ReplaceStyles( *static_cast<SwDocShell&>(rSource).
m_xDoc );
1613 bool bModified =
m_xDoc->getIDocumentState().IsModified();
1614 m_xDoc->ReplaceStyles( *static_cast<SwDocShell&>(rSource).
m_xDoc );
1615 if (!bModified && m_xDoc->getIDocumentState().IsModified() && !
m_pView)
1619 m_xDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
1629 const OUString& rPage,
1630 const OString& rPageId,
1634 Edit(pDialogParent, rPage, OUString(), SfxStyleFamily::Page, SfxStyleSearchBits::Auto,
false, rPageId, &rActShell, pRequest);
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
virtual bool IsUsed() const
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
const sal_uInt16 COLL_LISTS_BITS
const sal_uInt16 COLL_DOC_BITS
IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone *, void)
Represents the style of a paragraph.
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
SfxWatermarkItem GetWatermark() const
SwTableAutoFormat * GetTableFormat()
void SetPoolHelpId(sal_uInt16 const nId)
const SwNumRule * GetNumRuleAtCurrCursorPos() const
SwCharFormat * GetCharFormatFromPool(sal_uInt16 nId)
SfxDispatcher * GetDispatcher()
virtual void SetModified()=0
Must be called manually at changes of format.
bool GetLastUndoInfo(OUString *const o_pStr, SwUndoId *const o_pId, const SwView *pView=nullptr) const
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
const OUString & GetDefaultListId() const
const sal_uInt16 COLL_HTML_BITS
css::uno::Reference< css::frame::XModel3 > GetModel() const
SAL_DLLPRIVATE void UpdateStyle(const OUString &rName, SfxStyleFamily nFamily, SwWrtShell *pShell)
void InvalidateItem(sal_uInt16 nWhich)
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
const OUString & GetName() const
void Done(bool bRemove=false)
void SetPageStyle(const OUString &rCollName)
IDocumentUndoRedo & GetIDocumentUndoRedo()
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
SwFrameFormat * GetFrameFormatFromPool(sal_uInt16 nId)
void PutItem(const SfxPoolItem &rItem)
void SetValue(SfxStyleSearchBits n)
WhichRangesContainer const aFrameFormatSetRange(svl::Items< RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, XATTR_FILL_FIRST, XATTR_FILL_LAST >)
void SetApplyTemplate(const SwApplyTemplate &)
Apply template.
SwFrameFormat * FindFrameFormatByName(const OUString &rName) const
XPatternListRef GetPatternList() const
const OUString & GetName() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
void SetKeepRatio(bool b)
void SetCurNumRule(const SwNumRule &, const bool bCreateNewList, const OUString &sContinuedListId=OUString(), const bool bResetIndentAttrs=false)
Optional parameter (default value false).
Used by the UI to modify the document model.
OUString SwResId(TranslateId aId)
void SetWatermark(const SfxWatermarkItem &rText)
virtual void set(DocumentSettingId id, bool value)=0
Set the specified document setting.
void FillByEx(SwCharFormat *)
const SwView & GetView() const
const OUString & GetName() const
#define FN_NUM_BULLET_OFF
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat-Id.
void ExecStyleSheet(SfxRequest &)
void InvalidateLayout(bool bSizeChanged)
virtual void DelAllUndoObj()=0
Delete all Undo actions.
void InitPrt(OutputDevice *pOutDev)
SwFrameFormat * GetFrameFormat()
static SW_DLLPUBLIC sal_uInt16 GetPoolIdFromUIName(const OUString &rName, SwGetPoolIdFromName)
const SwTable & GetTable() const
void SetPoolHlpFileId(sal_uInt8 const nId)
const SwPageDesc * GetPageDesc()
const OUString & GetTableStyleName() const
Return the table style name of this table.
const SwTOXBase * GetCurTOX() const
Get current listing before or at the Cursor.
virtual void LoadStyles(SfxObjectShell &rSource) override
const sal_uInt16 COLL_REGISTER_BITS
void FormatPage(weld::Window *pDialogParent, const OUString &rPage, const OString &rPageId, SwWrtShell &rActShell, SfxRequest *pRequest=nullptr)
Show page style format dialog.
SwCharFormat * GetCharFormat()
virtual bool DoesUndo() const =0
Is Undo enabled?
void PresetParent(const OUString &rName)
SfxItemPool & GetPool() const
void ChgNumRuleFormats(const SwNumRule &rRule)
bool GetFlyFrameAttr(SfxItemSet &rSet) const
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
SwDoc * GetDoc()
returns Doc. But be careful!
bool IsPrintLayoutExtension()
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
virtual void AppendUndo(std::unique_ptr< SwUndo > pUndo)=0
Add new Undo action.
const SwTableNode * IsCursorInTable() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
void SetTextFormatColl(SwTextFormatColl *, const bool bResetListAttrs=false)
Add 2nd optional parameter - see also
SwApplyTemplate * GetApplyTemplate() const
SwCharFormat * FindCharFormatByName(const OUString &rName) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define FN_KEEP_ASPECT_RATIO
SwTextFormatColl * pTextColl
sfx::AccessibilityIssueCollection runAccessibilityCheck() override
virtual void SetUndoNoResetModified()=0
Disable (re)setting the document modified flag on Undo/Redo.
sal_uInt16 GetModifier() const
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
void LoadStyles_(SfxObjectShell &rSource, bool bPreserveCurrentDocument)
virtual std::set< Color > GetDocColors() override
SfxBindings & GetBindings()
#define FN_PARAM_WRTSHELL
void SetAttrItem(const SfxPoolItem &, SetAttrMode nFlags=SetAttrMode::DEFAULT, const bool bParagraphSetting=false)
const OUString & GetValue() const
const SwPageDesc & GetPageDesc(size_t i) const
FrameTypeFlags
values can be combined via logical or
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
const T * GetArg(sal_uInt16 nSlotId) const
void ChgTableStyle(const OUString &rName, const SwTableAutoFormat &rNewFormat)
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
XGradientListRef GetGradientList() const
void AddRule(SwUndoArg eWhat, const OUString &rWith)
void Undo(sal_uInt16 const nCount=1, sal_uInt16 nOffset=0)
IDocumentState const & getIDocumentState() const
SwWrtShell * GetWrtShell()
Access to the SwWrtShell belonging to SwView.
SwFrameFormat * pFrameFormat
const SwNumRule * GetNumRule()
static SwAbstractDialogFactory * Create()
SfxItemState QueryState(sal_uInt16 nSID, std::unique_ptr< SfxPoolItem > &rpState)
rtl::Reference< SwDoc > m_xDoc
Document.
void SetTableStyle(const OUString &rStyleName)
Set table style of the current table.
void SetPoolFormatId(sal_uInt16 const nId)
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
void TableCursorToCursor()
enter block mode, change normal cursor into block cursor
virtual void LoadStyles(SfxObjectShell &rSource)
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
rtl::Reference< SfxStyleSheetBasePool > m_xBasePool
Passing through for formats.
void SetReturnValue(const SfxPoolItem &)
SwCharFormat * pCharFormat
weld::Window * GetFrameWeld() const
SAL_DLLPRIVATE void MakeByExample(const OUString &rName, SfxStyleFamily nFamily, SfxStyleSearchBits nMask, SwWrtShell *pShell)
SAL_DLLPRIVATE void Hide(const OUString &rName, SfxStyleFamily nFamily, bool bHidden)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
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.
static SfxViewFrame * Current()
XHatchListRef GetHatchList() const
SwTextFormatColl * GetCollection()
void DisableItem(sal_uInt16 nWhich)
weld::Window * GetFrameWeld() const
SwView * m_pView
For "historical reasons" nothing can be done without the WrtShell.
void ReplaceNumRule(const OUString &rOldRule, const OUString &rNewRule)
#define SAL_WARN_IF(condition, area, stream)
const SwViewOption * GetViewOptions() const
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
IDocumentSettingAccess const & getIDocumentSettingAccess() const
sal_uInt16 GetPoolHelpId() const
void InvalidateRulerPos()
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
SwFEShell * GetFEShell()
For Core - it knows the DocShell but not the WrtShell!
void SetFrameFormat(SwFrameFormat *pFormat, bool bKeepOrient=false, Point const *pDocPos=nullptr)
If frame then set frame style.
XBitmapListRef GetBitmapList() const
sal_uInt8 GetPoolHlpFileId() const
bool IsUserDefined() const
reference_type * get() const
SAL_DLLPRIVATE SfxStyleFamily ApplyStyles(const OUString &rName, const SfxStyleFamily nFamily, SwWrtShell *pShell, sal_uInt16 nMode)
SwCharFormat * GetCurCharFormat() const
void AppendItem(const SfxPoolItem &)
#define SAL_WARN(area, stream)
Reference< XModel > xModel
SAL_DLLPRIVATE SfxStyleFamily DoWaterCan(const OUString &rName, SfxStyleFamily nFamily)
const SwView * GetView() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
#define FN_INSERT_OBJ_CTRL
const sal_uInt16 COLL_TEXT_BITS
XColorListRef GetColorList() const
static OUString GenerateUnusedName(SfxStyleSheetBasePool &rPool, SfxStyleFamily eFam)
void SetName(const OUString &rNm, IDocumentListsAccess &rDocListAccess)
constexpr sal_uInt16 KEY_SHIFT
union SwApplyTemplate::@32 aColl
void StartAllAction()
For all views of this document.
SAL_DLLPRIVATE void Delete(const OUString &rName, SfxStyleFamily nFamily)
IDocumentListsAccess const & getIDocumentListsAccess() const
size_t GetCurPageDesc(const bool bCalcFrame=true) const
SAL_DLLPRIVATE void Edit(weld::Window *pDialogParent, const OUString &rName, const OUString &rParent, const SfxStyleFamily nFamily, SfxStyleSearchBits nMask, const bool bNew, const OString &sPageId, SwWrtShell *pActShell, SfxRequest *pRequest=nullptr, sal_uInt16 nSlot=0)
Methods for StyleSheets.
void StateStyleSheet(SfxItemSet &, SwWrtShell *pSh=nullptr)
FrameTypeFlags GetFrameType(const Point *pPt, bool bStopAtFly) const
For return values see above FrameType.
bool IsFrameSelected() const
constexpr TypedWhichId< SwFormatAnchor > RES_ANCHOR(104)
const sal_uInt16 COLL_EXTRA_BITS
static void DoUpdateAllCharts(SwDoc *pDoc)
bool GetTableAutoFormat(SwTableAutoFormat &rGet)
virtual VclPtr< SfxAbstractApplyTabDialog > CreateTemplateDialog(weld::Window *pParent, SfxStyleSheetBase &rBase, SfxStyleFamily nRegion, const OString &sPage, SwWrtShell *pActShell, bool bNew)=0