summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-13 09:53:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-13 09:55:03 +0000
commita4451e6e1ff41edfed8eff16b433ae8dab952945 (patch)
treefb90cf203e0811eabdcb31cc6b60a20ce4bd06e8 /sd/source
parentd1062ff1a5d922b96aea0f422b9399dbafe9e18c (diff)
convert break dialog to .ui
Change-Id: Ic0cee9c164eb077f76403a154461f1d1f3b52921
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/dlg/brkdlg.cxx42
-rw-r--r--sd/source/ui/dlg/brkdlg.src71
-rw-r--r--sd/source/ui/inc/BreakDlg.hxx12
-rw-r--r--sd/source/ui/inc/brkdlg.hrc28
-rw-r--r--sd/source/ui/view/drviewsc.cxx1
5 files changed, 21 insertions, 133 deletions
diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx
index 676de78922a4..8ec335b679ed 100644
--- a/sd/source/ui/dlg/brkdlg.cxx
+++ b/sd/source/ui/dlg/brkdlg.cxx
@@ -26,7 +26,6 @@
#include <vcl/msgbox.hxx>
#include "sdattr.hxx"
-#include "brkdlg.hrc"
#include "sdresid.hxx"
#include "View.hxx"
#include "drawview.hxx"
@@ -45,18 +44,16 @@ BreakDlg::BreakDlg(
DrawDocShell* pShell,
sal_uLong nSumActionCount,
sal_uLong nObjCount )
- : SfxModalDialog ( pWindow, SdResId( DLG_BREAK ) ),
- aFtObjInfo ( this, SdResId( FT_OBJ_INFO ) ),
- aFtActInfo ( this, SdResId( FT_ACT_INFO ) ),
- aFtInsInfo ( this, SdResId( FT_INS_INFO ) ),
- aFiObjInfo ( this, SdResId( FI_OBJ_INFO ) ),
- aFiActInfo ( this, SdResId( FI_ACT_INFO ) ),
- aFiInsInfo ( this, SdResId( FI_INS_INFO ) ),
- aBtnCancel ( this, SdResId( BTN_CANCEL ) ),
- aLink ( LINK( this, BreakDlg, UpDate)),
- mpProgress ( NULL )
+ : SfxModalDialog(pWindow, "BreakDialog", "modules/sdraw/ui/breakdialog.ui")
+ , aLink( LINK(this, BreakDlg, UpDate))
+ , mpProgress( NULL )
{
- aBtnCancel.SetClickHdl( LINK( this, BreakDlg, CancelButtonHdl));
+ get(m_pFiObjInfo, "metafiles");
+ get(m_pFiActInfo, "metaobjects");
+ get(m_pFiInsInfo, "drawingobjects");
+ get(m_pBtnCancel, "cancel");
+
+ m_pBtnCancel->SetClickHdl( LINK( this, BreakDlg, CancelButtonHdl));
mpProgress = new SfxProgress( pShell, SD_RESSTR(STR_BREAK_METAFILE), nSumActionCount*3 );
@@ -66,24 +63,19 @@ BreakDlg::BreakDlg(
pDrView = _pDrView;
bCancel = sal_False;
-
- FreeResource();
}
BreakDlg::~BreakDlg()
{
- if( mpProgress )
- delete mpProgress;
-
- if( pProgrInfo )
- delete pProgrInfo;
+ delete mpProgress;
+ delete pProgrInfo;
}
// Control-Handler for cancel button
IMPL_LINK_NOARG(BreakDlg, CancelButtonHdl)
{
bCancel = sal_True;
- aBtnCancel.Disable();
+ m_pBtnCancel->Disable();
return( 0L );
}
@@ -114,32 +106,32 @@ IMPL_LINK( BreakDlg, UpDate, void*, nInit )
OUString info = OUString::number( pProgrInfo->GetCurObj() )
+ "/"
+ OUString::number( pProgrInfo->GetObjCount() );
- aFiObjInfo.SetText(info);
+ m_pFiObjInfo->SetText(info);
// how many actions are started?
if(pProgrInfo->GetActionCount() == 0)
{
- aFiActInfo.SetText( OUString() );
+ m_pFiActInfo->SetText( OUString() );
}
else
{
info = OUString::number( pProgrInfo->GetCurAction() )
+ "/"
+ OUString::number( pProgrInfo->GetActionCount() );
- aFiActInfo.SetText(info);
+ m_pFiActInfo->SetText(info);
}
// and inserted????
if(pProgrInfo->GetInsertCount() == 0)
{
- aFiInsInfo.SetText( OUString() );
+ m_pFiInsInfo->SetText( OUString() );
}
else
{
info = OUString::number( pProgrInfo->GetCurInsert() )
+ "/"
+ OUString::number( pProgrInfo->GetInsertCount() );
- aFiInsInfo.SetText(info);
+ m_pFiInsInfo->SetText(info);
}
Application::Reschedule();
diff --git a/sd/source/ui/dlg/brkdlg.src b/sd/source/ui/dlg/brkdlg.src
deleted file mode 100644
index d8e87fbeba82..000000000000
--- a/sd/source/ui/dlg/brkdlg.src
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "brkdlg.hrc"
-ModalDialog DLG_BREAK
-{
- HelpID = "sd:ModalDialog:DLG_BREAK";
- OutputSize = TRUE;
- SVLook = TRUE;
- Pos = MAP_APPFONT( 84, 34 );
- Size = MAP_APPFONT( 160, 74 );
- Moveable = TRUE;
- FixedText FT_OBJ_INFO
- {
- Pos = MAP_APPFONT( 6, 6 );
- Size = MAP_APPFONT( 85, 10 );
- Text [ en-US ] = "Processing metafile:";
- };
- FixedText FT_ACT_INFO
- {
- Pos = MAP_APPFONT( 6, 22 );
- Size = MAP_APPFONT( 106, 10 );
- Text [ en-US ] = "Broken down metaobjects:";
- };
- FixedText FT_INS_INFO
- {
- Pos = MAP_APPFONT( 6, 38 );
- Size = MAP_APPFONT( 90, 10 );
- Text [ en-US ] = "Inserted drawing objects:";
- };
- FixedText FI_OBJ_INFO
- {
- Pos = MAP_APPFONT( 100, 6 );
- Size = MAP_APPFONT( 154, 10 );
- };
- FixedText FI_ACT_INFO
- {
- Pos = MAP_APPFONT( 100, 22 );
- Size = MAP_APPFONT( 54, 10 );
- };
- FixedText FI_INS_INFO
- {
- Pos = MAP_APPFONT( 100, 38 );
- Size = MAP_APPFONT( 54, 10 );
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT( 55, 54 );
- Size = MAP_APPFONT( 50, 14 );
- TabStop = TRUE;
- };
- Text [ en-US ] = "Break";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/BreakDlg.hxx b/sd/source/ui/inc/BreakDlg.hxx
index 632a5c1f7615..f50b043e7534 100644
--- a/sd/source/ui/inc/BreakDlg.hxx
+++ b/sd/source/ui/inc/BreakDlg.hxx
@@ -56,15 +56,11 @@ public:
short Execute();
private:
- FixedText aFtObjInfo;
- FixedText aFtActInfo;
- FixedText aFtInsInfo;
+ FixedText* m_pFiObjInfo;
+ FixedText* m_pFiActInfo;
+ FixedText* m_pFiInsInfo;
+ CancelButton* m_pBtnCancel;
- FixedInfo aFiObjInfo;
- FixedInfo aFiActInfo;
- FixedInfo aFiInsInfo;
-
- CancelButton aBtnCancel;
DrawView* pDrView;
sal_Bool bCancel;
diff --git a/sd/source/ui/inc/brkdlg.hrc b/sd/source/ui/inc/brkdlg.hrc
deleted file mode 100644
index 03115053ea88..000000000000
--- a/sd/source/ui/inc/brkdlg.hrc
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#define FT_OBJ_INFO 1
-#define FT_ACT_INFO 2
-#define FT_INS_INFO 3
-#define FI_OBJ_INFO 4
-#define FI_ACT_INFO 5
-#define FI_INS_INFO 6
-#define BTN_CANCEL 7
-#define DLG_BREAK 6197
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index 4cdcdfc127b3..5a9129d9669d 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -49,7 +49,6 @@
#include "DrawDocShell.hxx"
#include "drawview.hxx"
#include "sdabstdlg.hxx"
-#include "brkdlg.hrc"
namespace sd {
/**