diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-07-28 18:40:13 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-07-28 18:40:13 +0200 |
commit | e63d5d1e183d7d2347484b811912201fb468367c (patch) | |
tree | d5ba2671000393e9e72b94eca7edd6c834341604 | |
parent | 8a1e355e1fb1f64ca5b2763d975fcfd9cdfcd374 (diff) | |
parent | 04e35708aaa625d180a5bb42591470508c40c522 (diff) |
Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/writer
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 21 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmaddressblockpage.cxx | 36 |
4 files changed, 37 insertions, 32 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index c4d348aa0b..830839e920 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -473,12 +473,12 @@ SwFrmFmt *SwDoc::CopyLayoutFmt( const SwFrmFmt& rSource, // sorge dafuer das auch Fly's in Fly's kopiert werden aIdx = *pSttNd->EndOfSectionNode(); - bool bDrawingLayerUndoState = GetIDocumentUndoRedo().DoesDrawUndo(); - //fdo#36631 disable any undo operations associated with the contact - //object itself. They should be managed by SwUndoInsLayFmt. - GetIDocumentUndoRedo().DoDrawUndo(false); + + //fdo#36631 disable (scoped) any undo operations associated with the + //contact object itself. They should be managed by SwUndoInsLayFmt. + const ::sw::DrawUndoGuard drawUndoGuard(GetIDocumentUndoRedo()); + pSrcDoc->CopyWithFlyInFly( aRg, 0, aIdx, sal_False, sal_True, sal_True ); - GetIDocumentUndoRedo().DoDrawUndo(bDrawingLayerUndoState); } else { diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index fff58acc04..0444a13599 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -74,6 +74,7 @@ #include <com/sun/star/table/ShadowFormat.hpp> #include <com/sun/star/table/TableBorder.hpp> #include <com/sun/star/table/BorderLine2.hpp> +#include <com/sun/star/table/BorderLineStyle.hpp> #include <com/sun/star/table/TableBorderDistances.hpp> #include <com/sun/star/style/PageStyleLayout.hpp> #include <com/sun/star/style/BreakType.hpp> @@ -136,20 +137,14 @@ table::BorderLine lcl_SvxLineToLine(const SvxBorderLine* pLine) sal_Bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine) { - const table::BorderLine2& rLine2 = static_cast< const table::BorderLine2& >( rLine ); - rSvxLine.SetColor( Color(rLine.Color)); + rSvxLine.SetColor(Color(rLine.Color)); - if ( rLine2.LineWidth > 0 ) - { - rSvxLine.SetStyle( editeng::SvxBorderStyle( rLine2.LineStyle ) ); - rSvxLine.SetWidth( MM100_TO_TWIP_UNSIGNED( rLine2.LineWidth ) ); - } - else - rSvxLine.GuessLinesWidths( editeng::SvxBorderStyle( rLine2.LineStyle ), - MM100_TO_TWIP( rLine.OuterLineWidth ), - MM100_TO_TWIP( rLine.InnerLineWidth ), - MM100_TO_TWIP( rLine.LineDistance ) ); - sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0 || rLine2.LineWidth > 0; + rSvxLine.GuessLinesWidths( editeng::SvxBorderStyle(table::BorderLineStyle::SOLID), + MM100_TO_TWIP( rLine.OuterLineWidth ), + MM100_TO_TWIP( rLine.InnerLineWidth ), + MM100_TO_TWIP( rLine.LineDistance ) ); + + sal_Bool bRet = rLine.InnerLineWidth > 0 || rLine.OuterLineWidth > 0; return bRet; } diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index f715359023..26a4bc32c1 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1705,6 +1705,8 @@ void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO, { rStyleInf.nLFOIndex = nActLFO; rStyleInf.nListLevel = nActLevel; + if (nActLevel > 0) // it must be an outline list + rStyleInf.nOutlineLevel = nActLevel; if ( (USHRT_MAX > nActLFO) && diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index c785c96b04..126b4ed3f1 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -44,6 +44,7 @@ #include <com/sun/star/sdb/XColumn.hpp> #include <vector> +#include <boost/scoped_ptr.hpp> #include <mmaddressblockpage.hrc> #include <dbui.hrc> #include <helpid.h> @@ -174,22 +175,29 @@ sal_Bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitP IMPL_LINK(SwMailMergeAddressBlockPage, AddressListHdl_Impl, PushButton*, EMPTYARG) { - SwAddressListDialog* pAddrDialog = new SwAddressListDialog(this); - if(RET_OK == pAddrDialog->Execute()) + try { - SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); - rConfigItem.SetCurrentConnection( - pAddrDialog->GetSource(), - pAddrDialog->GetConnection(), - pAddrDialog->GetColumnsSupplier(), - pAddrDialog->GetDBData()); - ::rtl::OUString sFilter = pAddrDialog->GetFilter(); - rConfigItem.SetFilter( sFilter ); - InsertDataHdl_Impl(0); - GetWizard()->UpdateRoadmap(); - GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); + boost::scoped_ptr<SwAddressListDialog> xAddrDialog(new SwAddressListDialog(this)); + if(RET_OK == xAddrDialog->Execute()) + { + SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); + rConfigItem.SetCurrentConnection( + xAddrDialog->GetSource(), + xAddrDialog->GetConnection(), + xAddrDialog->GetColumnsSupplier(), + xAddrDialog->GetDBData()); + ::rtl::OUString sFilter = xAddrDialog->GetFilter(); + rConfigItem.SetFilter( sFilter ); + InsertDataHdl_Impl(0); + GetWizard()->UpdateRoadmap(); + GetWizard()->enableButtons(WZB_NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); + } + } + catch (const uno::Exception& e) + { + OSL_FAIL(rtl::OUStringToOString(e.Message, osl_getThreadTextEncoding())); + ErrorBox(this, WB_OK, e.Message).Execute(); } - delete pAddrDialog; return 0; } |