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
f99ff13f
Kaydet (Commit)
f99ff13f
authored
Tem 03, 2017
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmloff: prefix members of XMLTextStyleContext
Change-Id: I9db514a20aad0e82a99a02334dfd5910b66e3a01
üst
a5bff392
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
60 deletions
+62
-60
txtstyli.hxx
include/xmloff/txtstyli.hxx
+19
-19
txtstyli.cxx
xmloff/source/text/txtstyli.cxx
+43
-41
No files found.
include/xmloff/txtstyli.hxx
Dosyayı görüntüle @
f99ff13f
...
...
@@ -28,11 +28,11 @@ class XMLEventsImportContext;
class
XMLOFF_DLLPUBLIC
XMLTextStyleContext
:
public
XMLPropStyleContext
{
OUString
sListStyleName
;
OUString
sCategoryVal
;
OUString
sDropCapTextStyleName
;
OUString
sMasterPageName
;
OUString
sDataStyleName
;
// for grid columns only
OUString
m_
sListStyleName
;
OUString
m_
sCategoryVal
;
OUString
m_
sDropCapTextStyleName
;
OUString
m_
sMasterPageName
;
OUString
m_
sDataStyleName
;
// for grid columns only
const
OUString
sIsAutoUpdate
;
const
OUString
sCategory
;
const
OUString
sNumberingStyleName
;
...
...
@@ -43,17 +43,17 @@ public:
private
:
const
OUString
sPageDescName
;
sal_Int8
nOutlineLevel
;
sal_Int8
m_
nOutlineLevel
;
bool
b
AutoUpdate
:
1
;
bool
bHasMasterPageName
:
1
;
bool
m_is
AutoUpdate
:
1
;
bool
m_
bHasMasterPageName
:
1
;
bool
bHasCombinedCharactersLetter
:
1
;
bool
m_
bHasCombinedCharactersLetter
:
1
;
// Introduce import of empty list style (#i69523#)
bool
mbListStyleSet
:
1
;
bool
m
_
bListStyleSet
:
1
;
rtl
::
Reference
<
XMLEventsImportContext
>
mxEventContext
;
rtl
::
Reference
<
XMLEventsImportContext
>
m
_
xEventContext
;
protected
:
...
...
@@ -79,17 +79,17 @@ public:
const
OUString
&
rLocalName
,
const
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XAttributeList
>
&
xAttrList
)
override
;
const
OUString
&
GetListStyle
()
const
{
return
sListStyleName
;
}
// XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#)
const
OUString
&
GetListStyle
()
const
{
return
m_
sListStyleName
;
}
// XML import: reconstru
c
tion of assignment of paragraph style to outline levels (#i69629#)
bool
IsListStyleSet
()
const
{
return
mbListStyleSet
;
return
m
_
bListStyleSet
;
}
const
OUString
&
GetMasterPageName
()
const
{
return
sMasterPageName
;
}
bool
HasMasterPageName
()
const
{
return
bHasMasterPageName
;
}
const
OUString
&
GetDropCapStyleName
()
const
{
return
sDropCapTextStyleName
;
}
const
OUString
&
GetDataStyleName
()
const
{
return
sDataStyleName
;
}
const
OUString
&
GetMasterPageName
()
const
{
return
m_
sMasterPageName
;
}
bool
HasMasterPageName
()
const
{
return
m_
bHasMasterPageName
;
}
const
OUString
&
GetDropCapStyleName
()
const
{
return
m_
sDropCapTextStyleName
;
}
const
OUString
&
GetDataStyleName
()
const
{
return
m_
sDataStyleName
;
}
virtual
void
CreateAndInsert
(
bool
bOverwrite
)
override
;
virtual
void
Finish
(
bool
bOverwrite
)
override
;
...
...
@@ -100,7 +100,7 @@ public:
const
css
::
uno
::
Reference
<
css
::
beans
::
XPropertySet
>
&
rPropSet
)
override
;
bool
HasCombinedCharactersLetter
()
{
return
bHasCombinedCharactersLetter
;
}
{
return
m_
bHasCombinedCharactersLetter
;
}
const
::
std
::
vector
<
XMLPropertyState
>
&
GetProperties_
()
{
return
GetProperties
();
}
};
...
...
xmloff/source/text/txtstyli.cxx
Dosyayı görüntüle @
f99ff13f
...
...
@@ -85,33 +85,35 @@ void XMLTextStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
if
(
IsXMLToken
(
rLocalName
,
XML_AUTO_UPDATE
)
)
{
if
(
IsXMLToken
(
rValue
,
XML_TRUE
)
)
b
AutoUpdate
=
true
;
m_is
AutoUpdate
=
true
;
}
else
if
(
IsXMLToken
(
rLocalName
,
XML_LIST_STYLE_NAME
)
)
{
sListStyleName
=
rValue
;
m_
sListStyleName
=
rValue
;
// Inherited paragraph style lost information about unset numbering (#i69523#)
mbListStyleSet
=
true
;
m
_
bListStyleSet
=
true
;
}
else
if
(
IsXMLToken
(
rLocalName
,
XML_MASTER_PAGE_NAME
)
)
{
sMasterPageName
=
rValue
;
bHasMasterPageName
=
true
;
m_
sMasterPageName
=
rValue
;
m_
bHasMasterPageName
=
true
;
}
else
if
(
IsXMLToken
(
rLocalName
,
XML_DATA_STYLE_NAME
)
)
{
sDataStyleName
=
rValue
;
m_
sDataStyleName
=
rValue
;
}
else
if
(
IsXMLToken
(
rLocalName
,
XML_CLASS
)
)
{
sCategoryVal
=
rValue
;
m_
sCategoryVal
=
rValue
;
}
else
if
(
IsXMLToken
(
rLocalName
,
XML_DEFAULT_OUTLINE_LEVEL
)
)
{
sal_Int32
nTmp
;
if
(
::
sax
::
Converter
::
convertNumber
(
nTmp
,
rValue
)
&&
0
<=
nTmp
&&
nTmp
<=
10
)
nOutlineLevel
=
static_cast
<
sal_Int8
>
(
nTmp
);
{
m_nOutlineLevel
=
static_cast
<
sal_Int8
>
(
nTmp
);
}
}
else
{
...
...
@@ -137,12 +139,12 @@ XMLTextStyleContext::XMLTextStyleContext( SvXMLImport& rImport,
,
sOutlineLevel
(
"OutlineLevel"
)
,
sDropCapCharStyleName
(
"DropCapCharStyleName"
)
,
sPageDescName
(
"PageDescName"
)
,
nOutlineLevel
(
-
1
)
,
b
AutoUpdate
(
false
)
,
bHasMasterPageName
(
false
)
,
bHasCombinedCharactersLetter
(
false
)
,
m_
nOutlineLevel
(
-
1
)
,
m_is
AutoUpdate
(
false
)
,
m_
bHasMasterPageName
(
false
)
,
m_
bHasCombinedCharactersLetter
(
false
)
// Inherited paragraph style lost information about unset numbering (#i69523#)
,
mbListStyleSet
(
false
)
,
m
_
bListStyleSet
(
false
)
{
}
...
...
@@ -179,7 +181,7 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext(
nFamily
,
GetProperties
(),
xImpPrMap
,
sDropCapTextStyleName
);
m_sDropCapTextStyleName
);
}
}
else
if
(
(
XML_NAMESPACE_OFFICE
==
nPrefix
)
&&
...
...
@@ -187,9 +189,9 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext(
{
// create and remember events import context
// (for delayed processing of events)
mxEventContext
.
set
(
new
XMLEventsImportContext
(
GetImport
(),
nPrefix
,
m
_
xEventContext
.
set
(
new
XMLEventsImportContext
(
GetImport
(),
nPrefix
,
rLocalName
));
pContext
=
mxEventContext
.
get
();
pContext
=
m
_
xEventContext
.
get
();
}
if
(
!
pContext
)
...
...
@@ -211,31 +213,31 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite )
xPropSet
->
getPropertySetInfo
();
if
(
xPropSetInfo
->
hasPropertyByName
(
sIsAutoUpdate
)
)
{
xPropSet
->
setPropertyValue
(
sIsAutoUpdate
,
Any
(
b
AutoUpdate
)
);
xPropSet
->
setPropertyValue
(
sIsAutoUpdate
,
Any
(
m_is
AutoUpdate
)
);
}
sal_uInt16
nCategory
=
ParagraphStyleCategory
::
TEXT
;
if
(
XML_STYLE_FAMILY_TEXT_PARAGRAPH
==
GetFamily
()
&&
!
sCategoryVal
.
isEmpty
()
&&
xStyle
->
isUserDefined
()
&&
!
m_
sCategoryVal
.
isEmpty
()
&&
xStyle
->
isUserDefined
()
&&
xPropSetInfo
->
hasPropertyByName
(
sCategory
)
&&
SvXMLUnitConverter
::
convertEnum
(
nCategory
,
sCategoryVal
,
aCategoryMap
)
)
SvXMLUnitConverter
::
convertEnum
(
nCategory
,
m_sCategoryVal
,
aCategoryMap
)
)
{
xPropSet
->
setPropertyValue
(
sCategory
,
Any
((
sal_Int16
)
nCategory
)
);
}
// tell the style about it's events (if applicable)
if
(
mxEventContext
.
is
())
if
(
m
_
xEventContext
.
is
())
{
// pass events into event suppplier
Reference
<
document
::
XEventsSupplier
>
xEventsSupplier
(
xStyle
,
UNO_QUERY
);
mxEventContext
->
SetEvents
(
xEventsSupplier
);
mxEventContext
.
clear
();
m
_
xEventContext
->
SetEvents
(
xEventsSupplier
);
m
_
xEventContext
.
clear
();
}
// XML import: reconstrution of assignment of paragraph style to outline levels (#i69629#)
if
(
nOutlineLevel
>
0
)
if
(
m_nOutlineLevel
>
0
)
{
GetImport
().
GetTextImport
()
->
AddOutlineStyleCandidate
(
nOutlineLevel
,
GetImport
().
GetTextImport
()
->
AddOutlineStyleCandidate
(
m_
nOutlineLevel
,
GetDisplayName
()
);
}
}
...
...
@@ -263,10 +265,10 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
Reference
<
XStyle
>
xStyle
=
GetStyle
();
// Consider set empty list style (#i69523#)
if
(
!
(
mbListStyleSet
||
nOutlineLevel
>=
0
||
!
sDropCapTextStyleName
.
isEmpty
()
||
bHasMasterPageName
)
||
if
(
!
(
m
_
bListStyleSet
||
m_
nOutlineLevel
>=
0
||
!
m_
sDropCapTextStyleName
.
isEmpty
()
||
m_
bHasMasterPageName
)
||
!
xStyle
.
is
()
||
!
(
bOverwrite
||
IsNew
()
)
)
return
;
...
...
@@ -277,14 +279,14 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
if
(
xPropSetInfo
->
hasPropertyByName
(
sOutlineLevel
))
{
if
(
nOutlineLevel
>=
0
)
if
(
m_nOutlineLevel
>=
0
)
{
xPropSet
->
setPropertyValue
(
sOutlineLevel
,
Any
(
nOutlineLevel
)
);
xPropSet
->
setPropertyValue
(
sOutlineLevel
,
Any
(
m_
nOutlineLevel
)
);
}
}
// Consider set empty list style (#i69523#)
if
(
m
bListStyleSet
&&
if
(
m_
bListStyleSet
&&
xPropSetInfo
->
hasPropertyByName
(
sNumberingStyleName
)
)
{
/* Only for text document from version prior OOo 2.1 resp. SO 8 PU5:
...
...
@@ -293,7 +295,7 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
level of the outline style. (#i70223#)
*/
bool
bApplyListStyle
(
true
);
if
(
nOutlineLevel
>
0
)
if
(
m_nOutlineLevel
>
0
)
{
if
(
GetImport
().
IsTextDocInOOoFileFormat
()
)
{
...
...
@@ -315,16 +317,16 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
if
(
bApplyListStyle
)
{
if
(
sListStyleName
.
isEmpty
()
)
if
(
m_sListStyleName
.
isEmpty
()
)
{
xPropSet
->
setPropertyValue
(
sNumberingStyleName
,
Any
(
sListStyleName
)
);
/* empty string */
;
xPropSet
->
setPropertyValue
(
sNumberingStyleName
,
Any
(
m_sListStyleName
));
/* empty string */
}
else
{
// change list style name to display name
OUString
sDisplayListStyleName
(
GetImport
().
GetStyleDisplayName
(
XML_STYLE_FAMILY_TEXT_LIST
,
sListStyleName
)
);
GetImport
().
GetStyleDisplayName
(
XML_STYLE_FAMILY_TEXT_LIST
,
m_sListStyleName
)
);
// The families container must exist
const
Reference
<
XNameContainer
>&
rNumStyles
=
GetImport
().
GetTextImport
()
->
GetNumberingStyles
();
...
...
@@ -339,12 +341,12 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
}
}
if
(
!
sDropCapTextStyleName
.
isEmpty
()
)
if
(
!
m_sDropCapTextStyleName
.
isEmpty
()
)
{
// change list style name to display name
OUString
sDisplayDropCapTextStyleName
(
GetImport
().
GetStyleDisplayName
(
XML_STYLE_FAMILY_TEXT_TEXT
,
sDropCapTextStyleName
)
);
m_sDropCapTextStyleName
)
);
// The families container must exist
const
Reference
<
XNameContainer
>&
rTextStyles
=
GetImport
().
GetTextImport
()
->
GetTextStyles
();
...
...
@@ -356,11 +358,11 @@ void XMLTextStyleContext::Finish( bool bOverwrite )
}
}
if
(
bHasMasterPageName
)
if
(
m_bHasMasterPageName
)
{
OUString
sDisplayName
(
GetImport
().
GetStyleDisplayName
(
XML_STYLE_FAMILY_MASTER_PAGE
,
sMasterPageName
)
);
XML_STYLE_FAMILY_MASTER_PAGE
,
m_sMasterPageName
)
);
// The families container must exist
const
Reference
<
XNameContainer
>&
rPageStyles
=
GetImport
().
GetTextImport
()
->
GetPageStyles
();
...
...
@@ -479,7 +481,7 @@ void XMLTextStyleContext::FillPropertySet(
{
Any
&
rAny
=
GetProperties
()[
nIndex
].
maValue
;
bool
bVal
=
*
o3tl
::
doAccess
<
bool
>
(
rAny
);
bHasCombinedCharactersLetter
=
bVal
;
m_
bHasCombinedCharactersLetter
=
bVal
;
}
// keep-together: the application default is different from
...
...
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