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
f208e711
Kaydet (Commit)
f208e711
authored
May 14, 2001
tarafından
Daniel Vogelheim
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fixed: export section style only for first paragraph in section
üst
b019d473
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
89 deletions
+80
-89
txtsecte.cxx
xmloff/source/text/txtsecte.cxx
+80
-89
No files found.
xmloff/source/text/txtsecte.cxx
Dosyayı görüntüle @
f208e711
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: txtsecte.cxx,v $
* $RCSfile: txtsecte.cxx,v $
*
*
* $Revision: 1.
9
$
* $Revision: 1.
10
$
*
*
* last change: $Author: dvo $ $Date: 2001-0
2-13 16:55:00
$
* last change: $Author: dvo $ $Date: 2001-0
5-14 13:03:17
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -223,113 +223,104 @@ void XMLTextParagraphExport::exportListAndSectionChange(
...
@@ -223,113 +223,104 @@ void XMLTextParagraphExport::exportListAndSectionChange(
const
XMLTextNumRuleInfo
&
rNextRule
,
const
XMLTextNumRuleInfo
&
rNextRule
,
sal_Bool
bAutoStyles
)
sal_Bool
bAutoStyles
)
{
{
if
(
bAutoStyles
)
// old != new? -> maybe we have to start or end a new section
if
(
rPrevSection
!=
rNextSection
)
{
{
if
(
rNextSection
.
is
()
)
// a new section started, or an old one gets closed!
{
pSectionExport
->
ExportSectionStart
(
rNextSection
,
bAutoStyles
);
}
}
else
{
// old != new? -> start/equal?
if
(
rPrevSection
!=
rNextSection
)
{
// a new section started, or an old one gets closed!
// close old list
// close old list
XMLTextNumRuleInfo
aEmptyNumRule
;
XMLTextNumRuleInfo
aEmptyNumRule
;
if
(
!
bAutoStyles
)
exportListChange
(
rPrevRule
,
aEmptyNumRule
);
exportListChange
(
rPrevRule
,
aEmptyNumRule
);
// Build stacks of old and new sections
// Build stacks of old and new sections
// Sections on top of mute sections should not be on the stack
// Sections on top of mute sections should not be on the stack
vector
<
Reference
<
XTextSection
>
>
aOldStack
;
vector
<
Reference
<
XTextSection
>
>
aOldStack
;
Reference
<
XTextSection
>
aCurrent
=
rPrevSection
;
Reference
<
XTextSection
>
aCurrent
=
rPrevSection
;
while
(
aCurrent
.
is
())
while
(
aCurrent
.
is
())
{
{
// if we have a mute section, ignore all its children
// if we have a mute section, ignore all its children
// (all previous ones)
// (all previous ones)
if
(
pSectionExport
->
IsMuteSection
(
aCurrent
))
if
(
pSectionExport
->
IsMuteSection
(
aCurrent
))
aOldStack
.
clear
();
aOldStack
.
clear
();
aOldStack
.
push_back
(
aCurrent
);
aOldStack
.
push_back
(
aCurrent
);
aCurrent
=
aCurrent
->
getParentSection
();
aCurrent
=
aCurrent
->
getParentSection
();
}
}
vector
<
Reference
<
XTextSection
>
>
aNewStack
;
vector
<
Reference
<
XTextSection
>
>
aNewStack
;
aCurrent
=
rNextSection
;
aCurrent
=
rNextSection
;
while
(
aCurrent
.
is
())
while
(
aCurrent
.
is
())
{
{
// if we have a mute section, ignore all its children
// if we have a mute section, ignore all its children
// (all previous ones)
// (all previous ones)
if
(
pSectionExport
->
IsMuteSection
(
aCurrent
))
if
(
pSectionExport
->
IsMuteSection
(
aCurrent
))
aNewStack
.
clear
();
aNewStack
.
clear
();
aNewStack
.
push_back
(
aCurrent
);
aNewStack
.
push_back
(
aCurrent
);
aCurrent
=
aCurrent
->
getParentSection
();
aCurrent
=
aCurrent
->
getParentSection
();
}
}
// compare the two stacks
// compare the two stacks
vector
<
Reference
<
XTextSection
>
>
::
reverse_iterator
aOld
=
vector
<
Reference
<
XTextSection
>
>
::
reverse_iterator
aOld
=
aOldStack
.
rbegin
();
aOldStack
.
rbegin
();
vector
<
Reference
<
XTextSection
>
>
::
reverse_iterator
aNew
=
vector
<
Reference
<
XTextSection
>
>
::
reverse_iterator
aNew
=
aNewStack
.
rbegin
();
aNewStack
.
rbegin
();
// compare bottom sections and skip equal section
// compare bottom sections and skip equal section
while
(
(
aOld
!=
aOldStack
.
rend
())
&&
while
(
(
aOld
!=
aOldStack
.
rend
())
&&
(
aNew
!=
aNewStack
.
rend
())
&&
(
aNew
!=
aNewStack
.
rend
())
&&
(
*
aOld
)
==
(
*
aNew
)
)
(
*
aOld
)
==
(
*
aNew
)
)
{
{
aOld
++
;
aOld
++
;
aNew
++
;
aNew
++
;
}
}
// close all elements of aOld ...
// close all elements of aOld ...
// (order: newest to oldest)
// (order: newest to oldest)
if
(
aOld
!=
aOldStack
.
rend
())
if
(
aOld
!=
aOldStack
.
rend
())
{
vector
<
Reference
<
XTextSection
>
>
::
iterator
aOldForward
=
aOldStack
.
begin
();
while
((
aOldForward
!=
aOldStack
.
end
())
&&
(
*
aOldForward
!=
*
aOld
))
{
{
vector
<
Reference
<
XTextSection
>
>
::
iterator
aOldForward
=
if
(
NULL
!=
pRedlineExport
)
aOldStack
.
begin
();
pRedlineExport
->
ExportStartOrEndRedline
(
*
aOldForward
,
while
((
aOldForward
!=
aOldStack
.
end
())
&&
(
*
aOldForward
!=
*
aOld
))
{
if
(
NULL
!=
pRedlineExport
)
pRedlineExport
->
ExportStartOrEndRedline
(
*
aOldForward
,
sal_False
);
pSectionExport
->
ExportSectionEnd
(
*
aOldForward
,
bAutoStyles
);
aOldForward
++
;
}
if
(
aOldForward
!=
aOldStack
.
end
())
{
if
(
NULL
!=
pRedlineExport
)
pRedlineExport
->
ExportStartOrEndRedline
(
*
aOldForward
,
sal_False
);
sal_False
);
pSectionExport
->
ExportSectionEnd
(
*
aOldForward
,
pSectionExport
->
ExportSectionEnd
(
*
aOldForward
,
bAutoStyles
);
bAutoStyles
);
aOldForward
++
;
}
}
}
if
(
aOldForward
!=
aOldStack
.
end
())
// ...then open all of aNew
// (order: oldest to newest)
while
(
aNew
!=
aNewStack
.
rend
())
{
{
if
(
NULL
!=
pRedlineExport
)
if
(
NULL
!=
pRedlineExport
)
pRedlineExport
->
ExportStartOrEndRedline
(
*
a
New
,
sal_True
);
pRedlineExport
->
ExportStartOrEndRedline
(
*
a
OldForward
,
pSectionExport
->
ExportSectionStart
(
*
aNew
,
bAutoStyles
);
sal_False
);
aNew
++
;
pSectionExport
->
ExportSectionEnd
(
*
aOldForward
,
bAutoStyles
)
;
}
}
// start new list
exportListChange
(
aEmptyNumRule
,
rNextRule
);
}
}
else
// ...then open all of aNew
// (order: oldest to newest)
while
(
aNew
!=
aNewStack
.
rend
())
{
{
// list change, if sections have not changed
if
(
NULL
!=
pRedlineExport
)
exportListChange
(
rPrevRule
,
rNextRule
);
pRedlineExport
->
ExportStartOrEndRedline
(
*
aNew
,
sal_True
);
pSectionExport
->
ExportSectionStart
(
*
aNew
,
bAutoStyles
);
aNew
++
;
}
}
// start new list
if
(
!
bAutoStyles
)
exportListChange
(
aEmptyNumRule
,
rNextRule
);
}
else
{
// list change, if sections have not changed
if
(
!
bAutoStyles
)
exportListChange
(
rPrevRule
,
rNextRule
);
}
}
// save old section (old numRule gets saved in calling method
// save old section (old numRule gets saved in calling method
)
rPrevSection
=
rNextSection
;
rPrevSection
=
rNextSection
;
}
}
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