summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-15 09:36:39 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-04-17 07:21:08 +0000
commita7b7c64afc523cfd9ff4e724b3efbec6567fc1c8 (patch)
tree52fd05ef3292f3dab172864cbc3be96a8d44a9d0 /sd
parentadd7eeb7dbd0eefa0c5ae5430490864079add801 (diff)
convert SCRIPTTYPE_ constants to scoped enum
Change-Id: I5be3980ac865162d8d7626556ca47eca4b0ee433 Reviewed-on: https://gerrit.libreoffice.org/15344 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/sdpage.cxx6
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx2
-rw-r--r--sd/source/ui/docshell/docshel3.cxx8
-rw-r--r--sd/source/ui/inc/OutlineView.hxx2
-rw-r--r--sd/source/ui/view/drtxtob.cxx2
-rw-r--r--sd/source/ui/view/drtxtob1.cxx2
-rw-r--r--sd/source/ui/view/outlview.cxx4
7 files changed, 13 insertions, 13 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index faf30f3418e3..261dcbf60ac9 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2028,11 +2028,11 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
/******************************************************
* normal text object: adjust text height
******************************************************/
- sal_uLong nScriptType = pObj->GetOutlinerParaObject()->GetTextObject().GetScriptType();
+ SvtScriptType nScriptType = pObj->GetOutlinerParaObject()->GetTextObject().GetScriptType();
sal_uInt16 nWhich = EE_CHAR_FONTHEIGHT;
- if ( nScriptType == SCRIPTTYPE_ASIAN )
+ if ( nScriptType == SvtScriptType::ASIAN )
nWhich = EE_CHAR_FONTHEIGHT_CJK;
- else if ( nScriptType == SCRIPTTYPE_COMPLEX )
+ else if ( nScriptType == SvtScriptType::COMPLEX )
nWhich = EE_CHAR_FONTHEIGHT_CTL;
// use more modern method to scale the text height
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 4bce7232fc2a..192d4eb31384 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -249,7 +249,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, bool bGe
}
}
- sal_Int16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() );
+ sal_Int16 nScriptType = SvtLanguageOptions::FromSvtScriptTypeToI18N( SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ) );
if ( mpText && mnTextSize && xPPTBreakIter.is() )
{
OUString sT( mpText, mnTextSize );
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 87783e8a7f2f..0b5c2c66a156 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -86,12 +86,12 @@ static void lcl_setLanguageForObj( SdrObject *pObj, LanguageType nLang, bool bLa
else
{
sal_uInt16 nLangWhichId = 0;
- sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+ SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
switch (nScriptType)
{
- case SCRIPTTYPE_LATIN : nLangWhichId = EE_CHAR_LANGUAGE; break;
- case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
- case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
+ case SvtScriptType::LATIN : nLangWhichId = EE_CHAR_LANGUAGE; break;
+ case SvtScriptType::ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
+ case SvtScriptType::COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
default:
OSL_FAIL("unexpected case" );
return;
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 8d0cfbd1ba2f..e5002ec52fe2 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -136,7 +136,7 @@ public:
sal_uInt16 nLayer = SDRPAGE_NOTFOUND) SAL_OVERRIDE;
// Re-implement GetScriptType for this view to get correct results
- virtual sal_uInt16 GetScriptType() const SAL_OVERRIDE;
+ virtual SvtScriptType GetScriptType() const SAL_OVERRIDE;
/** After this method has been called with <TRUE/> following changes of
the current page are ignored in that the corresponding text is not
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 6a6297d32754..25913dd91ad6 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -179,7 +179,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
SvxScriptSetItem aSetItem( nSlotId, GetPool() );
aSetItem.GetItemSet().Put( aAttrSet, false );
- sal_uInt16 nScriptType = mpView->GetScriptType();
+ SvtScriptType nScriptType = mpView->GetScriptType();
if( (nSlotId == SID_ATTR_CHAR_FONT) || (nSlotId == SID_ATTR_CHAR_FONTHEIGHT) )
{
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 7b5460d1c4fc..f65ac7f747de 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -618,7 +618,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
nSlot == SID_ATTR_CHAR_WEIGHT )
{
// #i78017 establish the same behaviour as in Writer
- sal_uInt16 nScriptType = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ SvtScriptType nScriptType = SvtScriptType::LATIN | SvtScriptType::ASIAN | SvtScriptType::COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScriptType = mpView->GetScriptType();
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 669106eb9e56..03223da468ce 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1404,9 +1404,9 @@ sal_Int8 OutlineView::ExecuteDrop( const ExecuteDropEvent&, DropTargetHelper&, :
}
// Re-implement GetScriptType for this view to get correct results
-sal_uInt16 OutlineView::GetScriptType() const
+SvtScriptType OutlineView::GetScriptType() const
{
- sal_uInt16 nScriptType = ::sd::View::GetScriptType();
+ SvtScriptType nScriptType = ::sd::View::GetScriptType();
OutlinerParaObject* pTempOPObj = mrOutliner.CreateParaObject();
if(pTempOPObj)