Kaydet (Commit) 029fc564 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

cppcheck: variable scope

üst 537b3424
...@@ -297,7 +297,6 @@ void ScPreviewShell::UpdateScrollBars() ...@@ -297,7 +297,6 @@ void ScPreviewShell::UpdateScrollBars()
Size aWindowSize = pPreview->GetOutputSize(); Size aWindowSize = pPreview->GetOutputSize();
Point aOfs = pPreview->GetOffset(); Point aOfs = pPreview->GetOffset();
long nMaxPos;
if( pHorScroll ) if( pHorScroll )
{ {
...@@ -305,7 +304,7 @@ void ScPreviewShell::UpdateScrollBars() ...@@ -305,7 +304,7 @@ void ScPreviewShell::UpdateScrollBars()
pHorScroll->SetLineSize( aWindowSize.Width() / 16 ); pHorScroll->SetLineSize( aWindowSize.Width() / 16 );
pHorScroll->SetPageSize( aWindowSize.Width() ); pHorScroll->SetPageSize( aWindowSize.Width() );
pHorScroll->SetVisibleSize( aWindowSize.Width() ); pHorScroll->SetVisibleSize( aWindowSize.Width() );
nMaxPos = aPageSize.Width() - aWindowSize.Width(); long nMaxPos = aPageSize.Width() - aWindowSize.Width();
if ( nMaxPos<0 ) if ( nMaxPos<0 )
{ {
// page smaller than window -> center (but put scrollbar to 0) // page smaller than window -> center (but put scrollbar to 0)
...@@ -1000,7 +999,6 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV ...@@ -1000,7 +999,6 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV
sal_Int32 nCount(rSeq.getLength()); sal_Int32 nCount(rSeq.getLength());
if (nCount) if (nCount)
{ {
sal_Int32 nTemp = 0;
const beans::PropertyValue* pSeq = rSeq.getConstArray(); const beans::PropertyValue* pSeq = rSeq.getConstArray();
if(pSeq) if(pSeq)
{ {
...@@ -1009,11 +1007,13 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV ...@@ -1009,11 +1007,13 @@ void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < beans::PropertyV
rtl::OUString sName(pSeq->Name); rtl::OUString sName(pSeq->Name);
if(sName.compareToAscii(SC_ZOOMVALUE) == 0) if(sName.compareToAscii(SC_ZOOMVALUE) == 0)
{ {
sal_Int32 nTemp = 0;
if (pSeq->Value >>= nTemp) if (pSeq->Value >>= nTemp)
pPreview->SetZoom(sal_uInt16(nTemp)); pPreview->SetZoom(sal_uInt16(nTemp));
} }
else if (sName.compareToAscii("PageNumber") == 0) else if (sName.compareToAscii("PageNumber") == 0)
{ {
sal_Int32 nTemp = 0;
if (pSeq->Value >>= nTemp) if (pSeq->Value >>= nTemp)
pPreview->SetPageNo(nTemp); pPreview->SetPageNo(nTemp);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment