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
c3abff8a
Kaydet (Commit)
c3abff8a
authored
Kas 28, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use constexprs and static_assert()
Change-Id: Ia7abeed325d8bc845e35bb9e7667cec6b83ac11f
üst
9bc9b093
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
unostyle.cxx
sw/source/core/unocore/unostyle.cxx
+8
-8
No files found.
sw/source/core/unocore/unostyle.cxx
Dosyayı görüntüle @
c3abff8a
...
...
@@ -482,17 +482,17 @@ uno::Any SwXStyleFamily::getByIndex(sal_Int32 nIndex)
if
(
!
m_pBasePool
)
throw
uno
::
RuntimeException
();
OUString
sStyleName
;
switch
(
m_eFamily
)
switch
(
m_eFamily
)
{
case
SFX_STYLE_FAMILY_CHAR
:
{
if
(
nIndex
<
(
RES_POOLCHR_NORMAL_END
-
RES_POOLCHR_NORMAL_BEGIN
)
)
SwStyleNameMapper
::
FillUIName
(
static_cast
<
sal_uInt16
>
(
RES_POOLCHR_NORMAL_BEGIN
+
nIndex
),
sStyleName
)
;
else
if
(
nIndex
<
(
RES_POOLCHR_HTML_END
-
RES_POOLCHR_HTML_BEGIN
+
RES_POOLCHR_NORMAL_END
-
RES_POOLCHR_NORMAL_BEGIN
)
)
SwStyleNameMapper
::
FillUIName
(
RES_POOLCHR_HTML_BEGIN
-
RES_POOLCHR_NORMAL_END
+
RES_POOLCHR_NORMAL_BEGIN
+
nIndex
,
sStyleName
);
constexpr
sal_Int32
nPoolChrNormalRange
=
RES_POOLCHR_NORMAL_END
-
RES_POOLCHR_NORMAL_BEGIN
;
constexpr
sal_Int32
nPoolChrHtmlRange
=
RES_POOLCHR_HTML_END
-
RES_POOLCHR_HTML_BEGIN
;
static_assert
(
nPoolChrNormalRange
>
0
&&
nPoolChrHtmlRange
>
0
,
"invalid pool range"
);
if
(
nIndex
<
nPoolChrNormalRange
)
SwStyleNameMapper
::
FillUIName
(
static_cast
<
sal_uInt16
>
(
RES_POOLCHR_NORMAL_BEGIN
+
nIndex
),
sStyleName
);
else
if
(
nIndex
<
(
nPoolChrHtmlRange
+
nPoolChrNormalRange
))
SwStyleNameMapper
::
FillUIName
(
RES_POOLCHR_HTML_BEGIN
+
nPoolChrNormalRange
+
nIndex
,
sStyleName
);
}
break
;
case
SFX_STYLE_FAMILY_PARA
:
...
...
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