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
6766760e
Kaydet (Commit)
6766760e
authored
Ock 14, 2016
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor out to limit scope: RES_PARATR_DROP
Change-Id: I8813b5676504e6de2af70d181fa9e905538fb05c
üst
209030f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
31 deletions
+25
-31
unostyle.cxx
sw/source/core/unocore/unostyle.cxx
+25
-31
No files found.
sw/source/core/unocore/unostyle.cxx
Dosyayı görüntüle @
6766760e
...
@@ -1767,6 +1767,29 @@ void SwXStyle::SetPropertyValue<RES_TXTATR_CJK_RUBY>(const SfxItemPropertySimple
...
@@ -1767,6 +1767,29 @@ void SwXStyle::SetPropertyValue<RES_TXTATR_CJK_RUBY>(const SfxItemPropertySimple
}
}
rStyleSet
.
Put
(
*
pRuby
);
rStyleSet
.
Put
(
*
pRuby
);
}
}
template
<>
void
SwXStyle
::
SetPropertyValue
<
RES_PARATR_DROP
>
(
const
SfxItemPropertySimpleEntry
&
rEntry
,
const
SfxItemPropertySet
&
,
const
uno
::
Any
&
rValue
,
SwStyleBase_Impl
&
o_rStyleBase
)
{
if
(
MID_DROPCAP_CHAR_STYLE_NAME
!=
rEntry
.
nMemberId
)
return
;
if
(
!
rValue
.
has
<
OUString
>
())
throw
lang
::
IllegalArgumentException
();
SfxItemSet
&
rStyleSet
(
o_rStyleBase
.
GetItemSet
());
std
::
unique_ptr
<
SwFormatDrop
>
pDrop
;
const
SfxPoolItem
*
pItem
;
if
(
SfxItemState
::
SET
==
rStyleSet
.
GetItemState
(
RES_PARATR_DROP
,
true
,
&
pItem
))
pDrop
.
reset
(
new
SwFormatDrop
(
*
static_cast
<
const
SwFormatDrop
*>
(
pItem
)));
else
pDrop
.
reset
(
new
SwFormatDrop
);
const
auto
sValue
(
rValue
.
get
<
OUString
>
());
OUString
sStyle
;
SwStyleNameMapper
::
FillUIName
(
sValue
,
sStyle
,
nsSwGetPoolIdFromName
::
GET_POOLID_CHRFMT
,
true
);
auto
pStyle
(
static_cast
<
SwDocStyleSheet
*>
(
m_pDoc
->
GetDocShell
()
->
GetStyleSheetPool
()
->
Find
(
sStyle
,
SFX_STYLE_FAMILY_CHAR
)));
if
(
!
pStyle
)
throw
lang
::
IllegalArgumentException
();
pDrop
->
SetCharFormat
(
pStyle
->
GetCharFormat
());
rStyleSet
.
Put
(
*
pDrop
);
}
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
)
{
{
...
@@ -1853,38 +1876,9 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
...
@@ -1853,38 +1876,9 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
SetPropertyValue
<
RES_TXTATR_CJK_RUBY
>
(
rEntry
,
rPropSet
,
rValue
,
rBase
);
SetPropertyValue
<
RES_TXTATR_CJK_RUBY
>
(
rEntry
,
rPropSet
,
rValue
,
rBase
);
break
;
break
;
case
RES_PARATR_DROP
:
case
RES_PARATR_DROP
:
{
SetPropertyValue
<
RES_PARATR_DROP
>
(
rEntry
,
rPropSet
,
rValue
,
rBase
);
if
(
MID_DROPCAP_CHAR_STYLE_NAME
==
nMemberId
)
bDone
=
true
;
{
if
(
aValue
.
getValueType
()
==
::
cppu
::
UnoType
<
OUString
>::
get
())
{
SfxItemSet
&
rStyleSet
=
rBase
.
GetItemSet
();
std
::
unique_ptr
<
SwFormatDrop
>
pDrop
;
const
SfxPoolItem
*
pItem
;
if
(
SfxItemState
::
SET
==
rStyleSet
.
GetItemState
(
RES_PARATR_DROP
,
true
,
&
pItem
)
)
pDrop
.
reset
(
new
SwFormatDrop
(
*
static_cast
<
const
SwFormatDrop
*>
(
pItem
)));
else
pDrop
.
reset
(
new
SwFormatDrop
);
OUString
uStyle
;
aValue
>>=
uStyle
;
OUString
sStyle
;
SwStyleNameMapper
::
FillUIName
(
uStyle
,
sStyle
,
nsSwGetPoolIdFromName
::
GET_POOLID_CHRFMT
,
true
);
SwDocStyleSheet
*
pStyle
=
static_cast
<
SwDocStyleSheet
*>
(
pDoc
->
GetDocShell
()
->
GetStyleSheetPool
()
->
Find
(
sStyle
,
SFX_STYLE_FAMILY_CHAR
));
if
(
pStyle
)
pDrop
->
SetCharFormat
(
pStyle
->
GetCharFormat
());
else
throw
lang
::
IllegalArgumentException
();
rStyleSet
.
Put
(
*
pDrop
);
}
else
throw
lang
::
IllegalArgumentException
();
bDone
=
true
;
}
break
;
break
;
}
case
RES_PARATR_NUMRULE
:
case
RES_PARATR_NUMRULE
:
{
{
lcl_SetDefaultWay
(
rEntry
,
rPropSet
,
aValue
,
rBase
);
lcl_SetDefaultWay
(
rEntry
,
rPropSet
,
aValue
,
rBase
);
...
...
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