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
f7f48dd4
Kaydet (Commit)
f7f48dd4
authored
May 18, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmloff: convert legacy assertions in XMLStyleExport
Change-Id: I39146bc6005c43b034243d587dda17839b8e72e7
üst
9beae152
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
69 deletions
+59
-69
styleexp.cxx
xmloff/source/style/styleexp.cxx
+59
-69
No files found.
xmloff/source/style/styleexp.cxx
Dosyayı görüntüle @
f7f48dd4
...
@@ -240,17 +240,13 @@ bool XMLStyleExport::exportStyle(
...
@@ -240,17 +240,13 @@ bool XMLStyleExport::exportStyle(
{
{
Reference
<
XIndexReplace
>
xNumRule
Reference
<
XIndexReplace
>
xNumRule
(
xCNSupplier
->
getChapterNumberingRules
()
);
(
xCNSupplier
->
getChapterNumberingRules
()
);
DBG_ASSERT
(
xNumRule
.
is
(),
"no chapter numbering rules"
);
assert
(
xNumRule
.
is
());
if
(
xNumRule
.
is
())
Reference
<
XPropertySet
>
xNumRulePropSet
{
(
xNumRule
,
UNO_QUERY
);
Reference
<
XPropertySet
>
xNumRulePropSet
xNumRulePropSet
->
getPropertyValue
(
"Name"
)
(
xNumRule
,
UNO_QUERY
);
>>=
sOutlineName
;
xNumRulePropSet
->
getPropertyValue
(
bSuppressListStyle
=
sListName
==
sOutlineName
;
OUString
(
"Name"
)
)
>>=
sOutlineName
;
bSuppressListStyle
=
(
sListName
==
sOutlineName
);
}
}
}
}
}
}
}
...
@@ -379,7 +375,7 @@ void XMLStyleExport::exportStyleFamily(
...
@@ -379,7 +375,7 @@ void XMLStyleExport::exportStyleFamily(
const
rtl
::
Reference
<
SvXMLExportPropertyMapper
>&
rPropMapper
,
const
rtl
::
Reference
<
SvXMLExportPropertyMapper
>&
rPropMapper
,
bool
bUsed
,
sal_uInt16
nFamily
,
const
OUString
*
pPrefix
)
bool
bUsed
,
sal_uInt16
nFamily
,
const
OUString
*
pPrefix
)
{
{
DBG_ASSERT
(
GetExport
().
GetModel
().
is
(),
"There is the model?"
);
assert
(
GetExport
().
GetModel
().
is
()
);
Reference
<
XStyleFamiliesSupplier
>
xFamiliesSupp
(
GetExport
().
GetModel
(),
UNO_QUERY
);
Reference
<
XStyleFamiliesSupplier
>
xFamiliesSupp
(
GetExport
().
GetModel
(),
UNO_QUERY
);
if
(
!
xFamiliesSupp
.
is
()
)
if
(
!
xFamiliesSupp
.
is
()
)
return
;
// family not available in current model
return
;
// family not available in current model
...
@@ -418,38 +414,35 @@ void XMLStyleExport::exportStyleFamily(
...
@@ -418,38 +414,35 @@ void XMLStyleExport::exportStyleFamily(
continue
;
continue
;
}
}
DBG_ASSERT
(
xStyle
.
is
(),
"Style not found for export!"
);
assert
(
xStyle
.
is
()
);
if
(
xStyle
.
is
()
)
if
(
!
bUsed
||
xStyle
->
isInUse
()
)
{
{
if
(
!
bUsed
||
xStyle
->
isInUse
()
)
bool
bExported
=
exportStyle
(
xStyle
,
rXMLFamily
,
rPropMapper
,
xStyleCont
,
pPrefix
);
if
(
bUsed
&&
bFirstStyle
&&
bExported
)
{
{
bool
bExported
=
exportStyle
(
xStyle
,
rXMLFamily
,
rPropMapper
,
// If this is the first style, find out whether next styles
xStyleCont
,
pPrefix
);
// are supported.
if
(
bUsed
&&
bFirstStyle
&&
bExported
)
Reference
<
XPropertySet
>
xPropSet
(
xStyle
,
UNO_QUERY
);
{
Reference
<
XPropertySetInfo
>
xPropSetInfo
=
// If this is the first style, find out whether next styles
xPropSet
->
getPropertySetInfo
();
// are supported.
Reference
<
XPropertySet
>
xPropSet
(
xStyle
,
UNO_QUERY
);
Reference
<
XPropertySetInfo
>
xPropSetInfo
=
xPropSet
->
getPropertySetInfo
();
if
(
xPropSetInfo
->
hasPropertyByName
(
sFollowStyle
)
)
pExportedStyles
.
reset
(
new
std
::
set
<
OUString
>
());
bFirstStyle
=
false
;
}
if
(
pExportedStyles
&&
bExported
)
if
(
xPropSetInfo
->
hasPropertyByName
(
sFollowStyle
))
{
pExportedStyles
.
reset
(
new
std
::
set
<
OUString
>
());
// If next styles are supported, remember this style's name.
bFirstStyle
=
false
;
pExportedStyles
->
insert
(
xStyle
->
getName
()
);
}
}
}
// if an auto style pool is given, remember this style's name as a
if
(
pExportedStyles
&&
bExported
)
// style name that must not be used by automatic styles.
{
if
(
pAutoStylePool
)
// If next styles are supported, remember this style's name.
pAutoStylePool
->
RegisterName
(
nFamily
,
xStyle
->
getName
()
);
pExportedStyles
->
insert
(
xStyle
->
getName
()
);
}
}
}
// if an auto style pool is given, remember this style's name as a
// style name that must not be used by automatic styles.
if
(
pAutoStylePool
)
pAutoStylePool
->
RegisterName
(
nFamily
,
xStyle
->
getName
()
);
}
}
if
(
pExportedStyles
)
if
(
pExportedStyles
)
...
@@ -462,43 +455,40 @@ void XMLStyleExport::exportStyleFamily(
...
@@ -462,43 +455,40 @@ void XMLStyleExport::exportStyleFamily(
Reference
<
XStyle
>
xStyle
;
Reference
<
XStyle
>
xStyle
;
xStyleCont
->
getByName
(
*
pIter
)
>>=
xStyle
;
xStyleCont
->
getByName
(
*
pIter
)
>>=
xStyle
;
DBG_ASSERT
(
xStyle
.
is
(),
"Style not found for export!"
);
assert
(
xStyle
.
is
());
if
(
xStyle
.
is
()
)
{
Reference
<
XPropertySet
>
xPropSet
(
xStyle
,
UNO_QUERY
);
Reference
<
XPropertySetInfo
>
xPropSetInfo
(
xPropSet
->
getPropertySetInfo
()
);
// styles that aren't existing really are ignored.
Reference
<
XPropertySet
>
xPropSet
(
xStyle
,
UNO_QUERY
);
if
(
xPropSetInfo
->
hasPropertyByName
(
sIsPhysical
)
)
Reference
<
XPropertySetInfo
>
xPropSetInfo
(
xPropSet
->
getPropertySetInfo
()
);
{
Any
aAny
(
xPropSet
->
getPropertyValue
(
sIsPhysical
)
);
if
(
!*
static_cast
<
sal_Bool
const
*>
(
aAny
.
getValue
())
)
continue
;
}
if
(
!
xStyle
->
isInUse
()
)
// styles that aren't existing really are ignored.
if
(
xPropSetInfo
->
hasPropertyByName
(
sIsPhysical
))
{
Any
aAny
(
xPropSet
->
getPropertyValue
(
sIsPhysical
)
);
if
(
!*
static_cast
<
sal_Bool
const
*>
(
aAny
.
getValue
()))
continue
;
continue
;
}
if
(
!
xPropSetInfo
->
hasPropertyByName
(
sFollowStyle
)
)
if
(
!
xStyle
->
isInUse
())
{
continue
;
DBG_ASSERT
(
sFollowStyle
.
isEmpty
(),
"no follow style???"
);
continue
;
}
OUString
sNextName
;
if
(
!
xPropSetInfo
->
hasPropertyByName
(
sFollowStyle
))
xPropSet
->
getPropertyValue
(
sFollowStyle
)
>>=
sNextName
;
{
OUString
sTmp
(
sNextName
);
continue
;
// if the next style hasn't been exported by now, export it now
}
// and remember its name.
if
(
xStyle
->
getName
()
!=
sNextName
&&
0
==
pExportedStyles
->
count
(
sTmp
)
)
{
xStyleCont
->
getByName
(
sNextName
)
>>=
xStyle
;
DBG_ASSERT
(
xStyle
.
is
(),
"Style not found for export!"
);
if
(
xStyle
.
is
()
&&
exportStyle
(
xStyle
,
rXMLFamily
,
rPropMapper
,
xStyleCont
,
pPrefix
)
)
OUString
sNextName
;
pExportedStyles
->
insert
(
sTmp
);
xPropSet
->
getPropertyValue
(
sFollowStyle
)
>>=
sNextName
;
}
OUString
sTmp
(
sNextName
);
// if the next style hasn't been exported by now, export it now
// and remember its name.
if
(
xStyle
->
getName
()
!=
sNextName
&&
0
==
pExportedStyles
->
count
(
sTmp
))
{
xStyleCont
->
getByName
(
sNextName
)
>>=
xStyle
;
assert
(
xStyle
.
is
());
if
(
exportStyle
(
xStyle
,
rXMLFamily
,
rPropMapper
,
xStyleCont
,
pPrefix
))
pExportedStyles
->
insert
(
sTmp
);
}
}
}
}
}
}
...
...
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