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
3f4e7729
Kaydet (Commit)
3f4e7729
authored
Mar 11, 2014
tarafından
Jan Holesovsky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Return early, and kill 1 indentation level by that.
Change-Id: Ia67669e45b78c5fe5059f76b940e85a02781c4c2
üst
cfedbdea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
49 deletions
+46
-49
galtheme.cxx
svx/source/gallery2/galtheme.cxx
+46
-49
No files found.
svx/source/gallery2/galtheme.cxx
Dosyayı görüntüle @
3f4e7729
...
...
@@ -359,50 +359,48 @@ void GalleryTheme::UnlockBroadcaster( sal_uIntPtr nUpdatePos )
bool
GalleryTheme
::
InsertObject
(
const
SgaObject
&
rObj
,
sal_uIntPtr
nInsertPos
)
{
sal_Bool
bRet
=
sal_False
;
if
(
!
rObj
.
IsValid
())
return
false
;
if
(
rObj
.
IsValid
()
)
GalleryObject
*
pFoundEntry
=
NULL
;
size_t
iFoundPos
=
0
;
for
(
size_t
n
=
aObjectList
.
size
();
iFoundPos
<
n
;
++
iFoundPos
)
{
GalleryObject
*
pFoundEntry
=
NULL
;
size_t
iFoundPos
=
0
;
for
(
size_t
n
=
aObjectList
.
size
();
iFoundPos
<
n
;
++
iFoundPos
)
if
(
aObjectList
[
iFoundPos
]
->
aURL
==
rObj
.
GetURL
())
{
if
(
aObjectList
[
iFoundPos
]
->
aURL
==
rObj
.
GetURL
()
)
{
pFoundEntry
=
aObjectList
[
iFoundPos
];
break
;
}
pFoundEntry
=
aObjectList
[
iFoundPos
];
break
;
}
}
if
(
pFoundEntry
)
{
GalleryObject
aNewEntry
;
if
(
pFoundEntry
)
// update title of new object if necessary
if
(
rObj
.
GetTitle
().
isEmpty
())
{
GalleryObject
aNewEntry
;
SgaObject
*
pOldObj
=
ImplReadSgaObject
(
pFoundEntry
)
;
// update title of new object if necessary
if
(
rObj
.
GetTitle
().
isEmpty
()
)
if
(
pOldObj
)
{
SgaObject
*
pOldObj
=
ImplReadSgaObject
(
pFoundEntry
);
if
(
pOldObj
)
{
(
(
SgaObject
&
)
rObj
).
SetTitle
(
pOldObj
->
GetTitle
()
);
delete
pOldObj
;
}
((
SgaObject
&
)
rObj
).
SetTitle
(
pOldObj
->
GetTitle
()
);
delete
pOldObj
;
}
else
if
(
rObj
.
GetTitle
()
==
"__<empty>__"
)
(
(
SgaObject
&
)
rObj
).
SetTitle
(
""
);
ImplWriteSgaObject
(
rObj
,
nInsertPos
,
&
aNewEntry
);
pFoundEntry
->
nOffset
=
aNewEntry
.
nOffset
;
}
else
ImplWriteSgaObject
(
rObj
,
nInsertPos
,
NULL
);
else
if
(
rObj
.
GetTitle
()
==
"__<empty>__"
)
((
SgaObject
&
)
rObj
).
SetTitle
(
""
);
Impl
SetModified
(
(
bRet
=
sal_True
)
);
ImplBroadcast
(
pFoundEntry
?
iFoundPos
:
nInsertPos
)
;
Impl
WriteSgaObject
(
rObj
,
nInsertPos
,
&
aNewEntry
);
pFoundEntry
->
nOffset
=
aNewEntry
.
nOffset
;
}
else
ImplWriteSgaObject
(
rObj
,
nInsertPos
,
NULL
);
return
bRet
;
ImplSetModified
(
true
);
ImplBroadcast
(
pFoundEntry
?
iFoundPos
:
nInsertPos
);
return
true
;
}
SgaObject
*
GalleryTheme
::
AcquireObject
(
size_t
nPos
)
...
...
@@ -481,29 +479,26 @@ bool GalleryTheme::RemoveObject( size_t nPos )
bool
GalleryTheme
::
ChangeObjectPos
(
size_t
nOldPos
,
size_t
nNewPos
)
{
sal_Bool
bRet
=
sal_False
;
if
(
nOldPos
==
nNewPos
||
nOldPos
>=
aObjectList
.
size
())
return
false
;
if
(
nOldPos
!=
nNewPos
&&
nOldPos
<
aObjectList
.
size
()
)
{
GalleryObject
*
pEntry
=
aObjectList
[
nOldPos
];
GalleryObject
*
pEntry
=
aObjectList
[
nOldPos
];
GalleryObjectList
::
iterator
it
=
aObjectList
.
begin
();
::
std
::
advance
(
it
,
nNewPos
);
aObjectList
.
insert
(
it
,
pEntry
);
GalleryObjectList
::
iterator
it
=
aObjectList
.
begin
();
::
std
::
advance
(
it
,
nNewPos
);
aObjectList
.
insert
(
it
,
pEntry
);
if
(
nNewPos
<
nOldPos
)
nOldPos
++
;
if
(
nNewPos
<
nOldPos
)
nOldPos
++
;
it
=
aObjectList
.
begin
();
::
std
::
advance
(
it
,
nOldPos
);
aObjectList
.
erase
(
it
);
it
=
aObjectList
.
begin
();
::
std
::
advance
(
it
,
nOldPos
);
aObjectList
.
erase
(
it
);
ImplSetModified
(
(
bRet
=
sal_True
)
);
ImplBroadcast
(
(
nNewPos
<
nOldPos
)
?
nNewPos
:
(
nNewPos
-
1
)
);
}
ImplSetModified
(
true
);
ImplBroadcast
((
nNewPos
<
nOldPos
)
?
nNewPos
:
(
nNewPos
-
1
));
return
bRet
;
return
true
;
}
void
GalleryTheme
::
Actualize
(
const
Link
&
rActualizeLink
,
GalleryProgress
*
pProgress
)
...
...
@@ -1525,7 +1520,9 @@ SvStream& ReadGalleryTheme( SvStream& rIn, GalleryTheme& rTheme )
}
void
GalleryTheme
::
ImplSetModified
(
bool
bModified
)
{
pThm
->
SetModified
(
bModified
);
}
{
pThm
->
SetModified
(
bModified
);
}
const
OUString
&
GalleryTheme
::
GetRealName
()
const
{
return
pThm
->
GetThemeName
();
}
const
INetURLObject
&
GalleryTheme
::
GetThmURL
()
const
{
return
pThm
->
GetThmURL
();
}
...
...
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