[Libreoffice-commits] core.git: 2 commits - sd/source svx/sdi svx/source sw/source
Maxim Monastirsky
momonasmon at gmail.com
Sun Nov 23 00:57:31 PST 2014
sd/source/ui/func/fuolbull.cxx | 5 ++++-
sd/source/ui/view/drviews2.cxx | 5 ++++-
svx/sdi/svx.sdi | 2 +-
svx/source/tbxctrls/bulletsnumbering.cxx | 26 ++++++++++++++++++++++----
sw/source/uibase/shells/txtnum.cxx | 3 +++
5 files changed, 34 insertions(+), 7 deletions(-)
New commits:
commit cb6ced50c11ea71e5655c46e49f17f3b5921f526
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Sun Nov 23 10:19:40 2014 +0200
fdo#86546 Open the right tab for more bullets and numbering
Change-Id: Ib8dda6eab89c92fa9bea98e3570896ea02692585
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index aa19030..9888738 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -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 )
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 9691ba5..565ee34 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -7918,7 +7918,7 @@ SvxOrphansItem Orphan SID_ATTR_PARA_ORPHANS
SfxVoidItem OutlineBullet SID_OUTLINE_BULLET
-()
+(SfxStringItem Page FN_PARAM_1)
[
/* flags: */
AutoUpdate = FALSE,
diff --git a/svx/source/tbxctrls/bulletsnumbering.cxx b/svx/source/tbxctrls/bulletsnumbering.cxx
index 3f848c2..bc47a66 100644
--- a/svx/source/tbxctrls/bulletsnumbering.cxx
+++ b/svx/source/tbxctrls/bulletsnumbering.cxx
@@ -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 )
{
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 79fa813..359ff14 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -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 )
commit 2497285dcaf135e55daf273607ed86575c8032ac
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Sun Nov 23 00:32:48 2014 +0200
Related: fdo#83572 Deactivate previous function when inserting object
Change-Id: I790202676210e6724c369996f26651ab5307ee72
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index c8b6c07..00d1b0d 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1159,7 +1159,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ATTR_TABLE:
{
SetCurrentFunction( FuInsertOLE::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
-
+ // Set the selection tool as the old one. This in particular important for the
+ // zoom function, in which clicking without dragging zooms as well, and that
+ // makes exiting the object editing mode impossible.
+ SetOldFunction( FuSelection::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
Cancel();
rReq.Ignore ();
More information about the Libreoffice-commits
mailing list