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
961e319d
Kaydet (Commit)
961e319d
authored
Kas 08, 2013
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DOCX filter: handle numbering style's qFormat, rsid and friends
Change-Id: Ia261995b98e2108ab673c7b240a1aa822d3db96e
üst
d6325980
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
35 deletions
+37
-35
ooxmlexport.cxx
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+3
-0
docxattributeoutput.cxx
sw/source/filter/ww8/docxattributeoutput.cxx
+31
-26
StyleSheetTable.cxx
writerfilter/source/dmapper/StyleSheetTable.cxx
+3
-9
No files found.
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Dosyayı görüntüle @
961e319d
...
@@ -1314,6 +1314,9 @@ DECLARE_OOXML_TEST(testStyleInheritance, "style-inheritance.docx")
...
@@ -1314,6 +1314,9 @@ DECLARE_OOXML_TEST(testStyleInheritance, "style-inheritance.docx")
// Additional char style properties should be also roundtripped.
// Additional char style properties should be also roundtripped.
assertXPath
(
pXmlStyles
,
"/w:styles/w:style[@w:styleId='DefaultParagraphFont']"
,
"default"
,
"1"
);
assertXPath
(
pXmlStyles
,
"/w:styles/w:style[@w:styleId='DefaultParagraphFont']"
,
"default"
,
"1"
);
// Finally check the same for numbering styles.
assertXPath
(
pXmlStyles
,
"/w:styles/w:style[@w:styleId='NoList']"
,
"default"
,
"1"
);
}
}
DECLARE_OOXML_TEST
(
testCalendar1
,
"calendar1.docx"
)
DECLARE_OOXML_TEST
(
testCalendar1
,
"calendar1.docx"
)
...
...
sw/source/filter/ww8/docxattributeoutput.cxx
Dosyayı görüntüle @
961e319d
...
@@ -3596,36 +3596,41 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
...
@@ -3596,36 +3596,41 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
bool
bQFormat
=
false
,
bUnhideWhenUsed
=
false
,
bSemiHidden
=
false
,
bLocked
=
false
,
bDefault
=
false
,
bCustomStyle
=
false
;
bool
bQFormat
=
false
,
bUnhideWhenUsed
=
false
,
bSemiHidden
=
false
,
bLocked
=
false
,
bDefault
=
false
,
bCustomStyle
=
false
;
OUString
aLink
,
aRsid
,
aUiPriority
;
OUString
aLink
,
aRsid
,
aUiPriority
;
FastAttributeList
*
pStyleAttributeList
=
m_pSerializer
->
createAttrList
();
FastAttributeList
*
pStyleAttributeList
=
m_pSerializer
->
createAttrList
();
uno
::
Any
aAny
;
if
(
eType
==
STYLE_TYPE_PARA
||
eType
==
STYLE_TYPE_CHAR
)
if
(
eType
==
STYLE_TYPE_PARA
||
eType
==
STYLE_TYPE_CHAR
)
{
{
const
SwFmt
*
pFmt
=
m_rExport
.
pStyles
->
GetSwFmt
(
nId
);
const
SwFmt
*
pFmt
=
m_rExport
.
pStyles
->
GetSwFmt
(
nId
);
uno
::
Any
aAny
;
pFmt
->
GetGrabBagItem
(
aAny
);
pFmt
->
GetGrabBagItem
(
aAny
);
const
uno
::
Sequence
<
beans
::
PropertyValue
>&
rGrabBag
=
aAny
.
get
<
uno
::
Sequence
<
beans
::
PropertyValue
>
>
();
}
else
for
(
sal_Int32
i
=
0
;
i
<
rGrabBag
.
getLength
();
++
i
)
{
{
const
SwNumRule
*
pRule
=
m_rExport
.
pStyles
->
GetSwNumRule
(
nId
);
if
(
rGrabBag
[
i
].
Name
==
"uiPriority"
)
pRule
->
GetGrabBagItem
(
aAny
);
aUiPriority
=
rGrabBag
[
i
].
Value
.
get
<
OUString
>
();
}
else
if
(
rGrabBag
[
i
].
Name
==
"qFormat"
)
const
uno
::
Sequence
<
beans
::
PropertyValue
>&
rGrabBag
=
aAny
.
get
<
uno
::
Sequence
<
beans
::
PropertyValue
>
>
();
bQFormat
=
true
;
else
if
(
rGrabBag
[
i
].
Name
==
"link"
)
for
(
sal_Int32
i
=
0
;
i
<
rGrabBag
.
getLength
();
++
i
)
aLink
=
rGrabBag
[
i
].
Value
.
get
<
OUString
>
();
{
else
if
(
rGrabBag
[
i
].
Name
==
"rsid"
)
if
(
rGrabBag
[
i
].
Name
==
"uiPriority"
)
aRsid
=
rGrabBag
[
i
].
Value
.
get
<
OUString
>
();
aUiPriority
=
rGrabBag
[
i
].
Value
.
get
<
OUString
>
();
else
if
(
rGrabBag
[
i
].
Name
==
"unhideWhenUsed"
)
else
if
(
rGrabBag
[
i
].
Name
==
"qFormat"
)
bUnhideWhenUsed
=
true
;
bQFormat
=
true
;
else
if
(
rGrabBag
[
i
].
Name
==
"semiHidden"
)
else
if
(
rGrabBag
[
i
].
Name
==
"link"
)
bSemiHidden
=
true
;
aLink
=
rGrabBag
[
i
].
Value
.
get
<
OUString
>
();
else
if
(
rGrabBag
[
i
].
Name
==
"locked"
)
else
if
(
rGrabBag
[
i
].
Name
==
"rsid"
)
bLocked
=
true
;
aRsid
=
rGrabBag
[
i
].
Value
.
get
<
OUString
>
();
else
if
(
rGrabBag
[
i
].
Name
==
"default"
)
else
if
(
rGrabBag
[
i
].
Name
==
"unhideWhenUsed"
)
bDefault
=
rGrabBag
[
i
].
Value
.
get
<
sal_Bool
>
();
bUnhideWhenUsed
=
true
;
else
if
(
rGrabBag
[
i
].
Name
==
"customStyle"
)
else
if
(
rGrabBag
[
i
].
Name
==
"semiHidden"
)
bCustomStyle
=
rGrabBag
[
i
].
Value
.
get
<
sal_Bool
>
();
bSemiHidden
=
true
;
else
else
if
(
rGrabBag
[
i
].
Name
==
"locked"
)
SAL_WARN
(
"sw.ww8"
,
"Unhandled style property: "
<<
rGrabBag
[
i
].
Name
);
bLocked
=
true
;
}
else
if
(
rGrabBag
[
i
].
Name
==
"default"
)
bDefault
=
rGrabBag
[
i
].
Value
.
get
<
sal_Bool
>
();
else
if
(
rGrabBag
[
i
].
Name
==
"customStyle"
)
bCustomStyle
=
rGrabBag
[
i
].
Value
.
get
<
sal_Bool
>
();
else
SAL_WARN
(
"sw.ww8"
,
"Unhandled style property: "
<<
rGrabBag
[
i
].
Name
);
}
}
const
char
*
pType
=
0
;
const
char
*
pType
=
0
;
...
...
writerfilter/source/dmapper/StyleSheetTable.cxx
Dosyayı görüntüle @
961e319d
...
@@ -400,12 +400,6 @@ PropertyMapPtr StyleSheetTable::GetDefaultCharProps()
...
@@ -400,12 +400,6 @@ PropertyMapPtr StyleSheetTable::GetDefaultCharProps()
return
m_pImpl
->
m_pDefaultCharProps
;
return
m_pImpl
->
m_pDefaultCharProps
;
}
}
// Does the given style type support InteropGrabBag?
bool
lcl_wantGrabBag
(
StyleType
eType
)
{
return
eType
==
STYLE_TYPE_TABLE
||
eType
==
STYLE_TYPE_PARA
||
eType
==
STYLE_TYPE_CHAR
;
}
void
StyleSheetTable
::
lcl_attribute
(
Id
Name
,
Value
&
val
)
void
StyleSheetTable
::
lcl_attribute
(
Id
Name
,
Value
&
val
)
{
{
OSL_ENSURE
(
m_pImpl
->
m_pCurrentEntry
,
"current entry has to be set here"
);
OSL_ENSURE
(
m_pImpl
->
m_pCurrentEntry
,
"current entry has to be set here"
);
...
@@ -491,7 +485,7 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
...
@@ -491,7 +485,7 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
break
;
break
;
case
NS_ooxml
:
:
LN_CT_Style_default
:
case
NS_ooxml
:
:
LN_CT_Style_default
:
m_pImpl
->
m_pCurrentEntry
->
bIsDefaultStyle
=
(
nIntValue
!=
0
);
m_pImpl
->
m_pCurrentEntry
->
bIsDefaultStyle
=
(
nIntValue
!=
0
);
if
(
lcl_wantGrabBag
(
m_pImpl
->
m_pCurrentEntry
->
nStyleTypeCode
)
)
if
(
m_pImpl
->
m_pCurrentEntry
->
nStyleTypeCode
!=
STYLE_TYPE_UNKNOWN
)
{
{
beans
::
PropertyValue
aValue
;
beans
::
PropertyValue
aValue
;
aValue
.
Name
=
"default"
;
aValue
.
Name
=
"default"
;
...
@@ -500,7 +494,7 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
...
@@ -500,7 +494,7 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
}
}
break
;
break
;
case
NS_ooxml
:
:
LN_CT_Style_customStyle
:
case
NS_ooxml
:
:
LN_CT_Style_customStyle
:
if
(
lcl_wantGrabBag
(
m_pImpl
->
m_pCurrentEntry
->
nStyleTypeCode
)
)
if
(
m_pImpl
->
m_pCurrentEntry
->
nStyleTypeCode
!=
STYLE_TYPE_UNKNOWN
)
{
{
beans
::
PropertyValue
aValue
;
beans
::
PropertyValue
aValue
;
aValue
.
Name
=
"customStyle"
;
aValue
.
Name
=
"customStyle"
;
...
@@ -623,7 +617,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
...
@@ -623,7 +617,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
case
NS_ooxml
:
:
LN_CT_Style_uiPriority
:
case
NS_ooxml
:
:
LN_CT_Style_uiPriority
:
case
NS_ooxml
:
:
LN_CT_Style_link
:
case
NS_ooxml
:
:
LN_CT_Style_link
:
case
NS_ooxml
:
:
LN_CT_Style_locked
:
case
NS_ooxml
:
:
LN_CT_Style_locked
:
if
(
lcl_wantGrabBag
(
m_pImpl
->
m_pCurrentEntry
->
nStyleTypeCode
)
)
if
(
m_pImpl
->
m_pCurrentEntry
->
nStyleTypeCode
!=
STYLE_TYPE_UNKNOWN
)
{
{
StyleSheetEntryPtr
pEntry
=
m_pImpl
->
m_pCurrentEntry
;
StyleSheetEntryPtr
pEntry
=
m_pImpl
->
m_pCurrentEntry
;
beans
::
PropertyValue
aValue
;
beans
::
PropertyValue
aValue
;
...
...
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