Kaydet (Commit) bbb1975d authored tarafından Noel Grandin's avatar Noel Grandin

convert WB_FORCECTRLBACKGROUND to bool field on Edit

Change-Id: I7a8731635bd22926df98cd70c8bb850408c1854c
Reviewed-on: https://gerrit.libreoffice.org/43076Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst aec9462c
......@@ -241,8 +241,8 @@ DataSourceTabPage::DataSourceTabPage(
m_pEDT_CATEGORIES->SetUpdateDataHdl( LINK( this, DataSourceTabPage, RangeUpdateDataHdl ));
// #i75179# enable setting the background to a different color
m_pEDT_RANGE->SetStyle( m_pEDT_RANGE->GetStyle() | WB_FORCECTRLBACKGROUND );
m_pEDT_CATEGORIES->SetStyle( m_pEDT_CATEGORIES->GetStyle() | WB_FORCECTRLBACKGROUND );
m_pEDT_RANGE->SetForceControlBackground(true);
m_pEDT_CATEGORIES->SetForceControlBackground(true);
// set symbol font for arrows
// note: StarSymbol is substituted to OpenSymbol for OOo
......
......@@ -112,7 +112,7 @@ RangeChooserTabPage::RangeChooserTabPage( vcl::Window* pParent
m_pIB_Range->SetClickHdl( LINK( this, RangeChooserTabPage, ChooseRangeHdl ));
// #i75179# enable setting the background to a different color
m_pED_Range->SetStyle( m_pED_Range->GetStyle() | WB_FORCECTRLBACKGROUND );
m_pED_Range->SetForceControlBackground(true);
m_pED_Range->SetUpdateDataHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ));
m_pED_Range->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlEditedHdl ));
......
......@@ -198,7 +198,6 @@ WinBits const WB_EARLYTOGGLE = SAL_CONST_INT64(0x4000000000);
WinBits const WB_PASSWORD = 0x01000000;
WinBits const WB_READONLY = 0x02000000;
WinBits const WB_NOHIDESELECTION = SAL_CONST_INT64(0x1000000000);
WinBits const WB_FORCECTRLBACKGROUND = 0x80000000;
// Window-Bits for MultiLineEdit
WinBits const WB_IGNORETAB = 0x20000000;
......
......@@ -89,7 +89,8 @@ private:
mbInsertMode:1,
mbClickedInSelection:1,
mbIsSubEdit:1,
mbActivePopup:1;
mbActivePopup:1,
mbForceControlBackground:1;
Link<Edit&,void> maModifyHdl;
Link<Edit&,void> maUpdateDataHdl;
Link<Edit&,void> maAutocompleteHdl;
......@@ -266,6 +267,8 @@ public:
// returns the minimum size a bordered Edit should have given the current
// global style settings (needed by sc's inputwin.cxx)
static Size GetMinimumEditSize();
void SetForceControlBackground(bool b) { mbForceControlBackground = b; }
};
#endif // INCLUDED_VCL_EDIT_HXX
......
......@@ -270,8 +270,8 @@ void ScConditionFrmtEntry::Init(ScCondFormatDlg* pDialogParent)
maEdVal1->SetGetFocusHdl( LINK( pDialogParent, ScCondFormatDlg, RangeGetFocusHdl ) );
maEdVal2->SetGetFocusHdl( LINK( pDialogParent, ScCondFormatDlg, RangeGetFocusHdl ) );
maEdVal1->SetStyle( maEdVal1->GetStyle() | WB_FORCECTRLBACKGROUND );
maEdVal2->SetStyle( maEdVal2->GetStyle() | WB_FORCECTRLBACKGROUND );
maEdVal1->SetForceControlBackground(true);
maEdVal2->SetForceControlBackground(true);
maEdVal1->SetModifyHdl( LINK( this, ScConditionFrmtEntry, OnEdChanged ) );
maEdVal2->SetModifyHdl( LINK( this, ScConditionFrmtEntry, OnEdChanged ) );
......
......@@ -282,6 +282,7 @@ void Edit::ImplInitEditData()
mbClickedInSelection = false;
mbActivePopup = false;
mbIsSubEdit = false;
mbForceControlBackground = false;
mpDDInfo = nullptr;
mpIMEInfos = nullptr;
mcEchoChar = 0;
......@@ -512,7 +513,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangl
rRenderContext.SetTextColor(rStyleSettings.GetDisableColor());
// Set background color of the normal text
if ((GetStyle() & WB_FORCECTRLBACKGROUND) != 0 && IsControlBackground())
if (mbForceControlBackground && IsControlBackground())
{
// check if we need to set ControlBackground even in NWF case
rRenderContext.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
......@@ -584,7 +585,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const tools::Rectangl
// Set background color when part of the text is selected
if (ImplUseNativeBorder(rRenderContext, GetStyle()))
{
if( (GetStyle() & WB_FORCECTRLBACKGROUND) != 0 && IsControlBackground() )
if( mbForceControlBackground && IsControlBackground() )
rRenderContext.SetTextFillColor(GetControlBackground());
else
rRenderContext.SetTextFillColor();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment