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
0d05bb47
Kaydet (Commit)
0d05bb47
authored
Kas 28, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add ranges for pages, frames, nums
Change-Id: Id3c0f39b076bd3908d3ac4154e72ee14ca3963ae
üst
9c852dd4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
unostyle.cxx
sw/source/core/unocore/unostyle.cxx
+13
-13
No files found.
sw/source/core/unocore/unostyle.cxx
Dosyayı görüntüle @
0d05bb47
...
@@ -120,6 +120,9 @@ namespace
...
@@ -120,6 +120,9 @@ namespace
constexpr sal_uInt16 nPoolCollRegisterRange = RES_POOLCOLL_REGISTER_END - RES_POOLCOLL_REGISTER_BEGIN;
constexpr sal_uInt16 nPoolCollRegisterRange = RES_POOLCOLL_REGISTER_END - RES_POOLCOLL_REGISTER_BEGIN;
constexpr sal_uInt16 nPoolCollDocRange = RES_POOLCOLL_DOC_END - RES_POOLCOLL_DOC_BEGIN;
constexpr sal_uInt16 nPoolCollDocRange = RES_POOLCOLL_DOC_END - RES_POOLCOLL_DOC_BEGIN;
constexpr sal_uInt16 nPoolCollHtmlRange = RES_POOLCOLL_HTML_END - RES_POOLCOLL_HTML_BEGIN;
constexpr sal_uInt16 nPoolCollHtmlRange = RES_POOLCOLL_HTML_END - RES_POOLCOLL_HTML_BEGIN;
constexpr sal_uInt16 nPoolFrameRange = RES_POOLFRM_END - RES_POOLFRM_BEGIN;
constexpr sal_uInt16 nPoolPageRange = RES_POOLPAGE_END - RES_POOLPAGE_BEGIN;
constexpr sal_uInt16 nPoolNumRange = RES_POOLNUMRULE_END - RES_POOLNUMRULE_BEGIN;
constexpr sal_uInt16 nPoolCollListsStackedStart = nPoolCollTextRange;
constexpr sal_uInt16 nPoolCollListsStackedStart = nPoolCollTextRange;
constexpr sal_uInt16 nPoolCollExtraStackedStart = nPoolCollListsStackedStart + nPoolCollListsRange;
constexpr sal_uInt16 nPoolCollExtraStackedStart = nPoolCollListsStackedStart + nPoolCollListsRange;
constexpr sal_uInt16 nPoolCollRegisterStackedStart = nPoolCollExtraStackedStart + nPoolCollExtraRange;
constexpr sal_uInt16 nPoolCollRegisterStackedStart = nPoolCollExtraStackedStart + nPoolCollExtraRange;
...
@@ -436,8 +439,7 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PARA>(const SwDoc& rDoc, OUStr
...
@@ -436,8 +439,7 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PARA>(const SwDoc& rDoc, OUStr
template<>
template<>
sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_FRAME>(const SwDoc& rDoc, OUString* pString, sal_Int32 nIndex)
sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_FRAME>(const SwDoc& rDoc, OUString* pString, sal_Int32 nIndex)
{
{
constexpr
sal_Int32
nBaseCount
=
RES_POOLFRM_END
-
RES_POOLFRM_BEGIN
;
nIndex -= nPoolFrameRange;
nIndex
-=
nBaseCount
;
sal_Int32 nCount = 0;
sal_Int32 nCount = 0;
for(const auto pFormat : *rDoc.GetFrameFormats())
for(const auto pFormat : *rDoc.GetFrameFormats())
{
{
...
@@ -452,15 +454,14 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_FRAME>(const SwDoc& rDoc, OUSt
...
@@ -452,15 +454,14 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_FRAME>(const SwDoc& rDoc, OUSt
}
}
nCount++;
nCount++;
}
}
return
nCount
+
n
BaseCount
;
return nCount + n
PoolFrameRange
;
}
}
template<>
template<>
sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PAGE>(const SwDoc& rDoc, OUString* pString, sal_Int32 nIndex)
sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PAGE>(const SwDoc& rDoc, OUString* pString, sal_Int32 nIndex)
{
{
nIndex -= nPoolPageRange;
sal_Int32 nCount = 0;
sal_Int32 nCount = 0;
const
sal_Int32
nBaseCount
=
RES_POOLPAGE_END
-
RES_POOLPAGE_BEGIN
;
nIndex
=
nIndex
-
nBaseCount
;
const size_t nArrLen = rDoc.GetPageDescCnt();
const size_t nArrLen = rDoc.GetPageDescCnt();
for(size_t i = 0; i < nArrLen; ++i)
for(size_t i = 0; i < nArrLen; ++i)
{
{
...
@@ -476,15 +477,14 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PAGE>(const SwDoc& rDoc, OUStr
...
@@ -476,15 +477,14 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PAGE>(const SwDoc& rDoc, OUStr
++nCount;
++nCount;
}
}
}
}
nCount
+=
n
BaseCount
;
nCount += n
PoolPageRange
;
return nCount;
return nCount;
}
}
template<>
template<>
sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PSEUDO>(const SwDoc& rDoc, OUString* pString, sal_Int32 nIndex)
sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PSEUDO>(const SwDoc& rDoc, OUString* pString, sal_Int32 nIndex)
{
{
constexpr
sal_Int32
nBaseCount
=
RES_POOLNUMRULE_END
-
RES_POOLNUMRULE_BEGIN
;
nIndex -= nPoolNumRange;
nIndex
-=
nBaseCount
;
sal_Int32 nCount = 0;
sal_Int32 nCount = 0;
for(const auto pRule : rDoc.GetNumRuleTable())
for(const auto pRule : rDoc.GetNumRuleTable())
{
{
...
@@ -499,7 +499,7 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PSEUDO>(const SwDoc& rDoc, OUS
...
@@ -499,7 +499,7 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PSEUDO>(const SwDoc& rDoc, OUS
}
}
++nCount;
++nCount;
}
}
return
nCount
+
n
BaseCount
;
return nCount + n
PoolNumRange
;
}
}
sal_Int32 XStyleFamily::GetCountOrName(OUString* pString, sal_Int32 nIndex)
sal_Int32 XStyleFamily::GetCountOrName(OUString* pString, sal_Int32 nIndex)
...
@@ -563,20 +563,20 @@ uno::Any XStyleFamily::getByIndex(sal_Int32 nIndex)
...
@@ -563,20 +563,20 @@ uno::Any XStyleFamily::getByIndex(sal_Int32 nIndex)
break;
break;
case SFX_STYLE_FAMILY_FRAME:
case SFX_STYLE_FAMILY_FRAME:
{
{
if
(
nIndex
<
(
RES_POOLFRM_END
-
RES_POOLFRM_BEGIN
)
)
if(nIndex <
nPoolFrameRange
)
SwStyleNameMapper::FillUIName(static_cast<sal_uInt16>(RES_POOLFRM_BEGIN + nIndex), sStyleName);
SwStyleNameMapper::FillUIName(static_cast<sal_uInt16>(RES_POOLFRM_BEGIN + nIndex), sStyleName);
}
}
break;
break;
case SFX_STYLE_FAMILY_PAGE:
case SFX_STYLE_FAMILY_PAGE:
{
{
if
(
nIndex
<
(
RES_POOLPAGE_END
-
RES_POOLPAGE_BEGIN
)
)
if(nIndex <
nPoolPageRange
)
SwStyleNameMapper::FillUIName(static_cast<sal_uInt16>(RES_POOLPAGE_BEGIN + nIndex), sStyleName);
SwStyleNameMapper::FillUIName(static_cast<sal_uInt16>(RES_POOLPAGE_BEGIN + nIndex), sStyleName);
}
}
break;
break;
case SFX_STYLE_FAMILY_PSEUDO:
case SFX_STYLE_FAMILY_PSEUDO:
{
{
if
(
nIndex
<
(
RES_POOLNUMRULE_END
-
RES_POOLNUMRULE_BEGIN
)
)
if(nIndex <
nPoolNumRange
)
SwStyleNameMapper
::
FillUIName
(
static_cast
<
sal_uInt16
>
(
RES_POOLNUMRULE_BEGIN
+
nIndex
),
sStyleName
);
SwStyleNameMapper::FillUIName
(static_cast<sal_uInt16>(RES_POOLNUMRULE_BEGIN + nIndex), sStyleName
);
}
}
break;
break;
...
...
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