cui/source/inc/chardlg.hxx | 1 cui/source/tabpages/chardlg.cxx | 58 -------------------------- cui/uiconfig/ui/effectspage.ui | 32 +++----------- sw/qa/uitest/writer_tests2/formatCharacter.py | 4 - sw/qa/uitest/writer_tests5/tdf122722.py | 2 sw/source/core/text/inftxt.cxx | 35 --------------- 6 files changed, 8 insertions(+), 124 deletions(-)
New commits: commit 1eb6210d678bbb0c875f0f72bd876a9e7795dfbe Author: Gabor Kelemen <kelemen.gab...@nisz.hu> AuthorDate: Thu Apr 23 00:39:33 2020 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed May 6 09:14:33 2020 +0200 tdf#132373 Remove blinking character property from the UI/editor So far from document body and Character properties tab only. Importing and exporting existing files still works. Change-Id: I42179b47c64fe5c7db0393d0d4373363d772b51e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92875 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tie...@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 05e655855b4e..06007847e9f2 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -178,7 +178,6 @@ private: std::unique_ptr<weld::ComboBox> m_xReliefLB; std::unique_ptr<weld::CheckButton> m_xOutlineBtn; std::unique_ptr<weld::CheckButton> m_xShadowBtn; - std::unique_ptr<weld::CheckButton> m_xBlinkingBtn; std::unique_ptr<weld::CheckButton> m_xHiddenBtn; std::unique_ptr<weld::ComboBox> m_xOverlineLB; std::unique_ptr<weld::Label> m_xOverlineColorFT; diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 11aaf87aa0fc..307be4f93e22 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1326,7 +1326,6 @@ SvxCharEffectsPage::SvxCharEffectsPage(weld::Container* pPage, weld::DialogContr , m_xReliefLB(m_xBuilder->weld_combo_box("relieflb")) , m_xOutlineBtn(m_xBuilder->weld_check_button("outlinecb")) , m_xShadowBtn(m_xBuilder->weld_check_button("shadowcb")) - , m_xBlinkingBtn(m_xBuilder->weld_check_button("blinkingcb")) , m_xHiddenBtn(m_xBuilder->weld_check_button("hiddencb")) , m_xOverlineLB(m_xBuilder->weld_combo_box("overlinelb")) , m_xOverlineColorFT(m_xBuilder->weld_label("overlinecolorft")) @@ -2004,33 +2003,6 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) } } - // Blinking - nWhich = GetWhich( SID_ATTR_FLASH ); - eState = rSet->GetItemState( nWhich ); - - switch ( eState ) - { - case SfxItemState::UNKNOWN: - m_xBlinkingBtn->hide(); - break; - - case SfxItemState::DISABLED: - case SfxItemState::READONLY: - m_xBlinkingBtn->set_sensitive(false); - break; - - case SfxItemState::DONTCARE: - m_xBlinkingBtn->set_state( TRISTATE_INDET ); - break; - - case SfxItemState::DEFAULT: - case SfxItemState::SET: - { - const SvxBlinkItem& rItem = static_cast<const SvxBlinkItem&>(rSet->Get( nWhich )); - m_xBlinkingBtn->set_state( static_cast<TriState>(rItem.GetValue()) ); - break; - } - } // Hidden nWhich = GetWhich( SID_ATTR_CHAR_HIDDEN ); eState = rSet->GetItemState( nWhich ); @@ -2081,7 +2053,6 @@ void SvxCharEffectsPage::ChangesApplied() m_xReliefLB->save_value(); m_xOutlineBtn->save_state(); m_xShadowBtn->save_state(); - m_xBlinkingBtn->save_state(); m_xHiddenBtn->save_state(); m_xFontTransparencyMtr->save_value(); } @@ -2355,30 +2326,6 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) bChanged = true; - // Blinking - nWhich = GetWhich( SID_ATTR_FLASH ); - pOld = GetOldItem( *rSet, SID_ATTR_FLASH ); - eState = m_xBlinkingBtn->get_state(); - - if ( pOld ) - { - const SvxBlinkItem& rItem = *static_cast<const SvxBlinkItem*>(pOld); - if ( rItem.GetValue() == StateToAttr( eState ) && m_xBlinkingBtn->get_saved_state() == eState ) - bChanged = false; - } - - if ( !bChanged && pExampleSet && pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET && - !StateToAttr( eState ) && static_cast<const SvxBlinkItem*>(pItem)->GetValue() ) - bChanged = true; - - if ( bChanged && eState != TRISTATE_INDET ) - { - rSet->Put( SvxBlinkItem( StateToAttr( eState ), nWhich ) ); - bModified = true; - } - else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) - rSet->InvalidateItem(nWhich); - // Hidden nWhich = GetWhich( SID_ATTR_CHAR_HIDDEN ); pOld = GetOldItem( *rSet, SID_ATTR_CHAR_HIDDEN ); @@ -2420,9 +2367,6 @@ void SvxCharEffectsPage::DisableControls( sal_uInt16 nDisable ) if ( ( DISABLE_WORDLINE & nDisable ) == DISABLE_WORDLINE ) m_xIndividualWordsBtn->set_sensitive(false); - if ( ( DISABLE_BLINK & nDisable ) == DISABLE_BLINK ) - m_xBlinkingBtn->set_sensitive(false); - if ( ( DISABLE_UNDERLINE_COLOR & nDisable ) == DISABLE_UNDERLINE_COLOR ) { // disable the controls @@ -2443,8 +2387,6 @@ void SvxCharEffectsPage::PageCreated(const SfxAllItemSet& aSet) return; sal_uInt32 nFlags=pFlagItem->GetValue(); - if ( ( nFlags & SVX_ENABLE_FLASH ) == SVX_ENABLE_FLASH ) - m_xBlinkingBtn->show(); if ( ( nFlags & SVX_PREVIEW_CHARACTER ) == SVX_PREVIEW_CHARACTER ) // the writer uses SID_ATTR_BRUSH as font background m_bPreviewBackgroundToCharacter = true; diff --git a/cui/uiconfig/ui/effectspage.ui b/cui/uiconfig/ui/effectspage.ui index 401d7f2fa00d..7bc06c9844ac 100644 --- a/cui/uiconfig/ui/effectspage.ui +++ b/cui/uiconfig/ui/effectspage.ui @@ -2,6 +2,11 @@ <!-- Generated with glade 3.22.1 --> <interface domain="cui"> <requires lib="gtk+" version="3.18"/> + <object class="GtkAdjustment" id="adjustmentPercent"> + <property name="upper">100</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> <object class="GtkGrid" id="EffectsPage"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -222,22 +227,6 @@ <property name="top_attach">1</property> </packing> </child> - <child> - <object class="GtkCheckButton" id="blinkingcb"> - <property name="label" translatable="yes" context="effectspage|blinkingcb">Blinking</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="xalign">0</property> - <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> - </packing> - </child> <child> <object class="GtkCheckButton" id="hiddencb"> <property name="label" translatable="yes" context="effectspage|hiddencb">Hidden</property> @@ -266,6 +255,9 @@ <child> <placeholder/> </child> + <child> + <placeholder/> + </child> </object> </child> </object> @@ -431,7 +423,6 @@ <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="draw_indicator">True</property> - <property name="label" translatable="no"></property> <child> <placeholder/> </child> @@ -447,7 +438,6 @@ <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="draw_indicator">True</property> - <property name="label" translatable="no"></property> <child> <placeholder/> </child> @@ -561,7 +551,6 @@ <property name="can_focus">True</property> <property name="receives_default">False</property> <property name="draw_indicator">True</property> - <property name="label" translatable="no"></property> <child> <placeholder/> </child> @@ -662,9 +651,4 @@ <widget name="fontcolorlb"/> </widgets> </object> - <object class="GtkAdjustment" id="adjustmentPercent"> - <property name="upper">100</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> - </object> </interface> diff --git a/sw/qa/uitest/writer_tests2/formatCharacter.py b/sw/qa/uitest/writer_tests2/formatCharacter.py index 885f88ad3981..e1da1d2cb73b 100644 --- a/sw/qa/uitest/writer_tests2/formatCharacter.py +++ b/sw/qa/uitest/writer_tests2/formatCharacter.py @@ -77,7 +77,6 @@ class formatCharacter(UITestCase): xEffects = xDialog.getChild("effectslb") xRelief = xDialog.getChild("relieflb") - xBlinking = xDialog.getChild("blinkingcb") xHidden = xDialog.getChild("hiddencb") xOverline = xDialog.getChild("overlinelb") xStrikeout = xDialog.getChild("strikeoutlb") @@ -87,7 +86,6 @@ class formatCharacter(UITestCase): select_pos(xEffects, "1") select_pos(xRelief, "1") - xBlinking.executeAction("CLICK", tuple()) xHidden.executeAction("CLICK", tuple()) select_pos(xOverline, "1") select_pos(xStrikeout, "1") @@ -105,7 +103,6 @@ class formatCharacter(UITestCase): xEffects = xDialog.getChild("effectslb") xRelief = xDialog.getChild("relieflb") - xBlinking = xDialog.getChild("blinkingcb") xHidden = xDialog.getChild("hiddencb") xOverline = xDialog.getChild("overlinelb") xStrikeout = xDialog.getChild("strikeoutlb") @@ -115,7 +112,6 @@ class formatCharacter(UITestCase): self.assertEqual(get_state_as_dict(xEffects)["SelectEntryText"], "UPPERCASE") self.assertEqual(get_state_as_dict(xRelief)["SelectEntryText"], "Embossed") - self.assertEqual(get_state_as_dict(xBlinking)["Selected"], "true") self.assertEqual(get_state_as_dict(xHidden)["Selected"], "true") self.assertEqual(get_state_as_dict(xOverline)["SelectEntryText"], "Single") self.assertEqual(get_state_as_dict(xStrikeout)["SelectEntryText"], "Single") diff --git a/sw/qa/uitest/writer_tests5/tdf122722.py b/sw/qa/uitest/writer_tests5/tdf122722.py index 3edd2e14e0cf..cbc46e09c17b 100644 --- a/sw/qa/uitest/writer_tests5/tdf122722.py +++ b/sw/qa/uitest/writer_tests5/tdf122722.py @@ -38,7 +38,6 @@ class tdf122722(UITestCase): xEffects = xDialog.getChild("effectslb") xRelief = xDialog.getChild("relieflb") - xBlinking = xDialog.getChild("blinkingcb") xHidden = xDialog.getChild("hiddencb") xOverline = xDialog.getChild("overlinelb") xStrikeout = xDialog.getChild("strikeoutlb") @@ -58,7 +57,6 @@ class tdf122722(UITestCase): xEffects = xDialog.getChild("effectslb") xRelief = xDialog.getChild("relieflb") - xBlinking = xDialog.getChild("blinkingcb") xHidden = xDialog.getChild("hiddencb") xOverline = xDialog.getChild("overlinelb") xStrikeout = xDialog.getChild("strikeoutlb") diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 5cebec8c1e18..797110ceaf45 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -50,13 +50,11 @@ #include <paratr.hxx> #include <rootfrm.hxx> #include "inftxt.hxx" -#include <blink.hxx> #include <noteurl.hxx> #include "porftn.hxx" #include "porrst.hxx" #include "itratr.hxx" #include "portab.hxx" -#include <accessibilityoptions.hxx> #include <wrong.hxx> #include <doc.hxx> #include <pam.hxx> @@ -630,39 +628,6 @@ void SwTextPaintInfo::DrawText_( const OUString &rText, const SwLinePortion &rPo if( !nLength ) return; - if( GetFont()->IsBlink() && OnWin() && rPor.Width() ) - { - // check if accessibility options allow blinking portions: - const SwViewShell* pSh = GetTextFrame()->getRootFrame()->GetCurrShell(); - if ( pSh && ! pSh->GetAccessibilityOptions()->IsStopAnimatedText() && - ! pSh->IsPreview() ) - { - if( !pBlink ) - pBlink = new SwBlink(); - - Point aPoint( aPos ); - - if ( GetTextFrame()->IsRightToLeft() ) - GetTextFrame()->SwitchLTRtoRTL( aPoint ); - - if ( ComplexTextLayoutFlags::BiDiStrong != GetOut()->GetLayoutMode() ) - aPoint.AdjustX( -(rPor.Width()) ); - - if ( GetTextFrame()->IsVertical() ) - GetTextFrame()->SwitchHorizontalToVertical( aPoint ); - - pBlink->Insert( aPoint, &rPor, GetTextFrame(), m_pFnt->GetOrientation() ); - - if( !pBlink->IsVisible() ) - return; - } - else - { - delete pBlink; - pBlink = nullptr; - } - } - // The SwScriptInfo is useless if we are inside a field portion SwScriptInfo* pSI = nullptr; if ( ! rPor.InFieldGrp() ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits