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
fed82904
Kaydet (Commit)
fed82904
authored
Mar 28, 2015
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
flatten indent
Change-Id: Iaec008f2bd9c3184171c3882d694e66d6da876ee
üst
c8350654
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
30 deletions
+29
-30
unotbl.cxx
sw/source/core/unocore/unotbl.cxx
+29
-30
No files found.
sw/source/core/unocore/unotbl.cxx
Dosyayı görüntüle @
fed82904
...
@@ -750,36 +750,35 @@ double sw_getValue( SwXCell &rCell )
...
@@ -750,36 +750,35 @@ double sw_getValue( SwXCell &rCell )
/* non UNO function call to set value in SwXCell */
/* non UNO function call to set value in SwXCell */
void
sw_setValue
(
SwXCell
&
rCell
,
double
nVal
)
void
sw_setValue
(
SwXCell
&
rCell
,
double
nVal
)
{
{
if
(
rCell
.
IsValid
())
if
(
!
rCell
.
IsValid
())
{
return
;
// first this text (maybe) needs to be deleted
// first this text (maybe) needs to be deleted
sal_uLong
nNdPos
=
rCell
.
pBox
->
IsValidNumTxtNd
(
true
);
sal_uLong
nNdPos
=
rCell
.
pBox
->
IsValidNumTxtNd
(
true
);
if
(
ULONG_MAX
!=
nNdPos
)
if
(
ULONG_MAX
!=
nNdPos
)
sw_setString
(
rCell
,
OUString
(),
true
);
// true == keep number format
sw_setString
(
rCell
,
OUString
(),
true
);
// true == keep number format
SwDoc
*
pDoc
=
rCell
.
GetDoc
();
SwDoc
*
pDoc
=
rCell
.
GetDoc
();
UnoActionContext
aAction
(
pDoc
);
UnoActionContext
aAction
(
pDoc
);
SwFrmFmt
*
pBoxFmt
=
rCell
.
pBox
->
ClaimFrmFmt
();
SwFrmFmt
*
pBoxFmt
=
rCell
.
pBox
->
ClaimFrmFmt
();
SfxItemSet
aSet
(
pDoc
->
GetAttrPool
(),
RES_BOXATR_FORMAT
,
RES_BOXATR_VALUE
);
SfxItemSet
aSet
(
pDoc
->
GetAttrPool
(),
RES_BOXATR_FORMAT
,
RES_BOXATR_VALUE
);
const
SfxPoolItem
*
pItem
;
const
SfxPoolItem
*
pItem
;
//!! do we need to set a new number format? Yes, if
//!! do we need to set a new number format? Yes, if
// - there is no current number format
// - there is no current number format
// - the current number format is not a number format according to the number formatter, but rather a text format
// - the current number format is not a number format according to the number formatter, but rather a text format
// - the current number format is not even a valid number formatter number format, but rather Writer's own 'special' text number format
// - the current number format is not even a valid number formatter number format, but rather Writer's own 'special' text number format
if
(
SfxItemState
::
SET
!=
pBoxFmt
->
GetAttrSet
().
GetItemState
(
RES_BOXATR_FORMAT
,
true
,
&
pItem
)
if
(
SfxItemState
::
SET
!=
pBoxFmt
->
GetAttrSet
().
GetItemState
(
RES_BOXATR_FORMAT
,
true
,
&
pItem
)
||
pDoc
->
GetNumberFormatter
()
->
IsTextFormat
(
static_cast
<
const
SwTblBoxNumFormat
*>
(
pItem
)
->
GetValue
())
||
pDoc
->
GetNumberFormatter
()
->
IsTextFormat
(
static_cast
<
const
SwTblBoxNumFormat
*>
(
pItem
)
->
GetValue
())
||
static_cast
<
const
SwTblBoxNumFormat
*>
(
pItem
)
->
GetValue
()
==
css
::
util
::
NumberFormat
::
TEXT
)
||
static_cast
<
const
SwTblBoxNumFormat
*>
(
pItem
)
->
GetValue
()
==
css
::
util
::
NumberFormat
::
TEXT
)
{
{
aSet
.
Put
(
SwTblBoxNumFormat
(
0
));
aSet
.
Put
(
SwTblBoxNumFormat
(
0
));
}
}
SwTblBoxValue
aVal
(
nVal
);
SwTblBoxValue
aVal
(
nVal
);
aSet
.
Put
(
aVal
);
aSet
.
Put
(
aVal
);
pDoc
->
SetTblBoxFormulaAttrs
(
*
rCell
.
pBox
,
aSet
);
pDoc
->
SetTblBoxFormulaAttrs
(
*
rCell
.
pBox
,
aSet
);
// update table
// update table
SwTableFmlUpdate
aTblUpdate
(
SwTable
::
FindTable
(
rCell
.
GetFrmFmt
()
));
SwTableFmlUpdate
aTblUpdate
(
SwTable
::
FindTable
(
rCell
.
GetFrmFmt
()
));
pDoc
->
getIDocumentFieldsAccess
().
UpdateTblFlds
(
&
aTblUpdate
);
pDoc
->
getIDocumentFieldsAccess
().
UpdateTblFlds
(
&
aTblUpdate
);
}
}
}
TYPEINIT1
(
SwXCell
,
SwClient
);
TYPEINIT1
(
SwXCell
,
SwClient
);
...
...
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