diff options
Diffstat (limited to 'sw/source/uibase/dbui/dbmgr.cxx')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 623b933c0ef4..28a5d9de6712 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -193,22 +193,6 @@ bool lcl_getCountFromResultSet( sal_Int32& rCount, const uno::Reference<XResultS } return false; } -// copy compatibility options -void lcl_CopyCompatibilityOptions( SwWrtShell& rSourceShell, SwWrtShell& rTargetShell) -{ - IDocumentSettingAccess* pIDsa = rSourceShell.getIDocumentSettingAccess(); - - rTargetShell.SetParaSpaceMax( pIDsa->get(IDocumentSettingAccess::PARA_SPACE_MAX)); - rTargetShell.SetParaSpaceMaxAtPages(pIDsa->get(IDocumentSettingAccess::PARA_SPACE_MAX_AT_PAGES)); - rTargetShell.SetTabCompat( pIDsa->get(IDocumentSettingAccess::TAB_COMPAT)); - rTargetShell.SetAddExtLeading( pIDsa->get(IDocumentSettingAccess::ADD_EXT_LEADING)); - rTargetShell.SetUseVirDev( pIDsa->get(IDocumentSettingAccess::USE_VIRTUAL_DEVICE)); - rTargetShell.SetAddParaSpacingToTableCells( pIDsa->get(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS)); - rTargetShell.SetUseFormerLineSpacing( pIDsa->get(IDocumentSettingAccess::OLD_LINE_SPACING)); - rTargetShell.SetUseFormerObjectPositioning( pIDsa->get(IDocumentSettingAccess::USE_FORMER_OBJECT_POS)); - rTargetShell.SetConsiderWrapOnObjPos( pIDsa->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION)); - rTargetShell.SetUseFormerTextWrapping( pIDsa->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING)); -} } class SwConnectionDisposedListener_Impl : public cppu::WeakImplHelper1 @@ -753,35 +737,6 @@ static OUString lcl_FindUniqueName(SwWrtShell* pTargetShell, const OUString& rSt }while(true); } -static void lcl_CopyDynamicDefaults( const SwDoc& rSource, SwDoc& rTarget ) -{ - sal_uInt16 aRangeOfDefaults[] = { - RES_FRMATR_BEGIN, RES_FRMATR_END-1, - RES_CHRATR_BEGIN, RES_CHRATR_END-1, - RES_PARATR_BEGIN, RES_PARATR_END-1, - RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1, - RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, - 0 - }; - - SfxItemSet aNewDefaults( rTarget.GetAttrPool(), aRangeOfDefaults ); - - sal_uInt16 nWhich; - sal_uInt16 nRange = 0; - while( aRangeOfDefaults[nRange] != 0) - { - for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich ) - { - const SfxPoolItem& rSourceAttr = rSource.GetDefault( nWhich ); - if( rSourceAttr != rTarget.GetDefault( nWhich ) ) - aNewDefaults.Put( rSourceAttr ); - } - nRange += 2; - } - if( aNewDefaults.Count() ) - rTarget.SetDefault( aNewDefaults ); -} - static void lcl_CopyFollowPageDesc( SwWrtShell& rTargetShell, const SwPageDesc& rSourcePageDesc, @@ -1030,9 +985,9 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, rMaster.GetFooter().IsActive(); // copy compatibility options - lcl_CopyCompatibilityOptions( *pSourceShell, *pTargetShell); + pTargetShell->GetDoc()->ReplaceCompatabilityOptions( *pTargetShell->GetDoc()); // #72821# copy dynamic defaults - lcl_CopyDynamicDefaults( *pSourceShell->GetDoc(), *pTargetShell->GetDoc() ); + pTargetShell->GetDoc()->ReplaceDefaults( *pSourceShell->GetDoc()); lcl_CopyDocumentPorperties( xSourceDocProps, xTargetDocShell, pTargetDoc ); } |