openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zheng...@apache.org
Subject svn commit: r1463154 [1/6] - in /openoffice/branches/sidebar/main: editeng/inc/editeng/ editeng/source/outliner/ officecfg/registry/data/org/openoffice/Office/UI/ sc/sdi/ sc/source/ui/app/ sc/source/ui/docshell/ sc/source/ui/drawfunc/ sc/source/ui/view...
Date Mon, 01 Apr 2013 14:43:35 GMT
Author: zhengfan
Date: Mon Apr  1 14:43:34 2013
New Revision: 1463154

URL: http://svn.apache.org/r1463154
Log:
i121794: Commit for Paragraph Properties Panel, in Sidebar feature branch. By ZhengFan.

Added:
    openoffice/branches/sidebar/main/svx/inc/svx/nbdtmg.hxx   (with props)
    openoffice/branches/sidebar/main/svx/inc/svx/nbdtmgfact.hxx   (with props)
    openoffice/branches/sidebar/main/svx/inc/svx/sdr/table/tablecontroller.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/nbdtmg.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/nbdtmgfact.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsControl.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaBulletsPopup.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaLineSpacingPopup.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingControl.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaNumberingPopup.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaPropertyPanel.hxx   (with props)
    openoffice/branches/sidebar/main/svx/source/sidebar/paragraph/ParaPropertyPanel.src   (with props)
Removed:
    openoffice/branches/sidebar/main/svx/source/table/tablecontroller.hxx
Modified:
    openoffice/branches/sidebar/main/editeng/inc/editeng/outliner.hxx
    openoffice/branches/sidebar/main/editeng/source/outliner/outliner.cxx
    openoffice/branches/sidebar/main/editeng/source/outliner/outlvw.cxx
    openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
    openoffice/branches/sidebar/main/sc/sdi/drtxtob.sdi
    openoffice/branches/sidebar/main/sc/source/ui/app/typemap.cxx
    openoffice/branches/sidebar/main/sc/source/ui/docshell/docfunc.cxx
    openoffice/branches/sidebar/main/sc/source/ui/drawfunc/drtxtob.cxx
    openoffice/branches/sidebar/main/sc/source/ui/view/drawview.cxx
    openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi
    openoffice/branches/sidebar/main/sd/sdi/drtxtob.sdi
    openoffice/branches/sidebar/main/sd/sdi/outlnvsh.sdi
    openoffice/branches/sidebar/main/sd/source/core/typemap.cxx
    openoffice/branches/sidebar/main/sd/source/ui/func/fuolbull.cxx
    openoffice/branches/sidebar/main/sd/source/ui/func/fuparagr.cxx
    openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx
    openoffice/branches/sidebar/main/sd/source/ui/inc/View.hxx
    openoffice/branches/sidebar/main/sd/source/ui/inc/fuolbull.hxx
    openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob.cxx
    openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob1.cxx
    openoffice/branches/sidebar/main/sd/source/ui/view/drviews3.cxx
    openoffice/branches/sidebar/main/sd/source/ui/view/drviews8.cxx
    openoffice/branches/sidebar/main/sd/source/ui/view/drviewsf.cxx
    openoffice/branches/sidebar/main/sd/source/ui/view/outlnvs2.cxx
    openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx
    openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk
    openoffice/branches/sidebar/main/svx/Library_svx.mk
    openoffice/branches/sidebar/main/svx/Package_inc.mk
    openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc
    openoffice/branches/sidebar/main/svx/inc/svx/sidebar/ValueSetWithTextControl.hxx
    openoffice/branches/sidebar/main/svx/inc/svx/svdedxv.hxx
    openoffice/branches/sidebar/main/svx/inc/svx/svxids.hrc
    openoffice/branches/sidebar/main/svx/sdi/svx.sdi
    openoffice/branches/sidebar/main/svx/source/dialog/svxbmpnumvalueset.src
    openoffice/branches/sidebar/main/svx/source/sidebar/PanelFactory.cxx
    openoffice/branches/sidebar/main/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
    openoffice/branches/sidebar/main/svx/source/svdraw/svdedxv.cxx
    openoffice/branches/sidebar/main/svx/source/table/accessibletableshape.cxx
    openoffice/branches/sidebar/main/svx/source/table/tablecontroller.cxx
    openoffice/branches/sidebar/main/sw/sdi/_annotsh.sdi
    openoffice/branches/sidebar/main/sw/sdi/_textsh.sdi
    openoffice/branches/sidebar/main/sw/sdi/_viewsh.sdi
    openoffice/branches/sidebar/main/sw/sdi/drwtxtsh.sdi
    openoffice/branches/sidebar/main/sw/source/ui/inc/textsh.hxx
    openoffice/branches/sidebar/main/sw/source/ui/shells/annotsh.cxx
    openoffice/branches/sidebar/main/sw/source/ui/shells/drwtxtex.cxx
    openoffice/branches/sidebar/main/sw/source/ui/shells/txtnum.cxx
    openoffice/branches/sidebar/main/sw/source/ui/uiview/viewtab.cxx

Modified: openoffice/branches/sidebar/main/editeng/inc/editeng/outliner.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/editeng/inc/editeng/outliner.hxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/editeng/inc/editeng/outliner.hxx (original)
+++ openoffice/branches/sidebar/main/editeng/inc/editeng/outliner.hxx Mon Apr  1 14:43:34 2013
@@ -37,7 +37,7 @@
 #include <tools/link.hxx>
 #include <rsc/rscsfx.hxx>
 #include "editeng/editengdllapi.h"
-
+#include <editeng/numitem.hxx>
 #include <svtools/grfmgr.hxx>
 
 #include <tools/rtti.hxx>	// wegen typedef TypeId
@@ -372,7 +372,8 @@ public:
 		or disables numbering for the selected paragraphs if the numbering of the first paragraph is on
 	*/
 	void        ToggleBullets();
-
+	sal_Bool	ToggleBullets(sal_Bool bBulletOnOff, sal_Bool bNormalBullet, sal_Bool bMasterView, SvxNumRule* pNumRule = NULL, sal_Bool bForceBulletOnOff = false);
+	sal_Bool        ToggleAllParagraphsBullets(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet, sal_Bool bToggleOn, sal_Bool bMasterView, SvxNumRule* pNumRule = NULL);
 	/** enables numbering for the selected paragraphs that are not enabled and ignore all selected
 		paragraphs that already have numbering enabled.
 	*/
@@ -1049,6 +1050,8 @@ public:
 
     virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara );
     virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart );
+
+    sal_Int16 GetBulletsNumberingStatus();
 };
 
 #endif

Modified: openoffice/branches/sidebar/main/editeng/source/outliner/outliner.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/editeng/source/outliner/outliner.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/editeng/source/outliner/outliner.cxx (original)
+++ openoffice/branches/sidebar/main/editeng/source/outliner/outliner.cxx Mon Apr  1 14:43:34 2013
@@ -370,6 +370,53 @@ void Outliner::SetParaIsNumberingRestart
     }
 }
 
+sal_Int16 Outliner::GetBulletsNumberingStatus()
+{
+	sal_Bool bHasBulletsNumbering = FALSE;
+	sal_uInt16 nParaCount = (sal_uInt16)(pParaList->GetParagraphCount());
+	for (sal_uInt16 nPara = 0; nPara < nParaCount; nPara++)
+	{
+		if ((bHasBulletsNumbering = ImplHasBullet(nPara)))
+		{
+			break;
+		}
+	}
+	sal_uInt16 nBulletsCount = 0;
+	sal_uInt16 nNumberingCount = 0;
+	if (bHasBulletsNumbering)
+	{
+		// At least have one paragraph that having bullets or numbering.
+		for (sal_uInt16 nPara = 0; nPara < nParaCount; nPara++)
+		{
+			Paragraph* pPara = pParaList->GetParagraph(nPara);
+			const SfxItemSet& rAttrs = GetParaAttribs(nPara);
+			if (!pPara)
+			{
+				continue;
+			}
+			const SvxNumberFormat* pFmt = GetNumberFormat(nPara);
+			if (!pFmt)
+			{
+				// At least, exists one paragraph that has no Bullets/Numbering.
+				break;
+			}
+			else if ((pFmt->GetNumberingType() == SVX_NUM_BITMAP) || (pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL))
+			{
+				// Having Bullets in this paragraph.
+				nBulletsCount++;
+			}
+			else
+			{
+				// Having Numbering in this paragraph.
+				nNumberingCount++;
+			}
+		}
+	}
+	sal_Int16 nValue = (nBulletsCount == nParaCount) ? 0 : 2;
+	nValue = (nNumberingCount == nParaCount) ? 1 : nValue;
+	return nValue;
+}
+
 OutlinerParaObject* Outliner::CreateParaObject( sal_uInt16 nStartPara, sal_uInt16 nCount ) const
 {
 	DBG_CHKTHIS(Outliner,0);

Modified: openoffice/branches/sidebar/main/editeng/source/outliner/outlvw.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/editeng/source/outliner/outlvw.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/editeng/source/outliner/outlvw.cxx (original)
+++ openoffice/branches/sidebar/main/editeng/source/outliner/outlvw.cxx Mon Apr  1 14:43:34 2013
@@ -50,6 +50,7 @@
 #include <editeng/numitem.hxx>
 #include <vcl/window.hxx>
 #include <svl/itemset.hxx>
+#include <svl/eitem.hxx>
 #include <editeng/editstat.hxx>
 
 
@@ -1232,6 +1233,205 @@ void OutlinerView::ToggleBullets()
 	pOwner->UndoActionEnd( OLUNDO_DEPTH );
 }
 
+sal_Bool	OutlinerView::ToggleBullets(sal_Bool bBulletOnOff, sal_Bool bNormalBullet, sal_Bool bMasterView, SvxNumRule* pNumRule, sal_Bool bForceBulletOnOff)
+{
+	pOwner->UndoActionStart( OLUNDO_DEPTH );
+
+	ESelection aSel( pEditView->GetSelection() );
+	aSel.Adjust();
+
+	const bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
+	pOwner->pEditEngine->SetUpdateMode( sal_False );
+
+	sal_Int16 nDepth = -2;
+	sal_Bool bRet = sal_False;
+
+	//Modified by xuezhiy for bullet enhancement
+	bool bBulletOn = sal_True;
+
+	if( bBulletOnOff )
+	{
+		bool bHasBullet = sal_False;
+		for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+		{
+			bHasBullet = pOwner->ImplHasBullet(nPara);
+			if(bHasBullet)
+				break;
+		}
+
+		if( bHasBullet )
+		{			
+			bBulletOn = sal_False;
+
+			for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+			{
+				Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+				DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?");
+
+				const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara );
+				if( pPara )
+				{					
+					const SvxNumberFormat* pFmt = pOwner ->GetNumberFormat(nPara);
+					
+					if( !pFmt )
+					{
+						// Has no Bullet paragraph
+						bBulletOn = sal_True;
+						break;
+					}
+					else if( ( pFmt->GetNumberingType() == SVX_NUM_BITMAP ) || ( pFmt->GetNumberingType() == SVX_NUM_CHAR_SPECIAL ) )
+					{
+						// Normal ==>> Numbering
+						if( !bNormalBullet )
+						{
+							bBulletOn = sal_True;
+							break;
+						}
+					}
+					else
+					{		
+						// Numbering ==>> Normal
+						if( bNormalBullet )
+						{
+							bBulletOn = sal_True;
+							break;
+						}
+					}
+				}
+			}
+		}
+
+	}
+	if (bForceBulletOnOff) {
+		bBulletOn = bBulletOnOff;
+	}
+	for ( sal_uInt16 nPara = aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
+	{
+		Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
+		DBG_ASSERT(pPara, "OutlinerView::ToggleBullets(), illegal selection?");
+
+		if( pPara )	
+		{			
+			bRet = sal_True;
+
+			nDepth = pOwner->GetDepth(nPara);			
+
+			if( bBulletOn && nDepth == -1 )
+			{
+				// Off ==>> On
+				nDepth = 0;
+			}
+			else if( !bBulletOn && nDepth == 0 )
+			{
+				// On ==>> Off
+				nDepth = -1;
+			}
+			pOwner->SetDepth( pPara, nDepth );
+
+			const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara );
+//			bool bBulletState = ((const SfxBoolItem&) rAttrs.Get( EE_PARA_BULLETSTATE ) ).GetValue();
+
+			SfxItemSet aAttrs(rAttrs);
+			aAttrs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, bBulletOn ) );
+			
+			// Change bullet types
+			if( bBulletOn && pNumRule)
+			{
+				bool bSetBulletType = false;
+				if( !bBulletOnOff )
+				{
+					// Not bullet on/off button	
+					bSetBulletType = true;
+				}
+				else
+				{
+					const SvxNumberFormat* pFmt = pOwner ->GetNumberFormat(nPara);				
+
+					if( !pFmt )
+					{
+						// Has no bullet
+						bSetBulletType = true;
+					}
+					else
+					{
+						sal_Int16 nNumType = pFmt->GetNumberingType();
+						if( bNormalBullet && nNumType != SVX_NUM_BITMAP && nNumType != SVX_NUM_CHAR_SPECIAL )
+						{
+							// Set to Normal bullet, old bullet type is Numbering bullet
+							bSetBulletType = true;
+						}
+						else if( !bNormalBullet && (nNumType == SVX_NUM_BITMAP || nNumType == SVX_NUM_CHAR_SPECIAL) )
+						{
+							// Set to Numbering bullet, old bullet type is Normal bullet
+							bSetBulletType = true;
+						}
+					}
+				}
+
+				// Get old bullet space
+				SvxNumRule aNewRule( *pNumRule );
+
+				const SfxPoolItem* pPoolItem=NULL;
+				SfxItemState eState = rAttrs.GetItemState(EE_PARA_NUMBULLET, sal_False, &pPoolItem);
+				if (eState != SFX_ITEM_SET)
+				{
+					// Use default value when has not contain bullet item
+					ESelection aSelection(nPara, 0);
+					SfxItemSet aTmpSet( pOwner->pEditEngine->GetAttribs( aSelection ) );
+					pPoolItem = aTmpSet.GetItem( EE_PARA_NUMBULLET );
+				}
+
+				const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >( pPoolItem );
+				//const SvxNumBulletItem& rNumBullet = (const SvxNumBulletItem&) rAttrs.Get( EE_PARA_NUMBULLET );
+				if( pNumBulletItem )
+				{
+					sal_uInt16 nLevelCnt = pNumBulletItem->GetNumRule()->GetLevelCount();
+					nLevelCnt = Min( nLevelCnt, pNumRule->GetLevelCount() );
+
+					for( sal_uInt16 nLevel = 0; nLevel < nLevelCnt; ++nLevel )
+					{
+						const SvxNumberFormat* pOldFmt = pNumBulletItem->GetNumRule()->Get( nLevel );
+						const SvxNumberFormat* pNewFmt = pNumRule->Get( nLevel );
+
+						if( pOldFmt && pNewFmt && (pOldFmt->GetFirstLineOffset() != pNewFmt->GetFirstLineOffset() 
+							|| pOldFmt->GetAbsLSpace() != pNewFmt->GetAbsLSpace() ) )
+						{						
+							SvxNumberFormat* pNewFmtClone = new SvxNumberFormat( *pNewFmt );
+							pNewFmtClone->SetFirstLineOffset( pOldFmt->GetFirstLineOffset() );
+							pNewFmtClone->SetAbsLSpace( pOldFmt->GetAbsLSpace() );
+
+							aNewRule.SetLevel( nLevel, pNewFmtClone );
+							delete pNewFmtClone;
+						}
+					}
+				}
+
+				// Don't set bullet attribute to paragraph in Master view 
+				// Because it will be set into style sheet
+				if( bSetBulletType && !bMasterView )
+					aAttrs.Put(SvxNumBulletItem( aNewRule ), EE_PARA_NUMBULLET);
+			}
+
+			pOwner->SetParaAttribs( nPara, aAttrs );
+			
+		}
+	}
+
+    // --> OD 2009-03-10 #i100014#
+    // It is not a good idea to substract 1 from a count and cast the result
+    // to sal_uInt16 without check, if the count is 0.
+    sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
+    // <--
+    pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount );
+    pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) );
+
+	pOwner->pEditEngine->SetUpdateMode( bUpdate );
+
+	pOwner->UndoActionEnd( OLUNDO_DEPTH );
+
+	return bRet;
+}
+
 void OutlinerView::EnableBullets()
 {
 	pOwner->UndoActionStart( OLUNDO_DEPTH );
@@ -1266,6 +1466,126 @@ void OutlinerView::EnableBullets()
 	pOwner->UndoActionEnd( OLUNDO_DEPTH );
 }
 
+sal_Bool OutlinerView::ToggleAllParagraphsBullets(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet, sal_Bool bToggleOn, sal_Bool bMasterView, SvxNumRule* pNumRule)
+{
+	if (!pOwner || !pOwner->pEditEngine || !pOwner->pParaList)
+	{
+		return sal_False;
+	}
+
+	sal_Bool bReturn = sal_False;
+	pOwner->UndoActionStart(OLUNDO_DEPTH);
+	const sal_Bool bUpdate = pOwner->pEditEngine->GetUpdateMode();
+	pOwner->pEditEngine->SetUpdateMode(sal_False);
+
+	sal_Int16 nDepth = -2;
+	sal_uInt16 nParaCount = (sal_uInt16)(pOwner->pParaList->GetParagraphCount());
+	for (sal_uInt16 nPara = 0; nPara < nParaCount; nPara++)
+	{
+		Paragraph* pPara = pOwner->pParaList->GetParagraph(nPara);
+		DBG_ASSERT(pPara, "OutlinerView::ToggleAllParagraphsBullets(), illegal selection?");
+
+		if (pPara)
+		{
+			bReturn = sal_True;
+			nDepth = pOwner->GetDepth(nPara);
+			if (bToggleOn && nDepth == -1)
+			{
+				// Off ==>> On
+				nDepth = 0;
+			}
+			else if (!bToggleOn && nDepth == 0)
+			{
+				// On ==>> Off
+				nDepth = -1;
+			}
+			pOwner->SetDepth(pPara, nDepth);
+
+			const SfxItemSet& rAttrs = pOwner->GetParaAttribs(nPara);
+			SfxItemSet aAttrs(rAttrs);
+			aAttrs.Put(SfxBoolItem(EE_PARA_BULLETSTATE, bToggleOn));
+
+			// Change bullet types.
+			if (bToggleOn && pNumRule)
+			{
+				sal_Bool bSetBulletType = sal_False;
+				if (!bBulletOnOffMode)
+				{
+					// Not bullet on/off button.
+					bSetBulletType = sal_True;
+				}
+				else
+				{
+					const SvxNumberFormat* pFmt = pOwner ->GetNumberFormat(nPara);
+					if (!pFmt)
+					{
+						// Has no bullet.
+						bSetBulletType = sal_True;
+					}
+					else
+					{
+						sal_Int16 nNumType = pFmt->GetNumberingType();
+						if (bNormalBullet && nNumType != SVX_NUM_BITMAP && nNumType != SVX_NUM_CHAR_SPECIAL)
+						{
+							// Set to Normal bullet, old bullet type is Numbering bullet.
+							bSetBulletType = sal_True;
+						}
+						else if (!bNormalBullet && (nNumType == SVX_NUM_BITMAP || nNumType == SVX_NUM_CHAR_SPECIAL))
+						{
+							// Set to Numbering bullet, old bullet type is Normal bullet.
+							bSetBulletType = sal_True;
+						}
+					}
+				}
+
+				// Get old bullet space.
+				SvxNumRule aNewRule(*pNumRule);
+				const SfxPoolItem* pPoolItem=NULL;
+				SfxItemState eState = rAttrs.GetItemState(EE_PARA_NUMBULLET, sal_False, &pPoolItem);
+				ESelection aSelection(nPara, 0);
+				SfxItemSet aTmpSet(pOwner->pEditEngine->GetAttribs(aSelection));
+				if (eState != SFX_ITEM_SET)
+				{
+					// Use default value when has not contain bullet item.
+					pPoolItem = aTmpSet.GetItem(EE_PARA_NUMBULLET);
+				}
+
+				const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >(pPoolItem);
+				if (pNumBulletItem)
+				{
+					sal_uInt16 nLevelCnt = pNumBulletItem->GetNumRule()->GetLevelCount();
+					nLevelCnt = Min(nLevelCnt, pNumRule->GetLevelCount());
+
+					for (sal_uInt16 nLevel = 0; nLevel < nLevelCnt; nLevel++)
+					{
+						const SvxNumberFormat* pOldFmt = pNumBulletItem->GetNumRule()->Get(nLevel);
+						const SvxNumberFormat* pNewFmt = pNumRule->Get(nLevel);
+						if (pOldFmt && pNewFmt && (pOldFmt->GetFirstLineOffset() != pNewFmt->GetFirstLineOffset() || pOldFmt->GetAbsLSpace() != pNewFmt->GetAbsLSpace()))
+						{
+							SvxNumberFormat* pNewFmtClone = new SvxNumberFormat(*pNewFmt);
+							pNewFmtClone->SetFirstLineOffset(pOldFmt->GetFirstLineOffset());
+							pNewFmtClone->SetAbsLSpace(pOldFmt->GetAbsLSpace());
+							aNewRule.SetLevel(nLevel, pNewFmtClone);
+							delete pNewFmtClone;
+						}
+					}
+				}
+
+				// Don't set bullet attribute to paragraph in Master view, because it will be set into style sheet.
+				if (bSetBulletType && !bMasterView)
+					aAttrs.Put(SvxNumBulletItem(aNewRule), EE_PARA_NUMBULLET);
+			}
+			pOwner->SetParaAttribs(nPara, aAttrs);
+		}
+	}
+
+	pOwner->ImplCheckParagraphs(0, nParaCount);
+	pOwner->pEditEngine->QuickMarkInvalid(ESelection(0, 0, nParaCount, 0));
+	pOwner->pEditEngine->SetUpdateMode(bUpdate);
+	pOwner->UndoActionEnd(OLUNDO_DEPTH);
+
+	return bReturn;
+}
 
 void OutlinerView::RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs )
 {

Modified: openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu (original)
+++ openoffice/branches/sidebar/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu Mon Apr  1 14:43:34 2013
@@ -722,12 +722,12 @@
         </prop>
       </node>
 
-      <node oor:name="ParagraphPropertyPanel" oor:op="replace">
+      <node oor:name="ParaPropertyPanel" oor:op="replace">
         <prop oor:name="Title" oor:type="xs:string">
           <value xml:lang="en-US">Paragraph</value>
         </prop>
         <prop oor:name="Id" oor:type="xs:string">
-          <value>ParagraphPropertyPanel</value>
+          <value>ParaPropertyPanel</value>
         </prop>
         <prop oor:name="DeckId" oor:type="xs:string">
           <value>PropertyDeck</value>
@@ -737,15 +737,14 @@
         </prop>
         <prop oor:name="ContextList">
           <value oor:separator=";">
-            Calc,         DrawText,   visible ;
-            DrawImpress,  3DObject,   visible ;
-            DrawImpress,  Draw,       hidden  ;
-            DrawImpress,  DrawText,   visible ;
-            DrawImpress,  Graphic,    hidden  ;
-            DrawImpress,  Table,      visible ;
-            DrawImpress,  TextObject, visible ;
-            DrawImpress,  3DObject,   visible ;
-            WriterAndWeb, Annotation, visible ;
+            Calc,        DrawText,   visible ;
+            DrawImpress, 3DObject,   hidden ;
+            DrawImpress, Draw,       hidden  ;
+            DrawImpress, DrawText,   visible ;
+            DrawImpress, Graphic,    hidden  ;
+            DrawImpress, Table,      visible ;
+            DrawImpress, TextObject, visible ;
+            WriterAndWeb, Annotation, hidden ;
             WriterAndWeb, DrawText,   visible ;
             WriterAndWeb, Table,      visible ;
             WriterAndWeb, Text,       visible ;
@@ -753,7 +752,7 @@
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
-          <value>private:resource/toolpanel/SvxPanelFactory/Debug_NotYetImplementedPanel</value>
+          <value>private:resource/toolpanel/SvxPanelFactory/ParaPropertyPanel</value>
         </prop>
         <prop oor:name="OrderIndex" oor:type="xs:int">
           <value>200</value>

Modified: openoffice/branches/sidebar/main/sc/sdi/drtxtob.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sc/sdi/drtxtob.sdi?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sc/sdi/drtxtob.sdi (original)
+++ openoffice/branches/sidebar/main/sc/sdi/drtxtob.sdi Mon Apr  1 14:43:34 2013
@@ -83,6 +83,15 @@ interface TableDrawText
 	SID_ALIGNCENTERHOR			[ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
 	SID_ALIGNRIGHT				[ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
 	SID_ALIGNBLOCK				[ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
+	
+	SID_ATTR_PARA_ADJUST_LEFT				[ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
+	SID_ATTR_PARA_ADJUST_CENTER			    [ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
+	SID_ATTR_PARA_ADJUST_RIGHT				[ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
+	SID_ATTR_PARA_ADJUST_BLOCK				[ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
+	SID_ATTR_PARA_LRSPACE                   [ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
+	SID_ATTR_PARA_LINESPACE                 [ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
+	SID_ATTR_PARA_ULSPACE                   [ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
+	
 	SID_ATTR_PARA_LINESPACE_10	[ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
 	SID_ATTR_PARA_LINESPACE_15	[ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]
 	SID_ATTR_PARA_LINESPACE_20	[ ExecMethod = ExecuteAttr; StateMethod = GetAttrState; Export = FALSE; ]

Modified: openoffice/branches/sidebar/main/sc/source/ui/app/typemap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sc/source/ui/app/typemap.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sc/source/ui/app/typemap.cxx (original)
+++ openoffice/branches/sidebar/main/sc/source/ui/app/typemap.cxx Mon Apr  1 14:43:34 2013
@@ -108,6 +108,9 @@
 #include <editeng/crsditem.hxx>
 #include <editeng/brkitem.hxx>
 #include <editeng/charreliefitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/ulspitem.hxx>
 #include <svx/rotmodit.hxx>
 #include <svx/drawitem.hxx>
 #include <svl/ilstitem.hxx>

Modified: openoffice/branches/sidebar/main/sc/source/ui/docshell/docfunc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sc/source/ui/docshell/docfunc.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sc/source/ui/docshell/docfunc.cxx (original)
+++ openoffice/branches/sidebar/main/sc/source/ui/docshell/docfunc.cxx Mon Apr  1 14:43:34 2013
@@ -3668,6 +3668,11 @@ sal_Bool ScDocFunc::ChangeIndent( const 
 		pBindings->Invalidate( SID_ALIGNRIGHT );
 		pBindings->Invalidate( SID_ALIGNBLOCK );
 		pBindings->Invalidate( SID_ALIGNCENTERHOR );
+		pBindings->Invalidate( SID_ATTR_LRSPACE );//xuxu
+		pBindings->Invalidate( SID_ATTR_PARA_ADJUST_LEFT );			
+		pBindings->Invalidate( SID_ATTR_PARA_ADJUST_RIGHT );
+		pBindings->Invalidate( SID_ATTR_PARA_ADJUST_BLOCK );
+		pBindings->Invalidate( SID_ATTR_PARA_ADJUST_CENTER);
         // pseudo slots for Format menu
         pBindings->Invalidate( SID_ALIGN_ANY_HDEFAULT );
         pBindings->Invalidate( SID_ALIGN_ANY_LEFT );

Modified: openoffice/branches/sidebar/main/sc/source/ui/drawfunc/drtxtob.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sc/source/ui/drawfunc/drtxtob.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sc/source/ui/drawfunc/drtxtob.cxx (original)
+++ openoffice/branches/sidebar/main/sc/source/ui/drawfunc/drtxtob.cxx Mon Apr  1 14:43:34 2013
@@ -42,6 +42,9 @@
 #include <editeng/flditem.hxx>
 #include <editeng/fontitem.hxx>
 #include <editeng/frmdiritem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/ulspitem.hxx>
 #include <svx/hlnkitem.hxx>
 #include <editeng/lspcitem.hxx>
 #include <svx/svdoutl.hxx>
@@ -645,7 +648,7 @@ void lcl_RemoveFields( OutlinerView& rOu
 		{
 			SvUShorts aPortions;
 			rEditEng.GetPortions( (sal_uInt16)nPar, aPortions );
-			//!	GetPortions should use xub_StrLen instead of USHORT
+			//!	GetPortions should use xub_StrLen instead of sal_uInt16
 
 			for ( sal_uInt16 nPos = aPortions.Count(); nPos; )
 			{
@@ -885,6 +888,72 @@ void __EXPORT ScDrawTextObjectBar::Execu
 
 			pView->SetAttributes( aSetItem.GetItemSet() );
 		}
+		else if( nSlot == SID_ATTR_PARA_LRSPACE )
+		{
+			sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
+			const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&)
+				pArgs->Get( nId );
+			SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+			nId = EE_PARA_LRSPACE;
+			SvxLRSpaceItem aLRSpaceItem( rItem.GetLeft(),
+				rItem.GetRight(), rItem.GetTxtLeft(),
+				rItem.GetTxtFirstLineOfst(), nId );
+			aEditAttr.Put( aLRSpaceItem );
+//			rReq.Done( aEditAttr );
+//			pArgs = rReq.GetArgs();
+//			pView->SetAttributes( *pArgs );
+			pView->SetAttributes( aEditAttr );
+//			Invalidate(SID_ATTR_PARA_LRSPACE);
+		}
+		else if( nSlot == SID_ATTR_PARA_LINESPACE )
+		{
+			sal_uInt16 nId = SID_ATTR_PARA_LINESPACE;
+			SvxLineSpacingItem aLineSpaceItem = (const SvxLineSpacingItem&)pArgs->Get(
+																GetPool().GetWhich(nSlot));
+			SfxItemSet aEditAttr( GetPool(), EE_PARA_SBL, EE_PARA_SBL );
+			aEditAttr.Put( aLineSpaceItem );
+//			rReq.Done( aEditAttr );
+//			pArgs = rReq.GetArgs();
+//			pView->SetAttributes( *pArgs );
+			pView->SetAttributes( aEditAttr );
+//			Invalidate(SID_ATTR_PARA_LINESPACE);
+		}
+		else if( nSlot == SID_ATTR_PARA_ULSPACE )
+		{
+			sal_uInt16 nId = SID_ATTR_PARA_ULSPACE;
+			SvxULSpaceItem aULSpaceItem = (const SvxULSpaceItem&)pArgs->Get(
+																GetPool().GetWhich(nSlot));
+			SfxItemSet aEditAttr( GetPool(), EE_PARA_ULSPACE, EE_PARA_ULSPACE );
+			aULSpaceItem.SetWhich(EE_PARA_ULSPACE);
+			aEditAttr.Put( aULSpaceItem );
+//			rReq.Done( aEditAttr );
+//			pArgs = rReq.GetArgs();
+//			pView->SetAttributes( *pArgs );
+			pView->SetAttributes( aEditAttr );
+//			Invalidate(SID_ATTR_PARA_ULSPACE);
+		}
+		else if (bArgsInReq &&
+			(nSlot == SID_ATTR_PARA_ADJUST_LEFT || nSlot == SID_ATTR_PARA_ADJUST_CENTER || nSlot == SID_ATTR_PARA_ADJUST_RIGHT || nSlot == SID_ATTR_PARA_ADJUST_BLOCK ))
+		{
+			SfxItemSet aEditAttr(pView->GetModel()->GetItemPool());			
+			SfxItemSet	aNewAttr( *aEditAttr.GetPool(), aEditAttr.GetRanges() );
+			switch ( nSlot )
+			{
+			case SID_ATTR_PARA_ADJUST_LEFT:
+				aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+				break;
+			case SID_ATTR_PARA_ADJUST_CENTER:
+				aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+				break;
+			case SID_ATTR_PARA_ADJUST_RIGHT:
+				aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+				break;
+			case SID_ATTR_PARA_ADJUST_BLOCK:
+				aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+				break;
+			}
+			pView->SetAttributes(aNewAttr);
+		}
 		else
 		{
 			// use args directly
@@ -937,24 +1006,35 @@ void __EXPORT ScDrawTextObjectBar::GetAt
 		ScViewUtil::PutItemScript( rDestSet, aAttrSet, EE_CHAR_WEIGHT, nScript );
 	if ( rDestSet.GetItemState( EE_CHAR_ITALIC ) != SFX_ITEM_UNKNOWN )
 		ScViewUtil::PutItemScript( rDestSet, aAttrSet, EE_CHAR_ITALIC, nScript );
-
 	//	Ausrichtung
 
 	SvxAdjust eAdj = ((const SvxAdjustItem&)aAttrSet.Get(EE_PARA_JUST)).GetAdjust();
 	switch( eAdj )
 	{
-		case SVX_ADJUST_LEFT:
+	case SVX_ADJUST_LEFT:
+		{
 			rDestSet.Put( SfxBoolItem( SID_ALIGNLEFT, sal_True ) );
-			break;
-		case SVX_ADJUST_CENTER:
+			rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, sal_True ) );
+		}
+		break;
+	case SVX_ADJUST_CENTER:
+		{
 			rDestSet.Put( SfxBoolItem( SID_ALIGNCENTERHOR, sal_True ) );
-			break;
-		case SVX_ADJUST_RIGHT:
+			rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, sal_True ) );
+		}
+		break;
+	case SVX_ADJUST_RIGHT:
+		{
 			rDestSet.Put( SfxBoolItem( SID_ALIGNRIGHT, sal_True ) );
-			break;
-		case SVX_ADJUST_BLOCK:
+			rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, sal_True ) );
+		}
+		break;
+	case SVX_ADJUST_BLOCK:
+		{
 			rDestSet.Put( SfxBoolItem( SID_ALIGNBLOCK, sal_True ) );
-			break;
+			rDestSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, sal_True ) );
+		}
+		break;
         default:
         {
             // added to avoid warnings
@@ -966,6 +1046,32 @@ void __EXPORT ScDrawTextObjectBar::GetAt
     rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_RIGHT,     eAdj == SVX_ADJUST_RIGHT ) );
     rDestSet.Put( SfxBoolItem( SID_ALIGN_ANY_JUSTIFIED, eAdj == SVX_ADJUST_BLOCK ) );
 
+    	SvxLRSpaceItem aLR = ((const SvxLRSpaceItem&)aAttrSet.Get( EE_PARA_LRSPACE ));
+	aLR.SetWhich(SID_ATTR_PARA_LRSPACE);
+	rDestSet.Put(aLR);
+	Invalidate( SID_ATTR_PARA_LRSPACE );
+	SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE );
+	if ( eState == SFX_ITEM_DONTCARE )
+		rDestSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
+	//xuxu for Line Space
+	SvxLineSpacingItem aLineSP = ((const SvxLineSpacingItem&)aAttrSet.
+						Get( EE_PARA_SBL ));
+	aLineSP.SetWhich(SID_ATTR_PARA_LINESPACE);
+	rDestSet.Put(aLineSP);
+	Invalidate(SID_ATTR_PARA_LINESPACE);
+	eState = aAttrSet.GetItemState( EE_PARA_SBL );
+	if ( eState == SFX_ITEM_DONTCARE )
+		rDestSet.InvalidateItem(SID_ATTR_PARA_LINESPACE);
+	//xuxu for UL Space
+	SvxULSpaceItem aULSP = ((const SvxULSpaceItem&)aAttrSet.
+						Get( EE_PARA_ULSPACE ));
+	aULSP.SetWhich(SID_ATTR_PARA_ULSPACE);
+	rDestSet.Put(aULSP);
+	Invalidate(SID_ATTR_PARA_ULSPACE);
+	eState = aAttrSet.GetItemState( EE_PARA_ULSPACE );
+	if ( eState == SFX_ITEM_DONTCARE )
+		rDestSet.InvalidateItem(SID_ATTR_PARA_ULSPACE);
+
 	//	Zeilenabstand
 
 	sal_uInt16 nLineSpace = (sal_uInt16)
@@ -995,7 +1101,7 @@ void __EXPORT ScDrawTextObjectBar::GetAt
 
 	//	Unterstreichung
 
-	SfxItemState eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, sal_True );
+	eState = aAttrSet.GetItemState( EE_CHAR_UNDERLINE, sal_True );
 	if ( eState == SFX_ITEM_DONTCARE )
 	{
 		rDestSet.InvalidateItem( SID_ULINE_VAL_NONE );

Modified: openoffice/branches/sidebar/main/sc/source/ui/view/drawview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sc/source/ui/view/drawview.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sc/source/ui/view/drawview.cxx (original)
+++ openoffice/branches/sidebar/main/sc/source/ui/view/drawview.cxx Mon Apr  1 14:43:34 2013
@@ -225,6 +225,10 @@ void ScDrawView::InvalidateDrawTextAttrs
 	rBindings.Invalidate( SID_ULINE_VAL_DOTTED );
 	rBindings.Invalidate( SID_ATTR_CHAR_OVERLINE );
 	rBindings.Invalidate( SID_ATTR_CHAR_COLOR );
+	rBindings.Invalidate( SID_ATTR_PARA_ADJUST_LEFT );			
+	rBindings.Invalidate( SID_ATTR_PARA_ADJUST_RIGHT );
+	rBindings.Invalidate( SID_ATTR_PARA_ADJUST_BLOCK );
+	rBindings.Invalidate( SID_ATTR_PARA_ADJUST_CENTER);
 	rBindings.Invalidate( SID_ALIGNLEFT );
 	rBindings.Invalidate( SID_ALIGNCENTERHOR );
 	rBindings.Invalidate( SID_ALIGNRIGHT );

Modified: openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi (original)
+++ openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi Mon Apr  1 14:43:34 2013
@@ -705,6 +705,14 @@ interface DrawView
         StateMethod = GetMenuState ;
 		MenuConfig = TRUE;
     ]
+    FN_SVX_SET_BULLET
+    [
+   		ExecMethod = FuTemporary ;
+    ]
+    FN_SVX_SET_NUMBER
+    [
+    	ExecMethod = FuTemporary ;
+    ]
     SID_ATTR_CHAR // ole : no, status : ?
     [
         ExecMethod = FuPermanent ;
@@ -1549,6 +1557,16 @@ interface DrawView
         ExecMethod = ExecRuler ;
         StateMethod = GetRulerState ;
     ]
+    SID_ATTR_PARA_LINESPACE
+    [
+        ExecMethod = ExecRuler ;
+        StateMethod = GetAttrState ;
+    ]
+    SID_ATTR_PARA_ULSPACE
+    [
+        ExecMethod = ExecRuler ;
+        StateMethod = GetAttrState ;
+    ]
     SID_ATTR_POSITION // ole : no, status : ?
     [
         ExecMethod = ExecStatusBar ;

Modified: openoffice/branches/sidebar/main/sd/sdi/drtxtob.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/sdi/drtxtob.sdi?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/sdi/drtxtob.sdi (original)
+++ openoffice/branches/sidebar/main/sd/sdi/drtxtob.sdi Mon Apr  1 14:43:34 2013
@@ -178,6 +178,20 @@ shell TextObjectBar
 		StateMethod = GetAttrState;
 	]
 
+	SID_ATTR_PARA_LRSPACE
+	[
+		ExecMethod = Execute ;
+		StateMethod = GetAttrState;
+	]
+	SID_ATTR_PARA_RIGHT
+	[
+	    ExecMethod = Execute ;
+	]
+	SID_ATTR_PARA_LEFT
+	[
+	    ExecMethod = Execute ;
+	]
+
 	SID_OUTLINE_LEFT // ole : no, status : ?
 	[
 		ExecMethod = Execute ;

Modified: openoffice/branches/sidebar/main/sd/sdi/outlnvsh.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/sdi/outlnvsh.sdi?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/sdi/outlnvsh.sdi (original)
+++ openoffice/branches/sidebar/main/sd/sdi/outlnvsh.sdi Mon Apr  1 14:43:34 2013
@@ -174,7 +174,14 @@ interface OutlineView
         ExecMethod = FuTemporaryModify ;
         StateMethod = GetMenuState ;
     ]
-
+    FN_SVX_SET_BULLET
+    [
+   		ExecMethod = FuTemporaryModify ;
+    ]
+    FN_SVX_SET_NUMBER
+    [
+    	ExecMethod = FuTemporaryModify ;
+    ]
 	SID_OUTLINE_BULLET // ole : no, status : ?
 	[
 		ExecMethod = FuTemporaryModify ;

Modified: openoffice/branches/sidebar/main/sd/source/core/typemap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/core/typemap.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/core/typemap.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/core/typemap.cxx Mon Apr  1 14:43:34 2013
@@ -38,6 +38,8 @@
 #include <editeng/fontitem.hxx>
 #include <svl/poolitem.hxx>
 #include <editeng/tstpitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/ulspitem.hxx>
 #include <editeng/lrspitem.hxx>
 #include <editeng/protitem.hxx>
 #include <svx/chrtitem.hxx>

Modified: openoffice/branches/sidebar/main/sd/source/ui/func/fuolbull.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/func/fuolbull.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/func/fuolbull.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/func/fuolbull.cxx Mon Apr  1 14:43:34 2013
@@ -32,6 +32,9 @@
 #include <editeng/eeitem.hxx>
 #include <sfx2/request.hxx>
 #include <svl/intitem.hxx>
+#include <editeng/numitem.hxx>
+#include "sdresid.hxx"
+#include "glob.hrc"
 
 #include <editeng/editdata.hxx>
 #include <svx/svxids.hrc>
@@ -43,7 +46,10 @@
 #endif
 #include "drawdoc.hxx"
 #include "sdabstdlg.hxx"
-
+#include <svx/nbdtmg.hxx>
+#include <svx/nbdtmgfact.hxx>
+#include <svx/svdoutl.hxx>
+using namespace svx::sidebar;
 namespace sd {
 
 TYPEINIT1( FuOutlineBullet, FuPoor );
@@ -70,6 +76,16 @@ FunctionReference FuOutlineBullet::Creat
 
 void FuOutlineBullet::DoExecute( SfxRequest& rReq )
 {
+	sal_uInt16 nSId = rReq.GetSlot();
+	if (nSId == FN_SVX_SET_BULLET){
+		SetCurrentBullet(rReq);
+		return;
+	}
+	else if (nSId == FN_SVX_SET_NUMBER){
+		SetCurrentNumbering(rReq);
+		return;
+	}
+	
 	const SfxItemSet* pArgs = rReq.GetArgs();
 
 	if( !pArgs )
@@ -137,6 +153,390 @@ void FuOutlineBullet::DoExecute( SfxRequ
 */
 }
 
+void FuOutlineBullet::SetCurrentNumbering(SfxRequest& rReq)
+{
+	if (!mpDoc || !mpView)
+		return;	
+
+	SfxItemSet aEditAttr( mpDoc->GetPool() );
+	mpView->GetAttributes( aEditAttr );		
+
+	SfxItemSet aNewAttr( mpViewShell->GetPool(),
+							 EE_ITEMS_START, EE_ITEMS_END );
+	aNewAttr.Put( aEditAttr, sal_False );
+
+	SfxItemSet aSetAttr( mpViewShell->GetPool(),
+							 EE_ITEMS_START, EE_ITEMS_END );
+
+	//Init bullet level in "Customize" tab page in bullet dialog in master page view
+	if( mpView && mpViewShell && mpViewShell->ISA(DrawViewShell) 
+		&& ((DrawViewShell *)mpViewShell)->GetEditMode() == EM_MASTERPAGE )
+	{
+		SdrObject* pObj = mpView->GetTextEditObject();
+		if( pObj && pObj->GetObjIdentifier() == OBJ_OUTLINETEXT )
+		{
+			sal_uInt16 nLevel = mpView->GetSelectionLevel();
+			if( nLevel != 0xFFFF )
+			{
+
+				SfxItemSet aStoreSet( aNewAttr );
+				aNewAttr.ClearItem();
+				//extend range
+				aNewAttr.MergeRange( SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL );
+				aNewAttr.Put( aStoreSet );
+				//put current level user selected
+				aNewAttr.Put( SfxUInt16Item( SID_PARAM_CUR_NUM_LEVEL, nLevel ) );
+			}
+		}
+	}
+	//End of add
+
+	sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF;	
+	SvxNumRule* pNumRule = NULL;
+	const SfxPoolItem* pTmpItem=NULL;
+	sal_uInt32 nNumItemId = SID_ATTR_NUMBERING_RULE;
+
+	if(SFX_ITEM_SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pTmpItem))
+		nActNumLvl = ((const SfxUInt16Item*)pTmpItem)->GetValue();
+	
+	pTmpItem=GetNumBulletItem(aNewAttr, nNumItemId);
+
+	if (pTmpItem)
+		pNumRule = new SvxNumRule(*((SvxNumBulletItem*)pTmpItem)->GetNumRule());		
+		
+	SFX_REQUEST_ARG( rReq, pItem, SfxUInt16Item, FN_SVX_SET_NUMBER , sal_False );
+	if (pItem && pNumRule)
+	{
+		sal_uInt16 nIdx = pItem->GetValue();
+		// If the nIdx is (sal_uInt16)0xFFFF, means set bullet status to on/off
+		// And the bullet default status is 1.
+		bool bBulletSwitch = false;
+        sal_Bool isRemoveNum =false;
+		if( nIdx == (sal_uInt16)0xFFFF )
+		{
+			nIdx = 1;
+			bBulletSwitch = true;
+		}
+		if (nIdx == DEFAULT_NONE) 
+		{
+			bBulletSwitch = false;
+			isRemoveNum = true;
+		}
+		nIdx--;
+		
+		NBOTypeMgrBase* pNumbering = NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING);
+		if ( pNumbering )
+		{
+			//Sym3_2508, set unit attribute to NB Manager
+			pNumbering->SetItems(&aNewAttr);
+			SvxNumRule aTmpRule( *pNumRule );
+			pNumbering->ApplyNumRule(aTmpRule,nIdx,nActNumLvl);
+			sal_uInt16 nMask = 1;
+			for(sal_uInt16 i = 0; i < pNumRule->GetLevelCount(); i++)
+			{
+				if(nActNumLvl & nMask)
+				{
+					SvxNumberFormat aFmt(aTmpRule.GetLevel(i));
+					pNumRule->SetLevel(i, aFmt);
+				}
+				nMask <<= 1 ;
+			}
+			aSetAttr.Put(SvxNumBulletItem( *pNumRule ), nNumItemId); 
+			OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
+
+	       	 std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
+
+	        	if (mpView->ISA(OutlineView))
+	        	{
+			        pOLV = static_cast<OutlineView*>(mpView)
+	                    ->GetViewByWindow(mpViewShell->GetActiveWindow());
+
+			        aGuard.reset( new OutlineViewModelChangeGuard( static_cast<OutlineView&>(*mpView) ) );
+	        	}
+
+            		SdrOutliner* pOwner = mpView->GetTextEditOutliner();
+			bool bMasterView = false;
+
+			DrawViewShell* pDrawViewShell = static_cast< DrawViewShell* >(mpViewShell);
+			
+			if ( pOwner && pDrawViewShell && pDrawViewShell->GetEditMode() == EM_MASTERPAGE )					
+				bMasterView = !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
+
+			if( bMasterView )
+			{
+				pOwner->UndoActionStart( OLUNDO_ATTR );
+				pOLV->ToggleBullets( bBulletSwitch, sal_False, bMasterView, pNumRule,isRemoveNum);
+				mpView->SetAttributes(aSetAttr); //Modify for Sym2_3151
+				pOwner->UndoActionEnd( OLUNDO_ATTR );
+			}
+			else if( pOLV )                
+				pOLV->ToggleBullets( bBulletSwitch, sal_False, bMasterView, pNumRule ,isRemoveNum);						
+			else
+			{
+				sal_Bool bInMasterView = pDrawViewShell && pDrawViewShell->GetEditMode() == EM_MASTERPAGE;
+				SdrModel* pSdrModel = mpView->GetModel();
+				sal_Bool bModelUndoEnabled = pSdrModel ? pSdrModel->IsUndoEnabled() : sal_False;
+				if (bInMasterView && bModelUndoEnabled)
+				{
+					pSdrModel->BegUndo();
+				}
+				mpView->ToggleMarkedObjectsBullets(bBulletSwitch, sal_False, bInMasterView, pNumRule,isRemoveNum);
+				if (bInMasterView)
+				{
+					mpView->SetAttributes(aSetAttr);
+				}
+				if (bInMasterView && bModelUndoEnabled)
+				{
+					pSdrModel->EndUndo();
+				}
+			}
+		}
+		//End
+	}
+	delete pNumRule;
+	rReq.Done();
+}
+
+void FuOutlineBullet::SetCurrentBullet(SfxRequest& rReq)
+{
+	if (!mpDoc || !mpView)
+		return;	
+
+	SfxItemSet aEditAttr( mpDoc->GetPool() );
+	mpView->GetAttributes( aEditAttr );		
+
+	SfxItemSet aNewAttr( mpViewShell->GetPool(),
+							 EE_ITEMS_START, EE_ITEMS_END );
+	aNewAttr.Put( aEditAttr, sal_False );
+
+	//Add for Sym2_3151, should add new attributes in an empty item set, then use this item set as parameter in SetAttributes()
+	SfxItemSet aSetAttr( mpViewShell->GetPool(),
+							 EE_ITEMS_START, EE_ITEMS_END );
+
+	//Init bullet level in "Customize" tab page in bullet dialog in master page view
+	if( mpView && mpViewShell && mpViewShell->ISA(DrawViewShell) 
+		&& ((DrawViewShell *)mpViewShell)->GetEditMode() == EM_MASTERPAGE )
+	{
+		SdrObject* pObj = mpView->GetTextEditObject();
+		if( pObj && pObj->GetObjIdentifier() == OBJ_OUTLINETEXT )
+		{
+			sal_uInt16 nLevel = mpView->GetSelectionLevel();
+			if( nLevel != 0xFFFF )
+			{
+				//aNewAttr.MergeRange( SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL );
+				//aNewAttr.Put( SfxUInt16Item( SID_PARAM_CUR_NUM_LEVEL, nLevel ) );
+				//save the itemset value
+				SfxItemSet aStoreSet( aNewAttr );
+				aNewAttr.ClearItem();
+				//extend range
+				aNewAttr.MergeRange( SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL );
+				aNewAttr.Put( aStoreSet );
+				//put current level user selected
+				aNewAttr.Put( SfxUInt16Item( SID_PARAM_CUR_NUM_LEVEL, nLevel ) );
+			}
+		}
+	}
+	//End of add
+
+	sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF;	
+	SvxNumRule* pNumRule = NULL;	
+	const SfxPoolItem* pTmpItem=NULL;
+	sal_uInt32 nNumItemId = SID_ATTR_NUMBERING_RULE;
+
+	if(SFX_ITEM_SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, sal_False, &pTmpItem))
+		nActNumLvl = ((const SfxUInt16Item*)pTmpItem)->GetValue();
+	
+	pTmpItem=GetNumBulletItem(aNewAttr, nNumItemId);
+
+	if (pTmpItem)
+		pNumRule = new SvxNumRule(*((SvxNumBulletItem*)pTmpItem)->GetNumRule());
+		
+	SFX_REQUEST_ARG( rReq, pItem, SfxUInt16Item, FN_SVX_SET_BULLET , sal_False );
+	if (pItem && pNumRule)
+	{
+		sal_uInt16 nIdx = pItem->GetValue();
+		// If the nIdx is (sal_uInt16)0xFFFF, means set bullet status to on/off
+		// And the bullet default status is 2.
+		bool bBulletSwitch = false;
+        sal_Bool isRemoveNum =false;
+		if( nIdx == (sal_uInt16)0xFFFF )
+		{
+			nIdx = 1;
+			bBulletSwitch = true;
+		}
+		if (nIdx == DEFAULT_NONE) 
+		{
+			bBulletSwitch = false;
+			isRemoveNum = true;
+		}
+
+		nIdx--;
+		//Modified for Numbering&Bullets Dialog UX Enh(Story 992) by chengjh,2011.8.7
+		
+		NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
+		if ( pBullets )
+		{
+			//Sym3_2508, set unit attribute to NB Manager
+			pBullets->SetItems(&aNewAttr);
+			SvxNumRule aTmpRule( *pNumRule );
+			//Sym3_3423 Always apply the "." if wants a default numbering rule
+			if (bBulletSwitch==true && nIdx==0) //want to reset bullet
+			{
+				pBullets->ApplyNumRule(aTmpRule,nIdx,nActNumLvl,true);
+			}
+			else {
+				pBullets->ApplyNumRule(aTmpRule,nIdx,nActNumLvl);
+			}
+			sal_uInt16 nMask = 1;
+			for(sal_uInt16 i = 0; i < pNumRule->GetLevelCount(); i++)
+			{
+				if(nActNumLvl & nMask)
+				{
+					SvxNumberFormat aFmt(aTmpRule.GetLevel(i));					
+					pNumRule->SetLevel(i, aFmt);
+				}
+				nMask <<= 1;
+			}
+			aSetAttr.Put(SvxNumBulletItem( *pNumRule ), nNumItemId);
+
+			OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
+
+	        	std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
+
+		       if (mpView->ISA(OutlineView))
+		       {
+			        pOLV = static_cast<OutlineView*>(mpView)
+	                    ->GetViewByWindow(mpViewShell->GetActiveWindow());
+
+			        aGuard.reset( new OutlineViewModelChangeGuard( static_cast<OutlineView&>(*mpView) ) );
+		       }
+	
+			SdrOutliner* pOwner = mpView->GetTextEditOutliner();
+			bool bMasterView = false;
+
+			DrawViewShell* pDrawViewShell = static_cast< DrawViewShell* >(mpViewShell);
+			
+			if ( pOwner && pDrawViewShell && pDrawViewShell->GetEditMode() == EM_MASTERPAGE )
+				bMasterView = !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
+
+			if( bMasterView )
+			{
+				pOwner->UndoActionStart( OLUNDO_ATTR );			
+				pOLV->ToggleBullets( bBulletSwitch, sal_True, bMasterView, pNumRule, isRemoveNum );
+				mpView->SetAttributes(aSetAttr); //Modify for Sym2_3151	
+				pOwner->UndoActionEnd( OLUNDO_ATTR );
+			}
+			else if( pOLV )	            
+				pOLV->ToggleBullets( bBulletSwitch, sal_True, bMasterView, pNumRule, isRemoveNum );
+			else
+			{	
+				sal_Bool bInMasterView = pDrawViewShell && pDrawViewShell->GetEditMode() == EM_MASTERPAGE;
+				SdrModel* pSdrModel = mpView->GetModel();
+				sal_Bool bModelUndoEnabled = pSdrModel ? pSdrModel->IsUndoEnabled() : sal_False;
+				if (bInMasterView && bModelUndoEnabled)
+				{
+					pSdrModel->BegUndo();
+				}
+				mpView->ToggleMarkedObjectsBullets(bBulletSwitch, sal_True, bInMasterView, pNumRule, isRemoveNum );
+				if (bInMasterView)
+				{
+					mpView->SetAttributes(aSetAttr);
+				}
+				if (bInMasterView && bModelUndoEnabled)
+				{
+					pSdrModel->EndUndo();
+				}
+			}
+		}
+		//End
+	}
+	delete pNumRule;
+	rReq.Done();
+}
+
+const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt32& nNumItemId)
+{
+	//SvxNumBulletItem* pRetItem = NULL;
+	const SfxPoolItem* pTmpItem = NULL;
+	
+	if(aNewAttr.GetItemState(nNumItemId, sal_False, &pTmpItem) == SFX_ITEM_SET)
+	{
+		return pTmpItem;
+	}
+	else
+	{
+		nNumItemId = aNewAttr.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+		SfxItemState eState = aNewAttr.GetItemState(nNumItemId, sal_False, &pTmpItem);
+		if (eState == SFX_ITEM_SET)
+			return pTmpItem;
+		else
+		{
+			sal_Bool bOutliner = sal_False;
+			sal_Bool bTitle = sal_False;
+
+			if( mpView )
+     		{
+				const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
+				const sal_uInt32 nCount = rMarkList.GetMarkCount();
+            
+				for(sal_uInt32 nNum = 0; nNum < nCount; nNum++)
+				{
+					SdrObject* pObj = rMarkList.GetMark(nNum)->GetMarkedSdrObj();
+					if( pObj->GetObjInventor() == SdrInventor )
+					{
+						switch(pObj->GetObjIdentifier())
+						{
+						case OBJ_TITLETEXT:
+							bTitle = sal_True;
+							break;
+						case OBJ_OUTLINETEXT:
+							bOutliner = sal_True;
+							break;
+						}
+					}
+				}
+			}
 
+			const SvxNumBulletItem *pItem = NULL;
+			if(bOutliner)
+			{				
+				SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool();
+				String aStyleName((SdResId((sal_uInt16)STR_LAYOUT_OUTLINE)));
+				aStyleName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " 1" ) );
+				SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO);
+				if( pFirstStyleSheet )
+					pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, sal_False, (const SfxPoolItem**)&pItem);
+			}
+
+			if( pItem == NULL )
+				pItem = (SvxNumBulletItem*) aNewAttr.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
+
+			//DBG_ASSERT( pItem, "Kein EE_PARA_NUMBULLET im Pool! [CL]" );
+
+			aNewAttr.Put(*pItem, EE_PARA_NUMBULLET);
+		
+			if(bTitle && aNewAttr.GetItemState(EE_PARA_NUMBULLET,sal_True) == SFX_ITEM_ON )
+			{
+				SvxNumBulletItem* pItem = (SvxNumBulletItem*)aNewAttr.GetItem(EE_PARA_NUMBULLET,sal_True);
+				SvxNumRule* pRule = pItem->GetNumRule();
+				if(pRule)
+				{
+					SvxNumRule aNewRule( *pRule );
+					aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, sal_True );
+
+					SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
+					aNewAttr.Put(aNewItem);
+				}
+			}
+
+			SfxItemState eState = aNewAttr.GetItemState(nNumItemId, sal_False, &pTmpItem);
+			if (eState == SFX_ITEM_SET)
+				return pTmpItem;
+
+		}
+		//DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!")
+	}
+	return pTmpItem;
+}
 
 } // end of namespace sd

Modified: openoffice/branches/sidebar/main/sd/source/ui/func/fuparagr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/func/fuparagr.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/func/fuparagr.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/func/fuparagr.cxx Mon Apr  1 14:43:34 2013
@@ -154,6 +154,8 @@ void FuParagraph::DoExecute( SfxRequest&
 	// invalidieren der Slots
 	static sal_uInt16 SidArray[] = {
         SID_ATTR_TABSTOP,
+	SID_ATTR_PARA_LINESPACE,
+	SID_ATTR_PARA_ULSPACE,
         SID_ATTR_PARA_ADJUST_LEFT,
         SID_ATTR_PARA_ADJUST_RIGHT,
         SID_ATTR_PARA_ADJUST_CENTER,

Modified: openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/func/futext.cxx Mon Apr  1 14:43:34 2013
@@ -103,6 +103,7 @@ static sal_uInt16 SidArray[] = {
 	SID_ATTR_PARA_LINESPACE_10,       //   10034
 	SID_ATTR_PARA_LINESPACE_15,       //   10035
 	SID_ATTR_PARA_LINESPACE_20,       //   10036
+	SID_ATTR_PARA_ULSPACE,  	   //   10042
 	SID_ATTR_PARA_LRSPACE,            //   10043
     SID_ATTR_TRANSFORM_POS_X, //  10088
     SID_ATTR_TRANSFORM_POS_Y, //  10089

Modified: openoffice/branches/sidebar/main/sd/source/ui/inc/View.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/inc/View.hxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/inc/View.hxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/inc/View.hxx Mon Apr  1 14:43:34 2013
@@ -36,6 +36,7 @@
 #include "fupoor.hxx"
 
 #include "smarttag.hxx"
+#include <editeng/numitem.hxx>
 
 class SdDrawDocument;
 class SdrOle2Obj;
@@ -190,6 +191,8 @@ public:
 	virtual void CheckPossibilities();
 	virtual sal_Bool MarkPoints(const ::Rectangle* pRect, sal_Bool bUnmark);
 	using SdrMarkView::MarkPoints;
+	sal_Bool ShouldToggleOn(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet);
+	void ToggleMarkedObjectsBullets(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet, sal_Bool bMasterView, SvxNumRule* pNumRule = NULL, sal_Bool bForceBulletOnOff = false);
 
 	void SetPossibilitiesDirty() { bPossibilitiesDirty = true; }
 	void SetMoveAllowed( bool bSet ) { bMoveAllowed = bSet; }

Modified: openoffice/branches/sidebar/main/sd/source/ui/inc/fuolbull.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/inc/fuolbull.hxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/inc/fuolbull.hxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/inc/fuolbull.hxx Mon Apr  1 14:43:34 2013
@@ -28,6 +28,8 @@
 
 class SdDrawDocument;
 class SfxRequest;
+class SfxItemSet;
+class SfxPoolItem;
 
 namespace sd {
 
@@ -49,6 +51,8 @@ public:
 
 	static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
 	virtual void DoExecute( SfxRequest& rReq );
+	void SetCurrentBullet(SfxRequest& rReq);
+	void SetCurrentNumbering(SfxRequest& rReq);
 
 private:
 	FuOutlineBullet (
@@ -57,8 +61,11 @@ private:
         ::sd::View* pView,
         SdDrawDocument* pDoc, 
         SfxRequest& rReq);
+
+	const SfxPoolItem* GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt32& nNumItemId);
 };
 
+
 } // end of namespace sd
 
 #endif

Modified: openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob.cxx Mon Apr  1 14:43:34 2013
@@ -183,6 +183,8 @@ void TextObjectBar::GetAttrState( SfxIte
             case SID_ATTR_CHAR_FONTHEIGHT:
             case SID_ATTR_CHAR_WEIGHT:
             case SID_ATTR_CHAR_POSTURE:
+		case SID_ATTR_CHAR_SHADOWED:
+            case SID_ATTR_CHAR_STRIKEOUT:
             {
                 SvxScriptSetItem aSetItem( nSlotId, GetPool() );
                 aSetItem.GetItemSet().Put( aAttrSet, sal_False );
@@ -483,6 +485,13 @@ void TextObjectBar::GetAttrState( SfxIte
 			break;
 		}
 
+		Invalidate(SID_ATTR_PARA_ADJUST_LEFT);
+		Invalidate(SID_ATTR_PARA_ADJUST_CENTER);
+		Invalidate(SID_ATTR_PARA_ADJUST_RIGHT);
+		Invalidate(SID_ATTR_PARA_ADJUST_BLOCK);
+		Invalidate(SID_ATTR_PARA_LINESPACE);
+		Invalidate(SID_ATTR_PARA_ULSPACE); 
+
         // paragraph text direction
         if( bDisableParagraphTextDirection )
         {
@@ -547,6 +556,17 @@ void TextObjectBar::GetAttrState( SfxIte
 			}
 		}
 */
+		SvxLRSpaceItem aLRSpace = ( (const SvxLRSpaceItem&) aAttrSet.Get( EE_PARA_LRSPACE ) );
+		aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE);
+		rSet.Put(aLRSpace);
+		Invalidate(SID_ATTR_PARA_LRSPACE);
+		//Added by xuxu 
+		SfxItemState eState = aAttrSet.GetItemState( EE_PARA_LRSPACE );
+		if ( eState == SFX_ITEM_DONTCARE )
+		{
+			rSet.InvalidateItem(EE_PARA_LRSPACE);
+			rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
+		}
 		sal_uInt16 nLineSpace = (sal_uInt16) ( (const SvxLineSpacingItem&) aAttrSet.
                             Get( EE_PARA_SBL ) ).GetPropLineSpace();
 		switch( nLineSpace )

Modified: openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob1.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob1.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/drtxtob1.cxx Mon Apr  1 14:43:34 2013
@@ -241,6 +241,7 @@ void TextObjectBar::Execute( SfxRequest 
 		break;
 
 		case SID_OUTLINE_LEFT:
+		case SID_ATTR_PARA_LEFT:
 		{
 			if (pOLV)
 			{
@@ -256,6 +257,7 @@ void TextObjectBar::Execute( SfxRequest 
 		break;
 
 		case SID_OUTLINE_RIGHT:
+		case SID_ATTR_PARA_RIGHT:
 		{
 			if (pOLV)
 			{
@@ -270,6 +272,22 @@ void TextObjectBar::Execute( SfxRequest 
 		}
 		break;
 
+		case SID_ATTR_PARA_LRSPACE:
+		{
+			sal_uInt16 nSlot = SID_ATTR_PARA_LRSPACE;
+			SvxLRSpaceItem aLRSpace = (const SvxLRSpaceItem&)pArgs->Get(
+				GetPool().GetWhich(nSlot));
+
+			SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+			aLRSpace.SetWhich( EE_PARA_LRSPACE );
+
+			aEditAttr.Put( aLRSpace );
+			mpView->SetAttributes( aEditAttr );
+
+			Invalidate(SID_ATTR_PARA_LRSPACE);
+		}
+		break;
+
 		case SID_OUTLINE_UP:
 		{
 			if (pOLV)
@@ -585,6 +603,71 @@ void TextObjectBar::Execute( SfxRequest 
 				rReq.Done( aNewAttr );
 				pArgs = rReq.GetArgs();
 			}
+			else if (nSlot == SID_ATTR_PARA_ADJUST_LEFT ||
+				nSlot == SID_ATTR_PARA_ADJUST_CENTER ||
+				nSlot == SID_ATTR_PARA_ADJUST_RIGHT ||
+				nSlot == SID_ATTR_PARA_ADJUST_BLOCK)
+			{
+				switch( nSlot )
+				{
+				case SID_ATTR_PARA_ADJUST_LEFT:
+					{
+						aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_LEFT, EE_PARA_JUST ) );
+					}
+					break;
+				case SID_ATTR_PARA_ADJUST_CENTER:
+					{
+						aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
+					}
+					break;
+				case SID_ATTR_PARA_ADJUST_RIGHT:
+					{
+						aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_RIGHT, EE_PARA_JUST ) );
+					}
+					break;
+				case SID_ATTR_PARA_ADJUST_BLOCK:
+					{
+						aNewAttr.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, EE_PARA_JUST ) );
+					}
+					break;
+				}
+				rReq.Done( aNewAttr );
+				pArgs = rReq.GetArgs();
+			}
+			else if(nSlot == SID_ATTR_CHAR_KERNING)
+			{
+				aNewAttr.Put(pArgs->Get(pArgs->GetPool()->GetWhich(nSlot)));
+				rReq.Done( aNewAttr );
+				pArgs = rReq.GetArgs();
+			}
+			else if(nSlot ==  SID_SET_SUPER_SCRIPT )
+			{
+				SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT);
+				SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+								aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+
+				if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
+					aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
+				else
+					aItem.SetEscapement( SVX_ESCAPEMENT_SUPERSCRIPT );
+				aNewAttr.Put( aItem );
+				rReq.Done( aNewAttr );
+				pArgs = rReq.GetArgs();
+			}
+			else if( nSlot ==  SID_SET_SUB_SCRIPT )
+			{
+				SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT);
+				SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+								aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+
+				if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
+					aItem.SetEscapement( SVX_ESCAPEMENT_OFF );
+				else
+					aItem.SetEscapement( SVX_ESCAPEMENT_SUBSCRIPT );
+				aNewAttr.Put( aItem );
+				rReq.Done( aNewAttr );
+				pArgs = rReq.GetArgs();
+			}
 
 			mpView->SetAttributes(*pArgs);
 

Modified: openoffice/branches/sidebar/main/sd/source/ui/view/drviews3.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/drviews3.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/drviews3.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/drviews3.cxx Mon Apr  1 14:43:34 2013
@@ -96,7 +96,8 @@
 #include <com/sun/star/drawing/framework/XConfigurationController.hpp>
 #include <com/sun/star/drawing/framework/XConfiguration.hpp>
 #include <com/sun/star/frame/XFrame.hpp>
-
+#include <editeng/lspcitem.hxx>
+#include <editeng/ulspitem.hxx>
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::drawing::framework;
 using ::com::sun::star::frame::XFrame;
@@ -677,6 +678,37 @@ void  DrawViewShell::ExecRuler(SfxReques
 			break;
 		}
 
+		case SID_ATTR_PARA_LINESPACE:
+		{
+			sal_uInt16 nSlot = SID_ATTR_PARA_LINESPACE;
+			SvxLineSpacingItem aParaLineSP = (const SvxLineSpacingItem&)pArgs->Get(
+				GetPool().GetWhich(nSlot));
+
+			SfxItemSet aEditAttr( GetPool(), EE_PARA_SBL, EE_PARA_SBL );
+			aParaLineSP.SetWhich( EE_PARA_SBL );
+
+			aEditAttr.Put( aParaLineSP );
+			mpDrawView->SetAttributes( aEditAttr );
+
+			Invalidate(SID_ATTR_PARA_LINESPACE);
+		}
+		break;
+			//xuxu for UL
+		case SID_ATTR_PARA_ULSPACE:
+		{
+			sal_uInt16 nSlot = SID_ATTR_PARA_ULSPACE;
+			SvxULSpaceItem aULSP = (const SvxULSpaceItem&)pArgs->Get(
+				GetPool().GetWhich(nSlot));
+			SfxItemSet aEditAttr( GetPool(), EE_PARA_ULSPACE, EE_PARA_ULSPACE );
+			aULSP.SetWhich( EE_PARA_ULSPACE );
+
+			aEditAttr.Put( aULSP );
+			mpDrawView->SetAttributes( aEditAttr );
+
+			Invalidate(SID_ATTR_PARA_ULSPACE);
+		}
+		break;
+
 		case SID_ATTR_PARA_LRSPACE:
 		{
 			if( mpDrawView->IsTextEdit() )
@@ -699,6 +731,28 @@ void  DrawViewShell::ExecRuler(SfxReques
 			}
 			break;
 		}
+		case SID_ATTR_LRSPACE:
+		{
+			if( mpDrawView->IsTextEdit() )
+			{
+				sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
+				const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&)
+							pArgs->Get( nId );
+
+		                SfxItemSet aEditAttr( GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
+
+		                nId = EE_PARA_LRSPACE;
+				SvxLRSpaceItem aLRSpaceItem( rItem.GetLeft(),
+						rItem.GetRight(), rItem.GetTxtLeft(),
+						rItem.GetTxtFirstLineOfst(), nId );
+				aEditAttr.Put( aLRSpaceItem );
+				mpDrawView->SetAttributes( aEditAttr );
+
+				// #92557# Invalidate is missing here
+				Invalidate(SID_ATTR_PARA_LRSPACE);
+			}
+			break;
+		}
 	}
 	if ( pUndoGroup )
 		// Undo Gruppe dem Undo Manager uebergeben

Modified: openoffice/branches/sidebar/main/sd/source/ui/view/drviews8.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/drviews8.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/drviews8.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/drviews8.cxx Mon Apr  1 14:43:34 2013
@@ -134,6 +134,8 @@ void DrawViewShell::FuTemp01(SfxRequest&
 		break;
 
 		case SID_OUTLINE_BULLET:
+		case FN_SVX_SET_BULLET:
+		case FN_SVX_SET_NUMBER:
 		{
 			SetCurrentFunction( FuOutlineBullet::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) );
 			Cancel();

Modified: openoffice/branches/sidebar/main/sd/source/ui/view/drviewsf.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/drviewsf.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/drviewsf.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/drviewsf.cxx Mon Apr  1 14:43:34 2013
@@ -73,6 +73,10 @@
 #include "cfgids.hxx"
 #include "anminfo.hxx"
 
+#include <editeng/lspcitem.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/escpitem.hxx>
 using ::rtl::OUString;
 using namespace ::com::sun::star;
 
@@ -302,6 +306,38 @@ void DrawViewShell::GetAttrState( SfxIte
 			: nWhich;
 		switch ( nSlotId )
 		{
+			case SID_ATTR_PARA_LRSPACE:
+			{
+				SfxItemSet aAttrs( GetDoc()->GetPool() );
+				mpDrawView->GetAttributes( aAttrs );
+				SvxLRSpaceItem aLRSpace = ( (const SvxLRSpaceItem&) aAttrs.Get( EE_PARA_LRSPACE ) );
+				aLRSpace.SetWhich(SID_ATTR_PARA_LRSPACE);
+				rSet.Put(aLRSpace);
+				bAttr = sal_True;
+				Invalidate(SID_ATTR_PARA_LRSPACE);
+			}
+			break;
+			case SID_ATTR_PARA_LINESPACE:
+			{
+				SfxItemSet aAttrs( GetDoc()->GetPool() );
+				mpDrawView->GetAttributes( aAttrs );
+				SvxLineSpacingItem aLineLR = ( (const SvxLineSpacingItem&) aAttrs.Get( EE_PARA_SBL ) );
+				rSet.Put(aLineLR);
+				bAttr = sal_True;
+				Invalidate(SID_ATTR_PARA_LINESPACE);
+			}
+			break;
+			case SID_ATTR_PARA_ULSPACE:
+			{
+				SfxItemSet aAttrs( GetDoc()->GetPool() );
+				mpDrawView->GetAttributes( aAttrs );
+				SvxULSpaceItem aULSP = ( (const SvxULSpaceItem&) aAttrs.Get( EE_PARA_ULSPACE ) );
+				aULSP.SetWhich(SID_ATTR_PARA_ULSPACE);
+				rSet.Put(aULSP);
+				bAttr = sal_True;
+				Invalidate(SID_ATTR_PARA_ULSPACE);
+			}
+			break;
 			case SID_ATTR_FILL_STYLE:
 			case SID_ATTR_FILL_COLOR:
 			case SID_ATTR_FILL_GRADIENT:
@@ -318,6 +354,17 @@ void DrawViewShell::GetAttrState( SfxIte
             case SID_ATTR_LINE_JOINT:
             case SID_ATTR_LINE_CAP:
 			case SID_ATTR_TEXT_FITTOSIZE:
+			case SID_ATTR_CHAR_FONT:
+			case SID_ATTR_CHAR_FONTHEIGHT:
+			case SID_ATTR_CHAR_SHADOWED:
+			case SID_ATTR_CHAR_POSTURE:
+			case SID_ATTR_CHAR_UNDERLINE:
+			case SID_ATTR_CHAR_STRIKEOUT:
+			case SID_ATTR_CHAR_WEIGHT:
+			case SID_ATTR_CHAR_COLOR:
+			case SID_ATTR_CHAR_KERNING:
+			case SID_SET_SUB_SCRIPT:
+			case SID_SET_SUPER_SCRIPT:
 			{
 				bAttr = sal_True;
 			}
@@ -493,25 +540,45 @@ void DrawViewShell::GetAttrState( SfxIte
 				nWhich = aNewIter.NextWhich();
 			}
 		}
+
+		SfxItemState eState = pSet->GetItemState( EE_PARA_LRSPACE );
+		if ( eState == SFX_ITEM_DONTCARE )
+		{
+			rSet.InvalidateItem(EE_PARA_LRSPACE);
+			rSet.InvalidateItem(SID_ATTR_PARA_LRSPACE);
+		}
+		eState = pSet->GetItemState( EE_PARA_SBL );
+		if ( eState == SFX_ITEM_DONTCARE )
+		{
+			rSet.InvalidateItem(EE_PARA_SBL);
+			rSet.InvalidateItem(SID_ATTR_PARA_LINESPACE);
+		}
+		eState = pSet->GetItemState( EE_PARA_ULSPACE );
+		if ( eState == SFX_ITEM_DONTCARE )
+		{
+			rSet.InvalidateItem(EE_PARA_ULSPACE);
+			rSet.InvalidateItem(SID_ATTR_PARA_ULSPACE);
+		}
+
+		SvxEscapement eEsc = (SvxEscapement) ( (const SvxEscapementItem&)
+						pSet->Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+		if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
+		{
+			rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, sal_True ) );
+		}
+		else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
+		{
+			rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, sal_True ) );
+		}
+
+		eState = pSet->GetItemState( EE_CHAR_KERNING, sal_True );
+		if ( eState == SFX_ITEM_DONTCARE )
+		{
+			rSet.InvalidateItem(EE_CHAR_KERNING);
+			rSet.InvalidateItem(SID_ATTR_CHAR_KERNING);
+		}
 		delete pSet;
 	}
-
-//    const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
-//    sal_uLong nMarkCount = rMarkList.GetMarkCount();
-//    sal_Bool bDisabled = sal_False;
-//
-//    for (sal_uLong i = 0;
-//         i < nMarkCount && !bDisabled && i < 50; i++)
-//    {
-//        SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
-//
-//        if (pObj->GetObjInventor() == E3dInventor)
-//        {
-//            bDisabled = sal_True;
-//            rSet.ClearItem(SDRATTR_SHADOW);
-//            rSet.DisableItem(SDRATTR_SHADOW);
-//        }
-//    }
 }
 
 

Modified: openoffice/branches/sidebar/main/sd/source/ui/view/outlnvs2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/outlnvs2.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/outlnvs2.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/outlnvs2.cxx Mon Apr  1 14:43:34 2013
@@ -330,12 +330,16 @@ void OutlineViewShell::FuTemporary(SfxRe
 
 void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
 {
-	OutlineViewModelChangeGuard aGuard( *pOlView );
-
+	sal_uInt16 nSId = rReq.GetSlot();
+	std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
+	if (nSId != SID_OUTLINE_BULLET && nSId != FN_SVX_SET_BULLET && nSId != FN_SVX_SET_NUMBER)
+	{
+		aGuard.reset( new OutlineViewModelChangeGuard(*pOlView) );
+	}
 	DeactivateCurrentFunction();
 
 	OutlinerView* pOutlinerView = pOlView->GetViewByWindow( GetActiveWindow() );
-	sal_uInt16 nSId = rReq.GetSlot();
+	//sal_uInt16 nSId = rReq.GetSlot();
 
 	switch( nSId )
 	{
@@ -380,6 +384,8 @@ void OutlineViewShell::FuTemporaryModify
 		break;
 
 		case SID_OUTLINE_BULLET:
+		case FN_SVX_SET_BULLET:
+		case FN_SVX_SET_NUMBER:
 		{
 			SetCurrentFunction( FuOutlineBullet::Create( this, GetActiveWindow(), pOlView, GetDoc(), rReq ) );
 			Cancel();

Modified: openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/sdview.cxx Mon Apr  1 14:43:34 2013
@@ -81,6 +81,7 @@
 #include <svx/sdr/contact/viewobjectcontact.hxx>
 #include <svx/sdr/contact/viewcontact.hxx>
 #include <svx/sdr/contact/displayinfo.hxx>
+#include <svx/svdotable.hxx>
 #include "EventMultiplexer.hxx"
 #include "ViewShellBase.hxx"
 #include "ViewShellManager.hxx"
@@ -91,6 +92,7 @@
 #include <drawinglayer/primitive2d/textlayoutdevice.hxx>
 #include <drawinglayer/primitive2d/groupprimitive2d.hxx>
 #include <svx/sdr/contact/objectcontact.hxx>
+#include <svx/sdr/table/tablecontroller.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <drawinglayer/primitive2d/textprimitive2d.hxx>
 #include <svx/unoapi.hxx>
@@ -100,6 +102,7 @@
 
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
+using namespace sdr::table;
 namespace sd {
 
 #ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
@@ -1330,4 +1333,167 @@ void View::OnEndPasteOrDrop( PasteOrDrop
 	}
 }
 
+sal_Bool View::ShouldToggleOn(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet)
+{
+	// If setting bullets/numbering by the dialog, always should toggle on.
+	if (!bBulletOnOffMode)
+		return sal_True;
+	SdrModel* pSdrModel = GetModel();
+	if (!pSdrModel)
+		return sal_False;
+
+	sal_Bool bToggleOn = sal_False;
+	SdrOutliner* pOutliner = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, pSdrModel);
+	sal_uInt32 nMarkCount = GetMarkedObjectCount();
+	for (sal_uInt32 nIndex = 0; nIndex < nMarkCount && !bToggleOn; nIndex++)
+	{
+		SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(GetMarkedObjectByIndex(nIndex));
+		if (!pTextObj || pTextObj->IsTextEditActive())
+			continue;
+		if (pTextObj->ISA(SdrTableObj))
+		{
+			SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >(pTextObj);
+			if (!pTableObj)
+				continue;
+			CellPos aStart, aEnd;
+			SvxTableController* pTableController = dynamic_cast< SvxTableController* >(getSelectionController().get());
+			if (pTableController)
+			{
+				pTableController->getSelectedCells(aStart, aEnd);
+			}
+			else
+			{
+				aStart = pTableObj->getFirstCell();
+				aEnd = pTableObj->getLastCell();
+			}
+			sal_Int32 nColCount = pTableObj->getColumnCount();
+			for (sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow && !bToggleOn; nRow++)
+			{
+				for (sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol && !bToggleOn; nCol++)
+				{
+					sal_Int32 nIndex = nRow * nColCount + nCol;
+					SdrText* pText = pTableObj->getText(nIndex);
+					if (!pText || !pText->GetOutlinerParaObject())
+						continue;
+					pOutliner->SetText(*(pText->GetOutlinerParaObject()));
+					sal_Int16 nStatus = pOutliner->GetBulletsNumberingStatus();
+					bToggleOn = ((bNormalBullet && nStatus != 0) || (!bNormalBullet && nStatus != 1)) ? sal_True : bToggleOn;
+					pOutliner->Clear();
+				}
+			}
+		}
+		else
+		{
+			OutlinerParaObject* pParaObj = pTextObj->GetOutlinerParaObject();
+			if (!pParaObj)
+				continue;
+			pOutliner->SetText(*pParaObj);
+			sal_Int16 nStatus = pOutliner->GetBulletsNumberingStatus();
+			bToggleOn = ((bNormalBullet && nStatus != 0) || (!bNormalBullet && nStatus != 1)) ? sal_True : bToggleOn;
+			pOutliner->Clear();
+		}
+	}
+	delete pOutliner;
+	return bToggleOn;
+}
+
+void View::ToggleMarkedObjectsBullets(sal_Bool bBulletOnOffMode, sal_Bool bNormalBullet, sal_Bool bMasterView, SvxNumRule* pNumRule, sal_Bool bForceBulletOnOff)
+{
+	SdrModel* pSdrModel = GetModel();
+	Window* pWindow = dynamic_cast< Window* >(GetFirstOutputDevice());
+	if (!pSdrModel || !pWindow)
+		return;
+
+	sal_Bool bUndoEnabled = pSdrModel->IsUndoEnabled();
+	sal_Bool bToggleOn = ShouldToggleOn(bBulletOnOffMode, bNormalBullet);
+	if ( bForceBulletOnOff ) {
+		bToggleOn = bBulletOnOffMode;
+	}
+	SdrUndoGroup* pUndoGroup = new SdrUndoGroup(*pSdrModel);
+	SdrOutliner* pOutliner = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, pSdrModel);
+	OutlinerView* pOutlinerView = new OutlinerView(pOutliner, pWindow);
+
+	sal_uInt32 nMarkCount = GetMarkedObjectCount();
+	for (sal_uInt32 nIndex = 0; nIndex < nMarkCount; nIndex++)
+	{
+		SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(GetMarkedObjectByIndex(nIndex));
+		if (!pTextObj || pTextObj->IsTextEditActive())
+			continue;
+		if (pTextObj->ISA(SdrTableObj))
+		{
+			SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >(pTextObj);
+			if (!pTableObj)
+				continue;
+			CellPos aStart, aEnd;
+			SvxTableController* pTableController = dynamic_cast< SvxTableController* >(getSelectionController().get());
+			if (pTableController)
+			{
+				pTableController->getSelectedCells(aStart, aEnd);
+			}
+			else
+			{
+				aStart = pTableObj->getFirstCell();
+				aEnd = pTableObj->getLastCell();
+			}
+			sal_Int32 nColCount = pTableObj->getColumnCount();
+			for (sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++)
+			{
+				for (sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++)
+				{
+					sal_Int32 nIndex = nRow * nColCount + nCol;
+					SdrText* pText = pTableObj->getText(nIndex);
+					if (!pText || !pText->GetOutlinerParaObject())
+						continue;
+
+					pOutliner->SetText(*(pText->GetOutlinerParaObject()));
+					if (bUndoEnabled)
+					{
+						SdrUndoObjSetText* pTxtUndo = dynamic_cast< SdrUndoObjSetText* >(pSdrModel->GetSdrUndoFactory().CreateUndoObjectSetText(*pTextObj, nIndex));
+						pUndoGroup->AddAction(pTxtUndo);
+					}
+					pOutlinerView->ToggleAllParagraphsBullets(bBulletOnOffMode, bNormalBullet, bToggleOn, bMasterView, pNumRule);
+					sal_uInt32 nParaCount = pOutliner->GetParagraphCount();
+					pText->SetOutlinerParaObject(pOutliner->CreateParaObject(0, (sal_uInt16)nParaCount));
+					pOutliner->Clear();
+				}
+			}
+			// Broadcast the object change event.
+			if (!pTextObj->AdjustTextFrameWidthAndHeight())
+			{
+				pTextObj->SetChanged();
+				pTextObj->BroadcastObjectChange();
+			}
+		}
+		else
+		{
+			OutlinerParaObject* pParaObj = pTextObj->GetOutlinerParaObject();
+			if (!pParaObj)
+				continue;
+			pOutliner->SetText(*pParaObj);
+			if (bUndoEnabled)
+			{
+				SdrUndoObjSetText* pTxtUndo = dynamic_cast< SdrUndoObjSetText* >(pSdrModel->GetSdrUndoFactory().CreateUndoObjectSetText(*pTextObj, 0));
+				pUndoGroup->AddAction(pTxtUndo);
+			}
+			pOutlinerView->ToggleAllParagraphsBullets(bBulletOnOffMode, bNormalBullet, bToggleOn, bMasterView, pNumRule);
+			sal_uInt32 nParaCount = pOutliner->GetParagraphCount();
+			pTextObj->SetOutlinerParaObject(pOutliner->CreateParaObject(0, (sal_uInt16)nParaCount));
+			pOutliner->Clear();
+		}
+	}
+
+	if (pUndoGroup->GetActionCount() > 0 && bUndoEnabled)
+	{
+		pSdrModel->BegUndo();
+		pSdrModel->AddUndo(pUndoGroup);
+		pSdrModel->EndUndo();
+	}
+	else
+	{
+		delete pUndoGroup;
+	}
+	delete pOutliner;
+	delete pOutlinerView;
+}
+
 } // end of namespace sd

Modified: openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk (original)
+++ openoffice/branches/sidebar/main/svx/AllLangResTarget_svx.mk Mon Apr  1 14:43:34 2013
@@ -83,6 +83,7 @@ $(eval $(call gb_SrsTarget_add_files,svx
     svx/source/sidebar/line/LinePropertyPanel.src \
     svx/source/sidebar/possize/PosSizePropertyPanel.src \
     svx/source/sidebar/text/TextPropertyPanel.src \
+    svx/source/sidebar/paragraph/ParaPropertyPanel.src \
     svx/source/stbctrls/stbctrls.src \
     svx/source/svdraw/svdstr.src \
     svx/source/table/table.src \

Modified: openoffice/branches/sidebar/main/svx/Library_svx.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/Library_svx.mk?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/Library_svx.mk (original)
+++ openoffice/branches/sidebar/main/svx/Library_svx.mk Mon Apr  1 14:43:34 2013
@@ -171,6 +171,8 @@ $(eval $(call gb_Library_add_exception_o
     svx/source/mnuctrls/SmartTagCtl \
     svx/source/sidebar/ContextChangeEventMultiplexer \
     svx/source/sidebar/EmptyPanel \
+    svx/source/sidebar/nbdtmg \
+    svx/source/sidebar/nbdtmgfact	\
     svx/source/sidebar/PanelFactory \
     svx/source/sidebar/SelectionAnalyzer \
     svx/source/sidebar/SelectionChangeHandler \
@@ -183,6 +185,13 @@ $(eval $(call gb_Library_add_exception_o
     svx/source/sidebar/text/TextUnderlineControl \
     svx/source/sidebar/text/TextUnderlinePopup \
     svx/source/sidebar/text/TextPropertyPanel \
+    svx/source/sidebar/paragraph/ParaNumberingControl \
+    svx/source/sidebar/paragraph/ParaNumberingPopup \
+    svx/source/sidebar/paragraph/ParaBulletsControl \
+    svx/source/sidebar/paragraph/ParaBulletsPopup \
+    svx/source/sidebar/paragraph/ParaLineSpacingControl \
+    svx/source/sidebar/paragraph/ParaLineSpacingPopup \
+    svx/source/sidebar/paragraph/ParaPropertyPanel \
     svx/source/sidebar/area/AreaPropertyPanel \
     svx/source/sidebar/area/AreaTransparencyGradientControl \
     svx/source/sidebar/area/AreaTransparencyGradientPopup \

Modified: openoffice/branches/sidebar/main/svx/Package_inc.mk
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/Package_inc.mk?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/Package_inc.mk (original)
+++ openoffice/branches/sidebar/main/svx/Package_inc.mk Mon Apr  1 14:43:34 2013
@@ -222,6 +222,7 @@ $(eval $(call gb_Package_add_file,svx_in
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/properties/e3dsceneproperties.hxx,svx/sdr/properties/e3dsceneproperties.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/properties/measureproperties.hxx,svx/sdr/properties/measureproperties.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/table/tabledesign.hxx,svx/sdr/table/tabledesign.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/table/tablecontroller.hxx,svx/sdr/table/tablecontroller.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/primitive2d/primitiveFactory2d.hxx,svx/sdr/primitive2d/primitiveFactory2d.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/primitive2d/sdrpathprimitive2d.hxx,svx/sdr/primitive2d/sdrpathprimitive2d.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx,svx/sdr/primitive2d/sdrtextprimitive2d.hxx))
@@ -566,4 +567,5 @@ $(eval $(call gb_Package_add_file,svx_in
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sidebar/SelectionAnalyzer.hxx,svx/sidebar/SelectionAnalyzer.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sidebar/SelectionChangeHandler.hxx,svx/sidebar/SelectionChangeHandler.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sidebar/ValueSetWithTextControl.hxx,svx/sidebar/ValueSetWithTextControl.hxx))
-
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/nbdtmgfact.hxx,svx/nbdtmgfact.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/nbdtmg.hxx,svx/nbdtmg.hxx))

Modified: openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc?rev=1463154&r1=1463153&r2=1463154&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc (original)
+++ openoffice/branches/sidebar/main/svx/inc/svx/dialogs.hrc Mon Apr  1 14:43:34 2013
@@ -396,6 +396,51 @@
 #define RID_SIDEBAR_GRAPHIC_PANEL           (RID_SVX_START + 300)
 #define RID_SIDEBAR_EMPTY_PANEL             (RID_SVX_START + 301)
 
+#define RID_SIDEBAR_PARA_PANEL              (RID_SVX_START + 302)
+#define RID_POPUPPANEL_PARAPAGE_LINESPACING   (RID_SVX_START + 303)
+#define RID_POPUPPANEL_PARAPAGE_BULLETS  (RID_SVX_START + 304)
+#define RID_POPUPPANEL_PARAPAGE_NUMBERING     (RID_SVX_START + 305)
+#define RID_SVXSTR_NUMBULLET_NONE		                    (RID_SVX_START + 306)
+#define RID_SVXSTR_NUMBULLET_CURRENT_LIST_DESCRIPTION       (RID_SVX_START + 307)
+#define RID_SVXSTR_NUMBULLET_CUSTOM_BULLET_DESCRIPTION      (RID_SVX_START + 308)
+#define RID_SVXSTR_NUMBULLET_CUSTOM_NUMBERING_DESCRIPTION   (RID_SVX_START + 309)
+#define RID_SVXSTR_NUMBULLET_CUSTOM_MULTILEVEL_DESCRIPTION  (RID_SVX_START + 310)
+#define RID_SVXSTR_NUMBULLET_CUSTOMIZED_WATERMARK			(RID_SVX_START + 311)
+#define RID_SVXSTR_BULLET_RTL_DESCRIPTION_4 					(RID_SVX_START + 312)
+#define RID_SVXSTR_BULLET_RTL_DESCRIPTION_5 					(RID_SVX_START + 313)
+#define RID_SVXSTR_OUTLINENUM_RTL_DESCRIPTION_7					(RID_SVX_START + 314)
+
+#define RID_SVXSTR_GRAPHICS_DESCRIPTIONS                      (RID_SVX_START + 317)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_0                    (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 0)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_1                    (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 1)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_2                    (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 2)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_3                    (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 3)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_4                    (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 4)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_5                    (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 5)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_6                    (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 6)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_7                    (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 7)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_8                    (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 8)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_9			(RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 9)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_10                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 10)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_11                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 11)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_12                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 12)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_13                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 13)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_14                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 14)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_15                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 15)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_16                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 16)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_17                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 17)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_18                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 18)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_19                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 19)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_20                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 20)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_21                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 21)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_22                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 22)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_23                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 23)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_24                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 24)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_25                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 25)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_26                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 26)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_27                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 27)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_28                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 28)
+#define RID_SVXSTR_GRAPHICS_DESCRIPTION_29                  (RID_SVXSTR_GRAPHICS_DESCRIPTIONS + 29)
 // !!! please update RID_SVX_FIRSTFREE !!! see line 46
 
 // Strings ------------------------------------------------------------------
@@ -977,6 +1022,12 @@
 #define RID_SVXSTR_OUTLINENUM_DESCRIPTION_5                 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 5)//?	
 #define RID_SVXSTR_OUTLINENUM_DESCRIPTION_6                 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 6)//?	
 #define RID_SVXSTR_OUTLINENUM_DESCRIPTION_7                 (RID_SVXSTR_OUTLINENUM_DESCRIPTIONS + 7)//?	
+#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS                      (RID_SVX_START + 1172)
+#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_0                     (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 0)
+#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_1                     (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 1)
+#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_2                     (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 2)
+#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_3                     (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 3)
+#define RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS_4                     (RID_SVXSTR_SIDEBAR_BULLET_DESCRIPTIONS + 4)
 
 #define RID_SVXSTR_FINDBAR_FIND                             (RID_SVX_START + 1190)
 



Mime
View raw message