[Libreoffice-commits] core.git: editeng/source include/editeng svx/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Tue Aug 22 18:59:24 UTC 2017
editeng/source/items/textitem.cxx | 14 --------------
include/editeng/editids.hrc | 1 -
include/editeng/scripttypeitem.hxx | 18 +-----------------
svx/source/svdraw/svdedxv.cxx | 5 -----
svx/source/table/tablecontroller.cxx | 5 -----
5 files changed, 1 insertion(+), 42 deletions(-)
New commits:
commit 728e42a9dae8305f6f92628d6d9ba616baaf0426
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Mon Aug 21 23:32:51 2017 +0200
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/41423
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 24c33bc36aa2..7395c40c50e4 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -2913,19 +2913,6 @@ bool SvxCharReliefItem::QueryValue( css::uno::Any& rVal,
}
/*************************************************************************
-|* 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
diff --git a/include/editeng/editids.hrc b/include/editeng/editids.hrc
index c99144a397bd..f728255f4285 100644
--- a/include/editeng/editids.hrc
+++ b/include/editeng/editids.hrc
@@ -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 )
diff --git a/include/editeng/scripttypeitem.hxx b/include/editeng/scripttypeitem.hxx
index 4d86b9e81359..49c3945ca7d7 100644
--- a/include/editeng/scripttypeitem.hxx
+++ b/include/editeng/scripttypeitem.hxx
@@ -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:
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 5734295acb47..ab28ff0c69c0 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -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())
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 98ef5bd8ffaf..8e6a59ce34ff 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -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() ) );
}
}
More information about the Libreoffice-commits
mailing list