Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
189d21f1
Kaydet (Commit)
189d21f1
authored
May 08, 2012
tarafından
Takeshi Abe
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Keep ImplMulDiv() DRY
this follows
b07d7d34
Change-Id: I41001cec7b8024c9c957481b31ab6bf3badf0abe
üst
6a64e5bb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
20 deletions
+25
-20
scrbar.cxx
vcl/source/control/scrbar.cxx
+1
-10
slider.cxx
vcl/source/control/slider.cxx
+1
-10
thumbpos.hxx
vcl/source/control/thumbpos.hxx
+23
-0
No files found.
vcl/source/control/scrbar.cxx
Dosyayı görüntüle @
189d21f1
...
...
@@ -58,16 +58,7 @@ using ::rtl::OUString;
only small deviations feasible.
*/
// =======================================================================
static
long
ImplMulDiv
(
long
nNumber
,
long
nNumerator
,
long
nDenominator
)
{
if
(
!
nDenominator
)
return
0
;
double
n
=
((
double
)
nNumber
*
(
double
)
nNumerator
)
/
(
double
)
nDenominator
;
return
(
long
)
n
;
}
#include "thumbpos.hxx"
// =======================================================================
...
...
vcl/source/control/slider.cxx
Dosyayı görüntüle @
189d21f1
...
...
@@ -31,16 +31,7 @@
#include <vcl/event.hxx>
#include <vcl/decoview.hxx>
#include <vcl/slider.hxx>
// =======================================================================
static
long
ImplMulDiv
(
long
nNumber
,
long
nNumerator
,
long
nDenominator
)
{
double
n
=
((
double
)
nNumber
*
(
double
)
nNumerator
)
/
(
double
)
nDenominator
;
return
(
long
)
n
;
}
#include "thumbpos.hxx"
// =======================================================================
...
...
vcl/source/control/thumbpos.hxx
0 → 100644
Dosyayı görüntüle @
189d21f1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Copyright 2012 LibreOffice contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef _VCL_THUMBPOS_HXX
#define _VCL_THUMBPOS_HXX
inline
long
ImplMulDiv
(
long
nNumber
,
long
nNumerator
,
long
nDenominator
)
{
if
(
!
nDenominator
)
return
0
;
double
n
=
((
double
)
nNumber
*
(
double
)
nNumerator
)
/
(
double
)
nDenominator
;
return
(
long
)
n
;
}
#endif // _VCL_THUMBPOS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment