[Libreoffice-commits] .: 2 commits - sw/inc sw/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Tue Jul 3 05:12:11 PDT 2012
sw/inc/pagedesc.hxx | 15 +++++++++++++--
sw/source/core/doc/doclay.cxx | 2 +-
sw/source/core/text/xmldump.cxx | 6 +++---
3 files changed, 17 insertions(+), 6 deletions(-)
New commits:
commit 9cfa2b97cc286a06fe14223abb41ead772b17ad5
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Jul 3 14:11:32 2012 +0200
sw: include footer type in layout dump, now really
Change-Id: Ie4b5d04824316c03e7a0b5bdb9d04bd42fad5f88
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 5dbff90..2273fd7 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -149,7 +149,7 @@ SwFrmFmt *SwDoc::MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet )
case RND_STD_FOOTERR:
{
pFmt = new SwFrmFmt( GetAttrPool(),
- (bHeader ? "Header" : "Footer"),
+ (bHeader ? "Right header" : "Right footer"),
GetDfltFrmFmt() );
SwNodeIndex aTmpIdx( GetNodes().GetEndOfAutotext() );
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 5818f20..6bcf270 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -368,10 +368,10 @@ void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
SwTxtNode *pTxtNode = pTxtFrm->GetTxtNode();
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "txtNodeIndex" ), "%lu", pTxtNode->GetIndex() );
}
- if (IsHeaderFrm())
+ if (IsHeaderFrm() || IsFooterFrm())
{
- SwHeaderFrm *pHeaderFrm = (SwHeaderFrm*)this;
- rtl::OUString aFmtName = pHeaderFrm->GetFmt()->GetName();
+ SwHeadFootFrm *pHeadFootFrm = (SwHeadFootFrm*)this;
+ rtl::OUString aFmtName = pHeadFootFrm->GetFmt()->GetName();
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtName" ), "%s", BAD_CAST(rtl::OUStringToOString(aFmtName, RTL_TEXTENCODING_UTF8).getStr()));
}
}
commit fa0f42bafbf24e9141ddee728b160b5ab47077f2
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Tue Jul 3 11:41:13 2012 +0200
SwPageDesc: add GetFirstFmt methods
Change-Id: Id0e1185950446d0c9b7159a406315540956baed1
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 08e55c0..be9073c 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -127,8 +127,9 @@ namespace nsUseOnPage
const UseOnPage PD_NONE = 0x0000; // For internal use only.
const UseOnPage PD_LEFT = 0x0001;
const UseOnPage PD_RIGHT = 0x0002;
- const UseOnPage PD_ALL = 0x0003;
- const UseOnPage PD_MIRROR = 0x0007;
+ const UseOnPage PD_FIRST = 0x0004;
+ const UseOnPage PD_ALL = 0x0007;
+ const UseOnPage PD_MIRROR = 0x000F;
const UseOnPage PD_HEADERSHARE = 0x0040;
const UseOnPage PD_FOOTERSHARE = 0x0080;
const UseOnPage PD_NOHEADERSHARE = 0x00BF; // For internal use only.
@@ -217,6 +218,8 @@ public:
inline const SwFrmFmt *GetRightFmt() const;
inline SwFrmFmt *GetLeftFmt();
inline const SwFrmFmt *GetLeftFmt() const;
+ inline SwFrmFmt *GetFirstFmt();
+ inline const SwFrmFmt *GetFirstFmt() const;
sal_uInt16 GetRegHeight() const { return nRegHeight; }
sal_uInt16 GetRegAscent() const { return nRegAscent; }
@@ -326,6 +329,14 @@ inline const SwFrmFmt *SwPageDesc::GetLeftFmt() const
{
return nsUseOnPage::PD_LEFT & eUse ? &aLeft : 0;
}
+inline SwFrmFmt *SwPageDesc::GetFirstFmt()
+{
+ return nsUseOnPage::PD_FIRST & eUse ? &aFirst : 0;
+}
+inline const SwFrmFmt *SwPageDesc::GetFirstFmt() const
+{
+ return nsUseOnPage::PD_FIRST & eUse ? &aFirst : 0;
+}
class SwPageDescExt
{
More information about the Libreoffice-commits
mailing list