summaryrefslogtreecommitdiff
path: root/svtools/source/table/tablecontrol_impl.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/table/tablecontrol_impl.hxx')
-rw-r--r--svtools/source/table/tablecontrol_impl.hxx161
1 files changed, 87 insertions, 74 deletions
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index dc875cd137fe..0a487c77c76c 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -39,6 +39,7 @@
#include <vector>
#include <vcl/seleng.hxx>
+
class ScrollBar;
class ScrollBarBox;
@@ -62,60 +63,64 @@ namespace svt { namespace table
friend class TableRowGeometry;
friend class TableColumnGeometry;
friend class SuspendInvariants;
- friend class TableFunctionSet;
+ friend class TableFunctionSet;
private:
/// the control whose impl-instance we implemnt
- TableControl& m_rAntiImpl;
+ TableControl& m_rAntiImpl;
/// the model of the table control
- PTableModel m_pModel;
+ PTableModel m_pModel;
/// the input handler to use, usually the input handler as provided by ->m_pModel
- PTableInputHandler m_pInputHandler;
+ PTableInputHandler m_pInputHandler;
/// the widths of the single columns, measured in pixel
- ArrayOfLong m_aColumnWidthsPixel;
+ ArrayOfLong m_aColumnWidthsPixel;
/** the accumulated widths of the single columns, i.e. their exclusive right borders,
<strong<not</strong> counting the space for a possible row header column
*/
- ArrayOfLong m_aAccColumnWidthsPixel;
+ ArrayOfLong m_aAccColumnWidthsPixel;
+
+ ArrayOfLong m_aVisibleColumnWidthsPixel;
/// the height of a single row in the table, measured in pixels
- long m_nRowHeightPixel;
+ long m_nRowHeightPixel;
/// the height of the column header row in the table, measured in pixels
- long m_nColHeaderHeightPixel;
+ long m_nColHeaderHeightPixel;
/// the width of the row header column in the table, measured in pixels
- long m_nRowHeaderWidthPixel;
+ long m_nRowHeaderWidthPixel;
/// the number of columns in the table control. Cached model value.
- TableSize m_nColumnCount;
+ TableSize m_nColumnCount;
/// the number of rows in the table control. Cached model value.
- TableSize m_nRowCount;
+ TableSize m_nRowCount;
- ColPos m_nCurColumn;
- RowPos m_nCurRow;
- ColPos m_nLeftColumn;
- RowPos m_nTopRow;
+ ColPos m_nCurColumn;
+ RowPos m_nCurRow;
+ ColPos m_nLeftColumn;
+ RowPos m_nTopRow;
- sal_Int32 m_nCursorHidden;
+ sal_Int32 m_nCursorHidden;
/** the window to contain all data content, including header bars
The window's upper left corner is at position (0,0), relative to the
table control, which is the direct parent of the data window.
*/
- TableDataWindow* m_pDataWindow;
+ TableDataWindow* m_pDataWindow;
/// the vertical scrollbar, if any
- ScrollBar* m_pVScroll;
+ ScrollBar* m_pVScroll;
/// the horizontal scrollbar, if any
ScrollBar* m_pHScroll;
- ScrollBarBox* m_pScrollCorner;
- //selection engine - for determining selection range, e.g. single, multiple
- SelectionEngine* m_pSelEngine;
- //vector which contains the selected rows
- std::vector<RowPos> m_nRowSelected;
- //part of selection engine
- TableFunctionSet* m_pTableFunctionSet;
- //part of selection engine
- RowPos m_nAnchor;
-
-
+ ScrollBarBox* m_pScrollCorner;
+ //selection engine - for determining selection range, e.g. single, multiple
+ SelectionEngine* m_pSelEngine;
+ //vector which contains the selected rows
+ std::vector<RowPos> m_nRowSelected;
+ //part of selection engine
+ TableFunctionSet* m_pTableFunctionSet;
+ //part of selection engine
+ RowPos m_nAnchor;
+ bool m_bResizing;
+ ColPos m_nResizingColumn;
+ bool m_bResizingGrid;
+ rtl::OUString m_aTooltipText;
#if DBG_UTIL
#define INV_SCROLL_POSITION 1
@@ -146,7 +151,6 @@ namespace svt { namespace table
inline const TableControl& getAntiImpl() const { return m_rAntiImpl; }
inline TableControl& getAntiImpl() { return m_rAntiImpl; }
- void setCellContent(CellEntryType* pCellEntryType);
public:
TableControl_Impl( TableControl& _rAntiImpl );
@@ -181,53 +185,42 @@ namespace svt { namespace table
<TRUE/> if it's okay that the given cooordinate is only partially visible
*/
void ensureVisible( ColPos _nColumn, RowPos _nRow, bool _bAcceptPartialVisibility );
- /** returns the row, which contains the input point*/
- RowPos getCurrentRow (const Point& rPoint);
-
- void setCursorAtCurrentCell(const Point& rPoint);
- /** proves whether the vector with the selected rows contains the current row*/
- BOOL isRowSelected(::std::vector<RowPos> selectedRows, RowPos current);
- /** returns the position of the current row in the selecttion vector */
- int getRowSelectedNumber(::std::vector<RowPos> selectedRows, RowPos current);
- /** _rCellRect contains the region, which should be invalidate after some action e.g. selectiong row*/
- void invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect );
- /** _rCellRect contains the region, which should be invalidate after some action e.g. selectiong row*/
- //vielleicht kann man mit den anderen verschmelzen, mit einer berprfung ob prev==curr?
- void invalidateSelectedRow( RowPos _nCurRow, Rectangle& _rCellRect );
- /** to be called when a new row is added to the control*/
- void invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect );
- /** returns the vector, which contains the selected rows*/
- std::vector<RowPos>& getSelectedRows();
- /** updates the vector, which contains the selected rows after removing the row nRowPos*/
- void removeSelectedRow(RowPos _nRowPos);
- void invalidateRows(RowPos _nRowStart, Rectangle& _rCellRect );
- //virtual void DoubleClick();
-
+ /** returns the row, which contains the input point*/
+ virtual RowPos getCurrentRow (const Point& rPoint);
+
+ void setCursorAtCurrentCell(const Point& rPoint);
+ /** checks whether the vector with the selected rows contains the current row*/
+ BOOL isRowSelected(const ::std::vector<RowPos>& selectedRows, RowPos current);
+
+ bool isRowSelected(RowPos current);
+ /** returns the position of the current row in the selection vector */
+ int getRowSelectedNumber(const ::std::vector<RowPos>& selectedRows, RowPos current);
+ /** _rCellRect contains the region, which should be invalidate after some action e.g. selecting row*/
+ void invalidateSelectedRegion(RowPos _nPrevRow, RowPos _nCurRow, Rectangle& _rCellRect );
+ /** to be called when a new row is added to the control*/
+ void invalidateRow(RowPos _nRowPos, Rectangle& _rCellRect );
+ /** returns the vector, which contains the selected rows*/
+ std::vector<RowPos>& getSelectedRows();
+ /** updates the vector, which contains the selected rows after removing the row nRowPos*/
+ void removeSelectedRow(RowPos _nRowPos);
+ void invalidateRows();
// IAbstractTableControl
virtual void hideCursor();
virtual void showCursor();
virtual bool dispatchAction( TableControlAction _eAction );
- virtual bool isClickInVisibleArea(const Point& rPoint);
- virtual SelectionEngine* getSelEngine();
-
- TableDataWindow* getDataWindow();
- /** retrieves the area occupied by the totality of (at least partially) visible cells
-
- The returned area includes row and column headers. Also, it takes into
- account the the fact that there might be less columns than would normally
- find room in the control.
-
- As a result of respecting the partial visibility of rows and columns,
- the returned area might be larger than the data window's output size.
- */
- void impl_getAllVisibleCellsArea( Rectangle& _rCellArea ) const;
-
- /** retrieves the area occupied by all (at least partially) visible data cells.
-
- Effectively, the returned area is the same as returned by ->impl_getAllVisibleCellsArea,
- minus the row and column header areas.
- */
- void impl_getAllVisibleDataCellArea( Rectangle& _rCellArea ) const;
+ virtual SelectionEngine* getSelEngine();
+ virtual rtl::OUString& setTooltip(const Point& rPoint );
+ virtual void resizeColumn(const Point& rPoint);
+ virtual bool startResizeColumn(const Point& rPoint);
+ virtual bool endResizeColumn(const Point& rPoint);
+
+ TableDataWindow* getDataWindow();
+ ScrollBar* getHorzScrollbar();
+ ScrollBar* getVertScrollbar();
+
+ ::rtl::OUString convertToString(const ::com::sun::star::uno::Any& _value);
+ Rectangle calcHeaderRect(bool bColHeader);
+ Rectangle calcTableRect();
private:
/** toggles the cursor visibility
@@ -312,10 +305,30 @@ namespace svt { namespace table
column range were reached.
*/
TableSize impl_ni_ScrollColumns( TableSize _nRowDelta );
+ /** retrieves the area occupied by the totality of (at least partially) visible cells
+
+ The returned area includes row and column headers. Also, it takes into
+ account the the fact that there might be less columns than would normally
+ find room in the control.
+
+ As a result of respecting the partial visibility of rows and columns,
+ the returned area might be larger than the data window's output size.
+ */
+ void impl_getAllVisibleCellsArea( Rectangle& _rCellArea ) const;
+
+ /** retrieves the area occupied by all (at least partially) visible data cells.
+
+ Effectively, the returned area is the same as returned by ->impl_getAllVisibleCellsArea,
+ minus the row and column header areas.
+ */
+ void impl_getAllVisibleDataCellArea( Rectangle& _rCellArea ) const;
+
+ void impl_ni_getAccVisibleColWidths();
+ void impl_updateLeftColumn();
DECL_LINK( OnScroll, ScrollBar* );
};
- //see seleng.hxx, seleng.cxx, FunctionSet overwritables, part of selection engine
+ //see seleng.hxx, seleng.cxx, FunctionSet overridables, part of selection engine
class TableFunctionSet : public FunctionSet
{
friend class TableDataWindow;