diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2016-11-18 12:36:21 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-11-23 15:57:40 +0000 |
commit | 342fc09784f01c1068d00a28af0ba196692e856b (patch) | |
tree | 83fc0c7370c49b5f6fb666ba25352a215f35dc75 /sc/inc | |
parent | 62e7c29476dc1f3f8d7c784209d3aa4f362dd116 (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>
(cherry picked from commit 71862564df1422f84340e421bbef9060c4e41a71)
Reviewed-on: https://gerrit.libreoffice.org/31112
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'sc/inc')
-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; |