summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-19 15:17:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-20 08:04:35 +0200
commitb225980d2d65694278c9ed89512fbe21b08febd6 (patch)
treeacd7e008fdabbed097fd97f6c4ba8ddc366946bb /sc/source/ui/inc
parent6eefea359fe1e51adfd4a2002614013a7c060a33 (diff)
use tools::Long in sc
Change-Id: I8f37a8d1174ed816df971b8cee036d4e88d4a7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r--sc/source/ui/inc/asciiopt.hxx6
-rw-r--r--sc/source/ui/inc/autofmt.hxx8
-rw-r--r--sc/source/ui/inc/colrowba.hxx8
-rw-r--r--sc/source/ui/inc/dbfunc.hxx4
-rw-r--r--sc/source/ui/inc/gridmerg.hxx22
-rw-r--r--sc/source/ui/inc/gridwin.hxx8
-rw-r--r--sc/source/ui/inc/hdrcont.hxx24
-rw-r--r--sc/source/ui/inc/inputhdl.hxx4
-rw-r--r--sc/source/ui/inc/inputwin.hxx30
-rw-r--r--sc/source/ui/inc/mtrindlg.hxx8
-rw-r--r--sc/source/ui/inc/olinewin.hxx46
-rw-r--r--sc/source/ui/inc/optsolver.hxx2
-rw-r--r--sc/source/ui/inc/output.hxx76
-rw-r--r--sc/source/ui/inc/pagedata.hxx7
-rw-r--r--sc/source/ui/inc/pfuncache.hxx16
-rw-r--r--sc/source/ui/inc/preview.hxx34
-rw-r--r--sc/source/ui/inc/prevloc.hxx10
-rw-r--r--sc/source/ui/inc/prevwsh.hxx2
-rw-r--r--sc/source/ui/inc/printfun.hxx66
-rw-r--r--sc/source/ui/inc/tabview.hxx32
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx4
-rw-r--r--sc/source/ui/inc/tbzoomsliderctrl.hxx4
-rw-r--r--sc/source/ui/inc/viewdata.hxx98
-rw-r--r--sc/source/ui/inc/viewfunc.hxx4
24 files changed, 262 insertions, 261 deletions
diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx
index 3c73ee25327b..ad8b91981792 100644
--- a/sc/source/ui/inc/asciiopt.hxx
+++ b/sc/source/ui/inc/asciiopt.hxx
@@ -41,7 +41,7 @@ private:
rtl_TextEncoding eCharSet;
LanguageType eLang;
bool bCharSetSystem;
- long nStartRow;
+ tools::Long nStartRow;
std::vector<sal_Int32> mvColStart;
std::vector<sal_uInt8> mvColFormat;
@@ -65,7 +65,7 @@ public:
sal_uInt16 GetInfoCount() const { return mvColStart.size(); }
const sal_Int32* GetColStart() const { return mvColStart.data(); }
const sal_uInt8* GetColFormat() const { return mvColFormat.data(); }
- long GetStartRow() const { return nStartRow; }
+ tools::Long GetStartRow() const { return nStartRow; }
LanguageType GetLanguage() const { return eLang; }
void SetCharSet( rtl_TextEncoding eNew ) { eCharSet = eNew; }
@@ -78,7 +78,7 @@ public:
void SetDetectSpecialNumber(bool bSet) { bDetectSpecialNumber = bSet; }
void SetSkipEmptyCells(bool bSet) { bSkipEmptyCells = bSet; }
void SetTextSep( sal_Unicode c ) { cTextSep = c; }
- void SetStartRow( long nRow) { nStartRow= nRow; }
+ void SetStartRow( tools::Long nRow) { nStartRow= nRow; }
void SetLanguage(LanguageType e) { eLang = e; }
void SetColumnInfo( const ScCsvExpDataVec& rDataVec );
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
index 682aa019fecc..37de70ac9d3b 100644
--- a/sc/source/ui/inc/autofmt.hxx
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -55,10 +55,10 @@ private:
svx::frame::Array maArray; /// Implementation to draw the frame borders.
bool mbRTL;
Size aPrvSize;
- long mnLabelColWidth;
- long mnDataColWidth1;
- long mnDataColWidth2;
- long mnRowHeight;
+ tools::Long mnLabelColWidth;
+ tools::Long mnDataColWidth1;
+ tools::Long mnDataColWidth2;
+ tools::Long mnRowHeight;
const OUString aStrJan;
const OUString aStrFeb;
const OUString aStrMar;
diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx
index bfbb5cb7bb58..dae356f35bbb 100644
--- a/sc/source/ui/inc/colrowba.hxx
+++ b/sc/source/ui/inc/colrowba.hxx
@@ -52,9 +52,9 @@ public:
virtual bool IsDisabled() const override;
virtual bool ResizeAllowed() const override;
- virtual void DrawInvert( long nDragPos ) override;
+ virtual void DrawInvert( tools::Long nDragPos ) override;
- virtual OUString GetDragHelp( long nVal ) override;
+ virtual OUString GetDragHelp( tools::Long nVal ) override;
};
class ScRowBar : public ScHeaderControl
@@ -83,9 +83,9 @@ public:
virtual bool IsDisabled() const override;
virtual bool ResizeAllowed() const override;
- virtual void DrawInvert( long nDragPos ) override;
+ virtual void DrawInvert( tools::Long nDragPos ) override;
- virtual OUString GetDragHelp( long nVal ) override;
+ virtual OUString GetDragHelp( tools::Long nVal ) override;
};
#endif
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
index 3ebff62821fd..f7cd3d126653 100644
--- a/sc/source/ui/inc/dbfunc.hxx
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -35,7 +35,7 @@ struct ScSubTotalParam;
class SAL_DLLPUBLIC_RTTI ScDBFunc : public ScViewFunc
{
private:
- void GetSelectedMemberList(ScDPUniqueStringSet& rEntries, long& rDimension);
+ void GetSelectedMemberList(ScDPUniqueStringSet& rEntries, tools::Long& rDimension);
public:
ScDBFunc( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
@@ -81,7 +81,7 @@ public:
void UngroupDataPilot();
void DataPilotInput( const ScAddress& rPos, const OUString& rString );
- void DataPilotSort(ScDPObject* pDPObject, long nDimIndex, bool bAscending, const sal_uInt16* pUserListId = nullptr);
+ void DataPilotSort(ScDPObject* pDPObject, tools::Long nDimIndex, bool bAscending, const sal_uInt16* pUserListId = nullptr);
bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest );
bool HasSelectionForDrillDown( css::sheet::DataPilotFieldOrientation& rOrientation );
diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx
index a6c484afa7f3..82fec233d038 100644
--- a/sc/source/ui/inc/gridmerg.hxx
+++ b/sc/source/ui/inc/gridmerg.hxx
@@ -26,24 +26,24 @@ class ScGridMerger
{
private:
VclPtr<OutputDevice> pDev;
- long nOneX;
- long nOneY;
- long nFixStart;
- long nFixEnd;
- long nVarStart;
- long nVarDiff;
- long nCount;
+ tools::Long nOneX;
+ tools::Long nOneY;
+ tools::Long nFixStart;
+ tools::Long nFixEnd;
+ tools::Long nVarStart;
+ tools::Long nVarDiff;
+ tools::Long nCount;
bool bVertical;
bool bOptimize;
- void AddLine( long nStart, long nEnd, long nPos );
+ void AddLine( tools::Long nStart, tools::Long nEnd, tools::Long nPos );
public:
- ScGridMerger( OutputDevice* pOutDev, long nOnePixelX, long nOnePixelY );
+ ScGridMerger( OutputDevice* pOutDev, tools::Long nOnePixelX, tools::Long nOnePixelY );
~ScGridMerger();
- void AddHorLine(bool bWorksInPixels, long nX1, long nX2, long nY, bool bDashed = false);
- void AddVerLine(bool bWorksInPixels, long nX, long nY1, long nY2, bool bDashed = false);
+ void AddHorLine(bool bWorksInPixels, tools::Long nX1, tools::Long nX2, tools::Long nY, bool bDashed = false);
+ void AddVerLine(bool bWorksInPixels, tools::Long nX, tools::Long nY1, tools::Long nY2, bool bDashed = false);
void Flush();
};
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 8a5a0a751f2f..74b335653c54 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -169,7 +169,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel
enum class ScNestedButtonState { NONE, Down, Up };
ScNestedButtonState nNestedButtonState; // track nested button up/down calls
- long nDPField;
+ tools::Long nDPField;
ScDPObject* pDragDPObj; //! name?
sal_uInt16 nRFIndex;
@@ -349,7 +349,7 @@ public:
void PaintTile( VirtualDevice& rDevice,
int nOutputWidth, int nOutputHeight,
int nTilePosX, int nTilePosY,
- long nTileWidth, long nTileHeight );
+ tools::Long nTileWidth, tools::Long nTileHeight );
/// @see Window::LogicInvalidate().
void LogicInvalidate(const tools::Rectangle* pRectangle) override;
@@ -374,7 +374,7 @@ public:
void MoveMouseStatus( ScGridWindow &rDestWin );
- void ScrollPixel( long nDifX, long nDifY );
+ void ScrollPixel( tools::Long nDifX, tools::Long nDifY );
void UpdateEditViewPos();
void UpdateFormulas(SCCOL nX1 = -1, SCROW nY1 = -1, SCCOL nX2 = -1, SCROW nY2 = -1);
@@ -394,7 +394,7 @@ public:
css::sheet::DataPilotFieldOrientation GetDPFieldOrientation( SCCOL nCol, SCROW nRow ) const;
void DPLaunchFieldPopupMenu(const Point& rScrPos, const Size& rScrSize,
- long nDimIndex, ScDPObject* pDPObj);
+ tools::Long nDimIndex, ScDPObject* pDPObj);
void DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo, OutputDevice* pContentDev);
diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx
index 08be7eba5010..3bb0e4223ce5 100644
--- a/sc/source/ui/inc/hdrcont.hxx
+++ b/sc/source/ui/inc/hdrcont.hxx
@@ -42,9 +42,9 @@ private:
bool bVertical; // Vertical = Row header
- long nWidth;
- long nSmallWidth;
- long nBigWidth;
+ tools::Long nWidth;
+ tools::Long nSmallWidth;
+ tools::Long nBigWidth;
SCCOLROW nSize;
@@ -54,8 +54,8 @@ private:
bool bDragging; // Resizing
SCCOLROW nDragNo;
- long nDragStart;
- long nDragPos;
+ tools::Long nDragStart;
+ tools::Long nDragPos;
void* nTipVisible;
bool bDragMoved;
@@ -63,7 +63,7 @@ private:
bool bInRefMode;
- long GetScrPos( SCCOLROW nEntryNo ) const;
+ tools::Long GetScrPos( SCCOLROW nEntryNo ) const;
SCCOLROW GetMousePos( const MouseEvent& rMEvt, bool& rBorder ) const;
bool IsSelectionAllowed(SCCOLROW nPos) const;
void ShowDragHelp();
@@ -101,9 +101,9 @@ protected:
virtual void SelectWindow();
virtual bool IsDisabled() const;
virtual bool ResizeAllowed() const;
- virtual OUString GetDragHelp( long nVal );
+ virtual OUString GetDragHelp( tools::Long nVal );
- virtual void DrawInvert( long nDragPos );
+ virtual void DrawInvert( tools::Long nDragPos );
virtual void Command( const CommandEvent& rCEvt ) override;
public:
@@ -117,10 +117,10 @@ public:
void SetMark( bool bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd );
- long GetWidth() const { return nWidth; }
- long GetSmallWidth() const { return nSmallWidth; }
- long GetBigWidth() const { return nBigWidth; }
- void SetWidth( long nNew );
+ tools::Long GetWidth() const { return nWidth; }
+ tools::Long GetSmallWidth() const { return nSmallWidth; }
+ tools::Long GetBigWidth() const { return nBigWidth; }
+ void SetWidth( tools::Long nNew );
void GetMarkRange(SCCOLROW& rStart, SCCOLROW& rEnd) const;
};
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index b18e111af547..c99589fd70dc 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -285,8 +285,8 @@ public:
static void SetAutoComplete(bool bSet) { bAutoComplete = bSet; }
static ReferenceMark GetReferenceMark( const ScViewData& rViewData, ScDocShell* pDocSh,
- long nX1, long nX2, long nY1, long nY2,
- long nTab, const Color& rColor );
+ tools::Long nX1, tools::Long nX2, tools::Long nY1, tools::Long nY2,
+ tools::Long nTab, const Color& rColor );
void LOKPasteFunctionData(const OUString& rFunctionName);
};
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index ccc07b428da3..16468109d435 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -64,7 +64,7 @@ public:
virtual void SetFormulaMode( bool bSet ) = 0;
virtual bool IsInputActive() = 0;
virtual void TextGrabFocus() = 0;
- virtual long GetNumLines() const = 0;
+ virtual tools::Long GetNumLines() const = 0;
virtual ~ScTextWndBase() {}
};
@@ -105,12 +105,12 @@ public:
virtual void Resize() override;
- int GetPixelHeightForLines(long nLines);
+ int GetPixelHeightForLines(tools::Long nLines);
int GetEditEngTxtHeight() const;
- virtual long GetNumLines() const override { return mnLines; }
- void SetNumLines(long nLines);
- long GetLastNumExpandedLines() const { return mnLastExpandedLines; }
+ virtual tools::Long GetNumLines() const override { return mnLines; }
+ void SetNumLines(tools::Long nLines);
+ tools::Long GetLastNumExpandedLines() const { return mnLastExpandedLines; }
void DoScroll();
@@ -158,8 +158,8 @@ private:
ScTabViewShell* mpViewShell;
ScTextWndGroup& mrGroupBar;
- long mnLines;
- long mnLastExpandedLines;
+ tools::Long mnLines;
+ tools::Long mnLastExpandedLines;
bool mbInvalidate;
};
@@ -209,9 +209,9 @@ public:
virtual void InsertAccessibleTextData(ScAccessibleEditLineTextData& rTextData) override;
virtual EditView* GetEditView() override;
- long GetLastNumExpandedLines() const;
- virtual long GetNumLines() const override;
- int GetPixelHeightForLines(long nLines);
+ tools::Long GetLastNumExpandedLines() const;
+ virtual tools::Long GetNumLines() const override;
+ int GetPixelHeightForLines(tools::Long nLines);
weld::ScrolledWindow& GetScrollWin();
virtual const OUString& GetTextString() const override;
virtual bool HasEditView() const override;
@@ -219,7 +219,7 @@ public:
virtual void MakeDialogEditView() override;
virtual void RemoveAccessibleTextData(ScAccessibleEditLineTextData& rTextData) override;
void SetScrollPolicy();
- void SetNumLines(long nLines);
+ void SetNumLines(tools::Long nLines);
virtual void SetFormulaMode(bool bSet) override;
virtual void SetTextString(const OUString& rString) override;
virtual void StartEditEngine() override;
@@ -261,8 +261,8 @@ public:
bool IsInputActive() override;
void IncrementVerticalSize();
void DecrementVerticalSize();
- virtual long GetNumLines() const override { return mxTextWndGroup->GetNumLines(); }
- long GetVertOffset() const { return mnVertOffset; }
+ virtual tools::Long GetNumLines() const override { return mxTextWndGroup->GetNumLines(); }
+ tools::Long GetVertOffset() const { return mnVertOffset; }
int GetPixelHeightForLines() const
{
@@ -278,7 +278,7 @@ private:
std::unique_ptr<ScTextWndGroup> mxTextWndGroup;
std::unique_ptr<weld::Button> mxButtonUp;
std::unique_ptr<weld::Button> mxButtonDown;
- long mnVertOffset;
+ tools::Long mnVertOffset;
DECL_LINK(ClickHdl, weld::Button&, void);
};
@@ -344,7 +344,7 @@ private:
VclPtr<ScInputBarGroup> mxTextWindow;
ScInputHandler* pInputHdl;
ScTabViewShell* mpViewShell;
- long mnMaxY;
+ tools::Long mnMaxY;
bool bIsOkCancelMode;
bool bInResize;
};
diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx
index 59b41f225d97..55596d85c4fe 100644
--- a/sc/source/ui/inc/mtrindlg.hxx
+++ b/sc/source/ui/inc/mtrindlg.hxx
@@ -27,12 +27,12 @@ class ScMetricInputDlg : public weld::GenericDialogController
public:
ScMetricInputDlg( weld::Window* pParent,
const OString& sDialogName,
- long nCurrent,
- long nDefault,
+ tools::Long nCurrent,
+ tools::Long nDefault,
FieldUnit eFUnit,
sal_uInt16 nDecimals,
- long nMaximum,
- long nMinimum);
+ tools::Long nMaximum,
+ tools::Long nMinimum);
virtual ~ScMetricInputDlg() override;
int GetInputValue() const;
diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx
index 9c8e79672727..9a56152ed6cd 100644
--- a/sc/source/ui/inc/olinewin.hxx
+++ b/sc/source/ui/inc/olinewin.hxx
@@ -40,10 +40,10 @@ private:
bool mbMirrorLevels; /// true = mirror the order of levels, including the border
Color maLineColor; /// Line color for expanded groups.
- long mnHeaderSize; /// Size of the header area in entry direction.
- long mnHeaderPos; /// Position of the header area in entry direction.
- long mnMainFirstPos; /// First position of main area in entry direction.
- long mnMainLastPos; /// Last position of main area in entry direction.
+ tools::Long mnHeaderSize; /// Size of the header area in entry direction.
+ tools::Long mnHeaderPos; /// Position of the header area in entry direction.
+ tools::Long mnMainFirstPos; /// First position of main area in entry direction.
+ tools::Long mnMainLastPos; /// Last position of main area in entry direction.
size_t mnMTLevel; /// Mouse tracking: Level of active button.
size_t mnMTEntry; /// Mouse tracking: Entry index of active button.
@@ -65,12 +65,12 @@ public:
virtual void dispose() override;
/** Sets the size of the header area (width/height dep. on window type). */
- void SetHeaderSize( long nNewSize );
+ void SetHeaderSize( tools::Long nNewSize );
/** Returns the width/height the window needs to show all levels. */
- long GetDepthSize() const;
+ tools::Long GetDepthSize() const;
/** Scrolls the window content by the specified amount of pixels. */
- void ScrollPixel( long nDiff );
+ void ScrollPixel( tools::Long nDiff );
using Window::ShowFocus;
@@ -97,33 +97,33 @@ private:
void GetVisibleRange( SCCOLROW& rnColRowStart, SCCOLROW& rnColRowEnd ) const;
/** Returns the point in the window of the specified position. */
- Point GetPoint( long nLevelPos, long nEntryPos ) const;
+ Point GetPoint( tools::Long nLevelPos, tools::Long nEntryPos ) const;
/** Returns the rectangle in the window of the specified position. */
tools::Rectangle GetRectangle(
- long nLevelStart, long nEntryStart,
- long nLevelEnd, long nEntryEnd ) const;
+ tools::Long nLevelStart, tools::Long nEntryStart,
+ tools::Long nLevelEnd, tools::Long nEntryEnd ) const;
/** Returns the window size for the level coordinate. */
- long GetOutputSizeLevel() const;
+ tools::Long GetOutputSizeLevel() const;
/** Returns the window size for the entry coordinate. */
- long GetOutputSizeEntry() const;
+ tools::Long GetOutputSizeEntry() const;
/** Returns the count of levels of the outline array. 0 means no outlines. */
size_t GetLevelCount() const;
/** Returns the pixel position of the specified level. */
- long GetLevelPos( size_t nLevel ) const;
+ tools::Long GetLevelPos( size_t nLevel ) const;
/** Returns the level of the passed pixel position. */
- size_t GetLevelFromPos( long nLevelPos ) const;
+ size_t GetLevelFromPos( tools::Long nLevelPos ) const;
/** Returns the start coordinate of the specified column/row in the window. */
- long GetColRowPos( SCCOLROW nColRowIndex ) const;
+ tools::Long GetColRowPos( SCCOLROW nColRowIndex ) const;
/** Returns the entry position of header images. */
- long GetHeaderEntryPos() const;
+ tools::Long GetHeaderEntryPos() const;
/** Calculates the coordinates the outline entry takes in the window.
@return false = no part of the group is visible (outside window or collapsed by parent group). */
bool GetEntryPos(
size_t nLevel, size_t nEntry,
- long& rnStartPos, long& rnEndPos, long& rnImagePos ) const;
+ tools::Long& rnStartPos, tools::Long& rnEndPos, tools::Long& rnImagePos ) const;
/** Calculates the absolute position of the image of the specified outline entry.
@param nLevel The level of the entry.
@param nEntry The entry index or SC_OL_HEADERENTRY for the header image.
@@ -187,14 +187,14 @@ private:
void SetEntryAreaClipRegion();
/** Converts coordinates to real window points and draws the line. */
void DrawLineRel(
- long nLevelStart, long nEntryStart,
- long nLevelEnd, long nEntryEnd );
+ tools::Long nLevelStart, tools::Long nEntryStart,
+ tools::Long nLevelEnd, tools::Long nEntryEnd );
/** Converts coordinates to real window points and draws the rectangle. */
void DrawRectRel(
- long nLevelStart, long nEntryStart,
- long nLevelEnd, long nEntryEnd );
+ tools::Long nLevelStart, tools::Long nEntryStart,
+ tools::Long nLevelEnd, tools::Long nEntryEnd );
/** Draws the specified image unpressed. */
- void DrawImageRel(long nLevelPos, long nEntryPos, const OUString& rId);
+ void DrawImageRel(tools::Long nLevelPos, tools::Long nEntryPos, const OUString& rId);
/** Draws a pressed or unpressed border. */
void DrawBorderRel(size_t nLevel, size_t nEntry, bool bPressed);
@@ -204,7 +204,7 @@ private:
void HideFocus();
/** Scrolls the specified range of the window in entry-relative direction. */
- void ScrollRel( long nEntryDiff, long nEntryStart, long nEntryEnd );
+ void ScrollRel( tools::Long nEntryDiff, tools::Long nEntryStart, tools::Long nEntryEnd );
protected:
virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
index 313a7e23bdf6..ed9860e8b652 100644
--- a/sc/source/ui/inc/optsolver.hxx
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -110,7 +110,7 @@ private:
bool mbDlgLostFocus;
std::vector<ScOptConditionRow> maConditions;
- long nScrollPos;
+ tools::Long nScrollPos;
css::uno::Sequence<OUString> maImplNames;
css::uno::Sequence<OUString> maDescriptions;
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 7f84f00d4808..a5de8bbac213 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -60,11 +60,11 @@ typedef std::unique_ptr<ClearableClipRegion, o3tl::default_delete<ClearableClipR
/// Describes reference mark to be drawn, position & size in TWIPs
struct ReferenceMark {
- long nX;
- long nY;
- long nWidth;
- long nHeight;
- long nTab;
+ tools::Long nX;
+ tools::Long nY;
+ tools::Long nWidth;
+ tools::Long nHeight;
+ tools::Long nTab;
Color aColor;
ReferenceMark()
@@ -75,11 +75,11 @@ struct ReferenceMark {
, nTab( 0 )
, aColor( COL_AUTO ) {}
- ReferenceMark( long aX,
- long aY,
- long aWidth,
- long aHeight,
- long aTab,
+ ReferenceMark( tools::Long aX,
+ tools::Long aY,
+ tools::Long aWidth,
+ tools::Long aHeight,
+ tools::Long aTab,
const Color& rColor )
: nX( aX )
, nY( aY )
@@ -100,9 +100,9 @@ private:
{
tools::Rectangle maAlignRect;
tools::Rectangle maClipRect;
- long mnColWidth;
- long mnLeftClipLength; /// length of the string getting cut off on the left.
- long mnRightClipLength; /// length of the string getting cut off on the right.
+ tools::Long mnColWidth;
+ tools::Long mnLeftClipLength; /// length of the string getting cut off on the left.
+ tools::Long mnRightClipLength; /// length of the string getting cut off on the right.
bool mbLeftClip;
bool mbRightClip;
};
@@ -121,9 +121,9 @@ private:
SCCOL mnX;
SCCOL mnCellX;
SCROW mnCellY;
- long mnPosX;
- long mnPosY;
- long mnInitPosX;
+ tools::Long mnPosX;
+ tools::Long mnPosY;
+ tools::Long mnInitPosX;
bool mbBreak:1;
bool mbCellIsValue:1;
bool mbAsianVertical:1;
@@ -144,9 +144,9 @@ private:
bool readCellContent(const ScDocument* pDoc, bool bShowNullValues, bool bShowFormulas, bool bSyntaxMode, bool bUseStyleColor, bool bForceAutoColor, bool& rWrapFields);
void setPatternToEngine(bool bUseStyleColor);
- void calcMargins(long& rTop, long& rLeft, long& rBottom, long& rRight, double nPPTX, double nPPTY) const;
+ void calcMargins(tools::Long& rTop, tools::Long& rLeft, tools::Long& rBottom, tools::Long& rRight, double nPPTX, double nPPTY) const;
void calcPaperSize(Size& rPaperSize, const tools::Rectangle& rAlignRect, double nPPTX, double nPPTY) const;
- void getEngineSize(ScFieldEditEngine* pEngine, long& rWidth, long& rHeight) const;
+ void getEngineSize(ScFieldEditEngine* pEngine, tools::Long& rWidth, tools::Long& rHeight) const;
bool hasLineBreak() const;
bool isHyperlinkCell() const;
@@ -165,7 +165,7 @@ private:
* finished, this parameter will store the new
* position.
*/
- void calcStartPosForVertical(Point& rLogicStart, long nCellWidth, long nEngineWidth, long nTopM, const OutputDevice* pRefDevice);
+ void calcStartPosForVertical(Point& rLogicStart, tools::Long nCellWidth, tools::Long nEngineWidth, tools::Long nTopM, const OutputDevice* pRefDevice);
void setAlignmentToEngine();
bool adjustHorAlignment(ScFieldEditEngine* pEngine);
@@ -180,11 +180,11 @@ private:
SCSIZE nArrCount; // occupied lines in info block
ScDocument* mpDoc; // Document
SCTAB nTab; // sheet
- long nScrX; // Output Startpos. (Pixel)
- long nScrY;
- long nScrW; // Output size (Pixel)
- long nScrH;
- long nMirrorW; // Visible output width for mirroring (default: nScrW)
+ tools::Long nScrX; // Output Startpos. (Pixel)
+ tools::Long nScrY;
+ tools::Long nScrW; // Output size (Pixel)
+ tools::Long nScrH;
+ tools::Long nMirrorW; // Visible output width for mirroring (default: nScrW)
SCCOL nX1; // Start-/End coordinates
SCROW nY1; // ( incl. hidden )
SCCOL nX2;
@@ -246,17 +246,17 @@ private:
bool IsAvailable( SCCOL nX, SCROW nY );
- void GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY,
- SCCOL nCellX, SCROW nCellY, long nNeeded,
+ void GetOutputArea( SCCOL nX, SCSIZE nArrY, tools::Long nPosX, tools::Long nPosY,
+ SCCOL nCellX, SCROW nCellY, tools::Long nNeeded,
const ScPatternAttr& rPattern,
sal_uInt16 nHorJustify, bool bCellIsValue,
bool bBreak, bool bOverwrite,
OutputAreaParam& rParam );
void ShrinkEditEngine( EditEngine& rEngine, const tools::Rectangle& rAlignRect,
- long nLeftM, long nTopM, long nRightM, long nBottomM,
- bool bWidth, SvxCellOrientation nOrient, long nAttrRotate, bool bPixelToLogic,
- long& rEngineWidth, long& rEngineHeight, long& rNeededPixel,
+ tools::Long nLeftM, tools::Long nTopM, tools::Long nRightM, tools::Long nBottomM,
+ bool bWidth, SvxCellOrientation nOrient, tools::Long nAttrRotate, bool bPixelToLogic,
+ tools::Long& rEngineWidth, tools::Long& rEngineHeight, tools::Long& rNeededPixel,
bool& rLeftClip, bool& rRightClip );
void SetSyntaxColor( vcl::Font* pFont, const ScRefCellValue& rCell );
@@ -276,15 +276,15 @@ private:
std::unique_ptr<ScFieldEditEngine> CreateOutputEditEngine();
- void ShowClipMarks( DrawEditParam& rParam, long nEngineHeight, const Size& aCellSize,
+ void ShowClipMarks( DrawEditParam& rParam, tools::Long nEngineHeight, const Size& aCellSize,
bool bMerged, OutputAreaParam& aAreaParam );
ClearableClipRegionPtr Clip(DrawEditParam& rParam, const Size& aCellSize, OutputAreaParam& aAreaParam,
- long nEngineHeight, bool bWrapFields);
+ tools::Long nEngineHeight, bool bWrapFields);
bool AdjustAreaParamClipRect(OutputAreaParam& rAreaParam);
- long SetEngineTextAndGetWidth( DrawEditParam& rParam, const OUString& rSetString,
- long& rNeededPixel, long nAddWidthPixels );
+ tools::Long SetEngineTextAndGetWidth( DrawEditParam& rParam, const OUString& rSetString,
+ tools::Long& rNeededPixel, tools::Long nAddWidthPixels );
// Check for and set cell rotations at OutputData to have it available
// in the svx tooling to render the borders. Moved to private section
@@ -300,7 +300,7 @@ public:
*/
ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
ScTableInfo& rTabInfo, ScDocument* pNewDoc,
- SCTAB nNewTab, long nNewScrX, long nNewScrY,
+ SCTAB nNewTab, tools::Long nNewScrX, tools::Long nNewScrY,
SCCOL nNewX1, SCROW nNewY1, SCCOL nNewX2, SCROW nNewY2,
double nPixelPerTwipsX, double nPixelPerTwipsY,
const Fraction* pZoomX = nullptr,
@@ -328,9 +328,9 @@ public:
void SetShowNullValues ( bool bSet );
void SetShowFormulas ( bool bSet );
void SetShowSpellErrors( bool bSet );
- void SetMirrorWidth( long nNew );
- long GetScrW() const { return nScrW; }
- long GetScrH() const { return nScrH; }
+ void SetMirrorWidth( tools::Long nNew );
+ tools::Long GetScrW() const { return nScrW; }
+ tools::Long GetScrH() const { return nScrH; }
void SetSnapPixel();
@@ -353,7 +353,7 @@ public:
void DrawClear();
// #i72502# printer only command set
- Point PrePrintDrawingLayer(long nLogStX, long nLogStY );
+ Point PrePrintDrawingLayer(tools::Long nLogStX, tools::Long nLogStY );
void PostPrintDrawingLayer(const Point& rMMOffset); // #i74768# need offset for FormLayer
void PrintDrawingLayer(SdrLayerID nLayer, const Point& rMMOffset);
diff --git a/sc/source/ui/inc/pagedata.hxx b/sc/source/ui/inc/pagedata.hxx
index 81a277c42ac2..14405f0c00e2 100644
--- a/sc/source/ui/inc/pagedata.hxx
+++ b/sc/source/ui/inc/pagedata.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_PAGEDATA_HXX
#define INCLUDED_SC_SOURCE_UI_INC_PAGEDATA_HXX
+#include <tools/long.hxx>
#include <address.hxx>
#include <memory>
#include <vector>
@@ -32,7 +33,7 @@ private:
mvPageEndX;
std::vector<SCROW>
mvPageEndY;
- long nFirstPage;
+ tools::Long nFirstPage;
bool bTopDown;
bool bAutomatic;
@@ -51,8 +52,8 @@ public:
size_t GetPagesY() const { return mvPageEndY.size(); }
const SCROW* GetPageEndY() const { return mvPageEndY.data(); }
- void SetFirstPage( long nNew ) { nFirstPage = nNew; }
- long GetFirstPage() const { return nFirstPage; }
+ void SetFirstPage( tools::Long nNew ) { nFirstPage = nNew; }
+ tools::Long GetFirstPage() const { return nFirstPage; }
void SetTopDown( bool bSet ) { bTopDown = bSet; }
bool IsTopDown() const { return bTopDown; }
void SetAutomatic( bool bSet ) { bAutomatic = bSet; }
diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx
index 762e3464aea5..888c60c0fd4c 100644
--- a/sc/source/ui/inc/pfuncache.hxx
+++ b/sc/source/ui/inc/pfuncache.hxx
@@ -68,14 +68,14 @@ public:
struct ScPrintPageLocation
{
- long nPage;
+ tools::Long nPage;
ScRange aCellRange;
tools::Rectangle aRectangle; // pixels
ScPrintPageLocation() :
nPage(-1) {} // default: invalid
- ScPrintPageLocation( long nP, const ScRange& rRange, const tools::Rectangle& rRect ) :
+ ScPrintPageLocation( tools::Long nP, const ScRange& rRange, const tools::Rectangle& rRect ) :
nPage(nP), aCellRange(rRange), aRectangle(rRect) {}
};
@@ -86,7 +86,7 @@ class ScPrintFuncCache
{
ScPrintSelectionStatus aSelection;
ScDocShell* pDocSh;
- long nTotalPages;
+ tools::Long nTotalPages;
std::vector<long> nPages;
std::vector<long> nFirstAttr;
std::vector<ScPrintPageLocation> aLocations;
@@ -102,11 +102,11 @@ public:
void InitLocations( const ScMarkData& rMark, OutputDevice* pDev );
bool FindLocation( const ScAddress& rCell, ScPrintPageLocation& rLocation ) const;
- long GetPageCount() const { return nTotalPages; }
- long GetFirstAttr( SCTAB nTab ) const { return nFirstAttr[nTab]; }
- SCTAB GetTabForPage( long nPage ) const;
- long GetTabStart( SCTAB nTab ) const;
- long GetDisplayStart( SCTAB nTab ) const;
+ tools::Long GetPageCount() const { return nTotalPages; }
+ tools::Long GetFirstAttr( SCTAB nTab ) const { return nFirstAttr[nTab]; }
+ SCTAB GetTabForPage( tools::Long nPage ) const;
+ tools::Long GetTabStart( SCTAB nTab ) const;
+ tools::Long GetDisplayStart( SCTAB nTab ) const;
};
#endif
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index 5459718f02b7..ecb6a9646106 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -34,7 +34,7 @@ class SAL_DLLPUBLIC_RTTI ScPreview : public vcl::Window
private:
ScMarkData::MarkedTabsType maSelectedTabs;
// set:
- long nPageNo; // Pages in document
+ tools::Long nPageNo; // Pages in document
sal_uInt16 nZoom; // set Zoom
Point aOffset; // positive
@@ -44,11 +44,11 @@ private:
std::vector<long> nPages;
std::vector<long> nFirstAttr;
SCTAB nTab; // Sheet
- long nTabPage; // Page of sheet
- long nTabStart; // First (real) page of the sheet
- long nDisplayStart; // same as above, relative to the start of counting
+ tools::Long nTabPage; // Page of sheet
+ tools::Long nTabStart; // First (real) page of the sheet
+ tools::Long nDisplayStart; // same as above, relative to the start of counting
DateTime aDateTime;
- long nTotalPages;
+ tools::Long nTotalPages;
ScPrintState aState;
std::unique_ptr<ScPreviewLocationData> pLocationData; // stores table layout for accessibility API
std::unique_ptr<FmFormView> pDrawView;
@@ -81,14 +81,14 @@ private:
ScRange aPageArea;
std::vector<long> mvRight;
- long nLeftPosition;
- long mnScale;
+ tools::Long nLeftPosition;
+ tools::Long mnScale;
SCCOL nColNumberButtonDown;
Point aButtonDownChangePoint;
Point aButtonDownPt;
Point aButtonUpPt;
- long nHeaderHeight;
- long nFooterHeight;
+ tools::Long nHeaderHeight;
+ tools::Long nFooterHeight;
void TestLastPage();
void CalcPages();
@@ -123,31 +123,31 @@ public:
SC_DLLPUBLIC void DataChanged(bool bNewTime); // Instead of calling Invalidate
void DoInvalidate();
- void SetXOffset( long nX );
- void SetYOffset( long nY );
+ void SetXOffset( tools::Long nX );
+ void SetYOffset( tools::Long nY );
void SetZoom(sal_uInt16 nNewZoom);
- SC_DLLPUBLIC void SetPageNo( long nPage );
+ SC_DLLPUBLIC void SetPageNo( tools::Long nPage );
bool GetPageMargins() const { return bPageMargin; }
void SetPageMargins( bool bVal ) { bPageMargin = bVal; }
- void DrawInvert( long nDragPos, PointerStyle nFlags );
- void DragMove( long nDragMovePos, PointerStyle nFlags );
+ void DrawInvert( tools::Long nDragPos, PointerStyle nFlags );
+ void DragMove( tools::Long nDragMovePos, PointerStyle nFlags );
const ScPreviewLocationData& GetLocationData();
OUString GetPosString();
- long GetPageNo() const { return nPageNo; }
+ tools::Long GetPageNo() const { return nPageNo; }
sal_uInt16 GetZoom() const { return nZoom; }
const Point& GetOffset() const { return aOffset; }
SCTAB GetTab() { if (!bValid) { CalcPages(); RecalcPages(); } return nTab; }
- long GetTotalPages() { if (!bValid) { CalcPages(); RecalcPages(); } return nTotalPages; }
+ tools::Long GetTotalPages() { if (!bValid) { CalcPages(); RecalcPages(); } return nTotalPages; }
bool AllTested() const { return bValid && nTabsTested >= nTabCount; }
sal_uInt16 GetOptimalZoom(bool bWidthOnly);
- SC_DLLPUBLIC long GetFirstPage(SCTAB nTab);
+ SC_DLLPUBLIC tools::Long GetFirstPage(SCTAB nTab);
void CalcAll() { CalcPages(); }
void SetInGetState(bool bSet) { bInGetState = bSet; }
diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx
index 34aa81b6538a..5aa803364f64 100644
--- a/sc/source/ui/inc/prevloc.hxx
+++ b/sc/source/ui/inc/prevloc.hxx
@@ -45,10 +45,10 @@ struct ScPreviewColRowInfo
{
bool bIsHeader;
SCCOLROW nDocIndex;
- long nPixelStart;
- long nPixelEnd;
+ tools::Long nPixelStart;
+ tools::Long nPixelEnd;
- void Set( bool bHeader, SCCOLROW nIndex, long nStart, long nEnd )
+ void Set( bool bHeader, SCCOLROW nIndex, tools::Long nStart, tools::Long nEnd )
{
bIsHeader = bHeader;
nDocIndex = nIndex;
@@ -128,8 +128,8 @@ public:
bool IsHeaderLeft() const;
bool IsFooterLeft() const;
- long GetNoteCountInRange( const tools::Rectangle& rVisiblePixel, bool bNoteMarks ) const;
- bool GetNoteInRange( const tools::Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks,
+ tools::Long GetNoteCountInRange( const tools::Rectangle& rVisiblePixel, bool bNoteMarks ) const;
+ bool GetNoteInRange( const tools::Rectangle& rVisiblePixel, tools::Long nIndex, bool bNoteMarks,
ScAddress& rCellPos, tools::Rectangle& rNoteRect ) const;
tools::Rectangle GetNoteInRangeOutputRect(const tools::Rectangle& rVisiblePixel, bool bNoteMarks,
const ScAddress& aCellPos) const;
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 5f2a9e89f027..d23eca09eacb 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -49,7 +49,7 @@ class SC_DLLPUBLIC ScPreviewShell: public SfxViewShell
TriState nSourceDesignMode; // form design mode from TabView
SvxZoomType eZoom;
- long nMaxVertPos;
+ tools::Long nMaxVertPos;
std::unique_ptr<SfxBroadcaster> pAccessibilityBroadcaster;
bool GetPageSize( Size& aPageSize );
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 96a8715911df..f59804ebaede 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -51,8 +51,8 @@ struct ScPrintHFParam
bool bEnable;
bool bDynamic;
bool bShared;
- long nHeight; // in total (height + distance + frames)
- long nManHeight; // set size (min when dynamic)
+ tools::Long nHeight; // in total (height + distance + frames)
+ tools::Long nManHeight; // set size (min when dynamic)
sal_uInt16 nDistance;
sal_uInt16 nLeft; // edges
sal_uInt16 nRight;
@@ -154,10 +154,10 @@ struct ScPrintState // Save Variables from ScPrintFunc
sal_uInt16 nZoom;
size_t nPagesX;
size_t nPagesY;
- long nTabPages;
- long nTotalPages;
- long nPageStart;
- long nDocPages;
+ tools::Long nTabPages;
+ tools::Long nTotalPages;
+ tools::Long nPageStart;
+ tools::Long nDocPages;
// Additional state of page ranges
bool bSavedStateRanges;
@@ -205,8 +205,8 @@ private:
bool bIsRender;
SCTAB nPrintTab;
- long nPageStart; // Offset for the first page
- long nDocPages; // Number of Pages in Document
+ tools::Long nPageStart; // Offset for the first page
+ tools::Long nDocPages; // Number of Pages in Document
const ScRange* pUserArea; // Selection, if set in dialog
@@ -240,8 +240,8 @@ private:
bool bPrintCurrentTable;
bool bMultiArea;
bool mbHasPrintRange;
- long nTabPages;
- long nTotalPages;
+ tools::Long nTabPages;
+ tools::Long nTotalPages;
tools::Rectangle aPageRect; // Document Twips
@@ -275,7 +275,7 @@ private:
public:
ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTab,
- long nPage = 0, long nDocP = 0,
+ tools::Long nPage = 0, tools::Long nDocP = 0,
const ScRange* pArea = nullptr,
const ScPrintOptions* pOptions = nullptr,
ScPageBreakData* pData = nullptr );
@@ -286,7 +286,7 @@ public:
// ctors for device other than printer - for preview and pdf:
ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
- long nPage = 0, long nDocP = 0,
+ tools::Long nPage = 0, tools::Long nDocP = 0,
const ScRange* pArea = nullptr,
const ScPrintOptions* pOptions = nullptr );
@@ -314,18 +314,18 @@ public:
bool UpdatePages();
void ApplyPrintSettings(); // Already called from DoPrint()
- long DoPrint( const MultiSelection& rPageRanges,
- long nStartPage, long nDisplayStart, bool bDoPrint,
+ tools::Long DoPrint( const MultiSelection& rPageRanges,
+ tools::Long nStartPage, tools::Long nDisplayStart, bool bDoPrint,
ScPreviewLocationData* pLocationData );
// Query values - immediately
const Size& GetPageSize() const { return aPageSize; }
Size GetDataSize() const;
- void GetScaleData( Size& rPhysSize, long& rDocHdr, long& rDocFtr );
- long GetFirstPageNo() const { return aTableParam.nFirstPageNo; }
+ void GetScaleData( Size& rPhysSize, tools::Long& rDocHdr, tools::Long& rDocFtr );
+ tools::Long GetFirstPageNo() const { return aTableParam.nFirstPageNo; }
- long GetTotalPages() const { return nTotalPages; }
+ tools::Long GetTotalPages() const { return nTotalPages; }
sal_uInt16 GetZoom() const { return nZoom; }
void ResetBreaks( SCTAB nTab );
@@ -346,45 +346,45 @@ private:
void InitParam( const ScPrintOptions* pOptions );
void CalcZoom( sal_uInt16 nRangeNo );
void CalcPages();
- long CountPages();
- long CountNotePages();
+ tools::Long CountPages();
+ tools::Long CountNotePages();
bool AdjustPrintArea( bool bNew );
Size GetDocPageSize();
- long TextHeight( const EditTextObject* pObject );
+ tools::Long TextHeight( const EditTextObject* pObject );
void MakeEditEngine();
void UpdateHFHeight( ScPrintHFParam& rParam );
void InitModes();
- bool IsLeft( long nPageNo );
- bool IsMirror( long nPageNo );
+ bool IsLeft( tools::Long nPageNo );
+ bool IsMirror( tools::Long nPageNo );
void MakeTableString(); // sets aTableStr
- void PrintPage( long nPageNo,
+ void PrintPage( tools::Long nPageNo,
SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
bool bDoPrint, ScPreviewLocationData* pLocationData );
void PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- long nScrX, long nScrY,
+ tools::Long nScrX, tools::Long nScrY,
bool bShLeft, bool bShTop, bool bShRight, bool bShBottom );
void LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
- long nScrX, long nScrY, bool bRepCol, bool bRepRow,
+ tools::Long nScrX, tools::Long nScrY, bool bRepCol, bool bRepRow,
ScPreviewLocationData& rLocationData );
- void PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY );
- void PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY );
- void LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
+ void PrintColHdr( SCCOL nX1, SCCOL nX2, tools::Long nScrX, tools::Long nScrY );
+ void PrintRowHdr( SCROW nY1, SCROW nY2, tools::Long nScrX, tools::Long nScrY );
+ void LocateColHdr( SCCOL nX1, SCCOL nX2, tools::Long nScrX, tools::Long nScrY,
bool bRepCol, ScPreviewLocationData& rLocationData );
- void LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY,
+ void LocateRowHdr( SCROW nY1, SCROW nY2, tools::Long nScrX, tools::Long nScrY,
bool bRepRow, ScPreviewLocationData& rLocationData );
- void PrintHF( long nPageNo, bool bHeader, long nStartY,
+ void PrintHF( tools::Long nPageNo, bool bHeader, tools::Long nStartY,
bool bDoPrint, ScPreviewLocationData* pLocationData );
- long PrintNotes( long nPageNo, long nNoteStart, bool bDoPrint, ScPreviewLocationData* pLocationData );
- long DoNotes( long nNoteStart, bool bDoPrint, ScPreviewLocationData* pLocationData );
+ tools::Long PrintNotes( tools::Long nPageNo, tools::Long nNoteStart, bool bDoPrint, ScPreviewLocationData* pLocationData );
+ tools::Long DoNotes( tools::Long nNoteStart, bool bDoPrint, ScPreviewLocationData* pLocationData );
- void DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
+ void DrawBorder( tools::Long nScrX, tools::Long nScrY, tools::Long nScrW, tools::Long nScrH,
const SvxBoxItem* pBorderData,
const SvxBrushItem* pBackground,
const SvxShadowItem* pShadow );
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 25e54452b814..97a1edc276b7 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -176,7 +176,7 @@ private:
OUString sTipString;
VclPtr<vcl::Window> sTopParent;
- long nPrevDragPos;
+ tools::Long nPrevDragPos;
BlockMode meBlockMode; // Marks block
@@ -218,20 +218,20 @@ private:
void DoAddWin( ScGridWindow* pWin );
- void InitScrollBar( ScrollBar& rScrollBar, long nMaxVal );
+ void InitScrollBar( ScrollBar& rScrollBar, tools::Long nMaxVal );
DECL_LINK(ScrollHdl, ScrollBar*, void );
DECL_LINK(EndScrollHdl, ScrollBar*, void );
DECL_LINK(SplitHdl, Splitter*, void);
- void DoHSplit(long nSplitPos);
- void DoVSplit(long nSplitPos);
+ void DoHSplit(tools::Long nSplitPos);
+ void DoVSplit(tools::Long nSplitPos);
DECL_LINK( TimerHdl, Timer*, void );
void UpdateVarZoom();
- static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, bool bLayoutRTL );
- static long GetScrollBarPos( const ScrollBar& rScroll );
+ static void SetScrollBar( ScrollBar& rScroll, tools::Long nRangeMax, tools::Long nVisible, tools::Long nPos, bool bLayoutRTL );
+ static tools::Long GetScrollBarPos( const ScrollBar& rScroll );
void GetAreaMoveEndPosition(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode,
SCCOL& rAreaX, SCROW& rAreaY, ScFollowMode& rMode);
@@ -293,7 +293,7 @@ public:
DECL_LINK( TabBarResize, ::TabBar*, void );
/** Sets an absolute tab bar width (in pixels). */
- void SetTabBarWidth( long nNewWidth );
+ void SetTabBarWidth( tools::Long nNewWidth );
/** Sets a relative tab bar width.
@param fRelTabBarWidth Tab bar width relative to frame window width (0.0 ... 1.0). */
SC_DLLPUBLIC void SetRelTabBarWidth( double fRelTabBarWidth );
@@ -301,7 +301,7 @@ public:
@param fRelTabBarWidth Tab bar width relative to frame window width (0.0 ... 1.0). */
void SetPendingRelTabBarWidth( double fRelTabBarWidth );
/** Returns the current tab bar width in pixels. */
- long GetTabBarWidth() const;
+ tools::Long GetTabBarWidth() const;
/** Returns the current tab bar width relative to the frame window width (0.0 ... 1.0). */
SC_DLLPUBLIC static double GetRelTabBarWidth();
/** Returns the pending tab bar width relative to the frame window width (0.0 ... 1.0). */
@@ -386,8 +386,8 @@ public:
void CheckSelectionTransfer();
- void InvertHorizontal( ScVSplitPos eWhich, long nDragPos );
- void InvertVertical( ScHSplitPos eWhich, long nDragPos );
+ void InvertHorizontal( ScVSplitPos eWhich, tools::Long nDragPos );
+ void InvertVertical( ScHSplitPos eWhich, tools::Long nDragPos );
Point GetInsertPos() const;
@@ -448,9 +448,9 @@ public:
void SetTimer( ScGridWindow* pWin, const MouseEvent& rMEvt );
void ResetTimer();
- void ScrollX( long nDeltaX, ScHSplitPos eWhich, bool bUpdBars = true );
- void ScrollY( long nDeltaY, ScVSplitPos eWhich, bool bUpdBars = true );
- SC_DLLPUBLIC void ScrollLines( long nDeltaX, long nDeltaY ); // active
+ void ScrollX( tools::Long nDeltaX, ScHSplitPos eWhich, bool bUpdBars = true );
+ void ScrollY( tools::Long nDeltaY, ScVSplitPos eWhich, bool bUpdBars = true );
+ SC_DLLPUBLIC void ScrollLines( tools::Long nDeltaX, tools::Long nDeltaY ); // active
bool ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos );
@@ -486,15 +486,15 @@ public:
void CheckNeedsRepaint();
bool NeedsRepaint();
- void PaintRangeFinder( long nNumber );
+ void PaintRangeFinder( tools::Long nNumber );
void AddHighlightRange( const ScRange& rRange, const Color& rColor );
void ClearHighlightRanges();
void DoChartSelection( const css::uno::Sequence< css::chart2::data::HighlightedRange > & rHilightRanges );
void DoDPFieldPopup(OUString const & rPivotTableName, sal_Int32 nDimensionIndex, Point aPoint, Size aSize);
- long GetGridWidth( ScHSplitPos eWhich );
- long GetGridHeight( ScVSplitPos eWhich );
+ tools::Long GetGridWidth( ScHSplitPos eWhich );
+ tools::Long GetGridHeight( ScVSplitPos eWhich );
void UpdateScrollBars( HeaderType eHeaderType = BOTH_HEADERS );
void SetNewVisArea();
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 3f1342bd8322..02b27c5cd2e3 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -298,7 +298,7 @@ public:
ObjectSelectionType GetCurObjectSelectionType() const { return eCurOST; }
- virtual ErrCode DoVerb(long nVerb) override;
+ virtual ErrCode DoVerb(tools::Long nVerb) override;
void StopEditShell();
bool IsDrawTextShell() const;
@@ -321,7 +321,7 @@ public:
virtual std::unique_ptr<SfxTabPage> CreatePrintOptionsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rOptions) override;
void ConnectObject( const SdrOle2Obj* pObj );
- void ActivateObject( SdrOle2Obj* pObj, long nVerb );
+ void ActivateObject( SdrOle2Obj* pObj, tools::Long nVerb );
void DeactivateOle();
diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx
index bb3660fabe14..944f9c86335e 100644
--- a/sc/source/ui/inc/tbzoomsliderctrl.hxx
+++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx
@@ -47,8 +47,8 @@ private:
std::unique_ptr<ScZoomSliderWnd_Impl> mpImpl;
css::uno::Reference<css::frame::XDispatchProvider> m_xDispatchProvider;
- sal_uInt16 Offset2Zoom(long nOffset) const;
- long Zoom2Offset(sal_uInt16 nZoom) const;
+ sal_uInt16 Offset2Zoom(tools::Long nOffset) const;
+ tools::Long Zoom2Offset(sal_uInt16 nZoom) const;
void DoPaint(vcl::RenderContext& rRenderContext);
public:
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 2b98731870f2..1895799f7531 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -140,14 +140,14 @@ public:
ScPositionHelper(const ScDocument *pDoc, bool bColumn);
void setDocument(const ScDocument& rDoc, bool bColumn);
- void insert(index_type nIndex, long nPos);
+ void insert(index_type nIndex, tools::Long nPos);
void removeByIndex(index_type nIndex);
void invalidateByIndex(index_type nIndex);
- void invalidateByPosition(long nPos);
+ void invalidateByPosition(tools::Long nPos);
const value_type& getNearestByIndex(index_type nIndex) const;
- const value_type& getNearestByPosition(long nPos) const;
- long getPosition(index_type nIndex) const;
- long computePosition(index_type nIndex, const std::function<long (index_type)>& getSizePx);
+ const value_type& getNearestByPosition(tools::Long nPos) const;
+ tools::Long getPosition(index_type nIndex) const;
+ tools::Long computePosition(index_type nIndex, const std::function<long (index_type)>& getSizePx);
};
class ScBoundsProvider
@@ -164,43 +164,43 @@ class ScBoundsProvider
double mfPPTY;
index_type nFirstIndex;
index_type nSecondIndex;
- long nFirstPositionPx;
- long nSecondPositionPx;
+ tools::Long nFirstPositionPx;
+ tools::Long nSecondPositionPx;
public:
ScBoundsProvider(const ScViewData &rView, SCTAB nT, bool bColumnHeader);
- void GetStartIndexAndPosition(SCCOL& nIndex, long& nPosition) const;
- void GetEndIndexAndPosition(SCCOL& nIndex, long& nPosition) const;
- void GetStartIndexAndPosition(SCROW& nIndex, long& nPosition) const;
- void GetEndIndexAndPosition(SCROW& nIndex, long& nPosition) const;
+ void GetStartIndexAndPosition(SCCOL& nIndex, tools::Long& nPosition) const;
+ void GetEndIndexAndPosition(SCCOL& nIndex, tools::Long& nPosition) const;
+ void GetStartIndexAndPosition(SCROW& nIndex, tools::Long& nPosition) const;
+ void GetEndIndexAndPosition(SCROW& nIndex, tools::Long& nPosition) const;
void Compute(value_type aFirstNearest, value_type aSecondNearest,
- long nFirstBound, long nSecondBound);
+ tools::Long nFirstBound, tools::Long nSecondBound);
- void EnlargeStartBy(long nOffset);
+ void EnlargeStartBy(tools::Long nOffset);
- void EnlargeEndBy(long nOffset);
+ void EnlargeEndBy(tools::Long nOffset);
- void EnlargeBy(long nOffset)
+ void EnlargeBy(tools::Long nOffset)
{
EnlargeStartBy(nOffset);
EnlargeEndBy(nOffset);
}
private:
- long GetSize(index_type nIndex) const;
+ tools::Long GetSize(index_type nIndex) const;
- void GetIndexAndPos(index_type nNearestIndex, long nNearestPosition,
- long nBound, index_type& nFoundIndex, long& nPosition,
- bool bTowards, long nDiff);
+ void GetIndexAndPos(index_type nNearestIndex, tools::Long nNearestPosition,
+ tools::Long nBound, index_type& nFoundIndex, tools::Long& nPosition,
+ bool bTowards, tools::Long nDiff);
- void GeIndexBackwards(index_type nNearestIndex, long nNearestPosition,
- long nBound, index_type& nFoundIndex, long& nPosition,
+ void GeIndexBackwards(index_type nNearestIndex, tools::Long nNearestPosition,
+ tools::Long nBound, index_type& nFoundIndex, tools::Long& nPosition,
bool bTowards);
- void GetIndexTowards(index_type nNearestIndex, long nNearestPosition,
- long nBound, index_type& nFoundIndex, long& nPosition,
+ void GetIndexTowards(index_type nNearestIndex, tools::Long nNearestPosition,
+ tools::Long nBound, index_type& nFoundIndex, tools::Long& nPosition,
bool bTowards);
};
@@ -214,14 +214,14 @@ private:
Fraction aPageZoomX; // zoom in page break preview mode
Fraction aPageZoomY;
- long nTPosX[2]; // MapMode - Offset (Twips)
- long nTPosY[2];
- long nMPosX[2]; // MapMode - Offset (1/100 mm)
- long nMPosY[2];
- long nPixPosX[2]; // Offset in Pixels
- long nPixPosY[2];
- long nHSplitPos;
- long nVSplitPos;
+ tools::Long nTPosX[2]; // MapMode - Offset (Twips)
+ tools::Long nTPosY[2];
+ tools::Long nMPosX[2]; // MapMode - Offset (1/100 mm)
+ tools::Long nMPosY[2];
+ tools::Long nPixPosX[2]; // Offset in Pixels
+ tools::Long nPixPosY[2];
+ tools::Long nHSplitPos;
+ tools::Long nVSplitPos;
ScSplitMode eHSplitMode;
ScSplitMode eVSplitMode;
@@ -331,7 +331,7 @@ private:
bool bGrowing;
- long m_nLOKPageUpDownOffset;
+ tools::Long m_nLOKPageUpDownOffset;
tools::Rectangle maLOKVisibleArea;///< The visible area in the LibreOfficeKit client.
DECL_DLLPRIVATE_LINK( EditEngineHdl, EditStatus&, void );
@@ -404,8 +404,8 @@ public:
SCROW GetCurYForTab( SCTAB nTabIndex ) const;
SCCOL GetOldCurX() const;
SCROW GetOldCurY() const;
- long GetLOKDocWidthPixel() const { return pThisTab->aWidthHelper.getPosition(pThisTab->nMaxTiledCol); }
- long GetLOKDocHeightPixel() const { return pThisTab->aHeightHelper.getPosition(pThisTab->nMaxTiledRow); }
+ tools::Long GetLOKDocWidthPixel() const { return pThisTab->aWidthHelper.getPosition(pThisTab->nMaxTiledCol); }
+ tools::Long GetLOKDocHeightPixel() const { return pThisTab->aHeightHelper.getPosition(pThisTab->nMaxTiledRow); }
ScPositionHelper& GetLOKWidthHelper() { return pThisTab->aWidthHelper; }
ScPositionHelper& GetLOKHeightHelper() { return pThisTab->aHeightHelper; }
@@ -415,8 +415,8 @@ public:
ScSplitMode GetHSplitMode() const { return pThisTab->eHSplitMode; }
ScSplitMode GetVSplitMode() const { return pThisTab->eVSplitMode; }
- long GetHSplitPos() const { return pThisTab->nHSplitPos; }
- long GetVSplitPos() const { return pThisTab->nVSplitPos; }
+ tools::Long GetHSplitPos() const { return pThisTab->nHSplitPos; }
+ tools::Long GetVSplitPos() const { return pThisTab->nVSplitPos; }
SCCOL GetFixPosX() const { return pThisTab->nFixPosX; }
SCROW GetFixPosY() const { return pThisTab->nFixPosY; }
SCCOL GetMaxTiledCol() const { return pThisTab->nMaxTiledCol; }
@@ -437,8 +437,8 @@ public:
void SetHSplitMode( ScSplitMode eMode ) { pThisTab->eHSplitMode = eMode; }
void SetVSplitMode( ScSplitMode eMode ) { pThisTab->eVSplitMode = eMode; }
- void SetHSplitPos( long nPos ) { pThisTab->nHSplitPos = nPos; }
- void SetVSplitPos( long nPos ) { pThisTab->nVSplitPos = nPos; }
+ void SetHSplitPos( tools::Long nPos ) { pThisTab->nHSplitPos = nPos; }
+ void SetVSplitPos( tools::Long nPos ) { pThisTab->nVSplitPos = nPos; }
void SetFixPosX( SCCOL nPos ) { pThisTab->nFixPosX = nPos; }
void SetFixPosY( SCROW nPos ) { pThisTab->nFixPosY = nPos; }
void SetMaxTiledCol( SCCOL nCol );
@@ -502,9 +502,9 @@ public:
void SetEditAdjust( SvxAdjust eNewEditAdjust ) { eEditAdjust = eNewEditAdjust; }
// TRUE: Cell is merged
- bool GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ) const;
- bool GetMergeSizePrintTwips( SCCOL nX, SCROW nY, long& rSizeXTwips, long& rSizeYTwips ) const;
- void GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
+ bool GetMergeSizePixel( SCCOL nX, SCROW nY, tools::Long& rSizeXPix, tools::Long& rSizeYPix ) const;
+ bool GetMergeSizePrintTwips( SCCOL nX, SCROW nY, tools::Long& rSizeXTwips, tools::Long& rSizeYTwips ) const;
+ void GetPosFromPixel( tools::Long nClickX, tools::Long nClickY, ScSplitPos eWhich,
SCCOL& rPosX, SCROW& rPosY,
bool bTestMerge = true, bool bRepair = false, SCTAB nForTab = -1 );
void GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
@@ -548,8 +548,8 @@ public:
bool IsOutlineMode () const { return maOptions.GetOption(VOPT_OUTLINER); }
/// Force page size for PgUp/PgDown to overwrite the computation based on m_aVisArea.
- void ForcePageUpDownOffset(long nTwips) { m_nLOKPageUpDownOffset = nTwips; }
- long GetPageUpDownOffset() const { return m_nLOKPageUpDownOffset; }
+ void ForcePageUpDownOffset(tools::Long nTwips) { m_nLOKPageUpDownOffset = nTwips; }
+ tools::Long GetPageUpDownOffset() const { return m_nLOKPageUpDownOffset; }
/// The visible area in the client (set by setClientVisibleArea).
const tools::Rectangle& getLOKVisibleArea() const { return maLOKVisibleArea; }
@@ -656,16 +656,16 @@ public:
void DeriveLOKFreezeIfNeeded(SCTAB nForTab);
void OverrideWithLOKFreeze(ScSplitMode& eExHSplitMode, ScSplitMode& eExVSplitMode,
SCCOL& nExFixPosX, SCROW& nExFixPosY,
- long& nExHSplitPos, long& nExVSplitPos, SCTAB nForTab) const;
+ tools::Long& nExHSplitPos, tools::Long& nExVSplitPos, SCTAB nForTab) const;
- static inline long ToPixel( sal_uInt16 nTwips, double nFactor );
+ static inline tools::Long ToPixel( sal_uInt16 nTwips, double nFactor );
/** while (rScrY <= nEndPixels && rPosY <= nEndRow) add pixels of row
heights converted with nPPTY to rScrY, optimized for row height
segments. Upon return rPosY is the last row evaluated <= nEndRow, rScrY
may be > nEndPixels!
*/
- static void AddPixelsWhile( long & rScrY, long nEndPixels,
+ static void AddPixelsWhile( tools::Long & rScrY, tools::Long nEndPixels,
SCROW & rPosY, SCROW nEndRow, double nPPTY,
const ScDocument * pDoc, SCTAB nTabNo );
@@ -674,14 +674,14 @@ public:
segments. Upon return rPosY is the last row evaluated >= nStartRow,
rScrY may be > nEndPixels!
*/
- static void AddPixelsWhileBackward( long & rScrY, long nEndPixels,
+ static void AddPixelsWhileBackward( tools::Long & rScrY, tools::Long nEndPixels,
SCROW & rPosY, SCROW nStartRow, double nPPTY,
const ScDocument * pDoc, SCTAB nTabNo );
};
-inline long ScViewData::ToPixel( sal_uInt16 nTwips, double nFactor )
+inline tools::Long ScViewData::ToPixel( sal_uInt16 nTwips, double nFactor )
{
- long nRet = static_cast<long>( nTwips * nFactor );
+ tools::Long nRet = static_cast<tools::Long>( nTwips * nFactor );
if ( !nRet && nTwips )
nRet = 1;
return nRet;
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 5a7ad681c628..bb0644ba856b 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -338,8 +338,8 @@ public:
sal_uInt16 aColLength);
void UpdateSelectionArea( const ScMarkData& rSel, ScPatternAttr* pAttr = nullptr );
- void OnLOKInsertDeleteColumn(SCCOL nStartCol, long nOffset);
- void OnLOKInsertDeleteRow(SCROW nStartRow, long nOffset);
+ void OnLOKInsertDeleteColumn(SCCOL nStartCol, tools::Long nOffset);
+ void OnLOKInsertDeleteRow(SCROW nStartRow, tools::Long nOffset);
void OnLOKSetWidthOrHeight(SCCOLROW nStart, bool bWidth);
// Internal helper functions