diff options
35 files changed, 123 insertions, 113 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 114f7e605835..9f2f0116a553 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -248,7 +248,7 @@ void SAL_CALL ChartController::setPosSize( Fraction(nScaleXNumerator, nScaleXDenominator), Fraction(nScaleYNumerator, nScaleYDenominator) ); m_pChartWindow->SetMapMode(aNewMapMode); - m_pChartWindow->setPosSizePixel( X, Y, Width, Height, Flags ); + m_pChartWindow->setPosSizePixel( X, Y, Width, Height, static_cast<PosSizeFlags>(Flags) ); //#i75867# poor quality of ole's alternative view with 3D scenes and zoomfactors besides 100% uno::Reference< beans::XPropertySet > xProp( m_xChartView, uno::UNO_QUERY ); diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 5848b5b2036c..7282b7fb9f5d 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -277,7 +277,7 @@ namespace dbaui 0, aMinSize.Width(), 0, - WINDOW_POSSIZE_X | WINDOW_POSSIZE_WIDTH + PosSizeFlags::X | PosSizeFlags::Width ); } } diff --git a/extensions/source/plugin/base/plctrl.cxx b/extensions/source/plugin/base/plctrl.cxx index 4276ba98eb01..917809d03976 100644 --- a/extensions/source/plugin/base/plctrl.cxx +++ b/extensions/source/plugin/base/plctrl.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/awt/XSpinListener.hpp> #include <com/sun/star/awt/XItemListener.hpp> #include <com/sun/star/awt/XVclContainerListener.hpp> +#include <com/sun/star/awt/PosSize.hpp> #include <plugin/plctrl.hxx> #include <vcl/syschild.hxx> @@ -43,7 +44,7 @@ PluginControl_Impl::PluginControl_Impl() , _nY( 0 ) , _nWidth( 100 ) , _nHeight( 100 ) - , _nFlags( WINDOW_POSSIZE_ALL ) + , _nFlags( css::awt::PosSize::POSSIZE ) , _bVisible(false) , _bInDesignMode(false) , _bEnable(true) diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx index 9c58248f9deb..09386a697cb8 100644 --- a/include/svx/sidebar/PanelLayout.hxx +++ b/include/svx/sidebar/PanelLayout.hxx @@ -38,7 +38,7 @@ public: virtual void dispose() SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; - virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE; + virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) SAL_OVERRIDE; virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) SAL_OVERRIDE; }; diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index 83e4a1812d4a..50058fd2eaa7 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -109,7 +109,7 @@ public: virtual const Wallpaper& GetDisplayBackground() const SAL_OVERRIDE; - virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE; + virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE; void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE { Edit::SetPosSizePixel( rNewPos, rNewSize ); } diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 605441ed4d0b..156d0a0642bb 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -171,7 +171,7 @@ public: void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); + PosSizeFlags nFlags = PosSizeFlags::All ); void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) { mpDockingWindow->SetPosSizePixel( rNewPos, rNewSize ); } @@ -211,7 +211,7 @@ public: // be availbale from the toolkit void SetPosSizePixel( vcl::Window *pWin, long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); + PosSizeFlags nFlags = PosSizeFlags::All ); Rectangle GetPosSizePixel( const vcl::Window *pWin ); }; @@ -347,7 +347,7 @@ public: virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE; + PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE; void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE { Window::SetPosSizePixel( rNewPos, rNewSize ); } diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index 4cbdd499dde0..d93167e0e1e8 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -101,7 +101,7 @@ public: virtual const Wallpaper& GetDisplayBackground() const SAL_OVERRIDE; virtual void setPosSizePixel( long nX, long nY, - long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE; + long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE; void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE { Control::SetPosSizePixel( rNewPos, rNewSize ); } diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index a31ca525c7e5..919bd3121ab5 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -116,7 +116,6 @@ enum class TrackingEventFlags End = 0x1000, DontCallHdl = 0x8000, }; - namespace o3tl { template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x9107> {}; @@ -149,15 +148,24 @@ enum class GetWindowType }; // Flags for setPosSizePixel() -#define WINDOW_POSSIZE_X ((sal_uInt16)0x0001) -#define WINDOW_POSSIZE_Y ((sal_uInt16)0x0002) -#define WINDOW_POSSIZE_WIDTH ((sal_uInt16)0x0004) -#define WINDOW_POSSIZE_HEIGHT ((sal_uInt16)0x0008) -#define WINDOW_POSSIZE_POS (WINDOW_POSSIZE_X | WINDOW_POSSIZE_Y) -#define WINDOW_POSSIZE_SIZE (WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT) -#define WINDOW_POSSIZE_POSSIZE (WINDOW_POSSIZE_POS | WINDOW_POSSIZE_SIZE) -#define WINDOW_POSSIZE_ALL (WINDOW_POSSIZE_POSSIZE) -#define WINDOW_POSSIZE_DROPDOWN ((sal_uInt16)0x0010) +// These must match the definitions in css::awt::PosSize +enum class PosSizeFlags +{ + NONE = 0x0000, + X = 0x0001, + Y = 0x0002, + Width = 0x0004, + Height = 0x0008, + Pos = X | Y, + Size = Width | Height, + PosSize = Pos | Size, + All = PosSize, + Dropdown = 0x0010, +}; +namespace o3tl +{ + template<> struct typed_flags<PosSizeFlags> : is_typed_flags<PosSizeFlags, 0x001f> {}; +} // Flags for Show() #define SHOW_NOPARENTUPDATE ((sal_uInt16)0x0001) @@ -498,7 +506,7 @@ public: SAL_DLLPRIVATE void ImplMirrorFramePos( Point &pt ) const; - SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ); + SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags ); SAL_DLLPRIVATE void ImplAddDel( ImplDelData* pDel ); SAL_DLLPRIVATE void ImplRemoveDel( ImplDelData* pDel ); @@ -992,7 +1000,7 @@ public: virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); + PosSizeFlags nFlags = PosSizeFlags::All ); virtual void SetPosPixel( const Point& rNewPos ); virtual Point GetPosPixel() const; virtual void SetSizePixel( const Size& rNewSize ); diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index fb139634a1a2..aab46e9d2e5c 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -113,9 +113,9 @@ void ScCsvRuler::dispose() // common ruler handling ------------------------------------------------------ void ScCsvRuler::setPosSizePixel( - long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) + long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags ) { - if( nFlags & WINDOW_POSSIZE_HEIGHT ) + if( nFlags & PosSizeFlags::Height ) nHeight = GetTextHeight() + mnSplitSize + 2; ScCsvControl::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); } diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx index 6fc719db43f4..44f8a765bddb 100644 --- a/sc/source/ui/inc/csvruler.hxx +++ b/sc/source/ui/inc/csvruler.hxx @@ -63,7 +63,7 @@ public: virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE; + PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE; /** Apply current layout data to the ruler. */ void ApplyLayout( const ScCsvLayoutData& rOldData ); diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 77bf5a495731..04ec62ba7521 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -600,7 +600,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl (aTbxCmd->GetPosPixel().Y() + aTbxCmd->GetSizePixel().Height()), (aEdRow->GetPosPixel().Y() + aEdRow->GetSizePixel().Height()) ) + 4; - aLbEntries->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y); + aLbEntries->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y); nBorderOffset = aLbEntries->GetPosPixel().X(); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index ae200c609e1e..ae1f66e41731 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -101,7 +101,7 @@ SdNavigatorWin::SdNavigatorWin( // TreeListBox // set position below toolbox long nListboxYPos = maToolbox->GetPosPixel().Y() + maToolbox->GetSizePixel().Height() + 4; - maTlbObjects->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); + maTlbObjects->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y ); maTlbObjects->SetDoubleClickHdl( LINK( this, SdNavigatorWin, ClickObjectHdl ) ); maTlbObjects->SetSelectionMode( SINGLE_SELECTION ); // set focus to listbox, otherwise it is in the toolbox which is only useful @@ -113,14 +113,14 @@ SdNavigatorWin::SdNavigatorWin( maLbDocs->SetSelectHdl( LINK( this, SdNavigatorWin, SelectDocumentHdl ) ); // set position below treelistbox nListboxYPos = maTlbObjects->GetPosPixel().Y() + maTlbObjects->GetSizePixel().Height() + 4; - maLbDocs->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); + maLbDocs->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y ); // assure that tool box is at least as wide as the tree list box { const Size aTlbSize( maTlbObjects->GetOutputSizePixel() ); if ( aTlbSize.Width() > aTbxSize.Width() ) { - maToolbox->setPosSizePixel( 0, 0, aTlbSize.Width(), 0, WINDOW_POSSIZE_WIDTH ); + maToolbox->setPosSizePixel( 0, 0, aTlbSize.Width(), 0, PosSizeFlags::Width ); aTbxSize = maToolbox->GetOutputSizePixel(); } } diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index ba6f706a76fd..4bcdf562f3f2 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -240,7 +240,7 @@ void ThumbnailView::ImplInitScrollBar() { // adapt the width because of the changed settings long nScrBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); - mpScrBar->setPosSizePixel( 0, 0, nScrBarWidth, 0, WINDOW_POSSIZE_WIDTH ); + mpScrBar->setPosSizePixel( 0, 0, nScrBarWidth, 0, PosSizeFlags::Width ); } } } diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx index 7c5d7157607a..987e9536e41f 100644 --- a/sfx2/source/doc/plugin.cxx +++ b/sfx2/source/doc/plugin.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/plugin/XPluginManager.hpp> #include <com/sun/star/plugin/PluginMode.hpp> #include <com/sun/star/awt/XControl.hpp> +#include <com/sun/star/awt/PosSize.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/frame/XSynchronousFrameLoader.hpp> #include <com/sun/star/lang/XEventListener.hpp> @@ -60,7 +61,7 @@ void PluginWindow_Impl::Resize() { Size aSize( GetOutputSizePixel() ); if ( xWindow.is() ) - xWindow->setPosSize( 0, 0, aSize.Width(), aSize.Height(), WINDOW_POSSIZE_SIZE ); + xWindow->setPosSize( 0, 0, aSize.Width(), aSize.Height(), css::awt::PosSize::SIZE ); } #define PROPERTY_UNBOUND 0 diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx index fd3c1a9439b9..239cf0413131 100644 --- a/sfx2/source/sidebar/TitleBar.cxx +++ b/sfx2/source/sidebar/TitleBar.cxx @@ -94,13 +94,13 @@ void TitleBar::DataChanged (const DataChangedEvent& /*rEvent*/) Invalidate(); } -void TitleBar::setPosSizePixel (long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags) +void TitleBar::setPosSizePixel (long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags) { Window::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags); // Place the toolbox. const sal_Int32 nToolBoxWidth (maToolBox->GetItemPosRect(0).GetWidth()); - maToolBox->setPosSizePixel(nWidth - nToolBoxWidth,0, nToolBoxWidth, nHeight, WINDOW_POSSIZE_POSSIZE); + maToolBox->setPosSizePixel(nWidth - nToolBoxWidth,0, nToolBoxWidth, nHeight, PosSizeFlags::PosSize); maToolBox->Show(); } diff --git a/sfx2/source/sidebar/TitleBar.hxx b/sfx2/source/sidebar/TitleBar.hxx index 3372385d2588..b0bc5d813816 100644 --- a/sfx2/source/sidebar/TitleBar.hxx +++ b/sfx2/source/sidebar/TitleBar.hxx @@ -41,7 +41,7 @@ public: virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE; virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea) SAL_OVERRIDE; virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE; - virtual void setPosSizePixel (long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE; + virtual void setPosSizePixel (long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) SAL_OVERRIDE; ToolBox& GetToolBox() { diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index ffd68d62ff7f..e560bcd67dcc 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -2222,7 +2222,7 @@ void ImplCFieldFloatWin::ArrangeButtons() } long nLineWidth = aOutSize.Width()-(CALFIELD_BORDERLINE_X*2); mpFixedLine->setPosSizePixel( (aOutSize.Width()-nLineWidth)/2, aOutSize.Height()+((CALFIELD_BORDER_YTOP-2)/2), - nLineWidth, 2, WINDOW_POSSIZE_POSSIZE ); + nLineWidth, 2, PosSizeFlags::PosSize ); aOutSize.Height() += nBtnHeight + (CALFIELD_BORDER_Y*2) + CALFIELD_BORDER_YTOP; SetOutputSizePixel( aOutSize ); } diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 49e784aa7a0c..218034695a13 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -219,7 +219,7 @@ void ValueSet::ImplInitScrollBar() { // adapt the width because of the changed settings long nScrBarWidth = Application::GetSettings().GetStyleSettings().GetScrollBarSize(); - mxScrollBar->setPosSizePixel(0, 0, nScrBarWidth, 0, WINDOW_POSSIZE_WIDTH); + mxScrollBar->setPosSizePixel(0, 0, nScrBarWidth, 0, PosSizeFlags::Width); } } } diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 2855ada2dbe7..39d63906d5c5 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -195,13 +195,13 @@ void WizardDialog::ImplPosCtrls() long nViewWidth = 0; long nViewHeight = 0; long nDlgHeight = nOffY; - sal_uInt16 nViewPosFlags = WINDOW_POSSIZE_POS; + PosSizeFlags nViewPosFlags = PosSizeFlags::Pos; if ( meViewAlign == WINDOWALIGN_TOP ) { nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X; nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; nViewWidth = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2); - nViewPosFlags |= WINDOW_POSSIZE_WIDTH; + nViewPosFlags |= PosSizeFlags::Width; } else if ( meViewAlign == WINDOWALIGN_LEFT ) { @@ -217,21 +217,21 @@ void WizardDialog::ImplPosCtrls() nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; nViewHeight = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2); } - nViewPosFlags |= WINDOW_POSSIZE_HEIGHT; + nViewPosFlags |= PosSizeFlags::Height; } else if ( meViewAlign == WINDOWALIGN_BOTTOM ) { nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X; nViewOffY = nDlgHeight-mpViewWindow->GetSizePixel().Height()-WIZARDDIALOG_VIEW_DLGOFFSET_Y; nViewWidth = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2); - nViewPosFlags |= WINDOW_POSSIZE_WIDTH; + nViewPosFlags |= PosSizeFlags::Width; } else if ( meViewAlign == WINDOWALIGN_RIGHT ) { nViewOffX = aDlgSize.Width()-mpViewWindow->GetSizePixel().Width()-WIZARDDIALOG_VIEW_DLGOFFSET_X; nViewOffY = WIZARDDIALOG_VIEW_DLGOFFSET_Y; nViewHeight = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2); - nViewPosFlags |= WINDOW_POSSIZE_HEIGHT; + nViewPosFlags |= PosSizeFlags::Height; } mpViewWindow->setPosSizePixel( nViewOffX, nViewOffY, nViewWidth, nViewHeight, diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx index 1b5173d31e99..591dfe390eea 100644 --- a/svx/source/sidebar/PanelLayout.cxx +++ b/svx/source/sidebar/PanelLayout.cxx @@ -69,7 +69,7 @@ IMPL_LINK_NOARG_TYPED( PanelLayout, ImplHandlePanelLayoutTimerHdl, Idle*, void ) VclContainer::setLayoutAllocation(*pChild, Point(0, 0), GetSizePixel()); } -void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags) +void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags) { bool bCanHandleSmallerWidth = false; bool bCanHandleSmallerHeight = false; @@ -94,7 +94,7 @@ void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, s Control::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags); - if (bIsLayoutEnabled && (nFlags & WINDOW_POSSIZE_SIZE)) + if (bIsLayoutEnabled && (nFlags & PosSizeFlags::Size)) VclContainer::setLayoutAllocation(*pChild, Point(0, 0), Size(nWidth, nHeight)); } diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 25e7277c8844..0872760cff53 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -632,7 +632,7 @@ void SwNavigationPI::Resize() aGlobalTree->SetSizePixel(aNewSize); aDocListBox->setPosSizePixel( aLBPos.X(), aLBPos.Y(), aDocLBSz.Width(), aDocLBSz.Height(), - WINDOW_POSSIZE_X|WINDOW_POSSIZE_Y|WINDOW_POSSIZE_WIDTH); + PosSizeFlags::X|PosSizeFlags::Y|PosSizeFlags::Width); } } @@ -754,7 +754,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, } } - aContentTree->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); + aContentTree->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y ); aContentTree->SetStyle( aContentTree->GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE ); aContentTree->SetSpaceBetweenEntries(3); @@ -767,7 +767,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aContentToolBox->CheckItem(FN_SHOW_CONTENT_BOX, true); // TreeListBox for global document - aGlobalTree->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); + aGlobalTree->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y ); aGlobalTree->SetSelectionMode( MULTIPLE_SELECTION ); aGlobalTree->SetStyle( aGlobalTree->GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT| WB_CLIPCHILDREN|WB_HSCROLL ); diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index e2439fcad15a..f315f99c4508 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -970,9 +970,9 @@ void VCLXWindow::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int3 if ( GetWindow() ) { if( vcl::Window::GetDockingManager()->IsDockable( GetWindow() ) ) - vcl::Window::GetDockingManager()->SetPosSizePixel( GetWindow() , X, Y, Width, Height, Flags ); + vcl::Window::GetDockingManager()->SetPosSizePixel( GetWindow() , X, Y, Width, Height, static_cast<PosSizeFlags>(Flags) ); else - GetWindow()->setPosSizePixel( X, Y, Width, Height, Flags ); + GetWindow()->setPosSizePixel( X, Y, Width, Height, static_cast<PosSizeFlags>(Flags) ); } } diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx index bceba393ec53..8a5bca2a608b 100644 --- a/vcl/inc/ilstbox.hxx +++ b/vcl/inc/ilstbox.hxx @@ -536,7 +536,7 @@ public: void StartFloat( bool bStartTracking ); virtual void setPosSizePixel( long nX, long nY, - long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE; + long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE; void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE { FloatingWindow::SetPosSizePixel( rNewPos, rNewSize ); } diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 1cd46dd5d6ad..d2f128a9f7ce 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1159,7 +1159,7 @@ void PushButton::ImplSetDefButton( bool bSet ) ImplGetButtonState() &= ~DrawButtonFlags::Default; } if( bSetPos ) - setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), WINDOW_POSSIZE_ALL ); + setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), PosSizeFlags::All ); Invalidate(); } @@ -3463,7 +3463,7 @@ void CheckBox::GetFocus() aPos.Move(-1,-1); aSize.Height() += 2; aSize.Width() += 2; - setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), WINDOW_POSSIZE_ALL ); + setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), PosSizeFlags::All ); Invalidate(); } else @@ -3494,7 +3494,7 @@ void CheckBox::LoseFocus() aPos.Move(1,1); aSize.Height() -= 2; aSize.Width() -= 2; - setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), WINDOW_POSSIZE_ALL ); + setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), PosSizeFlags::All ); Invalidate(); } } diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 399127408eba..dde32dfa3fa2 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -537,18 +537,18 @@ sal_uInt16 ComboBox::GetDropDownLineCount() const } void ComboBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags ) + PosSizeFlags nFlags ) { - if( IsDropDownBox() && ( nFlags & WINDOW_POSSIZE_SIZE ) ) + if( IsDropDownBox() && ( nFlags & PosSizeFlags::Size ) ) { Size aPrefSz = mpFloatWin->GetPrefSize(); - if ( ( nFlags & WINDOW_POSSIZE_HEIGHT ) && ( nHeight >= 2*mnDDHeight ) ) + if ( ( nFlags & PosSizeFlags::Height ) && ( nHeight >= 2*mnDDHeight ) ) aPrefSz.Height() = nHeight-mnDDHeight; - if ( nFlags & WINDOW_POSSIZE_WIDTH ) + if ( nFlags & PosSizeFlags::Width ) aPrefSz.Width() = nWidth; mpFloatWin->SetPrefSize( aPrefSz ); - if ( IsAutoSizeEnabled() && ! (nFlags & WINDOW_POSSIZE_DROPDOWN) ) + if ( IsAutoSizeEnabled() && ! (nFlags & PosSizeFlags::Dropdown) ) nHeight = mnDDHeight; } diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 0407eedd6660..e9c4f92f2eb7 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -3036,21 +3036,21 @@ bool ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt ) return FloatingWindow::PreNotify( rNEvt ); } -void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) +void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags ) { FloatingWindow::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); // Fix #60890# ( MBA ): to be able to resize the Listbox even in its open state // after a call to Resize(), we adjust its position if necessary - if ( IsReallyVisible() && ( nFlags & WINDOW_POSSIZE_HEIGHT ) ) + if ( IsReallyVisible() && ( nFlags & PosSizeFlags::Height ) ) { Point aPos = GetParent()->GetPosPixel(); aPos = GetParent()->GetParent()->OutputToScreenPixel( aPos ); - if ( nFlags & WINDOW_POSSIZE_X ) + if ( nFlags & PosSizeFlags::X ) aPos.X() = nX; - if ( nFlags & WINDOW_POSSIZE_Y ) + if ( nFlags & PosSizeFlags::Y ) aPos.Y() = nY; sal_uInt16 nIndex; diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 58d9c1341dac..4fbc24e5495d 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -605,18 +605,18 @@ sal_uInt16 ListBox::GetDropDownLineCount() const return mnLineCount; } -void ListBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) +void ListBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags ) { - if( IsDropDownBox() && ( nFlags & WINDOW_POSSIZE_SIZE ) ) + if( IsDropDownBox() && ( nFlags & PosSizeFlags::Size ) ) { Size aPrefSz = mpFloatWin->GetPrefSize(); - if ( ( nFlags & WINDOW_POSSIZE_HEIGHT ) && ( nHeight >= 2*mnDDHeight ) ) + if ( ( nFlags & PosSizeFlags::Height ) && ( nHeight >= 2*mnDDHeight ) ) aPrefSz.Height() = nHeight-mnDDHeight; - if ( nFlags & WINDOW_POSSIZE_WIDTH ) + if ( nFlags & PosSizeFlags::Width ) aPrefSz.Width() = nWidth; mpFloatWin->SetPrefSize( aPrefSz ); - if ( IsAutoSizeEnabled() && ! (nFlags & WINDOW_POSSIZE_DROPDOWN) ) + if ( IsAutoSizeEnabled() && ! (nFlags & PosSizeFlags::Dropdown) ) nHeight = mnDDHeight; } diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 55d1c9f29511..406dbe2b2372 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -854,10 +854,10 @@ bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track // no move (only resize) if position did not change if( aOldPos != aNewRect.TopLeft() ) pBorderWindow->setPosSizePixel( aNewRect.Left(), aNewRect.Top(), - aNewRect.GetWidth(), aNewRect.GetHeight(), WINDOW_POSSIZE_POSSIZE ); + aNewRect.GetWidth(), aNewRect.GetHeight(), PosSizeFlags::PosSize ); else pBorderWindow->setPosSizePixel( aNewRect.Left(), aNewRect.Top(), - aNewRect.GetWidth(), aNewRect.GetHeight(), WINDOW_POSSIZE_SIZE ); + aNewRect.GetWidth(), aNewRect.GetHeight(), PosSizeFlags::Size ); pBorderWindow->ImplUpdateAll(); pBorderWindow->ImplGetFrameWindow()->ImplUpdateAll(); @@ -1959,8 +1959,8 @@ void ImplBorderWindow::Resize() nTopBorder, aSize.Width()-nLeftBorder-nRightBorder, nMenuHeight, - WINDOW_POSSIZE_POS | - WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT ); + PosSizeFlags::Pos | + PosSizeFlags::Width | PosSizeFlags::Height ); } GetBorder( pClientWindow->mpWindowImpl->mnLeftBorder, pClientWindow->mpWindowImpl->mnTopBorder, @@ -1969,8 +1969,8 @@ void ImplBorderWindow::Resize() pClientWindow->mpWindowImpl->mnTopBorder, aSize.Width()-pClientWindow->mpWindowImpl->mnLeftBorder-pClientWindow->mpWindowImpl->mnRightBorder, aSize.Height()-pClientWindow->mpWindowImpl->mnTopBorder-pClientWindow->mpWindowImpl->mnBottomBorder, - WINDOW_POSSIZE_X | WINDOW_POSSIZE_Y | - WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT ); + PosSizeFlags::X | PosSizeFlags::Y | + PosSizeFlags::Width | PosSizeFlags::Height ); } // UpdateView diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 38111425583e..52708dd7e865 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -253,7 +253,7 @@ void ImplDockFloatWin2::Resize() { FloatingWindow::Resize(); Size aSize( GetSizePixel() ); - mpDockWin->GetWindow()->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), WINDOW_POSSIZE_POSSIZE ); // TODO: is this needed ??? + mpDockWin->GetWindow()->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), PosSizeFlags::PosSize ); // TODO: is this needed ??? } } @@ -429,7 +429,7 @@ void DockingManager::RemoveWindow( const vcl::Window *pWindow ) void DockingManager::SetPosSizePixel( vcl::Window *pWindow, long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags ) + PosSizeFlags nFlags ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) @@ -1318,7 +1318,7 @@ void ImplDockingWindowWrapper::SetFloatStyle( WinBits nStyle ) void ImplDockingWindowWrapper::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags ) + PosSizeFlags nFlags ) { if ( mpFloatWin ) mpFloatWin->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 2c4704d8b6fb..e76b1c629809 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -216,7 +216,7 @@ void ImplDockFloatWin::Resize() { FloatingWindow::Resize(); Size aSize( GetSizePixel() ); - mpDockWin->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), WINDOW_POSSIZE_POSSIZE ); + mpDockWin->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), PosSizeFlags::PosSize ); } void ImplDockFloatWin::TitleButtonClick( TitleButton nButton ) @@ -916,7 +916,7 @@ WinBits DockingWindow::GetFloatStyle() const void DockingWindow::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, - sal_uInt16 nFlags ) + PosSizeFlags nFlags ) { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if (pWrapper) diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 1898d66104ff..fc266f2c61f3 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -208,7 +208,7 @@ void MenuBarWindow::SetMenu( MenuBar* pMen ) void MenuBarWindow::SetHeight(long nHeight) { - setPosSizePixel(0, 0, 0, nHeight, WINDOW_POSSIZE_HEIGHT); + setPosSizePixel(0, 0, 0, nHeight, PosSizeFlags::Height); } void MenuBarWindow::ShowButtons( bool bClose, bool bFloat, bool bHide ) @@ -1013,7 +1013,7 @@ void MenuBarWindow::LayoutChanged() { nHeight = 0; } - setPosSizePixel(0, 0, 0, nHeight, WINDOW_POSSIZE_HEIGHT); + setPosSizePixel(0, 0, 0, nHeight, PosSizeFlags::Height); GetParent()->Resize(); Invalidate(); Resize(); diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index a85fe4a0ca1e..d348e2b15e84 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -748,15 +748,15 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) } else { - sal_uInt16 nPosSize = 0; + PosSizeFlags nPosSize = PosSizeFlags::NONE; if ( nValidMask & WINDOWSTATE_MASK_X ) - nPosSize |= WINDOW_POSSIZE_X; + nPosSize |= PosSizeFlags::X; if ( nValidMask & WINDOWSTATE_MASK_Y ) - nPosSize |= WINDOW_POSSIZE_Y; + nPosSize |= PosSizeFlags::Y; if ( nValidMask & WINDOWSTATE_MASK_WIDTH ) - nPosSize |= WINDOW_POSSIZE_WIDTH; + nPosSize |= PosSizeFlags::Width; if ( nValidMask & WINDOWSTATE_MASK_HEIGHT ) - nPosSize |= WINDOW_POSSIZE_HEIGHT; + nPosSize |= PosSizeFlags::Height; if( IsRollUp() ) RollDown(); diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index 47e9912bfc73..1080cb8eb421 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -95,14 +95,14 @@ void TabDialog::ImplPosControls() long nViewOffY = 0; long nViewWidth = 0; long nViewHeight = 0; - sal_uInt16 nViewPosFlags = WINDOW_POSSIZE_POS; + PosSizeFlags nViewPosFlags = PosSizeFlags::Pos; Size aViewSize = mpViewWindow->GetSizePixel(); if ( meViewAlign == WINDOWALIGN_TOP ) { nViewOffX = aTabOffset.X(); nViewOffY = nOffY+IMPL_DIALOG_OFFSET; nViewWidth = aTabSize.Width(); - nViewPosFlags |= WINDOW_POSSIZE_WIDTH; + nViewPosFlags |= PosSizeFlags::Width; aTabOffset.Y() += aViewSize.Height()+IMPL_DIALOG_OFFSET; aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET; } @@ -111,7 +111,7 @@ void TabDialog::ImplPosControls() nViewOffX = aTabOffset.X(); nViewOffY = aTabOffset.Y()+aTabSize.Height()+IMPL_DIALOG_OFFSET; nViewWidth = aTabSize.Width(); - nViewPosFlags |= WINDOW_POSSIZE_WIDTH; + nViewPosFlags |= PosSizeFlags::Width; aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET; } else if ( meViewAlign == WINDOWALIGN_RIGHT ) @@ -119,7 +119,7 @@ void TabDialog::ImplPosControls() nViewOffX = aTabOffset.X()+aTabSize.Width()+IMPL_DIALOG_OFFSET; nViewOffY = aTabOffset.Y(); nViewHeight = aTabSize.Height(); - nViewPosFlags |= WINDOW_POSSIZE_HEIGHT; + nViewPosFlags |= PosSizeFlags::Height; aDlgSize.Width() += aViewSize.Width()+IMPL_DIALOG_OFFSET; nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET; } @@ -128,7 +128,7 @@ void TabDialog::ImplPosControls() nViewOffX = IMPL_DIALOG_OFFSET; nViewOffY = aTabOffset.Y(); nViewHeight = aTabSize.Height(); - nViewPosFlags |= WINDOW_POSSIZE_HEIGHT; + nViewPosFlags |= PosSizeFlags::Height; aTabOffset.X() += aViewSize.Width()+IMPL_DIALOG_OFFSET; aDlgSize.Width() += aViewSize.Width()+IMPL_DIALOG_OFFSET; nBtnEx = aViewSize.Width()+IMPL_DIALOG_OFFSET; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 4e99263e2bf7..b9ea0e6ba56a 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1537,7 +1537,7 @@ void Window::ImplUpdateSysObjPos() } void Window::ImplPosSizeWindow( long nX, long nY, - long nWidth, long nHeight, sal_uInt16 nFlags ) + long nWidth, long nHeight, PosSizeFlags nFlags ) { bool bNewPos = false; bool bNewSize = false; @@ -1567,12 +1567,12 @@ void Window::ImplPosSizeWindow( long nX, long nY, } bool bnXRecycled = false; // avoid duplicate mirroring in RTL case - if ( nFlags & WINDOW_POSSIZE_WIDTH ) + if ( nFlags & PosSizeFlags::Width ) { - if(!( nFlags & WINDOW_POSSIZE_X )) + if(!( nFlags & PosSizeFlags::X )) { nX = mpWindowImpl->mnX; - nFlags |= WINDOW_POSSIZE_X; + nFlags |= PosSizeFlags::X; bnXRecycled = true; // we're using a mnX which was already mirrored in RTL case } @@ -1585,7 +1585,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, bCopyBits = false; } } - if ( nFlags & WINDOW_POSSIZE_HEIGHT ) + if ( nFlags & PosSizeFlags::Height ) { if ( nHeight < 0 ) nHeight = 0; @@ -1597,7 +1597,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, } } - if ( nFlags & WINDOW_POSSIZE_X ) + if ( nFlags & PosSizeFlags::X ) { long nOrgX = nX; // --- RTL --- (compare the screen coordinates) @@ -1652,7 +1652,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, bNewPos = true; } } - if ( nFlags & WINDOW_POSSIZE_Y ) + if ( nFlags & PosSizeFlags::Y ) { // check maPos as well, as it could have been changed for client windows (ImplCallMove()) if ( nY != mpWindowImpl->mnY || nY != mpWindowImpl->maPos.Y() ) @@ -1686,8 +1686,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, mpWindowImpl->mpClientWindow->mpWindowImpl->mnTopBorder, mnOutWidth-mpWindowImpl->mpClientWindow->mpWindowImpl->mnLeftBorder-mpWindowImpl->mpClientWindow->mpWindowImpl->mnRightBorder, mnOutHeight-mpWindowImpl->mpClientWindow->mpWindowImpl->mnTopBorder-mpWindowImpl->mpClientWindow->mpWindowImpl->mnBottomBorder, - WINDOW_POSSIZE_X | WINDOW_POSSIZE_Y | - WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT ); + PosSizeFlags::X | PosSizeFlags::Y | + PosSizeFlags::Width | PosSizeFlags::Height ); // If we have a client window, then this is the position // of the Application's floating windows mpWindowImpl->mpClientWindow->mpWindowImpl->maPos = mpWindowImpl->maPos; @@ -2831,14 +2831,14 @@ void Window::SetActivateMode( sal_uInt16 nMode ) } void Window::setPosSizePixel( long nX, long nY, - long nWidth, long nHeight, sal_uInt16 nFlags ) + long nWidth, long nHeight, PosSizeFlags nFlags ) { bool bHasValidSize = !mpWindowImpl->mbDefSize; - if ( nFlags & WINDOW_POSSIZE_POS ) + if ( nFlags & PosSizeFlags::Pos ) mpWindowImpl->mbDefPos = false; - if ( nFlags & WINDOW_POSSIZE_SIZE ) + if ( nFlags & PosSizeFlags::Size ) mpWindowImpl->mbDefSize = false; // The top BorderWindow is the window which is to be positioned @@ -2853,19 +2853,19 @@ void Window::setPosSizePixel( long nX, long nY, // as the position of the border ! (due to limitations of several UNIX window managers) long nOldWidth = pWindow->mnOutWidth; - if ( !(nFlags & WINDOW_POSSIZE_WIDTH) ) + if ( !(nFlags & PosSizeFlags::Width) ) nWidth = pWindow->mnOutWidth; - if ( !(nFlags & WINDOW_POSSIZE_HEIGHT) ) + if ( !(nFlags & PosSizeFlags::Height) ) nHeight = pWindow->mnOutHeight; sal_uInt16 nSysFlags=0; vcl::Window *pParent = GetParent(); - if( nFlags & WINDOW_POSSIZE_WIDTH ) + if( nFlags & PosSizeFlags::Width ) nSysFlags |= SAL_FRAME_POSSIZE_WIDTH; - if( nFlags & WINDOW_POSSIZE_HEIGHT ) + if( nFlags & PosSizeFlags::Height ) nSysFlags |= SAL_FRAME_POSSIZE_HEIGHT; - if( nFlags & WINDOW_POSSIZE_X ) + if( nFlags & PosSizeFlags::X ) { nSysFlags |= SAL_FRAME_POSSIZE_X; if( pParent && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) ) @@ -2881,7 +2881,7 @@ void Window::setPosSizePixel( long nX, long nY, nX = aRect.Left(); } } - if( !(nFlags & WINDOW_POSSIZE_X) && bHasValidSize && pWindow->mpWindowImpl->mpFrame->maGeometry.nWidth ) + if( !(nFlags & PosSizeFlags::X) && bHasValidSize && pWindow->mpWindowImpl->mpFrame->maGeometry.nWidth ) { // --- RTL --- make sure the old right aligned position is not changed // system windows will always grow to the right @@ -2895,15 +2895,15 @@ void Window::setPosSizePixel( long nX, long nY, myWidth = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nWidth; if( !myWidth ) myWidth = nWidth; - nFlags |= WINDOW_POSSIZE_X; + nFlags |= PosSizeFlags::X; nSysFlags |= SAL_FRAME_POSSIZE_X; nX = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - pParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nLeftDecoration; nX = pParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nLeftDecoration + pParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nWidth - myWidth - 1 - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX; - if(!(nFlags & WINDOW_POSSIZE_Y)) + if(!(nFlags & PosSizeFlags::Y)) { - nFlags |= WINDOW_POSSIZE_Y; + nFlags |= PosSizeFlags::Y; nSysFlags |= SAL_FRAME_POSSIZE_Y; nY = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nY - pWindow->GetParent()->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nY - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nTopDecoration; @@ -2911,7 +2911,7 @@ void Window::setPosSizePixel( long nX, long nY, } } } - if( nFlags & WINDOW_POSSIZE_Y ) + if( nFlags & PosSizeFlags::Y ) { nSysFlags |= SAL_FRAME_POSSIZE_Y; if( pParent && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) ) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index fc52397a2bc8..c38a2b25f8d7 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1411,20 +1411,20 @@ VCLXWindow* Window::GetWindowPeer() const void Window::SetPosPixel( const Point& rNewPos ) { - setPosSizePixel( rNewPos.X(), rNewPos.Y(), 0, 0, WINDOW_POSSIZE_POS ); + setPosSizePixel( rNewPos.X(), rNewPos.Y(), 0, 0, PosSizeFlags::Pos ); } void Window::SetSizePixel( const Size& rNewSize ) { setPosSizePixel( 0, 0, rNewSize.Width(), rNewSize.Height(), - WINDOW_POSSIZE_SIZE ); + PosSizeFlags::Size ); } void Window::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) { setPosSizePixel( rNewPos.X(), rNewPos.Y(), rNewSize.Width(), rNewSize.Height(), - WINDOW_POSSIZE_POSSIZE ); + PosSizeFlags::PosSize ); } void Window::SetOutputSizePixel( const Size& rNewSize ) |