summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-14 11:44:02 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-14 11:56:48 +0000
commitf7bb9d000b6f54298cc3d9678711b82eb2dcb337 (patch)
treef141a65453c5e9fee01a276a88a68344db2d882a /sd/source
parent4f08dcc0e68fa7da6778706b349a19de1c064531 (diff)
convert cross-fade dialog to .ui
Change-Id: I51f90299f0a2f9573dd8cfd1e6b875e7c76af125
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/dlg/morphdlg.cxx33
-rw-r--r--sd/source/ui/dlg/morphdlg.src97
-rw-r--r--sd/source/ui/inc/morphdlg.hrc29
-rw-r--r--sd/source/ui/inc/morphdlg.hxx17
4 files changed, 20 insertions, 156 deletions
diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx
index 2b682bddb8d7..af95d5904ebf 100644
--- a/sd/source/ui/dlg/morphdlg.cxx
+++ b/sd/source/ui/dlg/morphdlg.cxx
@@ -23,7 +23,6 @@
#include "sdresid.hxx"
#include "sdmod.hxx"
#include "sdiocmpt.hxx"
-#include "morphdlg.hrc"
#include <svx/xfillit0.hxx>
#include <svx/xlineit0.hxx>
#include <svx/xenum.hxx>
@@ -33,18 +32,14 @@
namespace sd {
-MorphDlg::MorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2 ) :
- ModalDialog ( pParent, SdResId( DLG_MORPH ) ),
- aGrpPreset ( this, SdResId( GRP_PRESET ) ),
- aFtSteps ( this, SdResId( FT_STEPS ) ),
- aMtfSteps ( this, SdResId( MTF_STEPS ) ),
- aCbxAttributes ( this, SdResId( CBX_ATTRIBUTES ) ),
- aCbxOrientation ( this, SdResId( CBX_ORIENTATION ) ),
- aBtnOK ( this, SdResId( BTN_OK ) ),
- aBtnCancel ( this, SdResId( BTN_CANCEL ) ),
- aBtnHelp ( this, SdResId( BTN_HELP ) )
+MorphDlg::MorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2 )
+ : ModalDialog(pParent, "CrossFadeDialog",
+ "modules/sdraw/ui/crossfadedialog.ui")
{
- FreeResource();
+ get(m_pMtfSteps, "increments");
+ get(m_pCbxAttributes, "attributes");
+ get(m_pCbxOrientation, "orientation");
+
LoadSettings();
SfxItemPool* pPool = (SfxItemPool*) pObj1->GetObjectItemPool();
@@ -62,7 +57,7 @@ MorphDlg::MorphDlg( ::Window* pParent, const SdrObject* pObj1, const SdrObject*
if ( ( ( eLineStyle1 == XLINE_NONE ) || ( eLineStyle2 == XLINE_NONE ) ) &&
( ( eFillStyle1 != XFILL_SOLID ) || ( eFillStyle2 != XFILL_SOLID ) ) )
{
- aCbxAttributes.Disable();
+ m_pCbxAttributes->Disable();
}
}
@@ -89,9 +84,9 @@ void MorphDlg::LoadSettings()
bOrient = bAttrib = sal_True;
}
- aMtfSteps.SetValue( nSteps );
- aCbxOrientation.Check( bOrient );
- aCbxAttributes.Check( bAttrib );
+ m_pMtfSteps->SetValue( nSteps );
+ m_pCbxOrientation->Check( bOrient );
+ m_pCbxAttributes->Check( bAttrib );
}
// -----------------------------------------------------------------------------
@@ -105,9 +100,9 @@ void MorphDlg::SaveSettings() const
{
SdIOCompat aCompat( *xOStm, STREAM_WRITE, 1 );
- *xOStm << (sal_uInt16) aMtfSteps.GetValue()
- << aCbxOrientation.IsChecked()
- << aCbxAttributes.IsChecked();
+ *xOStm << (sal_uInt16) m_pMtfSteps->GetValue()
+ << m_pCbxOrientation->IsChecked()
+ << m_pCbxAttributes->IsChecked();
}
}
diff --git a/sd/source/ui/dlg/morphdlg.src b/sd/source/ui/dlg/morphdlg.src
deleted file mode 100644
index 975a7af8b055..000000000000
--- a/sd/source/ui/dlg/morphdlg.src
+++ /dev/null
@@ -1,97 +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 "app.hrc"
-#include "morphdlg.hrc"
-#include "helpids.h"
-
-ModalDialog DLG_MORPH
-{
- HelpID = CMD_SID_POLYGON_MORPHING ;
- HelpID = ".uno:Morphing" ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 196 , 68 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 141 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 141 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 140 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedLine GRP_PRESET
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 129 , 8 ) ;
- Text [ en-US ] = "Settings" ;
- };
- FixedText FT_STEPS
- {
- Pos = MAP_APPFONT ( 12 , 16 ) ;
- Size = MAP_APPFONT ( 40 , 10 ) ;
- Text [ en-US ] = "Increments" ;
- };
- MetricField MTF_STEPS
- {
- HelpID = "sd:MetricField:DLG_MORPH:MTF_STEPS";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 56 , 14 ) ;
- Size = MAP_APPFONT ( 30 , 12 ) ;
- TabStop = TRUE ;
- Spin = TRUE ;
- Repeat = TRUE ;
- Minimum = 1 ;
- Maximum = 256 ;
- First = 1 ;
- Last = 256 ;
- };
- CheckBox CBX_ATTRIBUTES
- {
- HelpID = "sd:CheckBox:DLG_MORPH:CBX_ATTRIBUTES";
- Pos = MAP_APPFONT ( 12 , 29 ) ;
- Size = MAP_APPFONT ( 121 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Cross-fade attributes" ;
- };
- CheckBox CBX_ORIENTATION
- {
- HelpID = "sd:CheckBox:DLG_MORPH:CBX_ORIENTATION";
- Pos = MAP_APPFONT ( 12 , 44 ) ;
- Size = MAP_APPFONT ( 121 , 12 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Same orientation" ;
- };
- Text [ en-US ] = "Cross-fading" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/morphdlg.hrc b/sd/source/ui/inc/morphdlg.hrc
deleted file mode 100644
index 8a4539835ab3..000000000000
--- a/sd/source/ui/inc/morphdlg.hrc
+++ /dev/null
@@ -1,29 +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 DLG_MORPH 653
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-#define GRP_PRESET 1
-#define FT_STEPS 1
-#define MTF_STEPS 1
-#define CBX_ATTRIBUTES 1
-#define CBX_ORIENTATION 2
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/morphdlg.hxx b/sd/source/ui/inc/morphdlg.hxx
index a3ff8740681d..1e639eb31fc5 100644
--- a/sd/source/ui/inc/morphdlg.hxx
+++ b/sd/source/ui/inc/morphdlg.hxx
@@ -41,19 +41,14 @@ public:
virtual ~MorphDlg (void);
void SaveSettings() const;
- sal_uInt16 GetFadeSteps() const { return (sal_uInt16) aMtfSteps.GetValue(); }
- sal_Bool IsAttributeFade() const { return aCbxAttributes.IsChecked(); }
- sal_Bool IsOrientationFade() const { return aCbxOrientation.IsChecked(); }
+ sal_uInt16 GetFadeSteps() const { return (sal_uInt16) m_pMtfSteps->GetValue(); }
+ bool IsAttributeFade() const { return m_pCbxAttributes->IsChecked(); }
+ bool IsOrientationFade() const { return m_pCbxOrientation->IsChecked(); }
private:
- FixedLine aGrpPreset;
- FixedText aFtSteps;
- MetricField aMtfSteps;
- CheckBox aCbxAttributes;
- CheckBox aCbxOrientation;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
+ NumericField* m_pMtfSteps;
+ CheckBox* m_pCbxAttributes;
+ CheckBox* m_pCbxOrientation;
void LoadSettings();
};