[Libreoffice-commits] .: 2 commits - sw/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Tue Jul 3 07:27:33 PDT 2012
sw/source/core/doc/docdesc.cxx | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
New commits:
commit 3a60e6ddd9546db53796fa0a32801d9b6a16c293
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Jul 3 16:11:08 2012 +0200
sw: missing RES_FRAMEDIR in SwPageDesc::aFirst's itemset
Change-Id: I695dae12060de2d7ec20ca222b8eadf93a6e9d79
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index ed700a5..0ae1093 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -419,6 +419,7 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
// Take over the page attributes.
::lcl_DescSetAttr( rChged.GetMaster(), pDesc->GetMaster() );
::lcl_DescSetAttr( rChged.GetLeft(), pDesc->GetLeft() );
+ ::lcl_DescSetAttr( rChged.GetFirst(), pDesc->GetFirst() );
// If the FootnoteInfo changes, the pages are triggered.
if( !(pDesc->GetFtnInfo() == rChged.GetFtnInfo()) )
@@ -431,6 +432,9 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
{
pDesc->GetLeft().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
}
+ {
+ pDesc->GetFirst().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
+ }
}
SetModified();
@@ -573,6 +577,7 @@ sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
pNew->GetMaster().SetFmtAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
pNew->GetLeft().SetFmtAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
+ pNew->GetFirst().SetFmtAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) );
}
aPageDescs.push_back( pNew );
commit 84a9c3ff504218683d0391d3dfe7491eb043a2b5
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Jul 3 14:37:21 2012 +0200
SwDoc: initialize first page format as well
Change-Id: I788584d4e32731b7bc76086df88640b59f27dfc1
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 0d3073f..ed700a5 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -78,7 +78,8 @@ using namespace com::sun::star;
static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId,
SwFrmFmt &rFmt1,
- SwFrmFmt &rFmt2 )
+ SwFrmFmt &rFmt2,
+ SwFrmFmt &rFmt3 )
{
// --> #i41075# Printer on demand
// This function does not require a printer anymore.
@@ -130,6 +131,10 @@ static void lcl_DefaultPageFmt( sal_uInt16 nPoolFmtId,
rFmt2.SetFmtAttr( aFrmSize );
rFmt2.SetFmtAttr( aLR );
rFmt2.SetFmtAttr( aUL );
+
+ rFmt3.SetFmtAttr( aFrmSize );
+ rFmt3.SetFmtAttr( aLR );
+ rFmt3.SetFmtAttr( aUL );
}
/*************************************************************************
@@ -560,7 +565,7 @@ sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy,
{
pNew = new SwPageDesc( rName, GetDfltFrmFmt(), this );
// Set the default page format.
- lcl_DefaultPageFmt( USHRT_MAX, pNew->GetMaster(), pNew->GetLeft() );
+ lcl_DefaultPageFmt( USHRT_MAX, pNew->GetMaster(), pNew->GetLeft(), pNew->GetFirst() );
SvxFrameDirection aFrameDirection = bRegardLanguage ?
GetDefaultFrameDirection(GetAppLanguage())
@@ -868,7 +873,7 @@ void SwDoc::CheckDefaultPageFmt()
LONG_MAX == rLeftSize.GetHeight();
if ( bSetSize )
- lcl_DefaultPageFmt( rDesc.GetPoolFmtId(), rDesc.GetMaster(), rDesc.GetLeft() );
+ lcl_DefaultPageFmt( rDesc.GetPoolFmtId(), rDesc.GetMaster(), rDesc.GetLeft(), rDesc.GetFirst() );
}
}
More information about the Libreoffice-commits
mailing list