summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/txtnode/thints.cxx8
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx4
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx6
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx6
4 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 2c0a1250f0b7..71c1ed75d059 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -3492,7 +3492,7 @@ LanguageType SwTextNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen,
}
// #i91465# Consider nScript if pSwpHints == 0
- const sal_uInt16 nWhichId = GetWhichOfScript( RES_CHRATR_LANGUAGE, nScript );
+ const TypedWhichId<SvxLanguageItem> nWhichId = GetWhichOfScript( RES_CHRATR_LANGUAGE, nScript );
if ( HasHints() )
{
@@ -3526,8 +3526,8 @@ LanguageType SwTextNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen,
if( pHt->DontExpand() ? nBegin >= *pEndIdx : nBegin > *pEndIdx)
continue;
}
- const SfxPoolItem* pItem = CharFormat::GetItem( *pHt, nWhichId );
- const LanguageType nLng = static_cast<const SvxLanguageItem*>(pItem)->GetLanguage();
+ const SvxLanguageItem* pItem = CharFormat::GetItem( *pHt, nWhichId );
+ const LanguageType nLng = pItem->GetLanguage();
// does the attribute completely cover the range?
if( nAttrStart <= nBegin && nEnd <= *pEndIdx )
@@ -3539,7 +3539,7 @@ LanguageType SwTextNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen,
}
if( LANGUAGE_DONTKNOW == nRet )
{
- nRet = static_cast<const SvxLanguageItem&>(GetSwAttrSet().Get( nWhichId )).GetLanguage();
+ nRet = GetSwAttrSet().Get( nWhichId ).GetLanguage();
if( LANGUAGE_DONTKNOW == nRet )
nRet = GetAppLanguage();
}
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index d2e57406f8b3..5b1d62b4b12b 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -3688,8 +3688,8 @@ WW8Ruby::WW8Ruby(const SwTextNode& rNode, const SwFormatRuby& rRuby, const MSWor
if (!rText.isEmpty())
nScript = g_pBreakIt->GetBreakIter()->getScriptType(rText, 0);
- sal_uInt16 nWhich = GetWhichOfScript(RES_CHRATR_FONTSIZE, nScript);
- auto& rHeightItem = static_cast<const SvxFontHeightItem&>(rExport.GetItem(nWhich));
+ TypedWhichId<SvxFontHeightItem> nWhich = GetWhichOfScript(RES_CHRATR_FONTSIZE, nScript);
+ const SvxFontHeightItem& rHeightItem = rExport.GetItem(nWhich);
m_nBaseHeight = rHeightItem.GetHeight();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 55e6d3ed899c..d53085c91276 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -1087,9 +1087,9 @@ IMPL_LINK_NOARG(SwMMResultEmailDialog, SendDocumentsHdl_Impl, weld::Button&, voi
{
SwAsciiOptions aOpt;
sal_uInt16 nAppScriptType = SvtLanguageOptions::GetI18NScriptTypeOfLanguage( GetAppLanguage() );
- sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
- aOpt.SetLanguage( static_cast<const SvxLanguageItem&>(pTargetView->GetWrtShell().
- GetDefault( nWhich )).GetLanguage());
+ TypedWhichId<SvxLanguageItem> nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
+ const SvxLanguageItem& rDefLangItem = pTargetView->GetWrtShell().GetDefault( nWhich );
+ aOpt.SetLanguage( rDefLangItem.GetLanguage() );
aOpt.SetParaFlags( LINEEND_CR );
aOpt.WriteUserData( sFilterOptions );
}
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index d800233e2856..43a3249823ae 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -162,9 +162,9 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( weld::Window* pParent, SwDocShell& rDocSh,
{
if(pDoc)
{
- const sal_uInt16 nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
- aOpt.SetLanguage( static_cast<const SvxLanguageItem&>(pDoc->
- GetDefault( nWhich )).GetLanguage());
+ const TypedWhichId<SvxLanguageItem> nWhich = GetWhichOfScript( RES_CHRATR_LANGUAGE, nAppScriptType);
+ const SvxLanguageItem& rLangItem = pDoc->GetDefault( nWhich );
+ aOpt.SetLanguage( rLangItem.GetLanguage() );
}
else
{