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
5926f48a
Kaydet (Commit)
5926f48a
authored
Eyl 10, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert some XubString to OUString in editeng
Change-Id: I49b9a4e148510d68807fbb720a8c32d542853f8b
üst
3b8283a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
29 deletions
+28
-29
impedit4.cxx
editeng/source/editeng/impedit4.cxx
+5
-5
svxfont.cxx
editeng/source/items/svxfont.cxx
+23
-24
No files found.
editeng/source/editeng/impedit4.cxx
Dosyayı görüntüle @
5926f48a
...
@@ -2751,9 +2751,9 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
...
@@ -2751,9 +2751,9 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
for
(
sal_Int32
nNode
=
nStartNode
;
nNode
<=
nEndNode
;
nNode
++
)
for
(
sal_Int32
nNode
=
nStartNode
;
nNode
<=
nEndNode
;
nNode
++
)
{
{
ContentNode
*
pNode
=
aEditDoc
.
GetObject
(
nNode
);
ContentNode
*
pNode
=
aEditDoc
.
GetObject
(
nNode
);
const
Xub
String
&
aNodeStr
=
pNode
->
GetString
();
const
OU
String
&
aNodeStr
=
pNode
->
GetString
();
xub_StrLen
nStartPos
=
0
;
xub_StrLen
nStartPos
=
0
;
xub_StrLen
nEndPos
=
aNodeStr
.
Len
();
xub_StrLen
nEndPos
=
aNodeStr
.
getLength
();
if
(
nNode
==
nStartNode
)
if
(
nNode
==
nStartNode
)
nStartPos
=
aSel
.
Min
().
GetIndex
();
nStartPos
=
aSel
.
Min
().
GetIndex
();
if
(
nNode
==
nEndNode
)
// can also be == nStart!
if
(
nNode
==
nEndNode
)
// can also be == nStart!
...
@@ -2827,7 +2827,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
...
@@ -2827,7 +2827,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
GetLanguage
(
EditPaM
(
pNode
,
nCurrentStart
+
1
)
),
GetLanguage
(
EditPaM
(
pNode
,
nCurrentStart
+
1
)
),
nCurrentStart
,
nLen
,
&
aOffsets
));
nCurrentStart
,
nLen
,
&
aOffsets
));
if
(
!
aNodeStr
.
Equals
(
aNewText
,
nCurrentStart
,
nLen
))
if
(
aNodeStr
!=
aNewText
.
copy
(
nCurrentStart
,
nLen
))
{
{
aChgData
.
nStart
=
nCurrentStart
;
aChgData
.
nStart
=
nCurrentStart
;
aChgData
.
nLen
=
nLen
;
aChgData
.
nLen
=
nLen
;
...
@@ -2915,7 +2915,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
...
@@ -2915,7 +2915,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
GetLanguage
(
EditPaM
(
pNode
,
nCurrentStart
+
1
)
),
GetLanguage
(
EditPaM
(
pNode
,
nCurrentStart
+
1
)
),
nCurrentStart
,
nLen
,
&
aOffsets
));
nCurrentStart
,
nLen
,
&
aOffsets
));
if
(
!
aNodeStr
.
Equals
(
aNewText
,
nCurrentStart
,
nLen
))
if
(
aNodeStr
!=
aNewText
.
copy
(
nCurrentStart
,
nLen
))
{
{
aChgData
.
nStart
=
nCurrentStart
;
aChgData
.
nStart
=
nCurrentStart
;
aChgData
.
nLen
=
nLen
;
aChgData
.
nLen
=
nLen
;
...
@@ -2953,7 +2953,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
...
@@ -2953,7 +2953,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
Sequence
<
sal_Int32
>
aOffsets
;
Sequence
<
sal_Int32
>
aOffsets
;
OUString
aNewText
(
aTranslitarationWrapper
.
transliterate
(
aNodeStr
,
nLanguage
,
nCurrentStart
,
nLen
,
&
aOffsets
)
);
OUString
aNewText
(
aTranslitarationWrapper
.
transliterate
(
aNodeStr
,
nLanguage
,
nCurrentStart
,
nLen
,
&
aOffsets
)
);
if
(
!
aNodeStr
.
Equals
(
aNewText
,
nCurrentStart
,
nLen
))
if
(
aNodeStr
!=
aNewText
.
copy
(
nCurrentStart
,
nLen
))
{
{
aChgData
.
nStart
=
nCurrentStart
;
aChgData
.
nStart
=
nCurrentStart
;
aChgData
.
nLen
=
nLen
;
aChgData
.
nLen
=
nLen
;
...
...
editeng/source/items/svxfont.cxx
Dosyayı görüntüle @
5926f48a
...
@@ -164,12 +164,12 @@ class SvxDoCapitals
...
@@ -164,12 +164,12 @@ class SvxDoCapitals
{
{
protected
:
protected
:
OutputDevice
*
pOut
;
OutputDevice
*
pOut
;
const
Xub
String
&
rTxt
;
const
OU
String
&
rTxt
;
const
xub_StrLen
nIdx
;
const
xub_StrLen
nIdx
;
const
xub_StrLen
nLen
;
const
xub_StrLen
nLen
;
public
:
public
:
SvxDoCapitals
(
OutputDevice
*
_pOut
,
const
Xub
String
&
_rTxt
,
SvxDoCapitals
(
OutputDevice
*
_pOut
,
const
OU
String
&
_rTxt
,
const
xub_StrLen
_nIdx
,
const
xub_StrLen
_nLen
)
const
xub_StrLen
_nIdx
,
const
xub_StrLen
_nLen
)
:
pOut
(
_pOut
),
rTxt
(
_rTxt
),
nIdx
(
_nIdx
),
nLen
(
_nLen
)
:
pOut
(
_pOut
),
rTxt
(
_rTxt
),
nIdx
(
_nIdx
),
nLen
(
_nLen
)
{
}
{
}
...
@@ -178,12 +178,12 @@ public:
...
@@ -178,12 +178,12 @@ public:
virtual
void
DoSpace
(
const
sal_Bool
bDraw
);
virtual
void
DoSpace
(
const
sal_Bool
bDraw
);
virtual
void
SetSpace
();
virtual
void
SetSpace
();
virtual
void
Do
(
const
Xub
String
&
rTxt
,
virtual
void
Do
(
const
OU
String
&
rTxt
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
,
const
sal_Bool
bUpper
)
=
0
;
const
sal_Bool
bUpper
)
=
0
;
inline
OutputDevice
*
GetOut
()
{
return
pOut
;
}
inline
OutputDevice
*
GetOut
()
{
return
pOut
;
}
inline
const
Xub
String
&
GetTxt
()
const
{
return
rTxt
;
}
inline
const
OU
String
&
GetTxt
()
const
{
return
rTxt
;
}
xub_StrLen
GetIdx
()
const
{
return
nIdx
;
}
xub_StrLen
GetIdx
()
const
{
return
nIdx
;
}
xub_StrLen
GetLen
()
const
{
return
nLen
;
}
xub_StrLen
GetLen
()
const
{
return
nLen
;
}
};
};
...
@@ -245,10 +245,10 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
...
@@ -245,10 +245,10 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
// #108210#
// #108210#
// If strings differ work preparing the necessary snippet to address that
// If strings differ work preparing the necessary snippet to address that
// potential difference
// potential difference
const
XubString
aSnippet
(
rTxt
,
nIdx
+
nOldPos
,
nPos
-
nOldPos
);
const
OUString
aSnippet
=
rTxt
.
copy
(
nIdx
+
nOldPos
,
nPos
-
nOldPos
);
Xub
String
aNewText
=
CalcCaseMap
(
aSnippet
);
OU
String
aNewText
=
CalcCaseMap
(
aSnippet
);
rDo
.
Do
(
aNewText
,
0
,
aNewText
.
Len
(),
sal_True
);
rDo
.
Do
(
aNewText
,
0
,
aNewText
.
getLength
(),
sal_True
);
}
}
else
else
{
{
...
@@ -275,10 +275,10 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
...
@@ -275,10 +275,10 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
// #108210#
// #108210#
// If strings differ work preparing the necessary snippet to address that
// If strings differ work preparing the necessary snippet to address that
// potential difference
// potential difference
const
XubString
aSnippet
(
rTxt
,
nIdx
+
nOldPos
,
nPos
-
nOldPos
);
const
OUString
aSnippet
=
rTxt
.
copy
(
nIdx
+
nOldPos
,
nPos
-
nOldPos
);
Xub
String
aNewText
=
CalcCaseMap
(
aSnippet
);
OU
String
aNewText
=
CalcCaseMap
(
aSnippet
);
rDo
.
Do
(
aNewText
,
0
,
aNewText
.
Len
(),
sal_False
);
rDo
.
Do
(
aNewText
,
0
,
aNewText
.
getLength
(),
sal_False
);
}
}
else
else
{
{
...
@@ -300,10 +300,10 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
...
@@ -300,10 +300,10 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
// #108210#
// #108210#
// If strings differ work preparing the necessary snippet to address that
// If strings differ work preparing the necessary snippet to address that
// potential difference
// potential difference
const
XubString
aSnippet
(
rTxt
,
nIdx
+
nOldPos
,
nPos
-
nOldPos
);
const
OUString
aSnippet
=
rTxt
.
copy
(
nIdx
+
nOldPos
,
nPos
-
nOldPos
);
Xub
String
aNewText
=
CalcCaseMap
(
aSnippet
);
OU
String
aNewText
=
CalcCaseMap
(
aSnippet
);
rDo
.
Do
(
aNewText
,
0
,
aNewText
.
Len
(),
sal_False
);
rDo
.
Do
(
aNewText
,
0
,
aNewText
.
getLength
(),
sal_False
);
}
}
else
else
{
{
...
@@ -368,9 +368,9 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt,
...
@@ -368,9 +368,9 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt,
{
{
// If strings differ work preparing the necessary snippet to address that
// If strings differ work preparing the necessary snippet to address that
// potential difference
// potential difference
const
XubString
aSnippet
(
rTxt
,
nIdx
,
nLen
);
const
OUString
aSnippet
=
rTxt
.
copy
(
nIdx
,
nLen
);
Xub
String
_aNewText
=
CalcCaseMap
(
aSnippet
);
OU
String
_aNewText
=
CalcCaseMap
(
aSnippet
);
nWidth
=
pOut
->
GetTextWidth
(
_aNewText
,
0
,
_aNewText
.
Len
()
);
nWidth
=
pOut
->
GetTextWidth
(
_aNewText
,
0
,
_aNewText
.
getLength
()
);
}
}
else
else
{
{
...
@@ -590,7 +590,7 @@ protected:
...
@@ -590,7 +590,7 @@ protected:
short
nKern
;
short
nKern
;
public
:
public
:
SvxDoGetCapitalSize
(
SvxFont
*
_pFnt
,
const
OutputDevice
*
_pOut
,
SvxDoGetCapitalSize
(
SvxFont
*
_pFnt
,
const
OutputDevice
*
_pOut
,
const
Xub
String
&
_rTxt
,
const
xub_StrLen
_nIdx
,
const
OU
String
&
_rTxt
,
const
xub_StrLen
_nIdx
,
const
xub_StrLen
_nLen
,
const
short
_nKrn
)
const
xub_StrLen
_nLen
,
const
short
_nKrn
)
:
SvxDoCapitals
(
(
OutputDevice
*
)
_pOut
,
_rTxt
,
_nIdx
,
_nLen
),
:
SvxDoCapitals
(
(
OutputDevice
*
)
_pOut
,
_rTxt
,
_nIdx
,
_nLen
),
pFont
(
_pFnt
),
pFont
(
_pFnt
),
...
@@ -599,13 +599,13 @@ public:
...
@@ -599,13 +599,13 @@ public:
virtual
~
SvxDoGetCapitalSize
()
{}
virtual
~
SvxDoGetCapitalSize
()
{}
virtual
void
Do
(
const
Xub
String
&
rTxt
,
const
xub_StrLen
nIdx
,
virtual
void
Do
(
const
OU
String
&
rTxt
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
,
const
sal_Bool
bUpper
);
const
xub_StrLen
nLen
,
const
sal_Bool
bUpper
);
inline
const
Size
&
GetSize
()
const
{
return
aTxtSize
;
};
inline
const
Size
&
GetSize
()
const
{
return
aTxtSize
;
};
};
};
void
SvxDoGetCapitalSize
::
Do
(
const
Xub
String
&
_rTxt
,
const
xub_StrLen
_nIdx
,
void
SvxDoGetCapitalSize
::
Do
(
const
OU
String
&
_rTxt
,
const
xub_StrLen
_nIdx
,
const
xub_StrLen
_nLen
,
const
sal_Bool
bUpper
)
const
xub_StrLen
_nLen
,
const
sal_Bool
bUpper
)
{
{
Size
aPartSize
;
Size
aPartSize
;
...
@@ -654,7 +654,7 @@ protected:
...
@@ -654,7 +654,7 @@ protected:
Point
aSpacePos
;
Point
aSpacePos
;
short
nKern
;
short
nKern
;
public
:
public
:
SvxDoDrawCapital
(
SvxFont
*
pFnt
,
OutputDevice
*
_pOut
,
const
Xub
String
&
_rTxt
,
SvxDoDrawCapital
(
SvxFont
*
pFnt
,
OutputDevice
*
_pOut
,
const
OU
String
&
_rTxt
,
const
xub_StrLen
_nIdx
,
const
xub_StrLen
_nLen
,
const
xub_StrLen
_nIdx
,
const
xub_StrLen
_nLen
,
const
Point
&
rPos
,
const
short
nKrn
)
const
Point
&
rPos
,
const
short
nKrn
)
:
SvxDoCapitals
(
_pOut
,
_rTxt
,
_nIdx
,
_nLen
),
:
SvxDoCapitals
(
_pOut
,
_rTxt
,
_nIdx
,
_nLen
),
...
@@ -666,7 +666,7 @@ public:
...
@@ -666,7 +666,7 @@ public:
virtual
~
SvxDoDrawCapital
()
{}
virtual
~
SvxDoDrawCapital
()
{}
virtual
void
DoSpace
(
const
sal_Bool
bDraw
);
virtual
void
DoSpace
(
const
sal_Bool
bDraw
);
virtual
void
SetSpace
();
virtual
void
SetSpace
();
virtual
void
Do
(
const
Xub
String
&
rTxt
,
const
xub_StrLen
nIdx
,
virtual
void
Do
(
const
OU
String
&
rTxt
,
const
xub_StrLen
nIdx
,
const
xub_StrLen
nLen
,
const
sal_Bool
bUpper
);
const
xub_StrLen
nLen
,
const
sal_Bool
bUpper
);
};
};
...
@@ -682,8 +682,7 @@ void SvxDoDrawCapital::DoSpace( const sal_Bool bDraw )
...
@@ -682,8 +682,7 @@ void SvxDoDrawCapital::DoSpace( const sal_Bool bDraw )
pFont
->
SetWordLineMode
(
sal_False
);
pFont
->
SetWordLineMode
(
sal_False
);
pFont
->
SetTransparent
(
sal_True
);
pFont
->
SetTransparent
(
sal_True
);
pFont
->
SetPhysFont
(
pOut
);
pFont
->
SetPhysFont
(
pOut
);
pOut
->
DrawStretchText
(
aSpacePos
,
nDiff
,
XubString
(
" "
,
pOut
->
DrawStretchText
(
aSpacePos
,
nDiff
,
" "
,
0
,
2
);
RTL_TEXTENCODING_MS_1252
),
0
,
2
);
pFont
->
SetWordLineMode
(
bWordWise
);
pFont
->
SetWordLineMode
(
bWordWise
);
pFont
->
SetTransparent
(
bTrans
);
pFont
->
SetTransparent
(
bTrans
);
pFont
->
SetPhysFont
(
pOut
);
pFont
->
SetPhysFont
(
pOut
);
...
@@ -697,7 +696,7 @@ void SvxDoDrawCapital::SetSpace()
...
@@ -697,7 +696,7 @@ void SvxDoDrawCapital::SetSpace()
aSpacePos
.
X
()
=
aPos
.
X
();
aSpacePos
.
X
()
=
aPos
.
X
();
}
}
void
SvxDoDrawCapital
::
Do
(
const
Xub
String
&
_rTxt
,
const
xub_StrLen
_nIdx
,
void
SvxDoDrawCapital
::
Do
(
const
OU
String
&
_rTxt
,
const
xub_StrLen
_nIdx
,
const
xub_StrLen
_nLen
,
const
sal_Bool
bUpper
)
const
xub_StrLen
_nLen
,
const
sal_Bool
bUpper
)
{
{
sal_uInt8
nProp
=
0
;
sal_uInt8
nProp
=
0
;
...
...
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