diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-21 15:25:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-22 08:07:23 +0200 |
commit | 0e66c58a8e20b997097d8b8644e774701c2d68b6 (patch) | |
tree | 5f867bd17bf956ec82359a60ad25ba170d1de117 /desktop | |
parent | 700a833520396604b10c713c478d5138578a60b6 (diff) |
long->tools::Long in dbaccess..drawinglayer
Change-Id: I15760da167e7d0b4c410acccd1c8c90210e28b2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104623
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 18 | ||||
-rw-r--r-- | desktop/source/app/cmdlineargs.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 22 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.hxx | 10 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 70 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 24 | ||||
-rw-r--r-- | desktop/source/lib/init.cxx | 46 | ||||
-rw-r--r-- | desktop/source/splash/splash.cxx | 12 |
9 files changed, 103 insertions, 103 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 68f6add5139c..858548d6b569 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -703,11 +703,11 @@ void DesktopLOKTest::testRowColumnHeaders() pDocument->pClass->initializeForRendering(pDocument, nullptr); - long nWidth = 0; - long nHeight = 0; + tools::Long nWidth = 0; + tools::Long nHeight = 0; pDocument->m_pDocumentClass->getDocumentSize(pDocument, &nWidth, &nHeight); - long nX = rtl::math::round(nWidth / 4.0); - long nY = rtl::math::round(nHeight / 4.0); + tools::Long nX = rtl::math::round(nWidth / 4.0); + tools::Long nY = rtl::math::round(nHeight / 4.0); nWidth = rtl::math::round(nWidth / 2.0); nHeight = rtl::math::round(nHeight / 2.0); @@ -786,10 +786,10 @@ void DesktopLOKTest::testHiddenRowHeaders() pDocument->pClass->initializeForRendering(pDocument, nullptr); - long const nX = 0; - long const nY = 0; - long nWidth = 0; - long nHeight = 0; + tools::Long const nX = 0; + tools::Long const nY = 0; + tools::Long nWidth = 0; + tools::Long nHeight = 0; pDocument->m_pDocumentClass->getDocumentSize(pDocument, &nWidth, &nHeight); std::stringstream aPayload; @@ -2032,7 +2032,7 @@ void DesktopLOKTest::testCommentsWriter() LibLODocument_Impl* pDocument = loadDoc("comments.odt"); pDocument->m_pDocumentClass->initializeForRendering(pDocument, nullptr); - long nWidth, nHeight; + tools::Long nWidth, nHeight; pDocument->m_pDocumentClass->getDocumentSize(pDocument, &nWidth, &nHeight); // Document width alongwith without sidebar comes to be < 13000 diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index e58ee2f6e2e4..4d5a3bb78396 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -125,7 +125,7 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, CommandLineEvent cur return curEvt; OUString rest2; - long nURIlen = -1; + tools::Long nURIlen = -1; // URL might be encoded OUString decoded_rest = rest1.replaceAll("%7C", "|").replaceAll("%7c", "|"); diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index de01830fb9fe..da8106bcc3e3 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -100,7 +100,7 @@ class ExtBoxWithBtns_Impl : public ExtensionBox_Impl ExtMgrDialog* m_pParent; void SetButtonStatus( const TEntry_Impl& rEntry ); - OString ShowPopupMenu( const Point &rPos, const long nPos ); + OString ShowPopupMenu( const Point &rPos, const tools::Long nPos ); public: explicit ExtBoxWithBtns_Impl(std::unique_ptr<weld::ScrolledWindow> xScroll); @@ -111,7 +111,7 @@ public: virtual bool Command( const CommandEvent& rCEvt ) override; virtual void RecalcAll() override; - virtual void selectEntry( const long nPos ) override; + virtual void selectEntry( const tools::Long nPos ) override; void enableButtons( bool bEnable ); }; @@ -150,7 +150,7 @@ void ExtBoxWithBtns_Impl::RecalcAll() //This function may be called with nPos < 0 -void ExtBoxWithBtns_Impl::selectEntry( const long nPos ) +void ExtBoxWithBtns_Impl::selectEntry( const tools::Long nPos ) { if ( HasActive() && ( nPos == getSelIndex() ) ) return; @@ -233,9 +233,9 @@ bool ExtBoxWithBtns_Impl::Command(const CommandEvent& rCEvt) return true; } -OString ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long nPos ) +OString ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const tools::Long nPos ) { - if ( nPos >= static_cast<long>(getItemCount()) ) + if ( nPos >= static_cast<tools::Long>(getItemCount()) ) return "CMD_NONE"; std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "desktop/ui/extensionmenu.ui")); @@ -827,7 +827,7 @@ void ExtMgrDialog::showProgress( bool _bStart ) } -void ExtMgrDialog::updateProgress( const long nProgress ) +void ExtMgrDialog::updateProgress( const tools::Long nProgress ) { if ( m_nProgress != nProgress ) { @@ -1115,7 +1115,7 @@ void UpdateRequiredDialog::showProgress( bool _bStart ) } -void UpdateRequiredDialog::updateProgress( const long nProgress ) +void UpdateRequiredDialog::updateProgress( const tools::Long nProgress ) { if ( m_nProgress != nProgress ) { @@ -1292,8 +1292,8 @@ bool UpdateRequiredDialog::hasActiveEntries() ::osl::MutexGuard aGuard( m_aMutex ); bool bRet = false; - long nCount = m_xExtensionBox->GetEntryCount(); - for ( long nIndex = 0; nIndex < nCount; nIndex++ ) + tools::Long nCount = m_xExtensionBox->GetEntryCount(); + for ( tools::Long nIndex = 0; nIndex < nCount; nIndex++ ) { TEntry_Impl pEntry = m_xExtensionBox->GetEntryData( nIndex ); @@ -1314,8 +1314,8 @@ void UpdateRequiredDialog::disableAllEntries() incBusy(); - long nCount = m_xExtensionBox->GetEntryCount(); - for ( long nIndex = 0; nIndex < nCount; nIndex++ ) + tools::Long nCount = m_xExtensionBox->GetEntryCount(); + for ( tools::Long nIndex = 0; nIndex < nCount; nIndex++ ) { TEntry_Impl pEntry = m_xExtensionBox->GetEntryData( nIndex ); m_pManager->getCmdQueue()->enableExtension( pEntry->m_xPackage, false ); diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index e7e262a3add3..09f2a2e42a9f 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -64,7 +64,7 @@ public: virtual void showProgress( bool bStart ) = 0; virtual void updateProgress( const OUString &rText, const css::uno::Reference< css::task::XAbortChannel > &xAbortChannel) = 0; - virtual void updateProgress( const long nProgress ) = 0; + virtual void updateProgress( const tools::Long nProgress ) = 0; virtual void updatePackageInfo( const css::uno::Reference< css::deployment::XPackage > &xPackage ) = 0; virtual void addPackageToList( const css::uno::Reference< css::deployment::XPackage > &xPackage, @@ -101,7 +101,7 @@ class ExtMgrDialog : public weld::GenericDialogController bool m_bDisableWarning; bool m_bDeleteWarning; bool m_bClosed; - long m_nProgress; + tools::Long m_nProgress; Idle m_aIdle; TheExtensionManager *m_pManager; @@ -143,7 +143,7 @@ public: virtual void showProgress( bool bStart ) override; virtual void updateProgress( const OUString &rText, const css::uno::Reference< css::task::XAbortChannel > &xAbortChannel) override; - virtual void updateProgress( const long nProgress ) override; + virtual void updateProgress( const tools::Long nProgress ) override; virtual void updatePackageInfo( const css::uno::Reference< css::deployment::XPackage > &xPackage ) override; @@ -187,7 +187,7 @@ class UpdateRequiredDialog : public weld::GenericDialogController bool m_bStartProgress; bool m_bStopProgress; bool m_bHasLockedEntries; - long m_nProgress; + tools::Long m_nProgress; Idle m_aIdle; TheExtensionManager *m_pManager; @@ -222,7 +222,7 @@ public: virtual void showProgress( bool bStart ) override; virtual void updateProgress( const OUString &rText, const css::uno::Reference< css::task::XAbortChannel > &xAbortChannel) override; - virtual void updateProgress( const long nProgress ) override; + virtual void updateProgress( const tools::Long nProgress ) override; virtual void updatePackageInfo( const css::uno::Reference< css::deployment::XPackage > &xPackage ) override; diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index ad03a9a7d66f..d2fca9d95e03 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -286,7 +286,7 @@ void ProgressCmdEnv::progressSection( const OUString &rText, void ProgressCmdEnv::updateProgress() { - long nProgress = ((m_nCurrentProgress*5) % 100) + 5; + tools::Long nProgress = ((m_nCurrentProgress*5) % 100) + 5; if ( m_pDialogHelper ) m_pDialogHelper->updateProgress( nProgress ); } diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 3000a29a91c0..ed6ed79fd256 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -260,14 +260,14 @@ sal_Int32 ExtensionBox_Impl::getSelIndex() const // Title + description -void ExtensionBox_Impl::CalcActiveHeight( const long nPos ) +void ExtensionBox_Impl::CalcActiveHeight( const tools::Long nPos ) { const ::osl::MutexGuard aGuard( m_entriesMutex ); // get title height - long aTextHeight; - long nIconHeight = 2*TOP_OFFSET + SMALL_ICON_SIZE; - long nTitleHeight = 2*TOP_OFFSET + GetTextHeight(); + tools::Long aTextHeight; + tools::Long nIconHeight = 2*TOP_OFFSET + SMALL_ICON_SIZE; + tools::Long nTitleHeight = 2*TOP_OFFSET + GetTextHeight(); if ( nIconHeight < nTitleHeight ) aTextHeight = nTitleHeight; else @@ -297,7 +297,7 @@ void ExtensionBox_Impl::CalcActiveHeight( const long nPos ) m_nActiveHeight += 2; } -tools::Rectangle ExtensionBox_Impl::GetEntryRect( const long nPos ) const +tools::Rectangle ExtensionBox_Impl::GetEntryRect( const tools::Long nPos ) const { const ::osl::MutexGuard aGuard( m_entriesMutex ); @@ -329,7 +329,7 @@ void ExtensionBox_Impl::DeleteRemoved() //This function may be called with nPos < 0 -void ExtensionBox_Impl::selectEntry( const long nPos ) +void ExtensionBox_Impl::selectEntry( const tools::Long nPos ) { bool invalidate = false; { @@ -353,7 +353,7 @@ void ExtensionBox_Impl::selectEntry( const long nPos ) m_vEntries[ m_nActive ]->m_bActive = false; } - if ( ( nPos >= 0 ) && ( nPos < static_cast<long>(m_vEntries.size()) ) ) + if ( ( nPos >= 0 ) && ( nPos < static_cast<tools::Long>(m_vEntries.size()) ) ) { m_bHasActive = true; m_nActive = nPos; @@ -434,18 +434,18 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const tools: auto nMaxTitleWidth = rRect.GetWidth() - ICON_OFFSET; nMaxTitleWidth -= (2 * SMALL_ICON_SIZE) + (4 * SPACE_BETWEEN); rRenderContext.SetFont(aStdFont); - long nLinkWidth = 0; + tools::Long nLinkWidth = 0; if (!rEntry->m_sPublisher.isEmpty()) { nLinkWidth = rRenderContext.GetTextWidth(rEntry->m_sPublisher); nMaxTitleWidth -= nLinkWidth + (2 * SPACE_BETWEEN); } - long aVersionWidth = rRenderContext.GetTextWidth(rEntry->m_sVersion); + tools::Long aVersionWidth = rRenderContext.GetTextWidth(rEntry->m_sVersion); aPos = rRect.TopLeft() + Point(ICON_OFFSET, TOP_OFFSET); rRenderContext.SetFont(aBoldFont); - long aTitleWidth = rRenderContext.GetTextWidth(rEntry->m_sTitle) + (aTextHeight / 3); + tools::Long aTitleWidth = rRenderContext.GetTextWidth(rEntry->m_sTitle) + (aTextHeight / 3); if (aTitleWidth > nMaxTitleWidth - aVersionWidth) { aTitleWidth = nMaxTitleWidth - aVersionWidth - (aTextHeight / 3); @@ -459,8 +459,8 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const tools: rRenderContext.SetFont(aStdFont); rRenderContext.DrawText(Point(aPos.X() + aTitleWidth, aPos.Y()), rEntry->m_sVersion); - long nIconHeight = TOP_OFFSET + SMALL_ICON_SIZE; - long nTitleHeight = TOP_OFFSET + GetTextHeight(); + tools::Long nIconHeight = TOP_OFFSET + SMALL_ICON_SIZE; + tools::Long nTitleHeight = TOP_OFFSET + GetTextHeight(); if ( nIconHeight < nTitleHeight ) aTextHeight = nTitleHeight; else @@ -481,7 +481,7 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const tools: aPos.AdjustY(aTextHeight ); if (rEntry->m_bActive) { - long nExtraHeight = 0; + tools::Long nExtraHeight = 0; if (rEntry->m_bHasButtons) nExtraHeight = 2; @@ -493,7 +493,7 @@ void ExtensionBox_Impl::DrawRow(vcl::RenderContext& rRenderContext, const tools: { //replace LF to space, so words do not stick together in one line view sDescription = sDescription.replace(0x000A, ' '); - const long nWidth = rRenderContext.GetTextWidth( sDescription ); + const tools::Long nWidth = rRenderContext.GetTextWidth( sDescription ); if (nWidth > rRect.GetWidth() - aPos.X()) sDescription = rRenderContext.GetEllipsisString(sDescription, rRect.GetWidth() - aPos.X()); rRenderContext.DrawText(aPos, sDescription); @@ -569,10 +569,10 @@ void ExtensionBox_Impl::RecalcAll() // If there is unused space below the last entry but all entries don't fit into the box, // move the content down to use the whole space - const long nTotalHeight = GetTotalHeight(); + const tools::Long nTotalHeight = GetTotalHeight(); if ( m_bHasScrollBar && ( aOutputSize.Height() + m_nTopIndex > nTotalHeight ) ) { - long nOffset = m_nTopIndex; + tools::Long nOffset = m_nTopIndex; m_nTopIndex = nTotalHeight - aOutputSize.Height(); nOffset -= m_nTopIndex; aEntryRect.Move( 0, nOffset ); @@ -592,11 +592,11 @@ bool ExtensionBox_Impl::HandleCursorKey( sal_uInt16 nKeyCode ) if ( m_vEntries.empty() ) return true; - long nSelect = 0; + tools::Long nSelect = 0; if ( m_bHasActive ) { - long nPageSize = GetOutputSizePixel().Height() / m_nStdHeight; + tools::Long nPageSize = GetOutputSizePixel().Height() / m_nStdHeight; if ( nPageSize < 2 ) nPageSize = 2; @@ -623,7 +623,7 @@ bool ExtensionBox_Impl::HandleCursorKey( sal_uInt16 nKeyCode ) if ( nSelect < 0 ) nSelect = 0; - if ( nSelect >= static_cast<long>(m_vEntries.size()) ) + if ( nSelect >= static_cast<tools::Long>(m_vEntries.size()) ) nSelect = m_vEntries.size() - 1; selectEntry( nSelect ); @@ -655,9 +655,9 @@ void ExtensionBox_Impl::Paint(vcl::RenderContext& rRenderContext, const tools::R } -long ExtensionBox_Impl::GetTotalHeight() const +tools::Long ExtensionBox_Impl::GetTotalHeight() const { - long nHeight = m_vEntries.size() * m_nStdHeight; + tools::Long nHeight = m_vEntries.size() * m_nStdHeight; if ( m_bHasActive ) { @@ -712,9 +712,9 @@ void ExtensionBox_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) Init(); } -long ExtensionBox_Impl::PointToPos( const Point& rPos ) +tools::Long ExtensionBox_Impl::PointToPos( const Point& rPos ) { - long nPos = ( rPos.Y() + m_nTopIndex ) / m_nStdHeight; + tools::Long nPos = ( rPos.Y() + m_nTopIndex ) / m_nStdHeight; if ( m_bHasActive && ( nPos > m_nActive ) ) { @@ -732,7 +732,7 @@ bool ExtensionBox_Impl::MouseMove( const MouseEvent& rMEvt ) bool bOverHyperlink = false; auto nPos = PointToPos( rMEvt.GetPosPixel() ); - if ( ( nPos >= 0 ) && ( nPos < static_cast<long>(m_vEntries.size()) ) ) + if ( ( nPos >= 0 ) && ( nPos < static_cast<tools::Long>(m_vEntries.size()) ) ) { const auto& rEntry = m_vEntries[nPos]; bOverHyperlink = !rEntry->m_sPublisher.isEmpty() && rEntry->m_aLinkRect.IsInside(rMEvt.GetPosPixel()); @@ -749,7 +749,7 @@ bool ExtensionBox_Impl::MouseMove( const MouseEvent& rMEvt ) OUString ExtensionBox_Impl::RequestHelp(tools::Rectangle& rRect) { auto nPos = PointToPos( rRect.TopLeft() ); - if ( ( nPos >= 0 ) && ( nPos < static_cast<long>(m_vEntries.size()) ) ) + if ( ( nPos >= 0 ) && ( nPos < static_cast<tools::Long>(m_vEntries.size()) ) ) { const auto& rEntry = m_vEntries[nPos]; bool bOverHyperlink = !rEntry->m_sPublisher.isEmpty() && rEntry->m_aLinkRect.IsInside(rRect); @@ -773,7 +773,7 @@ bool ExtensionBox_Impl::MouseButtonDown( const MouseEvent& rMEvt ) { auto nPos = PointToPos( rMEvt.GetPosPixel() ); - if ( ( nPos >= 0 ) && ( nPos < static_cast<long>(m_vEntries.size()) ) ) + if ( ( nPos >= 0 ) && ( nPos < static_cast<tools::Long>(m_vEntries.size()) ) ) { const auto& rEntry = m_vEntries[nPos]; if (!rEntry->m_sPublisher.isEmpty() && rEntry->m_aLinkRect.IsInside(rMEvt.GetPosPixel())) @@ -815,8 +815,8 @@ bool ExtensionBox_Impl::KeyInput(const KeyEvent& rKEvt) return bHandled; } -bool ExtensionBox_Impl::FindEntryPos( const TEntry_Impl& rEntry, const long nStart, - const long nEnd, long &nPos ) +bool ExtensionBox_Impl::FindEntryPos( const TEntry_Impl& rEntry, const tools::Long nStart, + const tools::Long nEnd, tools::Long &nPos ) { nPos = nStart; if ( nStart > nEnd ) @@ -846,7 +846,7 @@ bool ExtensionBox_Impl::FindEntryPos( const TEntry_Impl& rEntry, const long nSta } } - const long nMid = nStart + ( ( nEnd - nStart ) / 2 ); + const tools::Long nMid = nStart + ( ( nEnd - nStart ) / 2 ); eCompare = rEntry->CompareTo( m_pCollator.get(), m_vEntries[ nMid ] ); if ( eCompare < 0 ) @@ -904,7 +904,7 @@ void ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > & { osl::MutexGuard guard(m_entriesMutex); - long nPos = 0; + tools::Long nPos = 0; if (m_vEntries.empty()) { addEventListenerOnce(xPackage); @@ -989,7 +989,7 @@ void ExtensionBox_Impl::removeEntry( const uno::Reference< deployment::XPackage [&xPackage](const TEntry_Impl& rxEntry) { return rxEntry->m_xPackage == xPackage; }); if (iIndex != m_vEntries.end()) { - long nPos = iIndex - m_vEntries.begin(); + tools::Long nPos = iIndex - m_vEntries.begin(); // Entries mustn't be removed here, because they contain a hyperlink control // which can only be deleted when the thread has the solar mutex. Therefore @@ -1009,7 +1009,7 @@ void ExtensionBox_Impl::removeEntry( const uno::Reference< deployment::XPackage if ( nPos < m_nActive ) m_nActive -= 1; else if ( ( nPos == m_nActive ) && - ( nPos == static_cast<long>(m_vEntries.size()) ) ) + ( nPos == static_cast<tools::Long>(m_vEntries.size()) ) ) m_nActive -= 1; m_bHasActive = false; @@ -1066,9 +1066,9 @@ void ExtensionBox_Impl::prepareChecking() void ExtensionBox_Impl::checkEntries() { - long nNewPos = -1; - long nChangedActivePos = -1; - long nPos = 0; + tools::Long nNewPos = -1; + tools::Long nChangedActivePos = -1; + tools::Long nPos = 0; bool bNeedsUpdate = false; { diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 7a1eeb46b443..d706975dcdfd 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -113,10 +113,10 @@ class ExtensionBox_Impl : public weld::CustomWidgetController bool m_bInDelete : 1; //Must be guarded together with m_vEntries to ensure a valid index at all times. //Use m_entriesMutex as guard. - long m_nActive; - long m_nTopIndex; - long m_nStdHeight; - long m_nActiveHeight; + tools::Long m_nActive; + tools::Long m_nTopIndex; + tools::Long m_nStdHeight; + tools::Long m_nActiveHeight; Image m_aSharedImage; Image m_aLockedImage; Image m_aWarningImage; @@ -149,12 +149,12 @@ class ExtensionBox_Impl : public weld::CustomWidgetController void cleanVecListenerAdded(); void addEventListenerOnce(css::uno::Reference<css::deployment::XPackage> const & extension); - void CalcActiveHeight( const long nPos ); - long GetTotalHeight() const; + void CalcActiveHeight( const tools::Long nPos ); + tools::Long GetTotalHeight() const; void SetupScrollBar(); void DrawRow(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect, const TEntry_Impl& rEntry); bool HandleCursorKey( sal_uInt16 nKeyCode ); - bool FindEntryPos( const TEntry_Impl& rEntry, long nStart, long nEnd, long &nFound ); + bool FindEntryPos( const TEntry_Impl& rEntry, tools::Long nStart, tools::Long nEnd, tools::Long &nFound ); void DeleteRemoved(); DECL_LINK( ScrollHdl, weld::ScrolledWindow&, void ); @@ -173,16 +173,16 @@ public: virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; - TEntry_Impl const & GetEntryData( long nPos ) { return m_vEntries[ nPos ]; } - long GetEntryCount() const { return static_cast<long>(m_vEntries.size()); } - tools::Rectangle GetEntryRect( const long nPos ) const; + TEntry_Impl const & GetEntryData( tools::Long nPos ) { return m_vEntries[ nPos ]; } + tools::Long GetEntryCount() const { return static_cast<tools::Long>(m_vEntries.size()); } + tools::Rectangle GetEntryRect( const tools::Long nPos ) const; bool HasActive() const { return m_bHasActive; } - long PointToPos( const Point& rPos ); + tools::Long PointToPos( const Point& rPos ); virtual void RecalcAll(); void RemoveUnlocked(); - virtual void selectEntry( const long nPos ); + virtual void selectEntry( const tools::Long nPos ); void addEntry(const css::uno::Reference<css::deployment::XPackage> &xPackage, bool bLicenseMissing = false ); void updateEntry(const css::uno::Reference<css::deployment::XPackage> &xPackage ); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 34a9893bb134..1acdbd58841b 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -506,8 +506,8 @@ RectangleAndPart RectangleAndPart::Create(const std::string& rPayload) } std::istringstream aStream(rPayload); - long nLeft, nTop, nWidth, nHeight; - long nPart = INT_MIN; + tools::Long nLeft, nTop, nWidth, nHeight; + tools::Long nPart = INT_MIN; char nComma; if (comphelper::LibreOfficeKit::isPartInInvalidation()) { @@ -755,8 +755,8 @@ css::uno::Reference< css::document::XUndoManager > getUndoManager( const css::un // Adjusts page margins for Writer doc. Needed by ToggleOrientation void ExecuteMarginLRChange( - const long nPageLeftMargin, - const long nPageRightMargin, + const tools::Long nPageLeftMargin, + const tools::Long nPageRightMargin, SvxLongLRSpaceItem* pPageLRMarginItem) { pPageLRMarginItem->SetLeft( nPageLeftMargin ); @@ -767,8 +767,8 @@ void ExecuteMarginLRChange( // Adjusts page margins for Writer doc. Needed by ToggleOrientation void ExecuteMarginULChange( - const long nPageTopMargin, - const long nPageBottomMargin, + const tools::Long nPageTopMargin, + const tools::Long nPageBottomMargin, SvxLongULSpaceItem* pPageULMarginItem) { pPageULMarginItem->SetUpper( nPageTopMargin ); @@ -786,7 +786,7 @@ void ExecuteOrientationChange() std::unique_ptr<SvxLongULSpaceItem> pPageULMarginItem(new SvxLongULSpaceItem( 0, 0, SID_ATTR_PAGE_ULSPACE )); // 1mm in twips rounded // This should be in sync with MINBODY in sw/source/uibase/sidebar/PageMarginControl.hxx - constexpr long MINBODY = 56; + constexpr tools::Long MINBODY = 56; css::uno::Reference< css::document::XUndoManager > mxUndoManager( getUndoManager( SfxViewFrame::Current()->GetFrame().GetFrameInterface() ) ); @@ -822,8 +822,8 @@ void ExecuteOrientationChange() // swap the width and height of the page size - const long nRotatedWidth = pPageSizeItem->GetSize().Height(); - const long nRotatedHeight = pPageSizeItem->GetSize().Width(); + const tools::Long nRotatedWidth = pPageSizeItem->GetSize().Height(); + const tools::Long nRotatedHeight = pPageSizeItem->GetSize().Width(); pPageSizeItem->SetSize(Size(nRotatedWidth, nRotatedHeight)); @@ -839,11 +839,11 @@ void ExecuteOrientationChange() // check, if margin values still fit to the changed page size. // if not, adjust margin values { - const long nML = pPageLRMarginItem->GetLeft(); - const long nMR = pPageLRMarginItem->GetRight(); - const long nTmpPW = nML + nMR + MINBODY; + const tools::Long nML = pPageLRMarginItem->GetLeft(); + const tools::Long nMR = pPageLRMarginItem->GetRight(); + const tools::Long nTmpPW = nML + nMR + MINBODY; - const long nPW = pPageSizeItem->GetSize().Width(); + const tools::Long nPW = pPageSizeItem->GetSize().Width(); if ( nTmpPW > nPW ) { @@ -857,11 +857,11 @@ void ExecuteOrientationChange() } } - const long nMT = pPageULMarginItem->GetUpper(); - const long nMB = pPageULMarginItem->GetLower(); - const long nTmpPH = nMT + nMB + MINBODY; + const tools::Long nMT = pPageULMarginItem->GetUpper(); + const tools::Long nMB = pPageULMarginItem->GetLower(); + const tools::Long nTmpPH = nMT + nMB + MINBODY; - const long nPH = pPageSizeItem->GetSize().Height(); + const tools::Long nPH = pPageSizeItem->GetSize().Height(); if ( nTmpPH > nPH ) { @@ -1037,8 +1037,8 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis, const int nTileWidth, const int nTileHeight); static int doc_getTileMode(LibreOfficeKitDocument* pThis); static void doc_getDocumentSize(LibreOfficeKitDocument* pThis, - long* pWidth, - long* pHeight); + tools::Long* pWidth, + tools::Long* pHeight); static void doc_initializeForRendering(LibreOfficeKitDocument* pThis, const char* pArguments); @@ -1819,7 +1819,7 @@ bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData) } std::istringstream aRectStream(aRectStr); - long nLeft, nTop, nWidth, nHeight; + tools::Long nLeft, nTop, nWidth, nHeight; char nComma; aRectStream >> nLeft >> nComma >> nTop >> nComma >> nWidth >> nComma >> nHeight; tools::Rectangle aNewRect(nLeft, nTop, nLeft + nWidth, nTop + nHeight); @@ -1834,7 +1834,7 @@ bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData) { // Not possible that we encounter an empty rectangle here; we already handled this case above. std::istringstream aOldRectStream(aOldTree.get<std::string>("rectangle", "")); - long nOldLeft, nOldTop, nOldWidth, nOldHeight; + tools::Long nOldLeft, nOldTop, nOldWidth, nOldHeight; char nOldComma; aOldRectStream >> nOldLeft >> nOldComma >> nOldTop >> nOldComma >> nOldWidth >> nOldComma >> nOldHeight; @@ -3314,8 +3314,8 @@ static int doc_getTileMode(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis* } static void doc_getDocumentSize(LibreOfficeKitDocument* pThis, - long* pWidth, - long* pHeight) + tools::Long* pWidth, + tools::Long* pHeight) { comphelper::ProfileZone aZone("doc_getDocumentSize"); diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index a71224b985af..a354b2960942 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -34,7 +34,7 @@ #include <vcl/introwin.hxx> #include <vcl/virdev.hxx> -#define NOT_LOADED (long(-1)) +#define NOT_LOADED (tools::Long(-1)) #define NOT_LOADED_COLOR (Color(0xffffffff)) using namespace ::com::sun::star::lang; @@ -90,11 +90,11 @@ private: bool _bShowLogo; bool _bFullScreenSplash; bool _bProgressEnd; - long _height, _width, _tlx, _tly, _barwidth; - long _barheight, _barspace, _textBaseline; + tools::Long _height, _width, _tlx, _tly, _barwidth; + tools::Long _barheight, _barspace, _textBaseline; double _fXPos, _fYPos; double _fWidth, _fHeight; - static constexpr long _xoffset = 12, _yoffset = 18; + static constexpr tools::Long _xoffset = 12, _yoffset = 18; public: SplashScreen(); @@ -579,7 +579,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools:: ControlState::ENABLED, aValue, aNativeControlRegion, aNativeContentRegion)) { - long nProgressHeight = aNativeControlRegion.GetHeight(); + tools::Long nProgressHeight = aNativeControlRegion.GetHeight(); aDrawRect.AdjustTop( -((nProgressHeight - pSpl->_barheight)/2) ); aDrawRect.AdjustBottom((nProgressHeight - pSpl->_barheight)/2 ); } @@ -597,7 +597,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const tools:: if (pSpl->_bPaintProgress) { // draw progress... - long length = (pSpl->_iProgress * pSpl->_barwidth / pSpl->_iMax) - (2 * pSpl->_barspace); + tools::Long length = (pSpl->_iProgress * pSpl->_barwidth / pSpl->_iMax) - (2 * pSpl->_barspace); if (length < 0) length = 0; // border |