Kaydet (Commit) f0d6fa07 authored tarafından Matteo Casalin's avatar Matteo Casalin

Use sal_uInt32 consistently for WindowStateData::SetMask and related

Change-Id: I722828785a861065a69a1d83bc6e40517b164102
üst 903baa66
......@@ -46,26 +46,26 @@ class VclContainer;
// - WindowStateData -
#define WINDOWSTATE_MASK_X ((sal_uLong)0x00000001)
#define WINDOWSTATE_MASK_Y ((sal_uLong)0x00000002)
#define WINDOWSTATE_MASK_WIDTH ((sal_uLong)0x00000004)
#define WINDOWSTATE_MASK_HEIGHT ((sal_uLong)0x00000008)
#define WINDOWSTATE_MASK_STATE ((sal_uLong)0x00000010)
#define WINDOWSTATE_MASK_MINIMIZED ((sal_uLong)0x00000020)
#define WINDOWSTATE_MASK_MAXIMIZED_X ((sal_uLong)0x00000100)
#define WINDOWSTATE_MASK_MAXIMIZED_Y ((sal_uLong)0x00000200)
#define WINDOWSTATE_MASK_MAXIMIZED_WIDTH ((sal_uLong)0x00000400)
#define WINDOWSTATE_MASK_MAXIMIZED_HEIGHT ((sal_uLong)0x00000800)
#define WINDOWSTATE_MASK_X ((sal_uInt32)0x00000001)
#define WINDOWSTATE_MASK_Y ((sal_uInt32)0x00000002)
#define WINDOWSTATE_MASK_WIDTH ((sal_uInt32)0x00000004)
#define WINDOWSTATE_MASK_HEIGHT ((sal_uInt32)0x00000008)
#define WINDOWSTATE_MASK_STATE ((sal_uInt32)0x00000010)
#define WINDOWSTATE_MASK_MINIMIZED ((sal_uInt32)0x00000020)
#define WINDOWSTATE_MASK_MAXIMIZED_X ((sal_uInt32)0x00000100)
#define WINDOWSTATE_MASK_MAXIMIZED_Y ((sal_uInt32)0x00000200)
#define WINDOWSTATE_MASK_MAXIMIZED_WIDTH ((sal_uInt32)0x00000400)
#define WINDOWSTATE_MASK_MAXIMIZED_HEIGHT ((sal_uInt32)0x00000800)
#define WINDOWSTATE_MASK_POS (WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y)
#define WINDOWSTATE_MASK_ALL (WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT | WINDOWSTATE_MASK_MAXIMIZED_X | WINDOWSTATE_MASK_MAXIMIZED_Y | WINDOWSTATE_MASK_MAXIMIZED_WIDTH | WINDOWSTATE_MASK_MAXIMIZED_HEIGHT | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)
#define WINDOWSTATE_STATE_NORMAL ((sal_uLong)0x00000001)
#define WINDOWSTATE_STATE_MINIMIZED ((sal_uLong)0x00000002)
#define WINDOWSTATE_STATE_MAXIMIZED ((sal_uLong)0x00000004)
#define WINDOWSTATE_STATE_ROLLUP ((sal_uLong)0x00000008)
#define WINDOWSTATE_STATE_MAXIMIZED_HORZ ((sal_uLong)0x00000010)
#define WINDOWSTATE_STATE_MAXIMIZED_VERT ((sal_uLong)0x00000020)
#define WINDOWSTATE_STATE_SYSTEMMASK ((sal_uLong)0x0000FFFF)
#define WINDOWSTATE_STATE_NORMAL ((sal_uInt32)0x00000001)
#define WINDOWSTATE_STATE_MINIMIZED ((sal_uInt32)0x00000002)
#define WINDOWSTATE_STATE_MAXIMIZED ((sal_uInt32)0x00000004)
#define WINDOWSTATE_STATE_ROLLUP ((sal_uInt32)0x00000008)
#define WINDOWSTATE_STATE_MAXIMIZED_HORZ ((sal_uInt32)0x00000010)
#define WINDOWSTATE_STATE_MAXIMIZED_VERT ((sal_uInt32)0x00000020)
#define WINDOWSTATE_STATE_SYSTEMMASK ((sal_uInt32)0x0000FFFF)
class VCL_PLUGIN_PUBLIC WindowStateData
{
......@@ -88,7 +88,7 @@ public:
mnMaximizedX = mnMaximizedY = mnMaximizedWidth = mnMaximizedHeight = 0;
}
void SetMask( sal_uLong nValidMask ) { mnValidMask = nValidMask; }
void SetMask( sal_uInt32 nValidMask ) { mnValidMask = nValidMask; }
sal_uInt32 GetMask() const { return mnValidMask; }
void SetX( int nX ) { mnX = nX; }
......@@ -223,7 +223,7 @@ public:
const Size& GetMaxOutputSizePixel() const;
void SetWindowState(const OString& rStr);
OString GetWindowState(sal_uLong nMask = WINDOWSTATE_MASK_ALL) const;
OString GetWindowState(sal_uInt32 nMask = WINDOWSTATE_MASK_ALL) const;
void SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css::frame::XFrame>& rFrame = css::uno::Reference<css::frame::XFrame>());
MenuBar* GetMenuBar() const { return mpMenuBar; }
......
......@@ -381,7 +381,7 @@ void DockingWindow::ImplLoadRes( const ResId& rResId )
{
Window::ImplLoadRes( rResId );
sal_uLong nMask = ReadLongRes();
const sal_uInt32 nMask = ReadLongRes();
if ( (RSC_DOCKINGWINDOW_XYMAPMODE | RSC_DOCKINGWINDOW_X |
RSC_DOCKINGWINDOW_Y) & nMask )
......
......@@ -435,7 +435,7 @@ const Size& SystemWindow::GetMaxOutputSizePixel() const
static void ImplWindowStateFromStr(WindowStateData& rData,
const OString& rStr)
{
sal_uLong nValidMask = 0;
sal_uInt32 nValidMask = 0;
sal_Int32 nIndex = 0;
OString aTokenStr;
......@@ -548,7 +548,7 @@ static void ImplWindowStateFromStr(WindowStateData& rData,
static OString ImplWindowStateToStr(const WindowStateData& rData)
{
sal_uLong nValidMask = rData.GetMask();
const sal_uInt32 nValidMask = rData.GetMask();
if ( !nValidMask )
return OString();
......@@ -647,7 +647,7 @@ void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, lo
void SystemWindow::SetWindowStateData( const WindowStateData& rData )
{
sal_uLong nValidMask = rData.GetMask();
const sal_uInt32 nValidMask = rData.GetMask();
if ( !nValidMask )
return;
......@@ -660,7 +660,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
if ( pWindow->mpWindowImpl->mbFrame )
{
sal_uLong nState = rData.GetState();
const sal_uInt32 nState = rData.GetState();
SalFrameState aState;
aState.mnMask = rData.GetMask();
aState.mnX = rData.GetX();
......@@ -789,7 +789,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
// 91625 - ignore Minimize
if ( nValidMask & WINDOWSTATE_MASK_STATE )
{
sal_uLong nState = rData.GetState();
const sal_uInt32 nState = rData.GetState();
if ( nState & WINDOWSTATE_STATE_ROLLUP )
RollUp();
else
......@@ -800,7 +800,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
void SystemWindow::GetWindowStateData( WindowStateData& rData ) const
{
sal_uLong nValidMask = rData.GetMask();
sal_uInt32 nValidMask = rData.GetMask();
if ( !nValidMask )
return;
......@@ -862,12 +862,12 @@ void SystemWindow::GetWindowStateData( WindowStateData& rData ) const
{
Point aPos = GetPosPixel();
Size aSize = GetSizePixel();
sal_uLong nState = 0;
sal_uInt32 nState = 0;
if ( IsRollUp() )
{
aSize.Height() += maOrgSize.Height();
nState |= WINDOWSTATE_STATE_ROLLUP;
nState = WINDOWSTATE_STATE_ROLLUP;
}
if ( nValidMask & WINDOWSTATE_MASK_X )
......@@ -893,7 +893,7 @@ void SystemWindow::SetWindowState(const OString& rStr)
SetWindowStateData( aData );
}
OString SystemWindow::GetWindowState( sal_uLong nMask ) const
OString SystemWindow::GetWindowState( sal_uInt32 nMask ) const
{
WindowStateData aData;
aData.SetMask( nMask );
......
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