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
ac010423
Kaydet (Commit)
ac010423
authored
Tem 10, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: clean up SwDoc::maPatternNms nonsense
Change-Id: I0a166d1b58b23cac96ae27d446d6d8ed2442df8e
üst
20bd0a2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
27 deletions
+23
-27
doc.hxx
sw/inc/doc.hxx
+3
-10
poolfmt.cxx
sw/source/core/doc/poolfmt.cxx
+20
-17
No files found.
sw/inc/doc.hxx
Dosyayı görüntüle @
ac010423
...
...
@@ -263,7 +263,7 @@ class SW_DLLPUBLIC SwDoc :
Idle
maOLEModifiedIdle
;
//< Timer for update modified OLE-Objects
SwDBData
maDBData
;
//< database descriptor
OUString
msTOIAutoMarkURL
;
//< URL of table of index AutoMark file
boost
::
ptr_vector
<
boost
::
nullable
<
OUString
>
>
maPatternNms
;
//
Array for names of document-templates
std
::
vector
<
OUString
>
m_PatternNames
;
//<
Array for names of document-templates
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
container
::
XNameContainer
>
mxXForms
;
//< container with XForms models
mutable
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
linguistic2
::
XProofreadingIterator
>
m_xGCIterator
;
...
...
@@ -907,17 +907,10 @@ public:
static
bool
IsUsed
(
const
SwNumRule
&
);
// Set name of newly loaded document template.
s
al_uInt16
SetDocPattern
(
const
OUString
&
rPatternName
);
s
ize_t
SetDocPattern
(
const
OUString
&
rPatternName
);
// @return name of document template. Can be 0!
const
OUString
*
GetDocPattern
(
sal_uInt16
nPos
)
const
{
if
(
nPos
>=
maPatternNms
.
size
())
return
NULL
;
if
(
boost
::
is_null
(
maPatternNms
.
begin
()
+
nPos
))
return
NULL
;
return
&
(
maPatternNms
[
nPos
]);
}
const
OUString
*
GetDocPattern
(
size_t
nPos
)
const
;
// Query / connect current document with glossary document.
void
SetGlossaryDoc
(
SwDoc
*
pDoc
)
{
mpGlossaryDoc
=
pDoc
;
}
...
...
sw/source/core/doc/poolfmt.cxx
Dosyayı görüntüle @
ac010423
...
...
@@ -131,28 +131,31 @@ bool SwDoc::IsUsed( const SwNumRule& rRule )
return
bUsed
;
}
const
OUString
*
SwDoc
::
GetDocPattern
(
size_t
const
nPos
)
const
{
if
(
nPos
>=
m_PatternNames
.
size
())
return
nullptr
;
return
&
m_PatternNames
[
nPos
];
}
// Look for the style name's position. If it doesn't exist,
// insert a anew
s
al_uInt16
SwDoc
::
SetDocPattern
(
const
OUString
&
rPatternName
)
s
ize_t
SwDoc
::
SetDocPattern
(
const
OUString
&
rPatternName
)
{
OSL_ENSURE
(
!
rPatternName
.
isEmpty
(),
"no Document style name"
);
size_t
nNewPos
=
maPatternNms
.
size
();
for
(
size_t
n
=
0
;
n
<
maPatternNms
.
size
();
++
n
)
if
(
boost
::
is_null
(
maPatternNms
.
begin
()
+
n
)
)
{
if
(
nNewPos
==
maPatternNms
.
size
()
)
nNewPos
=
n
;
}
else
if
(
rPatternName
==
maPatternNms
[
n
]
)
return
n
;
if
(
nNewPos
<
maPatternNms
.
size
()
)
maPatternNms
.
erase
(
maPatternNms
.
begin
()
+
nNewPos
);
// Free space again
maPatternNms
.
insert
(
maPatternNms
.
begin
()
+
nNewPos
,
new
OUString
(
rPatternName
));
getIDocumentState
().
SetModified
();
return
nNewPos
;
auto
const
iter
(
std
::
find
(
m_PatternNames
.
begin
(),
m_PatternNames
.
end
(),
rPatternName
));
if
(
iter
!=
m_PatternNames
.
end
())
{
return
std
::
distance
(
m_PatternNames
.
begin
(),
iter
);
}
else
{
m_PatternNames
.
push_back
(
rPatternName
);
getIDocumentState
().
SetModified
();
return
m_PatternNames
.
size
()
-
1
;
}
}
sal_uInt16
GetPoolParent
(
sal_uInt16
nId
)
...
...
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