diff options
-rw-r--r-- | sw/source/filter/ww8/writerwordglue.hxx | 81 |
1 files changed, 78 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/writerwordglue.hxx b/sw/source/filter/ww8/writerwordglue.hxx index 0083d0a25be2..a51e57cdb85d 100644 --- a/sw/source/filter/ww8/writerwordglue.hxx +++ b/sw/source/filter/ww8/writerwordglue.hxx @@ -2,9 +2,9 @@ * * $RCSfile: writerwordglue.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: obo $ $Date: 2003-09-01 12:40:10 $ + * last change: $Author: kz $ $Date: 2003-12-09 11:54:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,8 +66,17 @@ #define SW_WRITERWORDGLUE #ifndef WW_NEEDED_CAST_HXX -#include "needed_cast.hxx" +# include "needed_cast.hxx" #endif +#ifndef WW_TYPES +# include "types.hxx" +#endif + +class SwFrmFmt; +class SfxItemSet; +class SwDoc; +class SwTxtFmtColl; +class String; namespace sw { @@ -144,6 +153,72 @@ namespace sw */ long SnapPageDimension(long nSize) throw(); } + + namespace util + { + /** See if two page formats can be expressed as a single word section + + Word doesn't have the idea of page descriptors and follow styles + like writer does, the only thing it has is a section with a + different title page. The only difference of the title page from + the rest of the section is different headers/footers, everything + else is the same. + + So this function compares two writer page fmts and sees if the + follow frame and the title frame are the same from word persecptive + except for the content of their headers. + + @return true if the rTitleFmt followed by rFollowFmt could be + expressed in word as a single word Section with different title + page enabled. + + @author + <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> + + @see #i4320#/#i14509#/#i11717# for examples + */ + bool IsPlausableSingleWordSection(const SwFrmFmt &rTitleFmt, + const SwFrmFmt &rFollowFmt); + + + /** Make export a word section top/bottom values easy + + The top and bottom margins in word and writer are expressed in very + different ways. This class provides the equivalent word values for + header/footer distances from a given writer attrset of a page + + @author + <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> + */ + class HdFtDistanceGlue + { + private: + bool mbHasHeader; + bool mbHasFooter; + public: + sal_uInt16 dyaHdrTop; + sal_uInt16 dyaHdrBottom; + sal_uInt16 dyaTop; + sal_uInt16 dyaBottom; + HdFtDistanceGlue(const SfxItemSet &rPage); + bool HasHeader() const { return mbHasHeader; } + bool HasFooter() const { return mbHasFooter; } + + /** Is the top of the page the same in both objects + + Ignoring the difference in header and footers, will the main + document text have the same top/bottom bounds in word between + both these objects. + + @param + rOther the other HdFtDistanceGlue to compare against + + @return true if the main text areas top and bottom is at the + same location, false otherwise. + */ + bool EqualTopBottom(const HdFtDistanceGlue &rOther) const; + }; + } } #endif |