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
628f5727
Kaydet (Commit)
628f5727
authored
Eki 16, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
writerfilter: initial import of numbering styles
Change-Id: I81205ae7010ab776cd1880f779af2f623e290da9
üst
15cbc3e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
StyleSheetTable.cxx
writerfilter/source/dmapper/StyleSheetTable.cxx
+10
-6
StyleSheetTable.hxx
writerfilter/source/dmapper/StyleSheetTable.hxx
+1
-1
No files found.
writerfilter/source/dmapper/StyleSheetTable.cxx
Dosyayı görüntüle @
628f5727
...
...
@@ -787,21 +787,24 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
uno
::
Reference
<
container
::
XNameAccess
>
xStyleFamilies
=
xStylesSupplier
->
getStyleFamilies
();
uno
::
Reference
<
container
::
XNameContainer
>
xCharStyles
;
uno
::
Reference
<
container
::
XNameContainer
>
xParaStyles
;
uno
::
Reference
<
container
::
XNameContainer
>
xNumberingStyles
;
PropertyNameSupplier
&
rPropNameSupplier
=
PropertyNameSupplier
::
GetPropertyNameSupplier
();
xStyleFamilies
->
getByName
(
rPropNameSupplier
.
GetName
(
PROP_CHARACTER_STYLES
))
>>=
xCharStyles
;
xStyleFamilies
->
getByName
(
rPropNameSupplier
.
GetName
(
PROP_PARAGRAPH_STYLES
))
>>=
xParaStyles
;
xStyleFamilies
->
getByName
(
"NumberingStyles"
)
>>=
xNumberingStyles
;
if
(
xCharStyles
.
is
()
&&
xParaStyles
.
is
())
{
std
::
vector
<
StyleSheetEntryPtr
>::
iterator
aIt
=
m_pImpl
->
m_aStyleSheetEntries
.
begin
();
while
(
aIt
!=
m_pImpl
->
m_aStyleSheetEntries
.
end
()
)
{
StyleSheetEntryPtr
pEntry
=
*
aIt
;
if
(
pEntry
->
nStyleTypeCode
==
STYLE_TYPE_CHAR
||
pEntry
->
nStyleTypeCode
==
STYLE_TYPE_PARA
)
if
(
pEntry
->
nStyleTypeCode
==
STYLE_TYPE_CHAR
||
pEntry
->
nStyleTypeCode
==
STYLE_TYPE_PARA
||
pEntry
->
nStyleTypeCode
==
STYLE_TYPE_LIST
)
{
bool
bParaStyle
=
pEntry
->
nStyleTypeCode
==
STYLE_TYPE_PARA
;
bool
bListStyle
=
pEntry
->
nStyleTypeCode
==
STYLE_TYPE_LIST
;
bool
bInsert
=
false
;
uno
::
Reference
<
container
::
XNameContainer
>
xStyles
=
bParaStyle
?
xParaStyles
:
xCharStyles
;
uno
::
Reference
<
container
::
XNameContainer
>
xStyles
=
bParaStyle
?
xParaStyles
:
(
bListStyle
?
xNumberingStyles
:
xCharStyles
)
;
uno
::
Reference
<
style
::
XStyle
>
xStyle
;
OUString
sConvertedStyleName
=
ConvertStyleName
(
pEntry
->
sStyleName
);
...
...
@@ -821,7 +824,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
xStyle
=
uno
::
Reference
<
style
::
XStyle
>
(
xDocFactory
->
createInstance
(
bParaStyle
?
rPropNameSupplier
.
GetName
(
PROP_SERVICE_PARA_STYLE
)
:
rPropNameSupplier
.
GetName
(
PROP_SERVICE_CHAR_STYLE
)),
(
bListStyle
?
OUString
(
"com.sun.star.style.NumberingStyle"
)
:
rPropNameSupplier
.
GetName
(
PROP_SERVICE_CHAR_STYLE
)
)),
uno
::
UNO_QUERY_THROW
);
}
if
(
!
pEntry
->
sBaseStyleIdentifier
.
isEmpty
()
)
...
...
@@ -830,7 +833,8 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
{
//TODO: Handle cases where a paragraph <> character style relation is needed
StyleSheetEntryPtr
pParent
=
FindStyleSheetByISTD
(
pEntry
->
sBaseStyleIdentifier
);
if
(
pParent
.
get
()
!=
NULL
)
// Writer core doesn't support numbering styles having a parent style, it seems
if
(
pParent
.
get
()
!=
NULL
&&
!
bListStyle
)
xStyle
->
setParentStyle
(
ConvertStyleName
(
pParent
->
sStyleName
));
}
catch
(
const
uno
::
RuntimeException
&
)
...
...
@@ -1020,9 +1024,9 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
}
}
}
catch
(
const
uno
::
Exception
&
)
catch
(
const
uno
::
Exception
&
rException
)
{
OSL_FAIL
(
"Styles could not be imported completely"
);
SAL_WARN
(
"writerfilter"
,
"Styles could not be imported completely: "
<<
rException
.
Message
);
}
}
...
...
writerfilter/source/dmapper/StyleSheetTable.hxx
Dosyayı görüntüle @
628f5727
...
...
@@ -44,7 +44,7 @@ enum StyleType
STYLE_TYPE_PARA
,
STYLE_TYPE_CHAR
,
STYLE_TYPE_TABLE
,
STYLE_LIST
STYLE_
TYPE_
LIST
};
struct
StyleSheetTable_Impl
;
...
...
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