You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/04/10 11:20:24 UTC
svn commit: r1466396 [5/13] - in /openoffice/trunk: ./
main/chart2/source/controller/dialogs/
main/chart2/source/controller/drawinglayer/
main/chart2/source/controller/inc/ main/chart2/source/controller/main/
main/chart2/source/inc/chartview/ main/char...
Modified: openoffice/trunk/main/sd/source/ui/func/fuolbull.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/func/fuolbull.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/func/fuolbull.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/func/fuolbull.cxx Wed Apr 10 09:20:16 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/trunk/main/sd/source/ui/func/fuoltext.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/func/fuoltext.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/func/fuoltext.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/func/fuoltext.cxx Wed Apr 10 09:20:16 2013
@@ -61,9 +61,12 @@ static sal_uInt16 SidArray[] = {
SID_ATTR_CHAR_FONT,
SID_ATTR_CHAR_POSTURE,
SID_ATTR_CHAR_WEIGHT,
+ SID_ATTR_CHAR_SHADOWED,
+ SID_ATTR_CHAR_STRIKEOUT,
SID_ATTR_CHAR_UNDERLINE,
SID_ATTR_CHAR_FONTHEIGHT,
SID_ATTR_CHAR_COLOR,
+ SID_ATTR_CHAR_KERNING,
SID_OUTLINE_UP,
SID_OUTLINE_DOWN,
SID_OUTLINE_LEFT,
Modified: openoffice/trunk/main/sd/source/ui/func/fuparagr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/func/fuparagr.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/func/fuparagr.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/func/fuparagr.cxx Wed Apr 10 09:20:16 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/trunk/main/sd/source/ui/func/futext.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/func/futext.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/func/futext.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/func/futext.cxx Wed Apr 10 09:20:16 2013
@@ -93,9 +93,12 @@ static sal_uInt16 SidArray[] = {
SID_ATTR_CHAR_FONT, // 10007
SID_ATTR_CHAR_POSTURE, // 10008
SID_ATTR_CHAR_WEIGHT, // 10009
+ SID_ATTR_CHAR_SHADOWED, //10010
+ SID_ATTR_CHAR_STRIKEOUT, //10013
SID_ATTR_CHAR_UNDERLINE, // 10014
SID_ATTR_CHAR_FONTHEIGHT, // 10015
SID_ATTR_CHAR_COLOR, // 10017
+ SID_ATTR_CHAR_KERNING, //10018
SID_ATTR_PARA_ADJUST_LEFT, // 10028
SID_ATTR_PARA_ADJUST_RIGHT, // 10029
SID_ATTR_PARA_ADJUST_CENTER, // 10030
@@ -103,14 +106,26 @@ 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
+ SID_ATTR_TRANSFORM_WIDTH, // 10090
+ SID_ATTR_TRANSFORM_HEIGHT,// 10091
+ SID_ATTR_TRANSFORM_ROT_X, // 10093
+ SID_ATTR_TRANSFORM_ROT_Y, // 10094
+ SID_ATTR_TRANSFORM_ANGLE, // 10095 //Added
SID_OUTLINE_UP, // 10150
SID_OUTLINE_DOWN, // 10151
SID_OUTLINE_LEFT, // 10152
SID_OUTLINE_RIGHT, // 10153
+ SID_ATTR_TRANSFORM_PROTECT_POS,// 10236
+ SID_ATTR_TRANSFORM_PROTECT_SIZE,// 10237 //Added
SID_FORMTEXT_STYLE, // 10257
SID_SET_SUPER_SCRIPT, // 10294
SID_SET_SUB_SCRIPT, // 10295
+ SID_ATTR_TRANSFORM_AUTOWIDTH,// 10310
+ SID_ATTR_TRANSFORM_AUTOHEIGHT,// 10311 //Added
SID_HYPERLINK_GETLINK, // 10361
SID_CHARMAP, // 10503
SID_TEXTDIRECTION_LEFT_TO_RIGHT, // 10907
@@ -1183,7 +1198,8 @@ void FuText::SetInEditMode(const MouseEv
{
// #98198# Move cursor to end of text
ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND);
- pOLV->SetSelection(aNewSelection);
+ if (pOLV != NULL)
+ pOLV->SetSelection(aNewSelection);
}
}
else
Modified: openoffice/trunk/main/sd/source/ui/inc/DrawViewShell.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/DrawViewShell.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/DrawViewShell.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/DrawViewShell.hxx Wed Apr 10 09:20:16 2013
@@ -28,8 +28,10 @@
#include "tools/AsynchronousCall.hxx"
#include <sfx2/viewfac.hxx>
#include <sfx2/viewsh.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include "TabControl.hxx"
#include "pres.hxx"
+#include <svx/sidebar/SelectionChangeHandler.hxx>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/scanner/XScannerManager.hpp>
@@ -164,6 +166,7 @@ public:
void ExecCtrl(SfxRequest& rReq);
void GetCtrlState(SfxItemSet& rSet);
+ void GetDrawAttrState(SfxItemSet& rSet);
void GetMenuState(SfxItemSet& rSet);
void GetTableMenuState(SfxItemSet& rSet);
/** Set the items of the given item set that are related to
@@ -196,6 +199,9 @@ public:
void ExecNavigatorWin(SfxRequest& rReq);
void GetNavigatorWinState(SfxItemSet& rSet);
+ void ExecutePropPanelAttr (SfxRequest& rReq);
+ void GetStatePropPanelAttr(SfxItemSet& rSet);
+
void ExecEffectWin(SfxRequest& rReq);
void Update3DWindow();
@@ -218,6 +224,8 @@ public:
void AttrExec (SfxRequest& rReq);
void AttrState (SfxItemSet& rSet);
+ void ExecChar(SfxRequest& rReq);
+
void ExecuteAnnotation (SfxRequest& rRequest);
void GetAnnotationState (SfxItemSet& rItemSet);
@@ -430,6 +438,10 @@ private:
*/
bool mbIsInSwitchPage;
+ /** Listen for selection changes and broadcast context changes for the sidebar.
+ */
+ ::rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
+
void Construct (DrawDocShell* pDocSh, PageKind ePageKind);
/** Depending on the given request create a new page or duplicate an
@@ -483,6 +495,8 @@ private:
const sal_uInt16 nSnapLineIndex,
const Point& rMouseLocation);
+ ::sfx2::sidebar::EnumContext::Context GetContextForSelection (void) const;
+
using ViewShell::Notify;
::std::auto_ptr< AnnotationManager > mpAnnotationManager;
Modified: openoffice/trunk/main/sd/source/ui/inc/PaneChildWindows.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/PaneChildWindows.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/PaneChildWindows.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/PaneChildWindows.hxx Wed Apr 10 09:20:16 2013
@@ -68,29 +68,7 @@ public:
SFX_DECL_CHILDWINDOW(LeftPaneDrawChildWindow);
};
-
-
-
-//======================================================================================================================
-//= ToolPanelChildWindow
-//======================================================================================================================
-class ToolPanelChildWindow :public PaneChildWindow
- ,public ::sfx2::ITaskPaneToolPanelAccess
-{
-public:
- ToolPanelChildWindow(
- ::Window* i_pParentWindow,
- sal_uInt16 i_nId,
- SfxBindings* i_pBindings,
- SfxChildWinInfo* i_pChildWindowInfo );
-
- SFX_DECL_CHILDWINDOW( ToolPanelChildWindow );
-
- // ::sfx2::ITaskPaneToolPanelAccess
- virtual void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL );
-};
-
-
+
} // end of namespace ::sd
#endif
Modified: openoffice/trunk/main/sd/source/ui/inc/SlideSorterViewShell.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/SlideSorterViewShell.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/SlideSorterViewShell.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/SlideSorterViewShell.hxx Wed Apr 10 09:20:16 2013
@@ -115,6 +115,7 @@ public:
virtual void ArrangeGUIElements (void);
virtual void Activate (sal_Bool IsMDIActivate);
+ virtual void Deactivate (sal_Bool IsMDIActivate);
//===== Drag and Drop =====================================================
Modified: openoffice/trunk/main/sd/source/ui/inc/TextObjectBar.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/TextObjectBar.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/TextObjectBar.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/TextObjectBar.hxx Wed Apr 10 09:20:16 2013
@@ -51,6 +51,7 @@ public:
virtual ~TextObjectBar (void);
void GetAttrState( SfxItemSet& rSet );
+ void GetCharState( SfxItemSet& rSet );
void Execute( SfxRequest &rReq );
virtual void Command( const CommandEvent& rCEvt );
Modified: openoffice/trunk/main/sd/source/ui/inc/View.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/View.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/View.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/View.hxx Wed Apr 10 09:20:16 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/trunk/main/sd/source/ui/inc/ViewShell.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/ViewShell.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/ViewShell.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/ViewShell.hxx Wed Apr 10 09:20:16 2013
@@ -35,9 +35,7 @@
#include "glob.hxx"
#include "pres.hxx"
#include "cfgids.hxx"
-#ifndef _SD_VIEW_HXX
#include "View.hxx"
-#endif
#include "sddllapi.h"
#include <com/sun/star/drawing/XDrawSubController.hpp>
@@ -111,7 +109,7 @@ public:
ST_OUTLINE,
ST_SLIDE_SORTER,
ST_PRESENTATION,
- ST_TASK_PANE
+ ST_SIDEBAR
};
static const int MAX_HSPLIT_CNT = 1;
static const int MAX_VSPLIT_CNT = 1;
@@ -212,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/trunk/main/sd/source/ui/inc/celltempl.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/celltempl.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/celltempl.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/celltempl.hxx Wed Apr 10 09:20:16 2013
@@ -26,7 +26,7 @@
#include <sfx2/styledlg.hxx>
-class XColorTable;
+class XColorList;
class XGradientList;
class XHatchList;
class XBitmapList;
@@ -36,7 +36,7 @@ class SdrModel;
class SdPresCellTemplateDlg : public SfxStyleDialog
{
private:
- XColorTable* mpColorTab;
+ XColorList* mpColorTab;
XGradientList* mpGradientList;
XHatchList* mpHatchingList;
XBitmapList* mpBitmapList;
Modified: openoffice/trunk/main/sd/source/ui/inc/copydlg.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/copydlg.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/copydlg.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/copydlg.hxx Wed Apr 10 09:20:16 2013
@@ -33,7 +33,7 @@
#include <vcl/fixed.hxx>
#include <sfx2/basedlgs.hxx>
-class XColorTable;
+class XColorList;
namespace sd {
@@ -49,7 +49,7 @@ class CopyDlg
{
public:
CopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
- XColorTable* pColTab, ::sd::View* pView );
+ XColorList* pColTab, ::sd::View* pView );
~CopyDlg();
void GetAttr( SfxItemSet& rOutAttrs );
@@ -86,7 +86,7 @@ private:
PushButton maBtnSetDefault;
const SfxItemSet& mrOutAttrs;
- XColorTable* mpColorTab;
+ XColorList* mpColorTab;
Fraction maUIScale;
::sd::View* mpView;
Modified: openoffice/trunk/main/sd/source/ui/inc/dlgpage.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/dlgpage.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/dlgpage.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/dlgpage.hxx Wed Apr 10 09:20:16 2013
@@ -29,7 +29,7 @@
#include "dlgpage.hrc"
class SfxObjectShell;
-class XColorTable;
+class XColorList;
class XGradientList;
class XHatchList;
class XBitmapList;
@@ -48,7 +48,7 @@ private:
const SfxObjectShell* mpDocShell;
- XColorTable* mpColorTab;
+ XColorList* mpColorTab;
XGradientList* mpGradientList;
XHatchList* mpHatchingList;
XBitmapList* mpBitmapList;
Modified: openoffice/trunk/main/sd/source/ui/inc/framework/FrameworkHelper.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/framework/FrameworkHelper.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/framework/FrameworkHelper.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/framework/FrameworkHelper.hxx Wed Apr 10 09:20:16 2013
@@ -48,6 +48,8 @@ class OUString;
}
namespace css = ::com::sun::star;
+namespace cssu = ::com::sun::star::uno;
+namespace cssdf = ::com::sun::star::drawing::framework;
namespace sd { namespace framework {
@@ -56,10 +58,10 @@ namespace sd { namespace framework {
It has three main tasks:
1. Provide frequently used strings of resource URLs and event names.
2. Provide shortcuts for accessing the sd framework.
- 3. Easy the migration to the drawing framwork.
+ 3. Ease the migration to the drawing framwork.
Note that a FrameworkHelper disposes itself when one of the resource
- controllers called by it throw a DisposedException.
+ controllers called by it throws a DisposedException.
*/
class FrameworkHelper
: public ::boost::enable_shared_from_this<FrameworkHelper>,
@@ -72,7 +74,7 @@ public:
static const ::rtl::OUString msFullScreenPaneURL;
static const ::rtl::OUString msLeftImpressPaneURL;
static const ::rtl::OUString msLeftDrawPaneURL;
- static const ::rtl::OUString msRightPaneURL;
+ static const ::rtl::OUString msSidebarPaneURL;
// URLs of frequently used views.
static const ::rtl::OUString msViewURLPrefix;
@@ -83,7 +85,7 @@ public:
static const ::rtl::OUString msHandoutViewURL;
static const ::rtl::OUString msSlideSorterURL;
static const ::rtl::OUString msPresentationViewURL;
- static const ::rtl::OUString msTaskPaneURL;
+ static const ::rtl::OUString msSidebarViewURL;
// URLs of frequently used tool bars.
static const ::rtl::OUString msToolBarURLPrefix;
@@ -91,7 +93,9 @@ public:
// URLs of task panels.
static const ::rtl::OUString msTaskPanelURLPrefix;
- static const ::rtl::OUString msMasterPagesTaskPanelURL;
+ static const ::rtl::OUString msAllMasterPagesTaskPanelURL;
+ static const ::rtl::OUString msRecentMasterPagesTaskPanelURL;
+ static const ::rtl::OUString msUsedMasterPagesTaskPanelURL;
static const ::rtl::OUString msLayoutTaskPanelURL;
static const ::rtl::OUString msTableDesignPanelURL;
static const ::rtl::OUString msCustomAnimationTaskPanelURL;
@@ -102,6 +106,7 @@ public:
static const ::rtl::OUString msResourceDeactivationRequestEvent;
static const ::rtl::OUString msResourceActivationEvent;
static const ::rtl::OUString msResourceDeactivationEvent;
+ static const ::rtl::OUString msResourceDeactivationEndEvent;
static const ::rtl::OUString msConfigurationUpdateStartEvent;
static const ::rtl::OUString msConfigurationUpdateEndEvent;
@@ -116,7 +121,7 @@ public:
static ::boost::shared_ptr<FrameworkHelper> Instance (ViewShellBase& rBase);
static ::boost::shared_ptr<FrameworkHelper> Instance (
- const css::uno::Reference<css::frame::XController>& rxController);
+ const cssu::Reference<css::frame::XController>& rxController);
/** Mark the FrameworkHelper object for the given ViewShellBase as
disposed. A following ReleaseInstance() call will destroy the
@@ -153,17 +158,15 @@ public:
reference then an empty pointer is returned.
*/
static ::boost::shared_ptr<ViewShell> GetViewShell (
- const css::uno::Reference<css::drawing::framework::XView>& rxView);
+ const cssu::Reference<cssdf::XView>& rxView);
- ~FrameworkHelper (void);
-
- typedef ::boost::function<bool(const css::drawing::framework::ConfigurationChangeEvent&)>
+ typedef ::boost::function<bool(const cssdf::ConfigurationChangeEvent&)>
ConfigurationChangeEventFilter;
typedef ::boost::function<void(bool bEventSeen)> Callback;
typedef ::boost::function<
void(
- const css::uno::Reference<
- css::drawing::framework::XResourceId>&)
+ const cssu::Reference<
+ cssdf::XResourceId>&)
> ResourceFunctor;
/** Test whether the called FrameworkHelper object is valid.
@@ -196,10 +199,19 @@ public:
of the involved objects does not support XTunnel (where
necessary).
*/
- css::uno::Reference<css::drawing::framework::XView>
- GetView (
- const css::uno::Reference<
- css::drawing::framework::XResourceId>& rxPaneOrViewId);
+ cssu::Reference<cssdf::XView> GetView (
+ const cssu::Reference<cssdf::XResourceId>& rxPaneOrViewId);
+
+ /** Return the XWindow that is represented by the pane with the
+ given resource id.
+ */
+ cssu::Reference<css::awt::XWindow> GetPaneWindow (
+ const cssu::Reference<cssdf::XResourceId>& rxPaneId);
+
+ /** Return the XResource object with the given resource id.
+ */
+ cssu::Reference<cssdf::XResource> GetResource (
+ const cssu::Reference<cssdf::XResourceId>& rxResourceId);
/** Request the specified view to be displayed in the specified pane.
When the pane is not visible its creation is also requested. The
@@ -213,24 +225,33 @@ public:
the caller can, for example, call RunOnResourceActivation() to
do some initialization after the requested view becomes active.
*/
- css::uno::Reference<css::drawing::framework::XResourceId> RequestView (
+ cssu::Reference<cssdf::XResourceId> RequestView (
const ::rtl::OUString& rsResourceURL,
const ::rtl::OUString& rsAnchorURL);
- /** Request the activation of the specified task panel in the standard
- task pane.
- @param rsTaskPanelURL
+ /** Request the activation of the specified panel in the
+ sidebar.
+ @param rsSidebarPanelURL
The panel that is to be activated.
- @param bEnsureTaskPaneIsVisible
- When this is <TRUE/> then the task pane is activated when not
+ @param bEnsurePaneIsVisible
+ When this is <TRUE/> then the sidebar pane is activated when not
yet active.
When this flag is <FALSE/> then the requested panel
is activated only when the task pane is already active. When it
is not active then this call is silently ignored.
+ @return
+ The resource id of the requested sidebar panel is returned. With that
+ the caller can, for example, call RunOnResourceActivation() to
+ do some initialization after the requested view becomes active.
*/
- void RequestTaskPanel (
- const ::rtl::OUString& rsTaskPanelURL,
+ cssu::Reference<cssdf::XResourceId> RequestSidebarPanel (
+ const ::rtl::OUString& rsSidebarPanelURL,
const bool bEnsureTaskPaneIsVisible = true);
+
+ /** Request the deactivation of the specified resource.
+ */
+ void RequestResourceDeactivation (
+ const cssu::Reference<cssdf::XResourceId>& rxResourceId);
/** Process a slot call that requests a view shell change.
*/
@@ -260,9 +281,30 @@ public:
*/
void RunOnResourceActivation(
- const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
+ const cssu::Reference<cssdf::XResourceId>& rxResourceId,
const Callback& rCallback);
+ /** Run the given callback when the specified resource has been
+ deactivated. When the resource is not active already when
+ this method is called then rCallback is called before this
+ method returns.
+ @param rxResourceId
+ Wait for the deactivation of this resource before calling
+ rCallback.
+ @param rCallback
+ The callback to be called when the resource is
+ deactivated.
+ @param bRunOnDeactivationEnd
+ The callback is run either when the deactivation starts
+ and the callback can still access the resource or when the
+ deactivatio is complete and the resource is no longer available.
+
+ */
+ void RunOnResourceDeactivation(
+ const cssu::Reference<cssdf::XResourceId>& rxResourceId,
+ const Callback& rCallback,
+ const bool bRunOnDeactivationEnd);
+
/** Normally the requested changes of the configuration are executed
asynchronously. However, there is at least one situation (searching
with the Outliner) where the surrounding code does not cope with
@@ -296,21 +338,21 @@ public:
/** Return a string representation of the given XResourceId object.
*/
static ::rtl::OUString ResourceIdToString (
- const css::uno::Reference<
- css::drawing::framework::XResourceId>& rxResourceId);
+ const cssu::Reference<
+ cssdf::XResourceId>& rxResourceId);
/** Create a new XResourceId object for the given resource URL.
*/
- static css::uno::Reference<
- css::drawing::framework::XResourceId>
+ static cssu::Reference<
+ cssdf::XResourceId>
CreateResourceId (
const ::rtl::OUString& rsResourceURL);
/** Create a new XResourceId object for the given resource URL and a
single anchor URL.
*/
- static css::uno::Reference<
- css::drawing::framework::XResourceId>
+ static cssu::Reference<
+ cssdf::XResourceId>
CreateResourceId (
const ::rtl::OUString& rsResourceURL,
const ::rtl::OUString& rsAnchorURL);
@@ -318,8 +360,8 @@ public:
/** Create a new XResourceId object for the given resource URL and the
two given anchor URLs.
*/
- static css::uno::Reference<
- css::drawing::framework::XResourceId>
+ static cssu::Reference<
+ cssdf::XResourceId>
CreateResourceId (
const ::rtl::OUString& rsResourceURL,
const ::rtl::OUString& rsFirstAnchorURL,
@@ -327,14 +369,14 @@ public:
/** Create a new XResourceId object for the given resource URL.
*/
- static css::uno::Reference<
- css::drawing::framework::XResourceId>
+ static cssu::Reference<
+ cssdf::XResourceId>
CreateResourceId (
const ::rtl::OUString& rsResourceURL,
- const css::uno::Reference<
- css::drawing::framework::XResourceId>& rxAnchor);
+ const cssu::Reference<
+ cssdf::XResourceId>& rxAnchor);
- css::uno::Reference<css::drawing::framework::XConfigurationController>
+ cssu::Reference<cssdf::XConfigurationController>
GetConfigurationController (void) const;
@@ -350,16 +392,18 @@ private:
static ::boost::scoped_ptr<ViewURLMap> mpViewURLMap;
ViewShellBase& mrBase;
- css::uno::Reference<css::drawing::framework::XConfigurationController>
+ cssu::Reference<cssdf::XConfigurationController>
mxConfigurationController;
class DisposeListener;
friend class DisposeListener;
- css::uno::Reference<css::lang::XComponent>
+ cssu::Reference<css::lang::XComponent>
mxDisposeListener;
FrameworkHelper (ViewShellBase& rBase);
FrameworkHelper (const FrameworkHelper& rHelper); // Not implemented.
+ ~FrameworkHelper (void);
+ class Deleter; friend class Deleter;
FrameworkHelper& operator= (const FrameworkHelper& rHelper); // Not implemented.
void Initialize (void);
@@ -399,7 +443,7 @@ namespace {
class FrameworkHelperAllPassFilter
{
public:
- bool operator() (const css::drawing::framework::ConfigurationChangeEvent&) { return true; }
+ bool operator() (const cssdf::ConfigurationChangeEvent&) { return true; }
};
@@ -407,12 +451,12 @@ namespace {
{
public:
FrameworkHelperResourceIdFilter (
- const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId);
- bool operator() (const css::drawing::framework::ConfigurationChangeEvent& rEvent)
+ const cssu::Reference<cssdf::XResourceId>& rxResourceId);
+ bool operator() (const cssdf::ConfigurationChangeEvent& rEvent)
{ return mxResourceId.is() && rEvent.ResourceId.is()
&& mxResourceId->compareTo(rEvent.ResourceId) == 0; }
private:
- css::uno::Reference<css::drawing::framework::XResourceId> mxResourceId;
+ cssu::Reference<cssdf::XResourceId> mxResourceId;
};
} // end of anonymous namespace
Modified: openoffice/trunk/main/sd/source/ui/inc/framework/Pane.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/framework/Pane.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/framework/Pane.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/framework/Pane.hxx Wed Apr 10 09:20:16 2013
@@ -94,6 +94,7 @@ public:
*/
virtual ::Window* GetWindow (void);
+ void SetWindow (::Window* pWindow);
//----- XPane -------------------------------------------------------------
Modified: openoffice/trunk/main/sd/source/ui/inc/fuolbull.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/fuolbull.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/fuolbull.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/fuolbull.hxx Wed Apr 10 09:20:16 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/trunk/main/sd/source/ui/inc/navigatr.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/navigatr.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/navigatr.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/navigatr.hxx Wed Apr 10 09:20:16 2013
@@ -88,11 +88,21 @@ class SdNavigatorWin
: public Window
{
public:
+ typedef ::boost::function<void(void)> UpdateRequestFunctor;
+
+ /** Create a new instance of the navigator.
+ @param bUseActiveUpdate
+ When <TRUE/>, the default, then the SdNavigatorWin object
+ will make a SID_NAVIGATOR_INIT call whenever it thinks an
+ update is necessary. When <FALSE/> the navigator will
+ rely on others to trigger updates.
+ */
SdNavigatorWin(
::Window* pParent,
::sd::NavigatorChildWindow* pChildWinContext,
const SdResId& rSdResId,
- SfxBindings* pBindings );
+ SfxBindings* pBindings,
+ const UpdateRequestFunctor& rUpdateRequest);
virtual ~SdNavigatorWin();
virtual void KeyInput( const KeyEvent& rKEvt );
@@ -137,7 +147,7 @@ private:
/** This flag controls whether all shapes or only the named shapes are
shown.
*/
- bool mbShowAllShapes;
+ // bool mbShowAllShapes;
sal_uInt16 GetDragTypeSdResId( NavigatorDragType eDT, sal_Bool bImage = sal_False );
NavDocInfo* GetDocInfo();
@@ -169,7 +179,8 @@ private:
class SdNavigatorControllerItem : public SfxControllerItem
{
public:
- SdNavigatorControllerItem( sal_uInt16, SdNavigatorWin*, SfxBindings* );
+ SdNavigatorControllerItem( sal_uInt16, SdNavigatorWin*, SfxBindings*,
+ const SdNavigatorWin::UpdateRequestFunctor& rUpdateRequest);
protected:
virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
@@ -177,6 +188,7 @@ protected:
private:
SdNavigatorWin* pNavigatorWin;
+ const SdNavigatorWin::UpdateRequestFunctor maUpdateRequest;
};
@@ -190,7 +202,8 @@ private:
class SdPageNameControllerItem : public SfxControllerItem
{
public:
- SdPageNameControllerItem( sal_uInt16, SdNavigatorWin*, SfxBindings* );
+ SdPageNameControllerItem( sal_uInt16, SdNavigatorWin*, SfxBindings*,
+ const SdNavigatorWin::UpdateRequestFunctor& rUpdateRequest);
protected:
virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
@@ -198,6 +211,7 @@ protected:
private:
SdNavigatorWin* pNavigatorWin;
+ const SdNavigatorWin::UpdateRequestFunctor maUpdateRequest;
};
#endif
Modified: openoffice/trunk/main/sd/source/ui/inc/prltempl.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/prltempl.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/prltempl.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/prltempl.hxx Wed Apr 10 09:20:16 2013
@@ -34,7 +34,7 @@
#include "prlayout.hxx" // fuer enum PresentationObjects
-class XColorTable;
+class XColorList;
class XGradientList;
class XHatchList;
class XBitmapList;
@@ -54,7 +54,7 @@ class SdPresLayoutTemplateDlg : public S
private:
const SfxObjectShell* mpDocShell;
- XColorTable* pColorTab;
+ XColorList* pColorTab;
XGradientList* pGradientList;
XHatchList* pHatchingList;
XBitmapList* pBitmapList;
Modified: openoffice/trunk/main/sd/source/ui/inc/tabtempl.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/tabtempl.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/tabtempl.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/tabtempl.hxx Wed Apr 10 09:20:16 2013
@@ -30,7 +30,7 @@
class SdrModel;
class SfxObjectShell;
class SdrView;
-class XColorTable;
+class XColorList;
class XGradientList;
class XBitmapList;
class XDashList;
@@ -49,7 +49,7 @@ private:
const SfxObjectShell& rDocShell;
SdrView* pSdrView;
- XColorTable* pColorTab;
+ XColorList* pColorTab;
XGradientList* pGradientList;
XHatchList* pHatchingList;
XBitmapList* pBitmapList;
Modified: openoffice/trunk/main/sd/source/ui/inc/tpaction.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/inc/tpaction.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/inc/tpaction.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/inc/tpaction.hxx Wed Apr 10 09:20:16 2013
@@ -89,7 +89,7 @@ private:
const SfxItemSet& rOutAttrs;
const ::sd::View* mpView;
SdDrawDocument* mpDoc;
- XColorTable* pColTab;
+ XColorList* pColTab;
sal_Bool bTreeUpdated;
List* pCurrentActions;
Modified: openoffice/trunk/main/sd/source/ui/presenter/PresenterHelper.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/presenter/PresenterHelper.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/presenter/PresenterHelper.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/presenter/PresenterHelper.hxx Wed Apr 10 09:20:16 2013
@@ -47,7 +47,7 @@ namespace {
/** Implementation of the XPresenterHelper interface: functionality that can
not be implemented in an extension.
*/
- class PresenterHelper
+class PresenterHelper
: private ::boost::noncopyable,
private ::cppu::BaseMutex,
public PresenterHelperInterfaceBase
Modified: openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx Wed Apr 10 09:20:16 2013
@@ -191,7 +191,8 @@ void SlotManager::FuTemporary (SfxReques
// in the tool pane.
if (mrSlideSorter.GetViewShellBase() != NULL)
framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())
- ->RequestTaskPanel(sd::framework::FrameworkHelper::msSlideTransitionTaskPanelURL);
+ ->RequestSidebarPanel(
+ sd::framework::FrameworkHelper::msSlideTransitionTaskPanelURL);
rRequest.Ignore ();
break;
}
Modified: openoffice/trunk/main/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx Wed Apr 10 09:20:16 2013
@@ -51,6 +51,7 @@
#include "sdresid.hxx"
#include "AccessibleSlideSorterView.hxx"
#include "DrawDocShell.hxx"
+#include "DrawViewShell.hxx"
#include "FrameView.hxx"
#include "SdUnoSlideView.hxx"
#include "ViewShellManager.hxx"
@@ -62,7 +63,10 @@
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
+#include <sfx2/sidebar/SidebarChildWindow.hxx>
#include <svx/svxids.hrc>
+#include <sfx2/sidebar/EnumContext.hxx>
+#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
#include <com/sun/star/drawing/framework/XControllerManager.hpp>
#include <com/sun/star/drawing/framework/ResourceId.hpp>
#include <cppuhelper/bootstrap.hxx>
@@ -77,12 +81,14 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::sd::framework::FrameworkHelper;
+using ::sfx2::sidebar::EnumContext;
namespace sd { namespace slidesorter {
SFX_IMPL_INTERFACE(SlideSorterViewShell, SfxShell, SdResId(STR_SLIDESORTERVIEWSHELL))
{
+ SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
}
@@ -220,12 +226,11 @@ SlideSorterViewShell* SlideSorterViewShe
{
SlideSorterViewShell* pViewShell = NULL;
- // Test the center, left, and then the right pane for showing a slide sorter.
+ // Test the center and left pane for showing a slide sorter.
::rtl::OUString aPaneURLs[] = {
FrameworkHelper::msCenterPaneURL,
FrameworkHelper::msFullScreenPaneURL,
FrameworkHelper::msLeftImpressPaneURL,
- FrameworkHelper::msRightPaneURL,
::rtl::OUString()};
try
@@ -547,6 +552,50 @@ void SlideSorterViewShell::Activate (sal
ViewShell::Activate(bIsMDIActivate);
if (mbIsArrangeGUIElementsPending)
ArrangeGUIElements();
+
+ // Determine and broadcast the context that belongs to the main view shell.
+ EnumContext::Context eContext = EnumContext::Context_Unknown;
+ ::boost::shared_ptr<ViewShell> pMainViewShell (GetViewShellBase().GetMainViewShell());
+ ViewShell::ShellType eMainViewShellType (
+ pMainViewShell
+ ? pMainViewShell->GetShellType()
+ : ViewShell::ST_NONE);
+ switch (eMainViewShellType)
+ {
+ case ViewShell::ST_IMPRESS:
+ eContext = EnumContext::Context_DrawPage;
+ if (pMainViewShell->ISA(DrawViewShell))
+ {
+ DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(pMainViewShell.get());
+ if (pDrawViewShell && (pDrawViewShell->GetEditMode()== EM_MASTERPAGE))
+ eContext = EnumContext::Context_MasterPage;
+ }
+ break;
+
+ case ViewShell::ST_SLIDE_SORTER:
+ eContext = EnumContext::Context_SlidesorterPage;
+ break;
+
+ case ViewShell::ST_NOTES:
+ eContext = EnumContext::Context_NotesPage;
+ break;
+
+ default:
+ break;
+ }
+ ContextChangeEventMultiplexer::NotifyContextChange(
+ &GetViewShellBase(),
+ eContext);
+}
+
+
+
+
+void SlideSorterViewShell::Deactivate (sal_Bool bIsMDIActivate)
+{
+ ContextChangeEventMultiplexer::NotifyContextChange(
+ &GetViewShellBase(),
+ EnumContext::Context_Default);
}
Modified: openoffice/trunk/main/sd/source/ui/table/TableDesignPane.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/table/TableDesignPane.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/table/TableDesignPane.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/table/TableDesignPane.cxx Wed Apr 10 09:20:16 2013
@@ -105,7 +105,7 @@ TableDesignPane::TableDesignPane( ::Wind
{
Window* pControlParent = mbModal ? pParent : this;
- mxControls[FL_TABLE_STYLES].reset( new FixedLine( pControlParent, SdResId( FL_TABLE_STYLES + 1 ) ) );
+ // mxControls[FL_TABLE_STYLES].reset( new FixedLine( pControlParent, SdResId( FL_TABLE_STYLES + 1 ) ) );
ValueSet* pValueSet = new ValueSet( pControlParent, SdResId( CT_TABLE_STYLES+1 ) );
mxControls[CT_TABLE_STYLES].reset( pValueSet );
@@ -122,7 +122,7 @@ TableDesignPane::TableDesignPane( ::Wind
}
pValueSet->SetSelectHdl (LINK(this, TableDesignPane, implValueSetHdl));
- mxControls[FL_STYLE_OPTIONS].reset( new FixedLine( pControlParent, SdResId( FL_STYLE_OPTIONS + 1 ) ) );
+ // mxControls[FL_STYLE_OPTIONS].reset( new FixedLine( pControlParent, SdResId( FL_STYLE_OPTIONS + 1 ) ) );
sal_uInt16 i;
for( i = CB_HEADER_ROW; i <= CB_BANDED_COLUMNS; ++i )
{
@@ -132,8 +132,15 @@ TableDesignPane::TableDesignPane( ::Wind
}
for( i = 0; i < DESIGNPANE_CONTROL_COUNT; i++ )
- mnOrgOffsetY[i] = mxControls[i]->GetPosPixel().Y();
-
+ {
+ if (mxControls[i])
+ mnOrgOffsetY[i] = mxControls[i]->GetPosPixel().Y();
+ else if (i > 0)
+ mnOrgOffsetY[i] = mnOrgOffsetY[i-1];
+ else
+ mnOrgOffsetY[i] = 0;
+ }
+
// get current controller and initialize listeners
try
{
@@ -180,6 +187,60 @@ void TableDesignPane::Resize()
updateLayout();
}
+
+
+
+LayoutSize TableDesignPane::GetHeightForWidth (const sal_Int32 nWidth)
+{
+ if ( ! IsVisible() || nWidth<=0)
+ return LayoutSize(0,0,0);
+
+ // Initialize the height with the offset above and below the value
+ // set and below the check boxes.
+ const Point aOffset (LogicToPixel( Point(3,3), MAP_APPFONT));
+ sal_Int32 nHeight (3 * aOffset.Y());
+
+ // Add the height for the check boxes.
+ nHeight += mnOrgOffsetY[CB_BANDED_COLUMNS] - mnOrgOffsetY[CB_HEADER_ROW]
+ + mxControls[CB_BANDED_COLUMNS]->GetSizePixel().Height();
+
+ // Setup minimal and maximal heights that include all check boxes
+ // and a small or large value set.
+ const sal_Int32 nMinimalHeight (nHeight+100);
+ const sal_Int32 nMaximalHeight (nHeight+450);
+
+ // Calculate the number of rows and columns and then add the
+ // preferred size of the value set.
+ ValueSet* pValueSet = static_cast< ValueSet* >( mxControls[CT_TABLE_STYLES].get() );
+ if (pValueSet->GetItemCount() > 0)
+ {
+ Image aImage = pValueSet->GetItemImage(pValueSet->GetItemId(0));
+ Size aItemSize = pValueSet->CalcItemSizePixel(aImage.GetSizePixel());
+ aItemSize.Width() += 10;
+ aItemSize.Height() += 10;
+
+ int nColumnCount = (pValueSet->GetSizePixel().Width() - pValueSet->GetScrollWidth()) / aItemSize.Width();
+ if (nColumnCount < 1)
+ nColumnCount = 1;
+
+ int nRowCount = (pValueSet->GetItemCount() + nColumnCount - 1) / nColumnCount;
+ if (nRowCount < 1)
+ nRowCount = 1;
+
+ nHeight += nRowCount * aItemSize.Height();
+ }
+
+ // Clip the requested height.
+ if (nHeight<nMinimalHeight)
+ nHeight = nMinimalHeight;
+ else if (nHeight>nMaximalHeight)
+ nHeight = nMaximalHeight;
+ return LayoutSize(nMinimalHeight, nMaximalHeight, nHeight);
+}
+
+
+
+
// --------------------------------------------------------------------
static SfxBindings* getBindings( ViewShellBase& rBase )
@@ -378,16 +439,19 @@ void TableDesignPane::updateLayout()
const long nStylesHeight = aPaneSize.Height() - nOptionsHeight;
- // set with of controls to size of pane
+ // set width of controls to size of pane
for( sal_Int32 nId = 0; nId < DESIGNPANE_CONTROL_COUNT; ++nId )
{
- Size aSize( mxControls[nId]->GetSizePixel() );
- aSize.Width() = aPaneSize.Width() - aOffset.X() - mxControls[nId]->GetPosPixel().X();
- mxControls[nId]->SetSizePixel( aSize );
- mxControls[nId]->SetPaintTransparent(sal_True);
- mxControls[nId]->SetBackground();
+ if (mxControls[nId])
+ {
+ Size aSize( mxControls[nId]->GetSizePixel() );
+ aSize.Width() = aPaneSize.Width() - aOffset.X() - mxControls[nId]->GetPosPixel().X();
+ mxControls[nId]->SetSizePixel( aSize );
+ mxControls[nId]->SetPaintTransparent(sal_True);
+ mxControls[nId]->SetBackground();
+ }
}
- aValueSetSize = Size( pValueSet->GetSizePixel().Width(), nStylesHeight - mxControls[FL_TABLE_STYLES]->GetSizePixel().Height() - mnOrgOffsetY[FL_TABLE_STYLES] );
+ aValueSetSize = Size( pValueSet->GetSizePixel().Width(), nStylesHeight );
}
else
{
@@ -449,18 +513,22 @@ void TableDesignPane::updateLayout()
// shift show options section down
const long nOptionsPos = aPos.Y() + aValueSetSize.Height();
- for( sal_Int32 nId = FL_STYLE_OPTIONS; nId <= CB_BANDED_COLUMNS; ++nId )
+ sal_Int32 nMaxY (0);
+ for( sal_Int32 nId = FL_STYLE_OPTIONS+1; nId <= CB_BANDED_COLUMNS; ++nId )
{
- Point aCPos( mxControls[nId]->GetPosPixel() );
- aCPos.X() = ( nId == FL_STYLE_OPTIONS ? 1 : 2 ) * aOffset.X();
- aCPos.Y() = mnOrgOffsetY[nId] + nOptionsPos;
- mxControls[nId]->SetPosPixel( aCPos );
+ if (mxControls[nId])
+ {
+ Point aCPos( mxControls[nId]->GetPosPixel() );
+ aCPos.X() = ( nId == FL_STYLE_OPTIONS ? 1 : 2 ) * aOffset.X();
+ aCPos.Y() = mnOrgOffsetY[nId] + nOptionsPos;
+ mxControls[nId]->SetPosPixel( aCPos );
+ const sal_Int32 nBottom (aCPos.Y() + mxControls[nId]->GetSizePixel().Height());
+ if (nBottom > nMaxY)
+ nMaxY = nBottom;
+ }
}
}
}
-
- if( !mbModal )
- SetBackground( GetSettings().GetStyleSettings().GetWindowColor() );
}
// --------------------------------------------------------------------
Modified: openoffice/trunk/main/sd/source/ui/table/TableDesignPane.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/table/TableDesignPane.hxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/table/TableDesignPane.hxx (original)
+++ openoffice/trunk/main/sd/source/ui/table/TableDesignPane.hxx Wed Apr 10 09:20:16 2013
@@ -26,6 +26,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ui/XUIElement.hpp>
+#include <com/sun/star/ui/LayoutSize.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -33,6 +34,7 @@
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
#include <svtools/valueset.hxx>
+#include <sfx2/sidebar/ILayoutableWindow.hxx>
#include <boost/scoped_ptr.hpp>
@@ -49,7 +51,7 @@ class ViewShellBase;
// --------------------------------------------------------------------
-class TableDesignPane : public Control
+class TableDesignPane : public Control, public sfx2::sidebar::ILayoutableWindow
{
public:
TableDesignPane( ::Window* pParent, ViewShellBase& rBase, bool bModal );
@@ -61,6 +63,9 @@ public:
// Control
virtual void Resize();
+ // ILayoutableWindow
+ virtual ::com::sun::star::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth);
+
virtual void DataChanged( const DataChangedEvent& rDCEvt );
void ApplyOptions();
Modified: openoffice/trunk/main/sd/source/ui/table/TableDesignPane.src
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/table/TableDesignPane.src?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/table/TableDesignPane.src (original)
+++ openoffice/trunk/main/sd/source/ui/table/TableDesignPane.src Wed Apr 10 09:20:16 2013
@@ -30,7 +30,7 @@ Control DLG_TABLEDESIGNPANE
DialogControl = TRUE;
Border = FALSE;
- Size = MAP_APPFONT( 264, 160 );
+ Size = MAP_APPFONT( 264, 134 );
Text [ en-US ] = "Table Design";
FixedLine FL_STYLE_OPTIONS+1
@@ -43,7 +43,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_HEADER_ROW+1
{
- Pos = MAP_APPFONT ( 146, 16 ) ;
+ Pos = MAP_APPFONT ( 146, 3 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Header Row" ;
@@ -51,7 +51,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_TOTAL_ROW+1
{
- Pos = MAP_APPFONT ( 146, 29 ) ;
+ Pos = MAP_APPFONT ( 146, 16 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Total Row" ;
@@ -59,7 +59,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_BANDED_ROWS+1
{
- Pos = MAP_APPFONT ( 146, 42 ) ;
+ Pos = MAP_APPFONT ( 146, 29 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Banded Rows" ;
@@ -67,7 +67,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_FIRST_COLUMN+1
{
- Pos = MAP_APPFONT ( 146, 55 ) ;
+ Pos = MAP_APPFONT ( 146, 42 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "First Column" ;
@@ -75,7 +75,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_LAST_COLUMN+1
{
- Pos = MAP_APPFONT ( 146, 68 ) ;
+ Pos = MAP_APPFONT ( 146, 55 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Last Column" ;
@@ -83,7 +83,7 @@ Control DLG_TABLEDESIGNPANE
CheckBox CB_BANDED_COLUMNS+1
{
- Pos = MAP_APPFONT ( 146, 82 ) ;
+ Pos = MAP_APPFONT ( 146, 68 ) ;
Size = MAP_APPFONT ( 120 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Banded Columns" ;
@@ -99,7 +99,7 @@ Control DLG_TABLEDESIGNPANE
Control CT_TABLE_STYLES+1
{
- Pos = MAP_APPFONT ( 6, 14 ) ;
+ Pos = MAP_APPFONT ( 4, 3 ) ;
Size = MAP_APPFONT( 120, 143 );
Border = TRUE ;
TabStop = TRUE ;
Modified: openoffice/trunk/main/sd/source/ui/table/tablefunction.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/table/tablefunction.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/table/tablefunction.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/table/tablefunction.cxx Wed Apr 10 09:20:16 2013
@@ -206,7 +206,7 @@ SfxViewShell* pViewShell = GetViewShell(
{
// Make the slide transition panel visible (expand it) in the
// tool pane.
- framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel(
+ framework::FrameworkHelper::Instance(GetViewShellBase())->RequestSidebarPanel(
framework::FrameworkHelper::msTableDesignPanelURL);
}
Modified: openoffice/trunk/main/sd/source/ui/table/tableobjectbar.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/table/tableobjectbar.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/table/tableobjectbar.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/table/tableobjectbar.cxx Wed Apr 10 09:20:16 2013
@@ -32,6 +32,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/msgpool.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svl/whiter.hxx>
#include <svl/itempool.hxx>
#include <svx/svdomedia.hxx>
@@ -104,6 +105,7 @@ TableObjectBar::TableObjectBar( ViewShel
SetRepeatTarget( mpView );
SetHelpId( SD_IF_SDDRAWTABLEOBJECTBAR );
SetName( String( SdResId( RID_DRAW_TABLE_TOOLBOX ) ) );
+ SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Table));
}
// -----------------------------------------------------------------------------
@@ -203,6 +205,8 @@ void TableObjectBar::Execute( SfxRequest
pBindings->Invalidate( SID_FRAME_LINECOLOR );
pBindings->Invalidate( SID_ATTR_BORDER );
pBindings->Invalidate( SID_ATTR_FILL_STYLE );
+ pBindings->Invalidate( SID_ATTR_FILL_TRANSPARENCE );
+ pBindings->Invalidate( SID_ATTR_FILL_FLOATTRANSPARENCE );
pBindings->Invalidate( SID_TABLE_MERGE_CELLS );
pBindings->Invalidate( SID_TABLE_SPLIT_CELLS );
pBindings->Invalidate( SID_OPTIMIZE_TABLE );
Modified: openoffice/trunk/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/unoidl/UnoDocumentSettings.cxx Wed Apr 10 09:20:16 2013
@@ -278,7 +278,7 @@ void DocumentSettings::_setPropertyValue
aPathURL.removeSegment();
aPathURL.removeFinalSlash();
- XColorTable* pColTab = new XColorTable( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
+ XColorList* pColTab = new XColorList( aPathURL.GetMainURL( INetURLObject::NO_DECODE ), (XOutdevItemPool*)&pDoc->GetPool() );
pColTab->SetName( aURL.getName() );
if( pColTab->Load() )
{
Modified: openoffice/trunk/main/sd/source/ui/unoidl/facreg.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/unoidl/facreg.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/unoidl/facreg.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/unoidl/facreg.cxx Wed Apr 10 09:20:16 2013
@@ -122,13 +122,6 @@ extern OUString BasicViewFactory_getImpl
extern uno::Sequence<OUString> SAL_CALL BasicViewFactory_getSupportedServiceNames (void)
throw (uno::RuntimeException);
-extern uno::Reference<uno::XInterface> SAL_CALL TaskPanelFactory_createInstance(
- const uno::Reference<uno::XComponentContext>& rxContext)
- throw(uno::Exception);
-extern OUString TaskPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
-extern uno::Sequence<OUString> SAL_CALL TaskPanelFactory_getSupportedServiceNames (void)
- throw (uno::RuntimeException);
-
extern uno::Reference<uno::XInterface> SAL_CALL ResourceId_createInstance(
const uno::Reference<uno::XComponentContext>& rxContext)
throw(uno::Exception);
@@ -145,14 +138,13 @@ extern uno::Sequence<OUString> SAL_CALL
throw (uno::RuntimeException);
} }
+namespace sd { namespace sidebar {
-namespace sd { namespace toolpanel {
-
-extern uno::Reference<uno::XInterface> SAL_CALL ToolPanelFactory_createInstance(
+extern uno::Reference<uno::XInterface> SAL_CALL PanelFactory_createInstance(
const uno::Reference<uno::XComponentContext>& rxContext)
throw(uno::Exception);
-extern OUString ToolPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
-extern uno::Sequence<OUString> SAL_CALL ToolPanelFactory_getSupportedServiceNames (void)
+extern OUString PanelFactory_getImplementationName(void) throw (uno::RuntimeException);
+extern uno::Sequence<OUString> SAL_CALL PanelFactory_getSupportedServiceNames (void)
throw (uno::RuntimeException);
} }
@@ -214,7 +206,7 @@ using namespace ::sd;
using namespace ::sd::framework;
using namespace ::sd::presenter;
using namespace ::sd::slidesorter;
-using namespace ::sd::toolpanel;
+using namespace ::sd::sidebar;
@@ -237,8 +229,7 @@ enum FactoryId
BasicPaneFactoryFactoryId,
BasicToolBarFactoryFactoryId,
BasicViewFactoryFactoryId,
- TaskPanelFactoryFactoryId,
- ToolPanelFactoryFactoryId,
+ PanelFactoryFactoryId,
ResourceIdFactoryId,
PresentationFactoryProviderFactoryId,
SlideRendererFactoryId,
@@ -271,8 +262,7 @@ static ::boost::shared_ptr<FactoryMap> s
(*spFactoryMap)[BasicPaneFactory_getImplementationName()] = BasicPaneFactoryFactoryId;
(*spFactoryMap)[BasicToolBarFactory_getImplementationName()] = BasicToolBarFactoryFactoryId;
(*spFactoryMap)[BasicViewFactory_getImplementationName()] = BasicViewFactoryFactoryId;
- (*spFactoryMap)[TaskPanelFactory_getImplementationName()] = TaskPanelFactoryFactoryId;
- (*spFactoryMap)[ToolPanelFactory_getImplementationName()] = ToolPanelFactoryFactoryId;
+ (*spFactoryMap)[sidebar::PanelFactory_getImplementationName()] = PanelFactoryFactoryId;
(*spFactoryMap)[ResourceId_getImplementationName()] = ResourceIdFactoryId;
(*spFactoryMap)[PresentationFactoryProvider_getImplementationName()] = PresentationFactoryProviderFactoryId;
(*spFactoryMap)[SlideRenderer_getImplementationName()] = SlideRendererFactoryId;
@@ -402,18 +392,11 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL com
sd::framework::BasicViewFactory_getSupportedServiceNames());
break;
- case TaskPanelFactoryFactoryId:
- xComponentFactory = ::cppu::createSingleComponentFactory(
- sd::framework::TaskPanelFactory_createInstance,
- sd::framework::TaskPanelFactory_getImplementationName(),
- sd::framework::TaskPanelFactory_getSupportedServiceNames());
- break;
-
- case ToolPanelFactoryFactoryId:
+ case PanelFactoryFactoryId:
xComponentFactory = ::cppu::createSingleComponentFactory(
- sd::toolpanel::ToolPanelFactory_createInstance,
- sd::toolpanel::ToolPanelFactory_getImplementationName(),
- sd::toolpanel::ToolPanelFactory_getSupportedServiceNames());
+ sd::sidebar::PanelFactory_createInstance,
+ sd::sidebar::PanelFactory_getImplementationName(),
+ sd::sidebar::PanelFactory_getSupportedServiceNames());
break;
case ResourceIdFactoryId:
Modified: openoffice/trunk/main/sd/source/ui/view/ToolBarManager.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/ToolBarManager.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/ToolBarManager.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/ToolBarManager.cxx Wed Apr 10 09:20:16 2013
@@ -1230,7 +1230,7 @@ void ToolBarRules::MainViewShellChanged
case ViewShell::ST_NONE:
case ViewShell::ST_PRESENTATION:
- case ViewShell::ST_TASK_PANE:
+ case ViewShell::ST_SIDEBAR:
default:
break;
}
Modified: openoffice/trunk/main/sd/source/ui/view/ViewShellBase.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/ViewShellBase.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/ViewShellBase.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/ViewShellBase.cxx Wed Apr 10 09:20:16 2013
@@ -62,7 +62,7 @@
#include "PresentationViewShell.hxx"
#include "FormShellManager.hxx"
#include "ToolBarManager.hxx"
-#include "taskpane/PanelId.hxx"
+#include "SidebarPanelId.hxx"
#include "Window.hxx"
#include "framework/ConfigurationController.hxx"
#include "DocumentRenderer.hxx"
@@ -729,13 +729,6 @@ void ViewShellBase::Execute (SfxRequest&
framework::FrameworkHelper::msSlideSorterURL);
break;
- case SID_TASKPANE:
- mpImpl->SetPaneVisibility(
- rRequest,
- framework::FrameworkHelper::msRightPaneURL,
- framework::FrameworkHelper::msTaskPaneURL);
- break;
-
case SID_NORMAL_MULTI_PANE_GUI:
case SID_SLIDE_SORTER_MULTI_PANE_GUI:
case SID_DRAWINGMODE:
@@ -1449,11 +1442,6 @@ void ViewShellBase::Implementation::GetS
xContext, FrameworkHelper::msLeftDrawPaneURL);
break;
- case SID_TASKPANE:
- xResourceId = ResourceId::create(
- xContext, FrameworkHelper::msRightPaneURL);
- break;
-
case SID_NORMAL_MULTI_PANE_GUI:
xResourceId = ResourceId::createWithAnchorURL(
xContext,
@@ -1553,8 +1541,7 @@ void ViewShellBase::Implementation::Proc
// Set the visibility state of the toolpanel and one of its top
// level panels.
sal_Bool bShowToolPanel = sal_True;
- toolpanel::PanelId nPanelId (
- toolpanel::PID_UNKNOWN);
+ sidebar::PanelId nPanelId (sidebar::PID_UNKNOWN);
bool bPanelIdGiven = false;
// Extract the given arguments.
@@ -1574,9 +1561,7 @@ void ViewShellBase::Implementation::Proc
ID_VAL_PANEL_INDEX, sal_False);
if (pPanelId != NULL)
{
- nPanelId = static_cast<
- toolpanel::PanelId>(
- pPanelId->GetValue());
+ nPanelId = static_cast<sidebar::PanelId>(pPanelId->GetValue());
bPanelIdGiven = true;
}
}
@@ -1585,11 +1570,11 @@ void ViewShellBase::Implementation::Proc
// Ignore the request for some combinations of panels and view
// shell types.
if (bPanelIdGiven
- && ! (nPanelId==toolpanel::PID_LAYOUT
+ && ! (nPanelId==sidebar::PID_LAYOUT
&& mrBase.GetMainViewShell()!=NULL
&& mrBase.GetMainViewShell()->GetShellType()==ViewShell::ST_OUTLINE))
{
- framework::FrameworkHelper::Instance(mrBase)->RequestTaskPanel(
+ framework::FrameworkHelper::Instance(mrBase)->RequestSidebarPanel(
framework::FrameworkHelper::msLayoutTaskPanelURL);
}
}
Modified: openoffice/trunk/main/sd/source/ui/view/ViewShellImplementation.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/ViewShellImplementation.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/ViewShellImplementation.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/ViewShellImplementation.cxx Wed Apr 10 09:20:16 2013
@@ -47,7 +47,7 @@
#include "FrameView.hxx"
#include "DrawViewShell.hxx"
#include "ViewShellHint.hxx"
-#include "taskpane/PanelId.hxx"
+#include "SidebarPanelId.hxx"
#include "framework/FrameworkHelper.hxx"
#include <sfx2/bindings.hxx>
@@ -148,8 +148,7 @@ void ViewShell::Implementation::ProcessM
// Make the layout menu visible in the tool pane.
SfxBoolItem aMakeToolPaneVisible (ID_VAL_ISVISIBLE, sal_True);
- SfxUInt32Item aPanelId (ID_VAL_PANEL_INDEX,
- ::sd::toolpanel::PID_LAYOUT);
+ SfxUInt32Item aPanelId (ID_VAL_PANEL_INDEX, sidebar::PID_LAYOUT);
SfxViewFrame* pFrame = mrViewShell.GetViewFrame();
if (pFrame!=NULL && pFrame->GetDispatcher()!=NULL)
{
@@ -349,7 +348,7 @@ sal_uInt16 ViewShell::Implementation::Ge
// Since we have to return a view id for every possible shell type
// and there is not (yet) a proper ViewShellBase sub class for the
// remaining types we chose the Impress factory as a fall back.
- case ViewShell::ST_TASK_PANE:
+ case ViewShell::ST_SIDEBAR:
case ViewShell::ST_NONE:
default:
return IMPRESS_FACTORY_ID;
Modified: openoffice/trunk/main/sd/source/ui/view/ViewShellManager.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/ViewShellManager.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/ViewShellManager.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/ViewShellManager.cxx Wed Apr 10 09:20:16 2013
@@ -61,6 +61,8 @@ public:
SfxShell* mpShell;
ShellId mnId;
ViewShellManager::SharedShellFactory mpFactory;
+ bool mbIsListenerAddedToWindow;
+
ShellDescriptor ();
ShellDescriptor (SfxShell* pShell, ShellId nId);
ShellDescriptor (const ShellDescriptor& rDescriptor);
@@ -241,7 +243,7 @@ private:
ShellId nShellId,
::Window* pParentWindow,
FrameView* pFrameView);
- void DestroyViewShell (const ShellDescriptor& rDescriptor);
+ void DestroyViewShell (ShellDescriptor& rDescriptor);
void DestroySubShell (
const SfxShell& rViewShell,
const ShellDescriptor& rDescriptor);
@@ -519,8 +521,11 @@ void ViewShellManager::Implementation::A
{
::Window* pWindow = aResult.GetWindow();
if (pWindow != NULL)
+ {
pWindow->AddEventListener(
LINK(this, ViewShellManager::Implementation, WindowEventHandler));
+ aResult.mbIsListenerAddedToWindow = true;
+ }
else
{
DBG_ASSERT(false,
@@ -1181,6 +1186,23 @@ IMPL_LINK(ViewShellManager::Implementati
case VCLEVENT_WINDOW_LOSEFOCUS:
break;
+
+ case VCLEVENT_OBJECT_DYING:
+ // Remember that we do not have to remove the window
+ // listener for this window.
+ for (ActiveShellList::iterator
+ iShell(maActiveViewShells.begin()),
+ iEnd(maActiveViewShells.end());
+ iShell!=iEnd;
+ ++iShell)
+ {
+ if (iShell->GetWindow() == pEventWindow)
+ {
+ iShell->mbIsListenerAddedToWindow = false;
+ break;
+ }
+ }
+ break;
}
}
return sal_True;
@@ -1225,15 +1247,19 @@ ShellDescriptor ViewShellManager::Implem
void ViewShellManager::Implementation::DestroyViewShell (
- const ShellDescriptor& rDescriptor)
+ ShellDescriptor& rDescriptor)
{
OSL_ASSERT(rDescriptor.mpShell != NULL);
-
- ::Window* pWindow = rDescriptor.GetWindow();
- if (pWindow != NULL)
+
+ if (rDescriptor.mbIsListenerAddedToWindow)
{
- pWindow->RemoveEventListener(
- LINK(this, ViewShellManager::Implementation, WindowEventHandler));
+ rDescriptor.mbIsListenerAddedToWindow = false;
+ ::Window* pWindow = rDescriptor.GetWindow();
+ if (pWindow != NULL)
+ {
+ pWindow->RemoveEventListener(
+ LINK(this, ViewShellManager::Implementation, WindowEventHandler));
+ }
}
// Destroy the sub shell factories.
@@ -1395,7 +1421,8 @@ namespace {
ShellDescriptor::ShellDescriptor (void)
: mpShell(NULL),
mnId(0),
- mpFactory()
+ mpFactory(),
+ mbIsListenerAddedToWindow(false)
{
}
@@ -1407,7 +1434,8 @@ ShellDescriptor::ShellDescriptor (
ShellId nId)
: mpShell(pShell),
mnId(nId),
- mpFactory()
+ mpFactory(),
+ mbIsListenerAddedToWindow(false)
{
}
@@ -1415,9 +1443,10 @@ ShellDescriptor::ShellDescriptor (
ShellDescriptor::ShellDescriptor (const ShellDescriptor& rDescriptor)
- : mpShell(rDescriptor.mpShell),
- mnId(rDescriptor.mnId),
- mpFactory(rDescriptor.mpFactory)
+ : mpShell(rDescriptor.mpShell),
+ mnId(rDescriptor.mnId),
+ mpFactory(rDescriptor.mpFactory),
+ mbIsListenerAddedToWindow(rDescriptor.mbIsListenerAddedToWindow)
{
}
@@ -1426,9 +1455,13 @@ ShellDescriptor::ShellDescriptor (const
ShellDescriptor& ShellDescriptor::operator= (const ShellDescriptor& rDescriptor)
{
- mpShell = rDescriptor.mpShell;
- mnId = rDescriptor.mnId;
- mpFactory = rDescriptor.mpFactory;
+ if (this != &rDescriptor)
+ {
+ mpShell = rDescriptor.mpShell;
+ mnId = rDescriptor.mnId;
+ mpFactory = rDescriptor.mpFactory;
+ mbIsListenerAddedToWindow = rDescriptor.mbIsListenerAddedToWindow;
+ }
return *this;
}
Modified: openoffice/trunk/main/sd/source/ui/view/drtxtob.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/drtxtob.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/drtxtob.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/drtxtob.cxx Wed Apr 10 09:20:16 2013
@@ -39,6 +39,7 @@
#include <editeng/ulspitem.hxx>
#include <editeng/lspcitem.hxx>
#include <editeng/adjitem.hxx>
+#include <editeng/kernitem.hxx>
#include <vcl/vclenum.hxx>
#include <sfx2/app.hxx>
#include <svl/whiter.hxx>
@@ -153,6 +154,27 @@ TextObjectBar::~TextObjectBar()
SetRepeatTarget(NULL);
}
+void TextObjectBar::GetCharState( SfxItemSet& rSet )
+{
+ SfxItemSet aCharAttrSet( mpView->GetDoc()->GetPool() );
+ mpView->GetAttributes( aCharAttrSet );
+
+ SfxItemSet aNewAttr( mpViewShell->GetPool(),EE_ITEMS_START,EE_ITEMS_END);
+
+ aNewAttr.Put(aCharAttrSet, sal_False);
+ rSet.Put(aNewAttr, sal_False);
+
+ SvxKerningItem aKern = ( (const SvxKerningItem&) aCharAttrSet.Get( EE_CHAR_KERNING ) );
+ //aKern.SetWhich(SID_ATTR_CHAR_KERNING);
+ rSet.Put(aKern);
+
+ SfxItemState eState = aCharAttrSet.GetItemState( EE_CHAR_KERNING, sal_True );
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ rSet.InvalidateItem(EE_CHAR_KERNING);
+ }
+}
+
/*************************************************************************
|*
|* Status der Attribut-Items
@@ -183,6 +205,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 );
@@ -464,7 +488,9 @@ void TextObjectBar::GetAttrState( SfxIte
}
// Absatzausrichtung
- SvxAdjust eAdj = ( (const SvxAdjustItem&) aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
+ SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aAttrSet.Get( EE_PARA_LRSPACE ) );
+ rSet.Put(aLR);
+ SvxAdjust eAdj = ( (const SvxAdjustItem&) aAttrSet.Get( EE_PARA_JUST ) ).GetAdjust();
switch( eAdj )
{
case SVX_ADJUST_LEFT:
@@ -483,6 +509,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 +580,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/trunk/main/sd/source/ui/view/drtxtob1.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sd/source/ui/view/drtxtob1.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sd/source/ui/view/drtxtob1.cxx (original)
+++ openoffice/trunk/main/sd/source/ui/view/drtxtob1.cxx Wed Apr 10 09:20:16 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);