diff options
author | Kurt Zenker <kz@openoffice.org> | 2003-12-09 10:54:45 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2003-12-09 10:54:45 +0000 |
commit | 46ea6db0a0abd12d05573219dd90046b39f72c44 (patch) | |
tree | e88f0c7b08cbf26c1e42041a8cbd8913afb36794 /sw/source/filter/ww8/writerwordglue.hxx | |
parent | 5d24c67023bcead769842bd859d76ad44991ef09 (diff) |
INTEGRATION: CWS portlaoisefilterteam16 (1.2.58); FILE MERGED
2003/10/31 14:06:31 cmc 1.2.58.2: #i21881# remove dependancies of paragraph style mapping code on WW8 import filter classes, document the suckers. Move it all into one friendly utility class
2003/10/30 14:45:52 cmc 1.2.58.1: #i11717# make the effort to put humpy dumpty back together again if a section with a title page was imported from word see if our page follow formats are equivalent to a word section and export that as a single section. Split the various bits of code up into sensible self contained entities, and actually document the key bits.
Diffstat (limited to 'sw/source/filter/ww8/writerwordglue.hxx')
-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 |