Kaydet (Commit) 728e42a9 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

drop unused SvxScriptTypeItem

apparently there was never a user for this item since initial commit
in the year 2000. SvxScriptSetItem gets the ScriptType by parameter
see GetItemOfScript and PutItemForScriptType.

remove SID_ATTR_CHAR_SCRIPTTYPE and don't put the item in any set.
keep the gap in the ID range because it's not part of any range
and there are already other gaps.

Change-Id: Iee24f13b329593af2dc5548d8b6bc2282c2dc5b3
Reviewed-on: https://gerrit.libreoffice.org/41423Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 66e32324
......@@ -2912,19 +2912,6 @@ bool SvxCharReliefItem::QueryValue( css::uno::Any& rVal,
return bRet;
}
/*************************************************************************
|* class SvxScriptTypeItemItem
*************************************************************************/
SvxScriptTypeItem::SvxScriptTypeItem( SvtScriptType nType )
: SfxUInt16Item( SID_ATTR_CHAR_SCRIPTTYPE, static_cast<sal_uInt16>(nType) )
{
}
SfxPoolItem* SvxScriptTypeItem::Clone( SfxItemPool * ) const
{
return new SvxScriptTypeItem( static_cast<SvtScriptType>(GetValue()) );
}
/*************************************************************************
|* class SvxScriptSetItem
*************************************************************************/
......@@ -2938,7 +2925,6 @@ SvxScriptSetItem::SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool )
GetItemSet().MergeRange( nLatin, nLatin );
GetItemSet().MergeRange( nAsian, nAsian );
GetItemSet().MergeRange( nComplex, nComplex );
GetItemSet().MergeRange( SID_ATTR_CHAR_SCRIPTTYPE, SID_ATTR_CHAR_SCRIPTTYPE );
}
SfxPoolItem* SvxScriptSetItem::Clone( SfxItemPool * ) const
......
......@@ -100,7 +100,6 @@
#define SID_ATTR_CHAR_TWO_LINES ( SID_SVX_START + 897 )
#define SID_ATTR_CHAR_CJK_RUBY ( SID_SVX_START + 898 )
#define SID_ATTR_CHAR_EMPHASISMARK ( SID_SVX_START + 899 )
#define SID_ATTR_CHAR_SCRIPTTYPE ( SID_SVX_START + 900 )
#define SID_ATTR_PARA_SCRIPTSPACE ( SID_SVX_START + 901 )
#define SID_ATTR_PARA_HANGPUNCTUATION ( SID_SVX_START + 902 )
#define SID_ATTR_PARA_FORBIDDEN_RULES ( SID_SVX_START + 903 )
......
......@@ -19,26 +19,10 @@
#ifndef INCLUDED_EDITENG_SCRIPTTYPEITEM_HXX
#define INCLUDED_EDITENG_SCRIPTTYPEITEM_HXX
#include <svl/intitem.hxx>
#include <svl/languageoptions.hxx>
#include <svl/poolitem.hxx>
#include <editeng/editengdllapi.h>
// class SvxScriptTypeItem ----------------------------------------------
/* [Description]
This item describes the script type of the selected text and is only
used for the user interface.
*/
class EDITENG_DLLPUBLIC SvxScriptTypeItem : public SfxUInt16Item
{
public:
explicit SvxScriptTypeItem( SvtScriptType nType = SvtScriptType::LATIN );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
};
class EDITENG_DLLPUBLIC SvxScriptSetItem : public SfxSetItem
{
public:
......
......@@ -33,7 +33,6 @@
#include <editeng/editeng.hxx>
#include <editeng/editobj.hxx>
#include <editeng/outlobj.hxx>
#include <editeng/scripttypeitem.hxx>
#include <svx/svdoutl.hxx>
#include <svx/sdtfchim.hxx>
#include <svx/svdotext.hxx>
......@@ -2027,14 +2026,10 @@ bool SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) c
// add object attributes
rTargetSet.Put( mxTextEditObj->GetMergedItemSet() );
if( mxTextEditObj->GetOutlinerParaObject() )
rTargetSet.Put( SvxScriptTypeItem( mxTextEditObj->GetOutlinerParaObject()->GetTextObject().GetScriptType() ) );
if(pTextEditOutlinerView)
{
// FALSE= regard InvalidItems as "holes," not as Default
rTargetSet.Put(pTextEditOutlinerView->GetAttribs(), false);
rTargetSet.Put( SvxScriptTypeItem( pTextEditOutlinerView->GetSelectedScriptType() ) );
}
if(GetMarkedObjectCount()==1 && GetMarkedObjectByIndex(0)==mxTextEditObj.get())
......
......@@ -38,7 +38,6 @@
#include <sfx2/request.hxx>
#include <editeng/scripttypeitem.hxx>
#include <svx/svdotable.hxx>
#include <svx/sdr/overlay/overlayobjectcell.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
......@@ -2519,15 +2518,11 @@ bool SvxTableController::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAtt
if( mpView->IsTextEdit() )
{
if( mxTableObj->GetOutlinerParaObject() )
rTargetSet.Put( SvxScriptTypeItem( mxTableObj->GetOutlinerParaObject()->GetTextObject().GetScriptType() ) );
OutlinerView* pTextEditOutlinerView = mpView->GetTextEditOutlinerView();
if(pTextEditOutlinerView)
{
// FALSE= consider InvalidItems not as the default, but as "holes"
rTargetSet.Put(pTextEditOutlinerView->GetAttribs(), false);
rTargetSet.Put( SvxScriptTypeItem( pTextEditOutlinerView->GetSelectedScriptType() ) );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment