replace tabs with spaces
Change-Id: If93a7f9e7dcebed887e31c8a4bd454b7f709ba33
This commit is contained in:
@@ -59,28 +59,28 @@ namespace {
|
|||||||
void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Edit& rEdit, ColorListBox& rLbCol )
|
void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Edit& rEdit, ColorListBox& rLbCol )
|
||||||
{
|
{
|
||||||
if(rEntry.GetMin())
|
if(rEntry.GetMin())
|
||||||
rLbType.SelectEntryPos(0);
|
rLbType.SelectEntryPos(0);
|
||||||
else if(rEntry.GetMax())
|
else if(rEntry.GetMax())
|
||||||
rLbType.SelectEntryPos(1);
|
rLbType.SelectEntryPos(1);
|
||||||
else if(rEntry.GetPercentile())
|
else if(rEntry.GetPercentile())
|
||||||
{
|
{
|
||||||
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
||||||
rLbType.SelectEntryPos(2);
|
rLbType.SelectEntryPos(2);
|
||||||
}
|
}
|
||||||
else if(rEntry.GetPercent())
|
else if(rEntry.GetPercent())
|
||||||
{
|
{
|
||||||
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
||||||
rLbType.SelectEntryPos(4);
|
rLbType.SelectEntryPos(4);
|
||||||
}
|
}
|
||||||
else if(rEntry.HasFormula())
|
else if(rEntry.HasFormula())
|
||||||
{
|
{
|
||||||
rEdit.SetText(rEntry.GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
|
rEdit.SetText(rEntry.GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
|
||||||
rLbType.SelectEntryPos(5);
|
rLbType.SelectEntryPos(5);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
||||||
rLbType.SelectEntryPos(3);
|
rLbType.SelectEntryPos(3);
|
||||||
}
|
}
|
||||||
rLbCol.SelectEntry(rEntry.GetColor());
|
rLbCol.SelectEntry(rEntry.GetColor());
|
||||||
}
|
}
|
||||||
@@ -88,28 +88,28 @@ void SetColorScaleEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType,
|
|||||||
void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Edit& rEdit )
|
void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Edit& rEdit )
|
||||||
{
|
{
|
||||||
if(rEntry.GetMin())
|
if(rEntry.GetMin())
|
||||||
rLbType.SelectEntryPos(0);
|
rLbType.SelectEntryPos(0);
|
||||||
else if(rEntry.GetMax())
|
else if(rEntry.GetMax())
|
||||||
rLbType.SelectEntryPos(1);
|
rLbType.SelectEntryPos(1);
|
||||||
else if(rEntry.GetPercentile())
|
else if(rEntry.GetPercentile())
|
||||||
{
|
{
|
||||||
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
||||||
rLbType.SelectEntryPos(2);
|
rLbType.SelectEntryPos(2);
|
||||||
}
|
}
|
||||||
else if(rEntry.GetPercent())
|
else if(rEntry.GetPercent())
|
||||||
{
|
{
|
||||||
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
||||||
rLbType.SelectEntryPos(4);
|
rLbType.SelectEntryPos(4);
|
||||||
}
|
}
|
||||||
else if(rEntry.HasFormula())
|
else if(rEntry.HasFormula())
|
||||||
{
|
{
|
||||||
rEdit.SetText(rEntry.GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
|
rEdit.SetText(rEntry.GetFormula(formula::FormulaGrammar::GRAM_DEFAULT));
|
||||||
rLbType.SelectEntryPos(5);
|
rLbType.SelectEntryPos(5);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
rEdit.SetText(rtl::OUString::valueOf(rEntry.GetValue()));
|
||||||
rLbType.SelectEntryPos(3);
|
rLbType.SelectEntryPos(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,84 +213,84 @@ ScCondFrmtEntry::ScCondFrmtEntry(Window* pParent, ScDocument* pDoc, const ScForm
|
|||||||
|
|
||||||
if(pFormatEntry && pFormatEntry->GetType() == condformat::CONDITION)
|
if(pFormatEntry && pFormatEntry->GetType() == condformat::CONDITION)
|
||||||
{
|
{
|
||||||
const ScCondFormatEntry* pEntry = static_cast<const ScCondFormatEntry*>(pFormatEntry);
|
const ScCondFormatEntry* pEntry = static_cast<const ScCondFormatEntry*>(pFormatEntry);
|
||||||
rtl::OUString aStyleName = pEntry->GetStyle();
|
rtl::OUString aStyleName = pEntry->GetStyle();
|
||||||
maLbStyle.SelectEntry(aStyleName);
|
maLbStyle.SelectEntry(aStyleName);
|
||||||
ScConditionMode eMode = pEntry->GetOperation();
|
ScConditionMode eMode = pEntry->GetOperation();
|
||||||
maLbType.SelectEntryPos(1);
|
maLbType.SelectEntryPos(1);
|
||||||
maEdVal1.SetText(pEntry->GetExpression(maPos, 0));
|
maEdVal1.SetText(pEntry->GetExpression(maPos, 0));
|
||||||
switch(eMode)
|
switch(eMode)
|
||||||
{
|
{
|
||||||
case SC_COND_EQUAL:
|
case SC_COND_EQUAL:
|
||||||
maLbCondType.SelectEntryPos(0);
|
maLbCondType.SelectEntryPos(0);
|
||||||
break;
|
break;
|
||||||
case SC_COND_LESS:
|
case SC_COND_LESS:
|
||||||
maLbCondType.SelectEntryPos(1);
|
maLbCondType.SelectEntryPos(1);
|
||||||
break;
|
break;
|
||||||
case SC_COND_GREATER:
|
case SC_COND_GREATER:
|
||||||
maLbCondType.SelectEntryPos(2);
|
maLbCondType.SelectEntryPos(2);
|
||||||
break;
|
break;
|
||||||
case SC_COND_EQLESS:
|
case SC_COND_EQLESS:
|
||||||
maLbCondType.SelectEntryPos(3);
|
maLbCondType.SelectEntryPos(3);
|
||||||
break;
|
break;
|
||||||
case SC_COND_EQGREATER:
|
case SC_COND_EQGREATER:
|
||||||
maLbCondType.SelectEntryPos(4);
|
maLbCondType.SelectEntryPos(4);
|
||||||
break;
|
break;
|
||||||
case SC_COND_NOTEQUAL:
|
case SC_COND_NOTEQUAL:
|
||||||
maLbCondType.SelectEntryPos(5);
|
maLbCondType.SelectEntryPos(5);
|
||||||
break;
|
break;
|
||||||
case SC_COND_BETWEEN:
|
case SC_COND_BETWEEN:
|
||||||
maEdVal2.SetText(pEntry->GetExpression(maPos, 1));
|
maEdVal2.SetText(pEntry->GetExpression(maPos, 1));
|
||||||
maLbCondType.SelectEntryPos(6);
|
maLbCondType.SelectEntryPos(6);
|
||||||
break;
|
break;
|
||||||
case SC_COND_NOTBETWEEN:
|
case SC_COND_NOTBETWEEN:
|
||||||
maEdVal2.SetText(pEntry->GetExpression(maPos, 1));
|
maEdVal2.SetText(pEntry->GetExpression(maPos, 1));
|
||||||
maLbCondType.SelectEntryPos(7);
|
maLbCondType.SelectEntryPos(7);
|
||||||
break;
|
break;
|
||||||
case SC_COND_DUPLICATE:
|
case SC_COND_DUPLICATE:
|
||||||
maLbCondType.SelectEntryPos(8);
|
maLbCondType.SelectEntryPos(8);
|
||||||
break;
|
break;
|
||||||
case SC_COND_NOTDUPLICATE:
|
case SC_COND_NOTDUPLICATE:
|
||||||
maLbCondType.SelectEntryPos(9);
|
maLbCondType.SelectEntryPos(9);
|
||||||
break;
|
break;
|
||||||
case SC_COND_DIRECT:
|
case SC_COND_DIRECT:
|
||||||
maLbType.SelectEntryPos(2);
|
maLbType.SelectEntryPos(2);
|
||||||
break;
|
break;
|
||||||
case SC_COND_NONE:
|
case SC_COND_NONE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SwitchToType(CONDITION);
|
SwitchToType(CONDITION);
|
||||||
SetCondType();
|
SetCondType();
|
||||||
}
|
}
|
||||||
else if( pFormatEntry && pFormatEntry->GetType() == condformat::COLORSCALE )
|
else if( pFormatEntry && pFormatEntry->GetType() == condformat::COLORSCALE )
|
||||||
{
|
{
|
||||||
const ScColorScaleFormat* pEntry = static_cast<const ScColorScaleFormat*>(pFormatEntry);
|
const ScColorScaleFormat* pEntry = static_cast<const ScColorScaleFormat*>(pFormatEntry);
|
||||||
maLbType.SelectEntryPos(0);
|
maLbType.SelectEntryPos(0);
|
||||||
if(pEntry->size() == 2)
|
if(pEntry->size() == 2)
|
||||||
maLbColorFormat.SelectEntryPos(0);
|
maLbColorFormat.SelectEntryPos(0);
|
||||||
else
|
else
|
||||||
maLbColorFormat.SelectEntryPos(1);
|
maLbColorFormat.SelectEntryPos(1);
|
||||||
SetColorScaleType();
|
SetColorScaleType();
|
||||||
ScColorScaleFormat::const_iterator itr = pEntry->begin();
|
ScColorScaleFormat::const_iterator itr = pEntry->begin();
|
||||||
SetColorScaleEntryTypes(*itr, maLbEntryTypeMin, maEdMin, maLbColMin);
|
SetColorScaleEntryTypes(*itr, maLbEntryTypeMin, maEdMin, maLbColMin);
|
||||||
if(pEntry->size() == 3)
|
if(pEntry->size() == 3)
|
||||||
{
|
{
|
||||||
++itr;
|
++itr;
|
||||||
SetColorScaleEntryTypes(*itr, maLbEntryTypeMiddle, maEdMiddle, maLbColMiddle);
|
SetColorScaleEntryTypes(*itr, maLbEntryTypeMiddle, maEdMiddle, maLbColMiddle);
|
||||||
}
|
}
|
||||||
++itr;
|
++itr;
|
||||||
SetColorScaleEntryTypes(*itr, maLbEntryTypeMax, maEdMax, maLbColMax);
|
SetColorScaleEntryTypes(*itr, maLbEntryTypeMax, maEdMax, maLbColMax);
|
||||||
}
|
}
|
||||||
else if( pFormatEntry && pFormatEntry->GetType() == condformat::DATABAR )
|
else if( pFormatEntry && pFormatEntry->GetType() == condformat::DATABAR )
|
||||||
{
|
{
|
||||||
const ScDataBarFormat* pEntry = static_cast<const ScDataBarFormat*>(pFormatEntry);
|
const ScDataBarFormat* pEntry = static_cast<const ScDataBarFormat*>(pFormatEntry);
|
||||||
mpDataBarData.reset(new ScDataBarFormatData(*pEntry->GetDataBarData()));
|
mpDataBarData.reset(new ScDataBarFormatData(*pEntry->GetDataBarData()));
|
||||||
maLbType.SelectEntryPos(0);
|
maLbType.SelectEntryPos(0);
|
||||||
maLbColorFormat.SelectEntryPos(2);
|
maLbColorFormat.SelectEntryPos(2);
|
||||||
SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, maLbDataBarMinType, maEdDataBarMin);
|
SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, maLbDataBarMinType, maEdDataBarMin);
|
||||||
SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, maLbDataBarMaxType, maEdDataBarMax);
|
SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, maLbDataBarMaxType, maEdDataBarMax);
|
||||||
DataBarTypeSelectHdl(NULL);
|
DataBarTypeSelectHdl(NULL);
|
||||||
SetDataBarType();
|
SetDataBarType();
|
||||||
}
|
}
|
||||||
|
|
||||||
maClickHdl = LINK( pParent, ScCondFormatList, EntrySelectHdl );
|
maClickHdl = LINK( pParent, ScCondFormatList, EntrySelectHdl );
|
||||||
@@ -309,7 +309,7 @@ void ScCondFrmtEntry::Init()
|
|||||||
SfxStyleSheetIterator aStyleIter( mpDoc->GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
|
SfxStyleSheetIterator aStyleIter( mpDoc->GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
|
||||||
for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle; pStyle = aStyleIter.Next() )
|
for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle; pStyle = aStyleIter.Next() )
|
||||||
{
|
{
|
||||||
rtl::OUString aName = pStyle->GetName();
|
rtl::OUString aName = pStyle->GetName();
|
||||||
maLbStyle.InsertEntry( aName );
|
maLbStyle.InsertEntry( aName );
|
||||||
}
|
}
|
||||||
maLbStyle.SetSelectHdl( LINK( this, ScCondFrmtEntry, StyleSelectHdl ) );
|
maLbStyle.SetSelectHdl( LINK( this, ScCondFrmtEntry, StyleSelectHdl ) );
|
||||||
@@ -353,7 +353,7 @@ void ScCondFrmtEntry::Init()
|
|||||||
{
|
{
|
||||||
// filling the line color box
|
// filling the line color box
|
||||||
maLbColMin.SetUpdateMode( false );
|
maLbColMin.SetUpdateMode( false );
|
||||||
maLbColMiddle.SetUpdateMode( false );
|
maLbColMiddle.SetUpdateMode( false );
|
||||||
maLbColMax.SetUpdateMode( false );
|
maLbColMax.SetUpdateMode( false );
|
||||||
|
|
||||||
for ( long i = 0; i < pColorTable->Count(); ++i )
|
for ( long i = 0; i < pColorTable->Count(); ++i )
|
||||||
@@ -394,14 +394,14 @@ rtl::OUString getTextForType(ScCondFormatEntryType eType)
|
|||||||
{
|
{
|
||||||
switch(eType)
|
switch(eType)
|
||||||
{
|
{
|
||||||
case CONDITION:
|
case CONDITION:
|
||||||
return rtl::OUString("Cell value");
|
return rtl::OUString("Cell value");
|
||||||
case COLORSCALE:
|
case COLORSCALE:
|
||||||
return rtl::OUString("Color scale");
|
return rtl::OUString("Color scale");
|
||||||
case DATABAR:
|
case DATABAR:
|
||||||
return rtl::OUString("Data Bar");
|
return rtl::OUString("Data Bar");
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rtl::OUString("");
|
return rtl::OUString("");
|
||||||
@@ -411,26 +411,26 @@ rtl::OUString getExpression(sal_Int32 nIndex)
|
|||||||
{
|
{
|
||||||
switch(nIndex)
|
switch(nIndex)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
return rtl::OUString("=");
|
return rtl::OUString("=");
|
||||||
case 1:
|
case 1:
|
||||||
return rtl::OUString("<");
|
return rtl::OUString("<");
|
||||||
case 2:
|
case 2:
|
||||||
return rtl::OUString(">");
|
return rtl::OUString(">");
|
||||||
case 3:
|
case 3:
|
||||||
return rtl::OUString("<=");
|
return rtl::OUString("<=");
|
||||||
case 4:
|
case 4:
|
||||||
return rtl::OUString(">=");
|
return rtl::OUString(">=");
|
||||||
case 5:
|
case 5:
|
||||||
return rtl::OUString("!=");
|
return rtl::OUString("!=");
|
||||||
case 6:
|
case 6:
|
||||||
return rtl::OUString("between");
|
return rtl::OUString("between");
|
||||||
case 7:
|
case 7:
|
||||||
return rtl::OUString("not between");
|
return rtl::OUString("not between");
|
||||||
case 8:
|
case 8:
|
||||||
return rtl::OUString("duplicate");
|
return rtl::OUString("duplicate");
|
||||||
case 9:
|
case 9:
|
||||||
return rtl::OUString("unique");
|
return rtl::OUString("unique");
|
||||||
}
|
}
|
||||||
return rtl::OUString();
|
return rtl::OUString();
|
||||||
}
|
}
|
||||||
@@ -441,7 +441,7 @@ long ScCondFrmtEntry::Notify( NotifyEvent& rNEvt )
|
|||||||
{
|
{
|
||||||
if( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
|
if( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
|
||||||
{
|
{
|
||||||
ImplCallEventListenersAndHandler( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, maClickHdl, this );
|
ImplCallEventListenersAndHandler( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, maClickHdl, this );
|
||||||
}
|
}
|
||||||
return Control::Notify(rNEvt);
|
return Control::Notify(rNEvt);
|
||||||
}
|
}
|
||||||
@@ -450,23 +450,23 @@ void ScCondFrmtEntry::SwitchToType( ScCondFormatEntryType eType )
|
|||||||
{
|
{
|
||||||
switch(eType)
|
switch(eType)
|
||||||
{
|
{
|
||||||
case COLLAPSED:
|
case COLLAPSED:
|
||||||
{
|
{
|
||||||
maLbType.Hide();
|
maLbType.Hide();
|
||||||
rtl::OUStringBuffer maCondText(getTextForType(meType));
|
rtl::OUStringBuffer maCondText(getTextForType(meType));
|
||||||
maCondText.append(rtl::OUString(" "));
|
maCondText.append(rtl::OUString(" "));
|
||||||
if(meType == CONDITION)
|
if(meType == CONDITION)
|
||||||
maCondText.append(getExpression(maLbCondType.GetSelectEntryPos()));
|
maCondText.append(getExpression(maLbCondType.GetSelectEntryPos()));
|
||||||
maFtCondition.SetText(maCondText.makeStringAndClear());
|
maFtCondition.SetText(maCondText.makeStringAndClear());
|
||||||
maFtCondition.Show();
|
maFtCondition.Show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
meType = eType;
|
meType = eType;
|
||||||
maLbType.Show();
|
maLbType.Show();
|
||||||
maFtCondition.SetText(rtl::OUString(""));
|
maFtCondition.SetText(rtl::OUString(""));
|
||||||
maFtCondition.Hide();
|
maFtCondition.Hide();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -513,28 +513,28 @@ void ScCondFrmtEntry::SetHeight()
|
|||||||
{
|
{
|
||||||
if(mbActive)
|
if(mbActive)
|
||||||
{
|
{
|
||||||
Size aSize = GetSizePixel();
|
Size aSize = GetSizePixel();
|
||||||
switch (meType)
|
switch (meType)
|
||||||
{
|
{
|
||||||
case CONDITION:
|
case CONDITION:
|
||||||
aSize.Height() = 120;
|
aSize.Height() = 120;
|
||||||
break;
|
break;
|
||||||
case COLORSCALE:
|
case COLORSCALE:
|
||||||
aSize.Height() = 200;
|
aSize.Height() = 200;
|
||||||
break;
|
break;
|
||||||
case DATABAR:
|
case DATABAR:
|
||||||
aSize.Height() = 200;
|
aSize.Height() = 200;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SetSizePixel(aSize);
|
SetSizePixel(aSize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Size aSize = GetSizePixel();
|
Size aSize = GetSizePixel();
|
||||||
aSize.Height() = 40;
|
aSize.Height() = 40;
|
||||||
SetSizePixel(aSize);
|
SetSizePixel(aSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,19 +545,19 @@ void ScCondFrmtEntry::SetColorScaleType()
|
|||||||
maLbColorFormat.Show();
|
maLbColorFormat.Show();
|
||||||
if(maLbColorFormat.GetSelectEntryPos() == 0)
|
if(maLbColorFormat.GetSelectEntryPos() == 0)
|
||||||
{
|
{
|
||||||
maEdMiddle.Hide();
|
maEdMiddle.Hide();
|
||||||
maLbEntryTypeMiddle.Hide();
|
maLbEntryTypeMiddle.Hide();
|
||||||
maLbColScale2.Show();
|
maLbColScale2.Show();
|
||||||
maLbColScale3.Hide();
|
maLbColScale3.Hide();
|
||||||
maLbColMiddle.Hide();
|
maLbColMiddle.Hide();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
maEdMiddle.Show();
|
maEdMiddle.Show();
|
||||||
maLbEntryTypeMiddle.Show();
|
maLbEntryTypeMiddle.Show();
|
||||||
maLbColScale2.Hide();
|
maLbColScale2.Hide();
|
||||||
maLbColScale3.Show();
|
maLbColScale3.Show();
|
||||||
maLbColMiddle.Show();
|
maLbColMiddle.Show();
|
||||||
}
|
}
|
||||||
maLbEntryTypeMin.Show();
|
maLbEntryTypeMin.Show();
|
||||||
maLbEntryTypeMax.Show();
|
maLbEntryTypeMax.Show();
|
||||||
@@ -618,45 +618,45 @@ ScFormatEntry* ScCondFrmtEntry::createConditionEntry() const
|
|||||||
rtl::OUString aExpr2;
|
rtl::OUString aExpr2;
|
||||||
switch(maLbCondType.GetSelectEntryPos())
|
switch(maLbCondType.GetSelectEntryPos())
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
eMode = SC_COND_EQUAL;
|
eMode = SC_COND_EQUAL;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
eMode = SC_COND_LESS;
|
eMode = SC_COND_LESS;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
eMode = SC_COND_GREATER;
|
eMode = SC_COND_GREATER;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
eMode = SC_COND_EQLESS;
|
eMode = SC_COND_EQLESS;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
eMode = SC_COND_EQGREATER;
|
eMode = SC_COND_EQGREATER;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
eMode = SC_COND_NOTEQUAL;
|
eMode = SC_COND_NOTEQUAL;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
aExpr2 = maEdVal2.GetText();
|
aExpr2 = maEdVal2.GetText();
|
||||||
eMode = SC_COND_BETWEEN;
|
eMode = SC_COND_BETWEEN;
|
||||||
if(aExpr2.isEmpty())
|
if(aExpr2.isEmpty())
|
||||||
return NULL;
|
return NULL;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
eMode = SC_COND_NOTBETWEEN;
|
eMode = SC_COND_NOTBETWEEN;
|
||||||
aExpr2 = maEdVal2.GetText();
|
aExpr2 = maEdVal2.GetText();
|
||||||
if(aExpr2.isEmpty())
|
if(aExpr2.isEmpty())
|
||||||
return NULL;
|
return NULL;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
eMode = SC_COND_DUPLICATE;
|
eMode = SC_COND_DUPLICATE;
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
eMode = SC_COND_NOTDUPLICATE;
|
eMode = SC_COND_NOTDUPLICATE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(false); // this cannot happen
|
assert(false); // this cannot happen
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString aExpr1 = maEdVal1.GetText();
|
rtl::OUString aExpr1 = maEdVal1.GetText();
|
||||||
@@ -673,26 +673,26 @@ void SetColorScaleEntry( ScColorScaleEntry* pEntry, const ListBox& rType, const
|
|||||||
double nVal = rtl::math::stringToDouble(rValue.GetText(), '.', ',');
|
double nVal = rtl::math::stringToDouble(rValue.GetText(), '.', ',');
|
||||||
switch(rType.GetSelectEntryPos())
|
switch(rType.GetSelectEntryPos())
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
pEntry->SetMin(true);
|
pEntry->SetMin(true);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
pEntry->SetMax(true);
|
pEntry->SetMax(true);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
pEntry->SetPercentile(true);
|
pEntry->SetPercentile(true);
|
||||||
pEntry->SetValue(nVal);
|
pEntry->SetValue(nVal);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
pEntry->SetValue(nVal);
|
pEntry->SetValue(nVal);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
pEntry->SetPercent(true);
|
pEntry->SetPercent(true);
|
||||||
pEntry->SetValue(nVal);
|
pEntry->SetValue(nVal);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
pEntry->SetFormula(rValue.GetText(), pDoc, rPos);
|
pEntry->SetFormula(rValue.GetText(), pDoc, rPos);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -713,7 +713,7 @@ ScFormatEntry* ScCondFrmtEntry::createColorscaleEntry() const
|
|||||||
ScColorScaleFormat* pColorScale = new ScColorScaleFormat(mpDoc);
|
ScColorScaleFormat* pColorScale = new ScColorScaleFormat(mpDoc);
|
||||||
pColorScale->AddEntry(createColorScaleEntry(maLbEntryTypeMin, maLbColMin, maEdMin, mpDoc, maPos));
|
pColorScale->AddEntry(createColorScaleEntry(maLbEntryTypeMin, maLbColMin, maEdMin, mpDoc, maPos));
|
||||||
if(maLbColorFormat.GetSelectEntryPos() == 1)
|
if(maLbColorFormat.GetSelectEntryPos() == 1)
|
||||||
pColorScale->AddEntry(createColorScaleEntry(maLbEntryTypeMiddle, maLbColMiddle, maEdMiddle, mpDoc, maPos));
|
pColorScale->AddEntry(createColorScaleEntry(maLbEntryTypeMiddle, maLbColMiddle, maEdMiddle, mpDoc, maPos));
|
||||||
pColorScale->AddEntry(createColorScaleEntry(maLbEntryTypeMax, maLbColMax, maEdMax, mpDoc, maPos));
|
pColorScale->AddEntry(createColorScaleEntry(maLbEntryTypeMax, maLbColMax, maEdMax, mpDoc, maPos));
|
||||||
return pColorScale;
|
return pColorScale;
|
||||||
}
|
}
|
||||||
@@ -729,17 +729,17 @@ ScFormatEntry* ScCondFrmtEntry::GetEntry() const
|
|||||||
{
|
{
|
||||||
switch(meType)
|
switch(meType)
|
||||||
{
|
{
|
||||||
case CONDITION:
|
case CONDITION:
|
||||||
return createConditionEntry();
|
return createConditionEntry();
|
||||||
break;
|
break;
|
||||||
case COLORSCALE:
|
case COLORSCALE:
|
||||||
return createColorscaleEntry();
|
return createColorscaleEntry();
|
||||||
break;
|
break;
|
||||||
case DATABAR:
|
case DATABAR:
|
||||||
return createDatabarEntry();
|
return createDatabarEntry();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -749,20 +749,20 @@ IMPL_LINK_NOARG(ScCondFrmtEntry, TypeListHdl)
|
|||||||
sal_Int32 nPos = maLbType.GetSelectEntryPos();
|
sal_Int32 nPos = maLbType.GetSelectEntryPos();
|
||||||
switch(nPos)
|
switch(nPos)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
SetCondType();
|
SetCondType();
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
if(maLbColorFormat.GetSelectEntryPos() < 2)
|
if(maLbColorFormat.GetSelectEntryPos() < 2)
|
||||||
SetColorScaleType();
|
SetColorScaleType();
|
||||||
else
|
else
|
||||||
SetDataBarType();
|
SetDataBarType();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
SetCondType();
|
SetCondType();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SetHeight();
|
SetHeight();
|
||||||
return 0;
|
return 0;
|
||||||
@@ -772,11 +772,11 @@ IMPL_LINK_NOARG(ScCondFrmtEntry, ColFormatTypeHdl)
|
|||||||
{
|
{
|
||||||
if(maLbColorFormat.GetSelectEntryPos() < 2)
|
if(maLbColorFormat.GetSelectEntryPos() < 2)
|
||||||
{
|
{
|
||||||
SetColorScaleType();
|
SetColorScaleType();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetDataBarType();
|
SetDataBarType();
|
||||||
}
|
}
|
||||||
|
|
||||||
SetHeight();
|
SetHeight();
|
||||||
@@ -788,48 +788,48 @@ IMPL_LINK_NOARG(ScCondFrmtEntry, StyleSelectHdl)
|
|||||||
{
|
{
|
||||||
if(maLbStyle.GetSelectEntryPos() == 0)
|
if(maLbStyle.GetSelectEntryPos() == 0)
|
||||||
{
|
{
|
||||||
// call new style dialog
|
// call new style dialog
|
||||||
SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, SFX_STYLE_FAMILY_PARA );
|
SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, SFX_STYLE_FAMILY_PARA );
|
||||||
SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
|
SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
|
||||||
|
|
||||||
// unlock the dispatcher so SID_STYLE_NEW can be executed
|
// unlock the dispatcher so SID_STYLE_NEW can be executed
|
||||||
// (SetDispatcherLock would affect all Calc documents)
|
// (SetDispatcherLock would affect all Calc documents)
|
||||||
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
|
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
|
||||||
SfxDispatcher* pDisp = pViewShell->GetDispatcher();
|
SfxDispatcher* pDisp = pViewShell->GetDispatcher();
|
||||||
sal_Bool bLocked = pDisp->IsLocked();
|
sal_Bool bLocked = pDisp->IsLocked();
|
||||||
if (bLocked)
|
if (bLocked)
|
||||||
pDisp->Lock(false);
|
pDisp->Lock(false);
|
||||||
|
|
||||||
// Execute the "new style" slot, complete with undo and all necessary updates.
|
// Execute the "new style" slot, complete with undo and all necessary updates.
|
||||||
// The return value (SfxUInt16Item) is ignored, look for new styles instead.
|
// The return value (SfxUInt16Item) is ignored, look for new styles instead.
|
||||||
pDisp->Execute( SID_STYLE_NEW, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
|
pDisp->Execute( SID_STYLE_NEW, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
|
||||||
&aFamilyItem,
|
&aFamilyItem,
|
||||||
&aRefItem,
|
&aRefItem,
|
||||||
0L );
|
0L );
|
||||||
|
|
||||||
if (bLocked)
|
if (bLocked)
|
||||||
pDisp->Lock(sal_True);
|
pDisp->Lock(sal_True);
|
||||||
|
|
||||||
// Find the new style and add it into the style list boxes
|
// Find the new style and add it into the style list boxes
|
||||||
rtl::OUString aNewStyle;
|
rtl::OUString aNewStyle;
|
||||||
SfxStyleSheetIterator aStyleIter( mpDoc->GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
|
SfxStyleSheetIterator aStyleIter( mpDoc->GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
|
||||||
for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle; pStyle = aStyleIter.Next() )
|
for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle; pStyle = aStyleIter.Next() )
|
||||||
{
|
{
|
||||||
rtl::OUString aName = pStyle->GetName();
|
rtl::OUString aName = pStyle->GetName();
|
||||||
if ( maLbStyle.GetEntryPos(aName) == LISTBOX_ENTRY_NOTFOUND ) // all lists contain the same entries
|
if ( maLbStyle.GetEntryPos(aName) == LISTBOX_ENTRY_NOTFOUND ) // all lists contain the same entries
|
||||||
{
|
{
|
||||||
maLbStyle.InsertEntry(aName);
|
maLbStyle.InsertEntry(aName);
|
||||||
maLbStyle.SelectEntry(aName);
|
maLbStyle.SelectEntry(aName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rtl::OUString aStyleName = maLbStyle.GetSelectEntry();
|
rtl::OUString aStyleName = maLbStyle.GetSelectEntry();
|
||||||
SfxStyleSheetBase* pStyleSheet = mpDoc->GetStyleSheetPool()->Find( aStyleName, SFX_STYLE_FAMILY_PARA );
|
SfxStyleSheetBase* pStyleSheet = mpDoc->GetStyleSheetPool()->Find( aStyleName, SFX_STYLE_FAMILY_PARA );
|
||||||
if(pStyleSheet)
|
if(pStyleSheet)
|
||||||
{
|
{
|
||||||
const SfxItemSet& rSet = pStyleSheet->GetItemSet();
|
const SfxItemSet& rSet = pStyleSheet->GetItemSet();
|
||||||
maWdPreview.Init( rSet );
|
maWdPreview.Init( rSet );
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -839,15 +839,15 @@ IMPL_LINK_NOARG( ScCondFrmtEntry, DataBarTypeSelectHdl )
|
|||||||
{
|
{
|
||||||
sal_Int32 nSelectPos = maLbDataBarMinType.GetSelectEntryPos();
|
sal_Int32 nSelectPos = maLbDataBarMinType.GetSelectEntryPos();
|
||||||
if(nSelectPos == 0 || nSelectPos == 1)
|
if(nSelectPos == 0 || nSelectPos == 1)
|
||||||
maEdDataBarMin.Disable();
|
maEdDataBarMin.Disable();
|
||||||
else
|
else
|
||||||
maEdDataBarMin.Enable();
|
maEdDataBarMin.Enable();
|
||||||
|
|
||||||
nSelectPos = maLbDataBarMaxType.GetSelectEntryPos();
|
nSelectPos = maLbDataBarMaxType.GetSelectEntryPos();
|
||||||
if(nSelectPos == 0 || nSelectPos == 1)
|
if(nSelectPos == 0 || nSelectPos == 1)
|
||||||
maEdDataBarMax.Disable();
|
maEdDataBarMax.Disable();
|
||||||
else
|
else
|
||||||
maEdDataBarMax.Enable();
|
maEdDataBarMax.Enable();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -859,9 +859,9 @@ IMPL_LINK_NOARG( ScCondFrmtEntry, OptionBtnHdl )
|
|||||||
ScDataBarSettingsDlg* pDlg = new ScDataBarSettingsDlg(this, *mpDataBarData);
|
ScDataBarSettingsDlg* pDlg = new ScDataBarSettingsDlg(this, *mpDataBarData);
|
||||||
if( pDlg->Execute() == RET_OK)
|
if( pDlg->Execute() == RET_OK)
|
||||||
{
|
{
|
||||||
mpDataBarData.reset(pDlg->GetData());
|
mpDataBarData.reset(pDlg->GetData());
|
||||||
SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, maLbDataBarMinType, maEdDataBarMin);
|
SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, maLbDataBarMinType, maEdDataBarMin);
|
||||||
SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, maLbDataBarMaxType, maEdDataBarMax);
|
SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, maLbDataBarMaxType, maEdDataBarMax);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -870,15 +870,15 @@ IMPL_LINK_NOARG( ScCondFrmtEntry, ConditionTypeSelectHdl )
|
|||||||
{
|
{
|
||||||
if(maLbCondType.GetSelectEntryPos() == 6 || maLbCondType.GetSelectEntryPos() == 7)
|
if(maLbCondType.GetSelectEntryPos() == 6 || maLbCondType.GetSelectEntryPos() == 7)
|
||||||
{
|
{
|
||||||
std::cout << "OldSize: " << maEdVal1.GetSizePixel().Width() << " " << maEdVal1.GetSizePixel().Height() << std::endl;
|
std::cout << "OldSize: " << maEdVal1.GetSizePixel().Width() << " " << maEdVal1.GetSizePixel().Height() << std::endl;
|
||||||
maEdVal1.SetSizePixel(maEdVal2.GetSizePixel());
|
maEdVal1.SetSizePixel(maEdVal2.GetSizePixel());
|
||||||
maEdVal2.Show();
|
maEdVal2.Show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
maEdVal2.Hide();
|
maEdVal2.Hide();
|
||||||
Size aSize(193, 30);
|
Size aSize(193, 30);
|
||||||
maEdVal1.SetSizePixel(aSize);
|
maEdVal1.SetSizePixel(aSize);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -911,11 +911,11 @@ ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocum
|
|||||||
|
|
||||||
if(pFormat)
|
if(pFormat)
|
||||||
{
|
{
|
||||||
size_t nCount = pFormat->size();
|
size_t nCount = pFormat->size();
|
||||||
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
|
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
|
||||||
{
|
{
|
||||||
maEntries.push_back(new ScCondFrmtEntry( this, mpDoc, pFormat->GetEntry(nIndex)));
|
maEntries.push_back(new ScCondFrmtEntry( this, mpDoc, pFormat->GetEntry(nIndex)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RecalcAll();
|
RecalcAll();
|
||||||
@@ -925,14 +925,14 @@ ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocum
|
|||||||
ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const
|
ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const
|
||||||
{
|
{
|
||||||
if(maEntries.empty())
|
if(maEntries.empty())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ScConditionalFormat* pFormat = new ScConditionalFormat(0, mpDoc);
|
ScConditionalFormat* pFormat = new ScConditionalFormat(0, mpDoc);
|
||||||
for(EntryContainer::const_iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
for(EntryContainer::const_iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
||||||
{
|
{
|
||||||
ScFormatEntry* pEntry = itr->GetEntry();
|
ScFormatEntry* pEntry = itr->GetEntry();
|
||||||
if(pEntry)
|
if(pEntry)
|
||||||
pFormat->AddEntry(pEntry);
|
pFormat->AddEntry(pEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
pFormat->AddRange(maRanges);
|
pFormat->AddRange(maRanges);
|
||||||
@@ -945,38 +945,38 @@ void ScCondFormatList::RecalcAll()
|
|||||||
sal_Int32 nTotalHeight = 0;
|
sal_Int32 nTotalHeight = 0;
|
||||||
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
||||||
{
|
{
|
||||||
nTotalHeight += itr->GetSizePixel().Height();
|
nTotalHeight += itr->GetSizePixel().Height();
|
||||||
}
|
}
|
||||||
|
|
||||||
Size aCtrlSize = GetOutputSize();
|
Size aCtrlSize = GetOutputSize();
|
||||||
long nSrcBarSize = GetSettings().GetStyleSettings().GetScrollBarSize();
|
long nSrcBarSize = GetSettings().GetStyleSettings().GetScrollBarSize();
|
||||||
if(nTotalHeight > GetSizePixel().Height())
|
if(nTotalHeight > GetSizePixel().Height())
|
||||||
{
|
{
|
||||||
mbHasScrollBar = true;
|
mbHasScrollBar = true;
|
||||||
mpScrollBar->SetPosSizePixel(Point(aCtrlSize.Width() -nSrcBarSize, 0),
|
mpScrollBar->SetPosSizePixel(Point(aCtrlSize.Width() -nSrcBarSize, 0),
|
||||||
Size(nSrcBarSize, aCtrlSize.Height()) );
|
Size(nSrcBarSize, aCtrlSize.Height()) );
|
||||||
mpScrollBar->SetRangeMax(nTotalHeight);
|
mpScrollBar->SetRangeMax(nTotalHeight);
|
||||||
mpScrollBar->SetVisibleSize(aCtrlSize.Height());
|
mpScrollBar->SetVisibleSize(aCtrlSize.Height());
|
||||||
mpScrollBar->Show();
|
mpScrollBar->Show();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mbHasScrollBar = false;
|
mbHasScrollBar = false;
|
||||||
mpScrollBar->Hide();
|
mpScrollBar->Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
Point aPoint(0,0);
|
Point aPoint(0,0);
|
||||||
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
||||||
{
|
{
|
||||||
itr->SetPosPixel(aPoint);
|
itr->SetPosPixel(aPoint);
|
||||||
Size aSize = itr->GetSizePixel();
|
Size aSize = itr->GetSizePixel();
|
||||||
if(mbHasScrollBar)
|
if(mbHasScrollBar)
|
||||||
aSize.Width() = aCtrlSize.Width() - nSrcBarSize;
|
aSize.Width() = aCtrlSize.Width() - nSrcBarSize;
|
||||||
else
|
else
|
||||||
aSize.Width() = aCtrlSize.Width();
|
aSize.Width() = aCtrlSize.Width();
|
||||||
itr->SetSizePixel(aSize);
|
itr->SetSizePixel(aSize);
|
||||||
|
|
||||||
aPoint.Y() += itr->GetSizePixel().Height();
|
aPoint.Y() += itr->GetSizePixel().Height();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1028,11 +1028,11 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl )
|
|||||||
{
|
{
|
||||||
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
||||||
{
|
{
|
||||||
if(itr->IsSelected())
|
if(itr->IsSelected())
|
||||||
{
|
{
|
||||||
maEntries.erase(itr);
|
maEntries.erase(itr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RecalcAll();
|
RecalcAll();
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1042,7 +1042,7 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry )
|
|||||||
{
|
{
|
||||||
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
|
||||||
{
|
{
|
||||||
itr->Deselect();
|
itr->Deselect();
|
||||||
}
|
}
|
||||||
pEntry->Select();
|
pEntry->Select();
|
||||||
RecalcAll();
|
RecalcAll();
|
||||||
|
@@ -5064,7 +5064,7 @@ void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFor
|
|||||||
ScDocument* pDoc = rDocShell.GetDocument();
|
ScDocument* pDoc = rDocShell.GetDocument();
|
||||||
if(nOldFormat)
|
if(nOldFormat)
|
||||||
{
|
{
|
||||||
pDoc->DeleteConditionalFormat(nOldFormat, nTab);
|
pDoc->DeleteConditionalFormat(nOldFormat, nTab);
|
||||||
}
|
}
|
||||||
if(pFormat)
|
if(pFormat)
|
||||||
{
|
{
|
||||||
|
@@ -50,23 +50,23 @@ ModalDialog RID_SCDLG_CONDFORMAT
|
|||||||
};
|
};
|
||||||
PushButton BTN_ADD
|
PushButton BTN_ADD
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 5, 155 );
|
Pos = MAP_APPFONT( 5, 155 );
|
||||||
Size = MAP_APPFONT( 40, 14 );
|
Size = MAP_APPFONT( 40, 14 );
|
||||||
Text [ en-US ] = "Add";
|
Text [ en-US ] = "Add";
|
||||||
TabStop = TRUE;
|
TabStop = TRUE;
|
||||||
};
|
};
|
||||||
PushButton BTN_REMOVE
|
PushButton BTN_REMOVE
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 50, 155 );
|
Pos = MAP_APPFONT( 50, 155 );
|
||||||
Size = MAP_APPFONT( 40, 14 );
|
Size = MAP_APPFONT( 40, 14 );
|
||||||
Text [ en-US ] = "Remove";
|
Text [ en-US ] = "Remove";
|
||||||
TabStop = TRUE;
|
TabStop = TRUE;
|
||||||
};
|
};
|
||||||
Control CTRL_LIST
|
Control CTRL_LIST
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 5, 20 );
|
Pos = MAP_APPFONT( 5, 20 );
|
||||||
Size = MAP_APPFONT( 190, 120 );
|
Size = MAP_APPFONT( 190, 120 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -78,148 +78,148 @@ Control RID_COND_ENTRY
|
|||||||
|
|
||||||
FixedText FT_COND_NR
|
FixedText FT_COND_NR
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 2, 2 );
|
Pos = MAP_APPFONT( 2, 2 );
|
||||||
Size = MAP_APPFONT( 30, 10 );
|
Size = MAP_APPFONT( 30, 10 );
|
||||||
Text [ en-US ] = "Condition";
|
Text [ en-US ] = "Condition";
|
||||||
};
|
};
|
||||||
|
|
||||||
FixedText FT_CONDITION
|
FixedText FT_CONDITION
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 40, 2 );
|
Pos = MAP_APPFONT( 40, 2 );
|
||||||
Size = MAP_APPFONT( 90, 10 );
|
Size = MAP_APPFONT( 90, 10 );
|
||||||
};
|
};
|
||||||
|
|
||||||
ListBox LB_TYPE
|
ListBox LB_TYPE
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 5, 15 );
|
Pos = MAP_APPFONT( 5, 15 );
|
||||||
Size = MAP_APPFONT( 40, 40 );
|
Size = MAP_APPFONT( 40, 40 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
DropDown = TRUE;
|
DropDown = TRUE;
|
||||||
StringList [ en-US ] =
|
StringList [ en-US ] =
|
||||||
{
|
{
|
||||||
"All Cells";
|
"All Cells";
|
||||||
"Cell value is";
|
"Cell value is";
|
||||||
"Formula is";
|
"Formula is";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
ListBox LB_CELLIS_TYPE
|
ListBox LB_CELLIS_TYPE
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 50, 15 );
|
Pos = MAP_APPFONT( 50, 15 );
|
||||||
Size = MAP_APPFONT( 30, 40 );
|
Size = MAP_APPFONT( 30, 40 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
DropDown = TRUE;
|
DropDown = TRUE;
|
||||||
StringList [ en-US ] =
|
StringList [ en-US ] =
|
||||||
{
|
{
|
||||||
"equal to";
|
"equal to";
|
||||||
"less than";
|
"less than";
|
||||||
"greater than";
|
"greater than";
|
||||||
"less than or equal to";
|
"less than or equal to";
|
||||||
"greater than or equal to";
|
"greater than or equal to";
|
||||||
"not equal to";
|
"not equal to";
|
||||||
"between";
|
"between";
|
||||||
"not between";
|
"not between";
|
||||||
"duplicate";
|
"duplicate";
|
||||||
"not duplicate";
|
"not duplicate";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
FixedText FT_STYLE
|
FixedText FT_STYLE
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 10, 32 );
|
Pos = MAP_APPFONT( 10, 32 );
|
||||||
Size = MAP_APPFONT( 35, 14 );
|
Size = MAP_APPFONT( 35, 14 );
|
||||||
Text [ en-US ] = "Apply Style";
|
Text [ en-US ] = "Apply Style";
|
||||||
};
|
};
|
||||||
Edit ED_VAL1
|
Edit ED_VAL1
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 90, 15 );
|
Pos = MAP_APPFONT( 90, 15 );
|
||||||
Size = MAP_APPFONT( 70, 12 );
|
Size = MAP_APPFONT( 70, 12 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
};
|
};
|
||||||
Edit ED_VAL2
|
Edit ED_VAL2
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 130, 15 );
|
Pos = MAP_APPFONT( 130, 15 );
|
||||||
Size = MAP_APPFONT( 30, 12 );
|
Size = MAP_APPFONT( 30, 12 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
};
|
};
|
||||||
ListBox LB_STYLE
|
ListBox LB_STYLE
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 50, 32 );
|
Pos = MAP_APPFONT( 50, 32 );
|
||||||
Size = MAP_APPFONT( 30, 40 );
|
Size = MAP_APPFONT( 30, 40 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
DropDown = TRUE;
|
DropDown = TRUE;
|
||||||
StringList [ en-US ] =
|
StringList [ en-US ] =
|
||||||
{
|
{
|
||||||
"New Style...";
|
"New Style...";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
ListBox LB_COLOR_FORMAT
|
ListBox LB_COLOR_FORMAT
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 50, 15 );
|
Pos = MAP_APPFONT( 50, 15 );
|
||||||
Size = MAP_APPFONT( 60, 40);
|
Size = MAP_APPFONT( 60, 40);
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
DropDown = TRUE;
|
DropDown = TRUE;
|
||||||
StringList [ en-US ] =
|
StringList [ en-US ] =
|
||||||
{
|
{
|
||||||
"Color Scale (2 Entries)";
|
"Color Scale (2 Entries)";
|
||||||
"Color Scale (3 Entries)";
|
"Color Scale (3 Entries)";
|
||||||
"Data Bar";
|
"Data Bar";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
ListBox LB_COL_SCALE2
|
ListBox LB_COL_SCALE2
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 120, 15 );
|
Pos = MAP_APPFONT( 120, 15 );
|
||||||
Size = MAP_APPFONT( 60, 40 );
|
Size = MAP_APPFONT( 60, 40 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
DropDown = TRUE;
|
DropDown = TRUE;
|
||||||
};
|
};
|
||||||
ListBox LB_COL_SCALE3
|
ListBox LB_COL_SCALE3
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 120, 15 );
|
Pos = MAP_APPFONT( 120, 15 );
|
||||||
Size = MAP_APPFONT( 60, 40 );
|
Size = MAP_APPFONT( 60, 40 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
DropDown = TRUE;
|
DropDown = TRUE;
|
||||||
};
|
};
|
||||||
ListBox LB_TYPE_COL_SCALE
|
ListBox LB_TYPE_COL_SCALE
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 5, 32 );
|
Pos = MAP_APPFONT( 5, 32 );
|
||||||
Size = MAP_APPFONT( 40, 40 );
|
Size = MAP_APPFONT( 40, 40 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
DropDown = TRUE;
|
DropDown = TRUE;
|
||||||
StringList [ en-US ] =
|
StringList [ en-US ] =
|
||||||
{
|
{
|
||||||
"Min";
|
"Min";
|
||||||
"Max";
|
"Max";
|
||||||
"Percentile";
|
"Percentile";
|
||||||
"Value";
|
"Value";
|
||||||
"Percent";
|
"Percent";
|
||||||
"Formula";
|
"Formula";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
Edit ED_COL_SCALE
|
Edit ED_COL_SCALE
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 5, 48 );
|
Pos = MAP_APPFONT( 5, 48 );
|
||||||
Size = MAP_APPFONT( 40, 12 );
|
Size = MAP_APPFONT( 40, 12 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
};
|
};
|
||||||
Window WD_PREVIEW
|
Window WD_PREVIEW
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 90, 32 );
|
Pos = MAP_APPFONT( 90, 32 );
|
||||||
Size = MAP_APPFONT( 40, 14 );
|
Size = MAP_APPFONT( 40, 14 );
|
||||||
Text [ en-US ] = "Example";
|
Text [ en-US ] = "Example";
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
};
|
};
|
||||||
ListBox LB_COL
|
ListBox LB_COL
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 5, 62 );
|
Pos = MAP_APPFONT( 5, 62 );
|
||||||
Size = MAP_APPFONT( 40, 40 );
|
Size = MAP_APPFONT( 40, 40 );
|
||||||
Border = TRUE;
|
Border = TRUE;
|
||||||
DropDown = TRUE;
|
DropDown = TRUE;
|
||||||
DDExtraWidth = TRUE;
|
DDExtraWidth = TRUE;
|
||||||
};
|
};
|
||||||
PushButton BTN_OPTIONS
|
PushButton BTN_OPTIONS
|
||||||
{
|
{
|
||||||
Pos = MAP_APPFONT( 120, 62 );
|
Pos = MAP_APPFONT( 120, 62 );
|
||||||
Size = MAP_APPFONT( 60, 14 );
|
Size = MAP_APPFONT( 60, 14 );
|
||||||
Text [ en-US ] = "More options ...";
|
Text [ en-US ] = "More options ...";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user