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
d162d055
Kaydet (Commit)
d162d055
authored
Şub 02, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1266460 Argument cannot be negative
Change-Id: I715b27b507926e2670cc094d4ebaa429e502232c
üst
d67a370f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
roadmapwizard.cxx
svtools/source/dialogs/roadmapwizard.cxx
+7
-3
No files found.
svtools/source/dialogs/roadmapwizard.cxx
Dosyayı görüntüle @
d162d055
...
@@ -272,6 +272,8 @@ namespace svt
...
@@ -272,6 +272,8 @@ namespace svt
const
WizardPath
&
rActivePath
(
m_pImpl
->
aPaths
[
m_pImpl
->
nActivePath
]
);
const
WizardPath
&
rActivePath
(
m_pImpl
->
aPaths
[
m_pImpl
->
nActivePath
]
);
sal_Int32
nCurrentStatePathIndex
=
m_pImpl
->
getStateIndexInPath
(
getCurrentState
(),
rActivePath
);
sal_Int32
nCurrentStatePathIndex
=
m_pImpl
->
getStateIndexInPath
(
getCurrentState
(),
rActivePath
);
if
(
nCurrentStatePathIndex
<
0
)
return
;
// determine up to which index (in the new path) we have to display the items
// determine up to which index (in the new path) we have to display the items
RoadmapTypes
::
ItemIndex
nUpperStepBoundary
=
(
RoadmapTypes
::
ItemIndex
)
rActivePath
.
size
();
RoadmapTypes
::
ItemIndex
nUpperStepBoundary
=
(
RoadmapTypes
::
ItemIndex
)
rActivePath
.
size
();
...
@@ -332,7 +334,7 @@ namespace svt
...
@@ -332,7 +334,7 @@ namespace svt
// there is an item with this index in the roadmap - does it match what is requested by
// there is an item with this index in the roadmap - does it match what is requested by
// the respective state in the active path?
// the respective state in the active path?
RoadmapTypes
::
ItemId
nPresentItemId
=
m_pImpl
->
pRoadmap
->
GetItemID
(
nItemIndex
);
RoadmapTypes
::
ItemId
nPresentItemId
=
m_pImpl
->
pRoadmap
->
GetItemID
(
nItemIndex
);
WizardState
nRequiredState
=
rActivePath
.
at
(
nItemIndex
)
;
WizardState
nRequiredState
=
rActivePath
[
nItemIndex
]
;
if
(
nPresentItemId
!=
nRequiredState
)
if
(
nPresentItemId
!=
nRequiredState
)
{
{
m_pImpl
->
pRoadmap
->
DeleteRoadmapItem
(
nItemIndex
);
m_pImpl
->
pRoadmap
->
DeleteRoadmapItem
(
nItemIndex
);
...
@@ -346,7 +348,7 @@ namespace svt
...
@@ -346,7 +348,7 @@ namespace svt
bInsertItem
=
bNeedItem
;
bInsertItem
=
bNeedItem
;
}
}
WizardState
nState
(
rActivePath
.
at
(
nItemIndex
)
);
WizardState
nState
(
rActivePath
[
nItemIndex
]
);
if
(
bInsertItem
)
if
(
bInsertItem
)
{
{
m_pImpl
->
pRoadmap
->
InsertRoadmapItem
(
m_pImpl
->
pRoadmap
->
InsertRoadmapItem
(
...
@@ -595,6 +597,8 @@ namespace svt
...
@@ -595,6 +597,8 @@ namespace svt
sal_Int32
nCurrentStatePathIndex
=
-
1
;
sal_Int32
nCurrentStatePathIndex
=
-
1
;
if
(
m_pImpl
->
nActivePath
!=
-
1
)
if
(
m_pImpl
->
nActivePath
!=
-
1
)
nCurrentStatePathIndex
=
m_pImpl
->
getStateIndexInPath
(
getCurrentState
(),
m_pImpl
->
nActivePath
);
nCurrentStatePathIndex
=
m_pImpl
->
getStateIndexInPath
(
getCurrentState
(),
m_pImpl
->
nActivePath
);
if
(
nCurrentStatePathIndex
<
0
)
return
;
for
(
RoadmapTypes
::
ItemIndex
nItemIndex
=
nCurrentStatePathIndex
;
nItemIndex
<
nLoopUntil
;
++
nItemIndex
)
for
(
RoadmapTypes
::
ItemIndex
nItemIndex
=
nCurrentStatePathIndex
;
nItemIndex
<
nLoopUntil
;
++
nItemIndex
)
{
{
bool
bExistentItem
=
(
nItemIndex
<
m_pImpl
->
pRoadmap
->
GetItemCount
()
);
bool
bExistentItem
=
(
nItemIndex
<
m_pImpl
->
pRoadmap
->
GetItemCount
()
);
...
@@ -603,7 +607,7 @@ namespace svt
...
@@ -603,7 +607,7 @@ namespace svt
// there is an item with this index in the roadmap - does it match what is requested by
// there is an item with this index in the roadmap - does it match what is requested by
// the respective state in the active path?
// the respective state in the active path?
RoadmapTypes
::
ItemId
nPresentItemId
=
m_pImpl
->
pRoadmap
->
GetItemID
(
nItemIndex
);
RoadmapTypes
::
ItemId
nPresentItemId
=
m_pImpl
->
pRoadmap
->
GetItemID
(
nItemIndex
);
WizardState
nRequiredState
=
rActivePath
.
at
(
nItemIndex
)
;
WizardState
nRequiredState
=
rActivePath
[
nItemIndex
]
;
if
(
_nState
==
nRequiredState
)
if
(
_nState
==
nRequiredState
)
{
{
m_pImpl
->
pRoadmap
->
ChangeRoadmapItemLabel
(
nPresentItemId
,
getStateDisplayName
(
nRequiredState
)
);
m_pImpl
->
pRoadmap
->
ChangeRoadmapItemLabel
(
nPresentItemId
,
getStateDisplayName
(
nRequiredState
)
);
...
...
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