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
c3f55ac3
Kaydet (Commit)
c3f55ac3
authored
Haz 01, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
switch to size_t in sfx2::LinkManager
Change-Id: I7558ead872ab0e6894689f78fcfbbd1d8fb69877
üst
cc50d674
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
linkmgr.hxx
include/sfx2/linkmgr.hxx
+1
-1
linkmgr2.cxx
sfx2/source/appl/linkmgr2.cxx
+14
-15
No files found.
include/sfx2/linkmgr.hxx
Dosyayı görüntüle @
c3f55ac3
...
@@ -90,7 +90,7 @@ public:
...
@@ -90,7 +90,7 @@ public:
void
SetPersist
(
SfxObjectShell
*
p
)
{
pPersist
=
p
;
}
void
SetPersist
(
SfxObjectShell
*
p
)
{
pPersist
=
p
;
}
void
Remove
(
SvBaseLink
*
pLink
);
void
Remove
(
SvBaseLink
*
pLink
);
void
Remove
(
s
al_uInt16
nPos
,
sal_uInt16
nCnt
=
1
);
void
Remove
(
s
ize_t
nPos
,
size_t
nCnt
=
1
);
sal_Bool
Insert
(
SvBaseLink
*
pLink
);
sal_Bool
Insert
(
SvBaseLink
*
pLink
);
// the links connect to a SvLinkSource and adds to the list
// the links connect to a SvLinkSource and adds to the list
...
...
sfx2/source/appl/linkmgr2.cxx
Dosyayı görüntüle @
c3f55ac3
...
@@ -70,7 +70,7 @@ LinkManager::LinkManager(SfxObjectShell* p)
...
@@ -70,7 +70,7 @@ LinkManager::LinkManager(SfxObjectShell* p)
LinkManager
::~
LinkManager
()
LinkManager
::~
LinkManager
()
{
{
for
(
s
al_uInt16
n
=
0
;
n
<
aLinkTbl
.
size
();
++
n
)
for
(
s
ize_t
n
=
0
;
n
<
aLinkTbl
.
size
();
++
n
)
{
{
SvBaseLinkRef
*
pTmp
=
aLinkTbl
[
n
];
SvBaseLinkRef
*
pTmp
=
aLinkTbl
[
n
];
if
(
pTmp
->
Is
()
)
if
(
pTmp
->
Is
()
)
...
@@ -107,7 +107,7 @@ void LinkManager::Remove( SvBaseLink *pLink )
...
@@ -107,7 +107,7 @@ void LinkManager::Remove( SvBaseLink *pLink )
{
{
// No duplicate links inserted
// No duplicate links inserted
int
bFound
=
sal_False
;
int
bFound
=
sal_False
;
for
(
s
al_uInt16
n
=
0
;
n
<
aLinkTbl
.
size
();
)
for
(
s
ize_t
n
=
0
;
n
<
aLinkTbl
.
size
();
)
{
{
SvBaseLinkRef
*
pTmp
=
aLinkTbl
[
n
];
SvBaseLinkRef
*
pTmp
=
aLinkTbl
[
n
];
if
(
pLink
==
*
pTmp
)
if
(
pLink
==
*
pTmp
)
...
@@ -132,14 +132,14 @@ void LinkManager::Remove( SvBaseLink *pLink )
...
@@ -132,14 +132,14 @@ void LinkManager::Remove( SvBaseLink *pLink )
}
}
void
LinkManager
::
Remove
(
s
al_uInt16
nPos
,
sal_uInt16
nCnt
)
void
LinkManager
::
Remove
(
s
ize_t
nPos
,
size_t
nCnt
)
{
{
if
(
nCnt
&&
nPos
<
aLinkTbl
.
size
()
)
if
(
nCnt
&&
nPos
<
aLinkTbl
.
size
()
)
{
{
if
(
sal
::
static_int_cast
<
size_t
>
(
nPos
+
nCnt
)
>
aLinkTbl
.
size
())
if
(
sal
::
static_int_cast
<
size_t
>
(
nPos
+
nCnt
)
>
aLinkTbl
.
size
())
nCnt
=
aLinkTbl
.
size
()
-
nPos
;
nCnt
=
aLinkTbl
.
size
()
-
nPos
;
for
(
s
al_uInt16
n
=
nPos
;
n
<
nPos
+
nCnt
;
++
n
)
for
(
s
ize_t
n
=
nPos
;
n
<
nPos
+
nCnt
;
++
n
)
{
{
SvBaseLinkRef
*
pTmp
=
aLinkTbl
[
n
];
SvBaseLinkRef
*
pTmp
=
aLinkTbl
[
n
];
if
(
pTmp
->
Is
()
)
if
(
pTmp
->
Is
()
)
...
@@ -156,7 +156,7 @@ void LinkManager::Remove( sal_uInt16 nPos, sal_uInt16 nCnt )
...
@@ -156,7 +156,7 @@ void LinkManager::Remove( sal_uInt16 nPos, sal_uInt16 nCnt )
sal_Bool
LinkManager
::
Insert
(
SvBaseLink
*
pLink
)
sal_Bool
LinkManager
::
Insert
(
SvBaseLink
*
pLink
)
{
{
for
(
s
al_uInt16
n
=
0
;
n
<
aLinkTbl
.
size
();
++
n
)
for
(
s
ize_t
n
=
0
;
n
<
aLinkTbl
.
size
();
++
n
)
{
{
SvBaseLinkRef
*
pTmp
=
aLinkTbl
[
n
];
SvBaseLinkRef
*
pTmp
=
aLinkTbl
[
n
];
if
(
!
pTmp
->
Is
()
)
if
(
!
pTmp
->
Is
()
)
...
@@ -308,8 +308,7 @@ void LinkManager::UpdateAllLinks(
...
@@ -308,8 +308,7 @@ void LinkManager::UpdateAllLinks(
// First make a copy of the array in order to update links
// First make a copy of the array in order to update links
// links in ... no contact between them!
// links in ... no contact between them!
std
::
vector
<
SvBaseLink
*>
aTmpArr
;
std
::
vector
<
SvBaseLink
*>
aTmpArr
;
sal_uInt16
n
;
for
(
size_t
n
=
0
;
n
<
aLinkTbl
.
size
();
++
n
)
for
(
n
=
0
;
n
<
aLinkTbl
.
size
();
++
n
)
{
{
SvBaseLink
*
pLink
=
*
aLinkTbl
[
n
];
SvBaseLink
*
pLink
=
*
aLinkTbl
[
n
];
if
(
!
pLink
)
if
(
!
pLink
)
...
@@ -320,20 +319,20 @@ void LinkManager::UpdateAllLinks(
...
@@ -320,20 +319,20 @@ void LinkManager::UpdateAllLinks(
aTmpArr
.
push_back
(
pLink
);
aTmpArr
.
push_back
(
pLink
);
}
}
for
(
n
=
0
;
n
<
aTmpArr
.
size
();
++
n
)
for
(
size_t
n
=
0
;
n
<
aTmpArr
.
size
();
++
n
)
{
{
SvBaseLink
*
pLink
=
aTmpArr
[
n
];
SvBaseLink
*
pLink
=
aTmpArr
[
n
];
// search first in the array after the entry
// search first in the array after the entry
sal_uInt16
nFndPos
=
USHRT_MAX
;
bool
bFound
=
false
;
for
(
s
al_uInt16
i
=
0
;
i
<
aLinkTbl
.
size
();
++
i
)
for
(
s
ize_t
i
=
0
;
i
<
aLinkTbl
.
size
();
++
i
)
if
(
pLink
==
*
aLinkTbl
[
i
]
)
if
(
pLink
==
*
aLinkTbl
[
i
]
)
{
{
nFndPos
=
i
;
bFound
=
true
;
break
;
break
;
}
}
if
(
USHRT_MAX
==
nFndPos
)
if
(
!
bFound
)
continue
;
// was not available!
continue
;
// was not available!
// Graphic-Links not to update yet
// Graphic-Links not to update yet
...
@@ -421,9 +420,9 @@ void LinkManager::ReconnectDdeLink(SfxObjectShell& rServer)
...
@@ -421,9 +420,9 @@ void LinkManager::ReconnectDdeLink(SfxObjectShell& rServer)
return
;
return
;
const
::
sfx2
::
SvBaseLinks
&
rLinks
=
GetLinks
();
const
::
sfx2
::
SvBaseLinks
&
rLinks
=
GetLinks
();
s
al_uInt16
n
=
rLinks
.
size
();
s
ize_t
n
=
rLinks
.
size
();
for
(
s
al_uInt16
i
=
0
;
i
<
n
;
++
i
)
for
(
s
ize_t
i
=
0
;
i
<
n
;
++
i
)
{
{
::
sfx2
::
SvBaseLink
*
p
=
*
rLinks
[
i
];
::
sfx2
::
SvBaseLink
*
p
=
*
rLinks
[
i
];
String
aType
,
aFile
,
aLink
,
aFilter
;
String
aType
,
aFile
,
aLink
,
aFilter
;
...
@@ -515,7 +514,7 @@ void LinkManager::CancelTransfers()
...
@@ -515,7 +514,7 @@ void LinkManager::CancelTransfers()
sfx2
::
SvBaseLink
*
pLnk
;
sfx2
::
SvBaseLink
*
pLnk
;
const
sfx2
::
SvBaseLinks
&
rLnks
=
GetLinks
();
const
sfx2
::
SvBaseLinks
&
rLnks
=
GetLinks
();
for
(
s
al_uInt16
n
=
rLnks
.
size
();
n
;
)
for
(
s
ize_t
n
=
rLnks
.
size
();
n
;
)
if
(
0
!=
(
pLnk
=
&
(
*
rLnks
[
--
n
]))
&&
if
(
0
!=
(
pLnk
=
&
(
*
rLnks
[
--
n
]))
&&
OBJECT_CLIENT_FILE
==
(
OBJECT_CLIENT_FILE
&
pLnk
->
GetObjType
())
&&
OBJECT_CLIENT_FILE
==
(
OBJECT_CLIENT_FILE
&
pLnk
->
GetObjType
())
&&
0
!=
(
pFileObj
=
(
SvFileObject
*
)
pLnk
->
GetObj
()
)
)
0
!=
(
pFileObj
=
(
SvFileObject
*
)
pLnk
->
GetObj
()
)
)
...
...
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