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
209030f9
Kaydet (Commit)
209030f9
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_TXTATR_CJK_RUBY
Change-Id: I02b37ead4f930a91f9e8c6d472ffe0d2991bb78f
üst
b9f67808
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
29 deletions
+27
-29
unostyle.cxx
sw/source/core/unocore/unostyle.cxx
+27
-29
No files found.
sw/source/core/unocore/unostyle.cxx
Dosyayı görüntüle @
209030f9
...
@@ -1741,7 +1741,32 @@ void SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>(const SfxItemProperty
...
@@ -1741,7 +1741,32 @@ void SwXStyle::SetPropertyValue<SID_SWREGISTER_COLLECTION>(const SfxItemProperty
SwStyleNameMapper
::
FillUIName
(
sName
,
aString
,
nsSwGetPoolIdFromName
::
GET_POOLID_TXTCOLL
,
true
);
SwStyleNameMapper
::
FillUIName
(
sName
,
aString
,
nsSwGetPoolIdFromName
::
GET_POOLID_TXTCOLL
,
true
);
o_rStyleBase
.
GetItemSet
().
Put
(
SfxStringItem
(
SID_SWREGISTER_COLLECTION
,
aString
)
);
o_rStyleBase
.
GetItemSet
().
Put
(
SfxStringItem
(
SID_SWREGISTER_COLLECTION
,
aString
)
);
}
}
template
<>
void
SwXStyle
::
SetPropertyValue
<
RES_TXTATR_CJK_RUBY
>
(
const
SfxItemPropertySimpleEntry
&
rEntry
,
const
SfxItemPropertySet
&
,
const
uno
::
Any
&
rValue
,
SwStyleBase_Impl
&
o_rStyleBase
)
{
if
(
MID_RUBY_CHARSTYLE
!=
rEntry
.
nMemberId
)
return
;
if
(
!
rValue
.
has
<
OUString
>
())
throw
lang
::
IllegalArgumentException
();
const
auto
sValue
(
rValue
.
get
<
OUString
>
());
SfxItemSet
&
rStyleSet
(
o_rStyleBase
.
GetItemSet
());
std
::
unique_ptr
<
SwFormatRuby
>
pRuby
;
const
SfxPoolItem
*
pItem
;
if
(
SfxItemState
::
SET
==
rStyleSet
.
GetItemState
(
RES_TXTATR_CJK_RUBY
,
true
,
&
pItem
))
pRuby
.
reset
(
new
SwFormatRuby
(
*
static_cast
<
const
SwFormatRuby
*>
(
pItem
)));
else
pRuby
.
reset
(
new
SwFormatRuby
(
OUString
()));
OUString
sStyle
;
SwStyleNameMapper
::
FillUIName
(
sValue
,
sStyle
,
nsSwGetPoolIdFromName
::
GET_POOLID_CHRFMT
,
true
);
pRuby
->
SetCharFormatName
(
sValue
);
pRuby
->
SetCharFormatId
(
0
);
if
(
!
sValue
.
isEmpty
())
{
const
sal_uInt16
nId
(
SwStyleNameMapper
::
GetPoolIdFromUIName
(
sValue
,
nsSwGetPoolIdFromName
::
GET_POOLID_CHRFMT
));
pRuby
->
SetCharFormatId
(
nId
);
}
rStyleSet
.
Put
(
*
pRuby
);
}
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
)
{
{
...
@@ -1825,35 +1850,8 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
...
@@ -1825,35 +1850,8 @@ void SwXStyle::SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, const
break
;
break
;
}
}
case
RES_TXTATR_CJK_RUBY
:
case
RES_TXTATR_CJK_RUBY
:
{
SetPropertyValue
<
RES_TXTATR_CJK_RUBY
>
(
rEntry
,
rPropSet
,
rValue
,
rBase
);
if
(
MID_RUBY_CHARSTYLE
==
nMemberId
)
{
OUString
sTmp
;
if
(
aValue
>>=
sTmp
)
{
SfxItemSet
&
rStyleSet
=
rBase
.
GetItemSet
();
std
::
unique_ptr
<
SwFormatRuby
>
pRuby
;
const
SfxPoolItem
*
pItem
;
if
(
SfxItemState
::
SET
==
rStyleSet
.
GetItemState
(
RES_TXTATR_CJK_RUBY
,
true
,
&
pItem
)
)
pRuby
.
reset
(
new
SwFormatRuby
(
*
static_cast
<
const
SwFormatRuby
*>
(
pItem
)));
else
pRuby
.
reset
(
new
SwFormatRuby
(
OUString
()));
OUString
sStyle
;
SwStyleNameMapper
::
FillUIName
(
sTmp
,
sStyle
,
nsSwGetPoolIdFromName
::
GET_POOLID_CHRFMT
,
true
);
pRuby
->
SetCharFormatName
(
sTmp
);
pRuby
->
SetCharFormatId
(
0
);
if
(
!
sTmp
.
isEmpty
())
{
sal_uInt16
nId
=
SwStyleNameMapper
::
GetPoolIdFromUIName
(
sTmp
,
nsSwGetPoolIdFromName
::
GET_POOLID_CHRFMT
);
pRuby
->
SetCharFormatId
(
nId
);
}
rStyleSet
.
Put
(
*
pRuby
);
}
else
throw
lang
::
IllegalArgumentException
();
}
break
;
break
;
}
case
RES_PARATR_DROP
:
case
RES_PARATR_DROP
:
{
{
if
(
MID_DROPCAP_CHAR_STYLE_NAME
==
nMemberId
)
if
(
MID_DROPCAP_CHAR_STYLE_NAME
==
nMemberId
)
...
...
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