summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2001-01-19 15:46:28 +0000
committerjp <jp@openoffice.org>2001-01-19 15:46:28 +0000
commit1677364083d8267999b773ff9e59ad8511a6ccbc (patch)
treee53f5f3e61c33e8ee09b9a83798d4639b38b869d
parent1c9bf21bee488abe83875c9fe9e31da56423a12d (diff)
Guess: get the forbidden characters from the document
-rw-r--r--sw/source/core/text/guess.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 34e86ea9980a..18b02690685c 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.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: ama $ $Date: 2000-12-18 13:29:57 $
+ * last change: $Author: jp $ $Date: 2001-01-19 16:46:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -88,6 +88,9 @@
#ifndef _VIEWSH_HXX
#include <viewsh.hxx>
#endif
+#ifndef _DOC_HXX
+#include <doc.hxx>
+#endif
#ifndef _COM_SUN_STAR_I18N_BREAKTYPE_HPP_
#include <com/sun/star/i18n/BreakType.hpp>
@@ -423,10 +426,12 @@ sal_Bool SwTxtGuess::Guess( const SwTxtFormatInfo &rInf, const KSHORT nPorHeight
}
LanguageType aLang = rInf.GetFont()->GetLanguage();
- ForbiddenCharacters &aForbidden = pBreakIt->GetForbidden( aLang );
- LineBreakUserOptions aUserOpt( aForbidden.beginLine,
- aForbidden.endLine, rInf.HasForbiddenChars(), rInf.IsHanging(),
- sal_False );
+ const ForbiddenCharacters aForbidden(
+ *rInf.GetTxtFrm()->GetNode()->GetDoc()->
+ GetForbiddenCharacters( aLang, TRUE ));
+ LineBreakUserOptions aUserOpt(
+ aForbidden.beginLine, aForbidden.endLine,
+ rInf.HasForbiddenChars(), rInf.IsHanging(), sal_False );
LineBreakResults aResult =
pBreakIt->xBreak->getLineBreak( rInf.GetTxt(), nRightPos,
pBreakIt->GetLocale(aLang), rInf.GetIdx(), aHyphOpt, aUserOpt );