summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorFrank Meies <fme@openoffice.org>2001-08-20 12:08:45 +0000
committerFrank Meies <fme@openoffice.org>2001-08-20 12:08:45 +0000
commitc27dba70baf2abf2284746380a7c8655c9b91e20 (patch)
tree208afb83d96bdeb0fe845dca11c43446f1971dad /sw/source
parent93f9831caa062a69b2c575c02c24585edb97ae19 (diff)
Fix #91297#: Footnotes at beginning of line
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/text/guess.cxx13
-rw-r--r--sw/source/core/text/portxt.cxx6
-rw-r--r--sw/source/core/text/txtftn.cxx9
3 files changed, 21 insertions, 7 deletions
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 1c4fa5c1b7fd..a1a9f43f45d5 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: guess.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: fme $ $Date: 2001-08-17 11:08:09 $
+ * last change: $Author: fme $ $Date: 2001-08-20 13:08:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -250,6 +250,15 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
}
}
+ // we have to trigger an underflow for a footnote portion
+ // which does not fit to the current line
+ if ( rPor.IsFtnPortion() )
+ {
+ nBreakPos = rInf.GetIdx();
+ nCutPos = rInf.GetLen();
+ return sal_False;
+ }
+
sal_Bool bChgLocale = sal_False;
// if the current character does not fit to the current line,
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index a4a6a49c03ab..530febad838a 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: portxt.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: fme $ $Date: 2001-06-29 15:47:40 $
+ * last change: $Author: fme $ $Date: 2001-08-20 13:08:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -273,7 +273,7 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf )
rInf.GetRoot()->SetEndHyph( sal_True );
}
// case C1
- else if ( IsFtnPortion() )
+ else if ( IsFtnPortion() && rInf.IsFakeLineStart() )
BreakUnderflow( rInf );
// case B2
else if( rInf.GetIdx() > rInf.GetLineStart() ||
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 25a4cc9ba6a0..f73a0b3be658 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtftn.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: fme $ $Date: 2001-07-24 11:55:06 $
+ * last change: $Author: fme $ $Date: 2001-08-20 13:08:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1334,7 +1334,12 @@ void SwFtnPortion::ClearFtn()
sal_Bool SwFtnPortion::Format( SwTxtFormatInfo &rInf )
{
SwFtnSave aFtnSave( rInf, pFtn );
+ // the idx is manipulated in SwExpandPortion::Format
+ // this flag indicates, that a footnote is allowed to trigger
+ // an underflow during SwTxtGuess::Guess
+ rInf.SetFakeLineStart( rInf.GetIdx() > rInf.GetLineStart() );
sal_Bool bFull = SwExpandPortion::Format( rInf );
+ rInf.SetFakeLineStart( sal_False );
SetAscent( rInf.GetAscent() );
rInf.SetFtnDone( !bFull );
if( !bFull )