diff options
Diffstat (limited to 'editeng/source/uno/unofored.cxx')
-rw-r--r-- | editeng/source/uno/unofored.cxx | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 49eb5368e7a3..fa2fa96118bf 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -124,6 +124,20 @@ void SvxEditEngineForwarder::GetPortions( sal_Int32 nPara, std::vector<sal_Int32 rEditEngine.GetPortions( nPara, rList ); } +OUString SvxEditEngineForwarder::GetStyleSheet(sal_Int32 nPara) const +{ + if (auto pStyle = rEditEngine.GetStyleSheet(nPara)) + return pStyle->GetName(); + return OUString(); +} + +void SvxEditEngineForwarder::SetStyleSheet(sal_Int32 nPara, const OUString& rStyleName) +{ + auto pStyleSheetPool = rEditEngine.GetStyleSheetPool(); + if (auto pStyle = pStyleSheetPool ? pStyleSheetPool->Find(rStyleName, SfxStyleFamily::Para) : nullptr) + rEditEngine.SetStyleSheet(nPara, static_cast<SfxStyleSheet*>(pStyle)); +} + void SvxEditEngineForwarder::QuickInsertText( const OUString& rText, const ESelection& rSel ) { rEditEngine.QuickInsertText( rText, rSel ); @@ -151,9 +165,9 @@ bool SvxEditEngineForwarder::IsValid() const return rEditEngine.IsUpdateLayout(); } -OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor ) +OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor, std::optional<FontLineStyle>& rpFldLineStyle ) { - return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor ); + return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle ); } void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField ) @@ -214,7 +228,7 @@ SfxItemState GetSvxEditEngineItemState( EditEngine const & rEditEngine, const ES { // ... and its different to this one than the state is don't care if(*pParaItem != *(attrib.pAttr)) - return SfxItemState::DONTCARE; + return SfxItemState::INVALID; } else pParaItem = attrib.pAttr; @@ -234,7 +248,7 @@ SfxItemState GetSvxEditEngineItemState( EditEngine const & rEditEngine, const ES if( bEmpty ) eParaState = SfxItemState::DEFAULT; else if( bGaps ) - eParaState = SfxItemState::DONTCARE; + eParaState = SfxItemState::INVALID; else eParaState = SfxItemState::SET; @@ -242,7 +256,7 @@ SfxItemState GetSvxEditEngineItemState( EditEngine const & rEditEngine, const ES if( pLastItem ) { if( (pParaItem == nullptr) || (*pLastItem != *pParaItem) ) - return SfxItemState::DONTCARE; + return SfxItemState::INVALID; } else { @@ -267,7 +281,7 @@ SfxItemState SvxEditEngineForwarder::GetItemState( sal_Int32 nPara, sal_uInt16 n LanguageType SvxEditEngineForwarder::GetLanguage( sal_Int32 nPara, sal_Int32 nIndex ) const { - return rEditEngine.GetLanguage(nPara, nIndex); + return rEditEngine.GetLanguage(nPara, nIndex).nLang; } sal_Int32 SvxEditEngineForwarder::GetFieldCount( sal_Int32 nPara ) const |