openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zheng...@apache.org
Subject svn commit: r1463816 - in /openoffice/branches/sidebar/main/sd: sdi/_drvwsh.sdi source/ui/inc/ViewShell.hxx source/ui/view/drviewsf.cxx source/ui/view/viewshel.cxx
Date Wed, 03 Apr 2013 03:53:14 GMT
Author: zhengfan
Date: Wed Apr  3 03:53:14 2013
New Revision: 1463816

URL: http://svn.apache.org/r1463816
Log:
i121794: For some missing modifications in last commiting in paragraph properties panel, for
sidebar panel. by ZhengFan.

Modified:
    openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi
    openoffice/branches/sidebar/main/sd/source/ui/inc/ViewShell.hxx
    openoffice/branches/sidebar/main/sd/source/ui/view/drviewsf.cxx
    openoffice/branches/sidebar/main/sd/source/ui/view/viewshel.cxx

Modified: openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi?rev=1463816&r1=1463815&r2=1463816&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi (original)
+++ openoffice/branches/sidebar/main/sd/sdi/_drvwsh.sdi Wed Apr  3 03:53:14 2013
@@ -733,7 +733,7 @@ interface DrawView
     [
         ExecMethod = FuTemporary;
         StateMethod = GetAttrState;
-        Asynchron , AutoUpdate ;
+        Asynchron  , AutoUpdate ;
     ]
     SID_ATTR_CHAR // ole : no, status : ?
     [

Modified: openoffice/branches/sidebar/main/sd/source/ui/inc/ViewShell.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/inc/ViewShell.hxx?rev=1463816&r1=1463815&r2=1463816&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/inc/ViewShell.hxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/inc/ViewShell.hxx Wed Apr  3 03:53:14 2013
@@ -210,6 +210,8 @@ public:
 	virtual void SetUIUnit(FieldUnit eUnit);
 	virtual void SetDefTabHRuler( sal_uInt16 nDefTab );
 
+	const SfxPoolItem* GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& nNumItemId);
+
     sal_Bool HasRuler (void);
 	void SetRuler(sal_Bool bRuler);
 

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=1463816&r1=1463815&r2=1463816&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/drviewsf.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/drviewsf.cxx Wed Apr  3 03:53:14 2013
@@ -77,6 +77,11 @@
 #include <editeng/ulspitem.hxx>
 #include <editeng/lrspitem.hxx>
 #include <editeng/escpitem.hxx>
+#include <editeng/numitem.hxx>
+#include <svx/nbdtmgfact.hxx>
+#include <svx/nbdtmg.hxx>
+
+using namespace svx::sidebar;
 using ::rtl::OUString;
 using namespace ::com::sun::star;
 
@@ -593,8 +598,8 @@ void DrawViewShell::GetAttrState( SfxIte
 			{
 				sal_Bool bEnable = sal_False;
 				const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
-				const ULONG nMarkCount = rMarkList.GetMarkCount();
-				for (ULONG nIndex = 0; nIndex < nMarkCount; nIndex++)
+				const sal_uInt32 nMarkCount = rMarkList.GetMarkCount();
+				for (sal_uInt32 nIndex = 0; nIndex < nMarkCount; nIndex++)
 				{
 					SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(rMarkList.GetMark(nIndex)->GetMarkedSdrObj());
 					if (pTextObj && pTextObj->GetObjInventor() == SdrInventor)

Modified: openoffice/branches/sidebar/main/sd/source/ui/view/viewshel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sd/source/ui/view/viewshel.cxx?rev=1463816&r1=1463815&r2=1463816&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sd/source/ui/view/viewshel.cxx (original)
+++ openoffice/branches/sidebar/main/sd/source/ui/view/viewshel.cxx Wed Apr  3 03:53:14 2013
@@ -91,6 +91,11 @@
 #include "Window.hxx"
 #include "fupoor.hxx"
 
+#include <editeng/numitem.hxx>
+#include <editeng/eeitem.hxx>
+#include <svl/poolitem.hxx>
+#include <glob.hrc>
+
 #ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
 #define SO2_DECL_SVINPLACEOBJECT_DEFINED
 SO2_DECL_REF(SvInPlaceObject)
@@ -802,7 +807,86 @@ void ViewShell::SetupRulers (void)
 	}
 }
 
+const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
nNumItemId)
+{	
+	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(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);
+
+			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;
 
+		}
+	}
+	return pTmpItem;
+}
 
 
 sal_Bool ViewShell::HasRuler (void)



Mime
View raw message