diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-12-13 14:48:26 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-12-13 15:43:53 +0000 |
commit | 9a0e31fcb7fa871fa63abe106d83a04df2f4c74e (patch) | |
tree | 6e1f0ee886b4a40bf58feb6b9223777decbf5090 | |
parent | 55e2d3f45dbd404f20021a4b1d5d5184d24a3cbf (diff) |
sw: rename SwFormat::m_bAutoUpdateFormat to m_bAutoUpdateOnDirectFormat
To make it more obvious that this flag describes the relatively obscure
feature where a direct format on one paragraph automatically makes it
into its style and all other paragraphs with the same style are updated
accordingly, kind of preventing real direct formatting.
Change-Id: Ia97929cd65f1aa0ff7f11425ec6d00f234053921
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144051
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | sw/inc/format.hxx | 8 | ||||
-rw-r--r-- | sw/source/core/attr/format.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentStylePoolManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/drawbase.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/shells/frmsh.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/shells/grfsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/txtattr.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewtab.cxx | 10 |
13 files changed, 36 insertions, 36 deletions
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx index 23acd68f0883..f9dcb30b2874 100644 --- a/sw/inc/format.hxx +++ b/sw/inc/format.hxx @@ -59,7 +59,7 @@ class SW_DLLPUBLIC SwFormat : public sw::BorderCacheOwner, public sw::Broadcasti default is true! */ bool m_bFormatInDTOR : 1; /**< TRUE: Format becomes deleted. In order to be able to recognize this in FormatChg-message!! */ - bool m_bAutoUpdateFormat : 1;/**< TRUE: Set attributes of a whole paragraph + bool m_bAutoUpdateOnDirectFormat : 1;/**< TRUE: Set attributes of a whole paragraph at format (UI-side!). */ bool m_bHidden : 1; std::shared_ptr<SfxGrabBagItem> m_pGrabBagItem; ///< Style InteropGrabBag. @@ -184,9 +184,9 @@ public: void GetGrabBagItem(css::uno::Any& rVal) const; void SetGrabBagItem(const css::uno::Any& rVal); - /// Query / set bAutoUpdateFormat-flag. - bool IsAutoUpdateFormat() const { return m_bAutoUpdateFormat; } - void SetAutoUpdateFormat( bool bNew = true ) { m_bAutoUpdateFormat = bNew; } + /// Query / set m_bAutoUpdateOnDirectFormat-flag. + bool IsAutoUpdateOnDirectFormat() const { return m_bAutoUpdateOnDirectFormat; } + void SetAutoUpdateOnDirectFormat( bool bNew = true ) { m_bAutoUpdateOnDirectFormat = bNew; } bool IsFormatInDTOR() const { return m_bFormatInDTOR; } diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 5b516d7dc437..1ced91e62972 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -46,7 +46,7 @@ SwFormat::SwFormat( SwAttrPool& rPool, const char* pFormatNm, m_nPoolHelpId( USHRT_MAX ), m_nPoolHlpFileId( UCHAR_MAX ) { - m_bAutoUpdateFormat = false; // LAYER_IMPL + m_bAutoUpdateOnDirectFormat = false; // LAYER_IMPL m_bAutoFormat = true; m_bFormatInDTOR = m_bHidden = false; @@ -67,7 +67,7 @@ SwFormat::SwFormat( SwAttrPool& rPool, OUString aFormatNm, m_nPoolHelpId( USHRT_MAX ), m_nPoolHlpFileId( UCHAR_MAX ) { - m_bAutoUpdateFormat = false; // LAYER_IMPL + m_bAutoUpdateOnDirectFormat = false; // LAYER_IMPL m_bAutoFormat = true; m_bFormatInDTOR = m_bHidden = false; @@ -90,7 +90,7 @@ SwFormat::SwFormat( const SwFormat& rFormat ) : m_bFormatInDTOR = false; // LAYER_IMPL m_bAutoFormat = rFormat.m_bAutoFormat; m_bHidden = rFormat.m_bHidden; - m_bAutoUpdateFormat = rFormat.m_bAutoUpdateFormat; + m_bAutoUpdateOnDirectFormat = rFormat.m_bAutoUpdateOnDirectFormat; if( auto pDerived = rFormat.DerivedFrom() ) { @@ -138,7 +138,7 @@ SwFormat &SwFormat::operator=(const SwFormat& rFormat) m_bAutoFormat = rFormat.m_bAutoFormat; m_bHidden = rFormat.m_bHidden; - m_bAutoUpdateFormat = rFormat.m_bAutoUpdateFormat; + m_bAutoUpdateOnDirectFormat = rFormat.m_bAutoUpdateOnDirectFormat; return *this; } diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 1d2bb17e3e54..64f4d7bee915 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -1680,7 +1680,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId ) aProtect.SetPosProtect( true ); aSet.Put( aProtect ); - pNewFormat->SetAutoUpdateFormat(); + pNewFormat->SetAutoUpdateOnDirectFormat(); } break; } diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index eeb752d8b0ba..79e372b8704f 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1862,9 +1862,9 @@ void SwXStyle::SetPropertyValue<FN_UNO_IS_AUTO_UPDATE>(const SfxItemPropertyMapE throw lang::IllegalArgumentException(); const bool bAuto(rValue.get<bool>()); if(SfxStyleFamily::Para == m_rEntry.m_eFamily) - o_rStyleBase.getNewBase()->GetCollection()->SetAutoUpdateFormat(bAuto); + o_rStyleBase.getNewBase()->GetCollection()->SetAutoUpdateOnDirectFormat(bAuto); else if(SfxStyleFamily::Frame == m_rEntry.m_eFamily) - o_rStyleBase.getNewBase()->GetFrameFormat()->SetAutoUpdateFormat(bAuto); + o_rStyleBase.getNewBase()->GetFrameFormat()->SetAutoUpdateOnDirectFormat(bAuto); } template<> void SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPropertyMapEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase) @@ -2238,8 +2238,8 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_IS_AUTO_UPDATE>(const SfxItemProperty PrepareStyleBase(rBase); switch(GetFamily()) { - case SfxStyleFamily::Para : return uno::Any(rBase.getNewBase()->GetCollection()->IsAutoUpdateFormat()); - case SfxStyleFamily::Frame: return uno::Any(rBase.getNewBase()->GetFrameFormat()->IsAutoUpdateFormat()); + case SfxStyleFamily::Para : return uno::Any(rBase.getNewBase()->GetCollection()->IsAutoUpdateOnDirectFormat()); + case SfxStyleFamily::Frame: return uno::Any(rBase.getNewBase()->GetFrameFormat()->IsAutoUpdateOnDirectFormat()); default: return uno::Any(); } } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index b6c198b03378..a0a2a70e06c5 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -645,7 +645,7 @@ void MSWordStyles::OutputStyle( const SwFormat* pFormat, sal_uInt16 nSlot) m_rExport.AttrOutput().StartStyle( aName, (bFormatColl ? STYLE_TYPE_PARA : STYLE_TYPE_CHAR), nBase, nWwNext, nWwLink, GetWWId( *pFormat ), nSlot, - pFormat->IsAutoUpdateFormat() ); + pFormat->IsAutoUpdateOnDirectFormat() ); if ( bFormatColl ) WriteProperties( pFormat, true, nSlot, nBase==0xfff ); // UPX.papx diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index eb80794d7ea5..63f301e0c727 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -1359,7 +1359,7 @@ SfxItemSet& SwDocStyleSheet::GetItemSet() OSL_ENSURE(m_pColl, "Where's Collection"); m_aCoreSet.Put(m_pColl->GetAttrSet()); m_aCoreSet.Put( aBoxInfo ); - m_aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, m_pColl->IsAutoUpdateFormat())); + m_aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, m_pColl->IsAutoUpdateOnDirectFormat())); if(m_pColl->DerivedFrom()) m_aCoreSet.SetParent(&m_pColl->DerivedFrom()->GetAttrSet()); @@ -1369,7 +1369,7 @@ SfxItemSet& SwDocStyleSheet::GetItemSet() OSL_ENSURE(m_pFrameFormat, "Where's FrameFormat"); m_aCoreSet.Put(m_pFrameFormat->GetAttrSet()); m_aCoreSet.Put( aBoxInfo ); - m_aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, m_pFrameFormat->IsAutoUpdateFormat())); + m_aCoreSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, m_pFrameFormat->IsAutoUpdateOnDirectFormat())); if(m_pFrameFormat->DerivedFrom()) m_aCoreSet.SetParent(&m_pFrameFormat->DerivedFrom()->GetAttrSet()); @@ -1485,7 +1485,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, OSL_ENSURE(m_pColl, "Where's Collection"); if(const SfxBoolItem* pAutoUpdate = rSet.GetItemIfSet(SID_ATTR_AUTO_STYLE_UPDATE,false)) { - m_pColl->SetAutoUpdateFormat(pAutoUpdate->GetValue()); + m_pColl->SetAutoUpdateOnDirectFormat(pAutoUpdate->GetValue()); } const SwCondCollItem* pCondItem = rSet.GetItemIfSet( FN_COND_COLL, false ); @@ -1605,7 +1605,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet, if(const SfxPoolItem* pAutoUpdate = rSet.GetItemIfSet(SID_ATTR_AUTO_STYLE_UPDATE,false)) { - m_pFrameFormat->SetAutoUpdateFormat(static_cast<const SfxBoolItem*>(pAutoUpdate)->GetValue()); + m_pFrameFormat->SetAutoUpdateOnDirectFormat(static_cast<const SfxBoolItem*>(pAutoUpdate)->GetValue()); } pFormat = m_pFrameFormat; } diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index f59a27dc07d0..228911e5ecea 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -297,7 +297,7 @@ bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) aSet.Put(aCol); // Template AutoUpdate SwFrameFormat* pFormat = m_pSh->GetSelectedFrameFormat(); - if(pFormat && pFormat->IsAutoUpdateFormat()) + if(pFormat && pFormat->IsAutoUpdateOnDirectFormat()) m_pSh->AutoUpdateFrame(pFormat, aSet); else m_pSh->SetFlyFrameAttr( aSet ); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 31f2c247b545..5e13fece9132 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2279,7 +2279,7 @@ void SwBaseShell::ExecTextCtrl( SfxRequest& rReq ) ( rSh.HasSelection() && rSh.IsSelFullPara() ) ) { SwTextFormatColl * pColl = rSh.GetCurTextFormatColl(); - if ( pColl && pColl->IsAutoUpdateFormat() ) + if ( pColl && pColl->IsAutoUpdateOnDirectFormat() ) { rSh.AutoUpdatePara( pColl, *pArgs ); bAuto = true; @@ -2568,7 +2568,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) // Template autoupdate SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat(); - if(pFormat && pFormat->IsAutoUpdateFormat()) + if(pFormat && pFormat->IsAutoUpdateOnDirectFormat()) { rSh.AutoUpdateFrame(pFormat, aCoreSet); } @@ -2581,7 +2581,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq) { SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); - if(pColl && pColl->IsAutoUpdateFormat()) + if(pColl && pColl->IsAutoUpdateOnDirectFormat()) { rSh.AutoUpdatePara(pColl, aCoreSet); } diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 15a9a0df6cf7..22fc3ce07db8 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -192,7 +192,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) aSet.Put(aCol); // Template AutoUpdate SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat(); - if(pFormat && pFormat->IsAutoUpdateFormat()) + if(pFormat && pFormat->IsAutoUpdateOnDirectFormat()) { rSh.AutoUpdateFrame(pFormat, aSet); } @@ -557,7 +557,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) // Template AutoUpdate SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat(); - if(pFormat && pFormat->IsAutoUpdateFormat()) + if(pFormat && pFormat->IsAutoUpdateOnDirectFormat()) { rSh.AutoUpdateFrame(pFormat, *pOutSet); // Anything which is not supported by the format must be set hard. @@ -714,7 +714,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) if ( bUpdateMgr ) { SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat(); - if ( bCopyToFormat && pFormat && pFormat->IsAutoUpdateFormat() ) + if ( bCopyToFormat && pFormat && pFormat->IsAutoUpdateOnDirectFormat() ) { rSh.AutoUpdateFrame(pFormat, aMgr.GetAttrSet()); } @@ -1244,7 +1244,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq) aFrameSet.Put( std::move(aBoxItem) ); // Template AutoUpdate SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat(); - if(pFormat && pFormat->IsAutoUpdateFormat()) + if(pFormat && pFormat->IsAutoUpdateOnDirectFormat()) { rSh.AutoUpdateFrame(pFormat, aFrameSet); } diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index caf1c0bc42b5..d102877bad6b 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -439,7 +439,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) // Templates AutoUpdate SwFrameFormat* pFormat = rSh.GetSelectedFrameFormat(); - if(pFormat && pFormat->IsAutoUpdateFormat()) + if(pFormat && pFormat->IsAutoUpdateOnDirectFormat()) { pFormat->SetFormatAttr(*pSet); SfxItemSetFixed< diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 3326993960e5..51d663e33715 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -238,7 +238,7 @@ static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std: aTmpSet.ClearItem(FN_PARAM_SELECTION); SwTextFormatColl* pColl = rWrtSh.GetCurTextFormatColl(); - if(bSel && rWrtSh.IsSelFullPara() && pColl && pColl->IsAutoUpdateFormat()) + if(bSel && rWrtSh.IsSelFullPara() && pColl && pColl->IsAutoUpdateOnDirectFormat()) { rWrtSh.AutoUpdatePara(pColl, aTmpSet); } @@ -289,7 +289,7 @@ static void sw_ParagraphDialogResult(SfxItemSet* pSet, SwWrtShell &rWrtSh, SfxRe rWrtSh.SetAttrSet(*pSet, SetAttrMode::DEFAULT, pPaM); rWrtSh.EndAction(); SwTextFormatColl* pColl = rWrtSh.GetPaMTextFormatColl(pPaM); - if(pColl && pColl->IsAutoUpdateFormat()) + if(pColl && pColl->IsAutoUpdateOnDirectFormat()) { rWrtSh.AutoUpdatePara(pColl, *pSet, pPaM); } diff --git a/sw/source/uibase/shells/txtattr.cxx b/sw/source/uibase/shells/txtattr.cxx index b42dcdc8adac..1dc70a6dc073 100644 --- a/sw/source/uibase/shells/txtattr.cxx +++ b/sw/source/uibase/shells/txtattr.cxx @@ -213,7 +213,7 @@ void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) if (rWrtSh.HasSelection() && rWrtSh.IsSelFullPara()) { pColl = rWrtSh.GetCurTextFormatColl(); - if ( pColl && !pColl->IsAutoUpdateFormat() ) + if ( pColl && !pColl->IsAutoUpdateOnDirectFormat() ) pColl = nullptr; } SfxItemPool& rPool = GetPool(); @@ -444,7 +444,7 @@ SET_LINESPACE: } SwWrtShell& rWrtSh = GetShell(); SwTextFormatColl* pColl = rWrtSh.GetCurTextFormatColl(); - if(pColl && pColl->IsAutoUpdateFormat()) + if(pColl && pColl->IsAutoUpdateOnDirectFormat()) { rWrtSh.AutoUpdatePara(pColl, aSet); } diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx index 3f33b3f404fa..54456e9714da 100644 --- a/sw/source/uibase/uiview/viewtab.cxx +++ b/sw/source/uibase/uiview/viewtab.cxx @@ -640,7 +640,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq ) ::MakeDefTabs( ::GetTabDist( rDefTabs ), aTabStops ); SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); - if( pColl && pColl->IsAutoUpdateFormat() ) + if( pColl && pColl->IsAutoUpdateOnDirectFormat() ) { SfxItemSetFixed<RES_PARATR_TABSTOP, RES_PARATR_TABSTOP> aTmp(GetPool()); aTmp.Put(aTabStops); @@ -769,7 +769,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq ) aParaMargin.SetWhich( nSlot ); GetViewFrame()->GetBindings().SetState( aParaMargin ); } - else if( pColl && pColl->IsAutoUpdateFormat() ) + else if( pColl && pColl->IsAutoUpdateOnDirectFormat() ) { SfxItemSetFixed<RES_LR_SPACE, RES_LR_SPACE> aSet(GetPool()); aSet.Put(aParaMargin); @@ -805,7 +805,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq ) const SvxTabStopItem& rDefTabs = rSh.GetDefault(RES_PARATR_TABSTOP); ::MakeDefTabs( ::GetTabDist(rDefTabs), *aTabStops ); - if( pColl && pColl->IsAutoUpdateFormat()) + if( pColl && pColl->IsAutoUpdateOnDirectFormat()) { SfxItemSetFixed<RES_PARATR_TABSTOP, RES_PARATR_TABSTOP> aSetTmp(GetPool()); aSetTmp.Put(std::move(aTabStops)); @@ -828,7 +828,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq ) aParaMargin.SetWhich( RES_UL_SPACE ); SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); - if( pColl && pColl->IsAutoUpdateFormat() ) + if( pColl && pColl->IsAutoUpdateOnDirectFormat() ) { SfxItemSetFixed<RES_UL_SPACE, RES_UL_SPACE> aSet(GetPool()); aSet.Put(aParaMargin); @@ -862,7 +862,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq ) aULSpace.SetLower( nLower ); SwTextFormatColl* pColl = rSh.GetCurTextFormatColl(); - if( pColl && pColl->IsAutoUpdateFormat() ) + if( pColl && pColl->IsAutoUpdateOnDirectFormat() ) { aULSpaceSet.Put( aULSpace ); rSh.AutoUpdatePara( pColl, aULSpaceSet ); |