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
ba88c3ae
Kaydet (Commit)
ba88c3ae
authored
Mar 01, 2015
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reduce OUString temporaries
Change-Id: I7ad78a1d7b544326570abac77122055a9cf3c57c
üst
a72ba7b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
doctxm.cxx
sw/source/core/doc/doctxm.cxx
+12
-21
No files found.
sw/source/core/doc/doctxm.cxx
Dosyayı görüntüle @
ba88c3ae
...
...
@@ -360,11 +360,7 @@ SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
SwTxtNode
*
pHeadNd
=
GetNodes
().
MakeTxtNode
(
aIdx
,
getIDocumentStylePoolAccess
().
GetTxtCollFromPool
(
RES_POOLCOLL_STANDARD
)
);
OUString
sNm
(
pNewSection
->
GetTOXName
()
);
// ??Resource
sNm
+=
"_Head"
;
SwSectionData
headerData
(
TOX_HEADER_SECTION
,
sNm
);
SwSectionData
headerData
(
TOX_HEADER_SECTION
,
pNewSection
->
GetTOXName
()
+
"_Head"
);
SwNodeIndex
aStt
(
*
pHeadNd
);
--
aIdx
;
SwSectionFmt
*
pSectFmt
=
MakeSectionFmt
(
0
);
...
...
@@ -393,7 +389,7 @@ const SwTOXBaseSection* SwDoc::InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd
pSectNd
=
pSectNd
->
StartOfSectionNode
()
->
FindSectionNode
();
}
OUString
sSectNm
=
GetUniqueTOXBaseName
(
*
rTOX
.
GetTOXType
(),
rTOX
.
GetTOXName
());
const
OUString
sSectNm
=
GetUniqueTOXBaseName
(
*
rTOX
.
GetTOXType
(),
rTOX
.
GetTOXName
());
SwSectionData
aSectionData
(
TOX_CONTENT_SECTION
,
sSectNm
);
...
...
@@ -683,15 +679,14 @@ bool SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const OUString& rName)
"no TOXBaseSection!"
);
SwTOXBaseSection
*
pTOX
=
const_cast
<
SwTOXBaseSection
*>
(
static_cast
<
const
SwTOXBaseSection
*>
(
&
rTOXBase
));
OUString
sTmp
=
GetUniqueTOXBaseName
(
*
rTOXBase
.
GetTOXType
(),
rName
);
bool
bRet
=
sTmp
==
rName
;
if
(
bRet
)
if
(
GetUniqueTOXBaseName
(
*
rTOXBase
.
GetTOXType
(),
rName
)
==
rName
)
{
pTOX
->
SetTOXName
(
rName
);
pTOX
->
SetSectionName
(
rName
);
getIDocumentState
().
SetModified
();
return
true
;
}
return
bRet
;
return
false
;
}
static
const
SwTxtNode
*
lcl_FindChapterNode
(
const
SwNode
&
rNd
,
sal_uInt8
nLvl
=
0
)
...
...
@@ -900,11 +895,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
GetTxtFmtColl
(
FORM_TITLE
)
);
pHeadNd
->
InsertText
(
GetTitle
(),
SwIndex
(
pHeadNd
)
);
OUString
sNm
(
GetTOXName
()
);
// ??Resource
sNm
+=
"_Head"
;
SwSectionData
headerData
(
TOX_HEADER_SECTION
,
sNm
);
SwSectionData
headerData
(
TOX_HEADER_SECTION
,
GetTOXName
()
+
"_Head"
);
SwNodeIndex
aStt
(
*
pHeadNd
);
--
aIdx
;
SwSectionFmt
*
pSectFmt
=
pDoc
->
MakeSectionFmt
(
0
);
...
...
@@ -1048,7 +1039,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr,
void
SwTOXBaseSection
::
InsertAlphaDelimitter
(
const
SwTOXInternational
&
rIntl
)
{
SwDoc
*
pDoc
=
(
SwDoc
*
)
GetFmt
()
->
GetDoc
();
OUString
s
Deli
,
s
LastDeli
;
OUString
sLastDeli
;
SwTOXSortTabBases
::
size_type
i
=
0
;
while
(
i
<
aSortArr
.
size
()
)
{
...
...
@@ -1060,7 +1051,7 @@ void SwTOXBaseSection::InsertAlphaDelimitter( const SwTOXInternational& rIntl )
if
(
nLevel
==
FORM_ALPHA_DELIMITTER
)
continue
;
sDeli
=
rIntl
.
GetIndexKey
(
aSortArr
[
i
]
->
GetTxt
(),
const
OUString
sDeli
=
rIntl
.
GetIndexKey
(
aSortArr
[
i
]
->
GetTxt
(),
aSortArr
[
i
]
->
GetLocale
()
);
// Do we already have a Delimitter?
...
...
@@ -1239,7 +1230,7 @@ void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode )
SwDoc
*
pDoc
=
(
SwDoc
*
)
GetFmt
()
->
GetDoc
();
for
(
sal_uInt16
i
=
0
;
i
<
MAXLEVEL
;
i
++
)
{
OUString
sTmpStyleNames
=
GetStyleNames
(
i
);
const
OUString
sTmpStyleNames
=
GetStyleNames
(
i
);
sal_uInt16
nTokenCount
=
comphelper
::
string
::
getTokenCount
(
sTmpStyleNames
,
TOX_STYLE_DELIMITER
);
for
(
sal_uInt16
nStyle
=
0
;
nStyle
<
nTokenCount
;
++
nStyle
)
{
...
...
@@ -1296,9 +1287,9 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode )
::
lcl_FindChapterNode
(
rTxtNode
,
0
)
==
pOwnChapterNode
)
)
{
const
SwSetExpField
&
rSeqField
=
dynamic_cast
<
const
SwSetExpField
&>
(
*
(
pFmtFld
->
GetField
()));
OUString
sName
=
GetSequenceName
();
sName
+=
OUString
(
cSequenceMarkSeparator
);
sName
+=
OUString
::
number
(
rSeqField
.
GetSeqNumber
()
);
const
OUString
sName
=
GetSequenceName
()
+
OUString
(
cSequenceMarkSeparator
)
+
OUString
::
number
(
rSeqField
.
GetSeqNumber
()
);
SwTOXPara
*
pNew
=
new
SwTOXPara
(
rTxtNode
,
nsSwTOXElement
::
TOX_SEQUENCE
,
1
,
sName
);
// set indexes if the number or the reference text are to be displayed
if
(
GetCaptionDisplay
()
==
CAPTION_TEXT
)
...
...
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