diff options
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/SpellDialog.cxx | 13 | ||||
-rw-r--r-- | cui/source/inc/SpellDialog.hxx | 3 | ||||
-rw-r--r-- | cui/source/tabpages/paragrph.cxx | 10 |
3 files changed, 18 insertions, 8 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index dfdad984ec..9dd877f80c 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1152,6 +1152,13 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) m_xEditEngine->SetStatusEventHdl(LINK(this, SentenceEditWindow_Impl, EditStatusHdl)); + SetDocumentColor(pDrawingArea); +} + +void SentenceEditWindow_Impl::SetDocumentColor(weld::DrawingArea* pDrawingArea) +{ + if (!pDrawingArea || !m_xEditView || !m_xEditEngine) + return; // tdf#142631 use document background color in this widget Color aBgColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; OutputDevice& rDevice = pDrawingArea->get_ref_device(); @@ -1160,6 +1167,12 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) m_xEditEngine->SetBackgroundColor(aBgColor); } +void SentenceEditWindow_Impl::StyleUpdated() +{ + SetDocumentColor(GetDrawingArea()); + WeldEditView::StyleUpdated(); +} + IMPL_LINK_NOARG(SentenceEditWindow_Impl, EditStatusHdl, EditStatus&, void) { SetScrollBarRange(); diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index fdf5e81bcd..81d68e2143 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -71,6 +71,7 @@ private: protected: virtual bool KeyInput( const KeyEvent& rKEvt ) override; + virtual void StyleUpdated() override; public: SentenceEditWindow_Impl(std::unique_ptr<weld::ScrolledWindow> xScrolledWindow); @@ -120,6 +121,8 @@ public: void MoveErrorEnd(tools::Long nOffset); void ResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); } + + void SetDocumentColor(weld::DrawingArea* pDrawingArea); }; // class SvxSpellDialog --------------------------------------------- diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 132b125f02..7675f1f7f0 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1774,14 +1774,8 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) if (m_xAllowSplitBox->get_state_changed_from_saved()) { - pOld = GetOldItem( *rOutSet, SID_ATTR_PARA_SPLIT ); - - if ( !pOld || static_cast<const SvxFormatSplitItem*>(pOld)->GetValue() != - ( eState == TRISTATE_FALSE ) ) - { - rOutSet->Put( SvxFormatSplitItem( eState == TRISTATE_FALSE, _nWhich ) ); - bModified = true; - } + rOutSet->Put( SvxFormatSplitItem( eState == TRISTATE_TRUE, _nWhich ) ); + bModified = true; } // keep paragraphs |