summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorAndreas Martens <ama@openoffice.org>2000-11-29 12:25:34 +0000
committerAndreas Martens <ama@openoffice.org>2000-11-29 12:25:34 +0000
commitd07f5c45e72482ae824eef557c1dea3226f4e2bd (patch)
treee80360b16ff26c486b2944b8179cdcff5397bb5f /sw/source
parent7a05534e530082a8471537118750b9726cacdaac (diff)
#80913#: ForbiddenCharacters as paragraph attribute
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/text/guess.cxx7
-rw-r--r--sw/source/core/text/inftxt.cxx14
-rw-r--r--sw/source/core/text/inftxt.hxx7
3 files changed, 18 insertions, 10 deletions
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 96c12302779d..8c7b676e8b26 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.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: ama $ $Date: 2000-11-24 15:38:27 $
+ * last change: $Author: ama $ $Date: 2000-11-29 13:20:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -425,7 +425,8 @@ 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, sal_True, rInf.IsHanging(), sal_False );
+ aForbidden.endLine, rInf.HasForbiddenChars(), rInf.IsHanging(),
+ sal_False );
LineBreakResults aResult =
pBreakIt->xBreak->getLineBreak( rInf.GetTxt(), nRightPos,
pBreakIt->GetLocale(aLang), rInf.GetIdx(), aHyphOpt, aUserOpt );
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 594a2966c13b..2b9756454289 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: inftxt.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: ama $ $Date: 2000-11-24 15:40:56 $
+ * last change: $Author: ama $ $Date: 2000-11-29 13:25:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -282,7 +282,8 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew )
bFirstMulti( rNew.IsFirstMulti() ),
bRuby( rNew.IsRuby() ),
bHanging( rNew.IsHanging() ),
- bScriptSpace( rNew.HasScriptSpace() )
+ bScriptSpace( rNew.HasScriptSpace() ),
+ bForbiddenChars( rNew.HasForbiddenChars() )
{
#ifndef PRODUCT
ChkOutDev( *this );
@@ -351,7 +352,8 @@ void SwTxtSizeInfo::CtorInit( SwTxtFrm *pFrame, SwFont *pNewFnt,
bNotEOL = sal_False;
bStopUnderFlow = sal_False;
bSpecialUnderline = sal_False;
- bMulti = bFirstMulti = bRuby = bHanging = bScriptSpace = sal_False;
+ bMulti = bFirstMulti = bRuby = bHanging = bScriptSpace =
+ bForbiddenChars = sal_False;
SetLen( GetMinLen( *this ) );
}
@@ -376,7 +378,8 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const XubString &rTxt,
bFirstMulti( rNew.IsFirstMulti() ),
bRuby( rNew.IsRuby() ),
bHanging( rNew.IsHanging() ),
- bScriptSpace( rNew.HasScriptSpace() )
+ bScriptSpace( rNew.HasScriptSpace() ),
+ bForbiddenChars( rNew.HasForbiddenChars() )
{
#ifndef PRODUCT
ChkOutDev( *this );
@@ -748,6 +751,7 @@ sal_Bool SwTxtFormatInfo::InitHyph( const sal_Bool bAutoHyph )
const SwAttrSet& rAttrSet = GetTxtFrm()->GetTxtNode()->GetSwAttrSet();
SetHanging( rAttrSet.GetHangingPunctuation().GetValue() );
SetScriptSpace( rAttrSet.GetScriptSpace().GetValue() );
+ SetForbiddenChars( TRUE /*rAttrSet.GetForbiddenRule().GetValue()*/ );
const SvxHyphenZoneItem &rAttr = rAttrSet.GetHyphenZone();
MaxHyph() = rAttr.GetMaxHyphens();
sal_Bool bAuto = bAutoHyph || rAttr.IsHyphen();
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index 14e286cbcf5a..225324398479 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: inftxt.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: ama $ $Date: 2000-11-24 15:40:03 $
+ * last change: $Author: ama $ $Date: 2000-11-29 13:22:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -194,6 +194,7 @@ protected:
sal_Bool bRuby : 1; // during the formatting of a phonetic line
sal_Bool bHanging : 1; // formatting of hanging punctuation allowed
sal_Bool bScriptSpace : 1; // space between different scripts (Asian/Latin)
+ sal_Bool bForbiddenChars : 1; // Forbidden start/endline characters
protected:
void _NoteAnimation();
@@ -239,6 +240,8 @@ public:
inline void SetHanging( const sal_Bool bNew ) { bHanging = bNew; }
inline sal_Bool HasScriptSpace() const { return bScriptSpace; }
inline void SetScriptSpace( const sal_Bool bNew ) { bScriptSpace = bNew; }
+ inline sal_Bool HasForbiddenChars() const { return bForbiddenChars; }
+ inline void SetForbiddenChars( const sal_Bool bN ) { bForbiddenChars = bN; }
inline ViewShell *GetVsh() { return pVsh; }
inline const ViewShell *GetVsh() const { return pVsh; }
inline OutputDevice *GetOut() { return pOut; }