Kaydet (Commit) 2d178225 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert bullets and numbering dialog to .ui

Change-Id: I303684cd0d4e2f3092cc776cd0b77725d6741bc6
üst 6abfb890
......@@ -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 \
......
......@@ -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 \
......
......@@ -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;
}
}
......
/* -*- 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: */
......@@ -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
......
/* -*- 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: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment