[Libreoffice-commits] .: 2 commits - sc/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Dec 21 19:29:44 PST 2010
sc/source/filter/lotus/lotform.cxx | 2 +-
sc/source/ui/view/prevwsh.cxx | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 764b5b29fb44e3f0d0941f77ed9b3d21b51f41b3
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Dec 21 22:26:24 2010 -0500
cppcheck: variable scope
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 90024de..4f82704 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -297,7 +297,6 @@ void ScPreviewShell::UpdateScrollBars()
Size aWindowSize = pPreview->GetOutputSize();
Point aOfs = pPreview->GetOffset();
- long nMaxPos;
if( pHorScroll )
{
@@ -305,7 +304,7 @@ void ScPreviewShell::UpdateScrollBars()
pHorScroll->SetLineSize( aWindowSize.Width() / 16 );
pHorScroll->SetPageSize( aWindowSize.Width() );
pHorScroll->SetVisibleSize( aWindowSize.Width() );
- nMaxPos = aPageSize.Width() - aWindowSize.Width();
+ long nMaxPos = aPageSize.Width() - aWindowSize.Width();
if ( nMaxPos<0 )
{
// page smaller than window -> center (but put scrollbar to 0)
@@ -1000,7 +999,6 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV
sal_Int32 nCount(rSeq.getLength());
if (nCount)
{
- sal_Int32 nTemp = 0;
const beans::PropertyValue* pSeq = rSeq.getConstArray();
if(pSeq)
{
@@ -1009,11 +1007,13 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV
rtl::OUString sName(pSeq->Name);
if(sName.compareToAscii(SC_ZOOMVALUE) == 0)
{
+ sal_Int32 nTemp = 0;
if (pSeq->Value >>= nTemp)
pPreview->SetZoom(sal_uInt16(nTemp));
}
else if (sName.compareToAscii("PageNumber") == 0)
{
+ sal_Int32 nTemp = 0;
if (pSeq->Value >>= nTemp)
pPreview->SetPageNo(nTemp);
}
commit e15ba0a0d81edc8a339674248152a680348dc9f3
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Dec 21 22:23:59 2010 -0500
cppcheck: variable scope
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index bd51400..dc34edf 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -166,7 +166,6 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString )
if( nAnz > 0 )
{
- INT16 nNull = -1; // gibt einen auszulassenden Parameter an
// ACHTUNG: 0 ist der letzte Parameter, nAnz-1 der erste
INT16 nLast = nAnz - 1;
@@ -184,6 +183,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString )
// [Parameter{;Parameter}]
aPool << eParam[ nLast ];
+ INT16 nNull = -1; // gibt einen auszulassenden Parameter an
for( nLauf = nLast - 1 ; nLauf >= 0 ; nLauf-- )
{
if( nLauf != nNull )
More information about the Libreoffice-commits
mailing list