summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-05 22:46:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-05 23:14:48 +0000
commitbe4035d00f37c492494fa7860955b6d0868c7f77 (patch)
treef394d98079c609ec75a0023f33eb138831c030fb /cui/source
parent79283929ac9b8e56516b70c8381e0c31f1c68645 (diff)
convert callout tabdialog to .ui
Change-Id: If16ddb848eb0a46d0d5d91cb6366a6e268cd1b7a
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/inc/cuires.hrc2
-rw-r--r--cui/source/inc/labdlg.hxx18
-rw-r--r--cui/source/tabpages/labdlg.cxx82
-rw-r--r--cui/source/tabpages/labdlg.hrc26
-rw-r--r--cui/source/tabpages/labdlg.src64
5 files changed, 45 insertions, 147 deletions
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 0c5151083f2e..f3580e679279 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -40,8 +40,6 @@
// RID_CUI_GALLERY_END (RID_SVX_START + 410)
// used in "tabpages"
-#define RID_SVXDLG_LINE (RID_SVX_START + 50)
-#define RID_SVXDLG_CAPTION (RID_SVX_START + 151)
#define RID_SVXSTRARY_PAPERSIZE_STD (RID_SVX_START + 142)
#define RID_SVXSTRARY_PAPERSIZE_DRAW (RID_SVX_START + 143)
#define RID_SVXSTR_TABLE_PRESET_NONE (RID_SVX_START + 969)
diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx
index 2d049d643310..1df123bc46b8 100644
--- a/cui/source/inc/labdlg.hxx
+++ b/cui/source/inc/labdlg.hxx
@@ -93,22 +93,22 @@ public:
class SvxCaptionTabDialog : public SfxTabDialog
{
private:
- const SdrView* pView;
- sal_uInt16 nAnchorCtrls;
+ const SdrView* pView;
+ sal_uInt16 nAnchorCtrls;
+ sal_uInt16 m_nSwPosSizePageId;
+ sal_uInt16 m_nPositionSizePageId;
+ sal_uInt16 m_nCaptionPageId;
Link aValidateLink;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
+ SvxCaptionTabDialog(Window* pParent, const SdrView* pView,
+ sal_uInt16 nAnchorTypes = 0);
- SvxCaptionTabDialog(Window* pParent, const SdrView* pView,
- sal_uInt16 nAnchorTypes = 0 );
-
- ~SvxCaptionTabDialog();
-
- /// link for the Writer to validate positions
- void SetValidateFramePosLink( const Link& rLink );
+ /// link for the Writer to validate positions
+ void SetValidateFramePosLink( const Link& rLink );
};
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 41bc3d72ea50..1fd3866e5edf 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -34,7 +34,6 @@
#include <svx/sxctitm.hxx>
#include "svx/dlgutil.hxx"
-#include "labdlg.hrc"
#include "labdlg.hxx"
#include "transfrm.hxx"
@@ -508,65 +507,56 @@ void SvxCaptionTabPage::FillValueSet()
//========================================================================
-SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView, sal_uInt16 nAnchorTypes)
- : SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_CAPTION ) ),
- pView ( pSdrView ),
- nAnchorCtrls(nAnchorTypes)
+SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView,
+ sal_uInt16 nAnchorTypes)
+ : SfxTabDialog( pParent, "CalloutDialog", "cui/ui/calloutdialog.ui")
+ , pView(pSdrView)
+ , nAnchorCtrls(nAnchorTypes)
+ , m_nSwPosSizePageId(0)
+ , m_nPositionSizePageId(0)
+ , m_nCaptionPageId(0)
{
- FreeResource();
-
- DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+ assert(pView); //Keine gueltige View Uebergeben!
//different positioning page in Writer
- if(nAnchorCtrls & 0x00ff )
+ if (nAnchorCtrls & 0x00ff)
{
- AddTabPage( RID_SVXPAGE_SWPOSSIZE, SvxSwPosSizeTabPage::Create,
- SvxSwPosSizeTabPage::GetRanges );
- RemoveTabPage( RID_SVXPAGE_POSITION_SIZE);
+ m_nSwPosSizePageId = AddTabPage("RID_SVXPAGE_SWPOSSIZE", SvxSwPosSizeTabPage::Create,
+ SvxSwPosSizeTabPage::GetRanges );
+ RemoveTabPage("RID_SVXPAGE_POSITION_SIZE");
}
else
{
- AddTabPage( RID_SVXPAGE_POSITION_SIZE, SvxPositionSizeTabPage::Create,
- SvxPositionSizeTabPage::GetRanges );
- RemoveTabPage( RID_SVXPAGE_SWPOSSIZE );
+ m_nPositionSizePageId = AddTabPage("RID_SVXPAGE_POSITION_SIZE", SvxPositionSizeTabPage::Create,
+ SvxPositionSizeTabPage::GetRanges );
+ RemoveTabPage("RID_SVXPAGE_SWPOSSIZE");
}
- AddTabPage( RID_SVXPAGE_CAPTION, SvxCaptionTabPage::Create,
- SvxCaptionTabPage::GetRanges );
+ m_nCaptionPageId = AddTabPage("RID_SVXPAGE_CAPTION", SvxCaptionTabPage::Create,
+ SvxCaptionTabPage::GetRanges );
}
-// -----------------------------------------------------------------------
-
-SvxCaptionTabDialog::~SvxCaptionTabDialog()
-{
-}
-
-// -----------------------------------------------------------------------
-
void SvxCaptionTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
- switch( nId )
+ if (nId == m_nPositionSizePageId)
{
- case RID_SVXPAGE_POSITION_SIZE:
- ( (SvxPositionSizeTabPage&) rPage ).SetView( pView );
- ( (SvxPositionSizeTabPage&) rPage ).Construct();
- if( nAnchorCtrls & SVX_OBJ_NORESIZE )
- ( (SvxPositionSizeTabPage&) rPage ).DisableResize();
-
- if( nAnchorCtrls & SVX_OBJ_NOPROTECT )
- ( (SvxPositionSizeTabPage&) rPage ).DisableProtect();
- break;
- case RID_SVXPAGE_SWPOSSIZE :
- {
- SvxSwPosSizeTabPage& rSwPage = static_cast<SvxSwPosSizeTabPage&>(rPage);
- rSwPage.EnableAnchorTypes(nAnchorCtrls);
- rSwPage.SetValidateFramePosLink( aValidateLink );
- }
- break;
+ ( (SvxPositionSizeTabPage&) rPage ).SetView( pView );
+ ( (SvxPositionSizeTabPage&) rPage ).Construct();
+ if( nAnchorCtrls & SVX_OBJ_NORESIZE )
+ ( (SvxPositionSizeTabPage&) rPage ).DisableResize();
- case RID_SVXPAGE_CAPTION:
- ( (SvxCaptionTabPage&) rPage ).SetView( pView );
- ( (SvxCaptionTabPage&) rPage ).Construct();
- break;
+ if( nAnchorCtrls & SVX_OBJ_NOPROTECT )
+ ( (SvxPositionSizeTabPage&) rPage ).DisableProtect();
+ }
+ else if (nId == m_nSwPosSizePageId)
+ {
+ SvxSwPosSizeTabPage& rSwPage = static_cast<SvxSwPosSizeTabPage&>(rPage);
+ rSwPage.EnableAnchorTypes(nAnchorCtrls);
+ rSwPage.SetValidateFramePosLink( aValidateLink );
+ }
+ else if (nId == m_nCaptionPageId)
+ {
+ ( (SvxCaptionTabPage&) rPage ).SetView( pView );
+ ( (SvxCaptionTabPage&) rPage ).Construct();
}
}
diff --git a/cui/source/tabpages/labdlg.hrc b/cui/source/tabpages/labdlg.hrc
deleted file mode 100644
index 2cc565e2e9b4..000000000000
--- a/cui/source/tabpages/labdlg.hrc
+++ /dev/null
@@ -1,26 +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 <cuires.hrc>
-
-#define TAB_CONTROL 1
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/labdlg.src b/cui/source/tabpages/labdlg.src
deleted file mode 100644
index f105ae70f8ae..000000000000
--- a/cui/source/tabpages/labdlg.src
+++ /dev/null
@@ -1,64 +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 "helpid.hrc"
-#include "labdlg.hrc"
-#include <svx/dialogs.hrc>
-
-#define _POS_SIZE_TEXT \
- Text [ en-US ] = "Position and Size" ; \
-
-TabDialog RID_SVXDLG_CAPTION
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 237 , 161 ) ;
- Text [ en-US ] = "Callouts" ;\
- Moveable = TRUE ;
- TabControl TAB_CONTROL\
- {
- OutputSize = TRUE ;
- Pos = MAP_APPFONT ( 3 , 3 ) ;
- Size = MAP_APPFONT ( 189 , 97 ) ;
- PageList =
- {
- PageItem\
- {
- Identifier = RID_SVXPAGE_POSITION_SIZE ;
- PageResID = RID_SVXPAGE_POSITION_SIZE ;
- _POS_SIZE_TEXT
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_SWPOSSIZE;
- PageResID = RID_SVXPAGE_SWPOSSIZE;
- _POS_SIZE_TEXT
- };
- PageItem
- {
- Identifier = RID_SVXPAGE_CAPTION ;
- PageResID = RID_SVXPAGE_CAPTION ;
- Text [ en-US ] = "Callout" ;
- };
- };
- };
-};
- // ********************************************************************** EOF
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */