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
ff3d175e
Kaydet (Commit)
ff3d175e
authored
Ara 08, 2016
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmloff: XMLChangeImportContext: replace boolean pair with proper enum
Change-Id: I82ec75058a2309b8bcf0f8e78d8ef0db367014b0
üst
a547b255
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
27 deletions
+28
-27
XMLChangeImportContext.cxx
xmloff/source/text/XMLChangeImportContext.cxx
+11
-14
XMLChangeImportContext.hxx
xmloff/source/text/XMLChangeImportContext.hxx
+7
-9
txtimp.cxx
xmloff/source/text/txtimp.cxx
+5
-2
txtparai.cxx
xmloff/source/text/txtparai.cxx
+5
-2
No files found.
xmloff/source/text/XMLChangeImportContext.cxx
Dosyayı görüntüle @
ff3d175e
...
...
@@ -34,15 +34,12 @@ XMLChangeImportContext::XMLChangeImportContext(
SvXMLImport
&
rImport
,
sal_Int16
nPrefix
,
const
OUString
&
rLocalName
,
bool
bStart
,
bool
bEnd
,
bool
bOutsideOfParagraph
)
:
SvXMLImportContext
(
rImport
,
nPrefix
,
rLocalName
),
bIsStart
(
bStart
),
bIsEnd
(
bEnd
),
bIsOutsideOfParagraph
(
bOutsideOfParagraph
)
Element
const
eElement
,
bool
bOutsideOfParagraph
)
:
SvXMLImportContext
(
rImport
,
nPrefix
,
rLocalName
)
,
m_Element
(
eElement
)
,
m_bIsOutsideOfParagraph
(
bOutsideOfParagraph
)
{
DBG_ASSERT
(
bStart
||
bEnd
,
"Must be either start, end, or both!"
);
}
XMLChangeImportContext
::~
XMLChangeImportContext
()
...
...
@@ -69,14 +66,14 @@ void XMLChangeImportContext::StartElement(
GetImport
().
GetTextImport
();
OUString
sID
=
xAttrList
->
getValueByIndex
(
nAttr
);
//
call for bStart and bEnd (may both be true)
if
(
bIsStar
t
)
rHelper
->
RedlineSetCursor
(
sID
,
true
,
bIsOutsideOfParagraph
);
if
(
bIsEnd
)
rHelper
->
RedlineSetCursor
(
sID
,
false
,
bIsOutsideOfParagraph
);
//
<text:change> is both start and end
if
(
Element
::
START
==
m_Element
||
Element
::
POINT
==
m_Elemen
t
)
rHelper
->
RedlineSetCursor
(
sID
,
true
,
m_
bIsOutsideOfParagraph
);
if
(
Element
::
END
==
m_Element
||
Element
::
POINT
==
m_Element
)
rHelper
->
RedlineSetCursor
(
sID
,
false
,
m_
bIsOutsideOfParagraph
);
// outside of paragraph and still open? set open redline ID
if
(
bIsOutsideOfParagraph
)
if
(
m_
bIsOutsideOfParagraph
)
{
rHelper
->
SetOpenRedlineId
(
sID
);
}
...
...
xmloff/source/text/XMLChangeImportContext.hxx
Dosyayı görüntüle @
ff3d175e
...
...
@@ -38,26 +38,20 @@ namespace com { namespace sun { namespace star {
*/
class
XMLChangeImportContext
:
public
SvXMLImportContext
{
bool
bIsStart
;
bool
bIsEnd
;
bool
bIsOutsideOfParagraph
;
public
:
enum
class
Element
{
START
,
END
,
POINT
};
/**
* import a change mark
* (<text:change>, <text:change-start>, <text:change-end>)
* Note: a <text:change> mark denotes start and end of a change
* simultaniously, so both bIsStart and bIsEnd parameters would
* be set true.
* simultaneously, as in Element::POINT.
*/
XMLChangeImportContext
(
SvXMLImport
&
rImport
,
sal_Int16
nPrefix
,
const
OUString
&
rLocalName
,
bool
bIsStart
,
/// mark start of a change
bool
bIsEnd
,
/// mark end of a change
Element
eElement
,
/// true if change mark is encountered outside of a paragraph
/// (usually before a section or table)
bool
bIsOutsideOfParagraph
);
...
...
@@ -66,6 +60,10 @@ public:
virtual
void
StartElement
(
const
css
::
uno
::
Reference
<
css
::
xml
::
sax
::
XAttributeList
>
&
xAttrList
)
override
;
private
:
Element
m_Element
;
bool
m_bIsOutsideOfParagraph
;
};
#endif
...
...
xmloff/source/text/txtimp.cxx
Dosyayı görüntüle @
ff3d175e
...
...
@@ -2294,8 +2294,11 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext(
case
XML_TOK_TEXT_CHANGE_END
:
pContext
=
new
XMLChangeImportContext
(
rImport
,
nPrefix
,
rLocalName
,
(
XML_TOK_TEXT_CHANGE_END
!=
nToken
),
(
XML_TOK_TEXT_CHANGE_START
!=
nToken
),
((
nToken
==
XML_TOK_TEXTP_CHANGE_END
)
?
XMLChangeImportContext
::
Element
::
END
:
(
nToken
==
XML_TOK_TEXTP_CHANGE_START
)
?
XMLChangeImportContext
::
Element
::
START
:
XMLChangeImportContext
::
Element
::
POINT
),
true
);
break
;
...
...
xmloff/source/text/txtparai.cxx
Dosyayı görüntüle @
ff3d175e
...
...
@@ -1683,8 +1683,11 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
case
XML_TOK_TEXTP_CHANGE
:
pContext
=
new
XMLChangeImportContext
(
rImport
,
nPrefix
,
rLocalName
,
(
nToken
!=
XML_TOK_TEXTP_CHANGE_END
),
(
nToken
!=
XML_TOK_TEXTP_CHANGE_START
),
((
nToken
==
XML_TOK_TEXTP_CHANGE_END
)
?
XMLChangeImportContext
::
Element
::
END
:
(
nToken
==
XML_TOK_TEXTP_CHANGE_START
)
?
XMLChangeImportContext
::
Element
::
START
:
XMLChangeImportContext
::
Element
::
POINT
),
false
);
break
;
...
...
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