diff options
Diffstat (limited to 'sc/source/ui/app/inputwin.cxx')
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index ea7ba5847bdf..311611678148 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -75,13 +75,13 @@ namespace com::sun::star::accessibility { class XAccessible; } -const long THESIZE = 1000000; // Should be more than enough! -const long INPUTLINE_INSET_MARGIN = 2; // Space between border and interior widgets of input line -const long LEFT_OFFSET = 5; // Left offset of input line +const tools::Long THESIZE = 1000000; // Should be more than enough! +const tools::Long INPUTLINE_INSET_MARGIN = 2; // Space between border and interior widgets of input line +const tools::Long LEFT_OFFSET = 5; // Left offset of input line //TODO const long BUTTON_OFFSET = 2; // Space between input line and button to expand/collapse -const long INPUTWIN_MULTILINES = 6; // Initial number of lines within multiline dropdown -const long TOOLBOX_WINDOW_HEIGHT = 22; // Height of toolbox window in pixels - TODO: The same on all systems? -const long POSITION_COMBOBOX_WIDTH = 18; // Width of position combobox in characters +const tools::Long INPUTWIN_MULTILINES = 6; // Initial number of lines within multiline dropdown +const tools::Long TOOLBOX_WINDOW_HEIGHT = 22; // Height of toolbox window in pixels - TODO: The same on all systems? +const tools::Long POSITION_COMBOBOX_WIDTH = 18; // Width of position combobox in characters using com::sun::star::uno::Reference; using com::sun::star::uno::UNO_QUERY; @@ -482,7 +482,7 @@ void ScInputWindow::Resize() Size aSize = GetSizePixel(); //(-10) to allow margin between sidebar and formulabar - long margin = (comphelper::LibreOfficeKit::isActive()) ? 10 : 0; + tools::Long margin = (comphelper::LibreOfficeKit::isActive()) ? 10 : 0; Size aTextWindowSize(aSize.Width() - mxTextWindow->GetPosPixel().X() - LEFT_OFFSET - margin, mxTextWindow->GetPixelHeightForLines()); mxTextWindow->SetSizePixel(aTextWindowSize); @@ -749,7 +749,7 @@ void ScInputWindow::MouseMove( const MouseEvent& rMEvt ) if (bInResize) { // detect direction - long nResizeThreshold = long(TOOLBOX_WINDOW_HEIGHT * 0.7); + tools::Long nResizeThreshold = tools::Long(TOOLBOX_WINDOW_HEIGHT * 0.7); bool bResetPointerPos = false; // Detect attempt to expand toolbar too much @@ -1096,8 +1096,8 @@ void ScInputBarGroup::TextGrabFocus() mxTextWndGroup->TextGrabFocus(); } -constexpr long gnBorderWidth = INPUTLINE_INSET_MARGIN + 1; -constexpr long gnBorderHeight = INPUTLINE_INSET_MARGIN + 1; +constexpr tools::Long gnBorderWidth = INPUTLINE_INSET_MARGIN + 1; +constexpr tools::Long gnBorderHeight = INPUTLINE_INSET_MARGIN + 1; ScTextWndGroup::ScTextWndGroup(ScInputBarGroup& rParent, ScTabViewShell* pViewSh) : mxTextWnd(new ScTextWnd(*this, pViewSh)) @@ -1122,17 +1122,17 @@ EditView* ScTextWndGroup::GetEditView() return mxTextWnd->GetEditView(); } -long ScTextWndGroup::GetLastNumExpandedLines() const +tools::Long ScTextWndGroup::GetLastNumExpandedLines() const { return mxTextWnd->GetLastNumExpandedLines(); } -long ScTextWndGroup::GetNumLines() const +tools::Long ScTextWndGroup::GetNumLines() const { return mxTextWnd->GetNumLines(); } -int ScTextWndGroup::GetPixelHeightForLines(long nLines) +int ScTextWndGroup::GetPixelHeightForLines(tools::Long nLines) { return mxTextWnd->GetPixelHeightForLines(nLines) + 2 * gnBorderHeight; } @@ -1175,7 +1175,7 @@ void ScTextWndGroup::SetScrollPolicy() mxScrollWin->set_vpolicy(VclPolicyType::NEVER); } -void ScTextWndGroup::SetNumLines(long nLines) +void ScTextWndGroup::SetNumLines(tools::Long nLines) { mxTextWnd->SetNumLines(nLines); } @@ -1238,14 +1238,14 @@ EditView* ScTextWnd::GetEditView() bool ScTextWnd::HasEditView() const { return m_xEditView != nullptr; } -int ScTextWnd::GetPixelHeightForLines(long nLines) +int ScTextWnd::GetPixelHeightForLines(tools::Long nLines) { // add padding (for the borders of the window) OutputDevice& rDevice = GetDrawingArea()->get_ref_device(); return rDevice.LogicToPixel(Size(0, nLines * rDevice.GetTextHeight())).Height() + 1; } -void ScTextWnd::SetNumLines(long nLines) +void ScTextWnd::SetNumLines(tools::Long nLines) { mnLines = nLines; if ( nLines > 1 ) @@ -1265,7 +1265,7 @@ void ScTextWnd::Resize() m_xEditView->SetOutputArea( aOutputArea ); // Don't leave an empty area at the bottom if we can move the text down. - long nMaxVisAreaTop = m_xEditEngine->GetTextHeight() - aOutputArea.GetHeight(); + tools::Long nMaxVisAreaTop = m_xEditEngine->GetTextHeight() - aOutputArea.GetHeight(); if (m_xEditView->GetVisArea().Top() > nMaxVisAreaTop) { m_xEditView->Scroll(0, m_xEditView->GetVisArea().Top() - nMaxVisAreaTop); @@ -1401,7 +1401,7 @@ static void lcl_ModifyRTLVisArea( EditView* pEditView ) { tools::Rectangle aVisArea = pEditView->GetVisArea(); Size aPaper = pEditView->GetEditEngine()->GetPaperSize(); - long nDiff = aPaper.Width() - aVisArea.Right(); + tools::Long nDiff = aPaper.Width() - aVisArea.Right(); aVisArea.AdjustLeft(nDiff ); aVisArea.AdjustRight(nDiff ); pEditView->SetVisArea(aVisArea); @@ -1851,23 +1851,23 @@ void ScTextWnd::SetTextString( const OUString& rNewString ) } else { - long nTextSize = 0; + tools::Long nTextSize = 0; sal_Int32 nDifPos; if (rNewString.getLength() > aString.getLength()) nDifPos = findFirstNonMatchingChar(rNewString, aString); else nDifPos = findFirstNonMatchingChar(aString, rNewString); - long nSize1 = GetTextWidth(aString); - long nSize2 = GetTextWidth(rNewString); + tools::Long nSize1 = GetTextWidth(aString); + tools::Long nSize2 = GetTextWidth(rNewString); if ( nSize1>0 && nSize2>0 ) nTextSize = std::max( nSize1, nSize2 ); else nTextSize = GetOutputSizePixel().Width(); // Overflow Point aLogicStart = GetDrawingArea()->get_ref_device().PixelToLogic(Point(0,0)); - long nStartPos = aLogicStart.X(); - long nInvPos = nStartPos; + tools::Long nStartPos = aLogicStart.X(); + tools::Long nInvPos = nStartPos; if (nDifPos) nInvPos += GetTextWidth(aString.copy(0,nDifPos)); |