summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-21 09:30:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-21 14:33:39 +0200
commit5e43e888f6b9bc32fc5d3361be5a7962796726ea (patch)
tree061df26f907bece9cacad5b53290db3f6937d09e /cui/source
parent5100a06c15ee8d66dc88f58523a35014988fd9fe (diff)
use tools::Long in comphelper..cui
Change-Id: I65167999c6049038f8f5d530a0c5cb0552ab0e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104609 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/AdditionsDialog.cxx4
-rw-r--r--cui/source/dialogs/QrCodeGenDialog.cxx4
-rw-r--r--cui/source/dialogs/SpellDialog.cxx20
-rw-r--r--cui/source/dialogs/about.cxx4
-rw-r--r--cui/source/dialogs/colorpicker.cxx32
-rw-r--r--cui/source/dialogs/cuicharmap.cxx10
-rw-r--r--cui/source/dialogs/cuigrfflt.cxx8
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx4
-rw-r--r--cui/source/dialogs/hltpbase.cxx4
-rw-r--r--cui/source/dialogs/insdlg.cxx8
-rw-r--r--cui/source/dialogs/splitcelldlg.cxx6
-rw-r--r--cui/source/factory/dlgfact.cxx6
-rw-r--r--cui/source/factory/dlgfact.hxx6
-rw-r--r--cui/source/inc/QrCodeGenDialog.hxx4
-rw-r--r--cui/source/inc/SpellDialog.hxx2
-rw-r--r--cui/source/inc/border.hxx2
-rw-r--r--cui/source/inc/cuitabline.hxx2
-rw-r--r--cui/source/inc/grfpage.hxx12
-rw-r--r--cui/source/inc/page.hxx20
-rw-r--r--cui/source/inc/paragrph.hxx6
-rw-r--r--cui/source/inc/splitcelldlg.hxx8
-rw-r--r--cui/source/inc/swpossizetabpage.hxx2
-rw-r--r--cui/source/inc/tabstpge.hxx2
-rw-r--r--cui/source/options/optchart.cxx4
-rw-r--r--cui/source/options/optcolor.cxx10
-rw-r--r--cui/source/options/optpath.cxx4
-rw-r--r--cui/source/tabpages/border.cxx14
-rw-r--r--cui/source/tabpages/chardlg.cxx30
-rw-r--r--cui/source/tabpages/grfpage.cxx60
-rw-r--r--cui/source/tabpages/labdlg.cxx4
-rw-r--r--cui/source/tabpages/measure.cxx2
-rw-r--r--cui/source/tabpages/numfmt.cxx6
-rw-r--r--cui/source/tabpages/numpages.cxx110
-rw-r--r--cui/source/tabpages/page.cxx82
-rw-r--r--cui/source/tabpages/paragrph.cxx12
-rw-r--r--cui/source/tabpages/swpossizetabpage.cxx4
-rw-r--r--cui/source/tabpages/tabstpge.cxx10
-rw-r--r--cui/source/tabpages/textanim.cxx6
-rw-r--r--cui/source/tabpages/tpbitmap.cxx20
-rw-r--r--cui/source/tabpages/tpcolor.cxx8
-rw-r--r--cui/source/tabpages/tpgradnt.cxx8
-rw-r--r--cui/source/tabpages/tphatch.cxx10
-rw-r--r--cui/source/tabpages/tpline.cxx30
-rw-r--r--cui/source/tabpages/tplnedef.cxx18
-rw-r--r--cui/source/tabpages/tplneend.cxx14
-rw-r--r--cui/source/tabpages/tppattern.cxx8
-rw-r--r--cui/source/tabpages/transfrm.cxx10
47 files changed, 330 insertions, 330 deletions
diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx
index cf9a605d5970..b8e2cee3febc 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -117,7 +117,7 @@ std::string curlGet(const OString& rURL)
curl_easy_setopt(curl, CURLOPT_WRITEDATA, static_cast<void*>(&response_body));
CURLcode cc = curl_easy_perform(curl);
- long http_code = 0;
+ tools::Long http_code = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
if (http_code != 200)
@@ -150,7 +150,7 @@ void curlDownload(const OString& rURL, const OUString& sFileURL)
curl_easy_setopt(curl, CURLOPT_WRITEDATA, static_cast<void*>(&aFile));
CURLcode cc = curl_easy_perform(curl);
- long http_code = 0;
+ tools::Long http_code = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &http_code);
if (http_code != 200)
diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx
index 7f3f6a806cf5..0c33d35d6aa7 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -264,7 +264,7 @@ void QrCodeGenDialog::Apply()
#endif
}
-OUString QrCodeGenDialog::GenerateQRCode(OUString aQRText, long aQRECC, int aQRBorder)
+OUString QrCodeGenDialog::GenerateQRCode(OUString aQRText, tools::Long aQRECC, int aQRBorder)
{
#if ENABLE_QRCODEGEN
//Select ECC:: value from aQrECC
@@ -311,7 +311,7 @@ OUString QrCodeGenDialog::GenerateQRCode(OUString aQRText, long aQRECC, int aQRB
#endif
}
-void QrCodeGenDialog::GetErrorCorrection(long ErrorCorrection)
+void QrCodeGenDialog::GetErrorCorrection(tools::Long ErrorCorrection)
{
switch (ErrorCorrection)
{
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 29bf889ec6fd..bdb46b8bae29 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -90,14 +90,14 @@ class SpellUndoAction_Impl : public SfxUndoAction
bool m_bEnableChangePB;
bool m_bEnableChangeAllPB;
//undo of MarkNextError - used in change and change all, ignore and ignore all
- long m_nOldErrorStart;
- long m_nOldErrorEnd;
+ tools::Long m_nOldErrorStart;
+ tools::Long m_nOldErrorEnd;
bool m_bIsErrorLanguageSelected;
//undo of AddToDictionary
Reference<XDictionary> m_xDictionary;
OUString m_sAddedWord;
//move end of error - ::ChangeMarkedWord()
- long m_nOffset;
+ tools::Long m_nOffset;
public:
SpellUndoAction_Impl(sal_uInt16 nId, const Link<SpellUndoAction_Impl&,void>& rActionLink) :
@@ -120,13 +120,13 @@ public:
void SetEnableChangeAllPB(){m_bEnableChangeAllPB = true;}
bool IsEnableChangeAllPB() const {return m_bEnableChangeAllPB;}
- void SetErrorMove(long nOldStart, long nOldEnd)
+ void SetErrorMove(tools::Long nOldStart, tools::Long nOldEnd)
{
m_nOldErrorStart = nOldStart;
m_nOldErrorEnd = nOldEnd;
}
- long GetOldErrorStart() const { return m_nOldErrorStart;}
- long GetOldErrorEnd() const { return m_nOldErrorEnd;}
+ tools::Long GetOldErrorStart() const { return m_nOldErrorStart;}
+ tools::Long GetOldErrorEnd() const { return m_nOldErrorEnd;}
void SetErrorLanguageSelected(bool bSet){ m_bIsErrorLanguageSelected = bSet;}
bool IsErrorLanguageSelected() const {return m_bIsErrorLanguageSelected;}
@@ -136,8 +136,8 @@ public:
void SetAddedWord(const OUString& rWord) {m_sAddedWord = rWord;}
const OUString& GetAddedWord() const { return m_sAddedWord;}
- void SetOffset(long nSet) {m_nOffset = nSet;}
- long GetOffset() const {return m_nOffset;}
+ void SetOffset(tools::Long nSet) {m_nOffset = nSet;}
+ tools::Long GetOffset() const {return m_nOffset;}
};
}//namespace svx
using namespace ::svx;
@@ -1744,7 +1744,7 @@ int SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, Language
m_xEditEngine->SetModified();
//adjust end position
- long nEndTemp = m_nErrorEnd;
+ tools::Long nEndTemp = m_nErrorEnd;
nEndTemp += nDiffLen;
m_nErrorEnd = static_cast<sal_Int32>(nEndTemp);
@@ -2029,7 +2029,7 @@ void SentenceEditWindow_Impl::UndoActionEnd()
m_xEditEngine->UndoActionEnd();
}
-void SentenceEditWindow_Impl::MoveErrorEnd(long nOffset)
+void SentenceEditWindow_Impl::MoveErrorEnd(tools::Long nOffset)
{
// Shouldn't we always add the real signed value instead???
if(nOffset > 0)
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 99729ee2f10d..ff7173763e11 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -72,7 +72,7 @@ AboutDialog::AboutDialog(weld::Window *pParent)
OUString sbuildId = GetBuildString();
if (IsStringValidGitHash(sbuildId)) {
- const long nMaxChar = 25;
+ const tools::Long nMaxChar = 25;
m_pBuildLabel->set_uri("https://gerrit.libreoffice.org/gitweb?p=core.git;a=log;h="
+ sbuildId);
m_pBuildLabel->set_label(sbuildId.getLength() > nMaxChar ? sbuildId.replaceAt(
@@ -90,7 +90,7 @@ AboutDialog::AboutDialog(weld::Window *pParent)
m_pCopyrightLabel->set_label(GetCopyrightString());
// Images
- const long nWidth(m_pCopyrightLabel->get_preferred_size().getWidth());
+ const tools::Long nWidth(m_pCopyrightLabel->get_preferred_size().getWidth());
BitmapEx aBackgroundBitmap;
if (SfxApplication::loadBrandSvg(Application::GetSettings()
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index da948f9492b1..9eb92c2dba05 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -402,8 +402,8 @@ void ColorFieldControl::ShowPosition( const Point& rPos, bool bUpdate )
const Size aSize(mxBitmap->GetOutputSizePixel());
- long nX = rPos.X();
- long nY = rPos.Y();
+ tools::Long nX = rPos.X();
+ tools::Long nY = rPos.Y();
if (nX < 0)
nX = 0;
else if (nX >= aSize.Width())
@@ -510,7 +510,7 @@ void ColorFieldControl::SetValues( Color aColor, ColorMode eMode, double x, doub
void ColorFieldControl::UpdatePosition()
{
Size aSize(GetOutputSizePixel());
- ShowPosition(Point(static_cast<long>(mdX * aSize.Width()), static_cast<long>((1.0 - mdY) * aSize.Height())), false);
+ ShowPosition(Point(static_cast<tools::Long>(mdX * aSize.Width()), static_cast<tools::Long>((1.0 - mdY) * aSize.Height())), false);
}
namespace {
@@ -530,7 +530,7 @@ public:
virtual void Resize() override;
void UpdateBitmap();
- void ChangePosition( long nY );
+ void ChangePosition( tools::Long nY );
void Modify();
void SetValue( const Color& rColor, ColorMode eMode, double dValue );
@@ -582,7 +582,7 @@ void ColorSliderControl::UpdateBitmap()
mxBitmap->SetOutputSizePixel(aSize);
}
- const long nY = aSize.Height() - 1;
+ const tools::Long nY = aSize.Height() - 1;
Color aBitmapColor(maColor);
@@ -596,7 +596,7 @@ void ColorSliderControl::UpdateBitmap()
case HUE:
nSat = 100;
nBri = 100;
- for (long y = 0; y <= nY; y++)
+ for (tools::Long y = 0; y <= nY; y++)
{
nHue = static_cast<sal_uInt16>((359 * y) / nY);
mxBitmap->DrawPixel(Point(0, nY - y), Color::HSBtoRGB(nHue, nSat, nBri));
@@ -605,7 +605,7 @@ void ColorSliderControl::UpdateBitmap()
case SATURATION:
nBri = std::max(sal_uInt16(32), nBri);
- for (long y = 0; y <= nY; y++)
+ for (tools::Long y = 0; y <= nY; y++)
{
nSat = static_cast<sal_uInt16>((100 * y) / nY);
mxBitmap->DrawPixel(Point(0, nY - y), Color::HSBtoRGB(nHue, nSat, nBri));
@@ -613,7 +613,7 @@ void ColorSliderControl::UpdateBitmap()
break;
case BRIGHTNESS:
- for (long y = 0; y <= nY; y++)
+ for (tools::Long y = 0; y <= nY; y++)
{
nBri = static_cast<sal_uInt16>((100 * y) / nY);
mxBitmap->DrawPixel(Point(0, nY - y), Color::HSBtoRGB(nHue, nSat, nBri));
@@ -621,34 +621,34 @@ void ColorSliderControl::UpdateBitmap()
break;
case RED:
- for (long y = 0; y <= nY; y++)
+ for (tools::Long y = 0; y <= nY; y++)
{
- aBitmapColor.SetRed(sal_uInt8((long(255) * y) / nY));
+ aBitmapColor.SetRed(sal_uInt8((tools::Long(255) * y) / nY));
mxBitmap->DrawPixel(Point(0, nY - y), aBitmapColor);
}
break;
case GREEN:
- for (long y = 0; y <= nY; y++)
+ for (tools::Long y = 0; y <= nY; y++)
{
- aBitmapColor.SetGreen(sal_uInt8((long(255) * y) / nY));
+ aBitmapColor.SetGreen(sal_uInt8((tools::Long(255) * y) / nY));
mxBitmap->DrawPixel(Point(0, nY - y), aBitmapColor);
}
break;
case BLUE:
- for (long y = 0; y <= nY; y++)
+ for (tools::Long y = 0; y <= nY; y++)
{
- aBitmapColor.SetBlue(sal_uInt8((long(255) * y) / nY));
+ aBitmapColor.SetBlue(sal_uInt8((tools::Long(255) * y) / nY));
mxBitmap->DrawPixel(Point(0, nY - y), aBitmapColor);
}
break;
}
}
-void ColorSliderControl::ChangePosition(long nY)
+void ColorSliderControl::ChangePosition(tools::Long nY)
{
- const long nHeight = GetOutputSizePixel().Height() - 1;
+ const tools::Long nHeight = GetOutputSizePixel().Height() - 1;
if (nY < 0)
nY = 0;
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index f78b70a29662..d674cda9c48f 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -1143,8 +1143,8 @@ void SvxShowText::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;
@@ -1152,7 +1152,7 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
Size aFontSize(aOrigFont.GetFontSize());
::tools::Rectangle aBoundRect;
- for (long nFontHeight = aFontSize.Height(); nFontHeight > 0; nFontHeight -= 5)
+ for (tools::Long nFontHeight = aFontSize.Height(); nFontHeight > 0; nFontHeight -= 5)
{
if (!rRenderContext.GetTextBoundRect( aBoundRect, aText ) || aBoundRect.IsEmpty())
{
@@ -1162,7 +1162,7 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
if (!mbCenter)
break;
//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);
@@ -1217,7 +1217,7 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
void SvxShowText::SetFont( const vcl::Font& rFont )
{
- long nWinHeight = GetOutputSizePixel().Height();
+ tools::Long nWinHeight = GetOutputSizePixel().Height();
m_aFont = rFont;
m_aFont.SetWeight(WEIGHT_NORMAL);
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index baaa6603c60d..c949bf61e0ac 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -93,13 +93,13 @@ void CuiGraphicPreviewWindow::ScaleImageToFit()
if( fGrfWH < fPreWH )
{
- aGrfSize.setWidth( static_cast<long>( aPreviewSize.Height() * fGrfWH ) );
+ aGrfSize.setWidth( static_cast<tools::Long>( aPreviewSize.Height() * fGrfWH ) );
aGrfSize.setHeight( aPreviewSize.Height() );
}
else
{
aGrfSize.setWidth( aPreviewSize.Width() );
- aGrfSize.setHeight( static_cast<long>( aPreviewSize.Width() / fGrfWH ) );
+ aGrfSize.setHeight( static_cast<tools::Long>( aPreviewSize.Width() / fGrfWH ) );
}
mfScaleX = static_cast<double>(aGrfSize.Width()) / maOrigGraphicSizePixel.Width();
@@ -189,8 +189,8 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic,
double fScaleX, double fScaleY )
{
Graphic aRet;
- long nTileWidth = static_cast<long>(mxMtrWidth->get_value(FieldUnit::PIXEL));
- long nTileHeight = static_cast<long>(mxMtrHeight->get_value(FieldUnit::PIXEL));
+ tools::Long nTileWidth = static_cast<tools::Long>(mxMtrWidth->get_value(FieldUnit::PIXEL));
+ tools::Long nTileHeight = static_cast<tools::Long>(mxMtrHeight->get_value(FieldUnit::PIXEL));
const Size aSize( std::max( FRound( nTileWidth * fScaleX ), 1L ),
std::max( FRound( nTileHeight * fScaleY ), 1L ) );
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 8bf1e1ccdd12..bd252a2fe5a8 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -132,7 +132,7 @@ namespace svx
// the font for the secondary text:
vcl::Font aSmallerFont(rRenderContext.GetFont());
// heuristic: 80% of the original size
- aSmallerFont.SetFontHeight( static_cast<long>( 0.8 * aSmallerFont.GetFontHeight() ) );
+ aSmallerFont.SetFontHeight( static_cast<tools::Long>( 0.8 * aSmallerFont.GetFontHeight() ) );
// let's calculate the size of our two texts
::tools::Rectangle aPrimaryRect = rRenderContext.GetTextRect( _rRect, m_sPrimaryText, nTextStyle );
@@ -249,7 +249,7 @@ namespace svx
Size RubyRadioButton::GetOptimalSize() const
{
vcl::Font aSmallerFont(m_xVirDev->GetFont());
- aSmallerFont.SetFontHeight( static_cast<long>( 0.8 * aSmallerFont.GetFontHeight() ) );
+ aSmallerFont.SetFontHeight( static_cast<tools::Long>( 0.8 * aSmallerFont.GetFontHeight() ) );
::tools::Rectangle rect( Point(), Size( SAL_MAX_INT32, SAL_MAX_INT32 ) );
Size aPrimarySize = m_xVirDev->GetTextRect( rect, m_aRubyText.getPrimaryText() ).GetSize();
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index f79f5644e710..5e95ed6c5e6b 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -204,13 +204,13 @@ void SvxHyperlinkTabPageBase::ShowMarkWnd()
else
{
// Pos Extrawindow on the left side of Dialog
- MoveToExtraWnd( Point(0,0) - Point( long(0.05*aDlgSize.Width()), 0 ) - Point( aExtraWndSize.Width(), 0 ) );
+ MoveToExtraWnd( Point(0,0) - Point( tools::Long(0.05*aDlgSize.Width()), 0 ) - Point( aExtraWndSize.Width(), 0 ) );
}
}
else
{
// Pos Extrawindow on the right side of Dialog
- MoveToExtraWnd ( Point( long(1.05*aDlgSize.getWidth()), 0 ) );
+ MoveToExtraWnd ( Point( tools::Long(1.05*aDlgSize.getWidth()), 0 ) );
}
// Set size of Extra-Window
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index f1752922e066..3e94ad472e63 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -509,15 +509,15 @@ short SfxInsertFloatingFrameDialog::run()
bool bHasBorder = m_xRBFrameBorderOn->get_active();
- long lMarginWidth;
+ tools::Long lMarginWidth;
if (!m_xCBMarginWidthDefault->get_active())
- lMarginWidth = static_cast<long>(m_xNMMarginWidth->get_text().toInt32());
+ lMarginWidth = static_cast<tools::Long>(m_xNMMarginWidth->get_text().toInt32());
else
lMarginWidth = SIZE_NOT_SET;
- long lMarginHeight;
+ tools::Long lMarginHeight;
if (!m_xCBMarginHeightDefault->get_active())
- lMarginHeight = static_cast<long>(m_xNMMarginHeight->get_text().toInt32());
+ lMarginHeight = static_cast<tools::Long>(m_xNMMarginHeight->get_text().toInt32());
else
lMarginHeight = SIZE_NOT_SET;
diff --git a/cui/source/dialogs/splitcelldlg.cxx b/cui/source/dialogs/splitcelldlg.cxx
index 40b798b7c2c9..58d6b7e4f8a0 100644
--- a/cui/source/dialogs/splitcelldlg.cxx
+++ b/cui/source/dialogs/splitcelldlg.cxx
@@ -19,7 +19,7 @@
#include <splitcelldlg.hxx>
-SvxSplitTableDlg::SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal)
+SvxSplitTableDlg::SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical, tools::Long nMaxVertical, tools::Long nMaxHorizontal)
: GenericDialogController(pParent, "cui/ui/splitcellsdialog.ui", "SplitCellsDialog")
, m_xCountEdit(m_xBuilder->weld_spin_button("countnf"))
, m_xHorzBox(!bIsTableVertical ? m_xBuilder->weld_radio_button("hori") : m_xBuilder->weld_radio_button("vert"))
@@ -54,7 +54,7 @@ SvxSplitTableDlg::SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical,
IMPL_LINK(SvxSplitTableDlg, ClickHdl, weld::Button&, rButton, void)
{
const bool bIsVert = &rButton == m_xVertBox.get();
- long nMax = bIsVert ? mnMaxVertical : mnMaxHorizontal;
+ tools::Long nMax = bIsVert ? mnMaxVertical : mnMaxHorizontal;
m_xPropCB->set_sensitive(!bIsVert);
m_xCountEdit->set_max(nMax);
}
@@ -69,7 +69,7 @@ bool SvxSplitTableDlg::IsProportional() const
return m_xPropCB->get_active() && m_xHorzBox->get_active();
}
-long SvxSplitTableDlg::GetCount() const
+tools::Long SvxSplitTableDlg::GetCount() const
{
return m_xCountEdit->get_value();
}
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index f970e4a10503..ea2675694f07 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -704,12 +704,12 @@ TransliterationFlags AbstractSvxJSearchOptionsDialog_Impl::GetTransliterationFla
return m_xDlg->GetTransliterationFlags();
}
-void AbstractFmInputRecordNoDialog_Impl::SetValue(long nNew)
+void AbstractFmInputRecordNoDialog_Impl::SetValue(tools::Long nNew)
{
m_xDlg->SetValue(nNew);
}
-long AbstractFmInputRecordNoDialog_Impl::GetValue() const
+tools::Long AbstractFmInputRecordNoDialog_Impl::GetValue() const
{
return m_xDlg->GetValue();
}
@@ -1600,7 +1600,7 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateSvxFormatCellsDia
return VclPtr<CuiAbstractTabController_Impl>::Create(std::make_shared<SvxFormatCellsDialog>(pParent, pAttr, rModel));
}
-VclPtr<SvxAbstractSplitTableDialog> AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical)
+VclPtr<SvxAbstractSplitTableDialog> AbstractDialogFactory_Impl::CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, tools::Long nMaxVertical)
{
return VclPtr<SvxSplitTableDlg>::Create( pParent, bIsTableVertical, nMaxVertical, 99 );
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 4d0b569108dd..89ba22069339 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -403,8 +403,8 @@ public:
{
}
virtual short Execute() override;
- virtual void SetValue(long nNew) override ;
- virtual long GetValue() const override ;
+ virtual void SetValue(tools::Long nNew) override ;
+ virtual tools::Long GetValue() const override ;
};
class SvxNewDictionaryDialog;
@@ -909,7 +909,7 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateSvxFormatCellsDialog(weld::Window* pParent, const SfxItemSet* pAttr, const SdrModel& rModel) override;
- virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, long nMaxVertical) override;
+ virtual VclPtr<SvxAbstractSplitTableDialog> CreateSvxSplitTableDialog(weld::Window* pParent, bool bIsTableVertical, tools::Long nMaxVertical) override;
virtual std::shared_ptr<SvxAbstractNewTableDialog> CreateSvxNewTableDialog(weld::Window* pParent) override ;
diff --git a/cui/source/inc/QrCodeGenDialog.hxx b/cui/source/inc/QrCodeGenDialog.hxx
index c0f338f91812..7c39fe07ced6 100644
--- a/cui/source/inc/QrCodeGenDialog.hxx
+++ b/cui/source/inc/QrCodeGenDialog.hxx
@@ -39,9 +39,9 @@ private:
css::uno::Reference<css::beans::XPropertySet> m_xExistingShapeProperties;
- void GetErrorCorrection(long);
+ void GetErrorCorrection(tools::Long);
//Function contains QR Code Generating Library Calls
- static OUString GenerateQRCode(OUString aQrText, long aQrECC, int aQrBorder);
+ static OUString GenerateQRCode(OUString aQrText, tools::Long aQrECC, int aQrBorder);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index 0276f3a3a723..f184f8e78ad2 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -110,7 +110,7 @@ public:
void UndoActionStart( sal_uInt16 nId );
void UndoActionEnd();
- void MoveErrorEnd(long nOffset);
+ void MoveErrorEnd(tools::Long nOffset);
void ResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); }
};
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 57f5d5d0919f..8637f6e8943b 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -98,7 +98,7 @@ private:
std::vector<Image> m_aShadowImgVec;
std::vector<Image> m_aBorderImgVec;
- long nMinValue; ///< minimum distance
+ tools::Long nMinValue; ///< minimum distance
SwBorderModes nSWMode; ///< table, textframe, paragraph
sal_uInt16 mnBoxSlot;
sal_uInt16 mnShadowSlot;
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index 74980bbd5911..2839927c1bc8 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -95,7 +95,7 @@ private:
bool m_bNewSize;
/// a graphic to be displayed in the preview in case that an automatic symbol is chosen
Graphic m_aAutoSymbolGraphic;
- long m_nSymbolType;
+ tools::Long m_nSymbolType;
/// attributes for the shown symbols; only necessary if not equal to line properties
SfxItemSet* m_pSymbolAttr;
diff --git a/cui/source/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index d905622c2faa..35653eaf6ade 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -37,10 +37,10 @@ public:
virtual void Resize() override;
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
- void SetTop( long nVal ) { m_aTopLeft.setX(nVal); }
- void SetBottom( long nVal ) { m_aBottomRight.setX(nVal); }
- void SetLeft( long nVal ) { m_aTopLeft.setY(nVal); }
- void SetRight( long nVal) { m_aBottomRight.setY(nVal); }
+ void SetTop( tools::Long nVal ) { m_aTopLeft.setX(nVal); }
+ void SetBottom( tools::Long nVal ) { m_aBottomRight.setX(nVal); }
+ void SetLeft( tools::Long nVal ) { m_aTopLeft.setY(nVal); }
+ void SetRight( tools::Long nVal) { m_aBottomRight.setY(nVal); }
void SetFrameSize( const Size& rSz );
void SetGraphic( const Graphic& rGrf ) { m_aGrf = rGrf; }
};
@@ -53,8 +53,8 @@ class SvxGrfCropPage : public SfxTabPage
Size aOrigSize;
Size aOrigPixelSize;
Size aPageSize;
- long nOldWidth;
- long nOldHeight;
+ tools::Long nOldWidth;
+ tools::Long nOldHeight;
bool bSetOrigSize;
SvxCropExample m_aExampleWN;
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index d16b8adaf297..23501f1fd25e 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -66,14 +66,14 @@ class SvxPageDescPage : public SfxTabPage
static const sal_uInt16 pRanges[];
private:
OUString sStandardRegister;
- long nFirstLeftMargin;
- long nFirstRightMargin;
- long nFirstTopMargin;
- long nFirstBottomMargin;
- long nLastLeftMargin;
- long nLastRightMargin;
- long nLastTopMargin;
- long nLastBottomMargin;
+ tools::Long nFirstLeftMargin;
+ tools::Long nFirstRightMargin;
+ tools::Long nFirstTopMargin;
+ tools::Long nFirstBottomMargin;
+ tools::Long nLastLeftMargin;
+ tools::Long nLastRightMargin;
+ tools::Long nLastTopMargin;
+ tools::Long nLastBottomMargin;
bool bLandscape;
bool bBorderModified;
@@ -151,8 +151,8 @@ private:
/** Disables vertical page direction entries in the text flow listbox. */
void DisableVerticalPageDir();
- bool IsPrinterRangeOverflow(weld::MetricSpinButton& rField, long nFirstMargin,
- long nLastMargin, MarginPosition nPos);
+ bool IsPrinterRangeOverflow(weld::MetricSpinButton& rField, tools::Long nFirstMargin,
+ tools::Long nLastMargin, MarginPosition nPos);
void CheckMarginEdits( bool _bClear );
bool IsMarginOutOfRange() const;
diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx
index 47c4e888c2d7..1f2305b54ce7 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -43,8 +43,8 @@ class SvxStdParagraphTabPage: public SfxTabPage
static const sal_uInt16 pStdRanges[];
private:
- long nWidth;
- long nMinFixDist;
+ tools::Long nWidth;
+ tools::Long nMinFixDist;
bool bRelativeMode;
OUString sAbsDist;
@@ -113,7 +113,7 @@ public:
void EnableRegisterMode();
void EnableContextualMode();
void EnableAutoFirstLine();
- void EnableAbsLineDist(long nMinTwip);
+ void EnableAbsLineDist(tools::Long nMinTwip);
void EnableNegativeMode();
virtual void PageCreated(const SfxAllItemSet& aSet) override;
};
diff --git a/cui/source/inc/splitcelldlg.hxx b/cui/source/inc/splitcelldlg.hxx
index 3b0275acebc4..88b1de85c9a7 100644
--- a/cui/source/inc/splitcelldlg.hxx
+++ b/cui/source/inc/splitcelldlg.hxx
@@ -29,17 +29,17 @@ private:
std::unique_ptr<weld::RadioButton> m_xVertBox;
std::unique_ptr<weld::CheckButton> m_xPropCB;
- long mnMaxVertical;
- long mnMaxHorizontal;
+ tools::Long mnMaxVertical;
+ tools::Long mnMaxHorizontal;
public:
- SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal);
+ SvxSplitTableDlg(weld::Window *pParent, bool bIsTableVertical, tools::Long nMaxVertical, tools::Long nMaxHorizontal);
DECL_LINK(ClickHdl, weld::Button&, void);
virtual bool IsHorizontal() const override;
virtual bool IsProportional() const override;
- virtual long GetCount() const override;
+ virtual tools::Long GetCount() const override;
virtual short Execute() override;
virtual void SetSplitVerticalByDefault() override;
diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx
index 03d536512240..d9c72495acde 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -94,7 +94,7 @@ class SvxSwPosSizeTabPage : public SfxTabPage
void InitPos(RndStdIds nAnchorType, sal_uInt16 nH, sal_uInt16 nHRel,
sal_uInt16 nV, sal_uInt16 nVRel,
- long nX, long nY);
+ tools::Long nX, tools::Long nY);
static sal_uInt16 GetMapPos(FrmMap const *pMap, const weld::ComboBox& rAlignLB);
static short GetAlignment(FrmMap const *pMap, sal_uInt16 nMapPos, const weld::ComboBox& rRelationLB);
static short GetRelation(const weld::ComboBox& rRelationLB);
diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx
index 394c8a44cf18..c6e7e70f748d 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -79,7 +79,7 @@ private:
// local variables, internal functions
SvxTabStop aCurrentTab;
std::unique_ptr<SvxTabStopItem> aNewTabs;
- long nDefDist;
+ tools::Long nDefDist;
TabWin_Impl m_aLeftWin;
TabWin_Impl m_aRightWin;
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 7d740cfd2000..b8499c5ee886 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -82,8 +82,8 @@ void SvxDefaultColorOptPage::FillBoxChartColorLB()
m_xLbChartColors->freeze();
ClearColorEntries();
- const long nCount(m_SvxChartColorTableUniquePtr->size());
- for (long i = 0; i < nCount; ++i)
+ const tools::Long nCount(m_SvxChartColorTableUniquePtr->size());
+ for (tools::Long i = 0; i < nCount; ++i)
InsertColorEntry((*m_SvxChartColorTableUniquePtr)[i]);
m_xLbChartColors->thaw();
}
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index f7807adc57e9..b4e992133fef 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -207,7 +207,7 @@ private:
{
public:
Entry(weld::Window* pTopLevel, weld::Builder& rBuilder, const char* pTextWidget, const char* pColorWidget,
- const Color& rColor, long nCheckBoxLabelOffset, bool bCheckBox, bool bShow);
+ const Color& rColor, tools::Long nCheckBoxLabelOffset, bool bCheckBox, bool bShow);
public:
void SetText(const OUString& rLabel) { dynamic_cast<weld::Label&>(*m_xText).set_label(rLabel); }
void set_width_request(int nTextWidth) { m_xText->set_size_request(nTextWidth, -1); }
@@ -280,7 +280,7 @@ ColorConfigWindow_Impl::Chapter::Chapter(weld::Builder& rBuilder, const char* pL
ColorConfigWindow_Impl::Entry::Entry(weld::Window* pTopLevel, weld::Builder& rBuilder,
const char* pTextWidget, const char* pColorWidget,
const Color& rColor,
- long nCheckBoxLabelOffset, bool bCheckBox, bool bShow)
+ tools::Long nCheckBoxLabelOffset, bool bCheckBox, bool bShow)
: m_xColorList(new ColorListBox(rBuilder.weld_menu_button(pColorWidget), pTopLevel))
, m_aDefaultColor(rColor)
{
@@ -384,7 +384,7 @@ void ColorConfigWindow_Impl::CreateEntries()
// Here we want to get the amount to add to the position of a FixedText to
// get it to align its contents with that of a CheckBox
- long nCheckBoxLabelOffset = 0;
+ tools::Long nCheckBoxLabelOffset = 0;
{
OUString sSampleText("X");
std::unique_ptr<weld::CheckButton> xCheckBox(m_xBuilder->weld_check_button("docboundaries"));
@@ -602,11 +602,11 @@ public:
void SetConfig (EditableColorConfig& rConfig) { pColorConfig = &rConfig; }
void SetExtendedConfig (EditableExtendedColorConfig& rConfig) { pExtColorConfig = &rConfig; }
void Update();
- long GetScrollPosition() const
+ tools::Long GetScrollPosition() const
{
return m_xVScroll->vadjustment_get_value();
}
- void SetScrollPosition(long nSet)
+ void SetScrollPosition(tools::Long nSet)
{
m_xVScroll->vadjustment_set_value(nSet);
}
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index d3f3b419a835..45b2c14d5c0d 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -603,7 +603,7 @@ void SvxPathTabPage::GetPathList(
Sequence< OUString > aPathSeq;
if ( aAny >>= aPathSeq )
{
- long i, nCount = aPathSeq.getLength();
+ tools::Long i, nCount = aPathSeq.getLength();
const OUString* pPaths = aPathSeq.getConstArray();
for ( i = 0; i < nCount; ++i )
@@ -618,7 +618,7 @@ void SvxPathTabPage::GetPathList(
sCfgName + POSTFIX_USER);
if ( aAny >>= aPathSeq )
{
- long i, nCount = aPathSeq.getLength();
+ tools::Long i, nCount = aPathSeq.getLength();
const OUString* pPaths = aPathSeq.getConstArray();
for ( i = 0; i < nCount; ++i )
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 0c8fda14defe..d952ae97ad8c 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -678,19 +678,19 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
m_xTopMF->set_min(0, FieldUnit::NONE);
m_xBottomMF->set_min(0, FieldUnit::NONE);
}
- long nLeftDist = pBoxItem->GetDistance( SvxBoxItemLine::LEFT);
+ tools::Long nLeftDist = pBoxItem->GetDistance( SvxBoxItemLine::LEFT);
SetMetricValue(*m_xLeftMF, nLeftDist, eCoreUnit);
- long nRightDist = pBoxItem->GetDistance( SvxBoxItemLine::RIGHT);
+ tools::Long nRightDist = pBoxItem->GetDistance( SvxBoxItemLine::RIGHT);
SetMetricValue(*m_xRightMF, nRightDist, eCoreUnit);
- long nTopDist = pBoxItem->GetDistance( SvxBoxItemLine::TOP);
+ tools::Long nTopDist = pBoxItem->GetDistance( SvxBoxItemLine::TOP);
SetMetricValue( *m_xTopMF, nTopDist, eCoreUnit );
- long nBottomDist = pBoxItem->GetDistance( SvxBoxItemLine::BOTTOM);
+ tools::Long nBottomDist = pBoxItem->GetDistance( SvxBoxItemLine::BOTTOM);
SetMetricValue( *m_xBottomMF, nBottomDist, eCoreUnit );
// if the distance is set with no active border line
// or it is null with an active border line
// no automatic changes should be made
- const long nDefDist = bIsAnyBorderVisible ? pBoxInfoItem->GetDefDist() : 0;
+ const tools::Long nDefDist = bIsAnyBorderVisible ? pBoxInfoItem->GetDefDist() : 0;
bool bDiffDist = (nDefDist != nLeftDist ||
nDefDist != nRightDist ||
nDefDist != nTopDist ||
@@ -732,7 +732,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
{
// Do all visible lines show the same line widths?
- long nWidth;
+ tools::Long nWidth;
SvxBorderLineStyle nStyle;
bool bWidthEq = m_aFrameSel.GetVisibleWidth( nWidth, nStyle );
if( bWidthEq )
@@ -1331,7 +1331,7 @@ void SvxBorderTabPage::FillLineListBox_Impl()
static struct {
SvxBorderLineStyle mnStyle;
- long mnMinWidth;
+ tools::Long mnMinWidth;
SvtLineListBox::ColorFunc mpColor1Fn;
SvtLineListBox::ColorFunc mpColor2Fn;
SvtLineListBox::ColorDistFunc mpColorDistFn;
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index b7f9b17165fc..4ec72e217772 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -440,18 +440,18 @@ namespace
const SvxFontHeightItem& rOldItem = static_cast<const SvxFontHeightItem&>(_pPage->GetItemSet().GetParent()->Get( _nFontHeightWhich ));
// old value, scaled
- long nHeight;
+ tools::Long nHeight;
if ( _pFontSizeLB->IsPtRelative() )
- nHeight = rOldItem.GetHeight() + PointToTwips( static_cast<long>(_pFontSizeLB->get_value() / 10) );
+ nHeight = rOldItem.GetHeight() + PointToTwips( static_cast<tools::Long>(_pFontSizeLB->get_value() / 10) );
else
- nHeight = static_cast<long>(rOldItem.GetHeight() * _pFontSizeLB->get_value() / 100);
+ nHeight = static_cast<tools::Long>(rOldItem.GetHeight() * _pFontSizeLB->get_value() / 100);
// conversion twips for the example-window
aSize.setHeight(
ItemToControl( nHeight, _pPage->GetItemSet().GetPool()->GetMetric( _nFontHeightWhich ), FieldUnit::TWIP ) );
}
else if ( !_pFontSizeLB->get_active_text().isEmpty() )
- aSize.setHeight( PointToTwips( static_cast<long>(_pFontSizeLB->get_value() / 10) ) );
+ aSize.setHeight( PointToTwips( static_cast<tools::Long>(_pFontSizeLB->get_value() / 10) ) );
else
aSize.setHeight( 200 ); // default 10pt
aFontMetrics.SetFontSize( aSize );
@@ -1012,11 +1012,11 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
rSet.InvalidateItem(nWhich);
// FontSize
- long nSize = pSizeBox->get_value();
+ tools::Long nSize = pSizeBox->get_value();
if ( pSizeBox->get_active_text().isEmpty() ) // GetValue() returns the min-value
nSize = 0;
- long nSavedSize = pSizeBox->get_saved_value();
+ tools::Long nSavedSize = pSizeBox->get_saved_value();
const bool bRel = pSizeBox->IsRelative();
switch ( eLangGrp )
@@ -1033,7 +1033,7 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
pExampleSet->GetItemState( nWhich, false, &pItem ) == SfxItemState::SET )
{
float fSize = static_cast<float>(nSize) / 10;
- long nVal = CalcToUnit( fSize, rSet.GetPool()->GetMetric( nWhich ) );
+ tools::Long nVal = CalcToUnit( fSize, rSet.GetPool()->GetMetric( nWhich ) );
if ( static_cast<const SvxFontHeightItem*>(pItem)->GetHeight() != static_cast<sal_uInt32>(nVal) )
bChanged = true;
}
@@ -2583,9 +2583,9 @@ IMPL_LINK_NOARG(SvxCharPositionPage, FitToLineHdl_Impl, weld::ToggleButton&, voi
IMPL_LINK_NOARG(SvxCharPositionPage, KerningModifyHdl_Impl, weld::MetricSpinButton&, void)
{
- long nVal = static_cast<long>(m_xKerningMF->get_value(FieldUnit::POINT));
+ tools::Long nVal = static_cast<tools::Long>(m_xKerningMF->get_value(FieldUnit::POINT));
nVal = OutputDevice::LogicToLogic( nVal, MapUnit::MapPoint, MapUnit::MapTwip );
- long nKern = static_cast<short>(m_xKerningMF->denormalize(nVal));
+ tools::Long nKern = static_cast<short>(m_xKerningMF->denormalize(nVal));
SvxFont& rFont = GetPreviewFont();
SvxFont& rCJKFont = GetPreviewCJKFont();
@@ -2761,17 +2761,17 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet )
{
const SvxKerningItem& rItem = static_cast<const SvxKerningItem&>(rSet->Get( nWhich ));
MapUnit eUnit = rSet->GetPool()->GetMetric( nWhich );
- long nBig = static_cast<long>(m_xKerningMF->normalize( static_cast<long>(rItem.GetValue()) ));
- long nKerning = OutputDevice::LogicToLogic(nBig, eUnit, MapUnit::MapPoint);
+ tools::Long nBig = static_cast<tools::Long>(m_xKerningMF->normalize( static_cast<tools::Long>(rItem.GetValue()) ));
+ tools::Long nKerning = OutputDevice::LogicToLogic(nBig, eUnit, MapUnit::MapPoint);
// set Kerning at the Font, convert into Twips before
- long nKern = OutputDevice::LogicToLogic(rItem.GetValue(), eUnit, MapUnit::MapTwip);
+ tools::Long nKern = OutputDevice::LogicToLogic(rItem.GetValue(), eUnit, MapUnit::MapTwip);
rFont.SetFixKerning( static_cast<short>(nKern) );
rCJKFont.SetFixKerning( static_cast<short>(nKern) );
rCTLFont.SetFixKerning( static_cast<short>(nKern) );
//the attribute value must be displayed also if it's above the maximum allowed value
- long nVal = static_cast<long>(m_xKerningMF->get_max(FieldUnit::POINT));
+ tools::Long nVal = static_cast<tools::Long>(m_xKerningMF->get_max(FieldUnit::POINT));
if(nVal < nKerning)
m_xKerningMF->set_max(nKerning, FieldUnit::POINT);
m_xKerningMF->set_value(nKerning, FieldUnit::POINT);
@@ -2929,8 +2929,8 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet )
short nKerning = 0;
MapUnit eUnit = rSet->GetPool()->GetMetric( nWhich );
- long nTmp = static_cast<long>(m_xKerningMF->get_value(FieldUnit::POINT));
- long nVal = OutputDevice::LogicToLogic(nTmp, MapUnit::MapPoint, eUnit);
+ tools::Long nTmp = static_cast<tools::Long>(m_xKerningMF->get_value(FieldUnit::POINT));
+ tools::Long nVal = OutputDevice::LogicToLogic(nTmp, MapUnit::MapPoint, eUnit);
nKerning = static_cast<short>(m_xKerningMF->denormalize( nVal ));
SfxItemState eOldKernState = rOldSet.GetItemState( nWhich, false );
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 583bedecf0df..707c954703e2 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -361,7 +361,7 @@ IMPL_LINK( SvxGrfCropPage, ZoomHdl, weld::MetricSpinButton&, rField, void )
if (&rField == m_xWidthZoomMF.get())
{
- long nLRBorders = lcl_GetValue(*m_xLeftMF, eUnit)
+ tools::Long nLRBorders = lcl_GetValue(*m_xLeftMF, eUnit)
+lcl_GetValue(*m_xRightMF, eUnit);
m_xWidthMF->set_value( m_xWidthMF->normalize(
((aOrigSize.Width() - nLRBorders) * rField.get_value(FieldUnit::NONE))/100),
@@ -369,7 +369,7 @@ IMPL_LINK( SvxGrfCropPage, ZoomHdl, weld::MetricSpinButton&, rField, void )
}
else
{
- long nULBorders = lcl_GetValue(*m_xTopMF, eUnit)
+ tools::Long nULBorders = lcl_GetValue(*m_xTopMF, eUnit)
+lcl_GetValue(*m_xBottomMF, eUnit);
m_xHeightMF->set_value( m_xHeightMF->normalize(
((aOrigSize.Height() - nULBorders ) * rField.get_value(FieldUnit::NONE))/100) ,
@@ -393,7 +393,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, weld::MetricSpinButton&, rField, void )
if(&rField == m_xWidthMF.get())
{
- long nWidth = aOrigSize.Width() -
+ tools::Long nWidth = aOrigSize.Width() -
( lcl_GetValue(*m_xLeftMF, eUnit) +
lcl_GetValue(*m_xRightMF, eUnit) );
if(!nWidth)
@@ -403,7 +403,7 @@ IMPL_LINK( SvxGrfCropPage, SizeHdl, weld::MetricSpinButton&, rField, void )
}
else
{
- long nHeight = aOrigSize.Height() -
+ tools::Long nHeight = aOrigSize.Height() -
( lcl_GetValue(*m_xTopMF, eUnit) +
lcl_GetValue(*m_xBottomMF, eUnit));
if(!nHeight)
@@ -427,9 +427,9 @@ IMPL_LINK( SvxGrfCropPage, CropModifyHdl, weld::MetricSpinButton&, rField, void
bool bZoom = m_xZoomConstRB->get_active();
if (&rField == m_xLeftMF.get() || &rField == m_xRightMF.get())
{
- long nLeft = lcl_GetValue( *m_xLeftMF, eUnit );
- long nRight = lcl_GetValue( *m_xRightMF, eUnit );
- long nWidthZoom = static_cast<long>(m_xWidthZoomMF->get_value(FieldUnit::NONE));
+ tools::Long nLeft = lcl_GetValue( *m_xLeftMF, eUnit );
+ tools::Long nRight = lcl_GetValue( *m_xRightMF, eUnit );
+ tools::Long nWidthZoom = static_cast<tools::Long>(m_xWidthZoomMF->get_value(FieldUnit::NONE));
if (bZoom && nWidthZoom != 0 && ( ( ( aOrigSize.Width() - (nLeft + nRight )) * nWidthZoom )
/ 100 >= aPageSize.Width() ) )
{
@@ -464,9 +464,9 @@ IMPL_LINK( SvxGrfCropPage, CropModifyHdl, weld::MetricSpinButton&, rField, void
}
else
{
- long nTop = lcl_GetValue( *m_xTopMF, eUnit );
- long nBottom = lcl_GetValue( *m_xBottomMF, eUnit );
- long nHeightZoom = static_cast<long>(m_xHeightZoomMF->get_value(FieldUnit::NONE));
+ tools::Long nTop = lcl_GetValue( *m_xTopMF, eUnit );
+ tools::Long nBottom = lcl_GetValue( *m_xBottomMF, eUnit );
+ tools::Long nHeightZoom = static_cast<tools::Long>(m_xHeightZoomMF->get_value(FieldUnit::NONE));
if(bZoom && ( ( ( aOrigSize.Height() - (nTop + nBottom )) * nHeightZoom)
/ 100 >= aPageSize.Height()))
{
@@ -509,11 +509,11 @@ IMPL_LINK_NOARG(SvxGrfCropPage, OrigSizeHdl, weld::Button&, void)
FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
SID_ATTR_GRAF_CROP ) ) );
- long nWidth = aOrigSize.Width() -
+ tools::Long nWidth = aOrigSize.Width() -
lcl_GetValue( *m_xLeftMF, eUnit ) -
lcl_GetValue( *m_xRightMF, eUnit );
m_xWidthMF->set_value( m_xWidthMF->normalize( nWidth ), eUnit );
- long nHeight = aOrigSize.Height() -
+ tools::Long nHeight = aOrigSize.Height() -
lcl_GetValue( *m_xTopMF, eUnit ) -
lcl_GetValue( *m_xBottomMF, eUnit );
m_xHeightMF->set_value( m_xHeightMF->normalize( nHeight ), eUnit );
@@ -532,14 +532,14 @@ void SvxGrfCropPage::CalcZoom()
FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
SID_ATTR_GRAF_CROP ) ) );
- long nWidth = lcl_GetValue( *m_xWidthMF, eUnit );
- long nHeight = lcl_GetValue( *m_xHeightMF, eUnit );
- long nLRBorders = lcl_GetValue( *m_xLeftMF, eUnit ) +
+ tools::Long nWidth = lcl_GetValue( *m_xWidthMF, eUnit );
+ tools::Long nHeight = lcl_GetValue( *m_xHeightMF, eUnit );
+ tools::Long nLRBorders = lcl_GetValue( *m_xLeftMF, eUnit ) +
lcl_GetValue( *m_xRightMF, eUnit );
- long nULBorders = lcl_GetValue( *m_xTopMF, eUnit ) +
+ tools::Long nULBorders = lcl_GetValue( *m_xTopMF, eUnit ) +
lcl_GetValue( *m_xBottomMF, eUnit );
sal_uInt16 nZoom = 0;
- long nDen;
+ tools::Long nDen;
if( (nDen = aOrigSize.Width() - nLRBorders) > 0)
nZoom = static_cast<sal_uInt16>((( nWidth * 1000 / nDen )+5)/10);
m_xWidthZoomMF->set_value(nZoom, FieldUnit::NONE);
@@ -560,21 +560,21 @@ void SvxGrfCropPage::CalcMinMaxBorder()
DBG_ASSERT( pPool, "Where is the pool?" );
FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
SID_ATTR_GRAF_CROP ) ) );
- long nR = lcl_GetValue(*m_xRightMF, eUnit );
- long nMinWidth = (aOrigSize.Width() * 10) /11;
- long nMin = nMinWidth - (nR >= 0 ? nR : 0);
+ tools::Long nR = lcl_GetValue(*m_xRightMF, eUnit );
+ tools::Long nMinWidth = (aOrigSize.Width() * 10) /11;
+ tools::Long nMin = nMinWidth - (nR >= 0 ? nR : 0);
m_xLeftMF->set_max( m_xLeftMF->normalize(nMin), eUnit );
- long nL = lcl_GetValue(*m_xLeftMF, eUnit );
+ tools::Long nL = lcl_GetValue(*m_xLeftMF, eUnit );
nMin = nMinWidth - (nL >= 0 ? nL : 0);
m_xRightMF->set_max( m_xRightMF->normalize(nMin), eUnit );
- long nUp = lcl_GetValue( *m_xTopMF, eUnit );
- long nMinHeight = (aOrigSize.Height() * 10) /11;
+ tools::Long nUp = lcl_GetValue( *m_xTopMF, eUnit );
+ tools::Long nMinHeight = (aOrigSize.Height() * 10) /11;
nMin = nMinHeight - (nUp >= 0 ? nUp : 0);
m_xBottomMF->set_max( m_xBottomMF->normalize(nMin), eUnit );
- long nLow = lcl_GetValue(*m_xBottomMF, eUnit );
+ tools::Long nLow = lcl_GetValue(*m_xBottomMF, eUnit );
nMin = nMinHeight - (nLow >= 0 ? nLow : 0);
m_xTopMF->set_max( m_xTopMF->normalize(nMin), eUnit );
}
@@ -597,21 +597,21 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
eUnit, m_xLeftMF->get_unit());
// if the margin is too big, it is set to 1/3 on both pages
- long nR = lcl_GetValue( *m_xRightMF, eUnit );
- long nL = lcl_GetValue( *m_xLeftMF, eUnit );
+ tools::Long nR = lcl_GetValue( *m_xRightMF, eUnit );
+ tools::Long nL = lcl_GetValue( *m_xLeftMF, eUnit );
if((nL + nR) < - aOrigSize.Width())
{
- long nVal = aOrigSize.Width() / -3;
+ tools::Long nVal = aOrigSize.Width() / -3;
m_xRightMF->set_value( m_xRightMF->normalize( nVal ), eUnit );
m_xLeftMF->set_value( m_xLeftMF->normalize( nVal ), eUnit );
m_aExampleWN.SetLeft(nVal);
m_aExampleWN.SetRight(nVal);
}
- long nUp = lcl_GetValue(*m_xTopMF, eUnit );
- long nLow = lcl_GetValue(*m_xBottomMF, eUnit );
+ tools::Long nUp = lcl_GetValue(*m_xTopMF, eUnit );
+ tools::Long nLow = lcl_GetValue(*m_xBottomMF, eUnit );
if((nUp + nLow) < - aOrigSize.Height())
{
- long nVal = aOrigSize.Height() / -3;
+ tools::Long nVal = aOrigSize.Height() / -3;
m_xTopMF->set_value( m_xTopMF->normalize( nVal ), eUnit );
m_xBottomMF->set_value( m_xBottomMF->normalize( nVal ), eUnit );
m_aExampleWN.SetTop(nVal);
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 0ae754eeb2e7..c12ebc53601e 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -177,7 +177,7 @@ bool SvxCaptionTabPage::FillItemSet( SfxItemSet* _rOutAttrs)
if( bEscRel )
{
- long nVal = 0;
+ tools::Long nVal = 0;
switch (m_xLB_POSITION->get_active())
{
@@ -246,7 +246,7 @@ void SvxCaptionTabPage::Reset( const SfxItemSet* )
nEscAbs = m_xMF_BY->get_value(FieldUnit::NONE);
nWhich = GetWhich( SDRATTR_CAPTIONESCREL );
- nEscRel = static_cast<long>(static_cast<const SdrCaptionEscRelItem&>( rOutAttrs.Get( nWhich ) ).GetValue());
+ nEscRel = static_cast<tools::Long>(static_cast<const SdrCaptionEscRelItem&>( rOutAttrs.Get( nWhich ) ).GetValue());
//------- line length ----------
nWhich = GetWhich( SDRATTR_CAPTIONLINELEN );
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 60e473d68494..14c9fef1e09b 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -232,7 +232,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
// SdrMeasureUnitItem
if( rAttrs->GetItemState( SDRATTR_MEASUREUNIT ) != SfxItemState::DONTCARE )
{
- long nFieldUnit = static_cast<long>(rAttrs->Get( SDRATTR_MEASUREUNIT ).GetValue());
+ tools::Long nFieldUnit = static_cast<tools::Long>(rAttrs->Get( SDRATTR_MEASUREUNIT ).GetValue());
for (sal_Int32 i = 0; i < m_xLbUnit->get_count(); ++i)
{
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 9cefae5d85ae..960aab9c0101 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -147,7 +147,7 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::
vcl::Font aDrawFont = rRenderContext.GetFont();
Size aSzWnd(GetOutputSizePixel());
OUString aTmpStr( aPrevStr );
- long nLeadSpace = (aSzWnd.Width() - rRenderContext.GetTextWidth(aTmpStr)) / 2;
+ tools::Long nLeadSpace = (aSzWnd.Width() - rRenderContext.GetTextWidth(aTmpStr)) / 2;
aDrawFont.SetTransparent(true);
aDrawFont.SetColor(aPrevCol);
@@ -155,7 +155,7 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::
if (mnPos != -1)
{
- long nCharWidth = rRenderContext.GetTextWidth(OUString(mnChar));
+ tools::Long nCharWidth = rRenderContext.GetTextWidth(OUString(mnChar));
int nNumCharsToInsert = 0;
if (nCharWidth > 0)
@@ -168,7 +168,7 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::
}
}
- long nX = 0;
+ tools::Long nX = 0;
if (mnPos == -1 && nLeadSpace > 0) //tdf#122120 if it won't fit anyway, then left align it
{
nX = nLeadSpace;
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 4e9b322f4f87..35674698a6b7 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -956,18 +956,18 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, weld::Button&, voi
GraphicConverter::Import( *pIn, aGraphic );
BitmapEx aBitmap = aGraphic.GetBitmapEx();
- long nPixelX = aBitmap.GetSizePixel().Width();
- long nPixelY = aBitmap.GetSizePixel().Height();
+ tools::Long nPixelX = aBitmap.GetSizePixel().Width();
+ tools::Long nPixelY = aBitmap.GetSizePixel().Height();
double ratio = nPixelY/static_cast<double>(nPixelX);
if(nPixelX > 30)
{
nPixelX = 30;
- nPixelY = static_cast<long>(nPixelX*ratio);
+ nPixelY = static_cast<tools::Long>(nPixelX*ratio);
}
if(nPixelY > 30)
{
nPixelY = 30;
- nPixelX = static_cast<long>(nPixelY/ratio);
+ nPixelX = static_cast<tools::Long>(nPixelY/ratio);
}
aBitmap.Scale( Size( nPixelX, nPixelY ), BmpScaleFlag::Fast );
@@ -1986,8 +1986,8 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, weld::MetricSpinButton&, rField,
bool bWidth = &rField == m_xWidthMF.get();
bLastWidthModified = bWidth;
bool bRatio = m_xRatioCB->get_active();
- long nWidthVal = static_cast<long>(m_xWidthMF->denormalize(m_xWidthMF->get_value(FieldUnit::MM_100TH)));
- long nHeightVal = static_cast<long>(m_xHeightMF->denormalize(m_xHeightMF->get_value(FieldUnit::MM_100TH)));
+ tools::Long nWidthVal = static_cast<tools::Long>(m_xWidthMF->denormalize(m_xWidthMF->get_value(FieldUnit::MM_100TH)));
+ tools::Long nHeightVal = static_cast<tools::Long>(m_xHeightMF->denormalize(m_xHeightMF->get_value(FieldUnit::MM_100TH)));
nWidthVal = OutputDevice::LogicToLogic( nWidthVal ,
MapUnit::Map100thMM, eCoreUnit );
nHeightVal = OutputDevice::LogicToLogic( nHeightVal,
@@ -2013,11 +2013,11 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, weld::MetricSpinButton&, rField,
if(bWidth)
{
- long nDelta = nWidthVal - aInitSize[i].Width();
+ tools::Long nDelta = nWidthVal - aInitSize[i].Width();
aSize.setWidth( nWidthVal );
if (bRatio)
{
- aSize.setHeight( aInitSize[i].Height() + static_cast<long>(static_cast<double>(nDelta) / fSizeRatio) );
+ aSize.setHeight( aInitSize[i].Height() + static_cast<tools::Long>(static_cast<double>(nDelta) / fSizeRatio) );
m_xHeightMF->set_value(m_xHeightMF->normalize(
OutputDevice::LogicToLogic( aSize.Height(), eCoreUnit, MapUnit::Map100thMM )),
FieldUnit::MM_100TH);
@@ -2025,11 +2025,11 @@ IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, weld::MetricSpinButton&, rField,
}
else
{
- long nDelta = nHeightVal - aInitSize[i].Height();
+ tools::Long nDelta = nHeightVal - aInitSize[i].Height();
aSize.setHeight( nHeightVal );
if (bRatio)
{
- aSize.setWidth( aInitSize[i].Width() + static_cast<long>(static_cast<double>(nDelta) * fSizeRatio) );
+ aSize.setWidth( aInitSize[i].Width() + static_cast<tools::Long>(static_cast<double>(nDelta) * fSizeRatio) );
m_xWidthMF->set_value(m_xWidthMF->normalize(
OutputDevice::LogicToLogic( aSize.Width(), eCoreUnit, MapUnit::Map100thMM )),
FieldUnit::MM_100TH);
@@ -2118,11 +2118,11 @@ void SvxNumOptionsTabPage::EditModifyHdl_Impl(const weld::Entry* pEdit)
SetModified();
}
-static long lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, long nXStart,
- long nYMiddle, long nDivision)
+static tools::Long lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, tools::Long nXStart,
+ tools::Long nYMiddle, tools::Long nDivision)
{
const SvxBrushItem* pBrushItem = rFmt.GetBrush();
- long nRet = 0;
+ tools::Long nRet = 0;
if(pBrushItem)
{
const Graphic* pGrf = pBrushItem->GetGraphic();
@@ -2140,9 +2140,9 @@ static long lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, l
}
-static long lcl_DrawBullet(VirtualDevice* pVDev,
- const SvxNumberFormat& rFmt, long nXStart,
- long nYStart, const Size& rSize)
+static tools::Long lcl_DrawBullet(VirtualDevice* pVDev,
+ const SvxNumberFormat& rFmt, tools::Long nXStart,
+ tools::Long nYStart, const Size& rSize)
{
vcl::Font aTmpFont(pVDev->GetFont());
@@ -2167,10 +2167,10 @@ static long lcl_DrawBullet(VirtualDevice* pVDev,
pVDev->SetFont( aFont );
sal_UCS4 cChar = rFmt.GetBulletChar();
OUString aText(&cChar, 1);
- long nY = nYStart;
+ tools::Long nY = nYStart;
nY -= ((aTmpSize.Height() - rSize.Height())/ 2);
pVDev->DrawText( Point(nXStart, nY), aText );
- long nRet = pVDev->GetTextWidth(aText);
+ tools::Long nRet = pVDev->GetTextWidth(aText);
pVDev->SetFont(aTmpFont);
return nRet;
@@ -2205,21 +2205,21 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
if (pActNum)
{
- long nWidthRelation = 30; // chapter dialog
+ tools::Long nWidthRelation = 30; // chapter dialog
// height per level
- long nXStep = aSize.Width() / (3 * pActNum->GetLevelCount());
+ tools::Long nXStep = aSize.Width() / (3 * pActNum->GetLevelCount());
if (pActNum->GetLevelCount() < 10)
nXStep /= 2;
- long nYStart = 4;
+ tools::Long nYStart = 4;
// the whole height mustn't be used for a single level
- long nYStep = (aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5);
+ tools::Long nYStep = (aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5);
aStdFont = OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne);
aStdFont.SetColor(aTextColor);
aStdFont.SetFillColor(aBackColor);
- long nFontHeight = nYStep * 6 / 10;
+ tools::Long nFontHeight = nYStep * 6 / 10;
if (bPosition)
nFontHeight = nYStep * 15 / 10;
aStdFont.SetFontSize(Size( 0, nFontHeight ));
@@ -2229,7 +2229,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
if (bPosition)
{
- long nLineHeight = nFontHeight * 8 / 7;
+ tools::Long nLineHeight = nFontHeight * 8 / 7;
sal_uInt8 nStart = 0;
while (!(nActLevel & (1<<nStart)))
{
@@ -2243,15 +2243,15 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
aNum.GetLevelVal()[nLevel] = rFmt.GetStart();
- long nXStart( 0 );
+ tools::Long nXStart( 0 );
short nTextOffset( 0 );
- long nNumberXPos( 0 );
+ tools::Long nNumberXPos( 0 );
if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{
nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation;
nNumberXPos = nXStart;
- long nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
+ tools::Long nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
if (nFirstLineOffset <= nNumberXPos)
nNumberXPos = nNumberXPos - nFirstLineOffset;
@@ -2263,7 +2263,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
}
else if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT)
{
- const long nTmpNumberXPos((rFmt.GetIndentAt() + rFmt.GetFirstLineIndent() ) / nWidthRelation);
+ const tools::Long nTmpNumberXPos((rFmt.GetIndentAt() + rFmt.GetFirstLineIndent() ) / nWidthRelation);
if (nTmpNumberXPos < 0)
{
nNumberXPos = 0;
@@ -2274,10 +2274,10 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
}
}
- long nBulletWidth = 0;
+ tools::Long nBulletWidth = 0;
if (SVX_NUM_BITMAP == (rFmt.GetNumberingType() &(~LINK_TOKEN)))
{
- long nYMiddle = nYStart + ( nFontHeight / 2 );
+ tools::Long nYMiddle = nYStart + ( nFontHeight / 2 );
nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev.get(), rFmt, nNumberXPos, nYMiddle, nWidthRelation) : 0;
}
else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
@@ -2314,7 +2314,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
nBulletWidth = nBulletWidth + pVDev->GetTextWidth(aText);
}
- long nTextXPos( 0 );
+ tools::Long nTextXPos( 0 );
if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
{
nTextXPos = nXStart;
@@ -2360,10 +2360,10 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
else
{
//#i5153# painting gray or black rectangles as 'normal' numbering text
- long nWidth = pVDev->GetTextWidth("Preview");
- long nTextHeight = pVDev->GetTextHeight();
- long nRectHeight = nTextHeight * 2 / 3;
- long nTopOffset = nTextHeight - nRectHeight;
+ tools::Long nWidth = pVDev->GetTextWidth("Preview");
+ tools::Long nTextHeight = pVDev->GetTextHeight();
+ tools::Long nRectHeight = nTextHeight * 2 / 3;
+ tools::Long nTopOffset = nTextHeight - nRectHeight;
Color aBlackColor(COL_BLACK);
if (aBlackColor == aBackColor)
aBlackColor.Invert();
@@ -2372,7 +2372,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
{
const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart();
- long nXStart( 0 );
+ tools::Long nXStart( 0 );
pVDev->SetFillColor( aBackColor );
if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION)
@@ -2381,7 +2381,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
}
else if (rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT)
{
- const long nTmpXStart((rFmt.GetIndentAt() + rFmt.GetFirstLineIndent() ) / nWidthRelation);
+ const tools::Long nTmpXStart((rFmt.GetIndentAt() + rFmt.GetFirstLineIndent() ) / nWidthRelation);
if (nTmpXStart < 0)
{
nXStart = 0;
@@ -2393,12 +2393,12 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
}
nXStart /= 2;
nXStart += 2;
- long nTextOffset = 2 * nXStep;
+ tools::Long nTextOffset = 2 * nXStep;
if (SVX_NUM_BITMAP == (rFmt.GetNumberingType()&(~LINK_TOKEN)))
{
if (rFmt.IsShowSymbol())
{
- long nYMiddle = nYStart + ( nFontHeight / 2 );
+ tools::Long nYMiddle = nYStart + ( nFontHeight / 2 );
nTextOffset = lcl_DrawGraphic(pVDev.get(), rFmt, nXStart, nYMiddle, nWidthRelation);
nTextOffset = nTextOffset + nXStep;
}
@@ -2436,7 +2436,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const ::tool
if (pActNum->IsContinuousNumbering())
aNum.GetLevelVal()[nLevel] = nPreNum;
OUString aText(pActNum->MakeNumString(aNum));
- long nY = nYStart;
+ tools::Long nY = nYStart;
nY -= (pVDev->GetTextHeight() - nTextHeight - pVDev->GetFontMetric().GetDescent());
pVDev->DrawText(Point(nXStart, nY), aText);
nTextOffset = pVDev->GetTextWidth(aText);
@@ -2575,7 +2575,7 @@ void SvxNumPositionTabPage::InitControls()
const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
sal_uInt16 nMask = 1;
sal_uInt16 nLvl = SAL_MAX_UINT16;
- long nFirstBorderTextRelative = -1;
+ tools::Long nFirstBorderTextRelative = -1;
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
aNumFmtArr[i] = &pActNum->GetLevel(i);
@@ -2633,16 +2633,16 @@ void SvxNumPositionTabPage::InitControls()
if(bSameDistBorderNum)
{
- long nDistBorderNum;
+ tools::Long nDistBorderNum;
if(bRelative)
{
- nDistBorderNum = static_cast<long>(aNumFmtArr[nLvl]->GetAbsLSpace())+ aNumFmtArr[nLvl]->GetFirstLineOffset();
+ nDistBorderNum = static_cast<tools::Long>(aNumFmtArr[nLvl]->GetAbsLSpace())+ aNumFmtArr[nLvl]->GetFirstLineOffset();
if(nLvl)
- nDistBorderNum -= static_cast<long>(aNumFmtArr[nLvl - 1]->GetAbsLSpace())+ aNumFmtArr[nLvl - 1]->GetFirstLineOffset();
+ nDistBorderNum -= static_cast<tools::Long>(aNumFmtArr[nLvl - 1]->GetAbsLSpace())+ aNumFmtArr[nLvl - 1]->GetFirstLineOffset();
}
else
{
- nDistBorderNum = static_cast<long>(aNumFmtArr[nLvl]->GetAbsLSpace())+ aNumFmtArr[nLvl]->GetFirstLineOffset();
+ nDistBorderNum = static_cast<tools::Long>(aNumFmtArr[nLvl]->GetAbsLSpace())+ aNumFmtArr[nLvl]->GetFirstLineOffset();
}
SetMetricValue(*m_xDistBorderMF, nDistBorderNum, eCoreUnit);
}
@@ -3042,7 +3042,7 @@ IMPL_LINK(SvxNumPositionTabPage, DistanceHdl_Impl, weld::MetricSpinButton&, rFld
{
if(bInInintControl)
return;
- long nValue = GetCoreValue(rFld, eCoreUnit);
+ tools::Long nValue = GetCoreValue(rFld, eCoreUnit);
sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
{
@@ -3061,7 +3061,7 @@ IMPL_LINK(SvxNumPositionTabPage, DistanceHdl_Impl, weld::MetricSpinButton&, rFld
}
else
{
- long nTmp = pActNum->GetLevel( i - 1 ).GetAbsLSpace() +
+ tools::Long nTmp = pActNum->GetLevel( i - 1 ).GetAbsLSpace() +
pActNum->GetLevel( i - 1 ).GetFirstLineOffset() -
pActNum->GetLevel( i ).GetFirstLineOffset();
@@ -3080,7 +3080,7 @@ IMPL_LINK(SvxNumPositionTabPage, DistanceHdl_Impl, weld::MetricSpinButton&, rFld
else if (&rFld == m_xIndentMF.get())
{
// together with the FirstLineOffset the AbsLSpace must be changed, too
- long nDiff = nValue + aNumFmt.GetFirstLineOffset();
+ tools::Long nDiff = nValue + aNumFmt.GetFirstLineOffset();
auto const nAbsLSpace = aNumFmt.GetAbsLSpace();
aNumFmt.SetAbsLSpace(nAbsLSpace + nDiff);
aNumFmt.SetFirstLineOffset( -nValue );
@@ -3103,7 +3103,7 @@ IMPL_LINK(SvxNumPositionTabPage, RelativeHdl_Impl, weld::ToggleButton&, rBox, vo
bool bOn = rBox.get_active();
bool bSingleSelection = m_xLevelLB->count_selected_rows() == 1 && SAL_MAX_UINT16 != nActNumLvl;
bool bSetValue = false;
- long nValue = 0;
+ tools::Long nValue = 0;
if(bOn || bSingleSelection)
{
sal_uInt16 nMask = 1;
@@ -3203,7 +3203,7 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, LabelFollowedByHdl_Impl, weld::ComboBox&,
IMPL_LINK(SvxNumPositionTabPage, ListtabPosHdl_Impl, weld::MetricSpinButton&, rFld, void)
{
// determine value to be set at the chosen list levels
- const long nValue = GetCoreValue(rFld, eCoreUnit);
+ const tools::Long nValue = GetCoreValue(rFld, eCoreUnit);
// set value at the chosen list levels
sal_uInt16 nMask = 1;
@@ -3224,7 +3224,7 @@ IMPL_LINK(SvxNumPositionTabPage, ListtabPosHdl_Impl, weld::MetricSpinButton&, rF
IMPL_LINK(SvxNumPositionTabPage, AlignAtHdl_Impl, weld::MetricSpinButton&, rFld, void)
{
// determine value to be set at the chosen list levels
- const long nValue = GetCoreValue(rFld, eCoreUnit);
+ const tools::Long nValue = GetCoreValue(rFld, eCoreUnit);
// set value at the chosen list levels
sal_uInt16 nMask = 1;
@@ -3233,7 +3233,7 @@ IMPL_LINK(SvxNumPositionTabPage, AlignAtHdl_Impl, weld::MetricSpinButton&, rFld,
if ( nActNumLvl & nMask )
{
SvxNumberFormat aNumFmt( pActNum->GetLevel(i) );
- const long nFirstLineIndent = nValue - aNumFmt.GetIndentAt();
+ const tools::Long nFirstLineIndent = nValue - aNumFmt.GetIndentAt();
aNumFmt.SetFirstLineIndent( nFirstLineIndent );
pActNum->SetLevel( i, aNumFmt );
}
@@ -3246,7 +3246,7 @@ IMPL_LINK(SvxNumPositionTabPage, AlignAtHdl_Impl, weld::MetricSpinButton&, rFld,
IMPL_LINK(SvxNumPositionTabPage, IndentAtHdl_Impl, weld::MetricSpinButton&, rFld, void)
{
// determine value to be set at the chosen list levels
- const long nValue = GetCoreValue(rFld, eCoreUnit);
+ const tools::Long nValue = GetCoreValue(rFld, eCoreUnit);
// set value at the chosen list levels
sal_uInt16 nMask = 1;
@@ -3255,10 +3255,10 @@ IMPL_LINK(SvxNumPositionTabPage, IndentAtHdl_Impl, weld::MetricSpinButton&, rFld
if ( nActNumLvl & nMask )
{
SvxNumberFormat aNumFmt( pActNum->GetLevel(i) );
- const long nAlignedAt = aNumFmt.GetIndentAt() +
+ const tools::Long nAlignedAt = aNumFmt.GetIndentAt() +
aNumFmt.GetFirstLineIndent();
aNumFmt.SetIndentAt( nValue );
- const long nNewFirstLineIndent = nAlignedAt - nValue;
+ const tools::Long nNewFirstLineIndent = nAlignedAt - nValue;
aNumFmt.SetFirstLineIndent( nNewFirstLineIndent );
pActNum->SetLevel( i, aNumFmt );
}
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index c0606c2f65be..e478fbc5f492 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -56,7 +56,7 @@
// static ----------------------------------------------------------------
// #i19922# - tdf#126051 see svx/source/dialog/hdft.cxx and sw/source/uibase/sidebar/PageMarginControl.hxx
-const long MINBODY = 56; // 1mm in twips rounded
+const tools::Long MINBODY = 56; // 1mm in twips rounded
const sal_uInt16 SvxPageDescPage::pRanges[] =
{
@@ -107,7 +107,7 @@ static Size GetMinBorderSpace_Impl( const SvxShadowItem& rShadow, const SvxBoxIt
}
-static long ConvertLong_Impl( const long nIn, MapUnit eUnit )
+static tools::Long ConvertLong_Impl( const tools::Long nIn, MapUnit eUnit )
{
return OutputDevice::LogicToLogic( nIn, eUnit, MapUnit::MapTwip );
}
@@ -117,8 +117,8 @@ static bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize )
if ( pSize )
{
Size aSize = pSize->GetSize();
- long nDiffW = std::abs( rSize.Width () - aSize.Width () );
- long nDiffH = std::abs( rSize.Height() - aSize.Height() );
+ tools::Long nDiffW = std::abs( rSize.Width () - aSize.Width () );
+ tools::Long nDiffH = std::abs( rSize.Height() - aSize.Height() );
return ( nDiffW < 10 && nDiffH < 10 );
}
else
@@ -344,10 +344,10 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
const SvxULSpaceItem& rULSpace = static_cast<const SvxULSpaceItem&>(*pItem);
SetMetricValue( *m_xTopMarginEdit, rULSpace.GetUpper(), eUnit );
m_aBspWin.SetTop(
- static_cast<sal_uInt16>(ConvertLong_Impl( static_cast<long>(rULSpace.GetUpper()), eUnit )) );
+ static_cast<sal_uInt16>(ConvertLong_Impl( static_cast<tools::Long>(rULSpace.GetUpper()), eUnit )) );
SetMetricValue( *m_xBottomMarginEdit, rULSpace.GetLower(), eUnit );
m_aBspWin.SetBottom(
- static_cast<sal_uInt16>(ConvertLong_Impl( static_cast<long>(rULSpace.GetLower()), eUnit )) );
+ static_cast<sal_uInt16>(ConvertLong_Impl( static_cast<tools::Long>(rULSpace.GetLower()), eUnit )) );
}
// general page data
@@ -855,7 +855,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperSizeSelect_Impl, weld::ComboBox&, void)
return;
// Draw: if paper format the margin shall be 1 cm
- long nTmp = 0;
+ tools::Long nTmp = 0;
bool bScreen = (( PAPER_SCREEN_4_3 == ePaper )||( PAPER_SCREEN_16_9 == ePaper)||( PAPER_SCREEN_16_10 == ePaper));
if ( !bScreen )
@@ -908,8 +908,8 @@ IMPL_LINK(SvxPageDescPage, SwapOrientation_Impl, weld::Button&, rBtn, void)
bLandscape = m_xLandscapeBtn->get_active();
- const long lWidth = GetCoreValue( *m_xPaperWidthEdit, MapUnit::Map100thMM );
- const long lHeight = GetCoreValue( *m_xPaperHeightEdit, MapUnit::Map100thMM );
+ const tools::Long lWidth = GetCoreValue( *m_xPaperWidthEdit, MapUnit::Map100thMM );
+ const tools::Long lHeight = GetCoreValue( *m_xPaperHeightEdit, MapUnit::Map100thMM );
// swap width and height
SetMetricValue(*m_xPaperWidthEdit, lHeight, MapUnit::Map100thMM);
@@ -956,10 +956,10 @@ void SvxPageDescPage::SwapFirstValues_Impl( bool bSet )
sal_Int64 nSetB = m_xBottomMarginEdit->denormalize(
m_xBottomMarginEdit->get_value( FieldUnit::TWIP ) );
- long nNewL = aPrintOffset.X();
- long nNewR = aPaperSize.Width() - aPrintSize.Width() - aPrintOffset.X();
- long nNewT = aPrintOffset.Y();
- long nNewB = aPaperSize.Height() - aPrintSize.Height() - aPrintOffset.Y();
+ tools::Long nNewL = aPrintOffset.X();
+ tools::Long nNewR = aPaperSize.Width() - aPrintSize.Width() - aPrintOffset.X();
+ tools::Long nNewT = aPrintOffset.Y();
+ tools::Long nNewB = aPaperSize.Height() - aPrintSize.Height() - aPrintOffset.Y();
nFirstLeftMargin = m_xLeftMarginEdit->convert_value_from(m_xLeftMarginEdit->normalize(nNewL), FieldUnit::TWIP);
nFirstRightMargin = m_xRightMarginEdit->convert_value_from(m_xRightMarginEdit->normalize(nNewR), FieldUnit::TWIP);
@@ -1139,7 +1139,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) ));
const SvxULSpaceItem& rUL = static_cast<const SvxULSpaceItem&>(
rHeaderSet.Get( GetWhich( SID_ATTR_ULSPACE ) ));
- long nDist = rUL.GetLower();
+ tools::Long nDist = rUL.GetLower();
m_aBspWin.SetHdHeight( rSize.GetSize().Height() - nDist );
m_aBspWin.SetHdDist( nDist );
const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(
@@ -1194,7 +1194,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
rFooterSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) ));
const SvxULSpaceItem& rUL = static_cast<const SvxULSpaceItem&>(
rFooterSet.Get( GetWhich( SID_ATTR_ULSPACE ) ));
- long nDist = rUL.GetUpper();
+ tools::Long nDist = rUL.GetUpper();
m_aBspWin.SetFtHeight( rSize.GetSize().Height() - nDist );
m_aBspWin.SetFtDist( nDist );
const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>(
@@ -1298,20 +1298,20 @@ DeactivateRC SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
void SvxPageDescPage::RangeHdl_Impl()
{
// example window
- long nHHeight = m_aBspWin.GetHdHeight();
- long nHDist = m_aBspWin.GetHdDist();
+ tools::Long nHHeight = m_aBspWin.GetHdHeight();
+ tools::Long nHDist = m_aBspWin.GetHdDist();
- long nFHeight = m_aBspWin.GetFtHeight();
- long nFDist = m_aBspWin.GetFtDist();
+ tools::Long nFHeight = m_aBspWin.GetFtHeight();
+ tools::Long nFDist = m_aBspWin.GetFtDist();
- long nHFLeft = std::max(m_aBspWin.GetHdLeft(), m_aBspWin.GetFtLeft());
- long nHFRight = std::max(m_aBspWin.GetHdRight(), m_aBspWin.GetFtRight());
+ tools::Long nHFLeft = std::max(m_aBspWin.GetHdLeft(), m_aBspWin.GetFtLeft());
+ tools::Long nHFRight = std::max(m_aBspWin.GetHdRight(), m_aBspWin.GetFtRight());
// current values for page margins
- long nBT = static_cast<long>(m_xTopMarginEdit->denormalize(m_xTopMarginEdit->get_value(FieldUnit::TWIP)));
- long nBB = static_cast<long>(m_xBottomMarginEdit->denormalize(m_xBottomMarginEdit->get_value(FieldUnit::TWIP)));
- long nBL = static_cast<long>(m_xLeftMarginEdit->denormalize(m_xLeftMarginEdit->get_value(FieldUnit::TWIP)));
- long nBR = static_cast<long>(m_xRightMarginEdit->denormalize(m_xRightMarginEdit->get_value(FieldUnit::TWIP)));
+ tools::Long nBT = static_cast<tools::Long>(m_xTopMarginEdit->denormalize(m_xTopMarginEdit->get_value(FieldUnit::TWIP)));
+ tools::Long nBB = static_cast<tools::Long>(m_xBottomMarginEdit->denormalize(m_xBottomMarginEdit->get_value(FieldUnit::TWIP)));
+ tools::Long nBL = static_cast<tools::Long>(m_xLeftMarginEdit->denormalize(m_xLeftMarginEdit->get_value(FieldUnit::TWIP)));
+ tools::Long nBR = static_cast<tools::Long>(m_xRightMarginEdit->denormalize(m_xRightMarginEdit->get_value(FieldUnit::TWIP)));
// calculate width of page border
const SfxItemSet* _pSet = &GetItemSet();
@@ -1330,18 +1330,18 @@ void SvxPageDescPage::RangeHdl_Impl()
// limits paper
// maximum is 54 cm
- long nMin = nHHeight + nHDist + nFDist + nFHeight + nBT + nBB +
+ tools::Long nMin = nHHeight + nHDist + nFDist + nFHeight + nBT + nBB +
MINBODY + aBorder.Height();
m_xPaperHeightEdit->set_min(m_xPaperHeightEdit->normalize(nMin), FieldUnit::TWIP);
nMin = MINBODY + nBL + nBR + aBorder.Width();
m_xPaperWidthEdit->set_min(m_xPaperWidthEdit->normalize(nMin), FieldUnit::TWIP);
- long nH = static_cast<long>(m_xPaperHeightEdit->denormalize(m_xPaperHeightEdit->get_value(FieldUnit::TWIP)));
- long nW = static_cast<long>(m_xPaperWidthEdit->denormalize(m_xPaperWidthEdit->get_value(FieldUnit::TWIP)));
+ tools::Long nH = static_cast<tools::Long>(m_xPaperHeightEdit->denormalize(m_xPaperHeightEdit->get_value(FieldUnit::TWIP)));
+ tools::Long nW = static_cast<tools::Long>(m_xPaperWidthEdit->denormalize(m_xPaperWidthEdit->get_value(FieldUnit::TWIP)));
// Top
- long nMax = nH - nBB - aBorder.Height() - MINBODY -
+ tools::Long nMax = nH - nBB - aBorder.Height() - MINBODY -
nFDist - nFHeight - nHDist - nHHeight;
m_xTopMarginEdit->set_max(m_xTopMarginEdit->normalize(nMax), FieldUnit::TWIP);
@@ -1364,24 +1364,24 @@ void SvxPageDescPage::RangeHdl_Impl()
void SvxPageDescPage::CalcMargin_Impl()
{
// current values for page margins
- long nBT = GetCoreValue( *m_xTopMarginEdit, MapUnit::MapTwip );
- long nBB = GetCoreValue( *m_xBottomMarginEdit, MapUnit::MapTwip );
+ tools::Long nBT = GetCoreValue( *m_xTopMarginEdit, MapUnit::MapTwip );
+ tools::Long nBB = GetCoreValue( *m_xBottomMarginEdit, MapUnit::MapTwip );
- long nBL = GetCoreValue( *m_xLeftMarginEdit, MapUnit::MapTwip );
- long nBR = GetCoreValue( *m_xRightMarginEdit, MapUnit::MapTwip );
+ tools::Long nBL = GetCoreValue( *m_xLeftMarginEdit, MapUnit::MapTwip );
+ tools::Long nBR = GetCoreValue( *m_xRightMarginEdit, MapUnit::MapTwip );
- long nH = GetCoreValue( *m_xPaperHeightEdit, MapUnit::MapTwip );
- long nW = GetCoreValue( *m_xPaperWidthEdit, MapUnit::MapTwip );
+ tools::Long nH = GetCoreValue( *m_xPaperHeightEdit, MapUnit::MapTwip );
+ tools::Long nW = GetCoreValue( *m_xPaperWidthEdit, MapUnit::MapTwip );
- long nWidth = nBL + nBR + MINBODY;
- long nHeight = nBT + nBB + MINBODY;
+ tools::Long nWidth = nBL + nBR + MINBODY;
+ tools::Long nHeight = nBT + nBB + MINBODY;
if ( nWidth <= nW && nHeight <= nH )
return;
if ( nWidth > nW )
{
- long nTmp = nBL <= nBR ? nBR : nBL;
+ tools::Long nTmp = nBL <= nBR ? nBR : nBL;
nTmp -= nWidth - nW;
if ( nBL <= nBR )
@@ -1392,7 +1392,7 @@ void SvxPageDescPage::CalcMargin_Impl()
if ( nHeight > nH )
{
- long nTmp = nBT <= nBB ? nBB : nBT;
+ tools::Long nTmp = nBT <= nBB ? nBB : nBT;
nTmp -= nHeight - nH;
if ( nBT <= nBB )
@@ -1457,11 +1457,11 @@ IMPL_LINK_NOARG(SvxPageDescPage, FrameDirectionModify_Impl, weld::ComboBox&, voi
}
bool SvxPageDescPage::IsPrinterRangeOverflow(
- weld::MetricSpinButton& rField, long nFirstMargin, long nLastMargin, MarginPosition nPos )
+ weld::MetricSpinButton& rField, tools::Long nFirstMargin, tools::Long nLastMargin, MarginPosition nPos )
{
bool bRet = false;
bool bCheck = ( ( m_nPos & nPos ) == 0 );
- long nValue = rField.get_value(FieldUnit::NONE);
+ tools::Long nValue = rField.get_value(FieldUnit::NONE);
if ( bCheck &&
( nValue < nFirstMargin || nValue > nLastMargin ) &&
rField.get_value_changed_from_saved() )
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 5f6ae38d3ad9..4788969bcf4e 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -100,10 +100,10 @@ enum LineSpaceList
}
-static void SetLineSpace_Impl( SvxLineSpacingItem&, int, long lValue = 0 );
+static void SetLineSpace_Impl( SvxLineSpacingItem&, int, tools::Long lValue = 0 );
void SetLineSpace_Impl( SvxLineSpacingItem& rLineSpace,
- int eSpace, long lValue )
+ int eSpace, tools::Long lValue )
{
switch ( eSpace )
{
@@ -247,7 +247,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* rOutSet )
case LLINESPACE_PROP:
SetLineSpace_Impl( aSpacing, nPos,
- static_cast<long>(m_xLineDistAtPercentBox->denormalize(
+ static_cast<tools::Long>(m_xLineDistAtPercentBox->denormalize(
m_xLineDistAtPercentBox->get_value(FieldUnit::NONE) )) );
break;
@@ -895,8 +895,8 @@ void SvxStdParagraphTabPage::Init_Impl()
void SvxStdParagraphTabPage::UpdateExample_Impl()
{
m_aExampleWin.SetFirstLineOffset( static_cast<short>(m_xFLineIndent->denormalize( m_xFLineIndent->get_value( FieldUnit::TWIP ) )) );
- m_aExampleWin.SetLeftMargin( static_cast<long>(m_xLeftIndent->denormalize( m_xLeftIndent->get_value( FieldUnit::TWIP ) ) ) );
- m_aExampleWin.SetRightMargin( static_cast<long>(m_xRightIndent->denormalize( m_xRightIndent->get_value( FieldUnit::TWIP ) ) ) );
+ m_aExampleWin.SetLeftMargin( static_cast<tools::Long>(m_xLeftIndent->denormalize( m_xLeftIndent->get_value( FieldUnit::TWIP ) ) ) );
+ m_aExampleWin.SetRightMargin( static_cast<tools::Long>(m_xRightIndent->denormalize( m_xRightIndent->get_value( FieldUnit::TWIP ) ) ) );
m_aExampleWin.SetUpper( static_cast<sal_uInt16>(m_xTopDist->denormalize( m_xTopDist->get_value( FieldUnit::TWIP ) )) );
m_aExampleWin.SetLower( static_cast<sal_uInt16>(m_xBottomDist->denormalize( m_xBottomDist->get_value( FieldUnit::TWIP ) )) );
@@ -941,7 +941,7 @@ void SvxStdParagraphTabPage::EnableAutoFirstLine()
m_xAutoCB->show();
}
-void SvxStdParagraphTabPage::EnableAbsLineDist(long nMinTwip)
+void SvxStdParagraphTabPage::EnableAbsLineDist(tools::Long nMinTwip)
{
m_xLineDist->append_text(sAbsDist);
nMinFixDist = nMinTwip;
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 803b56081007..b0366bf48053 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -1463,8 +1463,8 @@ void SvxSwPosSizeTabPage::InitPos(RndStdIds nAnchor,
sal_uInt16 nHRel,
sal_uInt16 nV,
sal_uInt16 nVRel,
- long nX,
- long nY)
+ tools::Long nX,
+ tools::Long nY)
{
int nPos = m_xVertLB->get_active();
if (nPos != -1 && m_pVMap)
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 939a51e41256..202576bff30d 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -39,7 +39,7 @@ const sal_uInt16 SvxTabulatorTabPage::pRanges[] =
0
};
-static void FillUpWithDefTabs_Impl( long nDefDist, SvxTabStopItem& rTabs )
+static void FillUpWithDefTabs_Impl( tools::Long nDefDist, SvxTabStopItem& rTabs )
{
if( rTabs.Count() )
return;
@@ -250,7 +250,7 @@ void SvxTabulatorTabPage::Reset(const SfxItemSet* rSet)
pItem = GetItem(*rSet, SID_ATTR_TABSTOP_DEFAULTS);
if (pItem)
- nDefDist = OutputDevice::LogicToLogic(long(static_cast<const SfxUInt16Item*>(pItem)->GetValue()), eUnit, MapUnit::Map100thMM);
+ nDefDist = OutputDevice::LogicToLogic(tools::Long(static_cast<const SfxUInt16Item*>(pItem)->GetValue()), eUnit, MapUnit::Map100thMM);
// Tab pos currently selected
sal_uInt16 nTabPos = 0;
@@ -316,7 +316,7 @@ void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos )
{
m_xTabBox->clear();
- long nOffset = 0;
+ tools::Long nOffset = 0;
const SfxPoolItem* pItem = nullptr;
if (GetItemSet().GetItemState(SID_ATTR_TABSTOP_OFFSET, true, &pItem) == SfxItemState::SET)
{
@@ -430,7 +430,7 @@ void SvxTabulatorTabPage::NewHdl_Impl(const weld::Button* pBtn)
if (nVal == 0 && pBtn == nullptr)
return;
- long nOffset = 0;
+ tools::Long nOffset = 0;
const SfxPoolItem* pItem = nullptr;
if ( GetItemSet().GetItemState( SID_ATTR_TABSTOP_OFFSET, true, &pItem ) ==
@@ -440,7 +440,7 @@ void SvxTabulatorTabPage::NewHdl_Impl(const weld::Button* pBtn)
MapUnit eUnit = GetItemSet().GetPool()->GetMetric( GetWhich( SID_ATTR_TABSTOP ) );
nOffset = OutputDevice::LogicToLogic( nOffset, eUnit, MapUnit::Map100thMM );
}
- const long nReal = nVal - nOffset;
+ const tools::Long nReal = nVal - nOffset;
sal_Int32 nSize = m_xTabBox->get_count();
sal_Int32 i;
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index ab5dc095bfff..e5239dede67e 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -186,7 +186,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANICOUNT );
- long nValue = static_cast<long>(static_cast<const SdrTextAniCountItem*>(pItem)->GetValue());
+ tools::Long nValue = static_cast<tools::Long>(static_cast<const SdrTextAniCountItem*>(pItem)->GetValue());
m_xNumFldCount->set_value(nValue);
if (nValue == 0)
{
@@ -211,7 +211,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDELAY );
- nValue = static_cast<long>(static_cast<const SdrTextAniDelayItem*>(pItem)->GetValue());
+ nValue = static_cast<tools::Long>(static_cast<const SdrTextAniDelayItem*>(pItem)->GetValue());
m_xMtrFldDelay->set_value(nValue, FieldUnit::NONE);
if (nValue == 0)
{
@@ -228,7 +228,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet* rAttrs )
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIAMOUNT );
- nValue = static_cast<long>(static_cast<const SdrTextAniAmountItem*>(pItem)->GetValue());
+ nValue = static_cast<tools::Long>(static_cast<const SdrTextAniAmountItem*>(pItem)->GetValue());
if (nValue <= 0)
{
m_xTsbPixel->set_state(TRISTATE_TRUE);
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index cff0dab685b0..ebb4426f6ce2 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -308,8 +308,8 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
else
m_xBitmapStyleLB->set_active(static_cast<sal_Int32>(CUSTOM));
- long nWidth = 0;
- long nHeight = 0;
+ tools::Long nWidth = 0;
+ tools::Long nHeight = 0;
if(rAttrs->GetItemState(XATTR_FILLBMP_SIZELOG) != SfxItemState::DONTCARE)
{
@@ -432,8 +432,8 @@ void SvxBitmapTabPage::CalculateBitmapPresetSize()
if(rBitmapSize.IsEmpty())
return;
- long nObjectWidth = static_cast<long>(m_fObjectWidth);
- long nObjectHeight = static_cast<long>(m_fObjectHeight);
+ tools::Long nObjectWidth = static_cast<tools::Long>(m_fObjectWidth);
+ tools::Long nObjectHeight = static_cast<tools::Long>(m_fObjectHeight);
if(std::abs(rBitmapSize.Width() - nObjectWidth) < std::abs(rBitmapSize.Height() - nObjectHeight))
{
@@ -717,7 +717,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
SvxOpenGraphicDialog aDlg(CuiResId(RID_SVXSTR_ADD_IMAGE), pDialogFrameWeld);
aDlg.EnableLink(false);
- long nCount = m_pBitmapList->Count();
+ tools::Long nCount = m_pBitmapList->Count();
if( aDlg.Execute() )
return;
@@ -746,7 +746,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
bool bDifferent = true;
- for( long i = 0; i < nCount && bDifferent; i++ )
+ for( tools::Long i = 0; i < nCount && bDifferent; i++ )
if( aName == m_pBitmapList->GetBitmap( i )->GetName() )
bDifferent = false;
@@ -788,10 +788,10 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void)
sal_Int32 SvxBitmapTabPage::SearchBitmapList(const GraphicObject& rGraphicObject)
{
- long nCount = m_pBitmapList->Count();
+ tools::Long nCount = m_pBitmapList->Count();
sal_Int32 nPos = -1;
- for(long i = 0;i < nCount;i++)
+ for(tools::Long i = 0;i < nCount;i++)
{
if(rGraphicObject.GetUniqueID() == m_pBitmapList->GetBitmap( i )->GetGraphicObject().GetUniqueID())
{
@@ -804,11 +804,11 @@ sal_Int32 SvxBitmapTabPage::SearchBitmapList(const GraphicObject& rGraphicObject
sal_Int32 SvxBitmapTabPage::SearchBitmapList(const OUString& rBitmapName)
{
- long nCount = m_pBitmapList->Count();
+ tools::Long nCount = m_pBitmapList->Count();
bool bValidBitmapName = true;
sal_Int32 nPos = -1;
- for(long i = 0;i < nCount && bValidBitmapName;i++)
+ for(tools::Long i = 0;i < nCount && bValidBitmapName;i++)
{
if(rBitmapName == m_pBitmapList->GetBitmap( i )->GetName())
{
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 586557c2c089..c9a6060f8169 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -315,7 +315,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
OUString aDesc( CuiResId( RID_SVXSTR_DESC_COLOR ) );
OUString aName;
- long j = 1;
+ tools::Long j = 1;
bool bValidColorName = false;
// check if name is already existing
while (!bValidColorName)
@@ -623,11 +623,11 @@ void SvxColorTabPage::UpdateColorValues( bool bUpdatePreset )
sal_Int32 SvxColorTabPage::FindInCustomColors(OUString const & aColorName)
{
css::uno::Sequence< OUString > aCustomColorNameList(officecfg::Office::Common::UserColors::CustomColorName::get());
- long nCount = aCustomColorNameList.getLength();
+ tools::Long nCount = aCustomColorNameList.getLength();
bool bValidColorName = true;
sal_Int32 nPos = -1;
- for(long i = 0;i < nCount && bValidColorName;i++)
+ for(tools::Long i = 0;i < nCount && bValidColorName;i++)
{
if(aColorName == aCustomColorNameList[i])
{
@@ -666,7 +666,7 @@ void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK )
void SvxColorTabPage::CmykToRgb_Impl( Color& rColor, const sal_uInt16 nK )
{
- long lTemp;
+ tools::Long lTemp;
lTemp = 255 - ( rColor.GetRed() + nK );
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 32deb5ae8fd2..c94f53f56b35 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -320,8 +320,8 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, weld::Button&, void)
OUString aDesc( CuiResId( RID_SVXSTR_DESC_GRADIENT ) );
OUString aName;
- long nCount = m_pGradientList->Count();
- long j = 1;
+ tools::Long nCount = m_pGradientList->Count();
+ tools::Long j = 1;
bool bValidGradientName = false;
while( !bValidGradientName )
@@ -611,11 +611,11 @@ void SvxGradientTabPage::SetControlState_Impl( css::awt::GradientStyle eXGS )
sal_Int32 SvxGradientTabPage::SearchGradientList(const OUString& rGradientName)
{
- long nCount = m_pGradientList->Count();
+ tools::Long nCount = m_pGradientList->Count();
bool bValidGradientName = true;
sal_Int32 nPos = -1;
- for(long i = 0;i < nCount && bValidGradientName;i++)
+ for(tools::Long i = 0;i < nCount && bValidGradientName;i++)
{
if(rGradientName == m_pGradientList->GetGradient( i )->GetName())
{
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 3be0005ef62a..59c046ea6d88 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -201,11 +201,11 @@ DeactivateRC SvxHatchTabPage::DeactivatePage( SfxItemSet* _pSet )
sal_Int32 SvxHatchTabPage::SearchHatchList(const OUString& rHatchName)
{
- long nCount = m_pHatchingList->Count();
+ tools::Long nCount = m_pHatchingList->Count();
bool bValidHatchName = true;
sal_Int32 nPos = -1;
- for(long i = 0;i < nCount && bValidHatchName;i++)
+ for(tools::Long i = 0;i < nCount && bValidHatchName;i++)
{
if(rHatchName == m_pHatchingList->GetHatch( i )->GetName())
{
@@ -378,7 +378,7 @@ void SvxHatchTabPage::ChangeHatchHdl_Impl()
m_xLbLineColor->SetNoSelection();
m_xLbLineColor->SelectEntry( pHatch->GetColor() );
SetMetricValue( *m_xMtrDistance, pHatch->GetDistance(), m_ePoolUnit );
- long nHatchAngle = pHatch->GetAngle().get() / 10;
+ tools::Long nHatchAngle = pHatch->GetAngle().get() / 10;
m_xMtrAngle->set_value(nHatchAngle, FieldUnit::NONE);
m_xSliderAngle->set_value(nHatchAngle);
@@ -402,8 +402,8 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, weld::Button&, void)
OUString aDesc( CuiResId( RID_SVXSTR_DESC_HATCH ) );
OUString aName;
- long nCount = m_pHatchingList->Count();
- long j = 1;
+ tools::Long nCount = m_pHatchingList->Count();
+ tools::Long j = 1;
bool bValidHatchName = false;
while( !bValidHatchName )
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 00b32a5de5db..aba1fafc6735 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -402,7 +402,7 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs )
pStyleItem.reset(new XLineStyleItem( drawing::LineStyle_DASH ));
// For added security
- if( m_pDashList->Count() > static_cast<long>( nPos - 2 ) )
+ if( m_pDashList->Count() > static_cast<tools::Long>( nPos - 2 ) )
{
XLineDashItem aDashItem( m_xLbLineStyle->get_active_text(),
m_pDashList->GetDash( nPos - 2 )->GetDash() );
@@ -479,7 +479,7 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs )
std::unique_ptr<XLineStartItem> pItem;
if( nPos == 0 )
pItem.reset(new XLineStartItem());
- else if( m_pLineEndList->Count() > static_cast<long>( nPos - 1 ) )
+ else if( m_pLineEndList->Count() > static_cast<tools::Long>( nPos - 1 ) )
pItem.reset(new XLineStartItem( m_xLbStartStyle->get_active_text(), m_pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ));
pOld = GetOldItem( *rAttrs, XATTR_LINESTART );
if( pItem && ( !pOld || *pOld != *pItem ) )
@@ -495,7 +495,7 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs )
std::unique_ptr<XLineEndItem> pItem;
if( nPos == 0 )
pItem.reset(new XLineEndItem());
- else if( m_pLineEndList->Count() > static_cast<long>( nPos - 1 ) )
+ else if( m_pLineEndList->Count() > static_cast<tools::Long>( nPos - 1 ) )
pItem.reset(new XLineEndItem( m_xLbEndStyle->get_active_text(), m_pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ));
pOld = GetOldItem( *rAttrs, XATTR_LINEEND );
if( pItem &&
@@ -790,7 +790,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
// Line style
const SfxPoolItem *pPoolItem;
- long nSymType=SVX_SYMBOLTYPE_UNKNOWN;
+ tools::Long nSymType=SVX_SYMBOLTYPE_UNKNOWN;
bool bPrevSym=false;
bool bEnable=true;
bool bIgnoreGraphic=false;
@@ -971,7 +971,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
bool bSelected(false);
const basegfx::B2DPolyPolygon& rItemPolygon = rAttrs->Get(XATTR_LINESTART).GetLineStartValue();
- for(long a(0);!bSelected && a < m_pLineEndList->Count(); a++)
+ for(tools::Long a(0);!bSelected && a < m_pLineEndList->Count(); a++)
{
const XLineEndEntry* pEntry = m_pLineEndList->GetLineEnd(a);
const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd();
@@ -1003,7 +1003,7 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
bool bSelected(false);
const basegfx::B2DPolyPolygon& rItemPolygon = rAttrs->Get(XATTR_LINEEND).GetLineEndValue();
- for(long a(0);!bSelected && a < m_pLineEndList->Count(); a++)
+ for(tools::Long a(0);!bSelected && a < m_pLineEndList->Count(); a++)
{
const XLineEndEntry* pEntry = m_pLineEndList->GetLineEnd(a);
const basegfx::B2DPolyPolygon& rEntryPolygon = pEntry->GetLineEnd();
@@ -1516,7 +1516,7 @@ IMPL_LINK(SvxLineTabPage, GraphicHdl_Impl, const OString&, rIdent, void)
Graphic aGraphic;
bool bResetSize = false;
bool bEnable = true;
- long nPreviousSymbolType = m_nSymbolType;
+ tools::Long nPreviousSymbolType = m_nSymbolType;
OString sNumber;
if (rIdent.startsWith("gallery", &sNumber))
@@ -1575,8 +1575,8 @@ IMPL_LINK(SvxLineTabPage, GraphicHdl_Impl, const OString&, rIdent, void)
{ //#i31097# Data Point Symbol size changes when a different symbol is chosen(maoyg)
if( m_aSymbolSize.Width() != m_aSymbolSize.Height() )
{
- aSize.setWidth( static_cast<long>( m_aSymbolSize.Width() + m_aSymbolSize.Height() )/2 );
- aSize.setHeight( static_cast<long>( m_aSymbolSize.Width() + m_aSymbolSize.Height() )/2 );
+ aSize.setWidth( static_cast<tools::Long>( m_aSymbolSize.Width() + m_aSymbolSize.Height() )/2 );
+ aSize.setHeight( static_cast<tools::Long>( m_aSymbolSize.Width() + m_aSymbolSize.Height() )/2 );
m_aSymbolSize = aSize;
}
}
@@ -1602,8 +1602,8 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, weld::MetricSpinButton&, rField, void)
bool bWidth = &rField == m_xSymbolWidthMF.get();
m_bLastWidthModified = bWidth;
bool bRatio = m_xSymbolRatioCB->get_active();
- long nWidthVal = static_cast<long>(m_xSymbolWidthMF->denormalize(m_xSymbolWidthMF->get_value(FieldUnit::MM_100TH)));
- long nHeightVal= static_cast<long>(m_xSymbolHeightMF->denormalize(m_xSymbolHeightMF->get_value(FieldUnit::MM_100TH)));
+ tools::Long nWidthVal = static_cast<tools::Long>(m_xSymbolWidthMF->denormalize(m_xSymbolWidthMF->get_value(FieldUnit::MM_100TH)));
+ tools::Long nHeightVal= static_cast<tools::Long>(m_xSymbolHeightMF->denormalize(m_xSymbolHeightMF->get_value(FieldUnit::MM_100TH)));
nWidthVal = OutputDevice::LogicToLogic(nWidthVal,MapUnit::Map100thMM, m_ePoolUnit );
nHeightVal = OutputDevice::LogicToLogic(nHeightVal,MapUnit::Map100thMM, m_ePoolUnit);
m_aSymbolSize = Size(nWidthVal,nHeightVal);
@@ -1617,11 +1617,11 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, weld::MetricSpinButton&, rField, void)
if (bWidth)
{
- long nDelta = nWidthVal - m_aSymbolLastSize.Width();
+ tools::Long nDelta = nWidthVal - m_aSymbolLastSize.Width();
m_aSymbolSize.setWidth( nWidthVal );
if (bRatio)
{
- m_aSymbolSize.setHeight( m_aSymbolLastSize.Height() + static_cast<long>(static_cast<double>(nDelta) / fSizeRatio) );
+ m_aSymbolSize.setHeight( m_aSymbolLastSize.Height() + static_cast<tools::Long>(static_cast<double>(nDelta) / fSizeRatio) );
m_aSymbolSize.setHeight( OutputDevice::LogicToLogic( m_aSymbolSize.Height(), m_ePoolUnit, MapUnit::Map100thMM ) );
//TODO m_xSymbolHeightMF->SetUserValue(m_xSymbolHeightMF->normalize(m_aSymbolSize.Height()), FieldUnit::MM_100TH);
m_xSymbolHeightMF->set_value(m_xSymbolHeightMF->normalize(m_aSymbolSize.Height()), FieldUnit::MM_100TH);
@@ -1629,11 +1629,11 @@ IMPL_LINK( SvxLineTabPage, SizeHdl_Impl, weld::MetricSpinButton&, rField, void)
}
else
{
- long nDelta = nHeightVal - m_aSymbolLastSize.Height();
+ tools::Long nDelta = nHeightVal - m_aSymbolLastSize.Height();
m_aSymbolSize.setHeight( nHeightVal );
if (bRatio)
{
- m_aSymbolSize.setWidth( m_aSymbolLastSize.Width() + static_cast<long>(static_cast<double>(nDelta) * fSizeRatio) );
+ m_aSymbolSize.setWidth( m_aSymbolLastSize.Width() + static_cast<tools::Long>(static_cast<double>(nDelta) * fSizeRatio) );
m_aSymbolSize.setWidth( OutputDevice::LogicToLogic( m_aSymbolSize.Width(), m_ePoolUnit, MapUnit::Map100thMM ) );
//TODO m_xSymbolWidthMF->SetUserValue(m_xSymbolWidthMF->normalize(m_aSymbolSize.Width()), FieldUnit::MM_100TH);
m_xSymbolWidthMF->set_value(m_xSymbolWidthMF->normalize(m_aSymbolSize.Width()), FieldUnit::MM_100TH);
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 2cef64e0e22e..2af5b2558421 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -377,7 +377,7 @@ void SvxLineDefTabPage::ChangeMetricHdl_Impl(const weld::ToggleButton* p)
{
if( !m_xCbxSynchronize->get_active() && m_xMtrLength1->get_unit() != eFUnit )
{
- long nTmp1, nTmp2, nTmp3;
+ tools::Long nTmp1, nTmp2, nTmp3;
// was changed with Control
if( p )
@@ -412,7 +412,7 @@ void SvxLineDefTabPage::ChangeMetricHdl_Impl(const weld::ToggleButton* p)
}
else if( m_xCbxSynchronize->get_active() && m_xMtrLength1->get_unit() != FieldUnit::PERCENT )
{
- long nTmp1, nTmp2, nTmp3;
+ tools::Long nTmp1, nTmp2, nTmp3;
// was changed with Control
if( p )
@@ -491,8 +491,8 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl, weld::Button&, void)
OUString aDesc(CuiResId(RID_SVXSTR_DESC_LINESTYLE));
OUString aName;
- long nCount = pDashList->Count();
- long j = 1;
+ tools::Long nCount = pDashList->Count();
+ tools::Long j = 1;
bool bDifferent = false;
while ( !bDifferent )
@@ -500,7 +500,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl, weld::Button&, void)
aName = aNewName + " " + OUString::number( j++ );
bDifferent = true;
- for ( long i = 0; i < nCount && bDifferent; i++ )
+ for ( tools::Long i = 0; i < nCount && bDifferent; i++ )
if ( aName == pDashList->GetDash( i )->GetName() )
bDifferent = false;
}
@@ -514,7 +514,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl, weld::Button&, void)
pDlg->GetName( aName );
bDifferent = true;
- for( long i = 0; i < nCount && bDifferent; i++ )
+ for( tools::Long i = 0; i < nCount && bDifferent; i++ )
{
if( aName == pDashList->GetDash( i )->GetName() )
bDifferent = false;
@@ -525,7 +525,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickAddHdl_Impl, weld::Button&, void)
bLoop = false;
FillDash_Impl();
- long nDashCount = pDashList->Count();
+ tools::Long nDashCount = pDashList->Count();
pDashList->Insert( std::make_unique<XDashEntry>(aDash, aName), nDashCount );
m_xLbLineStyles->Append( *pDashList->GetDash(nDashCount), pDashList->GetUiBitmap(nDashCount) );
@@ -575,7 +575,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl, weld::Button&, void)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc));
- long nCount = pDashList->Count();
+ tools::Long nCount = pDashList->Count();
bool bLoop = true;
while ( bLoop && pDlg->Execute() == RET_OK )
@@ -583,7 +583,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickModifyHdl_Impl, weld::Button&, void)
pDlg->GetName( aName );
bool bDifferent = true;
- for( long i = 0; i < nCount && bDifferent; i++ )
+ for( tools::Long i = 0; i < nCount && bDifferent; i++ )
{
if( aName == pDashList->GetDash( i )->GetName() &&
aName != aOldName )
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index a9db979bcda5..e51119dcdefc 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -271,11 +271,11 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl, weld::Button&, void)
OUString aDesc(CuiResId(RID_SVXSTR_DESC_LINEEND));
OUString aName(m_xEdtName->get_text());
- long nCount = pLineEndList->Count();
+ tools::Long nCount = pLineEndList->Count();
bool bDifferent = true;
// check whether the name is existing already
- for ( long i = 0; i < nCount && bDifferent; i++ )
+ for ( tools::Long i = 0; i < nCount && bDifferent; i++ )
if ( aName == pLineEndList->GetLineEnd( i )->GetName() )
bDifferent = false;
@@ -295,7 +295,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickModifyHdl_Impl, weld::Button&, void)
pDlg->GetName( aName );
bDifferent = true;
- for( long i = 0; i < nCount && bDifferent; i++ )
+ for( tools::Long i = 0; i < nCount && bDifferent; i++ )
{
if( aName == pLineEndList->GetLineEnd( i )->GetName() )
bDifferent = false;
@@ -375,8 +375,8 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl, weld::Button&, void)
OUString aDesc(CuiResId(RID_SVXSTR_DESC_LINEEND));
OUString aName;
- long nCount = pLineEndList->Count();
- long j = 1;
+ tools::Long nCount = pLineEndList->Count();
+ tools::Long j = 1;
bool bDifferent = false;
while ( !bDifferent )
@@ -384,7 +384,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl, weld::Button&, void)
aName = aNewName + " " + OUString::number( j++ );
bDifferent = true;
- for( long i = 0; i < nCount && bDifferent; i++ )
+ for( tools::Long i = 0; i < nCount && bDifferent; i++ )
if ( aName == pLineEndList->GetLineEnd( i )->GetName() )
bDifferent = false;
}
@@ -398,7 +398,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickAddHdl_Impl, weld::Button&, void)
pDlg->GetName( aName );
bDifferent = true;
- for( long i = 0; i < nCount && bDifferent; i++ )
+ for( tools::Long i = 0; i < nCount && bDifferent; i++ )
{
if( aName == pLineEndList->GetLineEnd( i )->GetName() )
bDifferent = false;
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index 553430b5b38a..422d70da1814 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -322,8 +322,8 @@ IMPL_LINK_NOARG(SvxPatternTabPage, ClickAddHdl_Impl, weld::Button&, void)
OUString aDesc( CuiResId( RID_SVXSTR_DESC_NEW_PATTERN ) );
OUString aName;
- long nCount = m_pPatternList->Count();
- long j = 1;
+ tools::Long nCount = m_pPatternList->Count();
+ tools::Long j = 1;
bool bValidPatternName = false;
while( !bValidPatternName )
@@ -536,11 +536,11 @@ void SvxPatternTabPage::PointChanged(weld::DrawingArea* pDrawingArea, RectPoint)
sal_Int32 SvxPatternTabPage::SearchPatternList(const OUString& rPatternName)
{
- long nCount = m_pPatternList->Count();
+ tools::Long nCount = m_pPatternList->Count();
bool bValidPatternName = true;
sal_Int32 nPos = -1;
- for(long i = 0;i < nCount && bValidPatternName;i++)
+ for(tools::Long i = 0;i < nCount && bValidPatternName;i++)
{
if(rPatternName == m_pPatternList->GetBitmap( i )->GetName())
{
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 77c3b7e7e8d2..42b17b553cc2 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -451,7 +451,7 @@ bool SvxSlantTabPage::FillItemSet(SfxItemSet* rAttrs)
if (m_xMtrRadius->get_value_changed_from_saved())
{
Fraction aUIScale = pView->GetModel()->GetUIScale();
- long nTmp = long(GetCoreValue(*m_xMtrRadius, ePoolUnit) * aUIScale);
+ tools::Long nTmp = tools::Long(GetCoreValue(*m_xMtrRadius, ePoolUnit) * aUIScale);
rAttrs->Put( makeSdrEckenradiusItem( nTmp ) );
bModified = true;
@@ -953,15 +953,15 @@ bool SvxPositionSizeTabPage::FillItemSet( SfxItemSet* rOutAttrs )
// get Width
double nWidth = static_cast<double>(m_xMtrWidth->get_value(FieldUnit::MM_100TH));
- long lWidth = long(nWidth * static_cast<double>(aUIScale));
+ tools::Long lWidth = tools::Long(nWidth * static_cast<double>(aUIScale));
lWidth = OutputDevice::LogicToLogic( lWidth, MapUnit::Map100thMM, mePoolUnit );
- lWidth = static_cast<long>(m_xMtrWidth->denormalize( lWidth ));
+ lWidth = static_cast<tools::Long>(m_xMtrWidth->denormalize( lWidth ));
// get Height
double nHeight = static_cast<double>(m_xMtrHeight->get_value(FieldUnit::MM_100TH));
- long lHeight = long(nHeight * static_cast<double>(aUIScale));
+ tools::Long lHeight = tools::Long(nHeight * static_cast<double>(aUIScale));
lHeight = OutputDevice::LogicToLogic( lHeight, MapUnit::Map100thMM, mePoolUnit );
- lHeight = static_cast<long>(m_xMtrHeight->denormalize( lHeight ));
+ lHeight = static_cast<tools::Long>(m_xMtrHeight->denormalize( lHeight ));
// put Width & Height to itemset
rOutAttrs->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), static_cast<sal_uInt32>(lWidth) ) );