diff options
author | Andrzej Hunt <andrzej@ahunt.org> | 2015-03-15 20:37:00 +0000 |
---|---|---|
committer | Andrzej Hunt <andrzej@ahunt.org> | 2015-10-20 18:18:23 +0200 |
commit | 21bb3bb07e2c3c13d52750ce58bc7cd4b7c8c700 (patch) | |
tree | 0485ded6b2dfe490f3dcd2acb435b77c974669a6 /sc/inc/units.hxx | |
parent | Implement UtUnit::convertValueTo (diff) | |
download | core-21bb3bb07e2c3c13d52750ce58bc7cd4b7c8c700.tar.gz core-21bb3bb07e2c3c13d52750ce58bc7cd4b7c8c700.zip |
Implement convertCellToHeaderUnit.
Change-Id: Ia62705ea45f116e9204375cdf5658fb06b76315f
Diffstat (limited to 'sc/inc/units.hxx')
-rw-r--r-- | sc/inc/units.hxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sc/inc/units.hxx b/sc/inc/units.hxx index ecd294631229..9837d3664c20 100644 --- a/sc/inc/units.hxx +++ b/sc/inc/units.hxx @@ -57,6 +57,25 @@ public: ScAddress& rHeaderCellAddress, OUString& rCellUnit) = 0; + /** + * Convert a cell with local unit annotation to store data in the units represented by + * its (column-level) header. + * + * This method should only be used with the data provided by isCellConversionRecommended. + * It will remove the cell's local unit annotation, and not add any of it's own annotation. + * You should use the (yet to be implemented) convertCells() method for more generic + * unit conversion. + * + * Returns true for successful conversion, false if an error occured (e.g. if the data + * has been modified in the meantime, i.e. that the units no longer correspond + * to the expected annotation or header). + */ + virtual bool convertCellToHeaderUnit(const ScAddress& rCellAddress, + ScDocument* pDoc, + const OUString& rsNewUnit, + const OUString& rsOldUnit) = 0; + + virtual ~Units() {} }; |