diff options
author | Justin Luth <justin_luth@sil.org> | 2017-01-11 14:33:39 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2017-06-07 06:53:41 +0200 |
commit | 9d6bf9d45d43a00f6dc87b9c83d28b93450ec51d (patch) | |
tree | 0833d8e1def19688ff89abefa218aaad83f206ac /sw/inc | |
parent | d4721434d83852102ac10ab33fae26a69eb3b1c3 (diff) |
tdf#74177 writer: ignoring comment allows number recognition
The presence of an annotation anchor was causing number recognition
to fail in Writer's table cells. Formulas accessing the cell
read a value of zero.
Annotation anchors are only used in SW right now, so SVL didn't
want the overhead in their code. So this wrapper function should
be called first to cleanup SW specific things that interfere
with number recognition. Specifically known to be needed in
cellfml.cxx, but converted everywhere for consistency.
The formula in older documents is not "fixed" during document loading
since the table/formulas are not refreshed at load time.
Only documents saved with incorrect results will notice this,
and any cursor access inside the table will cause a refresh.
Printing also causes a refresh (but not print preview or PDF export).
So this patch only fixes document creation or modification, which
should be adequate for this bug.
Change-Id: Ib46f2b7899ae9a0fdc3aae5887bb2d61535d29f3
Reviewed-on: https://gerrit.libreoffice.org/32909
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/doc.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 08c590a81024..e63fb0c7dd03 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1252,6 +1252,8 @@ public: SwTableBoxFormat* MakeTableBoxFormat(); SwTableLineFormat* MakeTableLineFormat(); + // helper function: cleanup before checking number value + bool IsNumberFormat( const OUString& rString, sal_uInt32& F_Index, double& fOutNumber); // Check if box has numerical value. Change format of box if required. void ChkBoxNumFormat( SwTableBox& rAktBox, bool bCallUpdate ); void SetTableBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet ); |