FloatWinPopupFlags::NoAutoArrange is never set
Change-Id: I3b3173d4d0041585a5b6a0db58cace6cf46db6ca
This commit is contained in:
@@ -32,25 +32,24 @@ enum class FloatWinPopupFlags
|
||||
{
|
||||
NONE = 0x000000,
|
||||
AllowTearOff = 0x000001,
|
||||
NoAutoArrange = 0x000002,
|
||||
NoAnimation = 0x000004,
|
||||
Down = 0x000008,
|
||||
Up = 0x000010,
|
||||
Left = 0x000020,
|
||||
Right = 0x000040,
|
||||
NoKeyClose = 0x000080,
|
||||
NoMouseClose = 0x000100,
|
||||
NoMouseRectClose = 0x000200,
|
||||
AllMouseButtonClose = 0x000400,
|
||||
NoAppFocusClose = 0x000800,
|
||||
NewLevel = 0x001000,
|
||||
NoMouseUpClose = 0x002000,
|
||||
GrabFocus = 0x004000,
|
||||
NoHorzPlacement = 0x008000,
|
||||
NoAnimation = 0x000002,
|
||||
Down = 0x000004,
|
||||
Up = 0x000008,
|
||||
Left = 0x000010,
|
||||
Right = 0x000020,
|
||||
NoKeyClose = 0x000040,
|
||||
NoMouseClose = 0x000080,
|
||||
NoMouseRectClose = 0x000100,
|
||||
AllMouseButtonClose = 0x000200,
|
||||
NoAppFocusClose = 0x000400,
|
||||
NewLevel = 0x000800,
|
||||
NoMouseUpClose = 0x001000,
|
||||
GrabFocus = 0x002000,
|
||||
NoHorzPlacement = 0x004000,
|
||||
};
|
||||
namespace o3tl
|
||||
{
|
||||
template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x00ffff> {};
|
||||
template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x007fff> {};
|
||||
}
|
||||
|
||||
enum class FloatWinPopupEndFlags
|
||||
|
@@ -267,7 +267,6 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
|
||||
Application::GetBestScreen( bRTL ? devRectRTL : devRect ) );
|
||||
|
||||
FloatWinPopupFlags nArrangeAry[5];
|
||||
sal_uInt16 nArrangeIndex;
|
||||
Point e1,e2; // the common edge between the item rect and the floating window
|
||||
|
||||
if ( nFlags & FloatWinPopupFlags::Left )
|
||||
@@ -302,10 +301,8 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
|
||||
nArrangeAry[3] = FloatWinPopupFlags::Left;
|
||||
nArrangeAry[4] = FloatWinPopupFlags::Down;
|
||||
}
|
||||
if ( nFlags & FloatWinPopupFlags::NoAutoArrange )
|
||||
nArrangeIndex = 4;
|
||||
else
|
||||
nArrangeIndex = 0;
|
||||
|
||||
sal_uInt16 nArrangeIndex = 0;
|
||||
|
||||
for ( ; nArrangeIndex < 5; nArrangeIndex++ )
|
||||
{
|
||||
@@ -397,7 +394,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow,
|
||||
}
|
||||
|
||||
// adjust if necessary
|
||||
if ( bBreak && !(nFlags & FloatWinPopupFlags::NoAutoArrange) )
|
||||
if (bBreak)
|
||||
{
|
||||
if ( (nArrangeAry[nArrangeIndex] == FloatWinPopupFlags::Left) ||
|
||||
(nArrangeAry[nArrangeIndex] == FloatWinPopupFlags::Right) )
|
||||
@@ -737,8 +734,7 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags )
|
||||
|
||||
// set Flags for positioning
|
||||
if ( !(nFlags & (FloatWinPopupFlags::Down | FloatWinPopupFlags::Up |
|
||||
FloatWinPopupFlags::Left | FloatWinPopupFlags::Right |
|
||||
FloatWinPopupFlags::NoAutoArrange)) )
|
||||
FloatWinPopupFlags::Left | FloatWinPopupFlags::Right)) )
|
||||
{
|
||||
if ( pBox->IsHorizontal() )
|
||||
nFlags |= FloatWinPopupFlags::Down;
|
||||
|
Reference in New Issue
Block a user