diff options
Diffstat (limited to 'svtools/source/table/tablecontrol_impl.cxx')
-rw-r--r-- | svtools/source/table/tablecontrol_impl.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index e67123ed83ef..4c109529244d 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -948,8 +948,16 @@ namespace svt { namespace table //In the case that column headers are defined but data hasn't yet been set, //only column headers will be shown if(m_pModel->hasColumnHeaders()) + { if(m_nColHeaderHeightPixel>1) + { m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel()); + if(m_bResizingGrid) + //update column widths to fit in grid + impl_ni_updateColumnWidths(); + m_bResizingGrid = true; + } + } if(m_nColumnCount != 0) impl_ni_updateScrollbars(); } @@ -2011,8 +2019,11 @@ namespace svt { namespace table PColumnModel pColumn = m_pModel->getColumnModel(m_nCurColumn); impl_ni_getAccVisibleColWidths(); int newColWidth = m_aColumnWidthsPixel[m_nCurColumn]; + //make resize area for the separator wider + int nLeft = m_aVisibleColumnWidthsPixel[resizingColumn]-4; //subtract 1 from m_aAccColumnWidthPixel because right border should be part of the current cell - if(m_aVisibleColumnWidthsPixel[resizingColumn]-1 == rPoint.X() && pColumn->isResizable()) + int nRight = m_aVisibleColumnWidthsPixel[resizingColumn]-1; + if( rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable()) aNewPointer = Pointer( POINTER_HSPLIT ); //MouseButton was pressed but not yet released, mouse is moving if(m_bResizing) @@ -2040,7 +2051,10 @@ namespace svt { namespace table m_bResizingGrid = false; m_nResizingColumn = m_nCurColumn; PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn); - if(m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1 == rPoint.X() && pColumn->isResizable()) + //make resize area for the separator wider + int nLeft = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-4; + int nRight = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1; + if(rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable()) { m_pDataWindow->CaptureMouse(); m_bResizing = true; |