jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c | 4 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 4 rsc/source/rscpp/cpp1.c | 3 rsc/source/rscpp/cpp2.c | 1 rsc/source/rscpp/cpp4.c | 3 rsc/source/rscpp/cpp5.c | 1 rsc/source/rscpp/cpp6.c | 2 sal/osl/unx/file_volume.cxx | 9 + sal/rtl/alloc_arena.cxx | 7 + sc/qa/unit/subsequent_export-test.cxx | 59 ++++------ sc/qa/unit/subsequent_filters-test.cxx | 28 ++++ sc/source/filter/xml/xmlimprt.cxx | 21 +++ sfx2/source/doc/new.cxx | 2 sfx2/source/doc/objcont.cxx | 2 stoc/source/security/permissions.cxx | 2 vcl/unx/generic/app/saldisp.cxx | 2 16 files changed, 107 insertions(+), 43 deletions(-)
New commits: commit cf0434852ea379754affb04d302757c7b16ab90c Author: Thorsten Behrens <thorsten.behr...@cib.de> AuthorDate: Tue Dec 11 01:53:36 2018 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Tue Dec 11 01:53:36 2018 +0100 -Werror=deprecated-declarations (GCC 7) Change-Id: I99d3250c30c6279cbeedfa2d0a91a9f41031892b diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 8a3099ebd8ad..eb6b9e0d236d 100644 --- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx @@ -29,6 +29,10 @@ #define g_info(...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, __VA_ARGS__) #endif +#if defined __GNUC__ && __GNUC__ >= 7 +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + static int help() { fprintf(stderr, "Usage: gtktiledviewer <absolute-path-to-libreoffice-install's-program-directory> <path-to-document> [<options> ... ]\n\n"); commit af4c3d361a091f9608f31f0b2c1c266ad0641f89 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Jan 27 15:46:47 2017 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Tue Dec 11 01:51:44 2018 +0100 -Werror=int-in-bool-context (GCC 7) Change-Id: I69f31a94f3e57b3488c576f8d8e0569f459a2117 diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 673c9f01a0f2..7585db5e7c96 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -73,7 +73,7 @@ void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, const Rect rRenderContext.DrawRect(Rectangle(Point(0,0), rRenderContext.GetOutputSize())); Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1, 1); - DBG_ASSERT(aTmpSize.Height() * aTmpSize.Width(), "size of first page is 0, override GetFirstPageSize or set vis-area!"); + DBG_ASSERT(aTmpSize.Height() != 0 && aTmpSize.Width() != 0, "size of first page is 0, override GetFirstPageSize or set vis-area!"); #define FRAME 4 diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 7219e3fbefd8..a8ff890844c2 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -151,7 +151,7 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( bool bFullContent ) const } xFile->SetPrefSize( aTmpSize ); - DBG_ASSERT( aTmpSize.Height()*aTmpSize.Width(), + DBG_ASSERT( aTmpSize.Height() != 0 && aTmpSize.Width() != 0, "size of first page is 0, override GetFirstPageSize or set vis-area!" ); xFile->Record( pDevice ); commit 2d354c31b22175ac4d56551d4c123ab45208b4ab Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed May 3 10:12:45 2017 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Tue Dec 11 01:48:21 2018 +0100 Work around GCC 7 mis-feature <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80354> "Poor support to silence -Wformat-truncation=1" Change-Id: I486f8a3a12896df3d9506f53bca44a318e23c991 diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx index 654cd2f1dbfa..b18a55fc1a97 100644 --- a/sal/rtl/alloc_arena.cxx +++ b/sal/rtl/alloc_arena.cxx @@ -669,6 +669,10 @@ rtl_arena_destructor (void * obj) /** rtl_arena_activate() */ +#if defined __GNUC__ && __GNUC__ >= 7 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-truncation" +#endif rtl_arena_type * rtl_arena_activate ( rtl_arena_type * arena, @@ -716,6 +720,9 @@ rtl_arena_activate ( { size = i * arena->m_quantum; (void) snprintf (namebuf, sizeof(namebuf), "%s_%" SAL_PRIuUINTPTR, arena->m_name, size); +#if defined __GNUC__ && __GNUC__ >= 7 +#pragma GCC diagnostic pop +#endif arena->m_qcache_ptr[i - 1] = rtl_cache_create(namebuf, size, 0, nullptr, nullptr, nullptr, nullptr, arena, RTL_CACHE_FLAG_QUANTUMCACHE); } } commit bbf06929e3d579e22644e8edf292ef7452b8c24e Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Feb 23 12:10:08 2017 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Tue Dec 11 01:45:57 2018 +0100 -Werror=format-truncation Change-Id: I1b27289724389018bd4048573e8c8e4cf28eb983 diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index 28ce4a9762a4..722b18dd564e 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <cassert> + #include "osl/file.h" #include "osl/diagnose.h" @@ -353,7 +357,7 @@ static rtl_uString* oslMakeUStrFromPsz(const sal_Char* pszStr, rtl_uString** ust oslFileError osl_getVolumeDeviceMountPath( oslVolumeDeviceHandle Handle, rtl_uString **pstrPath ) { oslVolumeDeviceHandleImpl* pItem = static_cast<oslVolumeDeviceHandleImpl*>(Handle); - sal_Char Buffer[PATH_MAX]; + sal_Char Buffer[RTL_CONSTASCII_LENGTH("file://") + PATH_MAX]; Buffer[0] = '\0'; @@ -367,7 +371,8 @@ oslFileError osl_getVolumeDeviceMountPath( oslVolumeDeviceHandle Handle, rtl_uSt return osl_File_E_INVAL; } - snprintf(Buffer, sizeof(Buffer), "file://%s", pItem->pszMountPoint); + int n = snprintf(Buffer, sizeof(Buffer), "file://%s", pItem->pszMountPoint); + assert(n >= 0 && unsigned(n) < sizeof(Buffer)); (void) n; #ifdef DEBUG_OSL_FILE fprintf(stderr,"Mount Point is: '%s'\n",Buffer); commit a35f83ffbc434b991ae5e055f6be21b4f1ec2422 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Jan 27 16:23:52 2017 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Mon Dec 10 00:15:36 2018 +0100 -Werror=int-in-bool-context (GCC 7) Change-Id: Ide131a586d0d282993dfbf53a783f02d48860647 diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index c88763fc6b32..4e0788e3adbf 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -2253,7 +2253,7 @@ void SalDisplay::PrintInfo() const SAL_INFO( "vcl", "\tshift ctrl alt \t" << KeyStr( nShiftKeySym_ ) << " (0x" << std::hex << sal::static_int_cast< unsigned int >(nShiftKeySym_) << ") " << KeyStr( nCtrlKeySym_ ) << " (0x" << sal::static_int_cast< unsigned int >(nCtrlKeySym_) << ") " << KeyStr( nMod1KeySym_ ) << " (0x" << sal::static_int_cast< unsigned int >(nMod1KeySym_) << ")"); - if( XExtendedMaxRequestSize(pDisp_) * 4 ) + if( XExtendedMaxRequestSize(pDisp_) != 0 ) SAL_INFO( "vcl", "\tXMaxRequestSize \t" << XMaxRequestSize(pDisp_) * 4 << " " << XExtendedMaxRequestSize(pDisp_) * 4 << " [bytes]"); SAL_INFO( "vcl", "\tWMName \t" << getWMAdaptor()->getWindowManagerName() ); } commit 11eed628095615fd7f78f48685bdd312eec9ada8 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Jan 26 14:07:11 2017 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Mon Dec 10 00:11:37 2018 +0100 -Werror=implicit-fallthrough= (GCC 7) Change-Id: I703a5f19536b08a87f2282a278218d0fcecfb515 diff --git a/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c b/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c index b187bd9bb61d..5024274cb521 100644 --- a/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c +++ b/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c @@ -223,10 +223,13 @@ JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_createJNI case CREATED: osl_closePipe(npipe); osl_releasePipe(npipe); + /* fall through */ case GOTNAME: rtl_uString_release(pname); + /* fall through */ case INMONITOR: (*env)->MonitorExit(env, obj_this); + /* fall through */ case START: osl_freeSecurityHandle(psec); default: @@ -530,6 +533,7 @@ JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_writeJNI { case GOTBUFFER: (*env)->ReleaseByteArrayElements(env, buffer, nbuff, JNI_ABORT); + /* fall through */ case INMONITOR: (*env)->MonitorExit(env, obj_this); case START: commit 6727f30ec7f8c524d6f925342c451d5c9809d954 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Jan 26 15:09:31 2017 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Mon Dec 10 00:01:07 2018 +0100 -Werror=int-in-bool-context (GCC 7) Change-Id: Id97c3ec66c9c0f924951c44efa9f7dd95b184223 diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index d5f033c95ab3..4c64aa51ce9b 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -92,7 +92,7 @@ static inline OUString makeStrings( if (0x80000000 & mask) { buf.appendAscii( *strings ); - if (mask << 1) // more items following + if ((mask << 1) != 0) // more items following buf.append( ',' ); } mask = (mask << 1); commit 231896a0d1fed696c138239a246a73f7e835fd56 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Jan 27 11:36:23 2017 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Sun Dec 9 23:59:12 2018 +0100 -Werror=implicit-fallthrough= (GCC 7) Change-Id: I9d6c7e5a03aea56d8db84c2ba06c63efb0e007fa diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c index f277b6b05695..f5276f050178 100644 --- a/rsc/source/rscpp/cpp1.c +++ b/rsc/source/rscpp/cpp1.c @@ -278,6 +278,7 @@ int MAIN(int argc, char** argv) } } /* Continue by opening output */ } + /* fall through */ #endif case 3: /* @@ -293,6 +294,7 @@ int MAIN(int argc, char** argv) exit(IO_ERROR); } } /* Continue by opening input */ + /* fall through */ case 2: /* One file -> stdin */ /* * Open input file, "-" means use stdin. @@ -309,6 +311,7 @@ int MAIN(int argc, char** argv) strncpy(work, useargv[1], NWORK); /* Remember input filename */ break; } /* Else, just get stdin */ + /* fall through */ case 0: /* No args? */ case 1: /* No files, stdin -> stdout */ work[0] = EOS; /* Unix can't find stdin name */ diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index 833e687cd186..a815ebf1ce3d 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -115,6 +115,7 @@ int control(int counter) if (++ifptr >= &ifstack[BLK_NEST]) goto if_nest_err; *ifptr = 0; /* !WAS_COMPILING */ + /* fall through */ case L_line: /* Many */ /* * Are pragma's always processed? diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index 6071076bce5a..1c74f8a56799 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -186,7 +186,7 @@ void dodefine() break; /* spaces */ else if (c == '\t') c = ' '; /* Normalize tabs */ - /* Fall through to store character */ + /* fall through *//* to store character */ default: /* Other character */ save(c); break; @@ -457,6 +457,7 @@ void expand(DEFBUF* tokenp) dumpparm("expand"); #endif } /* Collect arguments */ + /* fall through */ case DEF_NOARGS: /* No parameters just stuffs */ expstuff(tokenp); /* Do actual parameters */ } /* nargs switch */ diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index 950830fce4a6..cdc9347167c1 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -345,6 +345,7 @@ again: opname[(int)opp->op]); return 1; } + /* fall through */ /* * Evaluate op1. */ diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c index 3678caa65378..1f6bd68a44d3 100644 --- a/rsc/source/rscpp/cpp6.c +++ b/rsc/source/rscpp/cpp6.c @@ -902,7 +902,7 @@ int get() #ifdef STRICT_COMMENTS cwarn("Nested comments", NULLST); #endif - /* Fall into * stuff */ + /* fall through *//* into * stuff */ case '*': if ((c = get()) != '/') /* If comment doesn't */ goto test; /* end, look at next */ commit 79f98d7277e8dde37a7cace116985610279b87a9 Author: Thorsten Behrens <thorsten.behr...@cib.de> AuthorDate: Thu Dec 6 12:53:30 2018 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Thu Dec 6 12:53:30 2018 +0100 Revert "Partial revert of allow row height recalculation on document load" This reverts commit 4ce677114c979764d70bffa4d0b0f87278444275. diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index a82de485c12e..3aa2d017433e 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -73,6 +73,7 @@ #include "pivotsource.hxx" #include <unonames.hxx> #include <numformat.hxx> +#include <sizedev.hxx> #include <comphelper/extract.hxx> @@ -3257,6 +3258,26 @@ void SAL_CALL ScXMLImport::endDocument() pDoc->SetStreamValid( nTab, true ); } } + + // There are rows with optimal height which need to be updated + if (!maRecalcRowRanges.empty()) + { + bool bLockHeight = !pDoc->IsAdjustHeightEnabled(); + if (bLockHeight) + { + pDoc->EnableAdjustHeight(true); + } + + ScSizeDeviceProvider aProv(static_cast<ScDocShell*>(pDoc->GetDocumentShell())); + ScDocRowHeightUpdater aUpdater(*pDoc, aProv.GetDevice(), aProv.GetPPTX(), aProv.GetPPTY(), &maRecalcRowRanges); + aUpdater.update(); + + if (bLockHeight) + { + pDoc->EnableAdjustHeight(false); + } + } + aTables.FixupOLEs(); } if (GetModel().is()) commit c9b66968505480d7fc653ce8c1bd2662e2c3a6e6 Author: Thorsten Behrens <thorsten.behr...@cib.de> AuthorDate: Thu Dec 6 12:53:17 2018 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Thu Dec 6 12:53:17 2018 +0100 Revert "Partial revert for some tdf#62268 unit tests" This reverts commit 836c2b708b3712a52116561e6916a4077edfc24c. diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index c316553f44c4..fed665be7803 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -802,60 +802,57 @@ void ScExportTest::testOutlineExportXLSX() // We expected that exactly 13 unique Nodes will be produced assertXPath(pSheet, "/x:worksheet/x:cols/x:col", 13); - // We need to save all 30 rows, as it provides information about outLineLevel - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "r", "1"); + // First row is empty and default so it is not written into XML file + // so we need to save 29 rows, as it provides information about outLineLevel + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "r", "2"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "hidden", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "outlineLevel", "0"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "outlineLevel", "1"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "collapsed", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "r", "2"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "r", "3"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "hidden", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "outlineLevel", "1"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "outlineLevel", "2"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "collapsed", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "r", "3"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "r", "4"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "hidden", "false"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "outlineLevel", "2"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "collapsed", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "r", "4"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "r", "5"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "hidden", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "outlineLevel", "2"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "outlineLevel", "3"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "collapsed", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "r", "5"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "r", "6"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "hidden", "false"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "outlineLevel", "3"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[5]", "collapsed", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "r", "6"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "hidden", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "outlineLevel", "3"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "r", "7"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "hidden", "true"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "outlineLevel", "4"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[6]", "collapsed", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "r", "7"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "r", "8"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "hidden", "true"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "outlineLevel", "4"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[7]", "collapsed", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "r", "8"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "r", "9"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "hidden", "true"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "outlineLevel", "4"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[8]", "collapsed", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[9]", "r", "9"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[9]", "hidden", "true"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[9]", "outlineLevel", "4"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[9]", "collapsed", "false"); // Next rows are the same as the previous one but it needs to bre preserved, // as they contain information about outlineLevel - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "r", "21"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "hidden", "true"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "outlineLevel", "4"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "collapsed", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "r", "22"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[20]", "r", "21"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[20]", "hidden", "true"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[20]", "outlineLevel", "4"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[20]", "collapsed", "false"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "r", "22"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "hidden", "false"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "outlineLevel", "3"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[21]", "collapsed", "true"); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "r", "23"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "hidden", "false"); assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "outlineLevel", "3"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "collapsed", "true"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[23]", "r", "23"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[23]", "hidden", "false"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[23]", "outlineLevel", "3"); - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[23]", "collapsed", "false"); - - // We expected that exactly 30 Row Nodes will be produced - assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 30); + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[22]", "collapsed", "false"); + + // We expected that exactly 29 Row Nodes will be produced + assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 29); } diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 69d7a4f43a36..436cd2381f95 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -220,6 +220,8 @@ public: void testBnc762542(); + void testTdf62268(); + CPPUNIT_TEST_SUITE(ScFiltersTest); CPPUNIT_TEST(testBooleanFormatXLSX); CPPUNIT_TEST(testBasicCellContentODS); @@ -328,6 +330,8 @@ public: CPPUNIT_TEST(testHiddenSheetsXLSX); + CPPUNIT_TEST(testTdf62268); + CPPUNIT_TEST_SUITE_END(); private: @@ -2856,8 +2860,8 @@ void ScFiltersTest::testMiscRowHeights() TestParam::RowData MultiLineOptData[] = { - // Row 0 is 12.63 mm and optimal flag is set - { 0, 0, 0, 1263, CHECK_OPTIMAL, true }, + // Row 0 is 12.63 mm, but optimal flag is set + { 0, 0, 0, 1236, CHECK_OPTIMAL, true }, // Row 1 is 11.99 mm and optimal flag is NOT set { 1, 1, 0, 1199, CHECK_OPTIMAL, false }, }; @@ -2890,8 +2894,9 @@ void ScFiltersTest::testOptimalHeightReset() rDoc.EnableAdjustHeight( true ); // open document in read/write mode ( otherwise optimal height stuff won't // be triggered ) *and* you can't delete cell contents. - int nHeight = sc::TwipsToHMM ( rDoc.GetRowHeight(nRow, nTab, false) ); - CPPUNIT_ASSERT_EQUAL(1263, nHeight); + int nHeight = rDoc.GetRowHeight(nRow, nTab, false); + // Due to some minor differences on Mac this comparison is made bit fuzzy + CPPUNIT_ASSERT( 3 > abs( nHeight - 701 ) ); ScDocFunc &rFunc = xDocSh->GetDocFunc(); @@ -3499,6 +3504,21 @@ void ScFiltersTest::testRelFormulaValidationXLS() xDocSh->DoClose(); } +void ScFiltersTest::testTdf62268() +{ + ScDocShellRef xDocSh = loadDoc("tdf62268.", FORMAT_ODS); + ScDocument& rDoc = xDocSh->GetDocument(); + int nHeight; + + SCTAB nTab = 0; + nHeight = rDoc.GetRowHeight(0, nTab, false); + CPPUNIT_ASSERT( 3 >= abs( 256 - nHeight ) ); + nHeight = rDoc.GetRowHeight(1, nTab, false); + CPPUNIT_ASSERT( 19 >= abs( 1905 - nHeight ) ); + + xDocSh->DoClose(); +} + ScFiltersTest::ScFiltersTest() : ScBootstrapFixture( "sc/qa/unit/data" ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits