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
fe151f71
Kaydet (Commit)
fe151f71
authored
Kas 27, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
keep containers in a map to simplify things
Change-Id: I20db506fb232c408b7b96e3b1a54da44f342d8bd
üst
1e44f3d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
70 deletions
+9
-70
unostyle.hxx
sw/inc/unostyle.hxx
+1
-5
unostyle.cxx
sw/source/core/unocore/unostyle.cxx
+8
-65
No files found.
sw/inc/unostyle.hxx
Dosyayı görüntüle @
fe151f71
...
...
@@ -62,11 +62,7 @@ class SwXStyleFamilies : public cppu::WeakImplHelper
{
SwDocShell
*
m_pDocShell
;
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>
m_xCharStyles
;
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>
m_xParaStyles
;
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>
m_xFrameStyles
;
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>
m_xPageStyles
;
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>
m_xNumberingStyles
;
std
::
map
<
SfxStyleFamily
,
css
::
uno
::
Reference
<
css
::
container
::
XNameContainer
>>
m_vContainers
;
protected
:
virtual
~
SwXStyleFamilies
();
public
:
...
...
sw/source/core/unocore/unostyle.cxx
Dosyayı görüntüle @
fe151f71
...
...
@@ -162,12 +162,7 @@ uno::Sequence< OUString > SwXStyleFamilies::getSupportedServiceNames() throw( un
SwXStyleFamilies
::
SwXStyleFamilies
(
SwDocShell
&
rDocShell
)
:
SwUnoCollection
(
rDocShell
.
GetDoc
()),
m_pDocShell
(
&
rDocShell
),
m_xCharStyles
(),
m_xParaStyles
(),
m_xFrameStyles
(),
m_xPageStyles
(),
m_xNumberingStyles
()
m_pDocShell
(
&
rDocShell
)
{
}
...
...
@@ -216,68 +211,16 @@ uno::Any SwXStyleFamilies::getByIndex(sal_Int32 nIndex)
throw
(
lang
::
IndexOutOfBoundsException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
uno
::
Any
aRet
;
if
(
nIndex
<
0
||
nIndex
>=
static_cast
<
sal_Int32
>
(
our_vStyleFamilyEntries
.
size
()))
throw
lang
::
IndexOutOfBoundsException
();
if
(
IsValid
())
{
uno
::
Reference
<
container
::
XNameContainer
>
aRef
;
auto
eFamily
=
our_vStyleFamilyEntries
[
nIndex
].
m_eFamily
;
switch
(
eFamily
)
{
case
SFX_STYLE_FAMILY_CHAR
:
{
if
(
!
m_xCharStyles
.
is
())
{
m_xCharStyles
=
new
SwXStyleFamily
(
m_pDocShell
,
eFamily
);
}
aRef
=
m_xCharStyles
;
}
break
;
case
SFX_STYLE_FAMILY_PARA
:
{
if
(
!
m_xParaStyles
.
is
())
{
m_xParaStyles
=
new
SwXStyleFamily
(
m_pDocShell
,
eFamily
);
}
aRef
=
m_xParaStyles
;
}
break
;
case
SFX_STYLE_FAMILY_PAGE
:
{
if
(
!
m_xPageStyles
.
is
())
{
m_xPageStyles
=
new
SwXStyleFamily
(
m_pDocShell
,
eFamily
);
}
aRef
=
m_xPageStyles
;
}
break
;
case
SFX_STYLE_FAMILY_FRAME
:
{
if
(
!
m_xFrameStyles
.
is
())
{
m_xFrameStyles
=
new
SwXStyleFamily
(
m_pDocShell
,
eFamily
);
}
aRef
=
m_xFrameStyles
;
}
break
;
case
SFX_STYLE_FAMILY_PSEUDO
:
{
if
(
!
m_xNumberingStyles
.
is
())
{
m_xNumberingStyles
=
new
SwXStyleFamily
(
m_pDocShell
,
eFamily
);
}
aRef
=
m_xNumberingStyles
;
}
break
;
case
SFX_STYLE_FAMILY_ALL
:
assert
(
false
);
}
aRet
.
setValue
(
&
aRef
,
cppu
::
UnoType
<
container
::
XNameContainer
>::
get
());
}
else
if
(
!
IsValid
())
throw
uno
::
RuntimeException
();
return
aRet
;
auto
eFamily
=
our_vStyleFamilyEntries
[
nIndex
].
m_eFamily
;
assert
(
eFamily
!=
SFX_STYLE_FAMILY_ALL
);
auto
&
rxContainer
=
m_vContainers
[
eFamily
];
if
(
!
rxContainer
.
is
())
rxContainer
=
new
SwXStyleFamily
(
m_pDocShell
,
eFamily
);
return
uno
::
makeAny
(
rxContainer
);
}
uno
::
Type
SwXStyleFamilies
::
getElementType
()
...
...
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