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
caa828da
Kaydet (Commit)
caa828da
authored
Agu 15, 2015
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid unnecessary OUString copies
Change-Id: Ic76c9b75bcc72d8ae6a54d6ebba49acb77073bea
üst
6917ebc3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
textdoc.cxx
vcl/source/edit/textdoc.cxx
+3
-6
texteng.cxx
vcl/source/edit/texteng.cxx
+3
-3
No files found.
vcl/source/edit/textdoc.cxx
Dosyayı görüntüle @
caa828da
...
@@ -436,8 +436,7 @@ OUString TextDoc::GetText( const sal_Unicode* pSep ) const
...
@@ -436,8 +436,7 @@ OUString TextDoc::GetText( const sal_Unicode* pSep ) const
for
(
sal_uInt32
nNode
=
0
;
nNode
<
nNodes
;
++
nNode
)
for
(
sal_uInt32
nNode
=
0
;
nNode
<
nNodes
;
++
nNode
)
{
{
TextNode
*
pNode
=
maTextNodes
[
nNode
];
TextNode
*
pNode
=
maTextNodes
[
nNode
];
OUString
aTmp
(
pNode
->
GetText
()
);
aASCIIText
+=
pNode
->
GetText
();
aASCIIText
+=
aTmp
;
if
(
pSep
&&
(
nNode
!=
nLastNode
)
)
if
(
pSep
&&
(
nNode
!=
nLastNode
)
)
aASCIIText
+=
pSep
;
aASCIIText
+=
pSep
;
}
}
...
@@ -447,13 +446,11 @@ OUString TextDoc::GetText( const sal_Unicode* pSep ) const
...
@@ -447,13 +446,11 @@ OUString TextDoc::GetText( const sal_Unicode* pSep ) const
OUString
TextDoc
::
GetText
(
sal_uInt32
nPara
)
const
OUString
TextDoc
::
GetText
(
sal_uInt32
nPara
)
const
{
{
OUString
aText
;
TextNode
*
pNode
=
(
nPara
<
maTextNodes
.
size
()
)
?
maTextNodes
[
nPara
]
:
0
;
TextNode
*
pNode
=
(
nPara
<
maTextNodes
.
size
()
)
?
maTextNodes
[
nPara
]
:
0
;
if
(
pNode
)
if
(
pNode
)
aText
=
pNode
->
GetText
();
return
pNode
->
GetText
();
return
aText
;
return
OUString
()
;
}
}
sal_uLong
TextDoc
::
GetTextLen
(
const
sal_Unicode
*
pSep
,
const
TextSelection
*
pSel
)
const
sal_uLong
TextDoc
::
GetTextLen
(
const
sal_Unicode
*
pSep
,
const
TextSelection
*
pSel
)
const
...
...
vcl/source/edit/texteng.cxx
Dosyayı görüntüle @
caa828da
...
@@ -699,9 +699,9 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
...
@@ -699,9 +699,9 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
// the text that needs to be checked is only the one
// the text that needs to be checked is only the one
// before the current cursor position
// before the current cursor position
OUString
aOldText
(
mpDoc
->
GetText
(
aPaM
.
GetPara
()
).
copy
(
0
,
nTmpPos
)
);
OUString
aOldText
(
mpDoc
->
GetText
(
aPaM
.
GetPara
()
).
copy
(
0
,
nTmpPos
)
);
OUString
aNewText
(
aOldText
);
if
(
aCTLOptions
.
IsCTLSequenceCheckingTypeAndReplace
())
if
(
aCTLOptions
.
IsCTLSequenceCheckingTypeAndReplace
())
{
{
OUString
aNewText
(
aOldText
);
xISC
->
correctInputSequence
(
aNewText
,
nTmpPos
-
1
,
c
,
nCheckMode
);
xISC
->
correctInputSequence
(
aNewText
,
nTmpPos
-
1
,
c
,
nCheckMode
);
// find position of first character that has changed
// find position of first character that has changed
...
@@ -2530,7 +2530,7 @@ bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, bool bHTML
...
@@ -2530,7 +2530,7 @@ bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, bool bHTML
OUStringBuffer
aText
;
OUStringBuffer
aText
;
if
(
!
bHTML
)
if
(
!
bHTML
)
{
{
aText
=
OUString
(
pNode
->
GetText
().
copy
(
nStartPos
,
nEndPos
-
nStartPos
)
);
aText
=
pNode
->
GetText
().
copy
(
nStartPos
,
nEndPos
-
nStartPos
);
}
}
else
else
{
{
...
@@ -2551,7 +2551,7 @@ bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, bool bHTML
...
@@ -2551,7 +2551,7 @@ bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, bool bHTML
nTmpEnd
=
pAttr
?
pAttr
->
GetStart
()
:
nEndPos
;
nTmpEnd
=
pAttr
?
pAttr
->
GetStart
()
:
nEndPos
;
// Text before Attribute
// Text before Attribute
aText
.
append
(
OUString
(
pNode
->
GetText
().
copy
(
nTmpStart
,
nTmpEnd
-
nTmpStart
)
)
);
aText
.
append
(
pNode
->
GetText
().
copy
(
nTmpStart
,
nTmpEnd
-
nTmpStart
)
);
if
(
pAttr
)
if
(
pAttr
)
{
{
...
...
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