#80913# forbidden rules

This commit is contained in:
Oliver Specht 2000-11-29 16:08:18 +00:00
parent 056505067e
commit c0cd781fe2
7 changed files with 236 additions and 77 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: helpid.hrc,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: tl $ $Date: 2000-11-27 09:18:44 $
* last change: $Author: os $ $Date: 2000-11-29 17:04:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -473,12 +473,13 @@
#define HID_CLB_LINGU_MODULES (HID_SVX_START + 384)
#define HID_CLB_LINGU_OPTIONS (HID_SVX_START + 385)
#define HID_SVXPAGE_PARA_ASIAN (HID_SVX_START + 386)
// -----------------------------------------------------------------------
// "Uberlaufpr"ufung -----------------------------------------------------
// -----------------------------------------------------------------------
#define ACT_SVX_HID_END HID_SVXPAGE_CHAR_EFFECTS_CTRL
#define ACT_SVX_HID_END HID_SVXPAGE_PARA_ASIAN
#if ACT_SVX_HID_END > HID_SVX_END
#error Resource-Ueberlauf in #line, #file

View file

@ -2,9 +2,9 @@
*
* $RCSfile: paragrph.cxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: rt $ $Date: 2000-10-24 12:20:14 $
* last change: $Author: os $ $Date: 2000-11-29 17:07:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -2115,5 +2115,109 @@ IMPL_LINK( SvxExtParagraphTabPage, PageBreakTypeHdl_Impl, RadioButton *, pBtn )
PageBreakPosHdl_Impl( &aBeforeBox );
return 0;
}
/*-- 29.11.00 11:36:24---------------------------------------------------
-----------------------------------------------------------------------*/
SvxAsianTabPage::SvxAsianTabPage( Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage(pParent, ResId( RID_SVXPAGE_PARA_ASIAN, DIALOG_MGR() ), rSet),
aOptionsGB( this, ResId(GB_AS_OPTIONS )),
aHangingPunctCB( this, ResId(CB_AS_HANG_PUNC )),
aScriptSpaceCB( this, ResId(CB_AS_SCRIPT_SPACE )),
aForbiddenRulesCB( this, ResId(CB_AS_FORBIDDEN ))
{
FreeResource();
}
/*-- 29.11.00 11:36:24---------------------------------------------------
-----------------------------------------------------------------------*/
SvxAsianTabPage::~SvxAsianTabPage()
{
}
/*-- 29.11.00 11:36:24---------------------------------------------------
-----------------------------------------------------------------------*/
SfxTabPage* SvxAsianTabPage::Create( Window* pParent, const SfxItemSet& rSet )
{
return new SvxAsianTabPage(pParent, rSet);
}
/*-- 29.11.00 11:36:24---------------------------------------------------
-----------------------------------------------------------------------*/
USHORT* SvxAsianTabPage::GetRanges()
{
static USHORT pRanges[] =
{
SID_ATTR_PARA_SCRIPTSPACE,
SID_ATTR_PARA_HANGPUNCTUATION,
SID_ATTR_PARA_FORBIDDEN_RULES,
0
};
return pRanges;
}
/*-- 29.11.00 11:36:24---------------------------------------------------
-----------------------------------------------------------------------*/
BOOL SvxAsianTabPage::FillItemSet( SfxItemSet& rSet )
{
BOOL bRet = FALSE;
SfxItemPool* pPool = rSet.GetPool();
if(aScriptSpaceCB.IsChecked() != aScriptSpaceCB.GetSavedValue())
{
SfxBoolItem* pNewItem = (SfxBoolItem*)rSet.Get(
pPool->GetWhich(SID_ATTR_PARA_SCRIPTSPACE)).Clone();
pNewItem->SetValue(aScriptSpaceCB.IsChecked());
rSet.Put(*pNewItem);
delete pNewItem;
bRet = TRUE;
}
if(aHangingPunctCB.IsChecked() != aHangingPunctCB.GetSavedValue())
{
SfxBoolItem* pNewItem = (SfxBoolItem*)rSet.Get(
pPool->GetWhich(SID_ATTR_PARA_HANGPUNCTUATION)).Clone();
pNewItem->SetValue(aHangingPunctCB.IsChecked());
rSet.Put(*pNewItem);
delete pNewItem;
bRet = TRUE;
}
if(aForbiddenRulesCB.IsChecked() != aForbiddenRulesCB.GetSavedValue())
{
SfxBoolItem* pNewItem = (SfxBoolItem*)rSet.Get(
pPool->GetWhich(SID_ATTR_PARA_FORBIDDEN_RULES)).Clone();
pNewItem->SetValue(aForbiddenRulesCB.IsChecked());
rSet.Put(*pNewItem);
delete pNewItem;
bRet = TRUE;
}
return bRet;
}
/*-- 29.11.00 11:36:25---------------------------------------------------
-----------------------------------------------------------------------*/
void SvxAsianTabPage::Reset( const SfxItemSet& rSet )
{
SfxItemPool* pPool = rSet.GetPool();
USHORT nWhich = pPool->GetWhich(SID_ATTR_PARA_SCRIPTSPACE);
SfxItemState eState = rSet.GetItemState(nWhich, TRUE);
if(eState < SFX_ITEM_AVAILABLE)
aScriptSpaceCB.Enable(FALSE);
else
aScriptSpaceCB.Check(((const SfxBoolItem&)rSet.Get(nWhich)).GetValue());
nWhich = pPool->GetWhich(SID_ATTR_PARA_HANGPUNCTUATION);
eState = rSet.GetItemState(nWhich, TRUE);
if(eState < SFX_ITEM_AVAILABLE)
aHangingPunctCB.Enable(FALSE);
else
aHangingPunctCB.Check(((const SfxBoolItem&)rSet.Get(nWhich)).GetValue());
nWhich = pPool->GetWhich(SID_ATTR_PARA_FORBIDDEN_RULES);
eState = rSet.GetItemState(nWhich, TRUE);
if(eState < SFX_ITEM_AVAILABLE)
aForbiddenRulesCB.Enable(FALSE);
else
aForbiddenRulesCB.Check(((const SfxBoolItem&)rSet.Get(nWhich)).GetValue());
aScriptSpaceCB.SaveValue();
aHangingPunctCB.SaveValue();
aForbiddenRulesCB.SaveValue();
}

View file

@ -2,9 +2,9 @@
*
* $RCSfile: paragrph.hrc,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
* last change: $Author: os $ $Date: 2000-11-29 17:07:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -133,6 +133,10 @@
#define CB_REGISTER 84
#define GB_REGISTER 85
//asian typography
#define GB_AS_OPTIONS 1
#define CB_AS_HANG_PUNC 2
#define CB_AS_SCRIPT_SPACE 3
#define CB_AS_FORBIDDEN 4
#endif

View file

@ -2,9 +2,9 @@
*
* $RCSfile: paragrph.src,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2000-11-24 17:10:32 $
* last change: $Author: os $ $Date: 2000-11-29 17:07:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -1961,4 +1961,44 @@ TabPage RID_SVXPAGE_EXT_PARAGRAPH
Text[ turkish ] = "Metin akýþý";
Text[ language_user1 ] = " ";
};
/*-- 29.11.00 11:36:24---------------------------------------------------
Asian typography
-----------------------------------------------------------------------*/
TabPage RID_SVXPAGE_PARA_ASIAN
{
HelpId = HID_SVXPAGE_PARA_ASIAN ;
Hide = TRUE ;
Text = "Asiatische Typographie" ;
Text [ English ] = "Asian typography" ;
Size = MAP_APPFONT ( 260 , 135 ) ;
GroupBox GB_AS_OPTIONS
{
Pos = MAP_APPFONT ( 3 , 6 ) ;
Size = MAP_APPFONT ( 254 , 52 ) ;
Text = "Optionen" ;
Text [ ENGLISH ] = "Options" ;
};
CheckBox CB_AS_HANG_PUNC
{
Pos = MAP_APPFONT ( 6 , 16 ) ;
Size = MAP_APPFONT ( 245 , 12 ) ;
Text = "Hängende Interpunktion zulassen" ;
Text [ ENGLISH ] = "Hanging punctuation" ;
};
CheckBox CB_AS_SCRIPT_SPACE
{
Pos = MAP_APPFONT ( 6 , 29 ) ;
Size = MAP_APPFONT ( 245 , 12 ) ;
Text = "Abstand zwischen asiatischem, lateinischem und komplexem Text anwenden" ;
Text [ ENGLISH ] = "Apply distance between asian, latin and complex text" ;
};
CheckBox CB_AS_FORBIDDEN
{
Pos = MAP_APPFONT ( 6 , 42 ) ;
Size = MAP_APPFONT ( 245 , 12 ) ;
Text = "Liste der verbotenen Zeichen an Zeilenanfang und -ende berücksichtigen" ;
Text [ ENGLISH ] = "Apply list of forbidden characters at line end and line start" ;
};
};
// ********************************************************************** EOF

View file

@ -2,9 +2,9 @@
*
* $RCSfile: srchxtra.cxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: pb $ $Date: 2000-11-27 09:03:18 $
* last change: $Author: os $ $Date: 2000-11-29 17:07:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -99,17 +99,14 @@ SvxSearchFormatDialog::SvxSearchFormatDialog( Window* pParent,
SfxTabDialog( pParent, SVX_RES( RID_SVXDLG_SEARCHFORMAT ), &rSet )
{
AddTabPage( RID_SVXPAGE_CHAR_STD, SvxCharStdPage::Create, 0 );
AddTabPage( RID_SVXPAGE_CHAR_EXT, SvxCharExtPage::Create, 0 );
#ifdef DEBUG
AddTabPage( RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, 0 );
AddTabPage( RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, 0 );
AddTabPage( RID_SVXPAGE_CHAR_POSITION, SvxCharPositionPage::Create, 0 );
AddTabPage( RID_SVXPAGE_CHAR_TWOLINES, SvxCharTwoLinesPage::Create, 0 );
#endif
AddTabPage( RID_SVXPAGE_STD_PARAGRAPH, SvxStdParagraphTabPage::Create, 0 );
AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH,SvxParaAlignTabPage::Create, 0 );
AddTabPage( RID_SVXPAGE_EXT_PARAGRAPH, SvxExtParagraphTabPage::Create, 0 );
AddTabPage( RID_SVXPAGE_PARA_ASIAN, SvxAsianTabPage::Create, 0 );
AddTabPage( RID_SVXPAGE_BACKGROUND, SvxBackgroundTabPage::Create, 0 );
pFontList = 0;

View file

@ -2,9 +2,9 @@
*
* $RCSfile: srchxtra.src,v $
*
* $Revision: 1.5 $
* $Revision: 1.6 $
*
* last change: $Author: pb $ $Date: 2000-11-27 09:03:18 $
* last change: $Author: os $ $Date: 2000-11-29 17:07:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -88,61 +88,6 @@ TabDialog RID_SVXDLG_SEARCHFORMAT
OutputSize = TRUE ;
PageList =
{
PageItem
{
Identifier = RID_SVXPAGE_CHAR_STD ;
Text = "Schrift" ;
Text [ ENGLISH ] = "Character" ;
Text [ norwegian ] = "Character" ;
Text [ italian ] = "Carattere" ;
Text [ portuguese_brazilian ] = "Caractere" ;
Text [ portuguese ] = "Tipo de letra" ;
Text [ finnish ] = "Merkki" ;
Text [ danish ] = "Skrifttype" ;
Text [ french ] = "Police" ;
Text [ swedish ] = "Teckensnitt" ;
Text [ dutch ] = "Lettertype" ;
Text [ spanish ] = "Fuente" ;
Text [ english_us ] = "Font" ;
Text[ chinese_simplified ] = "×ÖÌå";
Text[ russian ] = "Øðèôò";
Text[ polish ] = "Czcionka";
Text[ japanese ] = "Ì«ÝÄ";
Text[ chinese_traditional ] = "¦r«¬";
Text[ arabic ] = "ÇáÎØ";
Text[ greek ] = "ÃñáììáôïóåéñÜ";
Text[ korean ] = "±Û²Ã";
Text[ turkish ] = "Yazýtipi";
Text[ language_user1 ] = " ";
};
PageItem
{
Identifier = RID_SVXPAGE_CHAR_EXT ;
Text = "Schrifteffekt" ;
Text [ ENGLISH ] = "Character Extension" ;
Text [ norwegian ] = "Character Extension" ;
Text [ italian ] = "Effetto carattere" ;
Text [ portuguese_brazilian ] = "Extensão de Caracter" ;
Text [ portuguese ] = "Efeitos do tipo de letra" ;
Text [ finnish ] = "Merkin tehosteet" ;
Text [ danish ] = "Skrifteffekt" ;
Text [ french ] = "Effet de caractère" ;
Text [ swedish ] = "Teckensnittseffekt" ;
Text [ dutch ] = "Effecten" ;
Text [ spanish ] = "Efectos de fuente" ;
Text [ english_us ] = "Font Effects" ;
Text[ chinese_simplified ] = "×ÖÌåЧ¹û";
Text[ russian ] = "Ýôôåêòû øðèôòà";
Text[ polish ] = "Efekty czcionek";
Text[ japanese ] = "Ì«ÝÄŒø‰Ê";
Text[ chinese_traditional ] = "¦r«¬®ÄªG";
Text[ arabic ] = "ÊÃËíÑÇÊ ÇáÎØæØ";
Text[ greek ] = "ÅöÝ ÷áñáêôÞñùí";
Text[ korean ] = "±Û²Ã È¿°ú";
Text[ turkish ] = "Yazýtipi efektleri";
Text[ language_user1 ] = " ";
};
#ifdef DEBUG
PageItem
{
Identifier = RID_SVXPAGE_CHAR_NAME ;
@ -235,7 +180,6 @@ TabDialog RID_SVXDLG_SEARCHFORMAT
Text[ turkish ] = "Asian Layout";
Text[ arabic ] = "ÊÎØíØ ÂÓíæí";
};
#endif
PageItem
{
Identifier = RID_SVXPAGE_STD_PARAGRAPH ;
@ -320,6 +264,12 @@ TabDialog RID_SVXDLG_SEARCHFORMAT
Text[ language_user1 ] = " ";
};
PageItem
{
Identifier = RID_SVXPAGE_PARA_ASIAN;
Text = "Asiatische Typographie" ;
Text [ ENGLISH ] = "Asian typography" ;
};
PageItem
{
Identifier = RID_SVXPAGE_BACKGROUND;
Text = "Hintergrund" ;

View file

@ -2,9 +2,9 @@
*
* $RCSfile: paraitem.cxx,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: jp $ $Date: 2000-11-17 14:19:06 $
* last change: $Author: os $ $Date: 2000-11-29 17:08:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -88,6 +88,7 @@ using namespace ::com::sun::star;
#define ITEMID_HYPHENZONE 0
#define ITEMID_SCRIPTSPACE 0
#define ITEMID_HANGINGPUNCTUATION 0
#define ITEMID_FORBIDDENRULE 0
#include <tools/rtti.hxx>
#include <svtools/sbx.hxx>
@ -115,6 +116,7 @@ using namespace ::com::sun::star;
#include "hyznitem.hxx"
#include "scriptspaceitem.hxx"
#include "hngpnctitem.hxx"
#include "forbiddenruleitem.hxx"
// xml stuff
@ -162,7 +164,8 @@ TYPEINIT1_AUTOFACTORY(SvxTabStopItem, SfxPoolItem);
TYPEINIT1_AUTOFACTORY(SvxFmtSplitItem, SfxBoolItem);
TYPEINIT1_AUTOFACTORY(SvxPageModelItem, SfxStringItem);
TYPEINIT1_AUTOFACTORY(SvxScriptSpaceItem, SfxBoolItem);
TYPEINIT1_AUTOFACTORY(SvxHangingPunctuationItem, SfxEnumItem);
TYPEINIT1_AUTOFACTORY(SvxHangingPunctuationItem, SfxBoolItem);
TYPEINIT1_AUTOFACTORY(SvxForbiddenRuleItem, SfxBoolItem);
SV_IMPL_VARARR_SORT( SvxTabStopArr, SvxTabStop )
@ -1829,6 +1832,66 @@ SfxItemPresentation SvxHangingPunctuationItem::GetPresentation(
}
return SFX_ITEM_PRESENTATION_NONE;
}
//------------------------------------------------------------------------
SvxForbiddenRuleItem::SvxForbiddenRuleItem(
sal_Bool bOn, const sal_uInt16 nId )
: SfxBoolItem( nId, bOn )
{
}
/* -----------------------------29.11.00 11:23--------------------------------
---------------------------------------------------------------------------*/
SfxPoolItem* SvxForbiddenRuleItem::Clone( SfxItemPool *pPool ) const
{
return new SvxForbiddenRuleItem( GetValue(), Which() );
}
/* -----------------------------29.11.00 11:23--------------------------------
---------------------------------------------------------------------------*/
SfxPoolItem* SvxForbiddenRuleItem::Create(SvStream & rStrm, USHORT) const
{
sal_Bool nValue;
rStrm >> nValue;
return new SvxForbiddenRuleItem( nValue, Which() );
}
/* -----------------------------29.11.00 11:23--------------------------------
---------------------------------------------------------------------------*/
USHORT SvxForbiddenRuleItem::GetVersion( USHORT nFFVer ) const
{
DBG_ASSERT( SOFFICE_FILEFORMAT_31==nFFVer ||
SOFFICE_FILEFORMAT_40==nFFVer ||
SOFFICE_FILEFORMAT_NOW==nFFVer,
"SvxForbiddenRuleItem: Gibt es ein neues Fileformat?" );
return SOFFICE_FILEFORMAT_NOW > nFFVer ? USHRT_MAX : 0;
}
/* -----------------------------29.11.00 11:23--------------------------------
---------------------------------------------------------------------------*/
SfxItemPresentation SvxForbiddenRuleItem::GetPresentation(
SfxItemPresentation ePres,
SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
String &rText, const International* pIntl ) const
{
switch( ePres )
{
case SFX_ITEM_PRESENTATION_NONE:
rText.Erase();
break;
case SFX_ITEM_PRESENTATION_NAMELESS:
case SFX_ITEM_PRESENTATION_COMPLETE:
{
rText = SVX_RESSTR( !GetValue()
? RID_SVXITEMS_FORBIDDEN_RULE_OFF
: RID_SVXITEMS_FORBIDDEN_RULE_ON );
return ePres;
}
break;
}
return SFX_ITEM_PRESENTATION_NONE;
}