22#include <document.hxx>
33constexpr double nPPTX = 0.06666;
34constexpr double nPPTY = 0.06666;
40 ScHeaderControl(pParent, pSelectionEngine, pDoc->MaxCol()+1, false, nullptr),
63 return "Col: " + OUString::number(
nPos + 1);
86 ScHeaderControl(pParent, pSelectionEngine, pDoc->MaxRow()+1, true, nullptr),
109 return OUString::number(
nPos + 1);
132 mpDoc(
std::move(pDoc)),
138 mnScrollBarSize(mpVScroll->GetSizePixel().
Width()),
139 mnFirstVisibleRow(0),
186 sal_uInt32 nPixelLength = 0;
189 sal_uInt16 nColWidth = pDoc->
GetColWidth(nCol, 0,
true);
193 if (nPixelLength >= nPixelPos)
199 SAL_WARN(
"sc",
"Could not find the corresponding column");
206 sal_uInt32 nPixelLength = 0;
207 for (
SCROW nRow = nStartRow; nRow <= pDoc->
MaxRow(); ++nRow)
213 if (nPixelLength >= nPixelPos)
219 SAL_WARN(
"sc",
"Could not find the corresponding row");
238 mpColView->SetMark(
true, nStartCol, nEndCol);
239 mpRowView->SetMark(
true, nStartRow, nEndRow);
269 aOutput.
DrawGrid(rRenderContext,
true,
false);
283 return Size(450, 400);
291 rStartCol =
static_cast<SCCOL>(aStart);
292 rEndCol =
static_cast<SCCOL>(aEnd);
300 rStartCol =
static_cast<SCROW>(aStart);
301 rEndCol =
static_cast<SCROW>(aEnd);
306 mnFirstVisibleRow = mpVScroll->GetThumbPos();
307 mpVScroll->SetRangeMax(std::min(mpDoc->MaxRow(),
static_cast<SCROW>(mnFirstVisibleRow + 100)));
308 mpRowView->SetPos(mnFirstVisibleRow);
314 mnFirstVisibleCol = mpHScroll->GetThumbPos();
315 mpHScroll->SetRangeMax(std::min(mpDoc->MaxCol(),
static_cast<SCCOL>(mnFirstVisibleCol + 50)));
316 mpColView->SetPos(mnFirstVisibleCol);
void PutInOrder(T &nStart, T &nEnd)
const StyleSettings & GetStyleSettings() const
virtual void dispose() override
const Point & GetPosPixel() const
void DrawRect(const tools::Rectangle &rRect)
const AllSettings & GetSettings() const
constexpr tools::Long getX() const
constexpr tools::Long getY() const
void SetPos(SCCOLROW nRow)
virtual OUString GetEntryText(SCCOLROW nPos) const override
virtual SCCOLROW GetPos() const override
ScDataTableColView(vcl::Window *pParent, ScDocument *pDoc, SelectionEngine *pSelectionEngine)
virtual void HideEntries(SCCOLROW nPos, SCCOLROW nEndPos) override
virtual sal_uInt16 GetEntrySize(SCCOLROW nPos) const override
virtual bool IsLayoutRTL() const override
virtual void SetEntrySize(SCCOLROW nPos, sal_uInt16 nWidth) override
void SetPos(SCCOLROW nRow)
virtual void SetEntrySize(SCCOLROW nPos, sal_uInt16 nWidth) override
virtual SCCOLROW GetPos() const override
virtual sal_uInt16 GetEntrySize(SCCOLROW nPos) const override
virtual void HideEntries(SCCOLROW nPos, SCCOLROW nEndPos) override
ScDataTableRowView(vcl::Window *pParent, ScDocument *pDoc, SelectionEngine *pSelectionEngine)
virtual OUString GetEntryText(SCCOLROW nPos) const override
virtual bool IsLayoutRTL() const override
void getRowRange(SCROW &rStartRow, SCROW &rEndRow) const
virtual void dispose() override
VclPtr< ScDataTableRowView > mpRowView
~ScDataTableView() override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
void getColRange(SCCOL &rStartCol, SCCOL &rEndCol) const
std::shared_ptr< ScDocument > mpDoc
virtual Size GetOptimalSize() const override
VclPtr< ScrollAdaptor > mpHScroll
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
std::unique_ptr< MouseEvent > mpMouseEvent
VclPtr< ScDataTableColView > mpColView
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
VclPtr< ScrollAdaptor > mpVScroll
ScDataTableView(const css::uno::Reference< css::awt::XWindow > &rParent, std::shared_ptr< ScDocument > pDoc)
virtual void Resize() override
sal_uInt16 mnScrollBarSize
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow)
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow)
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
SC_DLLPUBLIC void SetRowHeight(SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight)
SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const
void DrawStrings(bool bPixelToLogic=false)
void SetSolidBackground(bool bSet)
void SetGridColor(const Color &rColor)
void DrawGrid(vcl::RenderContext &rRenderContext, bool bGrid, bool bPage, bool bMergeCover=false)
void DrawDocumentBackground()
static tools::Long ToPixel(sal_uInt16 nTwips, double nFactor)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetFaceColor() const
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect)
virtual Size GetSizePixel() const
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr sal_uInt16 nRowHeaderWidth
IMPL_LINK_NOARG(ScDataTableView, VertScrollHdl, weld::Scrollbar &, void)
constexpr sal_uInt16 nColHeaderHeight
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW