Kaydet (Commit) 105ddd12 authored tarafından Luboš Luňák's avatar Luboš Luňák

long live code duplication

Change-Id: I7386c26e5ff05cec23a6cccb86ed3aa6ab715096
üst 54024383
...@@ -193,22 +193,6 @@ bool lcl_getCountFromResultSet( sal_Int32& rCount, const uno::Reference<XResultS ...@@ -193,22 +193,6 @@ bool lcl_getCountFromResultSet( sal_Int32& rCount, const uno::Reference<XResultS
} }
return false; 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 class SwConnectionDisposedListener_Impl : public cppu::WeakImplHelper1
...@@ -753,35 +737,6 @@ static OUString lcl_FindUniqueName(SwWrtShell* pTargetShell, const OUString& rSt ...@@ -753,35 +737,6 @@ static OUString lcl_FindUniqueName(SwWrtShell* pTargetShell, const OUString& rSt
}while(true); }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( static void lcl_CopyFollowPageDesc(
SwWrtShell& rTargetShell, SwWrtShell& rTargetShell,
const SwPageDesc& rSourcePageDesc, const SwPageDesc& rSourcePageDesc,
...@@ -1030,9 +985,9 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, ...@@ -1030,9 +985,9 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
rMaster.GetFooter().IsActive(); rMaster.GetFooter().IsActive();
// copy compatibility options // copy compatibility options
lcl_CopyCompatibilityOptions( *pSourceShell, *pTargetShell); pTargetShell->GetDoc()->ReplaceCompatabilityOptions( *pTargetShell->GetDoc());
// #72821# copy dynamic defaults // #72821# copy dynamic defaults
lcl_CopyDynamicDefaults( *pSourceShell->GetDoc(), *pTargetShell->GetDoc() ); pTargetShell->GetDoc()->ReplaceDefaults( *pSourceShell->GetDoc());
lcl_CopyDocumentPorperties( xSourceDocProps, xTargetDocShell, pTargetDoc ); lcl_CopyDocumentPorperties( xSourceDocProps, xTargetDocShell, pTargetDoc );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment