[Libreoffice-commits] core.git: include/sfx2 sfx2/inc sfx2/source

Noel (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 22 07:23:04 UTC 2020


 include/sfx2/StyleManager.hxx                  |    3 +
 include/sfx2/StylePreviewRenderer.hxx          |    4 +-
 include/sfx2/app.hxx                           |    2 -
 include/sfx2/charwin.hxx                       |    2 -
 include/sfx2/ipclient.hxx                      |    2 -
 include/sfx2/lokcharthelper.hxx                |    2 -
 include/sfx2/lokhelper.hxx                     |    2 -
 include/sfx2/sidebar/PanelLayout.hxx           |    2 -
 include/sfx2/templatelocalview.hxx             |   14 +++----
 include/sfx2/thumbnailview.hxx                 |   38 +++++++++----------
 include/sfx2/thumbnailviewitem.hxx             |    4 +-
 include/sfx2/viewsh.hxx                        |    2 -
 sfx2/inc/emojiviewitem.hxx                     |    4 +-
 sfx2/inc/recentdocsview.hxx                    |    2 -
 sfx2/inc/sidebar/TitleBar.hxx                  |    2 -
 sfx2/inc/templatedefaultview.hxx               |    2 -
 sfx2/source/appl/appmisc.cxx                   |    2 -
 sfx2/source/appl/impldde.cxx                   |    2 -
 sfx2/source/appl/workwin.cxx                   |    6 +--
 sfx2/source/control/charwin.cxx                |   10 ++---
 sfx2/source/control/dispatch.cxx               |    2 -
 sfx2/source/control/emojiviewitem.cxx          |    4 +-
 sfx2/source/control/recentdocsview.cxx         |    8 ++--
 sfx2/source/control/recentdocsviewitem.cxx     |    6 +--
 sfx2/source/control/recentdocsviewitem.hxx     |    2 -
 sfx2/source/control/templatedefaultview.cxx    |    2 -
 sfx2/source/control/templatelocalview.cxx      |   10 ++---
 sfx2/source/control/thumbnailview.cxx          |   50 ++++++++++++-------------
 sfx2/source/control/thumbnailviewitem.cxx      |    4 +-
 sfx2/source/dialog/backingcomp.cxx             |    2 -
 sfx2/source/dialog/dinfdlg.cxx                 |    2 -
 sfx2/source/dialog/dockwin.cxx                 |    6 +--
 sfx2/source/dialog/infobar.cxx                 |    2 -
 sfx2/source/dialog/splitwin.cxx                |   12 +++---
 sfx2/source/doc/SfxRedactionHelper.cxx         |    2 -
 sfx2/source/doc/doctempl.cxx                   |    2 -
 sfx2/source/doc/new.cxx                        |    4 +-
 sfx2/source/inc/splitwin.hxx                   |    2 -
 sfx2/source/notebookbar/DropdownBox.cxx        |    4 +-
 sfx2/source/notebookbar/PriorityHBox.cxx       |    6 +--
 sfx2/source/notebookbar/PriorityMergedHBox.cxx |   10 ++---
 sfx2/source/sidebar/Deck.cxx                   |    2 -
 sfx2/source/sidebar/PanelLayout.cxx            |    2 -
 sfx2/source/sidebar/ResourceManager.cxx        |    2 -
 sfx2/source/sidebar/SidebarController.cxx      |    6 +--
 sfx2/source/sidebar/TitleBar.cxx               |    2 -
 sfx2/source/sidebar/UnoDecks.cxx               |    2 -
 sfx2/source/sidebar/UnoPanels.cxx              |    2 -
 sfx2/source/view/frame.cxx                     |    4 +-
 sfx2/source/view/ipclient.cxx                  |   22 +++++------
 sfx2/source/view/lokcharthelper.cxx            |    2 -
 sfx2/source/view/sfxbasecontroller.cxx         |    2 -
 sfx2/source/view/viewsh.cxx                    |    2 -
 53 files changed, 150 insertions(+), 149 deletions(-)

New commits:
commit b06d31f0998d5969c104697cd1b1888c06a0116c
Author:     Noel <noelgrandin at gmail.com>
AuthorDate: Wed Oct 21 15:31:57 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Oct 22 09:22:04 2020 +0200

    long->tools::Long in sfx2
    
    Change-Id: Ie1283e353598cd05e5a2933814f618649b89de01
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104628
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sfx2/StyleManager.hxx b/include/sfx2/StyleManager.hxx
index 625c9350b03c..0c747eba5831 100644
--- a/include/sfx2/StyleManager.hxx
+++ b/include/sfx2/StyleManager.hxx
@@ -13,6 +13,7 @@
 #include <sfx2/dllapi.h>
 
 #include <svl/style.hxx>
+#include <tools/long.hxx>
 
 #include <memory>
 
@@ -40,7 +41,7 @@ public:
 
     virtual std::unique_ptr<StylePreviewRenderer> CreateStylePreviewRenderer(
                     OutputDevice& rOutputDev, SfxStyleSheetBase* pStyle,
-                    long nMaxHeight) = 0;
+                    tools::Long nMaxHeight) = 0;
 };
 
 } // end namespace sfx2
diff --git a/include/sfx2/StylePreviewRenderer.hxx b/include/sfx2/StylePreviewRenderer.hxx
index 3065c8b31c41..1692182bd113 100644
--- a/include/sfx2/StylePreviewRenderer.hxx
+++ b/include/sfx2/StylePreviewRenderer.hxx
@@ -25,7 +25,7 @@ protected:
     const SfxObjectShell& mrShell;
     OutputDevice& mrOutputDev;
     SfxStyleSheetBase* mpStyle;
-    long mnMaxHeight;
+    tools::Long mnMaxHeight;
 
 public:
     enum class RenderAlign
@@ -36,7 +36,7 @@ public:
     StylePreviewRenderer(const SfxObjectShell& rShell,
                          OutputDevice& rOutputDev,
                          SfxStyleSheetBase* pStyle,
-                         long nMaxHeight)
+                         tools::Long nMaxHeight)
         : mrShell(rShell)
         , mrOutputDev(rOutputDev)
         , mpStyle(pStyle)
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 481dc9dd5650..9714ad8e13d5 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -219,7 +219,7 @@ public:
     static bool loadBrandSvg(const char *pName, BitmapEx &rBitmap, int nWidth);
 
     /** loads the application logo as used in the impress slideshow pause screen */
-    static BitmapEx GetApplicationLogo(long nWidth);
+    static BitmapEx GetApplicationLogo(tools::Long nWidth);
 
     /** this Theme contains Images so must be deleted before DeInitVCL */
     sfx2::sidebar::Theme & GetSidebarTheme();
diff --git a/include/sfx2/charwin.hxx b/include/sfx2/charwin.hxx
index 81481dba4c8f..253bed5c1bd1 100644
--- a/include/sfx2/charwin.hxx
+++ b/include/sfx2/charwin.hxx
@@ -29,7 +29,7 @@ class SFX2_DLLPUBLIC SvxCharView final : public weld::CustomWidgetController
 {
 private:
     VclPtr<VirtualDevice> mxVirDev;
-    long            mnY;
+    tools::Long            mnY;
     Point           maPosition;
     vcl::Font       maFont;
     bool            maHasInsert;
diff --git a/include/sfx2/ipclient.hxx b/include/sfx2/ipclient.hxx
index 62c421c3c783..d3fead566486 100644
--- a/include/sfx2/ipclient.hxx
+++ b/include/sfx2/ipclient.hxx
@@ -81,7 +81,7 @@ public:
     static SfxInPlaceClient* GetClient( SfxObjectShell const * pDoc, const css::uno::Reference < css::embed::XEmbeddedObject >& xObject );
     sal_Int64           GetAspect() const;
     sal_Int64           GetObjectMiscStatus() const;
-    ErrCode             DoVerb( long nVerb );
+    ErrCode             DoVerb( tools::Long nVerb );
     void                VisAreaChanged();
     void                ResetObject();
     bool                IsUIActive() const;
diff --git a/include/sfx2/lokcharthelper.hxx b/include/sfx2/lokcharthelper.hxx
index 8998010d1258..020abad111f0 100644
--- a/include/sfx2/lokcharthelper.hxx
+++ b/include/sfx2/lokcharthelper.hxx
@@ -47,7 +47,7 @@ public:
     static void PaintAllChartsOnTile(VirtualDevice& rDevice,
                                      int nOutputWidth, int nOutputHeight,
                                      int nTilePosX, int nTilePosY,
-                                     long nTileWidth, long nTileHeight);
+                                     tools::Long nTileWidth, tools::Long nTileHeight);
     bool postMouseEvent(int nType, int nX, int nY,
                         int nCount, int nButtons, int nModifier,
                         double fScaleX = 1.0, double fScaleY = 1.0);
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 68d029ea5ddf..79052a0d6e04 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -117,7 +117,7 @@ public:
 
     /// A special value to signify 'infinity'.
     /// This value is chosen such that sal_Int32 will not overflow when manipulated.
-    static const long MaxTwips = 1e9;
+    static const tools::Long MaxTwips = 1e9;
 };
 
 template<typename ViewShellType, typename FunctionType>
diff --git a/include/sfx2/sidebar/PanelLayout.hxx b/include/sfx2/sidebar/PanelLayout.hxx
index c3a22d8687e9..e8ee96ae8f44 100644
--- a/include/sfx2/sidebar/PanelLayout.hxx
+++ b/include/sfx2/sidebar/PanelLayout.hxx
@@ -40,7 +40,7 @@ public:
     virtual void dispose() override;
 
     virtual Size GetOptimalSize() const override;
-    virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override;
+    virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override;
     virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override;
     virtual bool EventNotify(NotifyEvent& rNEvt) override;
 };
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index 8144340a0ee7..6540d091f230 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -105,13 +105,13 @@ public:
 
     void setEditTemplateHdl(const Link<ThumbnailViewItem*,void> &rLink);
 
-    void updateThumbnailDimensions(long itemMaxSize);
+    void updateThumbnailDimensions(tools::Long itemMaxSize);
 
-    static BitmapEx scaleImg (const BitmapEx &rImg, long width, long height);
+    static BitmapEx scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height);
 
     static BitmapEx getDefaultThumbnail( const OUString& rPath );
 
-    static BitmapEx fetchThumbnail (const OUString &msURL, long width, long height);
+    static BitmapEx fetchThumbnail (const OUString &msURL, tools::Long width, tools::Long height);
 
     static bool IsDefaultTemplate(const OUString& rPath);
 
@@ -123,8 +123,8 @@ protected:
 
     TemplateViewItem *maSelectedItem;
 
-    long mnThumbnailWidth;
-    long mnThumbnailHeight;
+    tools::Long mnThumbnailWidth;
+    tools::Long mnThumbnailHeight;
 
     Point maPosition; //store the point of click event
 
@@ -222,11 +222,11 @@ public:
 
     void RemoveDefaultTemplateIcon( const OUString& rPath);
 
-    static BitmapEx scaleImg (const BitmapEx &rImg, long width, long height);
+    static BitmapEx scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height);
 
     static BitmapEx getDefaultThumbnail( const OUString& rPath );
 
-    static BitmapEx fetchThumbnail (const OUString &msURL, long width, long height);
+    static BitmapEx fetchThumbnail (const OUString &msURL, tools::Long width, tools::Long height);
 
     static bool IsDefaultTemplate(const OUString& rPath);
 
diff --git a/include/sfx2/thumbnailview.hxx b/include/sfx2/thumbnailview.hxx
index 90ea8e1c1e18..bd4a815b47ca 100644
--- a/include/sfx2/thumbnailview.hxx
+++ b/include/sfx2/thumbnailview.hxx
@@ -209,8 +209,8 @@ public:
 
     void setItemMaxTextLength (sal_uInt32 nLength);
 
-    void setItemDimensions (long ItemWidth, long ThumbnailHeight,
-                            long DisplayHeight, int itemPadding);
+    void setItemDimensions (tools::Long ItemWidth, tools::Long ThumbnailHeight,
+                            tools::Long DisplayHeight, int itemPadding);
 
     void SelectItem( sal_uInt16 nItemId );
 
@@ -290,13 +290,13 @@ protected:
     ThumbnailValueItemList mFilteredItemList; ///< Cache to store the filtered items
     ThumbnailValueItemList::iterator mpStartSelRange;
     VclPtr<ScrollBar> mpScrBar;
-    long mnItemWidth;
-    long mnItemHeight;
-    long mnItemPadding;
-    long mnThumbnailHeight;     // Maximum height of the thumbnail
-    long mnDisplayHeight;       // Height of the data display box (name, etc)
-    long mnVisLines;
-    long mnLines;
+    tools::Long mnItemWidth;
+    tools::Long mnItemHeight;
+    tools::Long mnItemPadding;
+    tools::Long mnThumbnailHeight;     // Maximum height of the thumbnail
+    tools::Long mnDisplayHeight;       // Height of the data display box (name, etc)
+    tools::Long mnVisLines;
+    tools::Long mnLines;
 
     sal_uInt16 mnCols;
     sal_uInt16 mnFirstLine;
@@ -346,8 +346,8 @@ public:
 
     void setItemMaxTextLength (sal_uInt32 nLength);
 
-    void setItemDimensions (long ItemWidth, long ThumbnailHeight,
-                            long DisplayHeight, int itemPadding);
+    void setItemDimensions (tools::Long ItemWidth, tools::Long ThumbnailHeight,
+                            tools::Long DisplayHeight, int itemPadding);
 
     void SelectItem( sal_uInt16 nItemId );
 
@@ -438,14 +438,14 @@ protected:
     css::uno::Reference<css::accessibility::XAccessible> mxAccessible;
     ThumbnailValueItemList mFilteredItemList; ///< Cache to store the filtered items
     ThumbnailValueItemList::iterator mpStartSelRange;
-    long mnItemWidth;
-    long mnItemHeight;
-    long mnItemPadding;
-    long mnThumbnailHeight;     // Maximum height of the thumbnail
-    long mnDisplayHeight;       // Height of the data display box (name, etc)
-    long mnVItemSpace;          // Vertical spacing between rows, -1 to use excess unused height split up between items
-    long mnVisLines;
-    long mnLines;
+    tools::Long mnItemWidth;
+    tools::Long mnItemHeight;
+    tools::Long mnItemPadding;
+    tools::Long mnThumbnailHeight;     // Maximum height of the thumbnail
+    tools::Long mnDisplayHeight;       // Height of the data display box (name, etc)
+    tools::Long mnVItemSpace;          // Vertical spacing between rows, -1 to use excess unused height split up between items
+    tools::Long mnVisLines;
+    tools::Long mnLines;
 
     sal_uInt16 mnCols;
     sal_uInt16 mnFirstLine;
diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx
index d1e1a7a97089..0b80df682dbf 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -114,8 +114,8 @@ public:
 
     const tools::Rectangle& getDrawArea () const { return maDrawArea; }
 
-    virtual void calculateItemsPosition (const long nThumbnailHeight,
-                                         const long nPadding, sal_uInt32 nMaxTextLength,
+    virtual void calculateItemsPosition (const tools::Long nThumbnailHeight,
+                                         const tools::Long nPadding, sal_uInt32 nMaxTextLength,
                                          const ThumbnailItemAttributes *pAttrs);
 
     virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor,
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index e17de5c17929..7965cb79dfc4 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -203,7 +203,7 @@ public:
     SfxInPlaceClient*           GetUIActiveClient() const;
     SfxInPlaceClient*           FindIPClient( const css::uno::Reference < css::embed::XEmbeddedObject >&  xObj, vcl::Window *pObjParentWin ) const;
 
-    virtual ErrCode             DoVerb(long nVerb);
+    virtual ErrCode             DoVerb(tools::Long nVerb);
 
     void                        OutplaceActivated( bool bActive );
     virtual void                UIActivating( SfxInPlaceClient* pClient );
diff --git a/sfx2/inc/emojiviewitem.hxx b/sfx2/inc/emojiviewitem.hxx
index a5d902946b1a..b5a614f7acba 100644
--- a/sfx2/inc/emojiviewitem.hxx
+++ b/sfx2/inc/emojiviewitem.hxx
@@ -25,8 +25,8 @@ public:
     virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor,
                         const ThumbnailItemAttributes *pAttrs) override;
 
-    virtual void calculateItemsPosition (const long nThumbnailHeight,
-                                         const long nPadding, sal_uInt32 nMaxTextLength,
+    virtual void calculateItemsPosition (const tools::Long nThumbnailHeight,
+                                         const tools::Long nPadding, sal_uInt32 nMaxTextLength,
                                          const ThumbnailItemAttributes *pAttrs) override;
 private:
     OUString msCategory;
diff --git a/sfx2/inc/recentdocsview.hxx b/sfx2/inc/recentdocsview.hxx
index 95b9386cd0ec..9067f3cef5a3 100644
--- a/sfx2/inc/recentdocsview.hxx
+++ b/sfx2/inc/recentdocsview.hxx
@@ -85,7 +85,7 @@ private:
 
     bool isAcceptedFile(const OUString &rURL) const;
 
-    long mnItemMaxSize;
+    tools::Long mnItemMaxSize;
     size_t mnLastMouseDownItem;
 
     /// Image that appears when there is no recent document.
diff --git a/sfx2/inc/sidebar/TitleBar.hxx b/sfx2/inc/sidebar/TitleBar.hxx
index 69c182825b75..e6a3e302bae0 100644
--- a/sfx2/inc/sidebar/TitleBar.hxx
+++ b/sfx2/inc/sidebar/TitleBar.hxx
@@ -41,7 +41,7 @@ public:
     virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
     virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) override;
     virtual void DataChanged (const DataChangedEvent& rEvent) override;
-    virtual void setPosSizePixel (long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override;
+    virtual void setPosSizePixel (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override;
 
     ToolBox& GetToolBox()
     {
diff --git a/sfx2/inc/templatedefaultview.hxx b/sfx2/inc/templatedefaultview.hxx
index 9020a779bfd9..8c50c428792b 100644
--- a/sfx2/inc/templatedefaultview.hxx
+++ b/sfx2/inc/templatedefaultview.hxx
@@ -27,7 +27,7 @@ public:
     void createContextMenu();
 
 private:
-    long    mnItemMaxSize;
+    tools::Long    mnItemMaxSize;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index 53613b8921d9..864e2aaaf1a3 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -200,7 +200,7 @@ bool SfxApplication::loadBrandSvg(const char *pName, BitmapEx &rBitmap, int nWid
 }
 
 /** loads the application logo as used in the impress slideshow pause screen */
-BitmapEx SfxApplication::GetApplicationLogo(long nWidth)
+BitmapEx SfxApplication::GetApplicationLogo(tools::Long nWidth)
 {
     BitmapEx aBitmap;
     SfxApplication::loadBrandSvg("shell/about", aBitmap, nWidth);
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 5a42eadc8f2b..c70cb4cb6a19 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -296,7 +296,7 @@ IMPL_LINK( SvDDEObject, ImplGetDDEData, const DdeData*, pData, void )
     default:
         {
             const char* p = static_cast<char const *>(pData->getData());
-            long nLen = SotClipboardFormatId::STRING == nFmt ? (p ? strlen( p ) : 0) : pData->getSize();
+            tools::Long nLen = SotClipboardFormatId::STRING == nFmt ? (p ? strlen( p ) : 0) : pData->getSize();
 
             Sequence< sal_Int8 > aSeq( reinterpret_cast<const sal_Int8*>(p), nLen );
             if( pGetData )
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 9c50a657c097..217ae75436bf 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -2316,7 +2316,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
 
                 // If a Window is visible to the left, then the free region
                 // starts to the right from it, for example at the Client area
-                long nLeft = aPos.X() + aSize.Width();
+                tools::Long nLeft = aPos.X() + aSize.Width();
                 if ( nLeft > aArea.Left() )
                     aArea.SetLeft( nLeft );
                 break;
@@ -2343,7 +2343,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
 
                 // If a Window is visible to the right, then the free region
                 // starts to the left from it, for example at the Client area
-                long nRight = aPos.X();
+                tools::Long nRight = aPos.X();
                 if ( !aArea.IsWidthEmpty() && nRight < aArea.Right() )
                     aArea.SetRight( nRight );
                 break;
@@ -2363,7 +2363,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
 
                 // If a Window is visible at the top, then the free region
                 // starts beneath it, for example at the Client area
-                long nTop = aPos.Y() + aSize.Height();
+                tools::Long nTop = aPos.Y() + aSize.Height();
                 if ( nTop > aArea.Top() )
                     aArea.SetTop( nTop );
                 break;
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index ac9ea6fb2f71..5d6166112800 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -146,8 +146,8 @@ void SvxCharView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
     const OUString aText = GetText();
 
     Size aSize(GetOutputSizePixel());
-    long nAvailWidth = aSize.Width();
-    long nWinHeight = aSize.Height();
+    tools::Long nAvailWidth = aSize.Width();
+    tools::Long nWinHeight = aSize.Height();
 
     bool bGotBoundary = true;
     bool bShrankFont = false;
@@ -155,7 +155,7 @@ void SvxCharView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
     Size aFontSize(aOrigFont.GetFontSize());
     ::tools::Rectangle aBoundRect;
 
-    for (long nFontHeight = aFontSize.Height(); nFontHeight > 0; nFontHeight -= 1)
+    for (tools::Long nFontHeight = aFontSize.Height(); nFontHeight > 0; nFontHeight -= 1)
     {
         if (!rRenderContext.GetTextBoundRect( aBoundRect, aText ) || aBoundRect.IsEmpty())
         {
@@ -164,7 +164,7 @@ void SvxCharView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
         }
 
         //only shrink in the single glyph large view mode
-        long nTextWidth = aBoundRect.GetWidth();
+        tools::Long nTextWidth = aBoundRect.GetWidth();
         if (nAvailWidth > nTextWidth)
             break;
         vcl::Font aFont(aOrigFont);
@@ -236,7 +236,7 @@ void SvxCharView::setClearAllClickHdl(const Link<SvxCharView*,void> &rLink)
 
 void SvxCharView::SetFont( const vcl::Font& rFont )
 {
-    long nWinHeight = GetOutputSizePixel().Height();
+    tools::Long nWinHeight = GetOutputSizePixel().Height();
     maFont = rFont;
     maFont.SetWeight(WEIGHT_NORMAL);
     maFont.SetAlignment(ALIGN_TOP);
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 6e6104883fe0..de98fb5e228a 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1456,7 +1456,7 @@ extern "C" {
 
 static int SfxCompareSIDs_Impl(const void* pSmaller, const void* pBigger)
 {
-    return static_cast<long>(*static_cast<sal_uInt16 const *>(pSmaller)) - static_cast<long>(*static_cast<sal_uInt16 const *>(pBigger));
+    return static_cast<tools::Long>(*static_cast<sal_uInt16 const *>(pSmaller)) - static_cast<tools::Long>(*static_cast<sal_uInt16 const *>(pBigger));
 }
 
 }
diff --git a/sfx2/source/control/emojiviewitem.cxx b/sfx2/source/control/emojiviewitem.cxx
index 4ee1a55e4592..f9394ea9435c 100644
--- a/sfx2/source/control/emojiviewitem.cxx
+++ b/sfx2/source/control/emojiviewitem.cxx
@@ -32,8 +32,8 @@ EmojiViewItem::~EmojiViewItem ()
 }
 
 
-void EmojiViewItem::calculateItemsPosition (const long /*nThumbnailHeight*/,
-                                                const long /*nPadding*/, sal_uInt32 nMaxTextLength,
+void EmojiViewItem::calculateItemsPosition (const tools::Long /*nThumbnailHeight*/,
+                                                const tools::Long /*nPadding*/, sal_uInt32 nMaxTextLength,
                                                 const ThumbnailItemAttributes *pAttrs)
 {
     drawinglayer::primitive2d::TextLayouterDevice aTextDev;
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index abbf7e71ec1f..063051642fa0 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -118,8 +118,8 @@ static std::map<ApplicationType,OUString> EncryptedBitmapForExtension =
     { ApplicationType::TYPE_MATH, BMP_128X128_MATH_DOC }
 };
 
-constexpr long gnTextHeight = 30;
-constexpr long gnItemPadding = 5;
+constexpr tools::Long gnTextHeight = 30;
+constexpr tools::Long gnItemPadding = 5;
 
 RecentDocsView::RecentDocsView( vcl::Window* pParent )
     : ThumbnailView(pParent)
@@ -355,7 +355,7 @@ void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
     {
         if (maWelcomeImage.IsEmpty())
         {
-            const long aWidth(aRect.GetWidth() > aRect.getHeight() ? aRect.GetHeight()/2 : aRect.GetWidth()/2);
+            const tools::Long aWidth(aRect.GetWidth() > aRect.getHeight() ? aRect.GetHeight()/2 : aRect.GetWidth()/2);
             maWelcomeImage = SfxApplication::GetApplicationLogo(aWidth);
         }
 
@@ -364,7 +364,7 @@ void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
         SetMessageFont(rRenderContext);
         SetTextColor(maTextColor);
 
-        long nTextHeight = rRenderContext.GetTextHeight();
+        tools::Long nTextHeight = rRenderContext.GetTextHeight();
 
         const Size& rImgSize = maWelcomeImage.GetSizePixel();
         const Size& rSize = GetSizePixel();
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index fd6d06cf378a..e7676f1ac74b 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -31,7 +31,7 @@ using namespace drawinglayer::primitive2d;
 using namespace drawinglayer::processor2d;
 
 RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUString &rURL,
-    const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId, long nThumbnailSize)
+    const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId, tools::Long nThumbnailSize)
     : ThumbnailViewItem(rView, nId),
       mrParentView(rView),
       maURL(rURL),
@@ -63,8 +63,8 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUStri
         Size aExtSize(aExt.GetSizePixel());
 
         // attempt to make it appear as if it is on a piece of paper
-        long nPaperHeight;
-        long nPaperWidth;
+        tools::Long nPaperHeight;
+        tools::Long nPaperWidth;
         if (sfx2::RecentDocsView::typeMatchesExtension(
                 sfx2::ApplicationType::TYPE_IMPRESS, aURLObj.getExtension()))
         {
diff --git a/sfx2/source/control/recentdocsviewitem.hxx b/sfx2/source/control/recentdocsviewitem.hxx
index b541c00d317f..cb6320e9ee74 100644
--- a/sfx2/source/control/recentdocsviewitem.hxx
+++ b/sfx2/source/control/recentdocsviewitem.hxx
@@ -23,7 +23,7 @@ class RecentDocsViewItem final : public ThumbnailViewItem
 {
 public:
     RecentDocsViewItem(sfx2::RecentDocsView &rView, const OUString &rURL,
-        const OUString &rTitle, const BitmapEx& rThumbnail, sal_uInt16 nId, long nThumbnailSize);
+        const OUString &rTitle, const BitmapEx& rThumbnail, sal_uInt16 nId, tools::Long nThumbnailSize);
 
     /** Updates own highlight status based on the aPoint position.
 
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index 70b8f43eb85d..5b4a4ccd429a 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -25,7 +25,7 @@
 VCL_BUILDER_FACTORY(TemplateDefaultView)
 
 constexpr int gnItemPadding(5); //TODO:: Change padding to 10. It looks really crowded and occupied.
-constexpr long gnTextHeight = 30;
+constexpr tools::Long gnTextHeight = 30;
 
 TemplateDefaultView::TemplateDefaultView( Window* pParent)
     : TemplateLocalView(pParent)
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 1465933590b5..c043102e73ae 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -289,7 +289,7 @@ void TemplateLocalView::insertItems(const std::vector<TemplateItemProperties> &r
     updateItems(std::move(aItems));
 }
 
-void TemplateLocalView::updateThumbnailDimensions(long itemMaxSize)
+void TemplateLocalView::updateThumbnailDimensions(tools::Long itemMaxSize)
 {
     mnThumbnailWidth = itemMaxSize;
     mnThumbnailHeight = itemMaxSize;
@@ -403,7 +403,7 @@ void TemplateLocalView::setEditTemplateHdl(const Link<ThumbnailViewItem*,void> &
     maEditTemplateHdl = rLink;
 }
 
-BitmapEx TemplateLocalView::scaleImg (const BitmapEx &rImg, long width, long height)
+BitmapEx TemplateLocalView::scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height)
 {
     BitmapEx aImg = rImg;
 
@@ -453,7 +453,7 @@ BitmapEx TemplateLocalView::getDefaultThumbnail( const OUString& rPath )
     return aImg;
 }
 
-BitmapEx TemplateLocalView::fetchThumbnail (const OUString &msURL, long width, long height)
+BitmapEx TemplateLocalView::fetchThumbnail (const OUString &msURL, tools::Long width, tools::Long height)
 {
     return TemplateLocalView::scaleImg(ThumbnailView::readThumbnail(msURL), width, height);
 }
@@ -1263,7 +1263,7 @@ void SfxTemplateLocalView::setDefaultTemplateHdl(const Link<ThumbnailViewItem*,v
     maDefaultTemplateHdl = rLink;
 }
 
-BitmapEx SfxTemplateLocalView::scaleImg (const BitmapEx &rImg, long width, long height)
+BitmapEx SfxTemplateLocalView::scaleImg (const BitmapEx &rImg, tools::Long width, tools::Long height)
 {
     BitmapEx aImg = rImg;
 
@@ -1327,7 +1327,7 @@ BitmapEx SfxTemplateLocalView::getDefaultThumbnail( const OUString& rPath )
     return aImg;
 }
 
-BitmapEx SfxTemplateLocalView::fetchThumbnail (const OUString &msURL, long width, long height)
+BitmapEx SfxTemplateLocalView::fetchThumbnail (const OUString &msURL, tools::Long width, tools::Long height)
 {
     return SfxTemplateLocalView::scaleImg(ThumbnailView::readThumbnail(msURL), width, height);
 }
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index fa1f2d26d7a8..b0827d4922cc 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -235,7 +235,7 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
     size_t      nItemCount = mFilteredItemList.size();
     WinBits     nStyle = GetStyle();
     VclPtr<ScrollBar>  pDelScrBar;
-    long        nScrBarWidth = 0;
+    tools::Long        nScrBarWidth = 0;
 
     // consider the scrolling
     if ( nStyle & WB_VSCROLL )
@@ -277,14 +277,14 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
     mnVisLines = static_cast<sal_uInt16>(aWinSize.Height() / mnItemHeight);
 
     // calculate empty space
-    long nHSpace = aWinSize.Width()-nScrBarWidth - mnCols*mnItemWidth;
-    long nVSpace = aWinSize.Height() - mnVisLines*mnItemHeight;
-    long nHItemSpace = nHSpace / (mnCols+1);
-    long nVItemSpace = nVSpace / (mnVisLines+1);
+    tools::Long nHSpace = aWinSize.Width()-nScrBarWidth - mnCols*mnItemWidth;
+    tools::Long nVSpace = aWinSize.Height() - mnVisLines*mnItemHeight;
+    tools::Long nHItemSpace = nHSpace / (mnCols+1);
+    tools::Long nVItemSpace = nVSpace / (mnVisLines+1);
 
     // calculate maximum number of rows
     // Floor( (M+N-1)/N )==Ceiling( M/N )
-    mnLines = (static_cast<long>(nItemCount)+mnCols-1) / mnCols;
+    mnLines = (static_cast<tools::Long>(nItemCount)+mnCols-1) / mnCols;
 
     if ( !mnLines )
         mnLines = 1;
@@ -296,18 +296,18 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
 
     mbHasVisibleItems = true;
 
-    long nFullSteps = (mnLines > mnVisLines) ? mnLines - mnVisLines + 1 : 1;
+    tools::Long nFullSteps = (mnLines > mnVisLines) ? mnLines - mnVisLines + 1 : 1;
 
-    long nItemHeightOffset = mnItemHeight + nVItemSpace;
-    long nHiddenLines = static_cast<long>((nFullSteps - 1) * nScrollRatio);
+    tools::Long nItemHeightOffset = mnItemHeight + nVItemSpace;
+    tools::Long nHiddenLines = static_cast<tools::Long>((nFullSteps - 1) * nScrollRatio);
 
     // calculate offsets
-    long nStartX = nHItemSpace;
-    long nStartY = nVItemSpace;
+    tools::Long nStartX = nHItemSpace;
+    tools::Long nStartY = nVItemSpace;
 
     // calculate and draw items
-    long x = nStartX;
-    long y = nStartY - ((nFullSteps - 1) * nScrollRatio - nHiddenLines) * nItemHeightOffset;
+    tools::Long x = nStartX;
+    tools::Long y = nStartY - ((nFullSteps - 1) * nScrollRatio - nHiddenLines) * nItemHeightOffset;
 
     // draw items
     // Unless we are scrolling (via scrollbar) we just use the precalculated
@@ -388,8 +388,8 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed)
         mpScrBar->SetRangeMax(mnLines * gnFineness);
         mpScrBar->SetVisibleSize(mnVisLines * gnFineness);
         if (!bScrollBarUsed)
-            mpScrBar->SetThumbPos( static_cast<long>(mnFirstLine)*gnFineness );
-        long nPageSize = mnVisLines;
+            mpScrBar->SetThumbPos( static_cast<tools::Long>(mnFirstLine)*gnFineness );
+        tools::Long nPageSize = mnVisLines;
         if ( nPageSize < 1 )
             nPageSize = 1;
         mpScrBar->SetPageSize( nPageSize );
@@ -481,7 +481,7 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt )
     // Get the last selected item in the list
     size_t nLastPos = 0;
     bool bFoundLast = false;
-    for ( long i = mFilteredItemList.size() - 1; !bFoundLast && i >= 0; --i )
+    for ( tools::Long i = mFilteredItemList.size() - 1; !bFoundLast && i >= 0; --i )
     {
         ThumbnailViewItem* pItem = mFilteredItemList[i];
         if ( pItem->isSelected() )
@@ -968,7 +968,7 @@ void ThumbnailView::setItemMaxTextLength(sal_uInt32 nLength)
     mpItemAttrs->nMaxTextLength = nLength;
 }
 
-void ThumbnailView::setItemDimensions(long itemWidth, long thumbnailHeight, long displayHeight, int itemPadding)
+void ThumbnailView::setItemDimensions(tools::Long itemWidth, tools::Long thumbnailHeight, tools::Long displayHeight, int itemPadding)
 {
     mnItemWidth = itemWidth + 2*itemPadding;
     mnThumbnailHeight = thumbnailHeight;
@@ -1418,7 +1418,7 @@ void SfxThumbnailView::CalculateItemPositions(bool bScrollBarUsed)
         nScrollRatio = 0;
 
     // calculate ScrollBar width
-    long nScrBarWidth = mbAllowVScrollBar ? mxScrolledWindow->get_vscroll_width() : 0;
+    tools::Long nScrBarWidth = mbAllowVScrollBar ? mxScrolledWindow->get_vscroll_width() : 0;
 
     // calculate maximum number of visible columns
     mnCols = static_cast<sal_uInt16>((aWinSize.Width()-nScrBarWidth) / mnItemWidth);
@@ -1430,16 +1430,16 @@ void SfxThumbnailView::CalculateItemPositions(bool bScrollBarUsed)
     mnVisLines = static_cast<sal_uInt16>(aWinSize.Height() / mnItemHeight);
 
     // calculate empty space
-    long nHSpace = aWinSize.Width()-nScrBarWidth - mnCols*mnItemWidth;
-    long nVSpace = aWinSize.Height() - mnVisLines*mnItemHeight;
-    long nHItemSpace = nHSpace / (mnCols+1);
-    long nVItemSpace = mnVItemSpace;
+    tools::Long nHSpace = aWinSize.Width()-nScrBarWidth - mnCols*mnItemWidth;
+    tools::Long nVSpace = aWinSize.Height() - mnVisLines*mnItemHeight;
+    tools::Long nHItemSpace = nHSpace / (mnCols+1);
+    tools::Long nVItemSpace = mnVItemSpace;
     if (nVItemSpace == -1) // auto, split up extra space to use as vertical spacing
         nVItemSpace = nVSpace / (mnVisLines+1);
 
     // calculate maximum number of rows
     // Floor( (M+N-1)/N )==Ceiling( M/N )
-    mnLines = (static_cast<long>(nItemCount)+mnCols-1) / mnCols;
+    mnLines = (static_cast<tools::Long>(nItemCount)+mnCols-1) / mnCols;
 
     if ( !mnLines )
         mnLines = 1;
@@ -1627,7 +1627,7 @@ bool SfxThumbnailView::KeyInput( const KeyEvent& rKEvt )
     // Get the last selected item in the list
     size_t nLastPos = 0;
     bool bFoundLast = false;
-    for ( long i = mFilteredItemList.size() - 1; !bFoundLast && i >= 0; --i )
+    for ( tools::Long i = mFilteredItemList.size() - 1; !bFoundLast && i >= 0; --i )
     {
         ThumbnailViewItem* pItem = mFilteredItemList[i];
         if ( pItem->isSelected() )
@@ -2141,7 +2141,7 @@ void SfxThumbnailView::setItemMaxTextLength(sal_uInt32 nLength)
     mpItemAttrs->nMaxTextLength = nLength;
 }
 
-void SfxThumbnailView::setItemDimensions(long itemWidth, long thumbnailHeight, long displayHeight, int itemPadding)
+void SfxThumbnailView::setItemDimensions(tools::Long itemWidth, tools::Long thumbnailHeight, tools::Long displayHeight, int itemPadding)
 {
     mnItemWidth = itemWidth + 2*itemPadding;
     mnThumbnailHeight = thumbnailHeight;
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index b3a6e7d4af97..e858bb9f0834 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -116,8 +116,8 @@ void ThumbnailViewItem::setDrawArea (const ::tools::Rectangle &area)
     maDrawArea = area;
 }
 
-void ThumbnailViewItem::calculateItemsPosition (const long nThumbnailHeight,
-                                                const long nPadding, sal_uInt32 nMaxTextLength,
+void ThumbnailViewItem::calculateItemsPosition (const tools::Long nThumbnailHeight,
+                                                const tools::Long nPadding, sal_uInt32 nMaxTextLength,
                                                 const ThumbnailItemAttributes *pAttrs)
 {
     drawinglayer::primitive2d::TextLayouterDevice aTextDev;
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index b70367a18133..4426db2fcc3c 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -387,7 +387,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
     if( !pParent || !pBack )
         return;
 
-    long nMenuHeight = 0;
+    tools::Long nMenuHeight = 0;
     vcl::Window* pMenu = pParent->GetWindow(GetWindowType::Next);
     if( pMenu )
         nMenuHeight = pMenu->GetSizePixel().Height();
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 4beb9a439a90..4348916e5082 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -993,7 +993,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
     if ( aTime.Month > 0 )
         m_xPrintValFt->set_label( ConvertDateTime_Impl( rInfoItem.getPrintedBy(),
             aTime, rLocaleWrapper ) );
-    const long nTime = rInfoItem.getEditingDuration();
+    const tools::Long nTime = rInfoItem.getEditingDuration();
     if ( bUseUserData )
     {
         const tools::Time aT( nTime/3600, (nTime%3600)/60, nTime%60 );
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index f3f79598e927..24e9b527385d 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -387,8 +387,8 @@ friend class SfxDockingWindow;
     // The following members are only valid in the time from startDocking to
     // EndDocking:
     Size                aSplitSize;
-    long                nHorizontalSize;
-    long                nVerticalSize;
+    tools::Long                nHorizontalSize;
+    tools::Long                nVerticalSize;
     sal_uInt16          nLine;
     sal_uInt16          nPos;
     sal_uInt16          nDockLine;
@@ -1083,7 +1083,7 @@ SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, tools::Rect
     }
 
     // calculate borders to shrink inner area before checking for intersection with tracking rectangle
-    long nLRBorder, nTBBorder;
+    tools::Long nLRBorder, nTBBorder;
 
     // take the smaller size of docked and floating mode
     Size aBorderTmp = pImpl->aSplitSize;
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 1b48cf758212..e8b176763c56 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -457,7 +457,7 @@ void SfxInfoBarContainerWindow::Resize()
     auto nOrigWidth = rOrigSize.getWidth();
     auto nOrigHeight = rOrigSize.getHeight();
 
-    long nHeight = 0;
+    tools::Long nHeight = 0;
 
     for (auto& rxInfoBar : m_pInfoBars)
     {
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 2c29307b1f49..dff0a88d0d60 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -330,7 +330,7 @@ void SfxSplitWindow::SaveConfig_Impl()
 
 void SfxSplitWindow::StartSplit()
 {
-    long nSize = 0;
+    tools::Long nSize = 0;
     Size aSize = GetSizePixel();
 
     if ( pEmptyWin )
@@ -384,8 +384,8 @@ void SfxSplitWindow::Split()
         if ( rD.pWin )
         {
             const sal_uInt16 nId = rD.nType;
-            const long nSize    = GetItemSize( nId, SplitWindowItemFlags::Fixed );
-            const long nSetSize = GetItemSize( GetSet( nId ) );
+            const tools::Long nSize    = GetItemSize( nId, SplitWindowItemFlags::Fixed );
+            const tools::Long nSetSize = GetItemSize( GetSet( nId ) );
             Size aSize;
 
             if ( IsHorizontal() )
@@ -640,7 +640,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl const * pDock,
 
     SplitWindowItemFlags nItemBits = SplitWindowItemFlags::NONE;
 
-    long nWinSize, nSetSize;
+    tools::Long nWinSize, nSetSize;
     if ( IsHorizontal() )
     {
         nWinSize = rSize.Width();
@@ -742,7 +742,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl const * pDock,
             if ( rD.pWin )
             {
                 const sal_uInt16 nId = rD.nType;
-                const long nSize    = GetItemSize( nId, SplitWindowItemFlags::Fixed );
+                const tools::Long nSize    = GetItemSize( nId, SplitWindowItemFlags::Fixed );
                 aNewOrgSizes.emplace_back( nId, nSize );
             }
         }
@@ -864,7 +864,7 @@ sal_uInt16 SfxSplitWindow::GetLineCount() const
 }
 
 
-long SfxSplitWindow::GetLineSize( sal_uInt16 nLine ) const
+tools::Long SfxSplitWindow::GetLineSize( sal_uInt16 nLine ) const
 
 /*  [Description]
 
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx
index 72a096521d17..98f5d9b37c6b 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -423,7 +423,7 @@ void SfxRedactionHelper::searchInMetaFile(const RedactionTarget* pRedactionTarge
     fillSearchOptions(aSearchOptions, pRedactionTarget);
 
     utl::TextSearch textSearch(aSearchOptions);
-    static long aLastFontHeight = 0;
+    static tools::Long aLastFontHeight = 0;
 
     MetaAction* pCurrAct;
 
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index b41d65c4d673..726122c9f1cb 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -1381,7 +1381,7 @@ const OUString& RegionData_Impl::GetHierarchyURL()
 DocTempl_EntryData_Impl* RegionData_Impl::GetEntry( const OUString& rName ) const
 {
     bool    bFound = false;
-    long        nPos = GetEntryPos( rName, bFound );
+    tools::Long        nPos = GetEntryPos( rName, bFound );
 
     if ( bFound )
         return maEntries[ nPos ].get();
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 8af946eeab82..a7e9678adcdf 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -62,8 +62,8 @@ void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, GDIMetaFil
 
 #define FRAME 4
 
-    long nWidth = rRenderContext.GetOutputSize().Width() - 2 * FRAME;
-    long nHeight = rRenderContext.GetOutputSize().Height() - 2 * FRAME;
+    tools::Long nWidth = rRenderContext.GetOutputSize().Width() - 2 * FRAME;
+    tools::Long nHeight = rRenderContext.GetOutputSize().Height() - 2 * FRAME;
     if (nWidth <= 0 || nHeight <= 0)
         return;
 
diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx
index 5c861e291150..7d765363fd72 100644
--- a/sfx2/source/inc/splitwin.hxx
+++ b/sfx2/source/inc/splitwin.hxx
@@ -107,7 +107,7 @@ public:
     bool                GetWindowPos( const Point& rTestPos,
                                       sal_uInt16& rLine, sal_uInt16& rPos ) const;
     sal_uInt16              GetLineCount() const;
-    long                GetLineSize( sal_uInt16 ) const;
+    tools::Long                GetLineSize( sal_uInt16 ) const;
     sal_uInt16              GetWindowCount(sal_uInt16 nLine) const;
     sal_uInt16              GetWindowCount() const;
 
diff --git a/sfx2/source/notebookbar/DropdownBox.cxx b/sfx2/source/notebookbar/DropdownBox.cxx
index 450cae82a1e8..1ce37eca40c9 100644
--- a/sfx2/source/notebookbar/DropdownBox.cxx
+++ b/sfx2/source/notebookbar/DropdownBox.cxx
@@ -112,8 +112,8 @@ IMPL_LINK(DropdownBox, PBClickHdl, Button*, /*pButton*/, void)
 
     m_pPopup->getBox()->set_height_request(GetSizePixel().Height());
 
-    long x = GetPosPixel().getX();
-    long y = GetPosPixel().getY() + NOTEBOOK_HEADER_HEIGHT + GetSizePixel().Height();
+    tools::Long x = GetPosPixel().getX();
+    tools::Long y = GetPosPixel().getY() + NOTEBOOK_HEADER_HEIGHT + GetSizePixel().Height();
     tools::Rectangle aRect(x, y, x, y);
 
     m_pPopup->StartPopupMode(aRect, FloatWinPopupFlags::Down
diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx
index b6a0ed22ced0..889b32f57ad3 100644
--- a/sfx2/source/notebookbar/PriorityHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityHBox.cxx
@@ -96,7 +96,7 @@ Size PriorityHBox::calculateRequisition() const
 
         if (bAlwaysExpanded)
         {
-            long nPrimaryDimension = getPrimaryDimension(aChildSize);
+            tools::Long nPrimaryDimension = getPrimaryDimension(aChildSize);
             nPrimaryDimension += pChild->get_padding() * 2;
             setPrimaryDimension(aChildSize, nPrimaryDimension);
         }
@@ -119,8 +119,8 @@ void PriorityHBox::Resize()
         return VclHBox::Resize();
     }
 
-    long nWidth = GetSizePixel().Width();
-    long nCurrentWidth = VclHBox::calculateRequisition().getWidth();
+    tools::Long nWidth = GetSizePixel().Width();
+    tools::Long nCurrentWidth = VclHBox::calculateRequisition().getWidth();
 
     // Hide lower priority controls
     for (vcl::IPrioritable* pPrioritable : m_aSortedChildren)
diff --git a/sfx2/source/notebookbar/PriorityMergedHBox.cxx b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
index b969895e8790..d74d40f8a366 100644
--- a/sfx2/source/notebookbar/PriorityMergedHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityMergedHBox.cxx
@@ -66,8 +66,8 @@ public:
             return VclHBox::Resize();
         }
 
-        long nWidth = GetSizePixel().Width();
-        long nCurrentWidth = VclHBox::calculateRequisition().getWidth() + BUTTON_WIDTH;
+        tools::Long nWidth = GetSizePixel().Width();
+        tools::Long nCurrentWidth = VclHBox::calculateRequisition().getWidth() + BUTTON_WIDTH;
 
         // Hide lower priority controls
         for (int i = GetChildCount() - 1; i >= 0; i--)
@@ -158,7 +158,7 @@ public:
             ++nVisibleChildren;
             Size aChildSize = getLayoutRequisition(*pChild);
 
-            long nPrimaryDimension = getPrimaryDimension(aChildSize);
+            tools::Long nPrimaryDimension = getPrimaryDimension(aChildSize);
             nPrimaryDimension += pChild->get_padding() * 2;
             setPrimaryDimension(aChildSize, nPrimaryDimension);
 
@@ -197,8 +197,8 @@ IMPL_LINK(PriorityMergedHBox, PBClickHdl, Button*, /*pButton*/, void)
 
     m_pPopup->hideSeparators(true);
 
-    long x = m_pButton->GetPosPixel().getX();
-    long y = m_pButton->GetPosPixel().getY() + GetSizePixel().Height();
+    tools::Long x = m_pButton->GetPosPixel().getX();
+    tools::Long y = m_pButton->GetPosPixel().getY() + GetSizePixel().Height();
     tools::Rectangle aRect(x, y, x, y);
 
     m_pPopup->StartPopupMode(aRect, FloatWinPopupFlags::Down | FloatWinPopupFlags::GrabFocus
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 1096a0af5eaa..60ca3be37a9e 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -243,7 +243,7 @@ bool Deck::ProcessWheelEvent(CommandEvent const * pCommandEvent)
         return false;
 
     // Execute the actual scroll action.
-    long nDelta = pData->GetDelta();
+    tools::Long nDelta = pData->GetDelta();
     mpVerticalScrollBar->DoScroll(
         mpVerticalScrollBar->GetThumbPos() - nDelta);
     return true;
diff --git a/sfx2/source/sidebar/PanelLayout.cxx b/sfx2/source/sidebar/PanelLayout.cxx
index 78fcbc1714dd..5508d1a5e70d 100644
--- a/sfx2/source/sidebar/PanelLayout.cxx
+++ b/sfx2/source/sidebar/PanelLayout.cxx
@@ -83,7 +83,7 @@ IMPL_LINK_NOARG( PanelLayout, ImplHandlePanelLayoutTimerHdl, Timer*, void )
     VclContainer::setLayoutAllocation(*pChild, Point(0, 0), GetSizePixel());
 }
 
-void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags)
+void PanelLayout::setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags)
 {
     bool bCanHandleSmallerWidth = false;
     bool bCanHandleSmallerHeight = false;
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index c61781643f49..6a383966c403 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -66,7 +66,7 @@ css::uno::Sequence<OUString> BuildContextList (const ContextList& rContextList)
     const ::std::vector<ContextList::Entry>& entries = rContextList.GetEntries();
 
     css::uno::Sequence<OUString> result(entries.size());
-    long i = 0;
+    tools::Long i = 0;
 
     for (auto const& entry : entries)
     {
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 489d1dff034e..3fdd33ef220b 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -401,7 +401,7 @@ void SidebarController::NotifyResize()
     {
         SfxSplitWindow* pSplitWindow = GetSplitWindow();
         WindowAlign eAlign = pSplitWindow ? pSplitWindow->GetAlign() : WindowAlign::Right;
-        long nDeckX, nTabX;
+        tools::Long nDeckX, nTabX;
         if (eAlign == WindowAlign::Left)     // attach the Sidebar towards the left-side of screen
         {
             nDeckX = nTabBarDefaultWidth;
@@ -841,7 +841,7 @@ void SidebarController::SwitchToDeck (
     SfxSplitWindow* pSplitWindow = GetSplitWindow();
     sal_Int32 nTabBarDefaultWidth = TabBar::GetDefaultWidth() * mpTabBar->GetDPIScaleFactor();
     WindowAlign eAlign = pSplitWindow ? pSplitWindow->GetAlign() : WindowAlign::Right;
-    long nDeckX;
+    tools::Long nDeckX;
     if (eAlign == WindowAlign::Left)     // attach the Sidebar towards the left-side of screen
     {
         nDeckX = nTabBarDefaultWidth;
@@ -1396,7 +1396,7 @@ sal_Int32 SidebarController::SetChildWindowWidth (const sal_Int32 nNewWidth)
     sal_uInt16 nRow (0xffff);
     sal_uInt16 nColumn (0xffff);
     pSplitWindow->GetWindowPos(mpParentWindow, nColumn, nRow);
-    const long nColumnWidth (pSplitWindow->GetLineSize(nColumn));
+    const tools::Long nColumnWidth (pSplitWindow->GetLineSize(nColumn));
 
     vcl::Window* pWindow = mpParentWindow;
     const Size aWindowSize (pWindow->GetSizePixel());
diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx
index 436ae1433d88..c9dd0011b176 100644
--- a/sfx2/source/sidebar/TitleBar.cxx
+++ b/sfx2/source/sidebar/TitleBar.cxx
@@ -89,7 +89,7 @@ void TitleBar::DataChanged (const DataChangedEvent& /*rEvent*/)
     Invalidate();
 }
 
-void TitleBar::setPosSizePixel (long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags)
+void TitleBar::setPosSizePixel (tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags)
 {
     Window::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags);
 
diff --git a/sfx2/source/sidebar/UnoDecks.cxx b/sfx2/source/sidebar/UnoDecks.cxx
index 9b3ad8999784..519840698df5 100644
--- a/sfx2/source/sidebar/UnoDecks.cxx
+++ b/sfx2/source/sidebar/UnoDecks.cxx
@@ -65,7 +65,7 @@ uno::Sequence< OUString > SAL_CALL SfxUnoDecks::getElementNames()
 
         deckList.realloc(aDecks.size());
 
-        long n = 0;
+        tools::Long n = 0;
 
         for (const auto& rDeck : aDecks)
         {
diff --git a/sfx2/source/sidebar/UnoPanels.cxx b/sfx2/source/sidebar/UnoPanels.cxx
index 1bc0ded10ecd..a35c559f3e81 100644
--- a/sfx2/source/sidebar/UnoPanels.cxx
+++ b/sfx2/source/sidebar/UnoPanels.cxx
@@ -73,7 +73,7 @@ uno::Sequence< OUString > SAL_CALL SfxUnoPanels::getElementNames()
 
         panelList.realloc(aPanels.size());
 
-        long n = 0;
+        tools::Long n = 0;
 
         for (const auto& rPanel : aPanels)
         {
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index 8997b9367317..385b20ef967f 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -574,13 +574,13 @@ void SfxFrame::SetToolSpaceBorderPixel_Impl( const SvBorder& rBorder )
 
     Point aPos ( rBorder.Left(), rBorder.Top() );
     Size aSize( GetWindow().GetOutputSizePixel() );
-    long nDeltaX = rBorder.Left() + rBorder.Right();
+    tools::Long nDeltaX = rBorder.Left() + rBorder.Right();
     if ( aSize.Width() > nDeltaX )
         aSize.AdjustWidth( -nDeltaX );
     else
         aSize.setWidth( 0 );
 
-    long nDeltaY = rBorder.Top() + rBorder.Bottom();
+    tools::Long nDeltaY = rBorder.Top() + rBorder.Bottom();
     if ( aSize.Height() > nDeltaY )
         aSize.AdjustHeight( -nDeltaY );
     else
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index c394535ea2a0..fbba1febc5c1 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -416,8 +416,8 @@ awt::Rectangle SAL_CALL SfxInPlaceClient_Impl::getPlacement()
 
     // apply scaling to object area and convert to pixels
     tools::Rectangle aRealObjArea( m_aObjArea );
-    aRealObjArea.SetSize( Size( long( aRealObjArea.GetWidth() * m_aScaleWidth),
-                                long( aRealObjArea.GetHeight() * m_aScaleHeight) ) );
+    aRealObjArea.SetSize( Size( tools::Long( aRealObjArea.GetWidth() * m_aScaleWidth),
+                                tools::Long( aRealObjArea.GetHeight() * m_aScaleHeight) ) );
 
     // In Writer and Impress the map mode is disabled. So when a chart is
     // activated (for in place editing) we get the chart win size in 100th mm
@@ -451,8 +451,8 @@ awt::Rectangle SAL_CALL SfxInPlaceClient_Impl::getClipRectangle()
 
     // currently(?) same as placement
     tools::Rectangle aRealObjArea( m_aObjArea );
-    aRealObjArea.SetSize( Size( long( aRealObjArea.GetWidth() * m_aScaleWidth),
-                                long( aRealObjArea.GetHeight() * m_aScaleHeight) ) );
+    aRealObjArea.SetSize( Size( tools::Long( aRealObjArea.GetWidth() * m_aScaleWidth),
+                                tools::Long( aRealObjArea.GetHeight() * m_aScaleHeight) ) );
 
     // See comment for SfxInPlaceClient_Impl::getPlacement.
     if (comphelper::LibreOfficeKit::isActive())
@@ -522,8 +522,8 @@ void SAL_CALL SfxInPlaceClient_Impl::changedPlacement( const awt::Rectangle& aPo
         SfxBooleanFlagGuard aGuard( m_bResizeNoScale );
 
         // new size of the object area without scaling
-        Size aNewObjSize( long( aNewLogicRect.GetWidth()  / m_aScaleWidth ),
-                          long( aNewLogicRect.GetHeight() / m_aScaleHeight ) );
+        Size aNewObjSize( tools::Long( aNewLogicRect.GetWidth()  / m_aScaleWidth ),
+                          tools::Long( aNewLogicRect.GetHeight() / m_aScaleHeight ) );
 
         // now remove scaling from new placement and keep this at the new object area
         aNewLogicRect.SetSize( aNewObjSize );
@@ -760,8 +760,8 @@ const tools::Rectangle& SfxInPlaceClient::GetObjArea() const
 tools::Rectangle SfxInPlaceClient::GetScaledObjArea() const
 {
     tools::Rectangle aRealObjArea( m_xImp->m_aObjArea );
-    aRealObjArea.SetSize( Size( long( aRealObjArea.GetWidth()  * m_xImp->m_aScaleWidth ),
-                                long( aRealObjArea.GetHeight() * m_xImp->m_aScaleHeight ) ) );
+    aRealObjArea.SetSize( Size( tools::Long( aRealObjArea.GetWidth()  * m_xImp->m_aScaleWidth ),
+                                tools::Long( aRealObjArea.GetHeight() * m_xImp->m_aScaleHeight ) ) );
     return aRealObjArea;
 }
 
@@ -815,8 +815,8 @@ void SfxInPlaceClient::Invalidate()
 
     // the object area is provided in logical coordinates of the window but without scaling applied
     tools::Rectangle aRealObjArea( m_xImp->m_aObjArea );
-    aRealObjArea.SetSize( Size( long( aRealObjArea.GetWidth()  * m_xImp->m_aScaleWidth ),
-                                long( aRealObjArea.GetHeight() * m_xImp->m_aScaleHeight ) ) );
+    aRealObjArea.SetSize( Size( tools::Long( aRealObjArea.GetWidth()  * m_xImp->m_aScaleWidth ),
+                                tools::Long( aRealObjArea.GetHeight() * m_xImp->m_aScaleHeight ) ) );
     m_pEditWin->Invalidate( aRealObjArea );
 
     ViewChanged();
@@ -876,7 +876,7 @@ sal_Int64 SfxInPlaceClient::GetAspect() const
     return m_xImp->m_nAspect;
 }
 
-ErrCode SfxInPlaceClient::DoVerb( long nVerb )
+ErrCode SfxInPlaceClient::DoVerb( tools::Long nVerb )
 {
     SfxErrorContext aEc(ERRCTX_SO_DOVERB, m_pViewSh->GetFrameWeld(), RID_SO_ERRCTX);
     ErrCode nError = ERRCODE_NONE;
diff --git a/sfx2/source/view/lokcharthelper.cxx b/sfx2/source/view/lokcharthelper.cxx
index 715ee991915b..d5995e33ba8d 100644
--- a/sfx2/source/view/lokcharthelper.cxx
+++ b/sfx2/source/view/lokcharthelper.cxx
@@ -236,7 +236,7 @@ void LokChartHelper::PaintTile(VirtualDevice& rRenderContext, const tools::Recta
 void LokChartHelper::PaintAllChartsOnTile(VirtualDevice& rDevice,
                                           int nOutputWidth, int nOutputHeight,
                                           int nTilePosX, int nTilePosY,
-                                          long nTileWidth, long nTileHeight)
+                                          tools::Long nTileWidth, tools::Long nTileHeight)
 {
     if (comphelper::LibreOfficeKit::isTiledAnnotations())
         return;
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 95f2a1cfd683..cecf046bfbe9 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -170,7 +170,7 @@ class SfxStatusIndicator : public ::cppu::WeakImplHelper< task::XStatusIndicator
     Reference < XController > xOwner;
     Reference < task::XStatusIndicator > xProgress;
     SfxWorkWindow*          pWorkWindow;
-    long                    _nStartTime;
+    tools::Long                    _nStartTime;
 public:
                             SfxStatusIndicator(SfxBaseController* pController, SfxWorkWindow* pWork)
                                 : xOwner( pController )
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 9679487a718e..f419e4f95c10 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -744,7 +744,7 @@ void SfxViewShell::SetZoomFactor( const Fraction &rZoomX,
 }
 
 
-ErrCode SfxViewShell::DoVerb(long /*nVerb*/)
+ErrCode SfxViewShell::DoVerb(tools::Long /*nVerb*/)
 
 /*  [Description]
 


More information about the Libreoffice-commits mailing list