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
694afdba
Kaydet (Commit)
694afdba
authored
Haz 27, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SfxProgress::SetState always returns true
Change-Id: Ib606b0391f814ea9ff4383397a40a8a692563fa3
üst
bf64e7d6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
16 additions
and
57 deletions
+16
-57
progress.hxx
include/sfx2/progress.hxx
+2
-2
globstr.hrc
sc/inc/globstr.hrc
+0
-1
progress.hxx
sc/inc/progress.hxx
+8
-20
documen7.cxx
sc/source/core/data/documen7.cxx
+0
-2
progress.cxx
sc/source/core/tool/progress.cxx
+0
-3
dbdocimp.cxx
sc/source/ui/docshell/dbdocimp.cxx
+1
-6
docsh8.cxx
sc/source/ui/docshell/docsh8.cxx
+1
-5
globstr.src
sc/source/ui/src/globstr.src
+0
-4
progress.cxx
sfx2/source/bastyp/progress.cxx
+4
-14
No files found.
include/sfx2/progress.hxx
Dosyayı görüntüle @
694afdba
...
@@ -47,8 +47,8 @@ public:
...
@@ -47,8 +47,8 @@ public:
bool
bWait
=
true
);
bool
bWait
=
true
);
virtual
~
SfxProgress
();
virtual
~
SfxProgress
();
bool
SetStateText
(
sal_uIntPtr
nVal
,
const
rtl
::
OUString
&
rVal
);
void
SetStateText
(
sal_uIntPtr
nVal
,
const
rtl
::
OUString
&
rVal
);
bool
SetState
(
sal_uIntPtr
nVal
,
sal_uIntPtr
nNewRange
=
0
);
void
SetState
(
sal_uIntPtr
nVal
,
sal_uIntPtr
nNewRange
=
0
);
sal_uIntPtr
GetState
()
const
{
return
nVal
;
}
sal_uIntPtr
GetState
()
const
{
return
nVal
;
}
void
Resume
();
void
Resume
();
...
...
sc/inc/globstr.hrc
Dosyayı görüntüle @
694afdba
...
@@ -140,7 +140,6 @@
...
@@ -140,7 +140,6 @@
#define STR_UNKNOWN_FILTER 94
#define STR_UNKNOWN_FILTER 94
#define STR_DATABASE_NOTFOUND 95
#define STR_DATABASE_NOTFOUND 95
#define STR_DATABASE_ABORTED 96
#define STR_UNDO_PRINTRANGES 97
#define STR_UNDO_PRINTRANGES 97
...
...
sc/inc/progress.hxx
Dosyayı görüntüle @
694afdba
...
@@ -42,7 +42,6 @@ private:
...
@@ -42,7 +42,6 @@ private:
static
SfxProgress
*
pGlobalProgress
;
static
SfxProgress
*
pGlobalProgress
;
static
sal_uLong
nGlobalRange
;
static
sal_uLong
nGlobalRange
;
static
sal_uLong
nGlobalPercent
;
static
sal_uLong
nGlobalPercent
;
static
bool
bGlobalNoUserBreak
;
static
ScProgress
*
pInterpretProgress
;
static
ScProgress
*
pInterpretProgress
;
static
ScProgress
*
pOldInterpretProgress
;
static
ScProgress
*
pOldInterpretProgress
;
static
sal_uLong
nInterpretProgress
;
static
sal_uLong
nInterpretProgress
;
...
@@ -63,7 +62,6 @@ private:
...
@@ -63,7 +62,6 @@ private:
}
}
public
:
public
:
static
bool
IsUserBreak
()
{
return
!
bGlobalNoUserBreak
;
}
static
void
CreateInterpretProgress
(
ScDocument
*
pDoc
,
static
void
CreateInterpretProgress
(
ScDocument
*
pDoc
,
bool
bWait
=
true
);
bool
bWait
=
true
);
static
ScProgress
*
GetInterpretProgress
()
{
return
pInterpretProgress
;
}
static
ScProgress
*
GetInterpretProgress
()
{
return
pInterpretProgress
;
}
...
@@ -80,47 +78,37 @@ public:
...
@@ -80,47 +78,37 @@ public:
ScProgress
();
ScProgress
();
#endif
#endif
bool
SetStateText
(
sal_uLong
nVal
,
const
OUString
&
rVal
)
void
SetStateText
(
sal_uLong
nVal
,
const
OUString
&
rVal
)
{
{
if
(
pProgress
)
if
(
pProgress
)
{
{
CalcGlobalPercent
(
nVal
);
CalcGlobalPercent
(
nVal
);
if
(
!
pProgress
->
SetStateText
(
nVal
,
rVal
)
)
pProgress
->
SetStateText
(
nVal
,
rVal
);
bGlobalNoUserBreak
=
false
;
return
bGlobalNoUserBreak
;
}
}
return
true
;
}
}
bool
SetState
(
sal_uLong
nVal
,
sal_uLong
nNewRange
=
0
)
void
SetState
(
sal_uLong
nVal
,
sal_uLong
nNewRange
=
0
)
{
{
if
(
pProgress
)
if
(
pProgress
)
{
{
if
(
nNewRange
)
if
(
nNewRange
)
nGlobalRange
=
nNewRange
;
nGlobalRange
=
nNewRange
;
CalcGlobalPercent
(
nVal
);
CalcGlobalPercent
(
nVal
);
if
(
!
pProgress
->
SetState
(
nVal
,
nNewRange
)
)
pProgress
->
SetState
(
nVal
,
nNewRange
);
bGlobalNoUserBreak
=
false
;
return
bGlobalNoUserBreak
;
}
}
return
true
;
}
}
bool
SetStateCountDown
(
sal_uLong
nVal
)
void
SetStateCountDown
(
sal_uLong
nVal
)
{
{
if
(
pProgress
)
if
(
pProgress
)
{
{
CalcGlobalPercent
(
nGlobalRange
-
nVal
);
CalcGlobalPercent
(
nGlobalRange
-
nVal
);
if
(
!
pProgress
->
SetState
(
nGlobalRange
-
nVal
)
)
pProgress
->
SetState
(
nGlobalRange
-
nVal
);
bGlobalNoUserBreak
=
false
;
return
bGlobalNoUserBreak
;
}
}
return
true
;
}
}
bool
SetStateOnPercent
(
sal_uLong
nVal
)
void
SetStateOnPercent
(
sal_uLong
nVal
)
{
/// only if percentage increased
{
/// only if percentage increased
if
(
nGlobalRange
&&
(
nVal
*
100
/
if
(
nGlobalRange
&&
(
nVal
*
100
/
nGlobalRange
)
>
nGlobalPercent
)
nGlobalRange
)
>
nGlobalPercent
)
return
SetState
(
nVal
);
SetState
(
nVal
);
return
true
;
}
}
void
SetStateCountDownOnPercent
(
sal_uLong
nVal
)
void
SetStateCountDownOnPercent
(
sal_uLong
nVal
)
{
/// only if percentage increased
{
/// only if percentage increased
...
...
sc/source/core/data/documen7.cxx
Dosyayı görüntüle @
694afdba
...
@@ -456,8 +456,6 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool bProgressBar, bool bSet
...
@@ -456,8 +456,6 @@ void ScDocument::CalcFormulaTree( bool bOnlyForced, bool bProgressBar, bool bSet
else
else
pCell
=
nullptr
;
pCell
=
nullptr
;
}
}
if
(
ScProgress
::
IsUserBreak
()
)
pCell
=
nullptr
;
}
}
if
(
bProgress
)
if
(
bProgress
)
ScProgress
::
DeleteInterpretProgress
();
ScProgress
::
DeleteInterpretProgress
();
...
...
sc/source/core/tool/progress.cxx
Dosyayı görüntüle @
694afdba
...
@@ -37,7 +37,6 @@ static ScProgress theDummyInterpretProgress;
...
@@ -37,7 +37,6 @@ static ScProgress theDummyInterpretProgress;
SfxProgress
*
ScProgress
::
pGlobalProgress
=
nullptr
;
SfxProgress
*
ScProgress
::
pGlobalProgress
=
nullptr
;
sal_uLong
ScProgress
::
nGlobalRange
=
0
;
sal_uLong
ScProgress
::
nGlobalRange
=
0
;
sal_uLong
ScProgress
::
nGlobalPercent
=
0
;
sal_uLong
ScProgress
::
nGlobalPercent
=
0
;
bool
ScProgress
::
bGlobalNoUserBreak
=
true
;
ScProgress
*
ScProgress
::
pInterpretProgress
=
&
theDummyInterpretProgress
;
ScProgress
*
ScProgress
::
pInterpretProgress
=
&
theDummyInterpretProgress
;
ScProgress
*
ScProgress
::
pOldInterpretProgress
=
nullptr
;
ScProgress
*
ScProgress
::
pOldInterpretProgress
=
nullptr
;
sal_uLong
ScProgress
::
nInterpretProgress
=
0
;
sal_uLong
ScProgress
::
nInterpretProgress
=
0
;
...
@@ -111,7 +110,6 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
...
@@ -111,7 +110,6 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
pGlobalProgress
=
pProgress
;
pGlobalProgress
=
pProgress
;
nGlobalRange
=
nRange
;
nGlobalRange
=
nRange
;
nGlobalPercent
=
0
;
nGlobalPercent
=
0
;
bGlobalNoUserBreak
=
true
;
}
}
}
}
...
@@ -130,7 +128,6 @@ ScProgress::~ScProgress()
...
@@ -130,7 +128,6 @@ ScProgress::~ScProgress()
pGlobalProgress
=
nullptr
;
pGlobalProgress
=
nullptr
;
nGlobalRange
=
0
;
nGlobalRange
=
0
;
nGlobalPercent
=
0
;
nGlobalPercent
=
0
;
bGlobalNoUserBreak
=
true
;
}
}
}
}
...
...
sc/source/ui/docshell/dbdocimp.cxx
Dosyayı görüntüle @
694afdba
...
@@ -346,12 +346,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
...
@@ -346,12 +346,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
aText
+=
OUString
::
number
(
nInserted
);
aText
+=
OUString
::
number
(
nInserted
);
aText
+=
aPict
.
getToken
(
1
,
'#'
);
aText
+=
aPict
.
getToken
(
1
,
'#'
);
if
(
!
aProgress
.
SetStateText
(
0
,
aText
))
// stopped by user?
aProgress
.
SetStateText
(
0
,
aText
);
{
bEnd
=
true
;
bSuccess
=
false
;
nErrStringId
=
STR_DATABASE_ABORTED
;
}
}
}
}
}
else
// past the end of the spreadsheet
else
// past the end of the spreadsheet
...
...
sc/source/ui/docshell/docsh8.cxx
Dosyayı görüntüle @
694afdba
...
@@ -1013,11 +1013,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
...
@@ -1013,11 +1013,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
//! error handling and recovery of old
//! error handling and recovery of old
//! ScDocShell::SbaSdbExport is still missing!
//! ScDocShell::SbaSdbExport is still missing!
if
(
!
aProgress
.
SetStateOnPercent
(
nDocRow
-
nFirstRow
)
)
aProgress
.
SetStateOnPercent
(
nDocRow
-
nFirstRow
);
{
// UserBreak
nErr
=
SCERR_EXPORT_DATA
;
break
;
}
}
}
comphelper
::
disposeComponent
(
xRowSet
);
comphelper
::
disposeComponent
(
xRowSet
);
...
...
sc/source/ui/src/globstr.src
Dosyayı görüntüle @
694afdba
...
@@ -393,10 +393,6 @@ Resource RID_GLOBSTR
...
@@ -393,10 +393,6 @@ Resource RID_GLOBSTR
{
{
Text [ en-US ] = "The query '#' could not be opened." ;
Text [ en-US ] = "The query '#' could not be opened." ;
};
};
String STR_DATABASE_ABORTED
{
Text [ en-US ] = "Database import terminated." ;
};
String STR_PROGRESS_IMPORT
String STR_PROGRESS_IMPORT
{
{
Text [ en-US ] = "# records imported..." ;
Text [ en-US ] = "# records imported..." ;
...
...
sfx2/source/bastyp/progress.cxx
Dosyayı görüntüle @
694afdba
...
@@ -208,7 +208,7 @@ void SfxProgress::Stop()
...
@@ -208,7 +208,7 @@ void SfxProgress::Stop()
pImpl
->
Enable_Impl
();
pImpl
->
Enable_Impl
();
}
}
bool
SfxProgress
::
SetStateText
void
SfxProgress
::
SetStateText
(
(
sal_uLong
nNewVal
,
/* New value for the progress-bar */
sal_uLong
nNewVal
,
/* New value for the progress-bar */
const
OUString
&
rNewVal
/* Status as Text */
const
OUString
&
rNewVal
/* Status as Text */
...
@@ -216,10 +216,10 @@ bool SfxProgress::SetStateText
...
@@ -216,10 +216,10 @@ bool SfxProgress::SetStateText
{
{
pImpl
->
aStateText
=
rNewVal
;
pImpl
->
aStateText
=
rNewVal
;
return
SetState
(
nNewVal
);
SetState
(
nNewVal
);
}
}
bool
SfxProgress
::
SetState
void
SfxProgress
::
SetState
(
(
sal_uLong
nNewVal
,
/* new value for the progress bar */
sal_uLong
nNewVal
,
/* new value for the progress bar */
...
@@ -228,18 +228,10 @@ bool SfxProgress::SetState
...
@@ -228,18 +228,10 @@ bool SfxProgress::SetState
/* [Description]
/* [Description]
Setting the current status, after a time delay Reschedule is called.
Setting the current status, after a time delay Reschedule is called.
[Return value]
bool TRUE
Proceed with the action
FALSE
Cancel action
*/
*/
{
{
if
(
pImpl
->
pActiveProgress
)
return
true
;
if
(
pImpl
->
pActiveProgress
)
return
;
nVal
=
nNewVal
;
nVal
=
nNewVal
;
...
@@ -300,8 +292,6 @@ bool SfxProgress::SetState
...
@@ -300,8 +292,6 @@ bool SfxProgress::SetState
{
{
pImpl
->
xStatusInd
->
setValue
(
nNewVal
);
pImpl
->
xStatusInd
->
setValue
(
nNewVal
);
}
}
return
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