cui/source/tabpages/tabarea.cxx | 2 +- cui/source/tabpages/tpcolor.cxx | 4 +--- sw/source/core/doc/docnew.cxx | 8 -------- sw/source/uibase/app/docshdrw.cxx | 14 +++++++++++++- 4 files changed, 15 insertions(+), 13 deletions(-)
New commits: commit 76631b6b9147dd83006a6382441d311f668f3286 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 11 14:08:19 2014 +0100 Resolves: fdo#81147 fix mismatching drawlayer and docshell colorlists a bit of mis-merge + a bit of underlying crashiness regression from 378dc6ef20ffd0e657d78dbf6646d48059be4045 Change-Id: Id0f7b6b6f13e1ec70dc900c21d2d020a44cf6081 diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 9ebd797..60a4df3 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -678,14 +678,6 @@ void SwDoc::SetDocShell( SwDocShell* pDSh ) mpLinkMgr->SetPersist( mpDocShell ); - if( GetDocumentDrawModelManager().GetDrawModel() ) - { - GetDocumentDrawModelManager().GetDrawModel()->SetObjectShell( mpDocShell ); - GetDocumentDrawModelManager().GetDrawModel()->SetPersist( mpDocShell ); - OSL_ENSURE( GetDocumentDrawModelManager().GetDrawModel()->GetPersist() == GetPersist(), - "draw model's persist is out of sync" ); - } - // set DocShell pointer also on DrawModel InitDrawModelAndDocShell(mpDocShell, GetDocumentDrawModelManager().GetDrawModel()); OSL_ENSURE(!GetDocumentDrawModelManager().GetDrawModel() || diff --git a/sw/source/uibase/app/docshdrw.cxx b/sw/source/uibase/app/docshdrw.cxx index 2fcfac1..00e7c2d 100644 --- a/sw/source/uibase/app/docshdrw.cxx +++ b/sw/source/uibase/app/docshdrw.cxx @@ -63,7 +63,19 @@ void InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel* pSwDrawDocum else { // Use the ColorTable which is used at the DrawingLayer's SdrModel - pSwDocShell->PutItem(SvxColorListItem(pSwDrawDocument->GetColorList(), SID_COLOR_TABLE)); + XColorListRef xColorList = pSwDrawDocument->GetColorList(); + if (xColorList.is()) + { + pSwDocShell->PutItem(SvxColorListItem(xColorList, SID_COLOR_TABLE)); + } + else + { + // there wasn't one, get the standard and set to the + // docshell and then to the drawdocument + xColorList = XColorList::GetStdColorList(); + pSwDocShell->PutItem(SvxColorListItem(xColorList, SID_COLOR_TABLE)); + pSwDrawDocument->SetPropertyList(xColorList.get()); + } } // add other tables in SfxItemSet of the DocShell commit 86de78ce5076ed00c6ad19eae7ab6da7c7a91196 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 11 14:07:53 2014 +0100 Related: fdo#81147 check if colorlist is valid Change-Id: Ifd48526974b7fcb10872d53d42e26add3fe878d1 diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index 3fcdbce..3d3b3f8 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -191,7 +191,7 @@ void SvxAreaTabDialog::SavePalettes() } } - if( mnColorListState & CT_MODIFIED ) + if (mnColorListState & CT_MODIFIED && mpColorList.is()) { mpColorList->SetPath( aPath ); mpColorList->Save(); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 52ead23..5c2ecd7 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -584,15 +584,13 @@ bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet ) void SvxColorTabPage::UpdateModified() { - bool bEnable = pColorList->Count(); + bool bEnable = pColorList.is() && pColorList->Count(); m_pBtnModify->Enable( bEnable ); m_pBtnWorkOn->Enable( bEnable ); m_pBtnDelete->Enable( bEnable ); EnableSave( bEnable ); } - - void SvxColorTabPage::Reset( const SfxItemSet* rSet ) { sal_uInt16 nState = rSet->GetItemState( XATTR_FILLCOLOR );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits