Kaydet (Commit) 7b5ded5e authored tarafından Markus Mohrhard's avatar Markus Mohrhard

set correct range as title + update for (not) between

Change-Id: I4b819920417c1b2c67b27295170c7a56108fef64
üst 796e1882
......@@ -217,6 +217,7 @@ ScCondFrmtEntry::ScCondFrmtEntry(Window* pParent, ScDocument* pDoc, const ScForm
maLbStyle.SelectEntry(aStyleName);
ScConditionMode eMode = pEntry->GetOperation();
maLbType.SelectEntryPos(1);
maEdVal1.SetText(pEntry->GetExpression(maPos, 0));
switch(eMode)
{
case SC_COND_EQUAL:
......@@ -238,9 +239,11 @@ ScCondFrmtEntry::ScCondFrmtEntry(Window* pParent, ScDocument* pDoc, const ScForm
maLbCondType.SelectEntryPos(5);
break;
case SC_COND_BETWEEN:
maEdVal2.SetText(pEntry->GetExpression(maPos, 1));
maLbCondType.SelectEntryPos(6);
break;
case SC_COND_NOTBETWEEN:
maEdVal2.SetText(pEntry->GetExpression(maPos, 1));
maLbCondType.SelectEntryPos(7);
break;
case SC_COND_DUPLICATE:
......@@ -374,6 +377,7 @@ void ScCondFrmtEntry::Init()
maBtOptions.SetClickHdl( LINK( this, ScCondFrmtEntry, OptionBtnHdl ) );
maLbDataBarMinType.SetSelectHdl( LINK( this, ScCondFrmtEntry, DataBarTypeSelectHdl ) );
maLbDataBarMaxType.SetSelectHdl( LINK( this, ScCondFrmtEntry, DataBarTypeSelectHdl ) );
maLbCondType.SetSelectHdl( LINK( this, ScCondFrmtEntry, ConditionTypeSelectHdl ) );
mpDataBarData.reset(new ScDataBarFormatData());
mpDataBarData->mpUpperLimit.reset(new ScColorScaleEntry());
......@@ -860,6 +864,23 @@ IMPL_LINK_NOARG( ScCondFrmtEntry, OptionBtnHdl )
return 0;
}
IMPL_LINK_NOARG( ScCondFrmtEntry, ConditionTypeSelectHdl )
{
if(maLbCondType.GetSelectEntryPos() == 6 || maLbCondType.GetSelectEntryPos() == 7)
{
std::cout << "OldSize: " << maEdVal1.GetSizePixel().Width() << " " << maEdVal1.GetSizePixel().Height() << std::endl;
maEdVal1.SetSizePixel(maEdVal2.GetSizePixel());
maEdVal2.Show();
}
else
{
maEdVal2.Hide();
Size aSize(193, 30);
maEdVal1.SetSizePixel(aSize);
}
return 0;
}
ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocument* pDoc):
Control(pParent, rResId),
mbHasScrollBar(false),
......@@ -981,7 +1002,7 @@ ScCondFormatDlg::ScCondFormatDlg(Window* pParent, ScDocument* pDoc, const ScCond
rtl::OUStringBuffer aTitle( GetText() );
aTitle.append(rtl::OUString(" "));
rtl::OUString aRangeString;
rRange.Format(aRangeString, 0, pDoc);
rRange.Format(aRangeString, SCA_VALID, pDoc, pDoc->GetAddressConvention());
aTitle.append(aRangeString);
SetText(aTitle.makeStringAndClear());
maBtnAdd.SetClickHdl( LINK( &maCondFormList, ScCondFormatList, AddBtnHdl ) );
......
......@@ -5075,7 +5075,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor
ScMarkData aMarkData;
aMarkData.MarkFromRangeList(rRanges, true);
pDoc->ApplySelectionPattern( aPattern , aMarkData );
size_t n = rRanges.size()
size_t n = rRanges.size();
for(size_t i = 0; i < n; ++i)
pFormat->DoRepaint(rRanges[i]);
}
......
......@@ -126,6 +126,7 @@ private:
DECL_LINK( StyleSelectHdl, void* );
DECL_LINK( OptionBtnHdl, void* );
DECL_LINK( DataBarTypeSelectHdl, void* );
DECL_LINK( ConditionTypeSelectHdl, void* );
public:
ScCondFrmtEntry( Window* pParent, ScDocument* pDoc );
......
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