Kaydet (Commit) 30e72a9a authored tarafından Julien Nabet's avatar Julien Nabet

cppcheck: some cleanings

Change-Id: Ie41b33c09d79b40116cc10f7557987860acb55e8
üst 26bb3a08
...@@ -93,8 +93,7 @@ DataEditor::DataEditor( ...@@ -93,8 +93,7 @@ DataEditor::DataEditor(
sal_Int32 nMaxWidth = GetDesktopRectPixel().getWidth() - sal_Int32 nMaxWidth = GetDesktopRectPixel().getWidth() -
(aWinSizeWithBorder.getWidth() - aWinSize.getWidth() + aWinPos.getX()) - 10; // leave some space (aWinSizeWithBorder.getWidth() - aWinSize.getWidth() + aWinPos.getX()) - 10; // leave some space
sal_Int32 nBrowserWidth = m_apBrwData->GetTotalWidth() + 12 + 16; // plus padding + 16? sal_Int32 nBrowserWidth = m_apBrwData->GetTotalWidth() + 12 + 16; // plus padding + 16?
sal_Int32 nWindowWidth = ::std::max( nMinWidth, nBrowserWidth ); sal_Int32 nWindowWidth = ::std::min( nMaxWidth, nBrowserWidth );
nWindowWidth = ::std::min( nMaxWidth, nBrowserWidth );
aWinSize.setWidth( nWindowWidth ); aWinSize.setWidth( nWindowWidth );
SetOutputSizePixel( aWinSize ); SetOutputSizePixel( aWinSize );
AdaptBrowseBoxSize(); AdaptBrowseBoxSize();
......
...@@ -1157,7 +1157,6 @@ void ThreeDHelper::setCameraDistance( ...@@ -1157,7 +1157,6 @@ void ThreeDHelper::setCameraDistance(
double ThreeDHelper::CameraDistanceToPerspective( double fCameraDistance ) double ThreeDHelper::CameraDistanceToPerspective( double fCameraDistance )
{ {
double fRet = fCameraDistance;
double fMin, fMax; double fMin, fMax;
ThreeDHelper::getCameraDistanceRange( fMin, fMax ); ThreeDHelper::getCameraDistanceRange( fMin, fMax );
//fMax <-> 0; fMin <->100 //fMax <-> 0; fMin <->100
...@@ -1165,14 +1164,13 @@ double ThreeDHelper::CameraDistanceToPerspective( double fCameraDistance ) ...@@ -1165,14 +1164,13 @@ double ThreeDHelper::CameraDistanceToPerspective( double fCameraDistance )
double a = 100.0*fMax*fMin/(fMax-fMin); double a = 100.0*fMax*fMin/(fMax-fMin);
double b = -a/fMax; double b = -a/fMax;
fRet = a/fCameraDistance + b; double fRet = a/fCameraDistance + b;
return fRet; return fRet;
} }
double ThreeDHelper::PerspectiveToCameraDistance( double fPerspective ) double ThreeDHelper::PerspectiveToCameraDistance( double fPerspective )
{ {
double fRet = fPerspective;
double fMin, fMax; double fMin, fMax;
ThreeDHelper::getCameraDistanceRange( fMin, fMax ); ThreeDHelper::getCameraDistanceRange( fMin, fMax );
//fMax <-> 0; fMin <->100 //fMax <-> 0; fMin <->100
...@@ -1180,7 +1178,7 @@ double ThreeDHelper::PerspectiveToCameraDistance( double fPerspective ) ...@@ -1180,7 +1178,7 @@ double ThreeDHelper::PerspectiveToCameraDistance( double fPerspective )
double a = 100.0*fMax*fMin/(fMax-fMin); double a = 100.0*fMax*fMin/(fMax-fMin);
double b = -a/fMax; double b = -a/fMax;
fRet = a/(fPerspective - b); double fRet = a/(fPerspective - b);
return fRet; return fRet;
} }
......
...@@ -399,7 +399,6 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject ) ...@@ -399,7 +399,6 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject )
CAutoComInit comAutoInit; CAutoComInit comAutoInit;
LPSTREAM lpStream; LPSTREAM lpStream;
HRESULT hr = E_FAIL;
*ppIDataObject = NULL; *ppIDataObject = NULL;
...@@ -411,7 +410,7 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject ) ...@@ -411,7 +410,7 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject )
aMsgCtx.aCondition.wait( /* infinite */ ); aMsgCtx.aCondition.wait( /* infinite */ );
hr = aMsgCtx.hr; HRESULT hr = aMsgCtx.hr;
if ( SUCCEEDED( hr ) ) if ( SUCCEEDED( hr ) )
{ {
......
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