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
8aa26b63
Kaydet (Commit)
8aa26b63
authored
Ock 14, 2016
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor to limit scope: FN_UNO_CATEGORY
Change-Id: I15ccdcf7c56a9677fb01646cad96e7c7d9ba7cd4
üst
84da0685
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
30 deletions
+26
-30
unostyle.cxx
sw/source/core/unocore/unostyle.cxx
+26
-30
No files found.
sw/source/core/unocore/unostyle.cxx
Dosyayı görüntüle @
8aa26b63
...
@@ -1705,6 +1705,31 @@ void SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPrope
...
@@ -1705,6 +1705,31 @@ void SwXStyle::SetPropertyValue<FN_UNO_PARA_STYLE_CONDITIONS>(const SfxItemPrope
}
}
o_rStyleBase
.
GetItemSet
().
Put
(
aCondItem
);
o_rStyleBase
.
GetItemSet
().
Put
(
aCondItem
);
}
}
template
<>
void
SwXStyle
::
SetPropertyValue
<
FN_UNO_CATEGORY
>
(
const
SfxItemPropertySimpleEntry
&
,
const
SfxItemPropertySet
&
,
const
uno
::
Any
&
rValue
,
SwStyleBase_Impl
&
o_rStyleBase
)
{
using
paragraphstyle_t
=
std
::
remove_const
<
decltype
(
style
::
ParagraphStyleCategory
::
TEXT
)
>::
type
;
using
paragraphcorestyle_t
=
sal_uInt16
;
if
(
!
o_rStyleBase
.
getNewBase
()
->
IsUserDefined
()
||
!
rValue
.
has
<
paragraphstyle_t
>
())
throw
lang
::
IllegalArgumentException
();
static
std
::
unique_ptr
<
std
::
map
<
paragraphstyle_t
,
paragraphcorestyle_t
>>
pUnoToCore
;
if
(
!
pUnoToCore
)
{
pUnoToCore
.
reset
(
new
std
::
map
<
paragraphstyle_t
,
paragraphcorestyle_t
>
{
{
style
::
ParagraphStyleCategory
::
TEXT
,
SWSTYLEBIT_TEXT
},
{
style
::
ParagraphStyleCategory
::
CHAPTER
,
SWSTYLEBIT_CHAPTER
},
{
style
::
ParagraphStyleCategory
::
LIST
,
SWSTYLEBIT_LIST
},
{
style
::
ParagraphStyleCategory
::
INDEX
,
SWSTYLEBIT_IDX
},
{
style
::
ParagraphStyleCategory
::
EXTRA
,
SWSTYLEBIT_EXTRA
},
{
style
::
ParagraphStyleCategory
::
HTML
,
SWSTYLEBIT_HTML
}
});
}
const
auto
pUnoToCoreIt
(
pUnoToCore
->
find
(
rValue
.
get
<
paragraphstyle_t
>
()));
if
(
pUnoToCoreIt
==
pUnoToCore
->
end
())
throw
lang
::
IllegalArgumentException
();
o_rStyleBase
.
getNewBase
()
->
SetMask
(
pUnoToCoreIt
->
second
|
SFXSTYLEBIT_USERDEF
);
}
void
SwXStyle
::
SetStyleProperty
(
const
SfxItemPropertySimpleEntry
&
rEntry
,
const
SfxItemPropertySet
&
rPropSet
,
const
uno
::
Any
&
rValue
,
SwStyleBase_Impl
&
rBase
)
throw
(
beans
::
PropertyVetoException
,
lang
::
IllegalArgumentException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
void
SwXStyle
::
SetStyleProperty
(
const
SfxItemPropertySimpleEntry
&
rEntry
,
const
SfxItemPropertySet
&
rPropSet
,
const
uno
::
Any
&
rValue
,
SwStyleBase_Impl
&
rBase
)
throw
(
beans
::
PropertyVetoException
,
lang
::
IllegalArgumentException
,
lang
::
WrappedTargetException
,
uno
::
RuntimeException
,
std
::
exception
)
{
{
SfxStyleFamily
eFamily
=
m_rEntry
.
m_eFamily
;
SfxStyleFamily
eFamily
=
m_rEntry
.
m_eFamily
;
...
@@ -1776,36 +1801,7 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
...
@@ -1776,36 +1801,7 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
break
;
break
;
case
FN_UNO_CATEGORY
:
case
FN_UNO_CATEGORY
:
{
{
if
(
!
rBase
.
getNewBase
()
->
IsUserDefined
())
SetPropertyValue
<
FN_UNO_CATEGORY
>
(
rEntry
,
rPropSet
,
rValue
,
rBase
);
throw
lang
::
IllegalArgumentException
();
short
nSet
=
0
;
aValue
>>=
nSet
;
sal_uInt16
nId
;
switch
(
nSet
)
{
case
style
:
:
ParagraphStyleCategory
::
TEXT
:
nId
=
SWSTYLEBIT_TEXT
;
break
;
case
style
:
:
ParagraphStyleCategory
::
CHAPTER
:
nId
=
SWSTYLEBIT_CHAPTER
;
break
;
case
style
:
:
ParagraphStyleCategory
::
LIST
:
nId
=
SWSTYLEBIT_LIST
;
break
;
case
style
:
:
ParagraphStyleCategory
::
INDEX
:
nId
=
SWSTYLEBIT_IDX
;
break
;
case
style
:
:
ParagraphStyleCategory
::
EXTRA
:
nId
=
SWSTYLEBIT_EXTRA
;
break
;
case
style
:
:
ParagraphStyleCategory
::
HTML
:
nId
=
SWSTYLEBIT_HTML
;
break
;
default
:
throw
lang
::
IllegalArgumentException
();
}
rBase
.
getNewBase
()
->
SetMask
(
nId
|
SFXSTYLEBIT_USERDEF
);
bDone
=
true
;
bDone
=
true
;
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