summaryrefslogtreecommitdiff
path: root/svx/source/dialog/rubydialog.cxx
diff options
context:
space:
mode:
authorLiu Hao <ianahao331@gmail.com>2022-08-15 00:11:55 +0800
committerMike Kaganski <mike.kaganski@collabora.com>2022-08-23 10:45:41 +0200
commit3f284b6f12e3eb047398998b223663b38a9bfec8 (patch)
tree2ab2974b217af76f37a38fdf34f7e5703d974f09 /svx/source/dialog/rubydialog.cxx
parent27892a5e12dada80226f778ab2bd14b1bdaab58a (diff)
tdf#148251 Use std::swap instead of using temporary values
Change-Id: Ibbc46bfb17d4d27dc40e63c65190b3f3a5f2d9c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138256 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'svx/source/dialog/rubydialog.cxx')
-rw-r--r--svx/source/dialog/rubydialog.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 135090c87211..3abd7e9b3517 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -741,11 +741,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
sal_Int16 nRubyPos = m_pParentDlg->m_xPositionLB->get_active();
if (nRubyPos == 1) // BOTTOM
- {
- tools::Long nTmp = nYRuby;
- nYRuby = nYBase;
- nYBase = nTmp;
- }
+ std::swap(nYRuby, nYBase);
else if (nRubyPos == 2) // RIGHT ( vertically )
{
// Align the ruby text and base text to the vertical center.