summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
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/dialogs
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/dialogs')
-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
11 files changed, 52 insertions, 52 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();
}