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
e775953f
Kaydet (Commit)
e775953f
authored
May 21, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
OUString: avoid temporaries + equalsAscii to ==
Change-Id: I9d6eda7f9b047b3d96c80c8dfc8c51b54ee04405
üst
f0aaae92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
23 deletions
+21
-23
unostyle.cxx
sw/source/core/unocore/unostyle.cxx
+21
-23
No files found.
sw/source/core/unocore/unostyle.cxx
Dosyayı görüntüle @
e775953f
...
...
@@ -242,15 +242,15 @@ uno::Any SAL_CALL SwXStyleFamilies::getByName(const OUString& Name)
uno
::
Any
aRet
;
if
(
!
IsValid
())
throw
uno
::
RuntimeException
();
if
(
Name
.
equalsAscii
(
"CharacterStyles"
)
)
if
(
Name
==
"CharacterStyles"
)
aRet
=
getByIndex
(
0
);
else
if
(
Name
.
equalsAscii
(
"ParagraphStyles"
)
)
else
if
(
Name
==
"ParagraphStyles"
)
aRet
=
getByIndex
(
1
);
else
if
(
Name
.
equalsAscii
(
"FrameStyles"
)
)
else
if
(
Name
==
"FrameStyles"
)
aRet
=
getByIndex
(
3
);
else
if
(
Name
.
equalsAscii
(
"PageStyles"
)
)
else
if
(
Name
==
"PageStyles"
)
aRet
=
getByIndex
(
2
);
else
if
(
Name
.
equalsAscii
(
"NumberingStyles"
)
)
else
if
(
Name
==
"NumberingStyles"
)
aRet
=
getByIndex
(
4
);
else
throw
container
::
NoSuchElementException
();
...
...
@@ -271,11 +271,11 @@ uno::Sequence< OUString > SwXStyleFamilies::getElementNames(void) throw( uno::Ru
sal_Bool
SwXStyleFamilies
::
hasByName
(
const
OUString
&
Name
)
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
if
(
Name
.
equalsAscii
(
"CharacterStyles"
)
||
Name
.
equalsAscii
(
"ParagraphStyles"
)
||
Name
.
equalsAscii
(
"FrameStyles"
)
||
Name
.
equalsAscii
(
"PageStyles"
)
||
Name
.
equalsAscii
(
"NumberingStyles"
)
)
if
(
Name
==
"CharacterStyles"
||
Name
==
"ParagraphStyles"
||
Name
==
"FrameStyles"
||
Name
==
"PageStyles"
||
Name
==
"NumberingStyles"
)
return
sal_True
;
else
return
sal_False
;
...
...
@@ -995,7 +995,7 @@ uno::Any SAL_CALL SwXStyleFamily::getPropertyValue( const OUString& sPropertyNam
}
else
{
throw
beans
::
UnknownPropertyException
(
OUString
(
"unknown property: "
)
+
sPropertyName
,
static_cast
<
OWeakObject
*>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"unknown property: "
+
sPropertyName
,
static_cast
<
OWeakObject
*>
(
this
)
);
}
return
aRet
;
...
...
@@ -1627,8 +1627,7 @@ const SwPageDesc& SwStyleBase_Impl::GetOldPageDesc()
{
for
(
sal_uInt16
i
=
RC_POOLPAGEDESC_BEGIN
;
i
<=
STR_POOLPAGE_LANDSCAPE
;
++
i
)
{
const
OUString
aFmtName
(
SW_RES
(
i
));
if
(
aFmtName
==
rStyleName
)
if
(
SW_RESSTR
(
i
)
==
rStyleName
)
{
pOldPageDesc
=
rDoc
.
GetPageDescFromPool
(
static_cast
<
sal_uInt16
>
(
RES_POOLPAGE_BEGIN
+
i
-
RC_POOLPAGEDESC_BEGIN
)
);
break
;
...
...
@@ -2177,8 +2176,8 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
OUString
sNewNumberingRuleName
;
aValue
>>=
sNewNumberingRuleName
;
OUString
sTmp
(
sNewNumberingRuleName
);
if
(
sNewNumberingRuleName
.
getLength
()
==
0
||
sTmp
!=
pDoc
->
GetOutlineNumRule
()
->
GetName
()
)
if
(
sNewNumberingRuleName
.
isEmpty
()
||
sNewNumberingRuleName
!=
pDoc
->
GetOutlineNumRule
()
->
GetName
()
)
{
rBase
.
mxNewBase
->
GetCollection
()
->
DeleteAssignmentToListLevelOfOutlineStyle
();
}
...
...
@@ -2234,7 +2233,7 @@ void SAL_CALL SwXStyle::SetPropertyValues_Impl(
if
(
!
pEntry
||
(
!
bIsConditional
&&
pNames
[
nProp
]
==
UNO_NAME_PARA_STYLE_CONDITIONS
))
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
pEntry
->
nFlags
&
beans
::
PropertyAttribute
::
READONLY
)
throw
beans
::
PropertyVetoException
(
"Property is read-only: "
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
aBaseImpl
.
mxNewBase
.
is
())
...
...
@@ -2415,8 +2414,7 @@ static uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
}
case
FN_UNO_DISPLAY_NAME
:
{
OUString
sName
(
rBase
.
mxNewBase
->
GetDisplayName
());
aRet
<<=
sName
;
aRet
<<=
rBase
.
mxNewBase
->
GetDisplayName
();
bDone
=
true
;
break
;
...
...
@@ -2630,7 +2628,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl(
const
SfxItemPropertySimpleEntry
*
pEntry
=
rMap
.
getByName
(
pNames
[
nProp
]);
if
(
!
pEntry
||
(
!
bIsConditional
&&
pNames
[
nProp
]
==
UNO_NAME_PARA_STYLE_CONDITIONS
))
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
pBasePool
)
{
if
(
!
pBase
)
...
...
@@ -2957,7 +2955,7 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
{
const
SfxItemPropertySimpleEntry
*
pEntry
=
rMap
.
getByName
(
pNames
[
nProp
]
);
if
(
!
pEntry
)
throw
beans
::
UnknownPropertyException
(
OUString
(
"Property is unknown: "
)
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
pEntry
->
nWID
==
FN_UNO_FOLLOW_STYLE
||
pEntry
->
nWID
==
FN_UNO_NUM_RULES
)
throw
uno
::
RuntimeException
(
"Cannot reset: "
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
pEntry
->
nFlags
&
beans
::
PropertyAttribute
::
READONLY
)
...
...
@@ -3120,7 +3118,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::getPropertyDefaults( const uno::Seq
{
const
SfxItemPropertySimpleEntry
*
pEntry
=
rMap
.
getByName
(
pNames
[
i
]
);
if
(
!
pEntry
)
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
pNames
[
i
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
pNames
[
i
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
pEntry
->
nWID
>=
RES_UNKNOWNATR_END
)
{
...
...
@@ -3275,7 +3273,7 @@ void SAL_CALL SwXPageStyle::SetPropertyValues_Impl(
{
const
SfxItemPropertySimpleEntry
*
pEntry
=
rMap
.
getByName
(
pNames
[
nProp
]
);
if
(
!
pEntry
)
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
pEntry
->
nFlags
&
beans
::
PropertyAttribute
::
READONLY
)
throw
beans
::
PropertyVetoException
(
"Property is read-only: "
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
...
...
@@ -3511,7 +3509,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl(
{
const
SfxItemPropertySimpleEntry
*
pEntry
=
rMap
.
getByName
(
pNames
[
nProp
]
);
if
(
!
pEntry
)
throw
beans
::
UnknownPropertyException
(
OUString
(
"Unknown property: "
)
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
throw
beans
::
UnknownPropertyException
(
"Unknown property: "
+
pNames
[
nProp
],
static_cast
<
cppu
::
OWeakObject
*
>
(
this
)
);
if
(
GetBasePool
())
{
...
...
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