summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/source/bibliography/bibbeam.cxx4
-rw-r--r--extensions/source/bibliography/bibcont.cxx4
-rw-r--r--include/sfx2/dockwin.hxx3
-rw-r--r--include/vcl/splitwin.hxx27
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx6
-rw-r--r--sfx2/source/appl/newhelp.cxx10
-rw-r--r--sfx2/source/dialog/dockwin.cxx5
-rw-r--r--sfx2/source/dialog/splitwin.cxx12
-rw-r--r--vcl/source/window/splitwin.cxx74
9 files changed, 76 insertions, 69 deletions
diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx
index 1699b8ddbd28..ff1a73171875 100644
--- a/extensions/source/bibliography/bibbeam.cxx
+++ b/extensions/source/bibliography/bibbeam.cxx
@@ -226,7 +226,7 @@ namespace bib
{
pToolBar= VclPtr<BibToolBar>::Create(this, LINK( this, BibBeamer, RecalcLayout_Impl ));
::Size aSize=pToolBar->GetSizePixel();
- InsertItem(ID_TOOLBAR, pToolBar, aSize.Height(), 0, 0, SWIB_FIXED );
+ InsertItem(ID_TOOLBAR, pToolBar, aSize.Height(), 0, 0, SplitWindowItemFlags::Fixed );
if ( m_xController.is() )
pToolBar->SetXController( m_xController );
}
@@ -235,7 +235,7 @@ namespace bib
{
pGridWin = VclPtr<BibGridwin>::Create(this,0);
- InsertItem(ID_GRIDWIN, pGridWin, 40, 1, 0, SWIB_RELATIVESIZE );
+ InsertItem(ID_GRIDWIN, pGridWin, 40, 1, 0, SplitWindowItemFlags::RelativeSize );
pGridWin->createGridWin( pDatMan->updateGridModel() );
}
diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx
index 5c75e528b515..bd1a0693f52b 100644
--- a/extensions/source/bibliography/bibcont.cxx
+++ b/extensions/source/bibliography/bibcont.cxx
@@ -186,7 +186,7 @@ void BibBookContainer::createTopFrame( BibShortCutHandler* pWin )
pTopWin->Show();
BibConfig* pConfig = BibModul::GetConfig();
long nSize = pConfig->getBeamerSize();
- InsertItem(TOP_WINDOW, pTopWin, nSize, 1, 0, SWIB_PERCENTSIZE );
+ InsertItem(TOP_WINDOW, pTopWin, nSize, 1, 0, SplitWindowItemFlags::PercentSize );
}
@@ -204,7 +204,7 @@ void BibBookContainer::createBottomFrame( BibShortCutHandler* pWin )
BibConfig* pConfig = BibModul::GetConfig();
long nSize = pConfig->getViewSize();
- InsertItem(BOTTOM_WINDOW, pBottomWin, nSize, 1, 0, SWIB_PERCENTSIZE );
+ InsertItem(BOTTOM_WINDOW, pBottomWin, nSize, 1, 0, SplitWindowItemFlags::PercentSize );
}
diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx
index e929824a9c49..b88f20d00f73 100644
--- a/include/sfx2/dockwin.hxx
+++ b/include/sfx2/dockwin.hxx
@@ -32,6 +32,7 @@
class SfxSplitWindow;
class SfxDockingWindow_Impl;
+enum class SplitWindowItemFlags;
void SFX2_DLLPUBLIC SAL_CALL SfxDockingWindowFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const OUString& rDockingWindowName );
bool SFX2_DLLPUBLIC SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const OUString& rDockingWindowName );
@@ -107,7 +108,7 @@ public:
DECL_LINK_TYPED(TimerHdl, Idle *, void);
SAL_DLLPRIVATE void Initialize_Impl();
- SAL_DLLPRIVATE sal_uInt16 GetWinBits_Impl() const;
+ SAL_DLLPRIVATE SplitWindowItemFlags GetWinBits_Impl() const;
SAL_DLLPRIVATE void SetItemSize_Impl( const Size& rSize );
SAL_DLLPRIVATE void Disappear_Impl();
SAL_DLLPRIVATE void Reappear_Impl();
diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx
index 867a34307a9b..24a58125275e 100644
--- a/include/vcl/splitwin.hxx
+++ b/include/vcl/splitwin.hxx
@@ -22,17 +22,24 @@
#include <vcl/dllapi.h>
#include <vcl/dockwin.hxx>
+#include <o3tl/typed_flags_set.hxx>
class Wallpaper;
class ImplSplitSet;
-typedef sal_uInt16 SplitWindowItemBits;
-
-#define SWIB_FIXED ((SplitWindowItemBits)0x0001)
-#define SWIB_RELATIVESIZE ((SplitWindowItemBits)0x0002)
-#define SWIB_PERCENTSIZE ((SplitWindowItemBits)0x0004)
-#define SWIB_COLSET ((SplitWindowItemBits)0x0008)
-#define SWIB_INVISIBLE ((SplitWindowItemBits)0x0010)
+enum class SplitWindowItemFlags
+{
+ NONE = 0x0000,
+ Fixed = 0x0001,
+ RelativeSize = 0x0002,
+ PercentSize = 0x0004,
+ ColSet = 0x0008,
+ Invisible = 0x0010,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SplitWindowItemFlags> : is_typed_flags<SplitWindowItemFlags, 0x1f> {};
+}
#define SPLITWINDOW_APPEND ((sal_uInt16)0xFFFF)
#define SPLITWINDOW_ITEM_NOTFOUND ((sal_uInt16)0xFFFF)
@@ -146,10 +153,10 @@ public:
void InsertItem( sal_uInt16 nId, vcl::Window* pWindow, long nSize,
sal_uInt16 nPos = SPLITWINDOW_APPEND, sal_uInt16 nIntoSetId = 0,
- SplitWindowItemBits nBits = 0 );
+ SplitWindowItemFlags nBits = SplitWindowItemFlags::NONE );
void InsertItem( sal_uInt16 nId, long nSize,
sal_uInt16 nPos = SPLITWINDOW_APPEND, sal_uInt16 nIntoSetId = 0,
- SplitWindowItemBits nBits = 0 );
+ SplitWindowItemFlags nBits = SplitWindowItemFlags::NONE );
void RemoveItem( sal_uInt16 nId, bool bHide = true );
void Clear();
@@ -169,7 +176,7 @@ public:
void SetItemSizeRange (sal_uInt16 nId, const Range& rRange);
/** Return the current size limits for the specified item.
*/
- long GetItemSize( sal_uInt16 nId, SplitWindowItemBits nBits ) const;
+ long GetItemSize( sal_uInt16 nId, SplitWindowItemFlags nBits ) const;
sal_uInt16 GetSet( sal_uInt16 nId ) const;
sal_uInt16 GetItemId( vcl::Window* pWindow ) const;
sal_uInt16 GetItemId( const Point& rPos ) const;
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 0a6f56714c05..9d9f0ad49fbc 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -111,8 +111,8 @@ ODesignView::ODesignView( vcl::Window* pParent,
// now create the task pane on the right side :-)
m_pTaskPane = VclPtr<OTaskWindow>::Create(this);
- m_aSplitWin->InsertItem( COLSET_ID,100,SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE | SWIB_COLSET );
- m_aSplitWin->InsertItem( REPORT_ID, m_aScrollWindow.get(), 100, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE);
+ m_aSplitWin->InsertItem( COLSET_ID,100,SPLITWINDOW_APPEND, 0, SplitWindowItemFlags::PercentSize | SplitWindowItemFlags::ColSet );
+ m_aSplitWin->InsertItem( REPORT_ID, m_aScrollWindow.get(), 100, SPLITWINDOW_APPEND, COLSET_ID, SplitWindowItemFlags::PercentSize);
// Splitter einrichten
m_aSplitWin->SetSplitHdl(LINK(this, ODesignView,SplitHdl));
@@ -454,7 +454,7 @@ void ODesignView::togglePropertyBrowser(bool _bToogleOn)
m_pTaskPane->Invalidate();
if ( bWillBeVisible )
- m_aSplitWin->InsertItem( TASKPANE_ID, m_pTaskPane,START_SIZE_TASKPANE, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE);
+ m_aSplitWin->InsertItem( TASKPANE_ID, m_pTaskPane,START_SIZE_TASKPANE, SPLITWINDOW_APPEND, COLSET_ID, SplitWindowItemFlags::PercentSize);
else
m_aSplitWin->RemoveItem(TASKPANE_ID);
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 33b717d691dd..c5df153d4029 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2763,15 +2763,15 @@ void SfxHelpWindow_Impl::MakeLayout()
if ( bIndex )
{
pIndexWin->Show();
- InsertItem( COLSET_ID, 100, SPLITWINDOW_APPEND, SPLITSET_ID, SWIB_PERCENTSIZE | SWIB_COLSET );
- InsertItem( INDEXWIN_ID, pIndexWin, nIndexSize, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE );
- InsertItem( TEXTWIN_ID, pTextWin, nTextSize, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE );
+ InsertItem( COLSET_ID, 100, SPLITWINDOW_APPEND, SPLITSET_ID, SplitWindowItemFlags::PercentSize | SplitWindowItemFlags::ColSet );
+ InsertItem( INDEXWIN_ID, pIndexWin, nIndexSize, SPLITWINDOW_APPEND, COLSET_ID, SplitWindowItemFlags::PercentSize );
+ InsertItem( TEXTWIN_ID, pTextWin, nTextSize, SPLITWINDOW_APPEND, COLSET_ID, SplitWindowItemFlags::PercentSize );
}
else
{
pIndexWin->Hide();
- InsertItem( COLSET_ID, 100, SPLITWINDOW_APPEND, SPLITSET_ID, SWIB_PERCENTSIZE | SWIB_COLSET );
- InsertItem( TEXTWIN_ID, pTextWin, 100, SPLITWINDOW_APPEND, 1, SWIB_PERCENTSIZE );
+ InsertItem( COLSET_ID, 100, SPLITWINDOW_APPEND, SPLITSET_ID, SplitWindowItemFlags::PercentSize | SplitWindowItemFlags::ColSet );
+ InsertItem( TEXTWIN_ID, pTextWin, 100, SPLITWINDOW_APPEND, 1, SplitWindowItemFlags::PercentSize );
}
}
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 811baf6dc5a4..8d8c31fb6087 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -1769,10 +1769,9 @@ bool SfxDockingWindow::Notify( NotifyEvent& rEvt )
}
-sal_uInt16 SfxDockingWindow::GetWinBits_Impl() const
+SplitWindowItemFlags SfxDockingWindow::GetWinBits_Impl() const
{
- sal_uInt16 nBits = 0;
- return nBits;
+ return SplitWindowItemFlags::NONE;
}
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index fb56c2891897..8dc5303a5572 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -423,7 +423,7 @@ void SfxSplitWindow::Split()
if ( rD.pWin )
{
const sal_uInt16 nId = rD.nType;
- const long nSize = GetItemSize( nId, SWIB_FIXED );
+ const long nSize = GetItemSize( nId, SplitWindowItemFlags::Fixed );
const long nSetSize = GetItemSize( GetSet( nId ) );
Size aSize;
@@ -682,7 +682,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
{
SfxDockingWindow* pDockWin = pDock->pWin;
- sal_uInt16 nItemBits = pDockWin->GetWinBits_Impl();
+ SplitWindowItemFlags nItemBits = pDockWin->GetWinBits_Impl();
long nWinSize, nSetSize;
if ( IsHorizontal() )
@@ -713,9 +713,9 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
}
// Create a new nLine:th line
- sal_uInt16 nBits = nItemBits;
+ SplitWindowItemFlags nBits = nItemBits;
if ( GetAlign() == WINDOWALIGN_TOP || GetAlign() == WINDOWALIGN_BOTTOM )
- nBits |= SWIB_COLSET;
+ nBits |= SplitWindowItemFlags::ColSet;
InsertItem( nId, nSetSize, nLine, 0, nBits );
}
@@ -723,7 +723,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
// "percentage" share since the SV then does the re-sizing as expected,
// "pixel" actually only makes sense if also items with percentage or
// relative sizes are present.
- nItemBits |= SWIB_PERCENTSIZE;
+ nItemBits |= SplitWindowItemFlags::PercentSize;
bLocked = true;
sal_uInt16 nSet = GetItemId( nLine );
InsertItem( pDockWin->GetType(), pDockWin, nWinSize, nPos, nSet, nItemBits );
@@ -786,7 +786,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
if ( rD.pWin )
{
const sal_uInt16 nId = rD.nType;
- const long nSize = GetItemSize( nId, SWIB_FIXED );
+ const long nSize = GetItemSize( nId, SplitWindowItemFlags::Fixed );
aNewOrgSizes.push_back( std::pair< sal_uInt16, long >( nId, nSize ) );
}
}
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 686348a9f1a6..ceaa757dda0c 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -71,7 +71,7 @@ public:
VclPtr<vcl::Window> mpWindow;
VclPtr<vcl::Window> mpOrgParent;
sal_uInt16 mnId;
- SplitWindowItemBits mnBits;
+ SplitWindowItemFlags mnBits;
bool mbFixed;
bool mbSubSize;
/// Minimal width or height of the item. -1 means no restriction.
@@ -430,7 +430,7 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos,
if ( pItems[i]->mpSet && !pItems[i]->mpSet->mpItems.empty() )
{
return ImplFindItem( pItems[i]->mpSet, rPos,
- ((pItems[i]->mnBits & SWIB_COLSET) == 0) );
+ !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet) );
}
else
return pItems[i]->mnId;
@@ -474,7 +474,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
nVisItems = 0;
for ( i = 0; i < nItems; i++ )
{
- if ( !(pItems[i]->mnBits & SWIB_INVISIBLE) )
+ if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) )
nVisItems++;
}
@@ -494,11 +494,11 @@ static void ImplCalcSet( ImplSplitSet* pSet,
long nAbsSize = 0;
for ( i = 0; i < nItems; i++ )
{
- if ( !(pItems[i]->mnBits & SWIB_INVISIBLE) )
+ if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) )
{
- if ( pItems[i]->mnBits & SWIB_RELATIVESIZE )
+ if ( pItems[i]->mnBits & SplitWindowItemFlags::RelativeSize )
nRelCount += pItems[i]->mnSize;
- else if ( pItems[i]->mnBits & SWIB_PERCENTSIZE )
+ else if ( pItems[i]->mnBits & SplitWindowItemFlags::PercentSize )
nPercent += pItems[i]->mnSize;
else
nAbsSize += pItems[i]->mnSize;
@@ -527,16 +527,16 @@ static void ImplCalcSet( ImplSplitSet* pSet,
nSizeDelta = nCalcSize-nAbsSize;
for ( i = 0; i < nItems; i++ )
{
- if ( pItems[i]->mnBits & SWIB_INVISIBLE )
+ if ( pItems[i]->mnBits & SplitWindowItemFlags::Invisible )
pItems[i]->mnPixSize = 0;
- else if ( pItems[i]->mnBits & SWIB_RELATIVESIZE )
+ else if ( pItems[i]->mnBits & SplitWindowItemFlags::RelativeSize )
{
if ( nSizeDelta <= 0 )
pItems[i]->mnPixSize = 0;
else
pItems[i]->mnPixSize = (nSizeDelta*pItems[i]->mnSize*nRelPercent)/nPercent;
}
- else if ( pItems[i]->mnBits & SWIB_PERCENTSIZE )
+ else if ( pItems[i]->mnBits & SplitWindowItemFlags::PercentSize )
{
if ( nSizeDelta <= 0 )
pItems[i]->mnPixSize = 0;
@@ -562,9 +562,9 @@ static void ImplCalcSet( ImplSplitSet* pSet,
// first resize absolute items relative
for ( i = 0; i < nItems; i++ )
{
- if ( !(pItems[i]->mnBits & SWIB_INVISIBLE) )
+ if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) )
{
- if ( !(pItems[i]->mnBits & (SWIB_RELATIVESIZE | SWIB_PERCENTSIZE)) )
+ if ( !(pItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize)) )
{
nAbsItems++;
nSizeWinSize += pItems[i]->mnPixSize;
@@ -576,9 +576,9 @@ static void ImplCalcSet( ImplSplitSet* pSet,
{
for ( i = 0; i < nItems; i++ )
{
- if ( !(pItems[i]->mnBits & SWIB_INVISIBLE) )
+ if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) )
{
- if ( !(pItems[i]->mnBits & (SWIB_RELATIVESIZE | SWIB_PERCENTSIZE)) )
+ if ( !(pItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize)) )
{
pItems[i]->mnPixSize += (nSizeDelta*pItems[i]->mnPixSize)/nSizeWinSize;
nNewSizeWinSize += pItems[i]->mnPixSize;
@@ -605,7 +605,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
pItems[i]->mbSubSize = true;
else
{
- if ( !(pItems[i]->mnBits & SWIB_INVISIBLE) )
+ if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) )
{
if ( (nSizeDelta > 0) || pItems[i]->mnPixSize )
{
@@ -613,7 +613,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
pItems[i]->mbSubSize = true;
else
{
- if ( (j == 0) && (pItems[i]->mnBits & (SWIB_RELATIVESIZE | SWIB_PERCENTSIZE)) )
+ if ( (j == 0) && (pItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize)) )
pItems[i]->mbSubSize = true;
}
}
@@ -633,7 +633,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
nMins = 0;
for ( i = 0; i < nItems; i++ )
{
- if ( pItems[i]->mnBits & SWIB_INVISIBLE )
+ if ( pItems[i]->mnBits & SplitWindowItemFlags::Invisible )
nMins++;
else if ( pItems[i]->mbSubSize )
{
@@ -702,7 +702,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
pItems[i]->mnOldWidth = pItems[i]->mnWidth;
pItems[i]->mnOldHeight = pItems[i]->mnHeight;
- if ( pItems[i]->mnBits & SWIB_INVISIBLE )
+ if ( pItems[i]->mnBits & SplitWindowItemFlags::Invisible )
bEmpty = true;
else
{
@@ -763,7 +763,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
}
}
- if ( !(pItems[i]->mnBits & SWIB_INVISIBLE) )
+ if ( !(pItems[i]->mnBits & SplitWindowItemFlags::Invisible) )
{
if ( !bDown )
nPos -= pSet->mnSplitSize;
@@ -780,7 +780,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
ImplCalcSet( pItems[i]->mpSet,
pItems[i]->mnLeft, pItems[i]->mnTop,
pItems[i]->mnWidth, pItems[i]->mnHeight,
- ((pItems[i]->mnBits & SWIB_COLSET) == 0) );
+ !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet) );
}
}
@@ -788,7 +788,7 @@ static void ImplCalcSet( ImplSplitSet* pSet,
for ( i = 0; i < nItems; i++ )
{
pItems[i]->mbFixed = false;
- if ( pItems[i]->mnBits & SWIB_FIXED )
+ if ( pItems[i]->mnBits & SplitWindowItemFlags::Fixed )
pItems[i]->mbFixed = true;
else
{
@@ -887,7 +887,7 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool b
if ( !pItems[i]->mnWidth || !pItems[i]->mnHeight )
bTempHide = true;
ImplCalcSet2( pWindow, pItems[i]->mpSet, bTempHide,
- ((pItems[i]->mnBits & SWIB_COLSET) == 0) );
+ !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet) );
}
else
{
@@ -919,22 +919,22 @@ static void ImplCalcLogSize( ImplSplitItems pItems, size_t nItems )
for ( i = 0; i < nItems; i++ )
{
- if ( pItems[i]->mnBits & SWIB_RELATIVESIZE )
+ if ( pItems[i]->mnBits & SplitWindowItemFlags::RelativeSize )
nRelSize += pItems[i]->mnPixSize;
- else if ( pItems[i]->mnBits & SWIB_PERCENTSIZE )
+ else if ( pItems[i]->mnBits & SplitWindowItemFlags::PercentSize )
nPerSize += pItems[i]->mnPixSize;
}
nPerSize += nRelSize;
for ( i = 0; i < nItems; i++ )
{
- if ( pItems[i]->mnBits & SWIB_RELATIVESIZE )
+ if ( pItems[i]->mnBits & SplitWindowItemFlags::RelativeSize )
{
if ( nRelSize )
pItems[i]->mnSize = (pItems[i]->mnPixSize+(nRelSize/2))/nRelSize;
else
pItems[i]->mnSize = 1;
}
- else if ( pItems[i]->mnBits & SWIB_PERCENTSIZE )
+ else if ( pItems[i]->mnBits & SplitWindowItemFlags::PercentSize )
{
if ( nPerSize )
pItems[i]->mnSize = (pItems[i]->mnPixSize*100)/nPerSize;
@@ -1107,7 +1107,7 @@ static void ImplDrawSplit(vcl::RenderContext& rRenderContext, ImplSplitSet* pSet
{
if (pItems[i]->mpSet && pItems[i]->mnWidth && pItems[i]->mnHeight)
{
- ImplDrawSplit(rRenderContext, pItems[i]->mpSet, ((pItems[i]->mnBits & SWIB_COLSET) == 0), bFlat);
+ ImplDrawSplit(rRenderContext, pItems[i]->mpSet, !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet), bFlat);
}
}
}
@@ -1181,7 +1181,7 @@ sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos,
{
nSplitTest = ImplTestSplit( pItems[i]->mpSet, rPos,
rMouseOff, ppFoundSet, rFoundPos,
- ((pItems[i]->mnBits & SWIB_COLSET) == 0) );
+ !(pItems[i]->mnBits & SplitWindowItemFlags::ColSet) );
if ( nSplitTest )
return nSplitTest;
}
@@ -1456,7 +1456,7 @@ Size SplitWindow::CalcLayoutSizePixel( const Size& aNewSize )
for ( i = 0; i < mpMainSet->mpItems.size(); i++ )
{
- if ( mpMainSet->mpItems[i]->mnBits & (SWIB_RELATIVESIZE | SWIB_PERCENTSIZE) )
+ if ( mpMainSet->mpItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize) )
break;
else
nCalcSize += mpMainSet->mpItems[i]->mnSize;
@@ -1521,7 +1521,7 @@ void SplitWindow::ImplCalcLayout()
for ( i = 0; i < mpMainSet->mpItems.size(); i++ )
{
- if ( mpMainSet->mpItems[i]->mnBits & (SWIB_RELATIVESIZE | SWIB_PERCENTSIZE) )
+ if ( mpMainSet->mpItems[i]->mnBits & (SplitWindowItemFlags::RelativeSize | SplitWindowItemFlags::PercentSize) )
break;
else
nCalcSize += mpMainSet->mpItems[i]->mnSize;
@@ -2650,7 +2650,7 @@ void SplitWindow::DataChanged( const DataChangedEvent& rDCEvt )
void SplitWindow::InsertItem( sal_uInt16 nId, vcl::Window* pWindow, long nSize,
sal_uInt16 nPos, sal_uInt16 nIntoSetId,
- SplitWindowItemBits nBits )
+ SplitWindowItemFlags nBits )
{
#ifdef DBG_UTIL
sal_uInt16 nDbgDummy;
@@ -2711,7 +2711,7 @@ void SplitWindow::InsertItem( sal_uInt16 nId, vcl::Window* pWindow, long nSize,
void SplitWindow::InsertItem( sal_uInt16 nId, long nSize,
sal_uInt16 nPos, sal_uInt16 nIntoSetId,
- SplitWindowItemBits nBits )
+ SplitWindowItemFlags nBits )
{
InsertItem( nId, NULL, nSize, nPos, nIntoSetId, nBits );
}
@@ -3035,7 +3035,7 @@ long SplitWindow::GetItemSize( sal_uInt16 nId ) const
return 0;
}
-long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemBits nBits ) const
+long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemFlags nBits ) const
{
sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem( mpBaseSet, nId, nPos );
@@ -3051,7 +3051,7 @@ long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemBits nBits ) const
long nRelSize = 0;
long nPerSize = 0;
size_t nItems;
- SplitWindowItemBits nTempBits;
+ SplitWindowItemFlags nTempBits;
sal_uInt16 i;
nItems = pSet->mpItems.size();
ImplSplitItems& pItems = pSet->mpItems;
@@ -3061,20 +3061,20 @@ long SplitWindow::GetItemSize( sal_uInt16 nId, SplitWindowItemBits nBits ) const
nTempBits = nBits;
else
nTempBits = pItems[i]->mnBits;
- if ( nTempBits & SWIB_RELATIVESIZE )
+ if ( nTempBits & SplitWindowItemFlags::RelativeSize )
nRelSize += pItems[i]->mnPixSize;
- else if ( nTempBits & SWIB_PERCENTSIZE )
+ else if ( nTempBits & SplitWindowItemFlags::PercentSize )
nPerSize += pItems[i]->mnPixSize;
}
nPerSize += nRelSize;
- if ( nBits & SWIB_RELATIVESIZE )
+ if ( nBits & SplitWindowItemFlags::RelativeSize )
{
if ( nRelSize )
return (pItems[nPos]->mnPixSize+(nRelSize/2))/nRelSize;
else
return 1;
}
- else if ( nBits & SWIB_PERCENTSIZE )
+ else if ( nBits & SplitWindowItemFlags::PercentSize )
{
if ( nPerSize )
return (pItems[nPos]->mnPixSize*100)/nPerSize;