22 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/container/XNameAccess.hpp>
25 #include <com/sun/star/frame/XModel.hpp>
57 #include <drawdoc.hxx>
69 #include <uiitems.hxx>
78 #include <strings.hrc>
79 #include <AccessibilityCheck.hxx>
102 std::unique_ptr<SfxPoolItem> pItem;
118 case SID_STYLE_APPLY:
136 case SID_STYLE_FAMILY1:
143 aName =
SwResId(STR_POOLCHR_STANDARD);
148 case SID_STYLE_FAMILY2:
159 nMask = SfxStyleSearchBits::SwHtml;
164 nMask = SfxStyleSearchBits::SwIndex ;
171 nMask = SfxStyleSearchBits::SwExtra;
173 nMask = SfxStyleSearchBits::SwText;
182 case SID_STYLE_FAMILY3:
197 case SID_STYLE_FAMILY4:
205 if( n < pShell->GetPageDescCnt() )
212 case SID_STYLE_FAMILY5:
221 case SID_STYLE_FAMILY6:
231 case SID_STYLE_WATERCAN:
238 case SID_STYLE_UPDATE_BY_EXAMPLE:
240 ? SfxStyleFamily::Frame != nActualFamily
241 : ( SfxStyleFamily::Frame == nActualFamily ||
242 SfxStyleFamily::Page == nActualFamily ||
244 (SfxStyleFamily::Table == nActualFamily && !pShell->
GetTableAutoFormat(aTableAutoFormat))) )
250 case SID_STYLE_NEW_BY_EXAMPLE:
252 ? SfxStyleFamily::Frame != nActualFamily
253 : SfxStyleFamily::Frame == nActualFamily) ||
255 (SfxStyleFamily::Table == nActualFamily && !pShell->
GetTableAutoFormat(aTableAutoFormat)) )
261 case SID_CLASSIFICATION_APPLY:
265 case SID_CLASSIFICATION_DIALOG:
278 OSL_FAIL(
"Invalid SlotId");
287 sal_uInt16 nSlot = rReq.
GetSlot();
294 if( pArgs && SfxItemState::SET == pArgs->
GetItemState( SID_STYLE_FAMILY,
301 if( SfxItemState::SET == pArgs->
GetItemState( SID_STYLE_NEW,
303 sName = static_cast<const SfxStringItem*>(pItem)->GetValue();
304 if( SfxItemState::SET == pArgs->
GetItemState( SID_STYLE_MASK,
306 nMask = static_cast<SfxStyleSearchBits>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
308 if( SfxItemState::SET == pArgs->
GetItemState( SID_STYLE_REFERENCE,
310 sParent = static_cast<const SfxStringItem*>(pItem)->GetValue();
315 Edit(sName, sParent, nFamily, nMask,
true, OString(),
nullptr, &rReq, nSlot);
319 case SID_STYLE_APPLY:
330 if ( pFamilyItem && pNameItem )
332 uno::Reference< style::XStyleFamiliesSupplier >
xModel(
GetModel(), uno::UNO_QUERY);
335 uno::Reference< container::XNameAccess > xStyles;
336 uno::Reference< container::XNameAccess > xCont = xModel->getStyleFamilies();
337 xCont->getByName(pFamilyItem->GetValue()) >>= xStyles;
338 uno::Reference< beans::XPropertySet > xInfo;
339 xStyles->getByName( pNameItem->
GetValue() ) >>= xInfo;
341 xInfo->getPropertyValue(
"DisplayName") >>= aUIName;
342 if ( !aUIName.isEmpty() )
345 catch (
const uno::Exception&)
354 case SID_STYLE_DELETE:
357 case SID_STYLE_WATERCAN:
358 case SID_STYLE_FAMILY:
359 case SID_STYLE_UPDATE_BY_EXAMPLE:
360 case SID_STYLE_NEW_BY_EXAMPLE:
371 case SID_STYLE_NEW_BY_EXAMPLE:
383 case SID_STYLE_UPDATE_BY_EXAMPLE:
401 if( SfxItemState::SET == pArgs->
GetItemState(nSlot,
false, &pItem ))
402 aParam = static_cast<const SfxStringItem*>(pItem)->GetValue();
404 if( SfxItemState::SET == pArgs->
GetItemState(SID_STYLE_FAMILY,
406 nFamily = static_cast<SfxStyleFamily>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
408 if( SfxItemState::SET == pArgs->
GetItemState(SID_STYLE_FAMILYNAME,
false, &pItem ))
411 if(aFamily ==
"CharacterStyles")
412 nFamily = SfxStyleFamily::Char;
414 if(aFamily ==
"ParagraphStyles")
415 nFamily = SfxStyleFamily::Para;
417 if(aFamily ==
"PageStyles")
418 nFamily = SfxStyleFamily::Page;
420 if(aFamily ==
"FrameStyles")
421 nFamily = SfxStyleFamily::Frame;
423 if(aFamily ==
"NumberingStyles")
424 nFamily = SfxStyleFamily::Pseudo;
426 if(aFamily ==
"TableStyles")
427 nFamily = SfxStyleFamily::Table;
430 if( SfxItemState::SET == pArgs->
GetItemState(SID_STYLE_MASK,
432 nMask = static_cast<SfxStyleSearchBits>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
435 pActShell = pShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
437 if( nSlot == SID_STYLE_UPDATE_BY_EXAMPLE && aParam.isEmpty() )
441 case SfxStyleFamily::Para:
448 case SfxStyleFamily::Frame:
455 case SfxStyleFamily::Char:
462 case SfxStyleFamily::Pseudo:
463 if(SfxItemState::SET == pArgs->
GetItemState(SID_STYLE_UPD_BY_EX_NAME,
false, &pItem))
468 case SfxStyleFamily::Table:
469 if(SfxItemState::SET == pArgs->
GetItemState(SID_STYLE_UPD_BY_EX_NAME,
false, &pItem))
479 if (!aParam.isEmpty() || nSlot == SID_STYLE_WATERCAN )
481 sal_uInt16 nRet = 0xffff;
482 bool bReturns =
false;
487 Edit(aParam, OUString(), nFamily, nMask,
false, OString(), pActShell);
489 case SID_STYLE_DELETE:
494 Hide(aParam, nFamily, nSlot == SID_STYLE_HIDE);
496 case SID_STYLE_APPLY:
501 case SID_STYLE_WATERCAN:
502 nRet =
static_cast<sal_uInt16
>(
DoWaterCan(aParam, nFamily));
505 case SID_STYLE_UPDATE_BY_EXAMPLE:
508 case SID_STYLE_NEW_BY_EXAMPLE:
513 OSL_FAIL(
"Invalid SlotId");
547 , m_xBasePool(xBasePool)
548 , m_bModified(bModified)
559 bool DocIsModified()
const
576 SwWrtShell* pWrtShell = m_rDocSh.GetWrtShell();
577 SwDoc* pDoc = m_rDocSh.GetDoc();
578 SwView* pView = m_rDocSh.GetView();
582 if( SfxStyleFamily::Para == m_nFamily )
584 SfxItemSet aSet( *m_pDlg->GetOutputItemSet() );
589 m_xTmp->SetItemSet( aSet,
true );
593 if(SfxStyleFamily::Page == m_nFamily)
595 static const sal_uInt16 aInval[] = {
596 SID_IMAGE_ORIENTATION,
601 SfxItemSet aTmpSet( *m_pDlg->GetOutputItemSet() );
602 if( SfxStyleFamily::Char == m_nFamily )
607 m_xTmp->SetItemSet( aTmpSet );
612 if( aTmpSet.GetItemState( m_rDocSh.GetPool().GetTrueWhich( SID_ATTR_FRAMEDIRECTION,
false ) ,
true, &pItem ) == SfxItemState::SET )
619 if(SfxStyleFamily::Frame == m_nFamily || SfxStyleFamily::Para == m_nFamily)
622 SfxItemSet aTmpSet(*m_pDlg->GetOutputItemSet());
625 m_xTmp->SetItemSet(aTmpSet);
629 if(SfxStyleFamily::Page == m_nFamily)
633 m_xBasePool->Broadcast(
SfxStyleSheetHint(SfxHintId::StyleSheetCreated, *m_xTmp));
635 m_xBasePool->Broadcast(
SfxStyleSheetHint(SfxHintId::StyleSheetModified, *m_xTmp));
651 void syncEndnoteOrientation(
const uno::Reference< style::XStyleFamiliesSupplier >& xStyleFamSupp)
653 if (!xStyleFamSupp.is())
655 SAL_WARN(
"sw.ui",
"Ref to XStyleFamiliesSupplier is null.");
658 uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamSupp->getStyleFamilies();
660 if (!xStyleFamilies.is())
663 uno::Reference<container::XNameAccess> xPageStyles(xStyleFamilies->getByName(
"PageStyles"),
666 if (!xPageStyles.is())
669 uno::Reference<css::style::XStyle> xEndnotePageStyle(xPageStyles->getByName(
"Endnote"),
672 if (!xEndnotePageStyle.is())
676 uno::Reference<css::style::XStyle> xDefaultPageStyle(xPageStyles->getByName(
"Standard"),
678 if (!xDefaultPageStyle.is())
681 if (xEndnotePageStyle->isUserDefined() || !xEndnotePageStyle->isInUse())
684 uno::Reference<beans::XPropertySet> xEndnotePagePropSet(xPageStyles->getByName(
"Endnote"), uno::UNO_QUERY);
685 uno::Reference<beans::XPropertySet> xDefaultPagePropSet(xPageStyles->getByName(
"Standard"), uno::UNO_QUERY);
687 if (!xEndnotePagePropSet.is() || !xDefaultPagePropSet.is())
689 SAL_WARN(
"sw.ui",
"xEndnotePagePropSet or xDefaultPagePropSet is null.");
693 auto const bIsDefLandScape = *o3tl::doAccess<bool>(
694 xDefaultPagePropSet->getPropertyValue(
"IsLandscape"));
695 auto const bIsEndLandScape = *o3tl::doAccess<bool>(
696 xEndnotePagePropSet->getPropertyValue(
"IsLandscape"));
698 if (bIsDefLandScape == bIsEndLandScape)
701 auto const nWidth = xEndnotePagePropSet->getPropertyValue(
"Width");
702 auto const nHeight = xEndnotePagePropSet->getPropertyValue(
"Height");
704 xEndnotePagePropSet->setPropertyValue(
"IsLandscape", css::uno::toAny(bIsDefLandScape));
705 xEndnotePagePropSet->setPropertyValue(
"Width", nHeight);
706 xEndnotePagePropSet->setPropertyValue(
"Height", nWidth);
711 const OUString &rName,
712 const OUString &rParent,
716 const OString& sPage,
722 const bool bBasic = pReq && pReq->
IsAPI();
725 bool bModified =
m_xDoc->getIDocumentState().IsModified();
738 if( SfxStyleSearchBits::All != nMask && SfxStyleSearchBits::AllVisible != nMask && SfxStyleSearchBits::Used != nMask )
739 nMask |= SfxStyleSearchBits::UserDefined;
741 nMask = SfxStyleSearchBits::UserDefined;
743 if ( nFamily == SfxStyleFamily::Para || nFamily == SfxStyleFamily::Char || nFamily == SfxStyleFamily::Frame )
748 pStyle = &
m_xBasePool->Make( rName, nFamily, nMask );
752 pStyle = &
m_xBasePool->Make( rName, nFamily, nMask );
759 case SfxStyleFamily::Para:
761 if(!rParent.isEmpty())
793 case SfxStyleFamily::Char:
795 if(!rParent.isEmpty())
817 case SfxStyleFamily::Frame :
819 if(!rParent.isEmpty())
846 SAL_WARN_IF( !pStyle,
"sw.ui",
"Style not found" );
854 if( SfxStyleFamily::Para == nFamily )
859 xTmp->MergeIndentAttrsOfListStyle( rSet );
863 else if( SfxStyleFamily::Char == nFamily )
868 if(SfxStyleFamily::Page == nFamily || SfxStyleFamily::Para == nFamily)
900 *xTmp, nFamily, sPage, pCurrShell, bNew));
901 auto pApplyStyleHelper = std::make_shared<ApplyStyle>(*
this, bNew, xTmp, nFamily, pDlg.get(),
m_xBasePool, bModified);
902 pDlg->SetApplyHdl(
LINK(pApplyStyleHelper.
get(), ApplyStyle, ApplyHdl));
904 std::shared_ptr<SfxRequest> pRequest;
907 pRequest = std::make_shared<SfxRequest>(*pReq);
911 bool bIsDefaultPage = nFamily == SfxStyleFamily::Page
912 && rName ==
SwResId(STR_POOLPAGE_STANDARD)
916 pDlg->StartExecuteAsync([bIsDefaultPage, bNew, nFamily, nSlot, nNewStyleUndoId, pApplyStyleHelper, pRequest, xTmp,
this](sal_Int32 nResult){
918 pApplyStyleHelper->apply();
924 case SfxStyleFamily::Para:
926 if(!xTmp->GetParent().isEmpty())
932 std::make_unique<SwUndoTextFormatCollCreate>(xTmp->GetCollection(), pColl, *
GetDoc()));
937 case SfxStyleFamily::Char:
939 if(!xTmp->GetParent().isEmpty())
945 std::make_unique<SwUndoCharFormatCreate>(xTmp->GetCharFormat(), pCFormat, *
GetDoc()));
950 case SfxStyleFamily::Frame:
952 if(!xTmp->GetParent().isEmpty())
958 std::make_unique<SwUndoFrameFormatCreate>(xTmp->GetFrameFormat(), pFFormat, *
GetDoc()));
973 bool bDocModified = pApplyStyleHelper->DocIsModified();
980 m_xDoc->GetIDocumentUndoRedo().ClearRedo();
984 m_xDoc->getIDocumentState().ResetModified();
988 if (nSlot == SID_STYLE_NEW && nFamily == SfxStyleFamily::Page)
995 pApplyStyleHelper->m_pDlg.disposeAndClear();
999 if (bIsDefaultPage && bDocModified)
1001 uno::Reference< style::XStyleFamiliesSupplier > xStyleFamSupp(
GetModel(), uno::UNO_QUERY);
1003 if (!xStyleFamSupp.is())
1005 SAL_WARN(
"sw.ui",
"Ref to XStyleFamiliesSupplier is null.");
1009 syncEndnoteOrientation(xStyleFamSupp);
1020 if( SfxStyleFamily::Para == nFamily )
1029 if(SfxStyleFamily::Page == nFamily)
1035 m_xDoc->getIDocumentState().SetModified();
1038 m_xDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
1068 xTmp->SetHidden( bHidden );
1079 SAL_WARN_IF( !pStyle,
"sw.ui",
"Style not found" );
1082 return SfxStyleFamily::None;
1092 case SfxStyleFamily::Char:
1099 case SfxStyleFamily::Para:
1107 case SfxStyleFamily::Frame:
1113 case SfxStyleFamily::Page:
1118 case SfxStyleFamily::Pseudo:
1124 pSh->
SetCurNumRule( *pNumRule,
false, sListIdForStyle,
true );
1127 case SfxStyleFamily::Table:
1133 OSL_FAIL(
"Unknown family");
1149 if( rName.isEmpty() )
1153 aTemplate.
eType = nFamily;
1160 SAL_WARN_IF( !pStyle,
"sw.ui",
"Where's the StyleSheet" );
1162 if(!pStyle)
return nFamily;
1166 case SfxStyleFamily::Char:
1169 case SfxStyleFamily::Para:
1172 case SfxStyleFamily::Frame:
1175 case SfxStyleFamily::Page:
1178 case SfxStyleFamily::Pseudo:
1183 OSL_FAIL(
"Unknown family");
1208 case SfxStyleFamily::Para:
1227 case SfxStyleFamily::Frame:
1248 case SfxStyleFamily::Char:
1261 case SfxStyleFamily::Pseudo:
1275 case SfxStyleFamily::Table:
1303 if( SfxStyleSearchBits::All == nMask || SfxStyleSearchBits::Used == nMask )
1304 nMask = SfxStyleSearchBits::UserDefined;
1306 nMask |= SfxStyleSearchBits::UserDefined;
1308 if (nFamily == SfxStyleFamily::Para || nFamily == SfxStyleFamily::Char || nFamily == SfxStyleFamily::Frame)
1322 case SfxStyleFamily::Para:
1335 switch( nMask & static_cast<SfxStyleSearchBits>(0x0fff) )
1337 case SfxStyleSearchBits::SwText:
1340 case SfxStyleSearchBits::SwChapter:
1343 case SfxStyleSearchBits::SwList:
1346 case SfxStyleSearchBits::SwIndex:
1349 case SfxStyleSearchBits::SwExtra:
1352 case SfxStyleSearchBits::SwHtml:
1359 if (
GetDoc()->GetIDocumentUndoRedo().DoesUndo())
1362 std::make_unique<SwUndoTextFormatCollCreate>(pColl, pDerivedFrom, *
GetDoc()));
1369 case SfxStyleFamily::Frame:
1383 if (
GetDoc()->GetIDocumentUndoRedo().DoesUndo())
1386 std::make_unique<SwUndoFrameFormatCreate>(pFrame, pFFormat, *
GetDoc()));
1394 case SfxStyleFamily::Char:
1405 if (
GetDoc()->GetIDocumentUndoRedo().DoesUndo())
1410 std::make_unique<SwUndoCharFormatCreate>(
1411 pChar, pDerivedFrom ? pDerivedFrom :
GetDoc()->GetDfltCharFormat(),
1420 case SfxStyleFamily::Page:
1445 case SfxStyleFamily::Pseudo:
1454 OUString sOrigRule( aRule.
GetName() );
1467 case SfxStyleFamily::Table:
1489 return aCheck.getIssueCollection();
1494 return m_xDoc->GetDocColors();
1519 if( dynamic_cast<const SwDocShell*>( &rSource) !=
nullptr)
1524 if(!bPreserveCurrentDocument)
1525 static_cast<SwDocShell&
>(rSource).
m_xDoc->getIDocumentFieldsAccess().SetFixFields(
nullptr);
1534 m_xDoc->ReplaceStyles( *static_cast<SwDocShell&>(rSource).
m_xDoc );
1539 bool bModified =
m_xDoc->getIDocumentState().IsModified();
1540 m_xDoc->ReplaceStyles( *static_cast<SwDocShell&>(rSource).
m_xDoc );
1541 if (!bModified && m_xDoc->getIDocumentState().IsModified() && !
m_pView)
1545 m_xDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
1554 const OUString& rPage,
1555 const OString& rPageId,
1559 Edit(rPage, OUString(), SfxStyleFamily::Page, SfxStyleSearchBits::Auto,
false, rPageId, &rActShell, pRequest);
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
bool IsPrintLayoutExtension() const
virtual bool IsUsed() const
SwTextFormatColl * GetCurTextFormatColl() const
Get the named paragraph format of the current selection.
SwTextFormatColl * FindTextFormatCollByName(std::u16string_view rName) const
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.
SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId)
SfxWatermarkItem GetWatermark() const
SwTableAutoFormat * GetTableFormat()
void SetPoolHelpId(sal_uInt16 const nId)
const SwNumRule * GetNumRuleAtCurrCursorPos() const
#define DECL_LINK(Member, ArgType, RetType)
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
SAL_DLLPRIVATE void UpdateStyle(const OUString &rName, SfxStyleFamily nFamily, SwWrtShell *pShell)
sal_uInt16 GetValue() const
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()
css::uno::Reference< css::frame::XModel > GetModel() const
const SfxItemSet * GetArgs() const
void Invalidate(sal_uInt16 nId)
virtual bool SetFormatAttr(const SfxPoolItem &rAttr) override
Override to recognize changes on the and register/unregister the paragragh style at t...
SwFrameFormat * GetFrameFormatFromPool(sal_uInt16 nId)
SwFrameFormat * FindFrameFormatByName(std::u16string_view rName) const
void PutItem(const SfxPoolItem &rItem)
void SetValue(SfxStyleSearchBits n)
void SetApplyTemplate(const SwApplyTemplate &)
Apply template.
XPatternListRef GetPatternList() const
const OUString & GetName() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
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.
void SetWatermark(const SfxWatermarkItem &rText)
void FillByEx(SwCharFormat *)
bool IsAssignedToListLevelOfOutlineStyle() const
const SwView & GetView() const
const OUString & GetName() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
sal_uInt16 GetPoolFormatId() const
Query and set PoolFormat-Id.
void ExecStyleSheet(SfxRequest &)
SAL_DLLPRIVATE void Edit(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.
bool SetTableStyle(const OUString &rStyleName)
Set table style of the current table.
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
SwCharFormat * GetCharFormat()
virtual bool DoesUndo() const =0
Is Undo enabled?
void PresetParent(const OUString &rName)
SfxItemPool & GetPool() const
static SvxHtmlOptions & Get()
void ChgNumRuleFormats(const SwNumRule &rRule)
bool GetFlyFrameAttr(SfxItemSet &rSet) const
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
SwDoc * GetDoc()
returns Doc. But be careful!
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
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
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)
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.
OUString SwResId(const char *pId)
void SetPoolFormatId(sal_uInt16 const nId)
virtual SfxPrinter * getPrinter(bool bCreate) const =0
Return the printer set at the document.
virtual void LoadStyles(SfxObjectShell &rSource)
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
rtl::Reference< SfxStyleSheetBasePool > m_xBasePool
Passing through for formats.
sal_uInt16 const aFrameFormatSetRange[]
void SetReturnValue(const SfxPoolItem &)
SwCharFormat * pCharFormat
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.
XHatchListRef GetHatchList() const
SwTextFormatColl * GetCollection()
void DisableItem(sal_uInt16 nWhich)
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 o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
sal_uInt16 GetPoolHelpId() const
SwCharFormat * FindCharFormatByName(std::u16string_view rName) const
void SetAttrOutlineLevel(int)
void InvalidateRulerPos()
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 FormatPage(const OUString &rPage, const OString &rPageId, SwWrtShell &rActShell, SfxRequest *pRequest=nullptr)
Show page style format dialog.
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
void StateStyleSheet(SfxItemSet &, SwWrtShell *pSh=nullptr)
void Undo(sal_uInt16 const nCount=1)
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