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
9c852dd4
Kaydet (Commit)
9c852dd4
authored
Kas 28, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make GetCountOrName a private member to reduce args
Change-Id: I72430f032d032f825034ec00d662ceaaa6a4dc62
üst
71a7e566
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
unostyle.cxx
sw/source/core/unocore/unostyle.cxx
+11
-10
No files found.
sw/source/core/unocore/unostyle.cxx
Dosyayı görüntüle @
9c852dd4
...
@@ -145,6 +145,8 @@ namespace sw
...
@@ -145,6 +145,8 @@ namespace sw
SwDocShell
*
m_pDocShell
;
SwDocShell
*
m_pDocShell
;
SwXStyle
*
_FindStyle
(
const
OUString
&
rStyleName
)
const
;
SwXStyle
*
_FindStyle
(
const
OUString
&
rStyleName
)
const
;
sal_Int32
GetCountOrName
(
OUString
*
pString
,
sal_Int32
nIndex
=
SAL_MAX_INT32
);
public
:
public
:
XStyleFamily
(
SwDocShell
*
pDocShell
,
const
SfxStyleFamily
eFamily
)
XStyleFamily
(
SwDocShell
*
pDocShell
,
const
SfxStyleFamily
eFamily
)
:
m_eFamily
(
eFamily
)
:
m_eFamily
(
eFamily
)
...
@@ -157,7 +159,11 @@ namespace sw
...
@@ -157,7 +159,11 @@ namespace sw
virtual
~
XStyleFamily
()
{};
virtual
~
XStyleFamily
()
{};
//XIndexAccess
//XIndexAccess
virtual
sal_Int32
SAL_CALL
getCount
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
override
;
virtual
sal_Int32
SAL_CALL
getCount
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
override
{
SolarMutexGuard
aGuard
;
return
GetCountOrName
(
nullptr
);
};
virtual
uno
::
Any
SAL_CALL
getByIndex
(
sal_Int32
nIndex
)
throw
(
lang
::
IndexOutOfBoundsException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
override
;
virtual
uno
::
Any
SAL_CALL
getByIndex
(
sal_Int32
nIndex
)
throw
(
lang
::
IndexOutOfBoundsException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
override
;
//XElementAccess
//XElementAccess
...
@@ -496,9 +502,10 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PSEUDO>(const SwDoc& rDoc, OUS
...
@@ -496,9 +502,10 @@ sal_Int32 lcl_GetCountOrNameImpl<SFX_STYLE_FAMILY_PSEUDO>(const SwDoc& rDoc, OUS
return
nCount
+
nBaseCount
;
return
nCount
+
nBaseCount
;
}
}
s
tatic
sal_Int32
lcl_GetCountOrName
(
const
SwDoc
&
rDoc
,
SfxStyleFamily
eFamily
,
OUString
*
pString
,
sal_Int32
nIndex
=
SAL_MAX_INT32
)
s
al_Int32
XStyleFamily
::
GetCountOrName
(
OUString
*
pString
,
sal_Int32
nIndex
)
{
{
switch
(
eFamily
)
const
auto
&
rDoc
=
*
m_pDocShell
->
GetDoc
();
switch
(
m_eFamily
)
{
{
case
SFX_STYLE_FAMILY_CHAR
:
case
SFX_STYLE_FAMILY_CHAR
:
return
lcl_GetCountOrNameImpl
<
SFX_STYLE_FAMILY_CHAR
>
(
rDoc
,
pString
,
nIndex
);
return
lcl_GetCountOrNameImpl
<
SFX_STYLE_FAMILY_CHAR
>
(
rDoc
,
pString
,
nIndex
);
...
@@ -515,12 +522,6 @@ static sal_Int32 lcl_GetCountOrName(const SwDoc& rDoc, SfxStyleFamily eFamily, O
...
@@ -515,12 +522,6 @@ static sal_Int32 lcl_GetCountOrName(const SwDoc& rDoc, SfxStyleFamily eFamily, O
}
}
}
}
sal_Int32
XStyleFamily
::
getCount
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
return
lcl_GetCountOrName
(
*
m_pDocShell
->
GetDoc
(),
m_eFamily
,
nullptr
);
}
uno
::
Any
XStyleFamily
::
getByIndex
(
sal_Int32
nIndex
)
uno
::
Any
XStyleFamily
::
getByIndex
(
sal_Int32
nIndex
)
throw
(
lang
::
IndexOutOfBoundsException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
throw
(
lang
::
IndexOutOfBoundsException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
{
...
@@ -583,7 +584,7 @@ uno::Any XStyleFamily::getByIndex(sal_Int32 nIndex)
...
@@ -583,7 +584,7 @@ uno::Any XStyleFamily::getByIndex(sal_Int32 nIndex)
;
;
}
}
if
(
sStyleName
.
isEmpty
())
if
(
sStyleName
.
isEmpty
())
lcl_GetCountOrName
(
*
m_pDocShell
->
GetDoc
(),
m_eFamily
,
&
sStyleName
,
nIndex
);
GetCountOrName
(
&
sStyleName
,
nIndex
);
if
(
sStyleName
.
isEmpty
())
if
(
sStyleName
.
isEmpty
())
throw
lang
::
IndexOutOfBoundsException
();
throw
lang
::
IndexOutOfBoundsException
();
...
...
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