summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/recfloat.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-02 12:02:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-02 15:26:54 +0100
commitdc5e8921530e811d0154af39504e4c149a6eae13 (patch)
tree78be59ebfed6a3f2b6ca71681d67f5dd677df447 /sfx2/source/dialog/recfloat.cxx
parentb6cc10ecf28d2e0ae25383f2dc82b66e67971b08 (diff)
convert SID_RECORDING_FLOATWINDOW to .ui
Change-Id: Iae3f0269e5e7f830465580dc4a520ba01ef87a79
Diffstat (limited to 'sfx2/source/dialog/recfloat.cxx')
-rw-r--r--sfx2/source/dialog/recfloat.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 9b8faba9f52d..2b0b42944553 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -167,25 +167,22 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl(
: SfxFloatingWindow( pBind,
pChildWin,
pParent,
- SfxResId( SID_RECORDING_FLOATWINDOW ) )
- , aTbx( this, SfxResId(SID_RECORDING_FLOATWINDOW) )
+ "FloatingRecord", "sfx/ui/floatingrecord.ui", pBind->GetActiveFrame() )
{
+ get(m_pTbx, "toolbar");
+
// Retrieve label from helper function
- uno::Reference< frame::XFrame > xFrame = GetBindings().GetActiveFrame();
+ uno::Reference< frame::XFrame > xFrame = getFrame();
OUString aCommandStr( ".uno:StopRecording" );
- aTbx.SetItemText( SID_STOP_RECORDING, GetLabelFromCommandURL( aCommandStr, xFrame ));
-
- // Determine size of toolbar
- Size aTbxSize = aTbx.CalcWindowSizePixel();
- aTbx.SetPosSizePixel( Point(), aTbxSize );
- SetOutputSizePixel( aTbxSize );
+ sal_uInt16 nItemId = m_pTbx->GetItemId(aCommandStr);
+ m_pTbx->SetItemText( nItemId, GetLabelFromCommandURL( aCommandStr, xFrame ));
// create a generic toolbox controller for our internal toolbox
svt::GenericToolboxController* pController = new svt::GenericToolboxController(
::comphelper::getProcessComponentContext(),
xFrame,
- &aTbx,
- SID_STOP_RECORDING,
+ m_pTbx,
+ nItemId,
aCommandStr );
xStopRecTbxCtrl = uno::Reference< frame::XToolbarController >(
static_cast< cppu::OWeakObject* >( pController ),
@@ -194,7 +191,7 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl(
if ( xUpdate.is() )
xUpdate->update();
- aTbx.SetSelectHdl( LINK( this, SfxRecordingFloat_Impl, Select ) );
+ m_pTbx->SetSelectHdl( LINK( this, SfxRecordingFloat_Impl, Select ) );
// start recording
SfxBoolItem aItem( SID_RECORDMACRO, true );
@@ -248,7 +245,7 @@ void SfxRecordingFloat_Impl::StateChanged( StateChangedType nStateChange )
IMPL_LINK( SfxRecordingFloat_Impl, Select, ToolBox*, pToolBar )
{
(void)pToolBar;
- sal_Int16 nKeyModifier( (sal_Int16)aTbx.GetModifier() );
+ sal_Int16 nKeyModifier( (sal_Int16)m_pTbx->GetModifier() );
if ( xStopRecTbxCtrl.is() )
xStopRecTbxCtrl->execute( nKeyModifier );