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
aa028cab
Kaydet (Commit)
aa028cab
authored
Haz 29, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
update all style lists when a new style is added
Change-Id: Ib404958e2bc0e3bfe075d1c94f348e907ee004c8
üst
5b9bad74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
4 deletions
+67
-4
condformatdlgentry.cxx
sc/source/ui/condformat/condformatdlgentry.cxx
+55
-2
condformatdlgentry.hxx
sc/source/ui/inc/condformatdlgentry.hxx
+12
-2
No files found.
sc/source/ui/condformat/condformatdlgentry.cxx
Dosyayı görüntüle @
aa028cab
...
@@ -167,7 +167,8 @@ ScConditionFrmtEntry::ScConditionFrmtEntry( Window* pParent, ScDocument* pDoc, c
...
@@ -167,7 +167,8 @@ ScConditionFrmtEntry::ScConditionFrmtEntry( Window* pParent, ScDocument* pDoc, c
maEdVal2
(
this
,
NULL
,
NULL
,
ScResId
(
ED_VAL2
)
),
maEdVal2
(
this
,
NULL
,
NULL
,
ScResId
(
ED_VAL2
)
),
maFtStyle
(
this
,
ScResId
(
FT_STYLE
)
),
maFtStyle
(
this
,
ScResId
(
FT_STYLE
)
),
maLbStyle
(
this
,
ScResId
(
LB_STYLE
)
),
maLbStyle
(
this
,
ScResId
(
LB_STYLE
)
),
maWdPreview
(
this
,
ScResId
(
WD_PREVIEW
)
)
maWdPreview
(
this
,
ScResId
(
WD_PREVIEW
)
),
mbIsInStyleCreate
(
false
)
{
{
FreeResource
();
FreeResource
();
...
@@ -175,6 +176,8 @@ ScConditionFrmtEntry::ScConditionFrmtEntry( Window* pParent, ScDocument* pDoc, c
...
@@ -175,6 +176,8 @@ ScConditionFrmtEntry::ScConditionFrmtEntry( Window* pParent, ScDocument* pDoc, c
Init
();
Init
();
StartListening
(
*
pDoc
->
GetStyleSheetPool
(),
true
);
if
(
pFormatEntry
)
if
(
pFormatEntry
)
{
{
OUString
aStyleName
=
pFormatEntry
->
GetStyle
();
OUString
aStyleName
=
pFormatEntry
->
GetStyle
();
...
@@ -436,6 +439,35 @@ void ScConditionFrmtEntry::SetInactive()
...
@@ -436,6 +439,35 @@ void ScConditionFrmtEntry::SetInactive()
namespace
{
namespace
{
void
UpdateStyleList
(
ListBox
&
rLbStyle
,
ScDocument
*
pDoc
)
{
OUString
aSelectedStyle
=
rLbStyle
.
GetSelectEntry
();
for
(
sal_Int32
i
=
rLbStyle
.
GetEntryCount
();
i
>=
1
;
--
i
)
{
rLbStyle
.
RemoveEntry
(
i
);
}
FillStyleListBox
(
pDoc
,
rLbStyle
);
rLbStyle
.
SelectEntry
(
aSelectedStyle
);
}
}
void
ScConditionFrmtEntry
::
Notify
(
SfxBroadcaster
&
,
const
SfxHint
&
rHint
)
{
SfxStyleSheetHint
*
pHint
=
PTR_CAST
(
SfxStyleSheetHint
,
&
rHint
);
if
(
!
pHint
)
return
;
sal_uInt16
nHint
=
pHint
->
GetHint
();
if
(
nHint
==
SFX_STYLESHEET_MODIFIED
)
{
if
(
!
mbIsInStyleCreate
)
UpdateStyleList
(
maLbStyle
,
mpDoc
);
}
}
namespace
{
void
StyleSelect
(
ListBox
&
rLbStyle
,
ScDocument
*
pDoc
,
SvxFontPrevWindow
&
rWdPreview
)
void
StyleSelect
(
ListBox
&
rLbStyle
,
ScDocument
*
pDoc
,
SvxFontPrevWindow
&
rWdPreview
)
{
{
if
(
rLbStyle
.
GetSelectEntryPos
()
==
0
)
if
(
rLbStyle
.
GetSelectEntryPos
()
==
0
)
...
@@ -503,7 +535,9 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
...
@@ -503,7 +535,9 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
IMPL_LINK_NOARG
(
ScConditionFrmtEntry
,
StyleSelectHdl
)
IMPL_LINK_NOARG
(
ScConditionFrmtEntry
,
StyleSelectHdl
)
{
{
mbIsInStyleCreate
=
true
;
StyleSelect
(
maLbStyle
,
mpDoc
,
maWdPreview
);
StyleSelect
(
maLbStyle
,
mpDoc
,
maWdPreview
);
mbIsInStyleCreate
=
false
;
return
0
;
return
0
;
}
}
...
@@ -1189,11 +1223,14 @@ ScDateFrmtEntry::ScDateFrmtEntry( Window* pParent, ScDocument* pDoc, const ScCon
...
@@ -1189,11 +1223,14 @@ ScDateFrmtEntry::ScDateFrmtEntry( Window* pParent, ScDocument* pDoc, const ScCon
maLbDateEntry
(
this
,
ScResId
(
LB_DATE_TYPE
)
),
maLbDateEntry
(
this
,
ScResId
(
LB_DATE_TYPE
)
),
maFtStyle
(
this
,
ScResId
(
FT_STYLE
)
),
maFtStyle
(
this
,
ScResId
(
FT_STYLE
)
),
maLbStyle
(
this
,
ScResId
(
LB_STYLE
)
),
maLbStyle
(
this
,
ScResId
(
LB_STYLE
)
),
maWdPreview
(
this
,
ScResId
(
WD_PREVIEW
)
)
maWdPreview
(
this
,
ScResId
(
WD_PREVIEW
)
),
mbIsInStyleCreate
(
false
)
{
{
Init
();
Init
();
FreeResource
();
FreeResource
();
StartListening
(
*
pDoc
->
GetStyleSheetPool
(),
sal_True
);
if
(
pFormat
)
if
(
pFormat
)
{
{
sal_Int32
nPos
=
static_cast
<
sal_Int32
>
(
pFormat
->
GetDateType
());
sal_Int32
nPos
=
static_cast
<
sal_Int32
>
(
pFormat
->
GetDateType
());
...
@@ -1234,6 +1271,20 @@ void ScDateFrmtEntry::SetInactive()
...
@@ -1234,6 +1271,20 @@ void ScDateFrmtEntry::SetInactive()
Deselect
();
Deselect
();
}
}
void
ScDateFrmtEntry
::
Notify
(
SfxBroadcaster
&
,
const
SfxHint
&
rHint
)
{
SfxStyleSheetHint
*
pHint
=
PTR_CAST
(
SfxStyleSheetHint
,
&
rHint
);
if
(
!
pHint
)
return
;
sal_uInt16
nHint
=
pHint
->
GetHint
();
if
(
nHint
==
SFX_STYLESHEET_MODIFIED
)
{
if
(
!
mbIsInStyleCreate
)
UpdateStyleList
(
maLbStyle
,
mpDoc
);
}
}
ScFormatEntry
*
ScDateFrmtEntry
::
GetEntry
()
const
ScFormatEntry
*
ScDateFrmtEntry
::
GetEntry
()
const
{
{
ScCondDateFormatEntry
*
pNewEntry
=
new
ScCondDateFormatEntry
(
mpDoc
);
ScCondDateFormatEntry
*
pNewEntry
=
new
ScCondDateFormatEntry
(
mpDoc
);
...
@@ -1250,7 +1301,9 @@ OUString ScDateFrmtEntry::GetExpressionString()
...
@@ -1250,7 +1301,9 @@ OUString ScDateFrmtEntry::GetExpressionString()
IMPL_LINK_NOARG
(
ScDateFrmtEntry
,
StyleSelectHdl
)
IMPL_LINK_NOARG
(
ScDateFrmtEntry
,
StyleSelectHdl
)
{
{
mbIsInStyleCreate
=
true
;
StyleSelect
(
maLbStyle
,
mpDoc
,
maWdPreview
);
StyleSelect
(
maLbStyle
,
mpDoc
,
maWdPreview
);
mbIsInStyleCreate
=
false
;
return
0
;
return
0
;
}
}
...
...
sc/source/ui/inc/condformatdlgentry.hxx
Dosyayı görüntüle @
aa028cab
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
#include "conditio.hxx"
#include "conditio.hxx"
#include <formula/funcutl.hxx>
#include <formula/funcutl.hxx>
#include <svl/lstner.hxx>
class
ScIconSetFrmtDataEntry
;
class
ScIconSetFrmtDataEntry
;
namespace
condformat
{
namespace
condformat
{
...
@@ -76,7 +78,7 @@ public:
...
@@ -76,7 +78,7 @@ public:
virtual
condformat
::
entry
::
ScCondFrmtEntryType
GetType
()
=
0
;
virtual
condformat
::
entry
::
ScCondFrmtEntryType
GetType
()
=
0
;
};
};
class
ScConditionFrmtEntry
:
public
ScCondFrmtEntry
class
ScConditionFrmtEntry
:
public
ScCondFrmtEntry
,
public
SfxListener
{
{
//cond format ui elements
//cond format ui elements
ListBox
maLbCondType
;
ListBox
maLbCondType
;
...
@@ -85,6 +87,7 @@ class ScConditionFrmtEntry : public ScCondFrmtEntry
...
@@ -85,6 +87,7 @@ class ScConditionFrmtEntry : public ScCondFrmtEntry
FixedText
maFtStyle
;
FixedText
maFtStyle
;
ListBox
maLbStyle
;
ListBox
maLbStyle
;
SvxFontPrevWindow
maWdPreview
;
SvxFontPrevWindow
maWdPreview
;
bool
mbIsInStyleCreate
;
ScFormatEntry
*
createConditionEntry
()
const
;
ScFormatEntry
*
createConditionEntry
()
const
;
...
@@ -100,6 +103,9 @@ public:
...
@@ -100,6 +103,9 @@ public:
virtual
void
SetActive
();
virtual
void
SetActive
();
virtual
void
SetInactive
();
virtual
void
SetInactive
();
virtual
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
);
using
ScCondFrmtEntry
::
Notify
;
virtual
condformat
::
entry
::
ScCondFrmtEntryType
GetType
()
{
return
condformat
::
entry
::
CONDITION
;
}
virtual
condformat
::
entry
::
ScCondFrmtEntryType
GetType
()
{
return
condformat
::
entry
::
CONDITION
;
}
};
};
...
@@ -219,7 +225,7 @@ public:
...
@@ -219,7 +225,7 @@ public:
virtual
condformat
::
entry
::
ScCondFrmtEntryType
GetType
()
{
return
condformat
::
entry
::
DATABAR
;
}
virtual
condformat
::
entry
::
ScCondFrmtEntryType
GetType
()
{
return
condformat
::
entry
::
DATABAR
;
}
};
};
class
ScDateFrmtEntry
:
public
ScCondFrmtEntry
class
ScDateFrmtEntry
:
public
ScCondFrmtEntry
,
public
SfxListener
{
{
public
:
public
:
ScDateFrmtEntry
(
Window
*
pParent
,
ScDocument
*
pDoc
,
const
ScCondDateFormatEntry
*
pFormat
=
NULL
);
ScDateFrmtEntry
(
Window
*
pParent
,
ScDocument
*
pDoc
,
const
ScCondDateFormatEntry
*
pFormat
=
NULL
);
...
@@ -228,6 +234,8 @@ public:
...
@@ -228,6 +234,8 @@ public:
virtual
void
SetInactive
();
virtual
void
SetInactive
();
virtual
condformat
::
entry
::
ScCondFrmtEntryType
GetType
()
{
return
condformat
::
entry
::
DATE
;
}
virtual
condformat
::
entry
::
ScCondFrmtEntryType
GetType
()
{
return
condformat
::
entry
::
DATE
;
}
virtual
void
Notify
(
SfxBroadcaster
&
rBC
,
const
SfxHint
&
rHint
);
using
ScCondFrmtEntry
::
Notify
;
protected
:
protected
:
virtual
OUString
GetExpressionString
();
virtual
OUString
GetExpressionString
();
...
@@ -240,6 +248,8 @@ private:
...
@@ -240,6 +248,8 @@ private:
FixedText
maFtStyle
;
FixedText
maFtStyle
;
ListBox
maLbStyle
;
ListBox
maLbStyle
;
SvxFontPrevWindow
maWdPreview
;
SvxFontPrevWindow
maWdPreview
;
bool
mbIsInStyleCreate
;
};
};
class
ScIconSetFrmtEntry
:
public
ScCondFrmtEntry
class
ScIconSetFrmtEntry
:
public
ScCondFrmtEntry
...
...
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