diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2016-11-18 12:36:21 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-11-23 12:39:42 +0000 |
commit | 71862564df1422f84340e421bbef9060c4e41a71 (patch) | |
tree | 401fafe5c093a2ab75b2fba1e3ab893e45d8bb15 /sc/inc/address.hxx | |
parent | 14fc834aebdf4de9276a93e9f595b150a86ee16f (diff) |
OOXML: Write dimension range in full address notation
In every sheet.xml there is information about dimensions, like:
<dimension ref="A1:AMJ177"/>. During export by LibreOffice to .xlsx,
when row or column has maximum value, the dimension was
truncated. For example given "A1:AMJ177" it's saves <dimension ref="1:177"/>.
It was caused problems with Office 2007 import.
This patch is fixing that by always using full address notation
for dimension range, and allow open documents exported by LO
properly by MS Office.
Change-Id: Idda1455d1f9db08ade0871110fe40be2667c176c
Reviewed-on: https://gerrit.libreoffice.org/30960
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/inc/address.hxx')
-rw-r--r-- | sc/inc/address.hxx | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index 63d8371d4c08..d801d0593752 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -542,8 +542,30 @@ public: const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = nullptr, const OUString* pErrRef = nullptr ); - SC_DLLPUBLIC OUString Format(ScRefFlags nFlags = ScRefFlags::ZERO, const ScDocument* pDocument = nullptr, - const ScAddress::Details& rDetails = ScAddress::detailsOOOa1) const; + /** Returns string with formatted cell range from aStart to aEnd, + according to provided address convention. + @param nFlags + Cell reference flags + @param pDocument + Pointer to document which is used for example to get tab names. + @param rDetails + Provide information about required address convention. + Supported address conventions are: + CONV_OOO 'doc'#sheet.A1:sheet2.B2 + CONV_XL_A1, [doc]sheet:sheet2!A1:B2 + CONV_XL_OOX, [#]sheet:sheet2!A1:B2 + CONV_XL_R1C1, [doc]sheet:sheet2!R1C1:R2C2 + @param bFullAddressNotation + If TRUE, the full address notation will be used. + For example in case all columns are used, "A1:AMJ177" is full address notation + and "1:177" is shortened address notation. + @returns + String contains formatted cell range in address convention + */ + SC_DLLPUBLIC OUString Format( ScRefFlags nFlags = ScRefFlags::ZERO, + const ScDocument* pDocument = nullptr, + const ScAddress::Details& rDetails = ScAddress::detailsOOOa1, + bool bFullAddressNotation = false ) const; inline void GetVars( SCCOL& nCol1, SCROW& nRow1, SCTAB& nTab1, SCCOL& nCol2, SCROW& nRow2, SCTAB& nTab2 ) const; |