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
f482c9fd
Kaydet (Commit)
f482c9fd
authored
Agu 15, 2012
tarafından
Noel Grandin
Kaydeden (comit)
Michael Stahl
Agu 16, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Convert local variable from Container to std::vector and std::set
Change-Id: I0b15939e1d04a3a2a5f8a4e2df8f0826903a8811
üst
f23f1418
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
svdotxat.cxx
svx/source/svdraw/svdotxat.cxx
+14
-18
No files found.
svx/source/svdraw/svdotxat.cxx
Dosyayı görüntüle @
f482c9fd
...
@@ -231,7 +231,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
...
@@ -231,7 +231,7 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
SfxStyleSheetBasePool
*
pStylePool
=
pModel
!=
NULL
?
pModel
->
GetStyleSheetPool
()
:
NULL
;
SfxStyleSheetBasePool
*
pStylePool
=
pModel
!=
NULL
?
pModel
->
GetStyleSheetPool
()
:
NULL
;
if
(
pStylePool
!=
NULL
)
if
(
pStylePool
!=
NULL
)
{
{
Container
aStyles
(
1024
,
64
,
64
)
;
std
::
vector
<
XubString
*>
aStyleNames
;
OutlinerParaObject
*
pOutlinerParaObject
=
GetOutlinerParaObject
();
OutlinerParaObject
*
pOutlinerParaObject
=
GetOutlinerParaObject
();
if
(
pOutlinerParaObject
!=
NULL
)
if
(
pOutlinerParaObject
!=
NULL
)
{
{
...
@@ -256,28 +256,28 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
...
@@ -256,28 +256,28 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
aStyleName
+=
aFam
;
aStyleName
+=
aFam
;
sal_Bool
bFnd
(
sal_False
);
sal_Bool
bFnd
(
sal_False
);
sal_uInt32
nNum
(
aStyle
s
.
Count
());
sal_uInt32
nNum
(
aStyle
Names
.
size
());
while
(
!
bFnd
&&
nNum
>
0
)
while
(
!
bFnd
&&
nNum
>
0
)
{
{
// we don't want duplicate stylesheets
// we don't want duplicate stylesheets
nNum
--
;
nNum
--
;
bFnd
=
(
aStyleName
.
Equals
(
*
(
XubString
*
)
aStyles
.
GetObject
(
nNum
))
);
bFnd
=
aStyleName
.
Equals
(
*
aStyleNames
[
nNum
]
);
}
}
if
(
!
bFnd
)
if
(
!
bFnd
)
{
{
aStyle
s
.
Insert
(
new
XubString
(
aStyleName
),
CONTAINER_APPEND
);
aStyle
Names
.
push_back
(
new
XubString
(
aStyleName
)
);
}
}
}
}
}
}
}
}
// now
replace the strings in the container by
StyleSheet*
// now
convert the strings in the vector from names to
StyleSheet*
s
al_uIntPtr
nNum
=
aStyles
.
Count
()
;
s
td
::
set
<
SfxStyleSheet
*>
aStyleSheets
;
while
(
nNum
>
0
)
{
while
(
!
aStyleNames
.
empty
()
)
{
nNum
--
;
XubString
*
pName
=
aStyleNames
.
back
()
;
XubString
*
pName
=
(
XubString
*
)
aStyles
.
GetObject
(
nNum
);
aStyleNames
.
pop_back
(
);
String
aFam
=
pName
->
Copy
(
0
,
pName
->
Len
()
-
6
);
String
aFam
=
pName
->
Copy
(
0
,
pName
->
Len
()
-
6
);
...
@@ -291,28 +291,24 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
...
@@ -291,28 +291,24 @@ void SdrTextObj::ImpSetTextStyleSheetListeners()
SfxStyleSheet
*
pStyle
=
PTR_CAST
(
SfxStyleSheet
,
pStyleBase
);
SfxStyleSheet
*
pStyle
=
PTR_CAST
(
SfxStyleSheet
,
pStyleBase
);
delete
pName
;
delete
pName
;
if
(
pStyle
!=
NULL
&&
pStyle
!=
GetStyleSheet
())
{
if
(
pStyle
!=
NULL
&&
pStyle
!=
GetStyleSheet
())
{
aStyles
.
Replace
(
pStyle
,
nNum
);
aStyleSheets
.
insert
(
pStyle
);
}
else
{
aStyles
.
Remove
(
nNum
);
}
}
}
}
// now remove all superfluous stylesheets
// now remove all superfluous stylesheets
nNum
=
GetBroadcasterCount
();
sal_uIntPtr
nNum
=
GetBroadcasterCount
();
while
(
nNum
>
0
)
{
while
(
nNum
>
0
)
{
nNum
--
;
nNum
--
;
SfxBroadcaster
*
pBroadcast
=
GetBroadcasterJOE
((
sal_uInt16
)
nNum
);
SfxBroadcaster
*
pBroadcast
=
GetBroadcasterJOE
((
sal_uInt16
)
nNum
);
SfxStyleSheet
*
pStyle
=
PTR_CAST
(
SfxStyleSheet
,
pBroadcast
);
SfxStyleSheet
*
pStyle
=
PTR_CAST
(
SfxStyleSheet
,
pBroadcast
);
if
(
pStyle
!=
NULL
&&
pStyle
!=
GetStyleSheet
())
{
// special case for stylesheet of the object
if
(
pStyle
!=
NULL
&&
pStyle
!=
GetStyleSheet
())
{
// special case for stylesheet of the object
if
(
aStyle
s
.
GetPos
(
pStyle
)
==
CONTAINER_ENTRY_NOTFOUND
)
{
if
(
aStyle
Sheets
.
find
(
pStyle
)
==
aStyleSheets
.
end
()
)
{
EndListening
(
*
pStyle
);
EndListening
(
*
pStyle
);
}
}
}
}
}
}
// and finally, merge all stylesheets that are contained in aStyles with previous broadcasters
// and finally, merge all stylesheets that are contained in aStyles with previous broadcasters
nNum
=
aStyles
.
Count
();
for
(
std
::
set
<
SfxStyleSheet
*>::
const_iterator
it
=
aStyleSheets
.
begin
();
it
!=
aStyleSheets
.
end
();
++
it
)
{
while
(
nNum
>
0
)
{
SfxStyleSheet
*
pStyle
=*
it
;
nNum
--
;
SfxStyleSheet
*
pStyle
=
(
SfxStyleSheet
*
)
aStyles
.
GetObject
(
nNum
);
// let StartListening see for itself if there's already a listener registered
// let StartListening see for itself if there's already a listener registered
StartListening
(
*
pStyle
,
sal_True
);
StartListening
(
*
pStyle
,
sal_True
);
}
}
...
...
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