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
bbc1fc16
Kaydet (Commit)
bbc1fc16
authored
Nis 21, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: prefix members of SwValueFieldType/SwValueField/SwFormulaField
Change-Id: Ibadb4fb3a56c271bb045790ea0544bfa35b327b6
üst
824229a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
28 deletions
+31
-28
fldbas.hxx
sw/inc/fldbas.hxx
+11
-8
fldbas.cxx
sw/source/core/fields/fldbas.cxx
+20
-20
No files found.
sw/inc/fldbas.hxx
Dosyayı görüntüle @
bbc1fc16
...
...
@@ -381,19 +381,20 @@ inline sal_uInt16 SwField::GetLanguage() const
/// Fields containing values that have to be formatted via number formatter.
class
SwValueFieldType
:
public
SwFieldType
{
SwDoc
*
pDoc
;
bool
bUseFormat
;
///< Use number formatter.
private
:
SwDoc
*
m_pDoc
;
bool
m_bUseFormat
;
///< Use number formatter.
protected
:
SwValueFieldType
(
SwDoc
*
pDocPtr
,
sal_uInt16
nWhichId
);
SwValueFieldType
(
const
SwValueFieldType
&
rTyp
);
public
:
inline
SwDoc
*
GetDoc
()
const
{
return
pDoc
;
}
inline
void
SetDoc
(
SwDoc
*
pNewDoc
)
{
pDoc
=
pNewDoc
;
}
inline
SwDoc
*
GetDoc
()
const
{
return
m_
pDoc
;
}
inline
void
SetDoc
(
SwDoc
*
pNewDoc
)
{
m_
pDoc
=
pNewDoc
;
}
inline
bool
UseFormat
()
const
{
return
bUseFormat
;
}
inline
void
EnableFormat
(
bool
bFormat
=
true
)
{
bUseFormat
=
bFormat
;
}
inline
bool
UseFormat
()
const
{
return
m_
bUseFormat
;
}
inline
void
EnableFormat
(
bool
bFormat
=
true
)
{
m_
bUseFormat
=
bFormat
;
}
OUString
ExpandValue
(
const
double
&
rVal
,
sal_uInt32
nFmt
,
sal_uInt16
nLng
=
0
)
const
;
OUString
DoubleToString
(
const
double
&
rVal
,
LanguageType
eLng
)
const
;
...
...
@@ -402,7 +403,8 @@ public:
class
SW_DLLPUBLIC
SwValueField
:
public
SwField
{
double
fValue
;
private
:
double
m_fValue
;
protected
:
SwValueField
(
SwValueFieldType
*
pFldType
,
sal_uInt32
nFmt
=
0
,
sal_uInt16
nLang
=
LANGUAGE_SYSTEM
,
const
double
fVal
=
0.0
);
...
...
@@ -427,7 +429,8 @@ public:
class
SW_DLLPUBLIC
SwFormulaField
:
public
SwValueField
{
OUString
sFormula
;
private
:
OUString
m_sFormula
;
protected
:
SwFormulaField
(
SwValueFieldType
*
pFldType
,
sal_uInt32
nFmt
=
0
,
const
double
fVal
=
0.0
);
...
...
sw/source/core/fields/fldbas.cxx
Dosyayı görüntüle @
bbc1fc16
...
...
@@ -466,17 +466,17 @@ OUString FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat)
return
aNumber
.
GetNumStr
(
nNum
);
}
SwValueFieldType
::
SwValueFieldType
(
SwDoc
*
pDocPtr
,
sal_uInt16
nWhichId
)
:
SwFieldType
(
nWhichId
)
,
pDoc
(
pDocPtr
),
bUseFormat
(
true
)
SwValueFieldType
::
SwValueFieldType
(
SwDoc
*
const
pDoc
,
sal_uInt16
const
nWhichId
)
:
SwFieldType
(
nWhichId
)
,
m_pDoc
(
pDoc
)
,
m_
bUseFormat
(
true
)
{
}
SwValueFieldType
::
SwValueFieldType
(
const
SwValueFieldType
&
rTyp
)
:
SwFieldType
(
rTyp
.
Which
())
,
pDoc
(
rTyp
.
GetDoc
()),
bUseFormat
(
rTyp
.
UseFormat
())
:
SwFieldType
(
rTyp
.
Which
())
,
m_pDoc
(
rTyp
.
GetDoc
())
,
m_
bUseFormat
(
rTyp
.
UseFormat
())
{
}
...
...
@@ -488,7 +488,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
return
SwViewShell
::
GetShellRes
()
->
aCalc_Error
;
OUString
sExpand
;
SvNumberFormatter
*
pFormatter
=
pDoc
->
GetNumberFormatter
();
SvNumberFormatter
*
pFormatter
=
m_
pDoc
->
GetNumberFormatter
();
Color
*
pCol
=
0
;
// Bug #60010
...
...
@@ -535,7 +535,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
OUString
SwValueFieldType
::
DoubleToString
(
const
double
&
rVal
,
sal_uInt32
nFmt
)
const
{
SvNumberFormatter
*
pFormatter
=
pDoc
->
GetNumberFormatter
();
SvNumberFormatter
*
pFormatter
=
m_
pDoc
->
GetNumberFormatter
();
const
SvNumberformat
*
pEntry
=
pFormatter
->
GetEntry
(
nFmt
);
if
(
!
pEntry
)
...
...
@@ -547,7 +547,7 @@ OUString SwValueFieldType::DoubleToString(const double &rVal,
OUString
SwValueFieldType
::
DoubleToString
(
const
double
&
rVal
,
sal_uInt16
nLng
)
const
{
SvNumberFormatter
*
pFormatter
=
pDoc
->
GetNumberFormatter
();
SvNumberFormatter
*
pFormatter
=
m_
pDoc
->
GetNumberFormatter
();
// Bug #60010
if
(
nLng
==
LANGUAGE_NONE
)
...
...
@@ -560,14 +560,14 @@ OUString SwValueFieldType::DoubleToString( const double &rVal,
SwValueField
::
SwValueField
(
SwValueFieldType
*
pFldType
,
sal_uInt32
nFmt
,
sal_uInt16
nLng
,
const
double
fVal
)
:
SwField
(
pFldType
,
nFmt
,
nLng
)
,
fValue
(
fVal
)
:
SwField
(
pFldType
,
nFmt
,
nLng
)
,
m_
fValue
(
fVal
)
{
}
SwValueField
::
SwValueField
(
const
SwValueField
&
rFld
)
:
SwField
(
rFld
)
,
fValue
(
rFld
.
GetValue
())
:
SwField
(
rFld
)
,
m_
fValue
(
rFld
.
GetValue
())
{
}
...
...
@@ -675,12 +675,12 @@ void SwValueField::SetLanguage( sal_uInt16 nLng )
double
SwValueField
::
GetValue
()
const
{
return
fValue
;
return
m_
fValue
;
}
void
SwValueField
::
SetValue
(
const
double
&
rVal
)
{
fValue
=
rVal
;
m_
fValue
=
rVal
;
}
SwFormulaField
::
SwFormulaField
(
SwValueFieldType
*
pFldType
,
sal_uInt32
nFmt
,
const
double
fVal
)
...
...
@@ -696,12 +696,12 @@ SwFormulaField::SwFormulaField( const SwFormulaField& rFld )
OUString
SwFormulaField
::
GetFormula
()
const
{
return
sFormula
;
return
m_
sFormula
;
}
void
SwFormulaField
::
SetFormula
(
const
OUString
&
rStr
)
{
sFormula
=
rStr
;
m_
sFormula
=
rStr
;
sal_uLong
nFmt
(
GetFormat
());
...
...
@@ -728,11 +728,11 @@ void SwFormulaField::SetExpandedFormula( const OUString& rStr )
{
SwValueField
::
SetValue
(
fTmpValue
);
sFormula
=
static_cast
<
SwValueFieldType
*>
(
GetTyp
())
->
DoubleToString
(
fTmpValue
,
nFmt
);
m_
sFormula
=
static_cast
<
SwValueFieldType
*>
(
GetTyp
())
->
DoubleToString
(
fTmpValue
,
nFmt
);
return
;
}
}
sFormula
=
rStr
;
m_
sFormula
=
rStr
;
}
OUString
SwFormulaField
::
GetExpandedFormula
()
const
...
...
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