configure.ac | 2 cui/source/tabpages/tpshadow.cxx | 9 editeng/source/editeng/editobj.cxx | 11 formula/source/ui/dlg/FormulaHelper.cxx | 4 framework/source/layoutmanager/layoutmanager.cxx | 9 oox/inc/drawingml/textbodyproperties.hxx | 2 oox/source/drawingml/shape.cxx | 7 oox/source/drawingml/table/tablecell.cxx | 11 oox/source/drawingml/textbodyproperties.cxx | 8 oox/source/drawingml/textbodypropertiescontext.cxx | 11 oox/source/drawingml/transform2dcontext.cxx | 2 sc/inc/queryentry.hxx | 3 sc/inc/queryparam.hxx | 5 sc/source/core/data/dociter.cxx | 20 sc/source/core/data/document.cxx | 56 +- sc/source/core/data/table3.cxx | 2 sc/source/core/tool/doubleref.cxx | 2 sc/source/core/tool/interpr1.cxx | 21 sc/source/core/tool/interpr5.cxx | 21 sc/source/core/tool/queryentry.cxx | 2 sc/source/core/tool/queryparam.cxx | 17 sc/source/core/tool/scmatrix.cxx | 32 + sc/source/filter/inc/workbookhelper.hxx | 1 sc/source/filter/inc/worksheetbuffer.hxx | 3 sc/source/filter/oox/pivotcachefragment.cxx | 6 sc/source/filter/oox/workbookhelper.cxx | 5 sc/source/filter/oox/worksheetbuffer.cxx | 6 sd/qa/unit/data/n902652.pptx |binary sd/qa/unit/data/pptx/bnc910045.pptx |binary sd/qa/unit/data/xml/n902652_0.xml | 309 ++++++++++++++ sd/qa/unit/import-tests.cxx | 24 + setup_native/scripts/osx_install_languagepack.applescript | 3 sfx2/source/appl/appbaslib.cxx | 14 sfx2/source/doc/docfile.cxx | 15 sfx2/source/inc/appbaslib.hxx | 4 sw/qa/extras/ooxmlimport/data/fdo87488.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 25 + sw/source/core/bastyp/index.cxx | 1 sw/source/core/docnode/ndtbl.cxx | 9 sw/source/core/edit/eddel.cxx | 15 sw/source/ui/index/cnttab.cxx | 11 sw/source/uibase/uno/unotxdoc.cxx | 19 sw/source/uibase/utlui/content.cxx | 15 vcl/generic/glyphs/gcach_layout.cxx | 4 vcl/source/control/ilstbox.cxx | 22 45 files changed, 637 insertions(+), 131 deletions(-)
New commits: commit a577c2a48cab4acf8564d26da996d9da6990a2a0 Author: Eike Rathke <[email protected]> Date: Tue Mar 31 14:01:42 2015 +0200 Resolves: tdf#35636 implement match on empty cells This implements search criteria "" and "=" to match empty cells in spreadsheet functions SUMIF, AVERAGEIF, COUNTIF, SUMIFS, AVERAGEIFS and COUNTIFS. Change-Id: I1b4a4c14bac7b974428bf64afb549707a0d75a90 (cherry picked from commit 01b615687fe0f39c65e0e8290db434db2f1ef8ac) Reviewed-on: https://gerrit.libreoffice.org/15091 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/inc/queryentry.hxx b/sc/inc/queryentry.hxx index f024e6d..cac1170 100644 --- a/sc/inc/queryentry.hxx +++ b/sc/inc/queryentry.hxx @@ -43,8 +43,9 @@ struct SC_DLLPUBLIC ScQueryEntry QueryType meType; double mfVal; svl::SharedString maString; + bool mbMatchEmpty; - Item() : meType(ByValue), mfVal(0.0) {} + Item() : meType(ByValue), mfVal(0.0), mbMatchEmpty(false) {} bool operator== (const Item& r) const; }; diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx index 90105cc..867b15d 100644 --- a/sc/inc/queryparam.hxx +++ b/sc/inc/queryparam.hxx @@ -25,6 +25,8 @@ #include <boost/ptr_container/ptr_vector.hpp> +class SvNumberFormatter; + struct ScDBQueryParamInternal; struct ScQueryEntry; @@ -55,7 +57,8 @@ struct ScQueryParamBase ScQueryEntry* FindEntryByField(SCCOLROW nField, bool bNew); SC_DLLPUBLIC void RemoveEntryByField(SCCOLROW nField); void Resize(size_t nNew); - void FillInExcelSyntax(svl::SharedStringPool& rPool, const OUString& aCellStr, SCSIZE nIndex); + void FillInExcelSyntax( svl::SharedStringPool& rPool, const OUString& aCellStr, SCSIZE nIndex, + SvNumberFormatter* pFormatter ); protected: typedef boost::ptr_vector<ScQueryEntry> EntriesType; diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 9240634..208bd33 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -1117,8 +1117,24 @@ bool ScQueryCellIterator::GetThis() if (maCurPos.first->type == sc::element_type_empty) { - IncBlock(); - continue; + if (rItem.mbMatchEmpty && rEntry.GetQueryItems().size() == 1) + { + // This shortcut, instead of determining if any SC_OR query + // exists or this query is SC_AND'ed (which wouldn't make + // sense, but..) and evaluating them in ValidQuery(), is + // possible only because the interpreter is the only caller + // that sets mbMatchEmpty and there is only one item in those + // cases. + // XXX this would have to be reworked if other filters used it + // in different manners and evaluation would have to be done in + // ValidQuery(). + return true; + } + else + { + IncBlock(); + continue; + } } ScRefCellValue aCell = sc::toRefCell(maCurPos.first, maCurPos.second); diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 4ec4b42..f02a4b6 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -3088,7 +3088,7 @@ bool ScTable::CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow if (nIndex < nNewEntries) { rQueryParam.GetEntry(nIndex).nField = pFields[nCol - nCol1]; - rQueryParam.FillInExcelSyntax(rPool, aCellStr, nIndex); + rQueryParam.FillInExcelSyntax(rPool, aCellStr, nIndex, NULL); nIndex++; if (nIndex < nNewEntries) rQueryParam.GetEntry(nIndex).eConnect = SC_AND; diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx index 5de3489..4f4c523 100644 --- a/sc/source/core/tool/doubleref.cxx +++ b/sc/source/core/tool/doubleref.cxx @@ -191,7 +191,7 @@ bool lcl_createExcelQuery( if (nIndex < nNewEntries) { pParam->GetEntry(nIndex).nField = aFields[nCol]; - pParam->FillInExcelSyntax(rPool, aCellStr, nIndex); + pParam->FillInExcelSyntax(rPool, aCellStr, nIndex, NULL); nIndex++; if (nIndex < nNewEntries) pParam->GetEntry(nIndex).eConnect = SC_AND; diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 7715ce5..d79a138 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -4863,11 +4863,7 @@ double ScInterpreter::IterateParametersIf( ScIterFuncIf eFunc ) } else { - rParam.FillInExcelSyntax(pDok->GetSharedStringPool(), aString.getString(), 0); - sal_uInt32 nIndex = 0; - bool bNumber = pFormatter->IsNumberFormat( - rItem.maString.getString(), nIndex, rItem.mfVal); - rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString; + rParam.FillInExcelSyntax(pDok->GetSharedStringPool(), aString.getString(), 0, pFormatter); if (rItem.meType == ScQueryEntry::ByString) rParam.bRegExp = MayBeRegExp(rItem.maString.getString(), pDok); } @@ -5162,11 +5158,7 @@ void ScInterpreter::ScCountIf() } else { - rParam.FillInExcelSyntax(pDok->GetSharedStringPool(), aString.getString(), 0); - sal_uInt32 nIndex = 0; - bool bNumber = pFormatter->IsNumberFormat( - rItem.maString.getString(), nIndex, rItem.mfVal); - rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString; + rParam.FillInExcelSyntax(pDok->GetSharedStringPool(), aString.getString(), 0, pFormatter); if (rItem.meType == ScQueryEntry::ByString) rParam.bRegExp = MayBeRegExp(rItem.maString.getString(), pDok); } @@ -5420,11 +5412,7 @@ double ScInterpreter::IterateParametersIfs( ScIterFuncIfs eFunc ) } else { - rParam.FillInExcelSyntax(pDok->GetSharedStringPool(), aString.getString(), 0); - sal_uInt32 nIndex = 0; - bool bNumber = pFormatter->IsNumberFormat( - rItem.maString.getString(), nIndex, rItem.mfVal); - rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString; + rParam.FillInExcelSyntax(pDok->GetSharedStringPool(), aString.getString(), 0, pFormatter); if (rItem.meType == ScQueryEntry::ByString) rParam.bRegExp = MayBeRegExp(rItem.maString.getString(), pDok); } diff --git a/sc/source/core/tool/queryentry.cxx b/sc/source/core/tool/queryentry.cxx index 0b23da5..b650576 100644 --- a/sc/source/core/tool/queryentry.cxx +++ b/sc/source/core/tool/queryentry.cxx @@ -32,7 +32,7 @@ bool ScQueryEntry::Item::operator== (const Item& r) const { - return meType == r.meType && mfVal == r.mfVal && maString == r.maString; + return meType == r.meType && mfVal == r.mfVal && maString == r.maString && mbMatchEmpty == r.mbMatchEmpty; } ScQueryEntry::ScQueryEntry() : diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index 00c7ba3..099b55d 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -22,6 +22,7 @@ #include "scmatrix.hxx" #include <svl/sharedstringpool.hxx> +#include <svl/zforlist.hxx> #include <osl/diagnose.h> namespace { @@ -171,7 +172,7 @@ void ScQueryParamBase::Resize(size_t nNew) } void ScQueryParamBase::FillInExcelSyntax( - svl::SharedStringPool& rPool, const OUString& rStr, SCSIZE nIndex) + svl::SharedStringPool& rPool, const OUString& rStr, SCSIZE nIndex, SvNumberFormatter* pFormatter ) { const OUString aCellStr = rStr; if (nIndex >= maEntries.size()) @@ -226,6 +227,20 @@ void ScQueryParamBase::FillInExcelSyntax( rEntry.eOp = SC_EQUAL; } } + + if (pFormatter) + { + sal_uInt32 nFormat = 0; + bool bNumber = pFormatter->IsNumberFormat( rItem.maString.getString(), nFormat, rItem.mfVal); + rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString; + + /* TODO: pFormatter currently is also used as a flag whether matching + * empty cells with an empty string is triggered from the interpreter. + * This could be handled independently if all queries should support + * it, needs to be evaluated if that actually is desired. */ + if (rItem.meType == ScQueryEntry::ByString) + rItem.mbMatchEmpty = (rEntry.eOp == SC_EQUAL && rItem.maString.isEmpty()); + } } ScQueryParamTable::ScQueryParamTable() : commit 6b4dce56cc5b0e26be6c2d40f52a614fa23f30e1 Author: Michael Stahl <[email protected]> Date: Thu Apr 2 15:57:47 2015 +0200 tdf#72337: sfx2: make the SfxMedium stream-reuse hack runtime-optional SfxMedium::GetOutStream() does something different on WNT to solve sharing issues on one kind of file server but that causes issues with some other kind of file server that worked before. Make this runtime-changeable with (undocumented) env variable SFX_MEDIUM_REUSE_STREAM. (regression from 3d12549335229aca1a6a57575292111274709992) Change-Id: Id7a1fc8169dbf09c67a109b36ffa312ef33231c5 (cherry picked from commit 7c4415407f2df5460d3667aa9f820865a615f57f) Reviewed-on: https://gerrit.libreoffice.org/15124 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index a80454d..711cbc7 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -560,8 +560,9 @@ SvStream* SfxMedium::GetOutStream() { // On windows we try to re-use XOutStream from xStream if that exists; // because opening new SvFileStream in this situation may fail with ERROR_SHARING_VIOLATION - #ifdef WNT - if (pImp->xStream.is()) + // TODO: this is a horrible hack that should probably be removed, + // somebody needs to investigate this more thoroughly... + if (getenv("SFX_MEDIUM_REUSE_STREAM") && pImp->xStream.is()) { assert(pImp->xStream->getOutputStream().is()); // need that... pImp->m_pOutStream = utl::UcbStreamHelper::CreateStream( @@ -569,15 +570,11 @@ SvStream* SfxMedium::GetOutStream() } else { - pImp->m_pOutStream = new SvFileStream( - pImp->m_aName, STREAM_STD_READWRITE); - } // On Unix don't try to re-use XOutStream from xStream if that exists; // it causes fdo#59022 (fails opening files via SMB on Linux) - #else - pImp->m_pOutStream = new SvFileStream( - pImp->m_aName, STREAM_STD_READWRITE); - #endif + pImp->m_pOutStream = new SvFileStream( + pImp->m_aName, STREAM_STD_READWRITE); + } CloseStorage(); } } commit 53ee5ca9307401c06a8bdedb5b1e3d552cecd8f4 Author: Caolán McNamara <[email protected]> Date: Fri Apr 3 09:03:03 2015 +0100 Resolves: tdf#89785 drop down list sizes locked in too early get initial size request after language and sort lists have been filled. We should really queue_resize in list/combo boxes if the StateChanged::DATA gets emitted for them. But we're mostly gotten away with it so far. Change-Id: I37137365e8e71b8f803977edaf46d6c7cfb3fcc2 (cherry picked from commit 1038a323fb407bcc514426a2fb9e251216d37399) Reviewed-on: https://gerrit.libreoffice.org/15134 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> Tested-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 70b06ab..c0065b7 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -824,16 +824,17 @@ SwTOXSelectTabPage::SwTOXSelectTabPage(vcl::Window* pParent, const SfxItemSet& r get(m_pLanguageLB, "lang"); get(m_pSortAlgorithmLB, "keytype"); - //Default mode is arranged to be the tallest mode - //of alphabetical index, lock that height in now - Size aPrefSize(get_preferred_size()); - set_height_request(aPrefSize.Height()); - pIndexEntryWrapper = new IndexEntrySupplierWrapper(); m_pLanguageLB->SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, false, false, false ); + //Default mode is arranged to be the tallest mode + //of alphabetical index, lock that height in now + LanguageHdl(0); //fill sort algorithm list + Size aPrefSize(get_preferred_size()); + set_height_request(aPrefSize.Height()); + sAddStyleContent = m_pAddStylesCB->GetText(); ResStringArray& rNames = aFromNames.GetNames(); commit c46009ec79a5879d5c89c6a71d1ba7042ee3c72b Author: Katarina Behrens <[email protected]> Date: Wed Apr 1 23:25:34 2015 +0200 Follow-up tdf#84288: call SetRectangleAttributes only once cherry-picking code from master (4.5) branch to 4.4 branch sadly didn't remove/replace the faulty m_pCtlXRectPreview->SetRectangleAttributes line b/c 4.4 code calls it a bit earlier. I noticed too late and dtardon was too quick with merging. Change-Id: Ib6e43c4475aacd5d87d9b82f321c24386187b736 Reviewed-on: https://gerrit.libreoffice.org/15114 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 3216853..3e33839 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -210,7 +210,6 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) } } - m_pCtlXRectPreview->SetRectangleAttributes(rSet); // aLbShadowColor nPos = m_pLbShadowColor->GetSelectEntryPos(); m_pLbShadowColor->Clear(); commit f40af9a406069937fe490ff658be53c0891a802b Author: Julien Nabet <[email protected]> Date: Thu Mar 26 22:46:00 2015 +0100 tdf#81813: Typing to select value in dropdown resets after space character Change-Id: I6972cdad9708a46bb8338590312196e55c4f8778 Reviewed-on: https://gerrit.libreoffice.org/15024 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> (cherry picked from commit 44c87a5dc921ea6dd28fdc016c61aa62cfd4f4d6) Reviewed-on: https://gerrit.libreoffice.org/15098 diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 9c66383..29f5462 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -1356,6 +1356,7 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) bool bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3(); bool bMod2 = aKeyCode.IsMod2(); bool bDone = false; + bool bHandleKey = false; switch( aKeyCode.GetCode() ) { @@ -1571,7 +1572,7 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) } bDone = true; } - maQuickSelectionEngine.Reset(); + bHandleKey = true; } break; @@ -1594,18 +1595,21 @@ bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) maQuickSelectionEngine.Reset(); bDone = true; - break; } - } - // fall through intentional - default: - { - if ( !IsReadOnly() ) + else { - bDone = maQuickSelectionEngine.HandleKeyEvent( rKEvt ); + bHandleKey = true; } - } + } break; + + default: + bHandleKey = true; + break; + } + if (bHandleKey && !IsReadOnly()) + { + bDone = maQuickSelectionEngine.HandleKeyEvent( rKEvt ); } if ( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) commit 69c162b562c484ddb8337042f3b4a156efe44cee Author: Michael Stahl <[email protected]> Date: Tue Mar 31 15:35:36 2015 +0200 sw: fix obscure crash in SwXTextDocument::getSomething() xNumFmtAgg may be null if you directly call global ServiceManager's createInstanceWithContext("com.sun.star.text.TextDocument") Change-Id: Id619a3f5c9e3f8281f9ef72db132c64287e027c4 (cherry picked from commit d360477d8740f29e2c2bc5f7bbd667df7cd26ee9) Reviewed-on: https://gerrit.libreoffice.org/15102 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 50dc5f8..7b0b82c 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -263,19 +263,16 @@ sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rI } sal_Int64 nRet = SfxBaseModel::getSomething( rId ); - if ( nRet ) + if (nRet) return nRet; - else - { - GetNumberFormatter(); - Any aNumTunnel = xNumFmtAgg->queryAggregation(cppu::UnoType<XUnoTunnel>::get()); - Reference<XUnoTunnel> xNumTunnel; - aNumTunnel >>= xNumTunnel; - if(xNumTunnel.is()) - return xNumTunnel->getSomething(rId); - } - return SfxBaseModel::getSomething( rId ); + GetNumberFormatter(); + if (!xNumFmtAgg.is()) // may happen if not valid or no SwDoc + return 0; + Any aNumTunnel = xNumFmtAgg->queryAggregation(cppu::UnoType<XUnoTunnel>::get()); + Reference<XUnoTunnel> xNumTunnel; + aNumTunnel >>= xNumTunnel; + return (xNumTunnel.is()) ? xNumTunnel->getSomething(rId) : 0; } Any SAL_CALL SwXTextDocument::queryInterface( const uno::Type& rType ) throw(RuntimeException, std::exception) commit 462f9ec95c1280799e91227bc3f90e2199c42df6 Author: Michael Stahl <[email protected]> Date: Tue Mar 31 19:01:25 2015 +0200 sfx2: fix VBA crash when disposing SfxBaseModel Crash on WNT in CppunitTest_sw_globalfilter testSkipImages() SfxBaseModel::dispose() calls some event listener that deletes the BasicManager instance; unfortunately SfxObjectShell_Impl has a SfxBasicHolder member that still refers to the deleted BasicManager and then something calls vba::getVBAServiceFactory()... Try to fix that by clearing the SfxBasicHolder member via SfxListener. Change-Id: I65f2ec8e9eb598be218136c06ed8de35a464a971 (cherry picked from commit fae6699c2ec8d68766bb8d5f71483d4b65792327) Reviewed-on: https://gerrit.libreoffice.org/15103 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx index 980f2db..e220917 100644 --- a/sfx2/source/appl/appbaslib.cxx +++ b/sfx2/source/appl/appbaslib.cxx @@ -43,6 +43,19 @@ SfxBasicManagerHolder::SfxBasicManagerHolder() { } +void SfxBasicManagerHolder::Notify(SfxBroadcaster& rBC, SfxHint const& rHint) +{ + if (!mpBasicManager || &rBC != mpBasicManager) + return; + SfxSimpleHint const*const pSimpleHint(dynamic_cast<SfxSimpleHint const*>(&rHint)); + if (pSimpleHint && SFX_HINT_DYING == pSimpleHint->GetId()) + { + mpBasicManager = nullptr; + mxBasicContainer.clear(); + mxDialogContainer.clear(); + } +} + void SfxBasicManagerHolder::reset( BasicManager* _pBasicManager ) { impl_releaseContainers(); @@ -59,6 +72,7 @@ void SfxBasicManagerHolder::reset( BasicManager* _pBasicManager ) if ( mpBasicManager ) { + StartListening(*mpBasicManager); try { mxBasicContainer.set( mpBasicManager->GetScriptLibraryContainer(), UNO_QUERY_THROW ); diff --git a/sfx2/source/inc/appbaslib.hxx b/sfx2/source/inc/appbaslib.hxx index 5810afd..8e0d5f8 100644 --- a/sfx2/source/inc/appbaslib.hxx +++ b/sfx2/source/inc/appbaslib.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_SFX2_SOURCE_INC_APPBASLIB_HXX #define INCLUDED_SFX2_SOURCE_INC_APPBASLIB_HXX +#include <svl/lstner.hxx> + #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/script/XStorageBasedLibraryContainer.hpp> #include <com/sun/star/embed/XStorage.hpp> @@ -29,6 +31,7 @@ class BasicManager; /** helper class which holds and manipulates a BasicManager */ class SfxBasicManagerHolder + : public SfxListener { private: BasicManager* mpBasicManager; @@ -84,6 +87,7 @@ public: */ bool LegacyPsswdBinaryLimitExceeded( ::com::sun::star::uno::Sequence< OUString >& sModules ); + virtual void Notify(SfxBroadcaster& rBC, SfxHint const& rHint) SAL_OVERRIDE; private: void impl_releaseContainers(); commit 6e5a6e3ef83984d2cb9e788a4be413de83fdd8bb Author: Michael Stahl <[email protected]> Date: Wed Apr 1 15:45:39 2015 +0200 tdf#88360: sw: fix crash on closing help in Navigator window SwContentTree::pActiveShell is not cleared because of a check that the shell exists, which is only done in the special case bIsConstant. * at most one of bIsActive or bIsConstant is true * the only place that calls SetActiveShell() if bIsConstant is true already checks this condition So remove the unnecessary check from SetActiveShell() (regression from 329742e6c9da7cd7848d92a6846e3d1249d8d9b4) (cherry picked from commit 7ddd6c008142a6b88878ffc96f5e339a0fddd7d9) Change-Id: Id3b3b98bd38303b5afc529cc8be669872bd354b7 Reviewed-on: https://gerrit.libreoffice.org/15104 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 5a6c75e..b9a9380 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2220,15 +2220,12 @@ void SwContentTree::SetActiveShell(SwWrtShell* pSh) } else if(bIsConstant) { - if(!lcl_FindShell(pActiveShell)) - { - if (pActiveShell) - EndListening(*pActiveShell->GetView().GetDocShell()); - pActiveShell = pSh; - bIsActive = true; - bIsConstant = false; - bClear = true; - } + if (pActiveShell) + EndListening(*pActiveShell->GetView().GetDocShell()); + pActiveShell = pSh; + bIsActive = true; + bIsConstant = false; + bClear = true; } // Only if it is the active view, the array will be deleted and // the screen filled new. commit 246f47035eef4e65ebc076e997c4d3d15c7b3c21 Author: Michael Stahl <[email protected]> Date: Thu Apr 2 11:45:13 2015 +0200 tdf#85496: editeng: suppress all duplicate attributes during export Since commit 0d57434180db6c8eda8c5b9b704f8a1c18b371df multiple 0-length attributes will be exported by the ODF filter as duplicate attributes. 846b56b6b99e334dfa44f1a24640aa3158509854 was apparently not the only bug that could cause this; unfortunately nobody is able to reproduce the editing operations that result in the newly reported issue, so just take the safe approach and check for duplicates, as is already done in the libreoffice-4-3 and libreoffice-4-2 branches. Change-Id: I1de10a99f6b84a0f4ea793ad55aaf6953b8307d5 (cherry picked from commit 5ece3e3525b0ef62e1b0e59ac5446aec0538d0d3) Reviewed-on: https://gerrit.libreoffice.org/15117 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 332e71e..350e0d9 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -978,11 +978,18 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs ) { editeng::Section& rSecAttr = *itCurAttr; // serious bug: will cause duplicate attributes to be exported - assert(rSecAttr.maAttributes.end() == std::find_if( + auto iter(std::find_if( rSecAttr.maAttributes.begin(), rSecAttr.maAttributes.end(), [&pItem](SfxPoolItem const*const pIt) { return pIt->Which() == pItem->Which(); })); - rSecAttr.maAttributes.push_back(pItem); + if (rSecAttr.maAttributes.end() == iter) + { + rSecAttr.maAttributes.push_back(pItem); + } + else + { + SAL_WARN("editeng", "GetAllSections(): duplicate attribute suppressed"); + } } } } commit 946a5f83606500290df78987066d7d395dda8bbc Author: Michael Stahl <[email protected]> Date: Thu Apr 2 23:33:41 2015 +0200 sw: fix crash on SwUndoDelete after select-all with table at start Somehow the Redo leaves the shell cursor at an invalid offset into the paragraph, which then leads to out-of-bounds string access. Noticed that SwUndRng::SetPaM() leaves an invalid nContent.m_nIndex on the start position, due to a surprising omission in SwIndex::ChgValue(). (regression from 555ff26501d1bbd8a7872c20671c6303db1e1701) Change-Id: I6e6ad7f70835d7e9d6da1fb680e2ae15469fad71 (cherry picked from commit b24a15a0aaea310806259eaa20a7d509ce30e5c8) Reviewed-on: https://gerrit.libreoffice.org/15128 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx index d77e2396..dc5041f 100644 --- a/sw/source/core/bastyp/index.cxx +++ b/sw/source/core/bastyp/index.cxx @@ -81,6 +81,7 @@ SwIndex& SwIndex::ChgValue( const SwIndex& rIdx, sal_Int32 nNewValue ) assert(m_pIndexReg == rIdx.m_pIndexReg); if (!m_pIndexReg) { + m_nIndex = 0; return *this; // no IndexReg => no list to sort into; m_nIndex is 0 } SwIndex* pFnd = const_cast<SwIndex*>(&rIdx); diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 8be74f3..789c4c4 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -99,6 +99,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo ) // Selection starts at the first para of the first cell, but we // want to delete the table node before the first cell as well. pNewPam->Start()->nNode = pNewPam->Start()->nNode.GetNode().FindTableNode()->GetIndex(); + pNewPam->Start()->nContent.Assign(nullptr, 0); pPam = pNewPam.get(); } // delete everything commit 436a5ff6f993c6f7f54ba2214e5faffd1320be52 Author: Michael Stahl <[email protected]> Date: Thu Apr 2 22:32:59 2015 +0200 tdf#87400: sw: fix ~SwIndexReg assertion in AutoCorrect SwAutoFormat::DoUnderline() calls DeleteSel() with a SwPaM that is not corrected, except if it's passed along directly to SwDoc methods. (regression from f9b62506b22c3eb885ffd5a4ec8025c33df7b2d4) Change-Id: I741e0391e7f8e09a64bcfe99ca4d650f1016aaa7 (cherry picked from commit 41e4998cdeb54a6fc316f349de61296be820fe47) Reviewed-on: https://gerrit.libreoffice.org/15127 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 3e4f06d..8be74f3 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -90,14 +90,20 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo ) } else { - SwPaM aPam(rPam); + std::unique_ptr<SwPaM> pNewPam; + SwPaM * pPam = &rPam; if (bSelectAll) + { + assert(dynamic_cast<SwShellCrsr*>(&rPam)); // must be corrected pam + pNewPam.reset(new SwPaM(rPam)); // Selection starts at the first para of the first cell, but we // want to delete the table node before the first cell as well. - aPam.Start()->nNode = aPam.Start()->nNode.GetNode().FindTableNode()->GetIndex(); + pNewPam->Start()->nNode = pNewPam->Start()->nNode.GetNode().FindTableNode()->GetIndex(); + pPam = pNewPam.get(); + } // delete everything - GetDoc()->getIDocumentContentOperations().DeleteAndJoin( aPam ); - SaveTblBoxCntnt( aPam.GetPoint() ); + GetDoc()->getIDocumentContentOperations().DeleteAndJoin(*pPam); + SaveTblBoxCntnt( pPam->GetPoint() ); } // Selection is not needed anymore commit 0e75ad9e12f894f71f3c31b497b3d6713dd5db37 Author: Eike Rathke <[email protected]> Date: Wed Apr 1 18:43:41 2015 +0200 Resolves: tdf#88672 add missing return if error to not crash Change-Id: Iae73c46d6ae5b141c3f5680b2623ee06205c22d2 (cherry picked from commit 3cae8ee10f297e42adf9f3b33809b4e7e3af2840) Reviewed-on: https://gerrit.libreoffice.org/15111 Tested-by: Markus Mohrhard <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index a8111f3..7715ce5 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -5520,6 +5520,7 @@ double ScInterpreter::IterateParametersIfs( ScIterFuncIfs eFunc ) if (!pMainMatrix) { SetError( errIllegalParameter); + return 0; } nMainCol1 = 0; nMainRow1 = 0; commit 16ff734b4b0dbb6502f3caa20d50e0063053d06b Author: Markus Mohrhard <[email protected]> Date: Thu Apr 2 22:22:09 2015 +0200 we need a more intelligent increment for the iterator, tdf#90391 Change-Id: I5a980f0b1ca47b18ce2e479e46971d7c6690c437 Reviewed-on: https://gerrit.libreoffice.org/15125 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/15126 diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 998f562..4398308 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -1999,6 +1999,31 @@ public: } }; +namespace { + +MatrixImplType::position_type increment_position(const MatrixImplType::position_type& pos, size_t n) +{ + MatrixImplType::position_type ret = pos; + do + { + if (ret.second + n < ret.first->size) + { + ret.second += n; + break; + } + else + { + n -= (ret.first->size - ret.second); + ++ret.first; + ret.second = 0; + } + } + while (n > 0); + return ret; +} + +} + template<typename T> struct MatrixOpWrapper { @@ -2027,7 +2052,6 @@ public: block_type::const_iterator itEnd = block_type::end(*node.data); MatrixIteratorWrapper<block_type, T> aFunc(it, itEnd, maOp); pos = mrMat.set(pos,aFunc.begin(), aFunc.end()); - ++pos.first; } break; case mdds::mtm::element_boolean: @@ -2039,7 +2063,6 @@ public: MatrixIteratorWrapper<block_type, T> aFunc(it, itEnd, maOp); pos = mrMat.set(pos, aFunc.begin(), aFunc.end()); - ++pos.first; } break; case mdds::mtm::element_string: @@ -2051,7 +2074,6 @@ public: MatrixIteratorWrapper<block_type, T> aFunc(it, itEnd, maOp); pos = mrMat.set(pos, aFunc.begin(), aFunc.end()); - ++pos.first; } break; case mdds::mtm::element_empty: @@ -2061,15 +2083,13 @@ public: std::vector<char> aVec(node.size); MatrixIteratorWrapper<std::vector<char>, T> aFunc(aVec.begin(), aVec.end(), maOp); pos = mrMat.set(pos, aFunc.begin(), aFunc.end()); - ++pos.first; } - else - pos.second += node.size; } break; default: ; } + pos = increment_position(pos, node.size); } }; commit db9e38b904771fcb22113ddd701b90e650a78fe8 Author: Caolán McNamara <[email protected]> Date: Thu Apr 2 09:30:44 2015 +0100 fix hang with ooo71962-1.odt script run ends after chunk we are rendering (cherry picked from commit 00bf3a4259c1f960eff05b17649cc734c275950f) Change-Id: Idbfe11c385db72a80d3d204f8638d67395580d1b Reviewed-on: https://gerrit.libreoffice.org/15115 Reviewed-by: Björn Michaelsen <[email protected]> Tested-by: Björn Michaelsen <[email protected]> diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx index f7523a1..b29627d 100644 --- a/vcl/generic/glyphs/gcach_layout.cxx +++ b/vcl/generic/glyphs/gcach_layout.cxx @@ -399,7 +399,9 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs) aScriptSubRuns.push_back(aRun); nCurrentPos = nEndRunPos; - aScriptRun.next(); + bool bHasMore = aScriptRun.next(); + if (!bHasMore) + break; } // RTL subruns should be reversed to ensure that final glyph order is commit 27c493ee1b5e70d955babf1c824368328ae1debf Author: Eike Rathke <[email protected]> Date: Tue Mar 31 16:09:14 2015 +0200 use error value instead of string in array/matrix, tdf#42481 related Change-Id: Ib97509609bd3e6629e3efd0c633535564f1c64d6 (cherry picked from commit f3989e4d3d87f07a484d7c404bc2bfc678faa7f0) Reviewed-on: https://gerrit.libreoffice.org/15096 Tested-by: David Tardon <[email protected]> Reviewed-by: David Tardon <[email protected]> diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index c5b1f02..a8111f3 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -994,7 +994,7 @@ sc::RangeMatrix ScInterpreter::CompareMat( ScQueryOp eOp, sc::CompareOptions* pO sc::CompareFunc(aComp.maCells[0], aComp.maCells[1], aComp.mbIgnoreCase, pOptions), j, k); } else - aRes.mpMat->PutString(mrStrPool.intern(ScGlobal::GetRscString(STR_NO_VALUE)), j, k); + aRes.mpMat->PutError( errNoValue, j, k); } } commit 6c7b3ce2b3ebf64fc1da7819775b7d0bb78db15d Author: Eike Rathke <[email protected]> Date: Mon Mar 30 19:48:45 2015 +0200 Resolves: tdf#42481 propagate errors as errors in matrix calculations ... instead of setting an error string with an unwanted side effect that may lead to wrong results instead of error. Change-Id: I42ade52e86520535c879e9bd68156873d706f33c (cherry picked from commit 836d05d32e36aafc00de59ca51878f47f7ce816a) Reviewed-on: https://gerrit.libreoffice.org/15072 Tested-by: David Tardon <[email protected]> Reviewed-by: David Tardon <[email protected]> diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index aa425b3..7b46fd8 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -1092,7 +1092,6 @@ static inline SCSIZE lcl_GetMinExtent( SCSIZE n1, SCSIZE n2 ) template<class _Function> static ScMatrixRef lcl_MatrixCalculation( - svl::SharedStringPool& rPool, const ScMatrix& rMat1, const ScMatrix& rMat2, ScInterpreter* pInterpreter) { static _Function Op; @@ -1111,13 +1110,19 @@ static ScMatrixRef lcl_MatrixCalculation( { for (j = 0; j < nMinR; j++) { + sal_uInt16 nErr; if (rMat1.IsValueOrEmpty(i,j) && rMat2.IsValueOrEmpty(i,j)) { double d = Op(rMat1.GetDouble(i,j), rMat2.GetDouble(i,j)); xResMat->PutDouble( d, i, j); } + else if (((nErr = rMat1.GetErrorIfNotString(i,j)) != 0) || + ((nErr = rMat2.GetErrorIfNotString(i,j)) != 0)) + { + xResMat->PutError( nErr, i, j); + } else - xResMat->PutString(rPool.intern(ScGlobal::GetRscString(STR_NO_VALUE)), i, j); + xResMat->PutError( errNoValue, i, j); } } } @@ -1246,11 +1251,11 @@ void ScInterpreter::CalculateAddSub(bool _bSub) ScMatrixRef pResMat; if ( _bSub ) { - pResMat = lcl_MatrixCalculation<MatrixSub>(mrStrPool, *pMat1, *pMat2, this); + pResMat = lcl_MatrixCalculation<MatrixSub>( *pMat1, *pMat2, this); } else { - pResMat = lcl_MatrixCalculation<MatrixAdd>(mrStrPool, *pMat1, *pMat2, this); + pResMat = lcl_MatrixCalculation<MatrixAdd>( *pMat1, *pMat2, this); } if (!pResMat) @@ -1443,7 +1448,7 @@ void ScInterpreter::ScMul() } if (pMat1 && pMat2) { - ScMatrixRef pResMat = lcl_MatrixCalculation<MatrixMul>(mrStrPool, *pMat1, *pMat2, this); + ScMatrixRef pResMat = lcl_MatrixCalculation<MatrixMul>( *pMat1, *pMat2, this); if (!pResMat) PushNoValue(); else @@ -1516,7 +1521,7 @@ void ScInterpreter::ScDiv() } if (pMat1 && pMat2) { - ScMatrixRef pResMat = lcl_MatrixCalculation<MatrixDiv>(mrStrPool, *pMat1, *pMat2, this); + ScMatrixRef pResMat = lcl_MatrixCalculation<MatrixDiv>( *pMat1, *pMat2, this); if (!pResMat) PushNoValue(); else @@ -1595,7 +1600,7 @@ void ScInterpreter::ScPow() fVal1 = GetDouble(); if (pMat1 && pMat2) { - ScMatrixRef pResMat = lcl_MatrixCalculation<MatrixPow>(mrStrPool, *pMat1, *pMat2, this); + ScMatrixRef pResMat = lcl_MatrixCalculation<MatrixPow>( *pMat1, *pMat2, this); if (!pResMat) PushNoValue(); else @@ -1792,7 +1797,7 @@ void ScInterpreter::ScSumXMY2() PushNoValue(); return; } // if (nC1 != nC2 || nR1 != nR2) - ScMatrixRef pResMat = lcl_MatrixCalculation<MatrixSub>(mrStrPool, *pMat1, *pMat2, this); + ScMatrixRef pResMat = lcl_MatrixCalculation<MatrixSub>( *pMat1, *pMat2, this); if (!pResMat) { PushNoValue(); commit 2a4db68e32359cf902e305022fde511ffc3c7601 Author: Caolán McNamara <[email protected]> Date: Fri Jan 23 13:17:39 2015 +0000 Resolves: fdo#87977 ensure RegisterFormat is called before SetModified was Related: fdo#78599 ensure RegisterFormat is called before SetModified TextToTable is called which calls lcl_SetTableBoxWidths2 which calls SwDoc::MakeTableBoxFmt which calls SetModified. there happens to be a listener on modified which tries to get an updated preview for embedded objects which draws the page to a metafile, but this SwTableNode in SwTableNode::MakeFrm doesn't have a FrmFmt set on it yet, so falls over and dies. Move the RegisterFormat into SwNodes::TextToTable before the tablebox widths are set to avoid this (cherry picked from commit 162c72d64077d9e0dae820d881ce2b56a5b2040c) Conflicts: sw/source/core/docnode/ndtbl.cxx Change-Id: I3e5141c9901ff0f473e2eaab3e5cd9be61f810bd Reviewed-on: https://gerrit.libreoffice.org/15095 Tested-by: David Tardon <[email protected]> Reviewed-by: David Tardon <[email protected]> diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index bdd3b9c..ba6351d 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -746,7 +746,6 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts, // Set Orientation in the Table's Fmt pTableFmt->SetFmtAttr( SwFmtHoriOrient( 0, eAdjust ) ); - pNdTbl->RegisterToFormat( *pTableFmt ); if( pTAFmt || ( rInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER) ) { @@ -1110,6 +1109,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, lcl_BalanceTable(*pTable, nMaxBoxes, *pTblNd, *pBoxFmt, *pTxtColl, pUndo, &aPosArr); + pTable->RegisterToFormat(*pTblFmt); lcl_SetTableBoxWidths(*pTable, nMaxBoxes, *pBoxFmt, *pDoc, &aPosArr); return pTblNd; @@ -1215,9 +1215,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > rTableNodes, pTableFmt, pLineFmt, pBoxFmt, getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_STANDARD )/*, pUndo*/ ); - SwTable * pNdTbl = &pTblNd->GetTable(); - OSL_ENSURE( pNdTbl, "No Table Node created" ); - pNdTbl->RegisterToFormat( *pTableFmt ); + SwTable& rNdTbl = pTblNd->GetTable(); if( !pBoxFmt->GetDepends() ) { @@ -1232,7 +1230,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > getIDocumentState().SetModified(); getIDocumentFieldsAccess().SetFieldsDirty( true, NULL, 0 ); - return pNdTbl; + return &rNdTbl; } SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange) @@ -1407,6 +1405,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, nMaxBoxes = nBoxes; } + pTable->RegisterToFormat(*pTblFmt); lcl_SetTableBoxWidths2(*pTable, nMaxBoxes, *pBoxFmt, *pDoc); return pTblNd; commit 43d7573fa8ec34efb51f88bde8ce282b426d84d3 Author: Katarina Behrens <[email protected]> Date: Tue Mar 31 22:44:28 2015 +0200 tdf#84228: Fix annoying double shadow in preview SfxItemSet passed to ActivatePage method contains both rectangle AND shadow attributes, causing the old shadow to stick around even after new shadow attributes have been set. Thus, set shadow to none in a local copy of SfxItemSet and use that one to repaint the rectangle Change-Id: If798351fbecaaf951ef0479ae4a2c70d2db68ca4 Reviewed-on: https://gerrit.libreoffice.org/15099 Tested-by: David Tardon <[email protected]> Reviewed-by: David Tardon <[email protected]> diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 6aa0fe9..3216853 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -223,6 +223,14 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) else m_pLbShadowColor->SelectEntryPos( nPos ); + SfxItemSet rAttribs( rSet ); + // rSet contains shadow attributes too, but we want + // to use it for updating rectangle attributes only, + // so set the shadow to none here + SdrOnOffItem aItem( makeSdrShadowItem( false )); + rAttribs.Put( aItem ); + + m_pCtlXRectPreview->SetRectangleAttributes( rAttribs ); ModifyShadowHdl_Impl( this ); } nPageType = PT_SHADOW; commit a6b27c8db2df1a3dc4b124b661ac30ad51cd725f Author: Christian Lohmaier <[email protected]> Date: Tue Mar 31 16:58:50 2015 +0200 tdf#90298 rescan for bundled extensions when installing Mac langpack LO only scans for new extensions when the folder's timestamp is newer than a timestamp file in the user's profile. When installing a languagepack, the folder is set to the build-time of the package. touch the dir to set it to install time and thus allow LO to pick up newly installed dictionaries and thesaurus/hyphenation data. Change-Id: I888f830d2325774cd98e3624c19d2be19d4d6db2 (cherry picked from commit b89681bef2e492bccb9502079e042ff495b40c39) Reviewed-on: https://gerrit.libreoffice.org/15094 Reviewed-by: Tor Lillqvist <[email protected]> Tested-by: Tor Lillqvist <[email protected]> diff --git a/setup_native/scripts/osx_install_languagepack.applescript b/setup_native/scripts/osx_install_languagepack.applescript index 735f141..cbd7743 100644 --- a/setup_native/scripts/osx_install_languagepack.applescript +++ b/setup_native/scripts/osx_install_languagepack.applescript @@ -140,7 +140,8 @@ if (button returned of result) is AbortLabel then end if *) -set tarCommand to "/usr/bin/tar -C " & quoted form of (choice as string) & " -xjf " & quoted form of sourcedir & "/tarball.tar.bz2" +-- touch extensions folder to have LO register bundled dictionaries +set tarCommand to "/usr/bin/tar -C " & quoted form of (choice as string) & " -xjf " & quoted form of sourcedir & "/tarball.tar.bz2 && touch " & quoted form of (choice as string) & "/Contents/Resources/extensions" try do shell script tarCommand commit 0cab0fe7b46807b4a1e74069f18b8c3d0177b68c Author: Zolnai Tamás <[email protected]> Date: Fri Dec 5 19:23:01 2014 +0100 bnc#910045 wrong cell fill color defined by table style Problems were with those table styles which used color themes to define cell fill color. Reviewed-on: https://gerrit.libreoffice.org/15089 Tested-by: Jenkins <[email protected]> Reviewed-by: Andras Timar <[email protected]> (cherry picked from commit debf3ffb87d607704ddea97f6710c3ceaa9a243d) Signed-off-by: Andras Timar <[email protected]> Conflicts: sd/qa/unit/import-tests.cxx Change-Id: Ibde90df81ff253ba65618dde4038093d1caabfe8 diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index 45486fd..c94848a 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -116,6 +116,17 @@ void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase, ::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( rTableStylePart.getFillProperties() ); if ( rPartFillPropertiesPtr.get() ) rFillProperties.assignUsed( *rPartFillPropertiesPtr ); + else + { + ::oox::drawingml::ShapeStyleRef& rFillStyleRef = rTableStylePart.getStyleRefs()[ XML_fillRef ]; + const Theme* pTheme = rFilterBase.getCurrentTheme(); + if (pTheme && rFillStyleRef.mnThemedIdx != 0 ) + { + rFillProperties.assignUsed( *pTheme->getFillStyle( rFillStyleRef.mnThemedIdx ) ); + sal_Int32 nPhClr = rFillStyleRef.maPhClr.getColor( rFilterBase.getGraphicHelper() ); + rFillProperties.maFillColor.setSrgbClr( nPhClr ); + } + } applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder ); applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder ); diff --git a/sd/qa/unit/data/pptx/bnc910045.pptx b/sd/qa/unit/data/pptx/bnc910045.pptx new file mode 100644 index 0000000..5788ea9 Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc910045.pptx differ diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index a9d55c5..c9de7bd 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -96,6 +96,7 @@ public: void testBnc862510_7(); void testPDFImport(); void testPDFImportSkipImages(); + void testBnc910045(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -129,6 +130,7 @@ public: CPPUNIT_TEST(testBnc862510_6); CPPUNIT_TEST(testBnc862510_7); CPPUNIT_TEST(testPDFImport); + CPPUNIT_TEST(testBnc910045); CPPUNIT_TEST_SUITE_END(); }; @@ -1112,6 +1114,27 @@ void SdImportTest::testPDFImportSkipImages() xDocShRef->DoClose(); } +void SdImportTest::testBnc910045() +{ + // Problem with table style which defines cell color with fill style + ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/bnc910045.pptx"), PPTX ); + + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + const SdrPage *pPage = pDoc->GetPage(1); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + + sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0)); + CPPUNIT_ASSERT( pTableObj ); + uno::Reference< table::XCellRange > xTable(pTableObj->getTable(), uno::UNO_QUERY_THROW); + uno::Reference< beans::XPropertySet > xCell; + sal_Int32 nColor; + + xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW); + xCell->getPropertyValue("FillColor") >>= nColor; + CPPUNIT_ASSERT_EQUAL(sal_Int32(5210557), nColor); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); commit 2e65f57008c464530edd9711a3ab314338f99633 Author: Andras Timar <[email protected]> Date: Mon Mar 30 21:37:47 2015 +0200 bnc#902652 OOXML: fix import of insets when shape and/or shape text is rotated 5ac575ee3e109 did not get it right, the vert attribute (i.e. the rotation of text) is relevant, not the rotation of the shape. In that case both text and shape rotation were 270 degrees. I checked that the bugdoc of bnc#773048 looked good after this. Change-Id: I6e0401cd138a82040df82d7da1a47311db7771e4 Reviewed-on: https://gerrit.libreoffice.org/15076 Tested-by: Jenkins <[email protected]> Reviewed-by: Andras Timar <[email protected]> (cherry picked from commit af686aa8694903bde5952656cd69993c8c8393d7) Reviewed-on: https://gerrit.libreoffice.org/15082 Tested-by: Andras Timar <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/oox/inc/drawingml/textbodyproperties.hxx b/oox/inc/drawingml/textbodyproperties.hxx index e6ed0fc..c7a98cb 100644 --- a/oox/inc/drawingml/textbodyproperties.hxx +++ b/oox/inc/drawingml/textbodyproperties.hxx @@ -45,7 +45,7 @@ struct TextBodyProperties explicit TextBodyProperties(); - void pushRotationAdjustments( sal_Int32 nRotation ); + void pushRotationAdjustments(); void pushVertSimulation(); }; diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index db36b56..81249e5 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -649,7 +649,7 @@ Reference< XShape > Shape::createAndInsert( // add properties from textbody to shape properties if( mpTextBody.get() ) { - mpTextBody->getTextProperties().pushRotationAdjustments( mnRotation ); + mpTextBody->getTextProperties().pushRotationAdjustments(); aShapeProps.assignUsed( mpTextBody->getTextProperties().maPropertyMap ); // Push char properties as well - specifically useful when this is a placeholder if( mpMasterTextListStyle && mpMasterTextListStyle->getListStyle()[0]->getTextCharacterProperties().moHeight.has() ) diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx index 9f146c6..f61330a 100644 --- a/oox/source/drawingml/textbodyproperties.cxx +++ b/oox/source/drawingml/textbodyproperties.cxx @@ -58,17 +58,17 @@ void TextBodyProperties::pushVertSimulation() } /* Push adjusted values, taking into consideration Shape Rotation */ -void TextBodyProperties::pushRotationAdjustments( sal_Int32 nRotation ) +void TextBodyProperties::pushRotationAdjustments() { sal_Int32 nOff = 0; sal_Int32 aProps[] = { PROP_TextLeftDistance, PROP_TextUpperDistance, PROP_TextRightDistance, PROP_TextLowerDistance }; sal_Int32 n = ( sal_Int32 )( sizeof( aProps ) / sizeof( sal_Int32 ) ); - switch( nRotation ) // TODO: What happens for part rotations ? + switch( moRotation.get(0) ) { - case (90*1*60000): nOff = 1; break; + case (90*1*60000): nOff = 3; break; case (90*2*60000): nOff = 2; break; - case (90*3*60000): nOff = 3; break; + case (90*3*60000): nOff = 1; break; default: break; } diff --git a/sd/qa/unit/data/n902652.pptx b/sd/qa/unit/data/n902652.pptx new file mode 100644 index 0000000..8726600 Binary files /dev/null and b/sd/qa/unit/data/n902652.pptx differ diff --git a/sd/qa/unit/data/xml/n902652_0.xml b/sd/qa/unit/data/xml/n902652_0.xml new file mode 100644 index 0000000..de8ed91 --- /dev/null +++ b/sd/qa/unit/data/xml/n902652_0.xml @@ -0,0 +1,309 @@ +<?xml version="1.0"?> +<XShapes> + <XShape positionX="899" positionY="9525" sizeX="9000" sizeY="4800" type="com.sun.star.drawing.CustomShape" name="Rounded Rectangle 3" text=" LibreOffice" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="3000" textRightDistance="500" textUpperDistance="300" textLowerDistance="3000" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName=""> + <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> + <FillBitmap width="32" height="32"/> + <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/> + <LineStart/> + <LineEnd/> + <Transformation> + <Line1 column1="0.000000" column2="4801.000000" column3="899.000000"/> + <Line2 column1="-9001.000000" column2="0.000000" column3="9525.000000"/> + <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> + </Transformation> + <CustomShapeGeometry> + <PropertyValue name="AdjustmentValues"> + <AdjustmentValues> + <EnhancedCustomShapeAdjustmentValue value="16667" propertyState="DIRECT_VALUE"/> + </AdjustmentValues> + </PropertyValue> + <PropertyValue name="Equations" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Handles" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="IsPostRotateAngle" value="true" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredX" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredY" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Path"> + <Path> + <PropertyValue name="Coordinates"> + <Coordinates> + <EnhancedCustomShapeParameterPair> + <First value="0" type="0"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="12" type="1"/> + <Second value="13" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="3" type="1"/> + <Second value="0" type="0"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="14" type="1"/> + <Second value="15" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="11" type="1"/> + <Second value="4" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="16" type="1"/> + <Second value="17" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="10" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="18" type="1"/> + <Second value="19" type="1"/> + </EnhancedCustomShapeParameterPair> + </Coordinates> + </PropertyValue> + <PropertyValue name="Segments"> + <Segments> + <EnhancedCustomShapeSegment command="1" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="4" count="0"/> + <EnhancedCustomShapeSegment command="5" count="0"/> + </Segments> + </PropertyValue> + <PropertyValue name="TextFrames" handle="0" propertyState="DIRECT_VALUE"/> + </Path> + </PropertyValue> + <PropertyValue name="TextPreRotateAngle" value="0" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Type" value="ooxml-roundRect" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="ViewBox"> + <ViewBox x="0" y="0" width="0" height="0"/> + </PropertyValue> + </CustomShapeGeometry> + </XShape> + <XShape positionX="15800" positionY="7848" sizeX="9000" sizeY="4800" type="com.sun.star.drawing.CustomShape" name="Rounded Rectangle 4" text=" LibreOffice" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="1000" textRightDistance="0" textUpperDistance="3000" textLowerDistance="300" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName=""> + <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> + <FillBitmap width="32" height="32"/> + <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/> + <LineStart/> + <LineEnd/> + <Transformation> + <Line1 column1="-9001.000000" column2="-0.000000" column3="15800.000000"/> + <Line2 column1="0.000000" column2="-4801.000000" column3="7848.000000"/> + <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> + </Transformation> + <CustomShapeGeometry> + <PropertyValue name="AdjustmentValues"> + <AdjustmentValues> + <EnhancedCustomShapeAdjustmentValue value="16667" propertyState="DIRECT_VALUE"/> + </AdjustmentValues> + </PropertyValue> + <PropertyValue name="Equations" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Handles" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="IsPostRotateAngle" value="true" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredX" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredY" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Path"> + <Path> + <PropertyValue name="Coordinates"> + <Coordinates> + <EnhancedCustomShapeParameterPair> + <First value="0" type="0"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="12" type="1"/> + <Second value="13" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="3" type="1"/> + <Second value="0" type="0"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="14" type="1"/> + <Second value="15" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="11" type="1"/> + <Second value="4" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="16" type="1"/> + <Second value="17" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="10" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="18" type="1"/> + <Second value="19" type="1"/> + </EnhancedCustomShapeParameterPair> + </Coordinates> + </PropertyValue> + <PropertyValue name="Segments"> + <Segments> + <EnhancedCustomShapeSegment command="1" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="4" count="0"/> + <EnhancedCustomShapeSegment command="5" count="0"/> + </Segments> + </PropertyValue> + <PropertyValue name="TextFrames" handle="0" propertyState="DIRECT_VALUE"/> + </Path> + </PropertyValue> + <PropertyValue name="TextPreRotateAngle" value="-90" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Type" value="ooxml-roundRect" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="ViewBox"> + <ViewBox x="0" y="0" width="0" height="0"/> + </PropertyValue> + </CustomShapeGeometry> + </XShape> + <XShape positionX="16224" positionY="14365" sizeX="9000" sizeY="4800" type="com.sun.star.drawing.CustomShape" name="Rounded Rectangle 5" text=" LibreOffice" fontHeight="18.000000" fontColor="ffffffff" textAutoGrowHeight="false" textAutoGrowWidth="false" textContourFrame="false" textFitToSize="NONE" textHorizontalAdjust="BLOCK" textVerticalAdjust="TOP" textLeftDistance="0" textRightDistance="1000" textUpperDistance="900" textLowerDistance="3000" textMaximumFrameHeight="0" textMaximumFrameWidth="0" textMinimumFrameHeight="0" textMinimumFrameWidth="0" textAnimationAmount="0" textAnimationCount="0" textAnimationDelay="0" textAnimationDirection="LEFT" textAnimationKind="NONE" textAnimationStartInside="false" textAnimationStopInside="false" textWritingMode="LR_TB" fillStyle="SOLID" fillColor="9bbb59" fillTransparence="0" fillTransparenceGradientName=""> + <FillTransparenceGradient style="LINEAR" startColor="000000" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillGradient style="LINEAR" startColor="3465a4" endColor="ffffff" angle="0" border="0" xOffset="50" yOffset="50" startIntensity="100" endIntensity="100" stepCount="0"/> + <FillHatch style="SINGLE" color="3465a4" distance="20" angle="0"/> + <FillBitmap width="32" height="32"/> + <LineDash style="RECT" dots="1" dotLen="20" dashes="1" dashLen="20" distance="20"/> + <LineStart/> + <LineEnd/> + <Transformation> + <Line1 column1="-9001.000000" column2="-0.000000" column3="16224.000000"/> + <Line2 column1="0.000000" column2="-4801.000000" column3="14365.000000"/> + <Line3 column1="0.000000" column2="0.000000" column3="1.000000"/> + </Transformation> + <CustomShapeGeometry> + <PropertyValue name="AdjustmentValues"> + <AdjustmentValues> + <EnhancedCustomShapeAdjustmentValue value="16667" propertyState="DIRECT_VALUE"/> + </AdjustmentValues> + </PropertyValue> + <PropertyValue name="Equations" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Handles" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="IsPostRotateAngle" value="true" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredX" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="MirroredY" value="false" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Path"> + <Path> + <PropertyValue name="Coordinates"> + <Coordinates> + <EnhancedCustomShapeParameterPair> + <First value="0" type="0"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="12" type="1"/> + <Second value="13" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="3" type="1"/> + <Second value="0" type="0"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="14" type="1"/> + <Second value="15" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="11" type="1"/> + <Second value="4" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="16" type="1"/> + <Second value="17" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="10" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="2" type="1"/> + <Second value="2" type="1"/> + </EnhancedCustomShapeParameterPair> + <EnhancedCustomShapeParameterPair> + <First value="18" type="1"/> + <Second value="19" type="1"/> + </EnhancedCustomShapeParameterPair> + </Coordinates> + </PropertyValue> + <PropertyValue name="Segments"> + <Segments> + <EnhancedCustomShapeSegment command="1" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="2" count="1"/> + <EnhancedCustomShapeSegment command="17" count="1"/> + <EnhancedCustomShapeSegment command="4" count="0"/> + <EnhancedCustomShapeSegment command="5" count="0"/> + </Segments> + </PropertyValue> + <PropertyValue name="TextFrames" handle="0" propertyState="DIRECT_VALUE"/> + </Path> + </PropertyValue> + <PropertyValue name="TextPreRotateAngle" value="-270" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="Type" value="ooxml-roundRect" handle="0" propertyState="DIRECT_VALUE"/> + <PropertyValue name="ViewBox"> + <ViewBox x="0" y="0" width="0" height="0"/> + </PropertyValue> + </CustomShapeGeometry> + </XShape> +</XShapes> diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index d374c73..a9d55c5 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -176,6 +176,7 @@ void SdImportTest::testDocumentLayout() { "n762695.pptx", "xml/n762695_", PPTX, -1 }, { "n593612.pptx", "xml/n593612_", PPTX, -1 }, { "fdo71434.pptx", "xml/fdo71434_", PPTX, -1 }, + { "n902652.pptx", "xml/n902652_", PPTX, -1 }, // { "pptx/n828390.pptx", "pptx/xml/n828390_", PPTX, PPTX }, // Example }; commit 03d5cb4f3920221e9c341d94f7a12610956a38d7 Author: Stephan Bergmann <[email protected]> Date: Wed Jan 21 14:51:11 2015 +0100 RotateAngle of UNO type long Change-Id: Id3aec16d17b55366c2a35810b21b0a1c73439741 (cherry picked from commit 44b2fb6d0ba8c3fc8aa6edb4e539c484e21b7fc5) diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index f71e03e..0721a1e 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2575,7 +2575,7 @@ DECLARE_OOXMLIMPORT_TEST(testFdo87488, "fdo87488.docx") { uno::Reference<beans::XPropertySet> props(group->getByIndex(0), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(props->getPropertyValue("RotateAngle"), - uno::makeAny(270 * 100)); + uno::makeAny<sal_Int32>(270 * 100)); comphelper::SequenceAsHashMap geom(props->getPropertyValue("CustomShapeGeometry")); CPPUNIT_ASSERT_EQUAL(sal_Int32(90), geom["TextPreRotateAngle"].get<sal_Int32>()); } commit 30fdc2ec6f634a161920ab6f8926b31c6fe51cdc Author: Eike Rathke <[email protected]> Date: Mon Mar 30 21:29:46 2015 +0200 Resolves: tdf#90301 string access out of bounds Apparently yet another leftover of UniString to OUString conversion where with UniString out-of-bounds accesses didn't harm and returned NIL. (cherry picked from commit eed393039a9067f7a1a318934ff1c5ff90bfe443) Include <algorithm> for std::min() (cherry picked from commit 3394ac816a573030feda145dbdabd2a1eabd78c4) 13ed47d23ed4b94501d9445555d99ce08af94698 Change-Id: Id88456a52df3fc8cdaf90d9d509e327b96269808 Reviewed-on: https://gerrit.libreoffice.org/15074 Tested-by: David Tardon <[email protected]> Reviewed-by: David Tardon <[email protected]> diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx index 6c999bd..9d9bda1 100644 --- a/formula/source/ui/dlg/FormulaHelper.cxx +++ b/formula/source/ui/dlg/FormulaHelper.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <algorithm> + #include "formula/formulahelper.hxx" #include <unotools/charclass.hxx> #include <unotools/syslocale.hxx> @@ -201,7 +203,7 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula, return nStart; sal_Int32 nFStart = FUNC_NOTFOUND; - sal_Int32 nParPos = nStart; + sal_Int32 nParPos = bBack ? ::std::min( nStart, nStrLen - 1) : nStart; bool bRepeat, bFound; do commit 7e087db949980d8bb365bd44b61d0ff2f8276f91 Author: Gary Houston <[email protected]> Date: Sat Dec 20 15:41:15 2014 +1100 fdo#87488 Wrong text rotation inside a preset shape from docx Preset shape text rotation values are read in a few places and stored in moRotation. With these changes, moRotation is always read unchanged, but multiplied by -1 when it's used. Change-Id: I633d665c21daa69e15fa828a43300f10d2bf2054 Reviewed-on: https://gerrit.libreoffice.org/13561 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> (cherry picked from commit 921cea89da8adbe714ea8f71169dd6afc42354c4) Signed-off-by: Andras Timar <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/15083 diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index f8fdda6..db36b56 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1011,7 +1011,10 @@ Reference< XShape > Shape::createAndInsert( if( getTextBody() ) { sal_Int32 nTextRotateAngle = static_cast< sal_Int32 >( getTextBody()->getTextProperties().moRotation.get( 0 ) ); - mpCustomShapePropertiesPtr->setTextRotateAngle( nTextRotateAngle / 60000 ); + /* OOX measures text rotation clockwise in 1/60000th degrees, + relative to the containing shape. setTextRotateAngle wants + degrees anticlockwise. */ + mpCustomShapePropertiesPtr->setTextRotateAngle( -1 * nTextRotateAngle / 60000 ); } SAL_INFO("oox.cscode", "==cscode== shape name: '" << msName << "'"); diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 89167b6..cc27437 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -84,13 +84,16 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper& rPa // ST_TextVerticalType if( rAttribs.hasAttribute( XML_vert ) ) { mrTextBodyProp.moVert = rAttribs.getToken( XML_vert ); - bool bRtl = rAttribs.getBool( XML_rtl, false ); sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz ); - if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) - mrTextBodyProp.moRotation = -5400000*(tVert==XML_vert270?3:1); - else + if (tVert == XML_vert || tVert == XML_eaVert || tVert == XML_mongolianVert) + mrTextBodyProp.moRotation = 5400000; + else if (tVert == XML_vert270) + mrTextBodyProp.moRotation = 5400000 * 3; + else { + bool bRtl = rAttribs.getBool( XML_rtl, false ); mrTextBodyProp.maPropertyMap.setProperty( PROP_TextWritingMode, ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB )); + } } // ST_TextAnchoringType diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx index a6a39eb..10bd727 100644 --- a/oox/source/drawingml/transform2dcontext.cxx +++ b/oox/source/drawingml/transform2dcontext.cxx @@ -48,7 +48,7 @@ Transform2DContext::Transform2DContext( ContextHandler2Helper& rParent, const At else { if( rAttribs.hasAttribute( XML_rot ) ) - mrShape.getTextBody()->getTextProperties().moRotation = -rAttribs.getInteger( XML_rot ).get(); + mrShape.getTextBody()->getTextProperties().moRotation = rAttribs.getInteger( XML_rot ).get(); } } diff --git a/sw/qa/extras/ooxmlimport/data/fdo87488.docx b/sw/qa/extras/ooxmlimport/data/fdo87488.docx new file mode 100644 index 0000000..2bd51b6 Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/fdo87488.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 471095c..f71e03e 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -76,13 +76,13 @@ public: virtual void preTest(const char* filename) SAL_OVERRIDE { - if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx") + if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx" || OString(filename) == "fdo87488.docx") SvtFilterOptions::Get().SetSmartArt2Shape(true); } virtual void postTest(const char* filename) SAL_OVERRIDE { - if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx") + if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx" || OString(filename) == "fdo87488.docx") SvtFilterOptions::Get().SetSmartArt2Shape(false); } }; @@ -2560,6 +2560,27 @@ DECLARE_OOXMLIMPORT_TEST(testChtOutlineNumberingOoxml, "chtoutline.docx") CPPUNIT_ASSERT_EQUAL(OUString(aExpectedSuffix,SAL_N_ELEMENTS(aExpectedSuffix)), aSuffix); } +DECLARE_OOXMLIMPORT_TEST(testFdo87488, "fdo87488.docx") +{ + // The shape on the right (index 0, CustomShape within a + // GroupShape) is rotated 90 degrees clockwise and contains text + // rotated 90 degrees anticlockwise. Must be read with SmartArt + // enabled in preTest above, otherwise it gets converted to a + // StarView MetaFile. + uno::Reference<container::XIndexAccess> group(getShape(1), uno::UNO_QUERY); + { + uno::Reference<text::XTextRange> text(group->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("text2"), text->getString()); + } + { + uno::Reference<beans::XPropertySet> props(group->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(props->getPropertyValue("RotateAngle"), + uno::makeAny(270 * 100)); + comphelper::SequenceAsHashMap geom(props->getPropertyValue("CustomShapeGeometry")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(90), geom["TextPreRotateAngle"].get<sal_Int32>()); + } +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); commit 3dc6716d8f180e9ff8588d1d73d5a520a2628cbb Author: Laurent Godard <[email protected]> Date: Fri Mar 20 12:02:31 2015 +0100 tdf#90042 only handle formula group if useful Reviewed-on: https://gerrit.libreoffice.org/14920 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> (cherry picked from commit c79bdd062f657d1be98aa815d9b882d144f35e04) only handle formula group if useful, tdf#90042 related Same as in ScDocument::SetString() as changed with c79bdd062f657d1be98aa815d9b882d144f35e04, do it similar in ScDocument::SetValue() (cherry picked from commit 02bea75dd6bc91759e987fafb5dccec6ce92b0c2) 7c666b176062c81a8a74cb49f345408c1060d973 Change-Id: I497a5bae4b08b46357415501ddbafc70585adfb0 Reviewed-on: https://gerrit.libreoffice.org/15036 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Markus Mohrhard <[email protected]> diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index b9307c1..ff5ffe7 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -3204,19 +3204,29 @@ bool ScDocument::SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& if (!pTab) return false; - // In case setting this string affects an existing formula group, record - // its above and below position for later listening. + bool bNumFmtSet = false; - std::vector<ScAddress> aGroupPos; - sc::EndListeningContext aCxt(*this); - ScAddress aPos(nCol, nRow, nTab); - EndListeningIntersectedGroup(aCxt, aPos, &aGroupPos); - aCxt.purgeEmptyBroadcasters(); + const ScFormulaCell* pCurCellFormula = pTab->GetFormulaCell(nCol, nRow); + if (pCurCellFormula && pCurCellFormula->IsShared()) + { + // In case setting this string affects an existing formula group, record + // its above and below position for later listening. - bool bNumFmtSet = pTab->SetString(nCol, nRow, nTab, rString, pParam); + std::vector<ScAddress> aGroupPos; + sc::EndListeningContext aCxt(*this); + ScAddress aPos(nCol, nRow, nTab); + EndListeningIntersectedGroup(aCxt, aPos, &aGroupPos); + aCxt.purgeEmptyBroadcasters(); - SetNeedsListeningGroups(aGroupPos); - StartNeededListeners(); + bNumFmtSet = pTab->SetString(nCol, nRow, nTab, rString, pParam); + + SetNeedsListeningGroups(aGroupPos); + StartNeededListeners(); + } + else + { + bNumFmtSet = pTab->SetString(nCol, nRow, nTab, rString, pParam); + } return bNumFmtSet; } @@ -3303,18 +3313,26 @@ void ScDocument::SetValue( const ScAddress& rPos, double fVal ) if (!pTab) return; - // In case setting this string affects an existing formula group, record - // its above and below position for later listening. + const ScFormulaCell* pCurCellFormula = pTab->GetFormulaCell(rPos.Col(), rPos.Row()); + if (pCurCellFormula && pCurCellFormula->IsShared()) + { + // In case setting this string affects an existing formula group, record + // its above and below position for later listening. - std::vector<ScAddress> aGroupPos; - sc::EndListeningContext aCxt(*this); - EndListeningIntersectedGroup(aCxt, rPos, &aGroupPos); - aCxt.purgeEmptyBroadcasters(); + std::vector<ScAddress> aGroupPos; + sc::EndListeningContext aCxt(*this); + EndListeningIntersectedGroup(aCxt, rPos, &aGroupPos); + aCxt.purgeEmptyBroadcasters(); - pTab->SetValue(rPos.Col(), rPos.Row(), fVal); + pTab->SetValue(rPos.Col(), rPos.Row(), fVal); - SetNeedsListeningGroups(aGroupPos); - StartNeededListeners(); + SetNeedsListeningGroups(aGroupPos); + StartNeededListeners(); + } + else + { + pTab->SetValue(rPos.Col(), rPos.Row(), fVal); + } } OUString ScDocument::GetString( SCCOL nCol, SCROW nRow, SCTAB nTab ) const commit 2e2a4ff6468e31374b63fd5165eb019343bc73d0 Author: Katarina Behrens <[email protected]> Date: Fri Mar 27 16:03:11 2015 +0100 tdf#89597: Resize formula buffers after adding a dummy sheet for pivot table cache records. Regression from commit d17a83fa549f828f29e6939. On loading pivot table cache records, a dummy sheet is created to store them. Formula buffers are now vectors, not maps and need to be resized in such case. + add a const version of getDocImport method, need to use it in the new getAllSheetCount method Change-Id: I5d57a822da5fe5a97029b83406e8ff877a5dbd7c Reviewed-on: https://gerrit.libreoffice.org/15030 Reviewed-by: Markus Mohrhard <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/sc/source/filter/inc/workbookhelper.hxx b/sc/source/filter/inc/workbookhelper.hxx index 90fdca4..e2d26a5 100644 --- a/sc/source/filter/inc/workbookhelper.hxx +++ b/sc/source/filter/inc/workbookhelper.hxx @@ -149,6 +149,7 @@ public: const ScDocument& getScDocument() const; ScDocumentImport& getDocImport(); + const ScDocumentImport& getDocImport() const; ScEditEngineDefaulter& getEditEngine() const; /** Returns a reference to the source/target spreadsheet document model. */ diff --git a/sc/source/filter/inc/worksheetbuffer.hxx b/sc/source/filter/inc/worksheetbuffer.hxx index 69fafa1..35e9c66 100644 --- a/sc/source/filter/inc/worksheetbuffer.hxx +++ b/sc/source/filter/inc/worksheetbuffer.hxx @@ -24,6 +24,7 @@ #include <oox/helper/refmap.hxx> #include <oox/helper/refvector.hxx> #include "workbookhelper.hxx" +#include "documentimport.hxx" namespace com { namespace sun { namespace star { namespace i18n { class XCharacterClassification; } @@ -65,6 +66,8 @@ public: /** Returns the number of original sheets contained in the workbook. */ sal_Int32 getWorksheetCount() const; + /** Returns the number of all sheets, workbook + dummy ones (pivot table cache records ) */ + sal_Int32 getAllSheetCount() const; /** Returns the OOXML relation identifier of the specified worksheet. */ OUString getWorksheetRelId( sal_Int32 nWorksheet ) const; diff --git a/sc/source/filter/oox/pivotcachefragment.cxx b/sc/source/filter/oox/pivotcachefragment.cxx index d6ee51d..e90656c 100644 --- a/sc/source/filter/oox/pivotcachefragment.cxx +++ b/sc/source/filter/oox/pivotcachefragment.cxx @@ -23,7 +23,9 @@ #include <oox/helper/attributelist.hxx> #include "addressconverter.hxx" #include "biffinputstream.hxx" +#include "formulabuffer.hxx" #include "pivotcachebuffer.hxx" +#include "worksheetbuffer.hxx" namespace oox { namespace xls { @@ -210,8 +212,12 @@ PivotCacheRecordsFragment::PivotCacheRecordsFragment( const WorksheetHelper& rHe mnRowIdx( 0 ), mbInRecord( false ) { + sal_Int32 nSheetCount = rPivotCache.getWorksheets().getAllSheetCount(); + // prepare sheet: insert column header names into top row rPivotCache.writeSourceHeaderCells( *this ); + // resize formula buffers since we've added a new dummy sheet + rHelper.getFormulaBuffer().SetSheetCount( nSheetCount ); } ContextHandlerRef PivotCacheRecordsFragment::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index 0dc581b..d76c2a6 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -794,6 +794,11 @@ ScDocumentImport& WorkbookHelper::getDocImport() return mrBookGlob.getDocImport(); } +const ScDocumentImport& WorkbookHelper::getDocImport() const +{ + return mrBookGlob.getDocImport(); +} + ScEditEngineDefaulter& WorkbookHelper::getEditEngine() const { return mrBookGlob.getEditEngine(); diff --git a/sc/source/filter/oox/worksheetbuffer.cxx b/sc/source/filter/oox/worksheetbuffer.cxx index 85385aa..4bac44f 100644 --- a/sc/source/filter/oox/worksheetbuffer.cxx +++ b/sc/source/filter/oox/worksheetbuffer.cxx @@ -84,6 +84,12 @@ sal_Int32 WorksheetBuffer::getWorksheetCount() const return static_cast< sal_Int32 >( maSheetInfos.size() ); } +sal_Int32 WorksheetBuffer::getAllSheetCount() const +{ + const ScDocumentImport& rDoc = getDocImport(); + return rDoc.getSheetCount(); +} + OUString WorksheetBuffer::getWorksheetRelId( sal_Int32 nWorksheet ) const { const SheetInfo* pSheetInfo = maSheetInfos.get( nWorksheet ).get(); commit f359428a12ef083f057bc1559a8dbda633dfa9e0 Author: Andras Timar <[email protected]> Date: Sun Mar 29 21:05:49 2015 +0200 system mdds >= 0.11.2 is required Change-Id: If364a1180a25f69cb04d04a37c2b94a341a96d16 Reviewed-on: https://gerrit.libreoffice.org/15058 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/configure.ac b/configure.ac index d09cc5a..cfaf3a7 100644 --- a/configure.ac +++ b/configure.ac @@ -8519,7 +8519,7 @@ AC_SUBST(SYSTEM_BOOST) dnl =================================================================== dnl Check for system mdds dnl =================================================================== -libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds >= 0.10.3], ["-I${WORKDIR}/UnpackedTarball/mdds/include"]) +libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds >= 0.11.2], ["-I${WORKDIR}/UnpackedTarball/mdds/include"]) dnl =================================================================== dnl Check for system glm commit b12a71f374e99b44e2991b7fbaebd419e86c8b49 Author: Caolán McNamara <[email protected]> Date: Thu Mar 26 13:37:10 2015 +0000 Resolves: tdf#90256 repair invalid docking positions Change-Id: If144a867dc4be6975c08cd1eea9ebb540975aafc (cherry picked from commit 3c22024f41029dd4c1dca6b265d1fd0f14fc2f95) Reviewed-on: https://gerrit.libreoffice.org/15020 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index e8d466b..5fd00ba 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -525,8 +525,15 @@ bool LayoutManager::readWindowStateData( const OUString& aName, UIElement& rElem else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_DOCKPOS ) { awt::Point aPoint; - if ( aWindowState[n].Value >>= aPoint ) + if (aWindowState[n].Value >>= aPoint) + { + //tdf#90256 repair these broken Docking positions + if (aPoint.X < 0) + aPoint.X = SAL_MAX_INT32; + if (aPoint.Y < 0) + aPoint.Y = SAL_MAX_INT32; rElementData.m_aDockedData.m_aPos = aPoint; + } } else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_POS ) {
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
