Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d7a27f40
Kaydet (Commit)
d7a27f40
authored
Eki 08, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make more parts of the conditional format dlg work again
Change-Id: I86ff7911bcc7cc916766d583881e605dfe1a3942
üst
14914835
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
157 additions
and
31 deletions
+157
-31
condformatdlg.cxx
sc/source/ui/condformat/condformatdlg.cxx
+24
-5
condformatdlgentry.cxx
sc/source/ui/condformat/condformatdlgentry.cxx
+116
-16
condformatdlgentry.hxx
sc/source/ui/inc/condformatdlgentry.hxx
+17
-10
No files found.
sc/source/ui/condformat/condformatdlg.cxx
Dosyayı görüntüle @
d7a27f40
...
...
@@ -92,7 +92,7 @@ ScCondFormatList::ScCondFormatList(Window* pParent, const ResId& rResId, ScDocum
}
}
if
(
!
maEntries
.
empty
())
maEntries
.
begin
()
->
Se
lect
();
maEntries
.
begin
()
->
Se
tActive
();
RecalcAll
();
FreeResource
();
...
...
@@ -176,9 +176,28 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox)
IMPL_LINK
(
ScCondFormatList
,
TypeListHdl
,
ListBox
*
,
pBox
)
{
EntryContainer
::
iterator
itr
=
maEntries
.
begin
();
for
(;
itr
!=
maEntries
.
end
();
++
itr
)
{
if
(
itr
->
IsSelected
())
break
;
}
if
(
itr
==
maEntries
.
end
())
return
0
;;
sal_Int32
nPos
=
pBox
->
GetSelectEntryPos
();
switch
(
nPos
)
{
case
0
:
maEntries
.
replace
(
itr
,
new
ScColorScaleFrmtEntry
(
this
,
mpDoc
,
maPos
));
itr
->
SetHeight
();
break
;
case
1
:
maEntries
.
replace
(
itr
,
new
ScConditionFrmtEntry
(
this
,
mpDoc
,
maPos
));
itr
->
SetHeight
();
break
;
case
2
:
break
;
}
RecalcAll
();
return
0
;
...
...
@@ -190,9 +209,9 @@ IMPL_LINK_NOARG( ScCondFormatList, AddBtnHdl )
maEntries
.
push_back
(
pNewEntry
);
for
(
EntryContainer
::
iterator
itr
=
maEntries
.
begin
();
itr
!=
maEntries
.
end
();
++
itr
)
{
itr
->
Deselect
();
itr
->
SetInactive
();
}
pNewEntry
->
Se
lect
();
pNewEntry
->
Se
tActive
();
RecalcAll
();
return
0
;
}
...
...
@@ -215,9 +234,9 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry )
{
for
(
EntryContainer
::
iterator
itr
=
maEntries
.
begin
();
itr
!=
maEntries
.
end
();
++
itr
)
{
itr
->
Deselect
();
itr
->
SetInactive
();
}
pEntry
->
Se
lect
();
pEntry
->
Se
tActive
();
RecalcAll
();
return
0
;
}
...
...
sc/source/ui/condformat/condformatdlgentry.cxx
Dosyayı görüntüle @
d7a27f40
...
...
@@ -22,27 +22,23 @@
ScCondFrmtEntry
::
ScCondFrmtEntry
(
Window
*
pParent
,
ScDocument
*
pDoc
,
const
ScAddress
&
rPos
)
:
Control
(
pParent
,
ScResId
(
RID_COND_ENTRY
)
),
mbActive
(
false
),
maLbType
(
this
,
ScResId
(
LB_TYPE
)
),
maFtCondNr
(
this
,
ScResId
(
FT_COND_NR
)
),
maFtCondition
(
this
,
ScResId
(
FT_CONDITION
)
),
mnIndex
(
0
),
maStrCondition
(
ScResId
(
STR_CONDITION
).
toString
()),
maLbType
(
this
,
ScResId
(
LB_TYPE
)
),
mpDoc
(
pDoc
),
maPos
(
rPos
)
{
SetControlBackground
(
GetSettings
().
GetStyleSettings
().
GetDialogColor
());
FreeResource
();
/*
maLbType.SelectEntryPos(1);
maLbCondType.SelectEntryPos(0);
maEdVal2.Hide();
*/
//disable entries for color formats
maLbType
.
SetSelectHdl
(
LINK
(
pParent
,
ScCondFormatList
,
TypeListHdl
)
);
Init
();
maClickHdl
=
LINK
(
pParent
,
ScCondFormatList
,
EntrySelectHdl
);
SetHeight
();
}
ScCondFrmtEntry
::~
ScCondFrmtEntry
()
...
...
@@ -51,9 +47,7 @@ ScCondFrmtEntry::~ScCondFrmtEntry()
void
ScCondFrmtEntry
::
Init
()
{
maLbType
.
SetSelectHdl
(
LINK
(
this
,
ScCondFormatList
,
TypeListHdl
)
);
/*
maLbColorFormat.SetSelectHdl( LINK( this, ScCondFormatList, ColFormatTypeHdl ) );
*/
}
...
...
@@ -103,12 +97,19 @@ void ScCondFrmtEntry::SetHeight()
void
ScCondFrmtEntry
::
Select
()
{
maFtCondition
.
SetText
(
rtl
::
OUString
());
maFtCondition
.
Hide
();
maLbType
.
Show
();
mbActive
=
true
;
SetHeight
();
}
void
ScCondFrmtEntry
::
Deselect
()
{
rtl
::
OUString
maCondText
(
"deselected"
);
// = ScCondFormatHelper::GetExpression(CONDITION, maLbCondType.GetSelectEntryPos());
maFtCondition
.
SetText
(
maCondText
);
maFtCondition
.
Show
();
maLbType
.
Hide
();
mbActive
=
false
;
SetHeight
();
}
...
...
@@ -159,6 +160,11 @@ ScConditionFrmtEntry::ScConditionFrmtEntry( Window* pParent, ScDocument* pDoc, c
maLbStyle
(
this
,
ScResId
(
LB_STYLE
)
),
maWdPreview
(
this
,
ScResId
(
WD_PREVIEW
)
)
{
FreeResource
();
Init
();
if
(
pFormatEntry
)
{
rtl
::
OUString
aStyleName
=
pFormatEntry
->
GetStyle
();
...
...
@@ -209,9 +215,11 @@ ScConditionFrmtEntry::ScConditionFrmtEntry( Window* pParent, ScDocument* pDoc, c
}
else
{
maLbCondType
.
SelectEntryPos
(
0
);
maEdVal2
.
Hide
();
maLbStyle
.
SelectEntryPos
(
1
);
}
maLbType
.
SelectEntryPos
(
1
);
}
void
ScConditionFrmtEntry
::
Init
()
...
...
@@ -294,6 +302,30 @@ ScFormatEntry* ScConditionFrmtEntry::GetEntry() const
return
createConditionEntry
();
}
void
ScConditionFrmtEntry
::
SetActive
()
{
maLbCondType
.
Show
();
maEdVal1
.
Show
();
maEdVal2
.
Show
();
maFtStyle
.
Show
();
maLbStyle
.
Show
();
maWdPreview
.
Show
();
Select
();
}
void
ScConditionFrmtEntry
::
SetInactive
()
{
maLbCondType
.
Hide
();
maEdVal1
.
Hide
();
maEdVal2
.
Hide
();
maFtStyle
.
Hide
();
maLbStyle
.
Hide
();
maWdPreview
.
Hide
();
Deselect
();
}
IMPL_LINK_NOARG
(
ScConditionFrmtEntry
,
StyleSelectHdl
)
{
if
(
maLbStyle
.
GetSelectEntryPos
()
==
0
)
...
...
@@ -440,7 +472,7 @@ ScColorScaleEntry* createColorScaleEntry( const ListBox& rType, const ColorListB
ScColorScaleFrmtEntry
::
ScColorScaleFrmtEntry
(
Window
*
pParent
,
ScDocument
*
pDoc
,
const
ScAddress
&
rPos
,
const
ScColorScaleFormat
*
pFormat
)
:
ScCondFrmtEntry
(
pParent
,
pDoc
,
rPos
),
//
maLbColorFormat( this, ScResId( LB_COLOR_FORMAT ) ),
maLbColorFormat
(
this
,
ScResId
(
LB_COLOR_FORMAT
)
),
maLbColScale2
(
this
,
ScResId
(
LB_COL_SCALE2
)
),
maLbColScale3
(
this
,
ScResId
(
LB_COL_SCALE3
)
),
maLbEntryTypeMin
(
this
,
ScResId
(
LB_TYPE_COL_SCALE
)
),
...
...
@@ -455,12 +487,10 @@ ScColorScaleFrmtEntry::ScColorScaleFrmtEntry( Window* pParent, ScDocument* pDoc,
{
if
(
pFormat
)
{
/*
if
(
pFormat
->
size
()
==
2
)
maLbColorFormat
.
SelectEntryPos
(
0
);
else
maLbColorFormat
.
SelectEntryPos
(
1
);
*/
ScColorScaleFormat
::
const_iterator
itr
=
pFormat
->
begin
();
SetColorScaleEntryTypes
(
*
itr
,
maLbEntryTypeMin
,
maEdMin
,
maLbColMin
);
if
(
pFormat
->
size
()
==
3
)
...
...
@@ -473,12 +503,17 @@ ScColorScaleFrmtEntry::ScColorScaleFrmtEntry( Window* pParent, ScDocument* pDoc,
}
else
{
//maLbColorFormat.SelectEntryPos(0
);
maLbColorFormat
.
SelectEntryPos
(
1
);
maLbEntryTypeMin
.
SelectEntryPos
(
0
);
maLbEntryTypeMiddle
.
SelectEntryPos
(
2
);
maLbEntryTypeMax
.
SelectEntryPos
(
1
);
maEdMiddle
.
SetText
(
rtl
::
OUString
::
valueOf
(
static_cast
<
sal_Int32
>
(
50
)));
}
FreeResource
();
maLbColorFormat
.
SetSelectHdl
(
LINK
(
pParent
,
ScCondFormatList
,
ColFormatTypeHdl
)
);
Init
();
}
void
ScColorScaleFrmtEntry
::
Init
()
...
...
@@ -551,10 +586,8 @@ ScFormatEntry* ScColorScaleFrmtEntry::createColorscaleEntry() const
{
ScColorScaleFormat
*
pColorScale
=
new
ScColorScaleFormat
(
mpDoc
);
pColorScale
->
AddEntry
(
createColorScaleEntry
(
maLbEntryTypeMin
,
maLbColMin
,
maEdMin
,
mpDoc
,
maPos
));
/*
if
(
maLbColorFormat
.
GetSelectEntryPos
()
==
1
)
pColorScale
->
AddEntry
(
createColorScaleEntry
(
maLbEntryTypeMiddle
,
maLbColMiddle
,
maEdMiddle
,
mpDoc
,
maPos
));
*/
pColorScale
->
AddEntry
(
createColorScaleEntry
(
maLbEntryTypeMax
,
maLbColMax
,
maEdMax
,
mpDoc
,
maPos
));
return
pColorScale
;
}
...
...
@@ -564,6 +597,46 @@ ScFormatEntry* ScColorScaleFrmtEntry::GetEntry() const
return
createColorscaleEntry
();
}
void
ScColorScaleFrmtEntry
::
SetActive
()
{
maLbColScale2
.
Show
();
maLbColScale3
.
Show
();
maLbEntryTypeMin
.
Show
();
maLbEntryTypeMiddle
.
Show
();
maLbEntryTypeMax
.
Show
();
maEdMin
.
Show
();
maEdMiddle
.
Show
();
maEdMax
.
Show
();
maLbColMin
.
Show
();
maLbColMiddle
.
Show
();
maLbColMax
.
Show
();
Select
();
}
void
ScColorScaleFrmtEntry
::
SetInactive
()
{
maLbColScale2
.
Hide
();
maLbColScale3
.
Hide
();
maLbEntryTypeMin
.
Hide
();
maLbEntryTypeMiddle
.
Hide
();
maLbEntryTypeMax
.
Hide
();
maEdMin
.
Hide
();
maEdMiddle
.
Hide
();
maEdMax
.
Hide
();
maLbColMin
.
Hide
();
maLbColMiddle
.
Hide
();
maLbColMax
.
Hide
();
Deselect
();
}
IMPL_LINK
(
ScColorScaleFrmtEntry
,
EntryTypeHdl
,
ListBox
*
,
pBox
)
{
bool
bEnableEdit
=
true
;
...
...
@@ -646,16 +719,17 @@ void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Ed
ScDataBarFrmtEntry
::
ScDataBarFrmtEntry
(
Window
*
pParent
,
ScDocument
*
pDoc
,
const
ScAddress
&
rPos
,
const
ScDataBarFormat
*
pFormat
)
:
ScCondFrmtEntry
(
pParent
,
pDoc
,
rPos
),
maLbColorFormat
(
this
,
ScResId
(
LB_COLOR_FORMAT
)
),
maLbDataBarMinType
(
this
,
ScResId
(
LB_TYPE_COL_SCALE
)
),
maLbDataBarMaxType
(
this
,
ScResId
(
LB_TYPE_COL_SCALE
)
),
maEdDataBarMin
(
this
,
ScResId
(
ED_COL_SCALE
)
),
maEdDataBarMax
(
this
,
ScResId
(
ED_COL_SCALE
)
),
maBtOptions
(
this
,
ScResId
(
BTN_OPTIONS
)
)
{
maLbColorFormat
.
SelectEntryPos
(
2
);
if
(
pFormat
)
{
mpDataBarData
.
reset
(
new
ScDataBarFormatData
(
*
pFormat
->
GetDataBarData
()));
//maLbColorFormat.SelectEntryPos(2);
SetDataBarEntryTypes
(
*
mpDataBarData
->
mpLowerLimit
,
maLbDataBarMinType
,
maEdDataBarMin
);
SetDataBarEntryTypes
(
*
mpDataBarData
->
mpUpperLimit
,
maLbDataBarMaxType
,
maEdDataBarMax
);
DataBarTypeSelectHdl
(
NULL
);
...
...
@@ -665,7 +739,11 @@ ScDataBarFrmtEntry::ScDataBarFrmtEntry( Window* pParent, ScDocument* pDoc, const
maLbDataBarMinType
.
SelectEntryPos
(
0
);
maLbDataBarMaxType
.
SelectEntryPos
(
1
);
}
Init
();
maLbColorFormat
.
SetSelectHdl
(
LINK
(
pParent
,
ScCondFormatList
,
ColFormatTypeHdl
)
);
FreeResource
();
}
ScFormatEntry
*
ScDataBarFrmtEntry
::
GetEntry
()
const
...
...
@@ -704,6 +782,28 @@ ScFormatEntry* ScDataBarFrmtEntry::createDatabarEntry() const
return
pDataBar
;
}
void
ScDataBarFrmtEntry
::
SetActive
()
{
maLbDataBarMinType
.
Show
();
maLbDataBarMaxType
.
Show
();
maEdDataBarMin
.
Show
();
maEdDataBarMax
.
Show
();
maBtOptions
.
Show
();
Select
();
}
void
ScDataBarFrmtEntry
::
SetInactive
()
{
maLbDataBarMinType
.
Hide
();
maLbDataBarMaxType
.
Hide
();
maEdDataBarMin
.
Hide
();
maEdDataBarMax
.
Hide
();
maBtOptions
.
Hide
();
Deselect
();
}
IMPL_LINK_NOARG
(
ScDataBarFrmtEntry
,
DataBarTypeSelectHdl
)
{
sal_Int32
nSelectPos
=
maLbDataBarMinType
.
GetSelectEntryPos
();
...
...
sc/source/ui/inc/condformatdlgentry.hxx
Dosyayı görüntüle @
d7a27f40
...
...
@@ -9,34 +9,38 @@ private:
Link
maClickHdl
;
//general ui elements
ListBox
maLbType
;
FixedText
maFtCondNr
;
FixedText
maFtCondition
;
void
SetHeight
();
void
Init
();
sal_Int32
mnIndex
;
rtl
::
OUString
maStrCondition
;
protected
:
ListBox
maLbType
;
ScDocument
*
mpDoc
;
ScAddress
maPos
;
DECL_LINK
(
EdModifyHdl
,
Edit
*
);
void
Select
();
void
Deselect
();
public
:
ScCondFrmtEntry
(
Window
*
pParent
,
ScDocument
*
pDoc
,
const
ScAddress
&
rPos
);
virtual
~
ScCondFrmtEntry
();
virtual
long
Notify
(
NotifyEvent
&
rNEvt
);
void
Select
();
void
Deselect
();
bool
IsSelected
()
const
;
void
SetIndex
(
sal_Int32
nIndex
);
sal_Int32
GetIndex
()
const
{
return
mnIndex
;
}
void
SetHeight
();
virtual
ScFormatEntry
*
GetEntry
()
const
=
0
;
virtual
void
SetActive
()
=
0
;
virtual
void
SetInactive
()
=
0
;
};
class
ScConditionFrmtEntry
:
public
ScCondFrmtEntry
...
...
@@ -53,7 +57,6 @@ class ScConditionFrmtEntry : public ScCondFrmtEntry
ScFormatEntry
*
createConditionEntry
()
const
;
ScFormatEntry
*
createFormulaEntry
()
const
;
void
SetHeight
();
void
Init
();
DECL_LINK
(
StyleSelectHdl
,
void
*
);
DECL_LINK
(
ConditionTypeSelectHdl
,
void
*
);
...
...
@@ -61,13 +64,15 @@ public:
ScConditionFrmtEntry
(
Window
*
pParent
,
ScDocument
*
pDoc
,
const
ScAddress
&
rPos
,
const
ScCondFormatEntry
*
pFormatEntry
=
NULL
);
virtual
ScFormatEntry
*
GetEntry
()
const
;
virtual
void
SetActive
();
virtual
void
SetInactive
();
};
class
ScColorScaleFrmtEntry
:
public
ScCondFrmtEntry
{
//color format ui elements
//
ListBox maLbColorFormat;
ListBox
maLbColorFormat
;
//color scale ui elements
ListBox
maLbColScale2
;
...
...
@@ -87,19 +92,20 @@ class ScColorScaleFrmtEntry : public ScCondFrmtEntry
ScFormatEntry
*
createColorscaleEntry
()
const
;
void
SetHeight
();
void
Init
();
DECL_LINK
(
EntryTypeHdl
,
ListBox
*
);
public
:
ScColorScaleFrmtEntry
(
Window
*
pParent
,
ScDocument
*
pDoc
,
const
ScAddress
&
rPos
,
const
ScColorScaleFormat
*
pFormat
=
NULL
);
virtual
ScFormatEntry
*
GetEntry
()
const
;
virtual
void
SetActive
();
virtual
void
SetInactive
();
};
class
ScDataBarFrmtEntry
:
public
ScCondFrmtEntry
{
//color format ui elements
//
ListBox maLbColorFormat;
ListBox
maLbColorFormat
;
//data bar ui elements
ListBox
maLbDataBarMinType
;
...
...
@@ -113,7 +119,6 @@ class ScDataBarFrmtEntry : public ScCondFrmtEntry
ScFormatEntry
*
createDatabarEntry
()
const
;
void
SetHeight
();
void
Init
();
DECL_LINK
(
OptionBtnHdl
,
void
*
);
...
...
@@ -121,5 +126,7 @@ class ScDataBarFrmtEntry : public ScCondFrmtEntry
public
:
ScDataBarFrmtEntry
(
Window
*
pParemt
,
ScDocument
*
pDoc
,
const
ScAddress
&
rPos
,
const
ScDataBarFormat
*
pFormat
=
NULL
);
virtual
ScFormatEntry
*
GetEntry
()
const
;
virtual
void
SetActive
();
virtual
void
SetInactive
();
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment