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
db0cb392
Kaydet (Commit)
db0cb392
authored
Eki 14, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:mergeclasses merge SwTextAttrIterator with SwLanguageIterator
Change-Id: Iaa9184f6145625c897fa5b919e9bf0c898b41102
üst
94ea3a18
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
32 deletions
+25
-32
mergeclasses.results
compilerplugins/clang/mergeclasses.results
+0
-1
txatritr.hxx
sw/inc/txatritr.hxx
+15
-25
txatritr.cxx
sw/source/core/txtnode/txatritr.cxx
+10
-6
No files found.
compilerplugins/clang/mergeclasses.results
Dosyayı görüntüle @
db0cb392
...
@@ -157,7 +157,6 @@ merge SwNumberTreeNode with SwNodeNum
...
@@ -157,7 +157,6 @@ merge SwNumberTreeNode with SwNodeNum
merge SwSelPaintRects with SwShellCursor
merge SwSelPaintRects with SwShellCursor
merge SwSidebarItem with SwAnnotationItem
merge SwSidebarItem with SwAnnotationItem
merge SwTextAdjuster with SwTextCursor
merge SwTextAdjuster with SwTextCursor
merge SwTextAttrIterator with SwLanguageIterator
merge SwUnoCursor with SwUnoTableCursor
merge SwUnoCursor with SwUnoTableCursor
merge SwXParaFrameEnumeration with SwXParaFrameEnumerationImpl
merge SwXParaFrameEnumeration with SwXParaFrameEnumerationImpl
merge SwXParagraphEnumeration with SwXParagraphEnumerationImpl
merge SwXParagraphEnumeration with SwXParagraphEnumerationImpl
...
...
sw/inc/txatritr.hxx
Dosyayı görüntüle @
db0cb392
...
@@ -48,38 +48,28 @@ public:
...
@@ -48,38 +48,28 @@ public:
const
OUString
&
GetText
()
const
{
return
m_rText
;
}
const
OUString
&
GetText
()
const
{
return
m_rText
;
}
};
};
class
Sw
TextAttr
Iterator
class
Sw
Language
Iterator
{
{
SwScriptIterator
aSIter
;
SwScriptIterator
aSIter
;
std
::
deque
<
const
SwTextAttr
*>
aStack
;
std
::
deque
<
const
SwTextAttr
*>
const
SwTextNode
&
rTextNd
;
aStack
;
const
SfxPoolItem
*
pParaItem
,
*
pCurItem
;
const
SwTextNode
&
rTextNd
;
size_t
nAttrPos
;
const
SfxPoolItem
*
pParaItem
;
sal_Int32
nChgPos
;
const
SfxPoolItem
*
pCurItem
;
sal_uInt16
nWhichId
;
size_t
nAttrPos
;
sal_Int32
nChgPos
;
sal_uInt16
nWhichId
;
void
AddToStack
(
const
SwTextAttr
&
rAttr
);
void
AddToStack
(
const
SwTextAttr
&
rAttr
);
void
SearchNextChg
();
void
SearchNextChg
();
public
:
public
:
SwTextAttrIterator
(
const
SwTextNode
&
rTextNd
,
sal_uInt16
nWhichId
,
SwLanguageIterator
(
const
SwTextNode
&
rTextNd
,
sal_Int32
nStart
);
sal_Int32
nStart
);
bool
Next
();
bool
Next
();
sal_Int32
GetChgPos
()
const
{
return
nChgPos
;
}
const
SfxPoolItem
&
GetAttr
()
const
{
return
*
pCurItem
;
}
sal_uInt16
GetLanguage
()
const
sal_Int32
GetChgPos
()
const
{
return
nChgPos
;
}
{
return
static_cast
<
const
SvxLanguageItem
&>
(
*
pCurItem
).
GetValue
();
}
};
class
SwLanguageIterator
:
public
SwTextAttrIterator
{
public
:
SwLanguageIterator
(
const
SwTextNode
&
rTextNode
,
sal_Int32
nStart
)
:
SwTextAttrIterator
(
rTextNode
,
RES_CHRATR_LANGUAGE
,
nStart
)
{}
sal_uInt16
GetLanguage
()
const
{
return
static_cast
<
const
SvxLanguageItem
&>
(
GetAttr
()).
GetValue
();
}
};
};
#endif
#endif
...
...
sw/source/core/txtnode/txatritr.cxx
Dosyayı görüntüle @
db0cb392
...
@@ -93,15 +93,19 @@ bool SwScriptIterator::Next()
...
@@ -93,15 +93,19 @@ bool SwScriptIterator::Next()
return
bRet
;
return
bRet
;
}
}
Sw
TextAttrIterator
::
SwTextAttrIterator
(
const
SwTextNode
&
rTNd
,
sal_uInt16
nWhchI
d
,
Sw
LanguageIterator
::
SwLanguageIterator
(
const
SwTextNode
&
rTN
d
,
sal_Int32
nStt
)
sal_Int32
nStt
)
:
aSIter
(
rTNd
.
GetText
(),
nStt
),
rTextNd
(
rTNd
),
:
aSIter
(
rTNd
.
GetText
(),
nStt
),
pParaItem
(
nullptr
),
nAttrPos
(
0
),
nChgPos
(
nStt
),
nWhichId
(
nWhchId
)
rTextNd
(
rTNd
),
pParaItem
(
nullptr
),
nAttrPos
(
0
),
nChgPos
(
nStt
),
nWhichId
(
RES_CHRATR_LANGUAGE
)
{
{
SearchNextChg
();
SearchNextChg
();
}
}
bool
Sw
TextAttr
Iterator
::
Next
()
bool
Sw
Language
Iterator
::
Next
()
{
{
bool
bRet
=
false
;
bool
bRet
=
false
;
if
(
nChgPos
<
aSIter
.
GetText
().
getLength
())
if
(
nChgPos
<
aSIter
.
GetText
().
getLength
())
...
@@ -150,7 +154,7 @@ bool SwTextAttrIterator::Next()
...
@@ -150,7 +154,7 @@ bool SwTextAttrIterator::Next()
return
bRet
;
return
bRet
;
}
}
void
Sw
TextAttr
Iterator
::
AddToStack
(
const
SwTextAttr
&
rAttr
)
void
Sw
Language
Iterator
::
AddToStack
(
const
SwTextAttr
&
rAttr
)
{
{
size_t
nIns
=
0
;
size_t
nIns
=
0
;
const
sal_Int32
nEndPos
=
*
rAttr
.
End
();
const
sal_Int32
nEndPos
=
*
rAttr
.
End
();
...
@@ -161,7 +165,7 @@ void SwTextAttrIterator::AddToStack( const SwTextAttr& rAttr )
...
@@ -161,7 +165,7 @@ void SwTextAttrIterator::AddToStack( const SwTextAttr& rAttr )
aStack
.
insert
(
aStack
.
begin
()
+
nIns
,
&
rAttr
);
aStack
.
insert
(
aStack
.
begin
()
+
nIns
,
&
rAttr
);
}
}
void
Sw
TextAttr
Iterator
::
SearchNextChg
()
void
Sw
Language
Iterator
::
SearchNextChg
()
{
{
sal_uInt16
nWh
=
0
;
sal_uInt16
nWh
=
0
;
if
(
nChgPos
==
aSIter
.
GetScriptChgPos
()
)
if
(
nChgPos
==
aSIter
.
GetScriptChgPos
()
)
...
...
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