summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-16 17:28:03 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 11:32:31 +0100
commit65741289ea32fe642af179b732398c1c3e41911e (patch)
tree528600a1c8518c0de4ca59e649866f3edfce9c2f /forms
parenta13007adddadf7f5c7b503d6732cf11f3e62e619 (diff)
cleanup Printer VclRef pieces.
Change-Id: Ib47b2ec3cb54e374675981ad929856f43987418f
Diffstat (limited to 'forms')
-rw-r--r--forms/source/richtext/richtextcontrol.cxx6
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx8
2 files changed, 7 insertions, 7 deletions
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 39a29a2b9651..7377389189e0 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -314,7 +314,7 @@ namespace frm
{
{
SolarMutexGuard aGuard;
- RichTextControl* pRichTextControl = static_cast< RichTextControl* >( GetWindow() );
+ VclPtr< RichTextControl > pRichTextControl = GetAs< RichTextControl* >();
if ( pRichTextControl )
{
@@ -417,7 +417,7 @@ namespace frm
}
else if ( _rPropertyName == PROPERTY_HIDEINACTIVESELECTION )
{
- RichTextControl* pRichTextControl = static_cast< RichTextControl* >( GetWindow() );
+ VclPtr< RichTextControl > pRichTextControl = GetAs< RichTextControl* >();
bool bHide = pRichTextControl->GetHideInactiveSelection();
OSL_VERIFY( _rValue >>= bHide );
pRichTextControl->SetHideInactiveSelection( bHide );
@@ -469,7 +469,7 @@ namespace frm
ORichTextPeer::SingleAttributeDispatcher ORichTextPeer::implCreateDispatcher( SfxSlotId _nSlotId, const ::com::sun::star::util::URL& _rURL )
{
- RichTextControl* pRichTextControl = static_cast< RichTextControl* >( GetWindow() );
+ VclPtr< RichTextControl > pRichTextControl = GetAs< RichTextControl* >();
OSL_PRECOND( pRichTextControl, "ORichTextPeer::implCreateDispatcher: invalid window!" );
if ( !pRichTextControl )
return SingleAttributeDispatcher( NULL );
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index 3f2afea11653..695aadcd3bb2 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -275,7 +275,7 @@ namespace frm
{
SolarMutexGuard aGuard;
- NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() );
+ VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >();
if ( !pNavBar )
{
VCLXWindow::setProperty( _rPropertyName, _rValue );
@@ -356,7 +356,7 @@ namespace frm
SolarMutexGuard aGuard;
Any aReturn;
- NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() );
+ VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >();
if ( _rPropertyName == PROPERTY_BACKGROUNDCOLOR )
{
@@ -408,7 +408,7 @@ namespace frm
void ONavigationBarPeer::featureStateChanged( sal_Int16 _nFeatureId, bool _bEnabled )
{
// enable this button on the toolbox
- NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() );
+ VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >();
if ( pNavBar )
{
pNavBar->enableFeature( _nFeatureId, _bEnabled );
@@ -436,7 +436,7 @@ namespace frm
void ONavigationBarPeer::allFeatureStatesChanged( )
{
// force the control to update it's states
- NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() );
+ VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >();
if ( pNavBar )
pNavBar->setDispatcher( this );