fdo#86546 Open the right tab for more bullets and numbering
Change-Id: Ib8dda6eab89c92fa9bea98e3570896ea02692585
This commit is contained in:
@@ -68,8 +68,9 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq )
|
||||
}
|
||||
|
||||
const SfxItemSet* pArgs = rReq.GetArgs();
|
||||
SFX_ITEMSET_ARG( pArgs, pPageItem, SfxStringItem, FN_PARAM_1, false );
|
||||
|
||||
if( !pArgs )
|
||||
if ( !pArgs || pPageItem )
|
||||
{
|
||||
// fill ItemSet for Dialog
|
||||
SfxItemSet aEditAttr( mpDoc->GetPool() );
|
||||
@@ -84,6 +85,8 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq )
|
||||
boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg( NULL, &aNewAttr, mpView ) : 0);
|
||||
if( pDlg )
|
||||
{
|
||||
if ( pPageItem )
|
||||
pDlg->SetCurPageId( OUStringToOString( pPageItem->GetValue(), RTL_TEXTENCODING_UTF8 ) );
|
||||
sal_uInt16 nResult = pDlg->Execute();
|
||||
|
||||
switch( nResult )
|
||||
|
@@ -7918,7 +7918,7 @@ SvxOrphansItem Orphan SID_ATTR_PARA_ORPHANS
|
||||
|
||||
|
||||
SfxVoidItem OutlineBullet SID_OUTLINE_BULLET
|
||||
()
|
||||
(SfxStringItem Page FN_PARAM_1)
|
||||
[
|
||||
/* flags: */
|
||||
AutoUpdate = FALSE,
|
||||
|
@@ -34,15 +34,17 @@
|
||||
#define NUM_PAGETYPE_BULLET 0
|
||||
#define NUM_PAGETYPE_SINGLENUM 1
|
||||
|
||||
class NumberingToolBoxControl;
|
||||
|
||||
class NumberingPopup : public svtools::ToolbarMenu
|
||||
{
|
||||
bool mbBulletItem;
|
||||
svt::ToolboxController& mrController;
|
||||
NumberingToolBoxControl& mrController;
|
||||
SvxNumValueSet* mpValueSet;
|
||||
DECL_LINK( VSSelectHdl, void * );
|
||||
|
||||
public:
|
||||
NumberingPopup( svt::ToolboxController& rController,
|
||||
NumberingPopup( NumberingToolBoxControl& rController,
|
||||
const css::uno::Reference< css::frame::XFrame >& rFrame,
|
||||
vcl::Window* pParent, bool bBulletItem );
|
||||
|
||||
@@ -57,6 +59,7 @@ class NumberingToolBoxControl : public svt::PopupWindowController
|
||||
public:
|
||||
NumberingToolBoxControl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
|
||||
virtual vcl::Window* createPopupWindow( vcl::Window* pParent ) SAL_OVERRIDE;
|
||||
bool IsInImpressDraw();
|
||||
|
||||
// XStatusListener
|
||||
virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent )
|
||||
@@ -76,7 +79,7 @@ public:
|
||||
};
|
||||
|
||||
//class NumberingPopup
|
||||
NumberingPopup::NumberingPopup( svt::ToolboxController& rController,
|
||||
NumberingPopup::NumberingPopup( NumberingToolBoxControl& rController,
|
||||
const css::uno::Reference< css::frame::XFrame >& rFrame,
|
||||
vcl::Window* pParent, bool bBulletItem ) :
|
||||
ToolbarMenu( rFrame, pParent, WB_STDPOPUP ),
|
||||
@@ -164,7 +167,16 @@ IMPL_LINK( NumberingPopup, VSSelectHdl, void *, pControl )
|
||||
}
|
||||
else if ( getSelectedEntryId() == 1 )
|
||||
{
|
||||
css::uno::Sequence< css::beans::PropertyValue > aArgs( 0 );
|
||||
OUString aPageName;
|
||||
if ( mrController.IsInImpressDraw() )
|
||||
aPageName = "customize";
|
||||
else
|
||||
// Writer variants
|
||||
aPageName = "options";
|
||||
|
||||
css::uno::Sequence< css::beans::PropertyValue > aArgs( 1 );
|
||||
aArgs[0].Name = "Page";
|
||||
aArgs[0].Value <<= aPageName;
|
||||
mrController.dispatchCommand( ".uno:OutlineBullet", aArgs );
|
||||
}
|
||||
|
||||
@@ -184,6 +196,12 @@ vcl::Window* NumberingToolBoxControl::createPopupWindow( vcl::Window* pParent )
|
||||
return new NumberingPopup( *this, m_xFrame, pParent, mbBulletItem );
|
||||
}
|
||||
|
||||
bool NumberingToolBoxControl::IsInImpressDraw()
|
||||
{
|
||||
return ( m_sModuleName == "com.sun.star.presentation.PresentationDocument" ||
|
||||
m_sModuleName == "com.sun.star.drawing.DrawingDocument" );
|
||||
}
|
||||
|
||||
void SAL_CALL NumberingToolBoxControl::statusChanged( const css::frame::FeatureStateEvent& rEvent )
|
||||
throw ( css::uno::RuntimeException, std::exception )
|
||||
{
|
||||
|
@@ -186,6 +186,9 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
|
||||
boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTabDialog( DLG_SVXTEST_NUM_BULLET,
|
||||
GetView().GetWindow(), &aSet, GetShell()));
|
||||
OSL_ENSURE(pDlg, "Dialog creation failed!");
|
||||
SFX_REQUEST_ARG( rReq, pPageItem, SfxStringItem, FN_PARAM_1, false );
|
||||
if ( pPageItem )
|
||||
pDlg->SetCurPageId( OUStringToOString( pPageItem->GetValue(), RTL_TEXTENCODING_UTF8 ) );
|
||||
const short nRet = pDlg->Execute();
|
||||
const SfxPoolItem* pItem;
|
||||
if ( RET_OK == nRet )
|
||||
|
Reference in New Issue
Block a user