diff options
Diffstat (limited to 'forms/source/richtext/richtextcontrol.cxx')
-rw-r--r-- | forms/source/richtext/richtextcontrol.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 85da65cb0824..b2ff9f310ad0 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -31,7 +31,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <tools/debug.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <sal/log.hxx> #include <vcl/svapp.hxx> @@ -49,7 +49,6 @@ namespace frm using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::awt; - using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; ORichTextControl::ORichTextControl() @@ -176,7 +175,7 @@ namespace frm vcl::Window* pParentWin = nullptr; if ( _rParentPeer.is() ) { - VCLXWindow* pParentXWin = comphelper::getFromUnoTunnel<VCLXWindow>( _rParentPeer ); + VCLXWindow* pParentXWin = dynamic_cast<VCLXWindow*>( _rParentPeer.get() ); if ( pParentXWin ) pParentWin = pParentXWin->GetWindow(); DBG_ASSERT( pParentWin, "ORichTextControl::createPeer: could not obtain the VCL-level parent window!" ); @@ -257,7 +256,7 @@ namespace frm // the EditEngine of the model RichTextEngine* pEngine = ORichTextModel::getEditEngine( _rxModel ); - OSL_ENSURE( pEngine, "ORichTextPeer::Create: could not obtaine the edit engine from the model!" ); + OSL_ENSURE( pEngine, "ORichTextPeer::Create: could not obtain the edit engine from the model!" ); if ( !pEngine ) return nullptr; @@ -477,7 +476,7 @@ namespace frm default: { const SfxItemPool& rPool = *pRichTextControl->getView().GetEmptyItemSet().GetPool(); - bool bSupportedSlot = rPool.IsInRange( rPool.GetWhich( _nSlotId ) ); + bool bSupportedSlot = rPool.IsInRange( rPool.GetWhichIDFromSlotID( _nSlotId ) ); if ( !bSupportedSlot ) bSupportedSlot = RichTextControl::isMappableSlot( _nSlotId ); @@ -586,10 +585,10 @@ namespace frm } // is it a UNO slot? - OUString sUnoProtocolPrefix( ".uno:" ); + static constexpr std::u16string_view sUnoProtocolPrefix( u".uno:" ); if ( _rURL.Complete.startsWith( sUnoProtocolPrefix ) ) { - OUString sUnoSlotName = _rURL.Complete.copy( sUnoProtocolPrefix.getLength() ); + OUString sUnoSlotName = _rURL.Complete.copy( sUnoProtocolPrefix.size() ); SfxSlotId nSlotId = lcl_getSlotFromUnoName( SfxSlotPool::GetSlotPool(), sUnoSlotName ); if ( nSlotId > 0 ) { |