diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-11-15 11:21:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-11-15 12:11:42 +0000 |
commit | 2d1782250088280425833c060513245bf3defed7 (patch) | |
tree | 383a813d99c5544ae0897f0ed43e5baeec8b1935 /sd | |
parent | 6abfb890a2fad1931a79d53018f932205a668264 (diff) |
convert bullets and numbering dialog to .ui
Change-Id: I303684cd0d4e2f3092cc776cd0b77725d6741bc6
Diffstat (limited to 'sd')
-rw-r--r-- | sd/AllLangResTarget_sd.mk | 1 | ||||
-rw-r--r-- | sd/UIConfig_sdraw.mk | 1 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgolbul.cxx | 58 | ||||
-rw-r--r-- | sd/source/ui/dlg/dlgolbul.src | 63 | ||||
-rw-r--r-- | sd/source/ui/inc/OutlineBulletDlg.hxx | 10 | ||||
-rw-r--r-- | sd/source/ui/inc/dlgolbul.hrc | 21 |
6 files changed, 31 insertions, 123 deletions
diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk index 895bdbb33247..45d874e5efa2 100644 --- a/sd/AllLangResTarget_sd.mk +++ b/sd/AllLangResTarget_sd.mk @@ -44,7 +44,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\ sd/source/ui/dlg/animobjs.src \ sd/source/ui/dlg/dlgass.src \ sd/source/ui/dlg/dlgfield.src \ - sd/source/ui/dlg/dlgolbul.src \ sd/source/ui/dlg/LayerDialog.src \ sd/source/ui/dlg/navigatr.src \ sd/source/ui/dlg/PaneDockingWindow.src \ diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk index 90c2448cf949..228a4d7173c0 100644 --- a/sd/UIConfig_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -67,6 +67,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/sdraw,\ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\ sd/uiconfig/sdraw/ui/breakdialog \ + sd/uiconfig/sdraw/ui/bulletsandnumbering \ sd/uiconfig/sdraw/ui/crossfadedialog \ sd/uiconfig/sdraw/ui/dlgsnap \ sd/uiconfig/sdraw/ui/copydlg \ diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx index a09b92e80ab8..a03ae76250bf 100644 --- a/sd/source/ui/dlg/dlgolbul.cxx +++ b/sd/source/ui/dlg/dlgolbul.cxx @@ -38,7 +38,6 @@ #include "sdresid.hxx" #include "glob.hrc" -#include "dlgolbul.hrc" #include "bulmaper.hxx" #include "DrawDocShell.hxx" #include <svl/aeitem.hxx> @@ -52,13 +51,12 @@ OutlineBulletDlg::OutlineBulletDlg( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) - : SfxTabDialog ( pParent, SdResId(TAB_OUTLINEBULLET) ), - aInputSet ( *pAttr ), - bTitle ( sal_False ), - pSdView ( pView ) + : SfxTabDialog( pParent, "BulletsAndNumberingDialog", + "modules/sdraw/ui/bulletsandnumbering.ui") + , aInputSet( *pAttr ) + , bTitle(false) + , pSdView(pView) { - FreeResource(); - aInputSet.MergeRange( SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL ); aInputSet.Put( *pAttr ); @@ -128,15 +126,14 @@ OutlineBulletDlg::OutlineBulletDlg( SetInputSet( &aInputSet ); if(!bTitle) - AddTabPage(RID_SVXPAGE_PICK_SINGLE_NUM); + AddTabPage("singlenum", RID_SVXPAGE_PICK_SINGLE_NUM); else - RemoveTabPage( RID_SVXPAGE_PICK_SINGLE_NUM ); - - AddTabPage( RID_SVXPAGE_PICK_BULLET ); - AddTabPage( RID_SVXPAGE_PICK_BMP ); - AddTabPage(RID_SVXPAGE_NUM_OPTIONS ); - AddTabPage(RID_SVXPAGE_NUM_POSITION ); + RemoveTabPage("singlenum"); + AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET); + AddTabPage("graphics", RID_SVXPAGE_PICK_BMP); + m_nOptionsId = AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS); + m_nPositionId = AddTabPage("position", RID_SVXPAGE_NUM_POSITION); } OutlineBulletDlg::~OutlineBulletDlg() @@ -146,30 +143,25 @@ OutlineBulletDlg::~OutlineBulletDlg() void OutlineBulletDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { - switch ( nId ) + if (nId == m_nOptionsId) { - case RID_SVXPAGE_NUM_OPTIONS: + if( pSdView ) { - if( pSdView ) - { - FieldUnit eMetric = pSdView->GetDoc().GetUIUnit(); - SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric)); - rPage.PageCreated(aSet); - } + FieldUnit eMetric = pSdView->GetDoc().GetUIUnit(); + SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric)); + rPage.PageCreated(aSet); } - break; - case RID_SVXPAGE_NUM_POSITION: + } + else if (nId == m_nPositionId) + { + if( pSdView ) { - if( pSdView ) - { - FieldUnit eMetric = pSdView->GetDoc().GetUIUnit(); - SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric)); - rPage.PageCreated(aSet); - } + FieldUnit eMetric = pSdView->GetDoc().GetUIUnit(); + SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric)); + rPage.PageCreated(aSet); } - break; } } diff --git a/sd/source/ui/dlg/dlgolbul.src b/sd/source/ui/dlg/dlgolbul.src deleted file mode 100644 index c7b625a6231a..000000000000 --- a/sd/source/ui/dlg/dlgolbul.src +++ /dev/null @@ -1,63 +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 <svx/dialogs.hrc> -#include "dlgolbul.hrc" - -TabDialog TAB_OUTLINEBULLET -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Bullets and Numbering" ; - Moveable = TRUE ; - TabControl 1 - { - SVLook = TRUE ; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_PICK_BULLET ; - Text [ en-US ] = "Bullets" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_PICK_SINGLE_NUM ; - Text [ en-US ] = "Numbering type" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_PICK_BMP ; - Text [ en-US ] = "Graphics" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_NUM_POSITION ; - Text [ en-US ] = "Position" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_NUM_OPTIONS ; - Text [ en-US ] = "Customize" ; - }; - }; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/OutlineBulletDlg.hxx b/sd/source/ui/inc/OutlineBulletDlg.hxx index 3efc99805cfa..9d145cc96889 100644 --- a/sd/source/ui/inc/OutlineBulletDlg.hxx +++ b/sd/source/ui/inc/OutlineBulletDlg.hxx @@ -22,8 +22,6 @@ #include <sfx2/tabdlg.hxx> -#include "dlgolbul.hrc" - namespace sd { class View; @@ -39,7 +37,7 @@ public: ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ); - virtual ~OutlineBulletDlg (void); + virtual ~OutlineBulletDlg (); const SfxItemSet* GetOutputItemSet() const; @@ -51,8 +49,10 @@ private: SfxItemSet aInputSet; SfxItemSet *pOutputSet; - sal_Bool bTitle; - ::sd::View *pSdView; + sal_uInt16 m_nOptionsId; + sal_uInt16 m_nPositionId; + sal_Bool bTitle; + ::sd::View *pSdView; }; } // end of namespace sd diff --git a/sd/source/ui/inc/dlgolbul.hrc b/sd/source/ui/inc/dlgolbul.hrc deleted file mode 100644 index bf75408f11df..000000000000 --- a/sd/source/ui/inc/dlgolbul.hrc +++ /dev/null @@ -1,21 +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 TAB_OUTLINEBULLET 20601 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |