summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-08-09 14:20:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-08-09 20:46:24 +0100
commitf41e7c704898fa0e86d6d128f5bd28f37c081e92 (patch)
tree660ac1f3e0f2dcbd869c557a10ece4a5facdde94 /sfx2
parente3cf54875031b8740b3ed76d6f530c44d2d8c44e (diff)
convert SfxStyleDialogs to .ui
Change-Id: I32aa538026669e22e0756cd062b72e67f8d179e5
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/dialog.hrc1
-rw-r--r--sfx2/source/dialog/dialog.src4
-rw-r--r--sfx2/source/dialog/styledlg.cxx27
3 files changed, 10 insertions, 22 deletions
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 1e36560a4374..6f9a8d13f086 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -35,7 +35,6 @@
#define RID_DLG_ALIEN_WARNING ( RC_DIALOG_BEGIN + 0)
#define STR_RESET ( RC_DIALOG_BEGIN + 0)
-#define STR_TABPAGE_MANAGESTYLES ( RC_DIALOG_BEGIN + 12)
#define MSG_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13)
#define MSG_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14)
#define DLG_NEW_STYLE_BY_EXAMPLE ( RC_DIALOG_BEGIN + 15)
diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
index d137b57f7502..b1fffdb64541 100644
--- a/sfx2/source/dialog/dialog.src
+++ b/sfx2/source/dialog/dialog.src
@@ -30,10 +30,6 @@ String STR_APPLY
{
Text [ en-US ] = "Apply";
};
-String STR_TABPAGE_MANAGESTYLES
-{
- Text [ en-US ] = "Organizer" ;
-};
InfoBox MSG_TABPAGE_INVALIDNAME
{
BUTTONS = WB_OK ;
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 35236caf9d52..933b4dacaffb 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -32,36 +32,31 @@
SfxStyleDialog::SfxStyleDialog
(
- Window* pParent, // Parent
- const ResId& rResId, // ResId
- SfxStyleSheetBase& rStyle, // stylesheet to be processed
- sal_Bool bFreeRes, // Flag release resources
- const String* pUserBtnTxt
-) :
+ Window* pParent, // Parent
+ const OString& rID, const OUString& rUIXMLDescription,
+ SfxStyleSheetBase& rStyle // stylesheet to be processed
+)
/* [Description]
Constructor: Add Manage TabPage, set ExampleSet from style.
*/
- SfxTabDialog( pParent, rResId,
+ : SfxTabDialog( pParent, rID, rUIXMLDescription,
rStyle.GetItemSet().Clone(),
// return TRUE also without ParentSupport , but extended
// to suppress the standardButton
- rStyle.HasParentSupport() ? sal_True : 2,
- pUserBtnTxt ),
+ rStyle.HasParentSupport() ? sal_True : 2 )
- pStyle( &rStyle )
+ , pStyle( &rStyle )
{
- AddTabPage( ID_TABPAGE_MANAGESTYLES,
- SfxResId( STR_TABPAGE_MANAGESTYLES ).toString(),
- SfxManageStyleSheetPage::Create, 0, sal_False, 0 );
+ m_nOrganizerId = AddTabPage("organizer", SfxManageStyleSheetPage::Create, 0);
// With new template always set the management page as the current page
if( rStyle.GetName().isEmpty() )
- SetCurPageId( ID_TABPAGE_MANAGESTYLES );
+ SetCurPageId(m_nOrganizerId);
else
{
OUString sTxt = OUString(GetText()) + ": " + rStyle.GetName();
@@ -70,8 +65,6 @@ SfxStyleDialog::SfxStyleDialog
delete pExampleSet; // in SfxTabDialog::Ctor() already created
pExampleSet = &pStyle->GetItemSet();
- if ( bFreeRes )
- FreeResource();
GetCancelButton().SetClickHdl( LINK(this, SfxStyleDialog, CancelHdl) );
}
@@ -131,7 +124,7 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton )
{
(void)pButton; //unused
- SfxTabPage* pPage = GetTabPage( ID_TABPAGE_MANAGESTYLES );
+ SfxTabPage* pPage = GetTabPage(m_nOrganizerId);
const SfxItemSet* pInSet = GetInputSetImpl();
SfxWhichIter aIter( *pInSet );