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
d72c7903
Kaydet (Commit)
d72c7903
authored
Eki 05, 2013
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String to OUString
Change-Id: Ib7f355f68fe79ebfebb83fb5d2b72f4070153610
üst
2c5e78f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
docedt.cxx
sw/source/core/doc/docedt.cxx
+22
-17
No files found.
sw/source/core/doc/docedt.cxx
Dosyayı görüntüle @
d72c7903
...
...
@@ -2122,25 +2122,30 @@ uno::Reference< XHyphenatedWord > SwDoc::Hyphenate(
return
aHyphArg
.
GetHyphWord
();
// will be set by lcl_HyphenateNode
}
static
bool
lcl_GetTokenToParaBreak
(
String
&
rStr
,
String
&
rRet
,
bool
bRegExpRplc
)
static
bool
lcl_GetTokenToParaBreak
(
OUString
&
rStr
,
OU
String
&
rRet
,
bool
bRegExpRplc
)
{
bool
bRet
=
false
;
if
(
bRegExpRplc
)
{
xub_StrLen
nPos
=
0
;
OUString
sPara
(
"
\\
n"
);
while
(
STRING_NOTFOUND
!=
(
nPos
=
rStr
.
Search
(
sPara
,
nPos
))
)
sal_Int32
nPos
=
0
;
const
OUString
sPara
(
"
\\
n"
);
for
(;;
)
{
nPos
=
rStr
.
indexOf
(
sPara
,
nPos
);
if
(
nPos
<
0
)
{
break
;
}
// Has this been escaped?
if
(
nPos
&&
'\\'
==
rStr
.
GetChar
(
nPos
-
1
)
)
if
(
nPos
&&
'\\'
==
rStr
[
nPos
-
1
]
)
{
if
(
++
nPos
>=
rStr
.
Len
()
)
if
(
++
nPos
>=
rStr
.
getLength
()
)
break
;
}
else
{
rRet
=
rStr
.
C
opy
(
0
,
nPos
);
rStr
.
Erase
(
0
,
nPos
+
sPara
.
getLength
()
);
rRet
=
rStr
.
c
opy
(
0
,
nPos
);
rStr
=
rStr
.
copy
(
nPos
+
sPara
.
getLength
()
);
bRet
=
true
;
break
;
}
...
...
@@ -2149,7 +2154,7 @@ static bool lcl_GetTokenToParaBreak( String& rStr, String& rRet, bool bRegExpRpl
if
(
!
bRet
)
{
rRet
=
rStr
;
rStr
.
Erase
();
rStr
=
OUString
();
}
return
bRet
;
}
...
...
@@ -2257,7 +2262,7 @@ bool SwDoc::ReplaceRangeImpl( SwPaM& rPam, const String& rStr,
sal_Bool
bOneNode
=
pStt
->
nNode
==
pEnd
->
nNode
;
// Own Undo?
String
sRepl
(
rStr
);
OU
String
sRepl
(
rStr
);
SwTxtNode
*
pTxtNd
=
pStt
->
nNode
.
GetNode
().
GetTxtNode
();
xub_StrLen
nStt
=
pStt
->
nContent
.
GetIndex
(),
nEnd
=
bOneNode
?
pEnd
->
nContent
.
GetIndex
()
...
...
@@ -2289,7 +2294,7 @@ bool SwDoc::ReplaceRangeImpl( SwPaM& rPam, const String& rStr,
nStt
=
pStt
->
nContent
.
GetIndex
();
}
if
(
sRepl
.
Len
()
)
if
(
!
sRepl
.
isEmpty
()
)
{
// Apply the first character's attributes to the ReplaceText
SfxItemSet
aSet
(
GetAttrPool
(),
...
...
@@ -2313,7 +2318,7 @@ bool SwDoc::ReplaceRangeImpl( SwPaM& rPam, const String& rStr,
xub_StrLen
nPtCnt
=
aDelPam
.
GetPoint
()
->
nContent
.
GetIndex
();
bool
bFirst
=
true
;
String
sIns
;
OU
String
sIns
;
while
(
lcl_GetTokenToParaBreak
(
sRepl
,
sIns
,
bRegExReplace
)
)
{
InsertString
(
aDelPam
,
sIns
);
...
...
@@ -2333,7 +2338,7 @@ bool SwDoc::ReplaceRangeImpl( SwPaM& rPam, const String& rStr,
else
SplitNode
(
*
aDelPam
.
GetPoint
(),
false
);
}
if
(
sIns
.
Len
()
)
if
(
!
sIns
.
isEmpty
()
)
{
InsertString
(
aDelPam
,
sIns
);
}
...
...
@@ -2410,14 +2415,14 @@ SetRedlineMode( eOld );
:
pTxtNd
->
GetTxt
().
getLength
();
bool
bFirst
=
true
;
String
sIns
;
OU
String
sIns
;
while
(
lcl_GetTokenToParaBreak
(
sRepl
,
sIns
,
bRegExReplace
)
)
{
if
(
!
bFirst
||
nStt
==
pTxtNd
->
GetTxt
().
getLength
())
{
InsertString
(
aDelPam
,
sIns
);
}
else
if
(
nStt
<
nEnd
||
sIns
.
Len
()
)
else
if
(
nStt
<
nEnd
||
!
sIns
.
isEmpty
()
)
{
pTxtNd
->
ReplaceText
(
pStt
->
nContent
,
nEnd
-
nStt
,
sIns
);
}
...
...
@@ -2425,13 +2430,13 @@ SetRedlineMode( eOld );
bFirst
=
false
;
}
if
(
bFirst
||
sIns
.
Len
()
)
if
(
bFirst
||
!
sIns
.
isEmpty
()
)
{
if
(
!
bFirst
||
nStt
==
pTxtNd
->
GetTxt
().
getLength
())
{
InsertString
(
aDelPam
,
sIns
);
}
else
if
(
nStt
<
nEnd
||
sIns
.
Len
()
)
else
if
(
nStt
<
nEnd
||
!
sIns
.
isEmpty
()
)
{
pTxtNd
->
ReplaceText
(
pStt
->
nContent
,
nEnd
-
nStt
,
sIns
);
}
...
...
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