2020-07-01 07:06:44 +00:00
|
|
|
From a76fcd9f9718b269c0c84534a75114433369bf92 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Caolán McNamara <caolanm@redhat.com>
|
|
|
|
Date: Mon, 29 Jun 2020 20:02:26 +0100
|
|
|
|
Subject: [PATCH] tdf#134360 some sidebar widgets getting stuck in a disabled state
|
|
|
|
|
|
|
|
Change-Id: I655525679dd2471e9d0c1a5af246901594b188ed
|
|
|
|
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97387
|
|
|
|
Tested-by: Jenkins
|
|
|
|
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
|
|
---
|
|
|
|
|
|
|
|
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
|
|
|
|
index 324a2e5..12a9eba 100644
|
|
|
|
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
|
|
|
|
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
|
|
|
|
@@ -254,7 +254,12 @@
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if( pState && eState >= SfxItemState::DEFAULT )
|
|
|
|
+ bool bDisabled = eState == SfxItemState::DISABLED;
|
|
|
|
+ mxLeftIndent->set_sensitive(!bDisabled);
|
|
|
|
+ mxRightIndent->set_sensitive(!bDisabled);
|
|
|
|
+ mxFLineIndent->set_sensitive(!bDisabled);
|
|
|
|
+
|
|
|
|
+ if (pState && eState >= SfxItemState::DEFAULT)
|
|
|
|
{
|
|
|
|
const SvxLRSpaceItem* pSpace = static_cast<const SvxLRSpaceItem*>(pState);
|
|
|
|
maTxtLeft = pSpace->GetTextLeft();
|
|
|
|
@@ -314,13 +319,7 @@
|
|
|
|
nfVal = static_cast<long>(mxFLineIndent->normalize( nfVal ));
|
|
|
|
mxFLineIndent->set_value( nfVal, FieldUnit::MM_100TH );
|
|
|
|
}
|
|
|
|
- else if( eState == SfxItemState::DISABLED )
|
|
|
|
- {
|
|
|
|
- mxLeftIndent->set_sensitive(false);
|
|
|
|
- mxRightIndent->set_sensitive(false);
|
|
|
|
- mxFLineIndent->set_sensitive(false);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
+ else if (eState != SfxItemState::DISABLED )
|
|
|
|
{
|
|
|
|
mxLeftIndent->set_text("");
|
|
|
|
mxRightIndent->set_text("");
|
|
|
|
@@ -335,6 +334,10 @@
|
|
|
|
mxTopDist->set_max( mxTopDist->normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) );
|
|
|
|
mxBottomDist->set_max( mxBottomDist->normalize( MAX_DURCH ), MapToFieldUnit(m_eULSpaceUnit) );
|
|
|
|
|
|
|
|
+ bool bDisabled = eState == SfxItemState::DISABLED;
|
|
|
|
+ mxTopDist->set_sensitive(!bDisabled);
|
|
|
|
+ mxBottomDist->set_sensitive(!bDisabled);
|
|
|
|
+
|
|
|
|
if( pState && eState >= SfxItemState::DEFAULT )
|
|
|
|
{
|
|
|
|
const SvxULSpaceItem* pOldItem = static_cast<const SvxULSpaceItem*>(pState);
|
|
|
|
@@ -355,12 +358,7 @@
|
|
|
|
nVal = mxBottomDist->normalize( nVal );
|
|
|
|
mxBottomDist->set_value( nVal, FieldUnit::MM_100TH );
|
|
|
|
}
|
|
|
|
- else if(eState == SfxItemState::DISABLED )
|
|
|
|
- {
|
|
|
|
- mxTopDist->set_sensitive(false);
|
|
|
|
- mxBottomDist->set_sensitive(false);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
+ else if (eState != SfxItemState::DISABLED )
|
|
|
|
{
|
|
|
|
mxTopDist->set_text("");
|
|
|
|
mxBottomDist->set_text("");
|
2020-07-02 06:15:02 +00:00
|
|
|
From c4eb732bc38156d2d6c373c6ce3520eecf323d32 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Caolán McNamara <caolanm@redhat.com>
|
|
|
|
Date: Tue, 30 Jun 2020 20:05:30 +0100
|
|
|
|
Subject: [PATCH] Related: tdf#134360 table row/height widgets can get stuck insensitive
|
|
|
|
|
|
|
|
Change-Id: I1be53f33f60c510757c67f1da8f863539ecbffdb
|
|
|
|
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97573
|
|
|
|
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
|
|
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
|
|
---
|
|
|
|
|
|
|
|
diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx b/sw/source/uibase/sidebar/TableEditPanel.cxx
|
|
|
|
index 4d76cc0..46f75cd 100644
|
|
|
|
--- a/sw/source/uibase/sidebar/TableEditPanel.cxx
|
|
|
|
+++ b/sw/source/uibase/sidebar/TableEditPanel.cxx
|
|
|
|
@@ -45,6 +45,9 @@
|
|
|
|
{
|
|
|
|
case SID_ATTR_TABLE_ROW_HEIGHT:
|
|
|
|
{
|
|
|
|
+ bool bDisabled = eState == SfxItemState::DISABLED;
|
|
|
|
+ m_xRowHeightEdit->set_sensitive(!bDisabled);
|
|
|
|
+
|
|
|
|
if (pState && eState >= SfxItemState::DEFAULT)
|
|
|
|
{
|
|
|
|
const SfxUInt32Item* pItem = static_cast<const SfxUInt32Item*>(pState);
|
|
|
|
@@ -55,18 +58,16 @@
|
|
|
|
m_xRowHeightEdit->set_value(nNewHeight, FieldUnit::TWIP);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- else if (eState == SfxItemState::DISABLED)
|
|
|
|
- {
|
|
|
|
- m_xRowHeightEdit->set_sensitive(false);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
+ else if (eState != SfxItemState::DISABLED)
|
|
|
|
m_xRowHeightEdit->set_text("");
|
|
|
|
- }
|
|
|
|
+
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case SID_ATTR_TABLE_COLUMN_WIDTH:
|
|
|
|
{
|
|
|
|
+ bool bDisabled = eState == SfxItemState::DISABLED;
|
|
|
|
+ m_xColumnWidthEdit->set_sensitive(!bDisabled);
|
|
|
|
+
|
|
|
|
if (pState && eState >= SfxItemState::DEFAULT)
|
|
|
|
{
|
|
|
|
const SfxUInt32Item* pItem = static_cast<const SfxUInt32Item*>(pState);
|
|
|
|
@@ -77,14 +78,9 @@
|
|
|
|
m_xColumnWidthEdit->set_value(nNewWidth, FieldUnit::TWIP);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- else if (eState == SfxItemState::DISABLED)
|
|
|
|
- {
|
|
|
|
- m_xColumnWidthEdit->set_sensitive(false);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
+ else if (eState != SfxItemState::DISABLED)
|
|
|
|
m_xColumnWidthEdit->set_text("");
|
|
|
|
- }
|
|
|
|
+
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|