summaryrefslogtreecommitdiff
path: root/sc/source/ui/condformat
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-15 08:13:49 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-16 09:11:29 +0000
commit6f1313b3d44ea54e9a331e0fc00871081fa662fe (patch)
treefa6d9b6da04daedcb63ea2a0bc8c414288ed8bc6 /sc/source/ui/condformat
parent14bf708ef586b15dffed66ffaf524baf4d8fcbfa (diff)
convert Link<> to typed
Change-Id: Icbba339dac0be31e30dff021bba06a219f8aecd6 Reviewed-on: https://gerrit.libreoffice.org/19405 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui/condformat')
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx9
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx23
2 files changed, 15 insertions, 17 deletions
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 540bfdea18db..91136716e8bc 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -769,19 +769,18 @@ OUString ScCondFormatDlg::GenerateXmlString(sal_uInt32 nIndex, sal_uInt8 nType,
}
-IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit*, pEdit )
+IMPL_LINK_TYPED( ScCondFormatDlg, EdRangeModifyHdl, Edit&, rEdit, void )
{
- OUString aRangeStr = pEdit->GetText();
+ OUString aRangeStr = rEdit.GetText();
ScRangeList aRange;
sal_uInt16 nFlags = aRange.Parse(aRangeStr, mpViewData->GetDocument(),
SCA_VALID, mpViewData->GetDocument()->GetAddressConvention());
if(nFlags & SCA_VALID)
- pEdit->SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
+ rEdit.SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
else
- pEdit->SetControlBackground(COL_LIGHTRED);
+ rEdit.SetControlBackground(COL_LIGHTRED);
updateTitle();
- return 0;
}
IMPL_LINK_TYPED( ScCondFormatDlg, RangeGetFocusHdl, Control&, rControl, void )
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 120e1d633a0d..5edd574fd269 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -224,15 +224,15 @@ ScConditionFrmtEntry::ScConditionFrmtEntry( vcl::Window* pParent, ScDocument* pD
maEdVal1->Show();
maEdVal1->SetText(pFormatEntry->GetExpression(maPos, 0));
maEdVal2->Hide();
- OnEdChanged(maEdVal1);
+ OnEdChanged(*maEdVal1);
break;
case 2:
maEdVal1->Show();
maEdVal1->SetText(pFormatEntry->GetExpression(maPos, 0));
- OnEdChanged(maEdVal1);
+ OnEdChanged(*maEdVal1);
maEdVal2->Show();
maEdVal2->SetText(pFormatEntry->GetExpression(maPos, 1));
- OnEdChanged(maEdVal2);
+ OnEdChanged(*maEdVal2);
break;
}
}
@@ -296,14 +296,14 @@ ScFormatEntry* ScConditionFrmtEntry::createConditionEntry() const
return pEntry;
}
-IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit*, pEdit)
+IMPL_LINK_TYPED(ScConditionFrmtEntry, OnEdChanged, Edit&, rEdit, void)
{
- OUString aFormula = pEdit->GetText();
+ OUString aFormula = rEdit.GetText();
if( aFormula.isEmpty() )
{
maFtVal->SetText(ScGlobal::GetRscString(STR_ENTER_VALUE));
- return 0;
+ return;
}
ScCompiler aComp( mpDoc, maPos );
@@ -313,9 +313,9 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit*, pEdit)
// Error, warn the user
if( ta->GetCodeError() || ( ta->GetLen() == 0 ) )
{
- pEdit->SetControlBackground(COL_LIGHTRED);
+ rEdit.SetControlBackground(COL_LIGHTRED);
maFtVal->SetText(ScGlobal::GetRscString(STR_VALID_DEFERROR));
- return 0;
+ return;
}
// Recognized col/row name or string token, warn the user
@@ -326,14 +326,13 @@ IMPL_LINK(ScConditionFrmtEntry, OnEdChanged, Edit*, pEdit)
( ( op == ocBad ) && ( t == formula::svString ) )
)
{
- pEdit->SetControlBackground(COL_YELLOW);
+ rEdit.SetControlBackground(COL_YELLOW);
maFtVal->SetText(ScGlobal::GetRscString(STR_UNQUOTED_STRING));
- return 0;
+ return;
}
- pEdit->SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
+ rEdit.SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor());
maFtVal->SetText("");
- return 0;
}
void ScConditionFrmtEntry::Select()