diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-27 11:15:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-27 14:10:25 +0100 |
commit | 8fed86b3ebb52cbf28ba2a561e67108e3a05a206 (patch) | |
tree | fcf618a327bf0185ba84454bfb3a91072814727b /starmath | |
parent | 7e380a76e1f0faa90fdf8f0575053d4a1ca6e1de (diff) |
add some more TypeWhichId annotations
and update the idl compiler to cope with namespaced class names
Change-Id: I7b5242f872e358bc3c5584f543767719172aac83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129026
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/mathml/export.cxx | 9 | ||||
-rw-r--r-- | starmath/source/mathml/import.cxx | 7 | ||||
-rw-r--r-- | starmath/source/mathml/mathmlexport.cxx | 7 | ||||
-rw-r--r-- | starmath/source/mathml/mathmlimport.cxx | 7 |
4 files changed, 14 insertions, 16 deletions
diff --git a/starmath/source/mathml/export.cxx b/starmath/source/mathml/export.cxx index 3254ca58b3d2..f439d537e7b3 100644 --- a/starmath/source/mathml/export.cxx +++ b/starmath/source/mathml/export.cxx @@ -120,11 +120,11 @@ bool SmMLExportWrapper::Export(SfxMedium& rMedium) } // Fetch progress bar - auto pItem = pMediumItemSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL); + const SfxUnoAnyItem* pItem = pMediumItemSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL); if (pItem) { // set progress range and start status indicator - static_cast<const SfxUnoAnyItem*>(pItem)->GetValue() >>= xStatusIndicator; + pItem->GetValue() >>= xStatusIndicator; xStatusIndicator->start(SmResId(STR_STATSTR_WRITING), 3); xStatusIndicator->setValue(0); } @@ -163,10 +163,11 @@ bool SmMLExportWrapper::Export(SfxMedium& rMedium) // TODO/LATER: handle the case of embedded links gracefully if (bEmbedded) //&& !pStg->IsRoot() ) { - auto pDocHierarchItem = pMediumItemSet->GetItem(SID_DOC_HIERARCHICALNAME); + const SfxStringItem* pDocHierarchItem + = pMediumItemSet->GetItem(SID_DOC_HIERARCHICALNAME); if (pDocHierarchItem != nullptr) { - OUString aName = static_cast<const SfxStringItem*>(pDocHierarchItem)->GetValue(); + OUString aName = pDocHierarchItem->GetValue(); if (!aName.isEmpty()) xInfoSet->setPropertyValue("StreamRelPath", makeAny(aName)); } diff --git a/starmath/source/mathml/import.cxx b/starmath/source/mathml/import.cxx index efafcbf89005..6a3ea6104d1a 100644 --- a/starmath/source/mathml/import.cxx +++ b/starmath/source/mathml/import.cxx @@ -137,8 +137,7 @@ ErrCode SmMLImportWrapper::Import(SfxMedium& rMedium) SfxItemSet* pSet = rMedium.GetItemSet(); if (pSet) { - const SfxUnoAnyItem* pItem - = static_cast<const SfxUnoAnyItem*>(pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL)); + const SfxUnoAnyItem* pItem = pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL); if (pItem != nullptr) pItem->GetValue() >>= xStatusIndicator; } @@ -180,8 +179,8 @@ ErrCode SmMLImportWrapper::Import(SfxMedium& rMedium) OUString aName(u"dummyObjName"); if (rMedium.GetItemSet()) { - const SfxStringItem* pDocHierarchItem = static_cast<const SfxStringItem*>( - rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME)); + const SfxStringItem* pDocHierarchItem + = rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME); if (pDocHierarchItem != nullptr) aName = pDocHierarchItem->GetValue(); } diff --git a/starmath/source/mathml/mathmlexport.cxx b/starmath/source/mathml/mathmlexport.cxx index d0f5089e241c..ec8bb1d61395 100644 --- a/starmath/source/mathml/mathmlexport.cxx +++ b/starmath/source/mathml/mathmlexport.cxx @@ -115,8 +115,7 @@ bool SmXMLExportWrapper::Export(SfxMedium& rMedium) SfxItemSet* pSet = rMedium.GetItemSet(); if (pSet) { - const SfxUnoAnyItem* pItem = static_cast<const SfxUnoAnyItem*>( - pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL)); + const SfxUnoAnyItem* pItem = pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL); if (pItem) pItem->GetValue() >>= xStatusIndicator; } @@ -166,8 +165,8 @@ bool SmXMLExportWrapper::Export(SfxMedium& rMedium) OUString aName; if (rMedium.GetItemSet()) { - const SfxStringItem* pDocHierarchItem = static_cast<const SfxStringItem*>( - rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME)); + const SfxStringItem* pDocHierarchItem + = rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME); if (pDocHierarchItem) aName = pDocHierarchItem->GetValue(); } diff --git a/starmath/source/mathml/mathmlimport.cxx b/starmath/source/mathml/mathmlimport.cxx index f9068548af4b..6b96cd9a4ed1 100644 --- a/starmath/source/mathml/mathmlimport.cxx +++ b/starmath/source/mathml/mathmlimport.cxx @@ -116,8 +116,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium) SfxItemSet* pSet = rMedium.GetItemSet(); if (pSet) { - const SfxUnoAnyItem* pItem - = static_cast<const SfxUnoAnyItem*>(pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL)); + const SfxUnoAnyItem* pItem = pSet->GetItem(SID_PROGRESS_STATUSBAR_CONTROL); if (pItem) pItem->GetValue() >>= xStatusIndicator; } @@ -168,8 +167,8 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium) OUString aName("dummyObjName"); if (rMedium.GetItemSet()) { - const SfxStringItem* pDocHierarchItem = static_cast<const SfxStringItem*>( - rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME)); + const SfxStringItem* pDocHierarchItem + = rMedium.GetItemSet()->GetItem(SID_DOC_HIERARCHICALNAME); if (pDocHierarchItem) aName = pDocHierarchItem->GetValue(); } |