loplugin:unusedmethods

Change-Id: I5dcba14a9b0dfcc5267760410f6d135fcd3b1bd2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142944
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2022-11-18 15:49:21 +02:00
parent cfe88f4ab5
commit f0030353b3
7 changed files with 0 additions and 100 deletions

View File

@@ -256,7 +256,6 @@ private:
DECL_DLLPRIVATE_LINK(NoneHdl, weld::Button&, void);
void UpdateEntries();
sal_Int32 GetStylePos(sal_Int32 nListPos) const;
void UpdatePreview();

View File

@@ -75,7 +75,6 @@ public:
// Bitmap
static BitmapEx GetBitmap( const css::uno::Reference< css::awt::XBitmap>& rxBitmap );
static css::uno::Reference< css::awt::XBitmap> CreateBitmap( const BitmapEx& rBitmap );
static css::uno::Reference< css::awt::XBitmap> CreateVCLXBitmap( const BitmapEx& rBitmap );
// Window
static vcl::Window* GetWindow( const css::uno::Reference< css::awt::XWindow>& rxWindow );

View File

@@ -290,14 +290,6 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel
sal_uInt16 HitPageBreak( const Point& rMouse, ScRange* pSource,
SCCOLROW* pBreak, SCCOLROW* pPrev );
/** The cell may be covered by text that overflows from a previous cell.
@return if true, the given cell is covered by (overflowing) text and
rTextStartPosX returns the column where the text that overflows
starts.
*/
bool IsCellCoveredByText(SCCOL nPosX, SCROW nPosY, SCTAB nTab, SCCOL &rTextStartPosX);
void PasteSelection( const Point& rPosPixel );
void SelectForContextMenu( const Point& rPosPixel, SCCOL nCellX, SCROW nCellY );

View File

@@ -1717,71 +1717,6 @@ void ScGridWindow::MouseButtonDown( const MouseEvent& rMEvt )
nNestedButtonState = ScNestedButtonState::NONE;
}
bool ScGridWindow::IsCellCoveredByText(SCCOL nPosX, SCROW nPosY, SCTAB nTab, SCCOL &rTextStartPosX)
{
ScDocument& rDoc = mrViewData.GetDocument();
// find the first non-empty cell (this, or to the left)
SCCOL nNonEmptyX = nPosX;
for (; nNonEmptyX >= 0; --nNonEmptyX)
{
ScRefCellValue aCell(rDoc, ScAddress(nNonEmptyX, nPosY, nTab));
if (!aCell.isEmpty())
break;
}
// the initial cell already contains text
if (nNonEmptyX == nPosX)
{
rTextStartPosX = nNonEmptyX;
return true;
}
// to the left, there is no cell that would contain (potentially
// overrunning) text
if (nNonEmptyX < 0 || rDoc.HasAttrib(nNonEmptyX, nPosY, nTab, nPosX, nPosY, nTab, HasAttrFlags::Merged | HasAttrFlags::Overlapped))
return false;
double nPPTX = mrViewData.GetPPTX();
double nPPTY = mrViewData.GetPPTY();
ScTableInfo aTabInfo;
rDoc.FillInfo(aTabInfo, 0, nPosY, nPosX, nPosY, nTab, nPPTX, nPPTY, false, false);
Fraction aZoomX = mrViewData.GetZoomX();
Fraction aZoomY = mrViewData.GetZoomY();
ScOutputData aOutputData(GetOutDev(), OUTTYPE_WINDOW, aTabInfo, &rDoc, nTab,
0, 0, 0, nPosY, nPosX, nPosY, nPPTX, nPPTY,
&aZoomX, &aZoomY);
MapMode aCurrentMapMode(GetMapMode());
SetMapMode(MapMode(MapUnit::MapPixel));
// obtain the bounding box of the text in first non-empty cell
// to the left
tools::Rectangle aRect(aOutputData.LayoutStrings(false, false, ScAddress(nNonEmptyX, nPosY, nTab)));
SetMapMode(aCurrentMapMode);
// the text does not overrun from the cell
if (aRect.IsEmpty())
return false;
SCCOL nTextEndX;
SCROW nTextEndY;
// test the rightmost position of the text bounding box
tools::Long nMiddle = (aRect.Top() + aRect.Bottom()) / 2;
mrViewData.GetPosFromPixel(aRect.Right(), nMiddle, eWhich, nTextEndX, nTextEndY);
if (nTextEndX >= nPosX)
{
rTextStartPosX = nNonEmptyX;
return true;
}
return false;
}
void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventState& rState )
{
// We have to check if a context menu is shown and we have an UI

View File

@@ -1473,25 +1473,6 @@ OUString SvtLineListBox::GetLineStyleName(SvxBorderLineStyle eStyle)
return sRet;
}
sal_Int32 SvtLineListBox::GetStylePos( sal_Int32 nListPos ) const
{
sal_Int32 nPos = -1;
--nListPos;
sal_Int32 n = 0;
size_t i = 0;
size_t nCount = m_vLineList.size();
while ( nPos == -1 && i < nCount )
{
if ( nListPos == n )
nPos = static_cast<sal_Int32>(i);
n++;
i++;
}
return nPos;
}
void SvtLineListBox::SelectEntry(SvxBorderLineStyle nStyle)
{
if (nStyle == SvxBorderLineStyle::NONE)

View File

@@ -84,7 +84,6 @@ public:
void ShowAll(bool bShow);
bool Contains(const Point &rDocPt) const;
bool IsHeader() const { return m_bIsHeader; };
bool IsEmptyHeaderFooter( ) const;
void ExecuteCommand(std::string_view rIdent);

View File

@@ -102,11 +102,6 @@ css::uno::Reference< css::awt::XBitmap> VCLUnoHelper::CreateBitmap( const Bitmap
return xBmp;
}
css::uno::Reference< css::awt::XBitmap> VCLUnoHelper::CreateVCLXBitmap( const BitmapEx& rBitmap )
{
return css::uno::Reference< css::awt::XBitmap >(new VCLXBitmap(rBitmap));
}
vcl::Window* VCLUnoHelper::GetWindow( const css::uno::Reference< css::awt::XWindow>& rxWindow )
{
VCLXWindow* pVCLXWindow = comphelper::getFromUnoTunnel<VCLXWindow>( rxWindow );