external/neon/Library_neon.mk | 6 --- sc/inc/stlsheet.hxx | 6 +-- sc/qa/unit/ucalc.cxx | 55 ++++++++++++++++++++++++++++++++++++ sc/qa/unit/ucalc.hxx | 4 ++ sc/source/core/data/documen2.cxx | 6 --- vcl/source/opengl/OpenGLContext.cxx | 6 +++ 6 files changed, 67 insertions(+), 16 deletions(-)
New commits: commit 19be6cfc93eb4f7d0b4440c42f698805294fb881 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Sep 7 19:33:18 2014 +0200 prevent crash with invalid XVisual, related fdo#80448 Change-Id: Ife020e3cbfabf0b397b189c17ffec8cbcb5d1505 diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 70ac761..4f73fb0 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -492,6 +492,9 @@ bool OpenGLContext::ImplInit() int best_fbc = -1; const SystemEnvData* sysData(m_pChildWindow->GetSystemData()); GLXFBConfig* pFBC = getFBConfig(sysData, best_fbc); + if (!pFBC) + return false; + int nContextAttribs[] = { GLX_CONTEXT_MAJOR_VERSION_ARB, 3, @@ -504,6 +507,9 @@ bool OpenGLContext::ImplInit() #endif if (!m_aGLWin.ctx) { + if (!m_aGLWin.dpy || !m_aGLWin.vi) + return false; + m_aGLWin.ctx = m_aGLWin.dpy == 0 ? 0 : glXCreateContext(m_aGLWin.dpy, m_aGLWin.vi, 0, commit eaca12bdc9c8cdeaf05fec53743456148bfd88f0 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Sep 7 19:16:13 2014 +0200 add test for cond format copy&paste whole sheet Change-Id: I6e15bec2e1a2593b965df4c105758dc4bf22061f diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index d9fe623..2011774 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -7118,6 +7118,39 @@ void Test::testCondCopyPasteSheetBetweenDoc() m_pDoc->DeleteTab(0); } +void Test::testCondCopyPasteSheet() +{ + m_pDoc->InsertTab(0, "Test"); + + ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); + ScRange aCondFormatRange(0,0,0,3,3,0); + ScRangeList aRangeList(aCondFormatRange); + pFormat->AddRange(aRangeList); + + ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); + pFormat->AddEntry(pEntry); + m_pDoc->AddCondFormat(pFormat, 0); + + m_pDoc->CopyTab(0, SC_TAB_APPEND); + + ScConditionalFormatList* pList = m_pDoc->GetCondFormList(1); + CPPUNIT_ASSERT_EQUAL(size_t(1), pList->size()); + + ScConditionalFormat& rFormat = *pList->begin(); + const ScRangeList& rRange = rFormat.GetRange(); + CPPUNIT_ASSERT_EQUAL(ScRangeList(ScRange(0,0,1,3,3,1)), rRange); + sal_uInt32 nKey = rFormat.GetKey(); + const SfxPoolItem* pItem = m_pDoc->GetAttr( 2, 2, 1, ATTR_CONDITIONAL ); + const ScCondFormatItem* pCondFormatItem = static_cast<const ScCondFormatItem*>(pItem); + + CPPUNIT_ASSERT(pCondFormatItem); + CPPUNIT_ASSERT_EQUAL(size_t(1), pCondFormatItem->GetCondFormatData().size()); + CPPUNIT_ASSERT( nKey == pCondFormatItem->GetCondFormatData().at(0) ); + + m_pDoc->DeleteTab(1); + m_pDoc->DeleteTab(0); +} + void Test::testIconSet() { m_pDoc->InsertTab(0, "Test"); diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index c207fd5..3e48ff4 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -378,6 +378,7 @@ public: void testCondCopyPaste(); void testCondCopyPasteSingleCell(); //e.g. fdo#82503 void testCondCopyPasteSheetBetweenDoc(); + void testCondCopyPasteSheet(); void testIconSet(); void testImportStream(); @@ -560,6 +561,7 @@ public: CPPUNIT_TEST(testCondCopyPaste); CPPUNIT_TEST(testCondCopyPasteSingleCell); CPPUNIT_TEST(testCondCopyPasteSheetBetweenDoc); + CPPUNIT_TEST(testCondCopyPasteSheet); CPPUNIT_TEST(testIconSet); CPPUNIT_TEST(testImportStream); CPPUNIT_TEST(testDeleteContents); commit 14574226846ece3ccefbba14c55e1f15c0d5707c Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Sep 7 13:47:43 2014 +0200 rename the test Change-Id: I5c72782d90dbdaf1320f1685b530aed49ad80f18 diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 3f88cf5..d9fe623 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -7096,7 +7096,7 @@ void Test::testCondCopyPasteSingleCell() m_pDoc->DeleteTab(0); } -void Test::testCopySheetCondFormat() +void Test::testCondCopyPasteSheetBetweenDoc() { m_pDoc->InsertTab(0, "Test"); diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index 2bb3afb..c207fd5 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -377,7 +377,7 @@ public: void testCondFormatInsertDeleteSheets(); void testCondCopyPaste(); void testCondCopyPasteSingleCell(); //e.g. fdo#82503 - void testCopySheetCondFormat(); + void testCondCopyPasteSheetBetweenDoc(); void testIconSet(); void testImportStream(); @@ -559,7 +559,7 @@ public: CPPUNIT_TEST(testCondFormatInsertDeleteSheets); CPPUNIT_TEST(testCondCopyPaste); CPPUNIT_TEST(testCondCopyPasteSingleCell); - CPPUNIT_TEST(testCopySheetCondFormat); + CPPUNIT_TEST(testCondCopyPasteSheetBetweenDoc); CPPUNIT_TEST(testIconSet); CPPUNIT_TEST(testImportStream); CPPUNIT_TEST(testDeleteContents); commit 4fc788312b52678f9d4b658bf235091c55241337 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Sep 7 13:43:33 2014 +0200 fix copy&paste of conditional format between sheets Change-Id: I8856bff376f0f6e366062eddbc68a9eee098be5b diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 16009d2..c16b059 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -898,10 +898,6 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM maTabs[nOldPos]->StartAllListeners(); maTabs[nNewPos]->StartAllListeners(); - ScConditionalFormatList* pNewList = new ScConditionalFormatList(*maTabs[nOldPos]->GetCondFormList()); - pNewList->UpdateReference(aRefCxt); - maTabs[nNewPos]->SetCondFormList( pNewList ); - sc::SetFormulaDirtyContext aFormulaDirtyCxt; SetAllFormulasDirty(aFormulaDirtyCxt); commit f0b0c7a23f2d36437d845b7f53defe25dfe8cef0 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Sep 7 13:19:14 2014 +0200 add test for duplicated conditional formats Change-Id: If6d24cba87eebf6ddbb0d5392d653890ff99ef04 diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index f90c544..3f88cf5 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -7096,6 +7096,28 @@ void Test::testCondCopyPasteSingleCell() m_pDoc->DeleteTab(0); } +void Test::testCopySheetCondFormat() +{ + m_pDoc->InsertTab(0, "Test"); + + ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); + ScRange aCondFormatRange(0,0,0,3,3,0); + ScRangeList aRangeList(aCondFormatRange); + pFormat->AddRange(aRangeList); + + ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); + pFormat->AddEntry(pEntry); + m_pDoc->AddCondFormat(pFormat, 0); + + ScDocument aDoc; + aDoc.TransferTab(m_pDoc, 0, 0, true); + + ScConditionalFormatList* pList = aDoc.GetCondFormList(0); + CPPUNIT_ASSERT_EQUAL(size_t(1), pList->size()); + + m_pDoc->DeleteTab(0); +} + void Test::testIconSet() { m_pDoc->InsertTab(0, "Test"); diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx index ec9542c..2bb3afb 100644 --- a/sc/qa/unit/ucalc.hxx +++ b/sc/qa/unit/ucalc.hxx @@ -377,6 +377,7 @@ public: void testCondFormatInsertDeleteSheets(); void testCondCopyPaste(); void testCondCopyPasteSingleCell(); //e.g. fdo#82503 + void testCopySheetCondFormat(); void testIconSet(); void testImportStream(); @@ -558,6 +559,7 @@ public: CPPUNIT_TEST(testCondFormatInsertDeleteSheets); CPPUNIT_TEST(testCondCopyPaste); CPPUNIT_TEST(testCondCopyPasteSingleCell); + CPPUNIT_TEST(testCopySheetCondFormat); CPPUNIT_TEST(testIconSet); CPPUNIT_TEST(testImportStream); CPPUNIT_TEST(testDeleteContents); commit b2111e6b15b7a2ee3849d48605f3d6507463028b Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Sep 7 12:23:41 2014 +0200 that additional debug output for neon is not necessary anymore Change-Id: Iece8182517a396587678f2e5ff9ffaeb82ec428f diff --git a/external/neon/Library_neon.mk b/external/neon/Library_neon.mk index 06455ea..2698fe8 100644 --- a/external/neon/Library_neon.mk +++ b/external/neon/Library_neon.mk @@ -28,12 +28,6 @@ $(eval $(call gb_Library_add_cflags,neon,\ -w \ )) -ifneq ($(debug),) -$(eval $(call gb_Library_add_cflags,neon,\ - -DNE_DEBUGGING \ -)) -endif - $(eval $(call gb_Library_set_warnings_not_errors,neon)) $(eval $(call gb_Library_add_generated_cobjects,neon,\ commit 88ba4a11628cd12b3ced06a6f5a81ee3c3f40cb5 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Sep 7 12:22:54 2014 +0200 prevent duplicated conditional formatting during copying of sheeets Change-Id: I866c0c4c05830af0070767aec36375a846a2bf84 diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index b4d12b6..16009d2 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -989,8 +989,6 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, pSrcDoc->maTabs[nSrcPos]->CopyToTable(aCxt, 0, 0, MAXCOL, MAXROW, ( bResultsOnly ? IDF_ALL & ~IDF_FORMULA : IDF_ALL), false, maTabs[nDestPos] ); - maTabs[nDestPos]->CopyConditionalFormat(0, 0, MAXCOL, MAXROW, - 0, 0, pSrcDoc->maTabs[nSrcPos]); } } maTabs[nDestPos]->SetTabNo(nDestPos); commit 1abe49fd0c32863e8c00e3a6aefe9b5e83a8a160 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sat Sep 6 15:50:20 2014 +0200 fix indentation Change-Id: I0ca8c236fe1f9ede0a3fea6de0a76aaf712e3ff1 diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx index f242535..cb65a01 100644 --- a/sc/inc/stlsheet.hxx +++ b/sc/inc/stlsheet.hxx @@ -59,10 +59,8 @@ public: virtual bool SetName(const OUString& rNewName, bool bReindexNow = true) SAL_OVERRIDE; - void SetUsage( ScStyleSheet::Usage eUse ) const - { eUsage = eUse; } - ScStyleSheet::Usage GetUsage() const - { return eUsage; } + void SetUsage( ScStyleSheet::Usage eUse ) const { eUsage = eUse; } + ScStyleSheet::Usage GetUsage() const { return eUsage; } protected: virtual ~ScStyleSheet(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits