svtools/source/contnr/simptabl.cxx |   20 ++++++-------
 svtools/source/contnr/svtabbx.cxx  |   56 +++----------------------------------
 2 files changed, 16 insertions(+), 60 deletions(-)

New commits:
commit 4906ecb8210a8cf1b7befcfde7f867bed5d6ce43
Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
Date:   Mon May 11 19:43:31 2015 +0900

    cleanup SvHeaderTabListBox
    
    Change-Id: I55ccc084ca766460dd466e5ef9b725c13d851acc

diff --git a/svtools/source/contnr/svtabbx.cxx 
b/svtools/source/contnr/svtabbx.cxx
index 0bcd09b..66aa725 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -87,8 +87,6 @@ void SvTabListBox::InitEntry(SvTreeListEntry* pEntry, const 
OUString& rStr,
         pEntry->AddItem( pStr );
     }
 }
-
-
 SvTabListBox::SvTabListBox( vcl::Window* pParent, WinBits nBits )
     : SvTreeListBox( pParent, nBits )
 {
@@ -496,8 +494,6 @@ long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
     return aTabs[ nTab ]->GetPos();
 }
 
-// class SvHeaderTabListBoxImpl ------------------------------------------
-
 namespace svt
 {
     struct SvHeaderTabListBoxImpl
@@ -509,20 +505,14 @@ namespace svt
     };
 }
 
-// class SvHeaderTabListBox ----------------------------------------------
-
-SvHeaderTabListBox::SvHeaderTabListBox( vcl::Window* pParent, WinBits 
nWinStyle ) :
-
-    SvTabListBox( pParent, nWinStyle ),
-
-    m_bFirstPaint   ( true ),
-    m_pImpl         ( new ::svt::SvHeaderTabListBoxImpl ),
-    m_pAccessible   ( NULL )
+SvHeaderTabListBox::SvHeaderTabListBox( vcl::Window* pParent, WinBits 
nWinStyle )
+    : SvTabListBox(pParent, nWinStyle)
+    , m_bFirstPaint(true)
+    , m_pImpl(new ::svt::SvHeaderTabListBoxImpl)
+    , m_pAccessible(NULL)
 {
 }
 
-
-
 SvHeaderTabListBox::~SvHeaderTabListBox()
 {
     disposeOnce();
@@ -534,19 +524,15 @@ void SvHeaderTabListBox::dispose()
     SvTabListBox::dispose();
 }
 
-
-
 void SvHeaderTabListBox::Paint( vcl::RenderContext& rRenderContext, const 
Rectangle& rRect )
 {
-    if ( m_bFirstPaint )
+    if (m_bFirstPaint)
     {
         m_bFirstPaint = false;
     }
     SvTabListBox::Paint(rRenderContext, rRect);
 }
 
-
-
 void SvHeaderTabListBox::InitHeaderBar( HeaderBar* pHeaderBar )
 {
     DBG_ASSERT( !m_pImpl->m_pHeaderBar, "header bar already initialized" );
@@ -556,8 +542,6 @@ void SvHeaderTabListBox::InitHeaderBar( HeaderBar* 
pHeaderBar )
     m_pImpl->m_pHeaderBar->SetCreateAccessibleHdl( LINK( this, 
SvHeaderTabListBox, CreateAccessibleHdl_Impl ) );
 }
 
-
-
 bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 
nCol )
 {
     SvButtonState eState = SV_BUTTON_UNCHECKED;
@@ -572,8 +556,6 @@ bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* 
pEntry, sal_uInt16 nCol
     return ( eState == SV_BUTTON_CHECKED );
 }
 
-
-
 SvTreeListEntry* SvHeaderTabListBox::InsertEntryToColumn(
     const OUString& rStr, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
 {
@@ -582,8 +564,6 @@ SvTreeListEntry* SvHeaderTabListBox::InsertEntryToColumn(
     return pEntry;
 }
 
-
-
 SvTreeListEntry* SvHeaderTabListBox::InsertEntryToColumn(
     const OUString& rStr, SvTreeListEntry* pParent, sal_uLong nPos, sal_uInt16 
nCol, void* pUserData )
 {
@@ -592,8 +572,6 @@ SvTreeListEntry* SvHeaderTabListBox::InsertEntryToColumn(
     return pEntry;
 }
 
-
-
 SvTreeListEntry* SvHeaderTabListBox::InsertEntryToColumn(
     const OUString& rStr, const Image& rExpandedEntryBmp, const Image& 
rCollapsedEntryBmp,
     SvTreeListEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData 
)
@@ -604,8 +582,6 @@ SvTreeListEntry* SvHeaderTabListBox::InsertEntryToColumn(
     return pEntry;
 }
 
-
-
 sal_uLong SvHeaderTabListBox::Insert(
     SvTreeListEntry* pEnt, SvTreeListEntry* pPar, sal_uLong nPos )
 {
@@ -614,8 +590,6 @@ sal_uLong SvHeaderTabListBox::Insert(
     return n;
 }
 
-
-
 sal_uLong SvHeaderTabListBox::Insert( SvTreeListEntry* pEntry, sal_uLong 
nRootPos )
 {
     sal_uLong nPos = SvTabListBox::Insert( pEntry, nRootPos );
@@ -623,32 +597,24 @@ sal_uLong SvHeaderTabListBox::Insert( SvTreeListEntry* 
pEntry, sal_uLong nRootPo
     return nPos;
 }
 
-
-
 void SvHeaderTabListBox::RemoveEntry( SvTreeListEntry* _pEntry )
 {
     GetModel()->Remove( _pEntry );
     m_aAccessibleChildren.clear();
 }
 
-
-
 void SvHeaderTabListBox::Clear()
 {
     SvTabListBox::Clear();
     m_aAccessibleChildren.clear();
 }
 
-
-
 IMPL_LINK_NOARG(SvHeaderTabListBox, ScrollHdl_Impl)
 {
     m_pImpl->m_pHeaderBar->SetOffset( -GetXOffset() );
     return 0;
 }
 
-
-
 IMPL_LINK_NOARG(SvHeaderTabListBox, CreateAccessibleHdl_Impl)
 {
     vcl::Window* pParent = m_pImpl->m_pHeaderBar->GetAccessibleParentWindow();
@@ -666,8 +632,6 @@ IMPL_LINK_NOARG(SvHeaderTabListBox, 
CreateAccessibleHdl_Impl)
     return 0;
 }
 
-
-
 void SvHeaderTabListBox::RecalculateAccessibleChildren()
 {
     if ( !m_aAccessibleChildren.empty() )
@@ -682,8 +646,6 @@ void SvHeaderTabListBox::RecalculateAccessibleChildren()
     }
 }
 
-
-
 bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, 
TriState& _rState )
 {
     bool bRet = false;
@@ -708,8 +670,6 @@ bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, 
sal_uInt16 _nColumn, TriSta
     }
     return bRet;
 }
-
-
 long SvHeaderTabListBox::GetRowCount() const
 {
     return GetEntryCount();
@@ -794,8 +754,6 @@ void SvHeaderTabListBox::SelectAll( bool bSelect, bool 
bPaint )
     // overwritten just to disambiguate the SelectAll() from the base' class 
SelectAll( bool, bool )
     SvTabListBox::SelectAll( bSelect, bPaint );
 }
-
-
 void SvHeaderTabListBox::SelectRow( long _nRow, bool _bSelect, bool )
 {
     Select( GetEntry( _nRow ), _bSelect );
@@ -1231,6 +1189,4 @@ sal_Int32 
SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nC
     return -1;
 }
 
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 50128d02c2883d04e12b8e6857aa1b8bef479b08
Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
Date:   Mon May 11 19:40:19 2015 +0900

    cleanup SvSimpleTable
    
    Change-Id: I1c431dfa4867bad9bd62d5ac7ec4f6b48b960431

diff --git a/svtools/source/contnr/simptabl.cxx 
b/svtools/source/contnr/simptabl.cxx
index 87d173f..bdbac95 100644
--- a/svtools/source/contnr/simptabl.cxx
+++ b/svtools/source/contnr/simptabl.cxx
@@ -187,29 +187,29 @@ void SvSimpleTable::SetTabs(const long* pTabs, MapUnit 
eMapUnit)
     SvHeaderTabListBox::SetTabs(pTabs,eMapUnit);
 }
 
-void SvSimpleTable::Paint( vcl::RenderContext& rRenderContext, const 
Rectangle& rRect )
+void SvSimpleTable::Paint(vcl::RenderContext& rRenderContext, const Rectangle& 
rRect)
 {
     SvHeaderTabListBox::Paint(rRenderContext, rRect);
 
     sal_uInt16 nPrivTabCount = TabCount();
 
-    long nOffset=-GetXOffset();
-    nOldPos=nOffset;
+    long nOffset =- GetXOffset();
+    nOldPos = nOffset;
 
     aHeaderBar->SetOffset(nOffset);
     aHeaderBar->Invalidate();
 
-    if(nPrivTabCount && bPaintFlag)
+    if (nPrivTabCount && bPaintFlag)
     {
-        if(nPrivTabCount>aHeaderBar->GetItemCount())
-                nPrivTabCount=aHeaderBar->GetItemCount();
+        if (nPrivTabCount>aHeaderBar->GetItemCount())
+            nPrivTabCount=aHeaderBar->GetItemCount();
 
         sal_uInt16 nPos = 0;
-        for(sal_uInt16 i=1;i<nPrivTabCount;i++)
+        for (sal_uInt16 i = 1; i < nPrivTabCount; i++)
         {
-            sal_uInt16 nNewSize = static_cast< sal_uInt16 >( GetTab(i) ) - 
nPos;
-            aHeaderBar->SetItemSize( i, nNewSize );
-            nPos= static_cast< sal_uInt16 >( GetTab(i) );
+            sal_uInt16 nNewSize = static_cast<sal_uInt16>(GetTab(i)) - nPos;
+            aHeaderBar->SetItemSize(i, nNewSize);
+            nPos = static_cast<sal_uInt16>(GetTab(i));
         }
     }
     bPaintFlag = true;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to