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 [11/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/cha...
Modified: openoffice/trunk/main/sw/source/ui/shells/annotsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/annotsh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/annotsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/annotsh.cxx Wed Apr 10 09:20:16 2013
@@ -40,6 +40,8 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <editeng/spltitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
#include <editeng/orphitem.hxx>
#include <editeng/brkitem.hxx>
#include <editeng/widwitem.hxx>
@@ -105,6 +107,7 @@
#include <svx/dialogs.hrc>
#include <svx/svxids.hrc>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svl/itempool.hxx>
#include <editeng/outliner.hxx>
#include <editeng/editeng.hxx>
@@ -151,6 +154,7 @@ SwAnnotationShell::SwAnnotationShell( Sw
{
SwWrtShell &rSh = rView.GetWrtShell();
SetPool(rSh.GetAttrPool().GetSecondaryPool());
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Annotation));
}
SwAnnotationShell::~SwAnnotationShell()
@@ -186,6 +190,35 @@ void SwAnnotationShell::Exec( SfxRequest
sal_uInt16 nEEWhich = 0;
switch (nSlot)
{
+ case SID_ATTR_PARA_LRSPACE:
+ {
+ SvxLRSpaceItem aParaMargin((const SvxLRSpaceItem&)rReq.
+ GetArgs()->Get(nSlot));
+ aParaMargin.SetWhich( EE_PARA_LRSPACE );
+
+ aNewAttr.Put(aParaMargin);
+ rReq.Done();
+ break;
+ }
+ case SID_ATTR_PARA_LINESPACE:
+ {
+ SvxLineSpacingItem aParaMargin = (const SvxLineSpacingItem&)pNewAttrs->Get(
+ GetPool().GetWhich(nSlot));
+ aParaMargin.SetWhich( EE_PARA_SBL );
+
+ aNewAttr.Put(aParaMargin);
+ rReq.Done();
+ break;
+ }
+ case SID_ATTR_PARA_ULSPACE:
+ {
+ SvxULSpaceItem aULSpace = (const SvxULSpaceItem&)pNewAttrs->Get(
+ GetPool().GetWhich(nSlot));
+ aULSpace.SetWhich( EE_PARA_ULSPACE );
+ aNewAttr.Put( aULSpace );
+ rReq.Done();
+ }
+ break;
case SID_ATTR_CHAR_FONT:
case SID_ATTR_CHAR_FONTHEIGHT:
case SID_ATTR_CHAR_WEIGHT:
@@ -203,8 +236,19 @@ void SwAnnotationShell::Exec( SfxRequest
case SID_ATTR_CHAR_COLOR: nEEWhich = EE_CHAR_COLOR; break;
case SID_ATTR_CHAR_UNDERLINE:
{
- FontUnderline eFU = ((const SvxUnderlineItem&)aEditAttr.Get(EE_CHAR_UNDERLINE)).GetLineStyle();
- aNewAttr.Put(SvxUnderlineItem(eFU == UNDERLINE_SINGLE ? UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE));
+ if( rReq.GetArgs() )
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SvxUnderlineItem, SID_ATTR_CHAR_UNDERLINE , sal_False );
+ if (pItem)
+ {
+ aNewAttr.Put(*pItem);
+ }
+ else
+ {
+ FontUnderline eFU = ( (const SvxUnderlineItem&) aEditAttr.Get( EE_CHAR_UNDERLINE ) ).GetLineStyle();
+ aNewAttr.Put( SvxUnderlineItem( eFU != UNDERLINE_NONE ?UNDERLINE_NONE : UNDERLINE_SINGLE, EE_CHAR_UNDERLINE ) );
+ }
+ }
break;
}
case SID_ATTR_CHAR_OVERLINE:
@@ -426,6 +470,7 @@ void SwAnnotationShell::Exec( SfxRequest
delete pDialog;
}
break;
+ case SID_CHAR_DLG_EFFECT:
case SID_CHAR_DLG:
{
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -450,6 +495,10 @@ void SwAnnotationShell::Exec( SfxRequest
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( rView.GetWindow(), rView, aDlgAttr, DLG_CHAR,0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
+ if (nSlot == SID_CHAR_DLG_EFFECT)
+ {
+ pDlg->SetCurPageId(TP_CHAR_EXT);
+ }
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
@@ -592,6 +641,44 @@ void SwAnnotationShell::GetState(SfxItem
sal_uInt16 nSlotId = GetPool().GetSlotId( nWhich );
switch( nSlotId )
{
+ case SID_ATTR_PARA_LRSPACE:
+ {
+ SfxItemState eState = aEditAttr.GetItemState( EE_PARA_LRSPACE );
+ if( eState >= SFX_ITEM_DEFAULT )
+ {
+ SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE ) );
+ aLR.SetWhich(SID_ATTR_PARA_LRSPACE);
+ rSet.Put(aLR);
+ }
+ else
+ rSet.InvalidateItem(nSlotId);
+ }
+ break;
+ case SID_ATTR_PARA_LINESPACE:
+ {
+ SfxItemState eState = aEditAttr.GetItemState( EE_PARA_SBL );
+ if( eState >= SFX_ITEM_DEFAULT )
+ {
+ SvxLineSpacingItem aLR = ( (const SvxLineSpacingItem&) aEditAttr.Get( EE_PARA_SBL ) );
+ rSet.Put(aLR);
+ }
+ else
+ rSet.InvalidateItem(nSlotId);
+ }
+ break;
+ case SID_ATTR_PARA_ULSPACE:
+ {
+ SfxItemState eState = aEditAttr.GetItemState( EE_PARA_ULSPACE );
+ if( eState >= SFX_ITEM_DEFAULT )
+ {
+ SvxULSpaceItem aULSpace = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE );
+ aULSpace.SetWhich(SID_ATTR_PARA_ULSPACE);
+ rSet.Put(aULSpace);
+ }
+ else
+ rSet.InvalidateItem(nSlotId);
+ }
+ break;
case SID_ATTR_CHAR_FONT:
case SID_ATTR_CHAR_FONTHEIGHT:
case SID_ATTR_CHAR_WEIGHT:
@@ -622,6 +709,8 @@ void SwAnnotationShell::GetState(SfxItem
case SID_ATTR_CHAR_SHADOWED: nEEWhich = EE_CHAR_SHADOW;break;
case SID_ATTR_CHAR_STRIKEOUT: nEEWhich = EE_CHAR_STRIKEOUT;break;
case SID_ATTR_CHAR_LANGUAGE : nEEWhich = EE_CHAR_LANGUAGE;break;
+ case SID_ATTR_CHAR_ESCAPEMENT: nEEWhich = EE_CHAR_ESCAPEMENT;break;
+ case SID_ATTR_CHAR_KERNING: nEEWhich = EE_CHAR_KERNING;break;
case FN_SET_SUPER_SCRIPT:
case FN_SET_SUB_SCRIPT:
{
@@ -763,7 +852,17 @@ void SwAnnotationShell::GetState(SfxItem
}
if(nEEWhich)
+ {
rSet.Put(aEditAttr.Get(nEEWhich, sal_True), nWhich);
+ if(nEEWhich == EE_CHAR_KERNING)
+ {
+ SfxItemState eState = aEditAttr.GetItemState( EE_CHAR_KERNING, sal_True );
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ rSet.InvalidateItem(EE_CHAR_KERNING);
+ }
+ }
+ }
if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED)
rSet.DisableItem( nWhich );
Modified: openoffice/trunk/main/sw/source/ui/shells/basesh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/basesh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/basesh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/basesh.cxx Wed Apr 10 09:20:16 2013
@@ -2450,26 +2450,28 @@ void SwBaseShell::ExecDlg(SfxRequest &rR
if(pArgs)
pArgs->GetItemState( GetPool().GetWhich(nSlot), sal_False, &pItem );
- switch ( nSlot )
- {
- case FN_FORMAT_PAGE_COLUMN_DLG:
- case FN_FORMAT_PAGE_DLG:
- {
- if( !bBackground )
- {
- const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
- const SwPageDesc& rPageDesc = rSh.GetPageDesc( nCurIdx );
- //temp. View, weil die Shell nach dem Dialog nicht mehr gueltig sein muss
- //z.B. Kopfzeile ausschalten
+ switch ( nSlot )
+ {
+ case FN_FORMAT_PAGE_DLG:
+ case FN_FORMAT_PAGE_COLUMN_DLG:
+ case FN_FORMAT_PAGE_SETTING_DLG:
+ {
+ if( !bBackground )
+ {
+ const sal_uInt16 nCurIdx = rSh.GetCurPageDesc();
+ const SwPageDesc& rPageDesc = rSh.GetPageDesc( nCurIdx );
+ //temp. View, weil die Shell nach dem Dialog nicht mehr gueltig sein muss
+ //z.B. Kopfzeile ausschalten
SwView& rTempView = GetView();
- rTempView.GetDocShell()->FormatPage(rPageDesc.GetName(),
- nSlot == FN_FORMAT_PAGE_COLUMN_DLG,
- &rSh );
+ rTempView.GetDocShell()->FormatPage(
+ rPageDesc.GetName(),
+ nSlot,
+ rSh );
rTempView.InvalidateRulerPos();
- }
- }
- break;
- case FN_FORMAT_BORDER_DLG:
+ }
+ }
+ break;
+ case FN_FORMAT_BORDER_DLG:
{
SfxItemSet aSet( rSh.GetAttrPool(),
RES_BOX , RES_SHADOW,
Modified: openoffice/trunk/main/sw/source/ui/shells/beziersh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/beziersh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/beziersh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/beziersh.cxx Wed Apr 10 09:20:16 2013
@@ -31,6 +31,7 @@
#include <svl/eitem.hxx>
#include <svl/whiter.hxx>
#include <svx/svdopath.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objface.hxx>
@@ -73,6 +74,8 @@ SwBezierShell::SwBezierShell(SwView &_rV
SwWrtShell *pSh = &GetShell();
SdrView* pSdrView = pSh->GetDrawView();
pSdrView->SetEliminatePolyPointLimitAngle(1500L);
+
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Draw));
}
/*--------------------------------------------------------------------
@@ -347,6 +350,3 @@ void SwBezierShell::GetState(SfxItemSet
nWhich = aIter.NextWhich();
}
}
-
-
-
Modified: openoffice/trunk/main/sw/source/ui/shells/drawdlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/drawdlg.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/drawdlg.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/drawdlg.cxx Wed Apr 10 09:20:16 2013
@@ -108,7 +108,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest
DBG_ASSERT(pDlg, "Dialogdiet fail!");
const SvxColorTableItem* pColorItem = (const SvxColorTableItem*)
GetView().GetDocShell()->GetItem(SID_COLOR_TABLE);
- if(pColorItem->GetColorTable() == XColorTable::GetStdColorTable())
+ if(pColorItem->GetColorTable() == XColorList::GetStdColorList())
pDlg->DontDeleteColorTable();
if (pDlg->Execute() == RET_OK)
{
@@ -121,12 +121,18 @@ void SwDrawShell::ExecDrawDlg(SfxRequest
static sal_uInt16 __READONLY_DATA aInval[] =
{
- SID_ATTR_FILL_STYLE, SID_ATTR_FILL_COLOR, 0
+ SID_ATTR_FILL_STYLE,
+ SID_ATTR_FILL_COLOR,
+ SID_ATTR_FILL_TRANSPARENCE,
+ SID_ATTR_FILL_FLOATTRANSPARENCE,
+ 0
};
SfxBindings &rBnd = GetView().GetViewFrame()->GetBindings();
rBnd.Invalidate(aInval);
rBnd.Update(SID_ATTR_FILL_STYLE);
rBnd.Update(SID_ATTR_FILL_COLOR);
+ rBnd.Update(SID_ATTR_FILL_TRANSPARENCE);
+ rBnd.Update(SID_ATTR_FILL_FLOATTRANSPARENCE);
}
delete pDlg;
}
@@ -160,8 +166,16 @@ void SwDrawShell::ExecDrawDlg(SfxRequest
static sal_uInt16 __READONLY_DATA aInval[] =
{
- SID_ATTR_LINE_STYLE, SID_ATTR_LINE_WIDTH,
- SID_ATTR_LINE_COLOR, 0
+ SID_ATTR_LINE_STYLE, // ( SID_SVX_START + 169 )
+ SID_ATTR_LINE_DASH, // ( SID_SVX_START + 170 )
+ SID_ATTR_LINE_WIDTH, // ( SID_SVX_START + 171 )
+ SID_ATTR_LINE_COLOR, // ( SID_SVX_START + 172 )
+ SID_ATTR_LINE_START, // ( SID_SVX_START + 173 )
+ SID_ATTR_LINE_END, // ( SID_SVX_START + 174 )
+ SID_ATTR_LINE_TRANSPARENCE, // (SID_SVX_START+1107)
+ SID_ATTR_LINE_JOINT, // (SID_SVX_START+1110)
+ SID_ATTR_LINE_CAP, // (SID_SVX_START+1111)
+ 0
};
GetView().GetViewFrame()->GetBindings().Invalidate(aInval);
@@ -214,12 +228,17 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRe
case SID_ATTR_FILL_GRADIENT:
case SID_ATTR_FILL_HATCH:
case SID_ATTR_FILL_BITMAP:
+ case SID_ATTR_FILL_TRANSPARENCE:
+ case SID_ATTR_FILL_FLOATTRANSPARENCE:
pDis->Execute(SID_ATTRIBUTES_AREA, sal_False);
break;
case SID_ATTR_LINE_STYLE:
case SID_ATTR_LINE_DASH:
case SID_ATTR_LINE_WIDTH:
case SID_ATTR_LINE_COLOR:
+ case SID_ATTR_LINE_TRANSPARENCE:
+ case SID_ATTR_LINE_JOINT:
+ case SID_ATTR_LINE_CAP:
pDis->Execute(SID_ATTRIBUTES_LINE, sal_False);
break;
}
Modified: openoffice/trunk/main/sw/source/ui/shells/drawsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/drawsh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/drawsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/drawsh.cxx Wed Apr 10 09:20:16 2013
@@ -49,6 +49,7 @@
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <svx/xtable.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svx/svdoashp.hxx>
#include "swundo.hxx"
@@ -169,9 +170,11 @@ void SwDrawShell::Execute(SfxRequest &rR
break;
case FN_FLIP_HORZ_GRAFIC:
+ case SID_FLIP_HORIZONTAL:
bMirror = sal_False;
/* no break */
case FN_FLIP_VERT_GRAFIC:
+ case SID_FLIP_VERTICAL:
rSh.MirrorSelection( bMirror );
break;
@@ -346,11 +349,13 @@ void SwDrawShell::GetState(SfxItemSet& r
break;
case FN_FLIP_HORZ_GRAFIC:
+ case SID_FLIP_HORIZONTAL:
if ( !pSdrView->IsMirrorAllowed() || bProtected )
rSet.DisableItem( nWhich );
break;
case FN_FLIP_VERT_GRAFIC:
+ case SID_FLIP_VERTICAL:
if ( !pSdrView->IsMirrorAllowed() || bProtected )
rSet.DisableItem( nWhich );
break;
@@ -384,6 +389,8 @@ SwDrawShell::SwDrawShell(SwView &_rView)
{
SetHelpId(SW_DRAWSHELL);
SetName(String::CreateFromAscii("Draw"));
+
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Draw));
}
/*************************************************************************
@@ -472,12 +479,8 @@ void SwDrawShell::GetFormTextState(SfxIt
else
{
if ( pDlg )
- pDlg->SetColorTable(XColorTable::GetStdColorTable());
+ pDlg->SetColorTable(XColorList::GetStdColorList());
pDrView->GetAttributes( rSet );
}
}
-
-
-
-
Modified: openoffice/trunk/main/sw/source/ui/shells/drformsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/drformsh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/drformsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/drformsh.cxx Wed Apr 10 09:20:16 2013
@@ -35,6 +35,7 @@
#include <sfx2/app.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svl/srchitem.hxx>
#include <svx/fmglob.hxx>
#include <svx/svdouno.hxx>
@@ -262,11 +263,9 @@ SwDrawFormShell::SwDrawFormShell(SwView
SetHelpId(SW_DRAWFORMSHELL);
GetShell().NoEdit(sal_True);
SetName(String::CreateFromAscii("DrawForm"));
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Form));
}
SwDrawFormShell::~SwDrawFormShell()
{
}
-
-
-
Modified: openoffice/trunk/main/sw/source/ui/shells/drwbassh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/drwbassh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/drwbassh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/drwbassh.cxx Wed Apr 10 09:20:16 2013
@@ -382,6 +382,10 @@ void SwDrawBaseShell::Execute(SfxRequest
}
}
+ else
+ {
+ pSdrView->SetGeoAttrToMarked( *pArgs );
+ }
}
}
break;
@@ -770,9 +774,19 @@ void SwDrawBaseShell::GetState(SfxItemSe
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
+
+void SwDrawBaseShell::GetDrawAttrStateForIFBX( SfxItemSet& rSet )
+{
+ SwWrtShell *pSh = &GetShell();
+ SdrView* pSdrView = pSh->GetDrawView();
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ if( rMarkList.GetMark(0) != 0 )
+ {
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();//OST_IFBX@WL2
+ SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked());
+ rSet.Put(aNewAttr,false);
+ }
+}
sal_Bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich)
@@ -990,7 +1004,3 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosit
pValidation->nHeight = pValidation->nMaxHeight;
return 0;
}
-
-
-
-
Modified: openoffice/trunk/main/sw/source/ui/shells/drwtxtex.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/drwtxtex.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/drwtxtex.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/drwtxtex.cxx Wed Apr 10 09:20:16 2013
@@ -34,6 +34,8 @@
#include <tools/shl.hxx>
#include <svx/svdview.hxx>
#include <editeng/spltitem.hxx>
+#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
#include <editeng/orphitem.hxx>
#include <editeng/brkitem.hxx>
#include <editeng/widwitem.hxx>
@@ -236,6 +238,33 @@ void SwDrawTextShell::Execute( SfxReques
case SID_ATTR_PARA_ADJUST_BLOCK:
aNewAttr.Put(SvxAdjustItem(SVX_ADJUST_BLOCK, EE_PARA_JUST));
break;
+ case SID_ATTR_PARA_LRSPACE:
+ {
+ SvxLRSpaceItem aParaMargin((const SvxLRSpaceItem&)rReq.
+ GetArgs()->Get(nSlot));
+ aParaMargin.SetWhich( EE_PARA_LRSPACE );
+ aNewAttr.Put(aParaMargin);
+ rReq.Done();
+ }
+ break;
+ case SID_ATTR_PARA_LINESPACE:
+ {
+ SvxLineSpacingItem aLineSpace = (const SvxLineSpacingItem&)pNewAttrs->Get(
+ GetPool().GetWhich(nSlot));
+ aLineSpace.SetWhich( EE_PARA_SBL );
+ aNewAttr.Put( aLineSpace );
+ rReq.Done();
+ }
+ break;
+ case SID_ATTR_PARA_ULSPACE:
+ {
+ SvxULSpaceItem aULSpace = (const SvxULSpaceItem&)pNewAttrs->Get(
+ GetPool().GetWhich(nSlot));
+ aULSpace.SetWhich( EE_PARA_ULSPACE );
+ aNewAttr.Put( aULSpace );
+ rReq.Done();
+ }
+ break;
case SID_ATTR_PARA_LINESPACE_10:
{
@@ -286,6 +315,7 @@ void SwDrawTextShell::Execute( SfxReques
}
break;
+ case SID_CHAR_DLG_EFFECT:
case SID_CHAR_DLG:
case SID_CHAR_DLG_FOR_PARAGRAPH:
{
@@ -317,6 +347,10 @@ void SwDrawTextShell::Execute( SfxReques
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg( pView->GetWindow(), *pView, aDlgAttr, DLG_CHAR,0, sal_True );
DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ if (nSlot == SID_CHAR_DLG_EFFECT)
+ {
+ pDlg->SetCurPageId(TP_CHAR_EXT);
+ }
sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet )
{
@@ -635,6 +669,49 @@ ASK_ADJUST:
}
break;
+ case SID_ATTR_PARA_LRSPACE:
+ {
+ SfxItemState eState = aEditAttr.GetItemState(EE_PARA_LRSPACE);
+ if( eState >= SFX_ITEM_DEFAULT )
+ {
+ SvxLRSpaceItem aLR = (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE );
+ aLR.SetWhich(SID_ATTR_PARA_LRSPACE);
+ rSet.Put(aLR);
+ }
+ else
+ rSet.InvalidateItem(nSlotId);
+ nSlotId = 0;
+ }
+ break;
+ case SID_ATTR_PARA_LINESPACE:
+ {
+ SfxItemState eState = aEditAttr.GetItemState(EE_PARA_SBL);
+ if( eState >= SFX_ITEM_DEFAULT )
+ {
+ SvxLineSpacingItem aLR = (const SvxLineSpacingItem&) aEditAttr.Get( EE_PARA_SBL );
+ rSet.Put(aLR);
+ }
+ else
+ rSet.InvalidateItem(nSlotId);
+ nSlotId = 0;
+ }
+ break;
+ case SID_ATTR_PARA_ULSPACE:
+ {
+ SfxItemState eState = aEditAttr.GetItemState(EE_PARA_ULSPACE);
+ if( eState >= SFX_ITEM_DEFAULT )
+ {
+ SvxULSpaceItem aULSpace = (const SvxULSpaceItem&) aEditAttr.Get( EE_PARA_ULSPACE );
+ aULSpace.SetWhich(SID_ATTR_PARA_ULSPACE);
+ rSet.Put(aULSpace);
+ }
+ else
+ rSet.InvalidateItem(nSlotId);
+ Invalidate(SID_ATTR_PARA_ULSPACE);
+ nSlotId = 0;
+ }
+ break;
+
case SID_ATTR_PARA_LINESPACE_10: nLSpace = 100; goto ASK_LINESPACE;
case SID_ATTR_PARA_LINESPACE_15: nLSpace = 150; goto ASK_LINESPACE;
case SID_ATTR_PARA_LINESPACE_20: nLSpace = 200; goto ASK_LINESPACE;
Modified: openoffice/trunk/main/sw/source/ui/shells/drwtxtsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/drwtxtsh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/drwtxtsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/drwtxtsh.cxx Wed Apr 10 09:20:16 2013
@@ -42,6 +42,7 @@
#include <sfx2/bindings.hxx>
#include <svx/fontwork.hxx>
#include <sfx2/request.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svl/whiter.hxx>
#include <editeng/outliner.hxx>
#include <editeng/editstat.hxx>
@@ -155,6 +156,7 @@ SwDrawTextShell::SwDrawTextShell(SwView
rSh.NoEdit(sal_True);
SetName(String::CreateFromAscii("ObjectText"));
SetHelpId(SW_DRWTXTSHELL);
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_DrawText));
}
/*--------------------------------------------------------------------
@@ -358,7 +360,7 @@ void SwDrawTextShell::GetFormTextState(S
else
{
if ( pDlg )
- pDlg->SetColorTable(XColorTable::GetStdColorTable());
+ pDlg->SetColorTable(XColorList::GetStdColorList());
pDrView->GetAttributes( rSet );
}
@@ -572,6 +574,28 @@ void SwDrawTextShell::ExecDraw(SfxReques
}
}
break;
+ case SID_TABLE_VERT_NONE:
+ case SID_TABLE_VERT_CENTER:
+ case SID_TABLE_VERT_BOTTOM:
+ {
+ sal_uInt16 nSId = rReq.GetSlot();
+ if (pSdrView->AreObjectsMarked())
+ {
+ SdrTextVertAdjust eTVA = SDRTEXTVERTADJUST_TOP;
+ if (nSId == SID_TABLE_VERT_CENTER)
+ eTVA = SDRTEXTVERTADJUST_CENTER;
+ else if (nSId == SID_TABLE_VERT_BOTTOM)
+ eTVA = SDRTEXTVERTADJUST_BOTTOM;
+
+ SfxItemSet aNewAttr( pSdrView->GetModel()->GetItemPool() );
+ pSdrView->GetAttributes( aNewAttr );
+ aNewAttr.Put(SdrTextVertAdjustItem(eTVA));
+ pSdrView->SetAttributes(aNewAttr);
+ rReq.Done();
+ }
+
+ }
+ break;
default:
ASSERT(!this, "unexpected slot-id");
@@ -893,5 +917,53 @@ void SwDrawTextShell::InsertSymbol(SfxRe
return &pOutliner->GetUndoManager();
}
+void SwDrawTextShell::GetStatePropPanelAttr(SfxItemSet &rSet)
+{
+ SfxWhichIter aIter( rSet );
+ sal_uInt16 nWhich = aIter.FirstWhich();
+
+ SwWrtShell &rSh = GetShell();
+ pSdrView = rSh.GetDrawView();
+ SfxItemSet aAttrs( pSdrView->GetModel()->GetItemPool() );
+ pSdrView->GetAttributes( aAttrs );
+
+ while ( nWhich )
+ {
+ sal_uInt16 nSlotId = SfxItemPool::IsWhich(nWhich)
+ ? GetPool().GetSlotId(nWhich)
+ : nWhich;
+ switch ( nSlotId )
+ {
+ case SID_TABLE_VERT_NONE:
+ case SID_TABLE_VERT_CENTER:
+ case SID_TABLE_VERT_BOTTOM:
+ sal_Bool bContour = sal_False;
+ SfxItemState eConState = aAttrs.GetItemState( SDRATTR_TEXT_CONTOURFRAME );
+ if( eConState != SFX_ITEM_DONTCARE )
+ {
+ bContour = ( ( const SdrTextContourFrameItem& )aAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue();
+ }
+ if (bContour) break;
+
+ SfxItemState eVState = aAttrs.GetItemState( SDRATTR_TEXT_VERTADJUST );
+ //SfxItemState eHState = aAttrs.GetItemState( SDRATTR_TEXT_HORZADJUST );
+ //if(SFX_ITEM_DONTCARE != eVState && SFX_ITEM_DONTCARE != eHState)
+ if(SFX_ITEM_DONTCARE != eVState)
+ {
+ SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ sal_Bool bSet = nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP||
+ nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER ||
+ nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM;
+ rSet.Put(SfxBoolItem(nSlotId, bSet));
+ }
+ else
+ {
+ rSet.Put(SfxBoolItem(nSlotId, sal_False));
+ }
+ break;
+ }
+ nWhich = aIter.NextWhich();
+ }
+}
Modified: openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx Wed Apr 10 09:20:16 2013
@@ -35,6 +35,8 @@
#include <svl/rectitem.hxx>
#include <svl/ptitem.hxx>
#include <svl/stritem.hxx>
+#include <svl/intitem.hxx>
+#include <svl/eitem.hxx>
#include <editeng/colritem.hxx>
#include <editeng/bolnitem.hxx>
#include <editeng/boxitem.hxx>
@@ -42,6 +44,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <sfx2/objface.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svx/hlnkitem.hxx>
// --> OD 2009-07-07 #i73249#
#include <svx/svdview.hxx>
@@ -382,7 +385,38 @@ void SwFrameShell::Execute(SfxRequest &r
}
}
break;
- case FN_FORMAT_FRAME_DLG:
+
+ case SID_ATTR_TRANSFORM:
+ {
+ bool bApplyNewSize = false;
+
+ Size aNewSize = aMgr.GetSize();
+ if ( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_WIDTH, sal_False, &pItem ) )
+ {
+ aNewSize.setWidth( static_cast< const SfxUInt32Item* >(pItem)->GetValue() );
+ bApplyNewSize = true;
+ }
+
+ if ( SFX_ITEM_SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_HEIGHT, sal_False, &pItem ) )
+ {
+ aNewSize.setHeight( static_cast< const SfxUInt32Item* >(pItem)->GetValue() );
+ bApplyNewSize = true;
+ }
+
+ if ( bApplyNewSize )
+ {
+ aMgr.SetSize( aNewSize );
+ }
+ else
+ {
+ bUpdateMgr = sal_False;
+ }
+
+ }
+ break;
+
+ case FN_FORMAT_FRAME_DLG:
+ case FN_PROPERTY_WRAP_DLG:
{
const int nSel = rSh.GetSelectionType();
if (nSel & nsSelectionType::SEL_GRF)
@@ -392,34 +426,31 @@ void SwFrameShell::Execute(SfxRequest &r
}
else
{
- SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
- FN_GET_PRINT_AREA, FN_GET_PRINT_AREA,
- SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
- SID_ATTR_BRUSH, SID_ATTR_BRUSH,
- SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
- FN_SURROUND, FN_HORI_ORIENT,
- FN_SET_FRM_NAME, FN_SET_FRM_NAME,
- FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO,
- SID_DOCFRAME, SID_DOCFRAME,
- SID_HTML_MODE, SID_HTML_MODE,
- FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
+ SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
+ FN_GET_PRINT_AREA, FN_GET_PRINT_AREA,
+ SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
+ SID_ATTR_BRUSH, SID_ATTR_BRUSH,
+ SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
+ FN_SURROUND, FN_HORI_ORIENT,
+ FN_SET_FRM_NAME, FN_SET_FRM_NAME,
+ FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO,
+ SID_DOCFRAME, SID_DOCFRAME,
+ SID_HTML_MODE, SID_HTML_MODE,
+ FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT,
FN_OLE_IS_MATH, FN_OLE_IS_MATH,
FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT,
0);
- const SwViewOption* pVOpt = rSh.GetViewOptions();
- if(nSel & nsSelectionType::SEL_OLE)
+ const SwViewOption* pVOpt = rSh.GetViewOptions();
+ if(nSel & nsSelectionType::SEL_OLE)
aSet.Put( SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()) );
- aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
- aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
+ aSet.Put(SfxUInt16Item(SID_HTML_MODE, ::GetHtmlMode(GetView().GetDocShell())));
+ aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if( nSel & nsSelectionType::SEL_OLE )
{
- // --> OD 2009-07-13 #i73249#
-// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
- // <--
}
const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE);
@@ -468,6 +499,11 @@ void SwFrameShell::Execute(SfxRequest &r
nDefPage);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
+ if ( nSlot == FN_PROPERTY_WRAP_DLG )
+ {
+ pDlg->SetCurPageId(TP_FRM_WRAP);
+ }
+
if ( pDlg->Execute() )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
@@ -634,21 +670,22 @@ void SwFrameShell::Execute(SfxRequest &r
}
break;
// <--
- default:
- ASSERT( !this, "falscher Dispatcher" );
- return;
- }
- // Vorlagen-AutoUpdate
- SwFrmFmt* pFmt = rSh.GetCurFrmFmt();
- if ( bUpdateMgr )
- {
- if(bCopyToFmt && pFmt && pFmt->IsAutoUpdateFmt())
- {
- rSh.AutoUpdateFrame(pFmt, aMgr.GetAttrSet());
- }
- else
- aMgr.UpdateFlyFrm();
- }
+ default:
+ ASSERT( !this, "falscher Dispatcher" );
+ return;
+ }
+ if ( bUpdateMgr )
+ {
+ SwFrmFmt* pFmt = rSh.GetCurFrmFmt();
+ if ( bCopyToFmt && pFmt && pFmt->IsAutoUpdateFmt() )
+ {
+ rSh.AutoUpdateFrame(pFmt, aMgr.GetAttrSet());
+ }
+ else
+ {
+ aMgr.UpdateFlyFrm();
+ }
+ }
}
@@ -862,14 +899,48 @@ void SwFrameShell::GetState(SfxItemSet&
if ( bParentCntProt )
rSet.DisableItem( nWhich );
break;
+
+ case SID_ATTR_TRANSFORM:
+ {
+ rSet.DisableItem( nWhich );
+ }
+ break;
+
+ case SID_ATTR_TRANSFORM_PROTECT_SIZE:
+ {
+ const sal_uInt8 eProtection = rSh.IsSelObjProtected( FLYPROTECT_SIZE );
+ if ( ( eProtection & FLYPROTECT_CONTENT ) ||
+ ( eProtection & FLYPROTECT_SIZE ) )
+ {
+ rSet.Put( SfxBoolItem( SID_ATTR_TRANSFORM_PROTECT_SIZE, sal_True ) );
+ }
+ else
+ {
+ rSet.Put( SfxBoolItem( SID_ATTR_TRANSFORM_PROTECT_SIZE, sal_False ) );
+ }
+ }
+ break;
+
+ case SID_ATTR_TRANSFORM_WIDTH:
+ {
+ rSet.Put( SfxUInt32Item( SID_ATTR_TRANSFORM_WIDTH, aMgr.GetSize().getWidth() ) );
+ }
+ break;
+
+ case SID_ATTR_TRANSFORM_HEIGHT:
+ {
+ rSet.Put( SfxUInt32Item( SID_ATTR_TRANSFORM_HEIGHT, aMgr.GetSize().getHeight() ) );
+ }
+ break;
+
case FN_FORMAT_FRAME_DLG:
{
const int nSel = rSh.GetSelectionType();
if ( bParentCntProt || nSel & nsSelectionType::SEL_GRF)
- rSet.DisableItem( nWhich );
+ rSet.DisableItem( nWhich );
}
break;
- // --> OD 2009-07-07 #i73249#
+
case FN_TITLE_DESCRIPTION_SHAPE:
{
SwWrtShell &rWrtSh = GetShell();
@@ -882,14 +953,14 @@ void SwFrameShell::GetState(SfxItemSet&
}
break;
- // <--
- default:
- /* do nothing */;
- break;
- }
- nWhich = aIter.NextWhich();
- }
- }
+
+ default:
+ /* do nothing */;
+ break;
+ }
+ nWhich = aIter.NextWhich();
+ }
+ }
}
/*--------------------------------------------------------------------
@@ -906,6 +977,8 @@ SwFrameShell::SwFrameShell(SwView &_rVie
/* #96392# Use this to announce it is the frame shell who creates the
selection. */
SwTransferable::CreateSelection( _rView.GetWrtShell(), (ViewShell *) this );
+
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Frame));
}
SwFrameShell::~SwFrameShell()
@@ -1148,4 +1221,3 @@ void SwFrameShell::StateInsert(SfxItemS
if ((nSel & nsSelectionType::SEL_GRF) || (nSel & nsSelectionType::SEL_OLE))
rSet.DisableItem(FN_INSERT_FRAME);
}
-
Modified: openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx Wed Apr 10 09:20:16 2013
@@ -43,6 +43,7 @@
#include <editeng/sizeitem.hxx>
#include <editeng/protitem.hxx>
#include <sfx2/request.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svl/srchitem.hxx>
#include <svx/htmlmode.hxx>
#include <svx/sdgluitm.hxx>
@@ -113,6 +114,7 @@ void SwGrfShell::Execute(SfxRequest &rRe
break;
case SID_INSERT_GRAPHIC:
case FN_FORMAT_GRAFIC_DLG:
+ case FN_PROPERTY_WRAP_DLG:
{
SwFlyFrmAttrMgr aMgr( sal_False, &rSh, rSh.IsFrmSelected() ?
FRMMGR_TYPE_NONE : FRMMGR_TYPE_GRF);
@@ -149,10 +151,7 @@ void SwGrfShell::Execute(SfxRequest &rRe
aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if ( nSlot == FN_FORMAT_GRAFIC_DLG )
{
- // --> OD 2009-07-13 #i73249#
-// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
- // <--
}
pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT);
@@ -230,6 +229,10 @@ void SwGrfShell::Execute(SfxRequest &rRe
GetView().GetWindow(),
aSet, sal_False, DLG_FRM_GRF);
DBG_ASSERT(pDlg, "Dialogdiet fail!");
+
+ if (nSlot == FN_PROPERTY_WRAP_DLG)
+ pDlg->SetCurPageId(TP_FRM_WRAP);
+
if( pDlg->Execute() )
{
rSh.StartAllAction();
@@ -381,12 +384,14 @@ void SwGrfShell::ExecAttr( SfxRequest &r
{
case FN_FLIP_VERT_GRAFIC:
case FN_FLIP_HORZ_GRAFIC:
+ case SID_FLIP_VERTICAL:
+ case SID_FLIP_HORIZONTAL:
{
GetShell().GetCurAttr( aGrfSet );
SwMirrorGrf aMirror( (SwMirrorGrf&)aGrfSet.Get(
RES_GRFATR_MIRRORGRF ) );
sal_uInt16 nMirror = aMirror.GetValue();
- if( FN_FLIP_VERT_GRAFIC == nSlot )
+ if( FN_FLIP_VERT_GRAFIC == nSlot || nSlot==SID_FLIP_VERTICAL )
switch( nMirror )
{
case RES_MIRROR_GRAPH_DONT: nMirror = RES_MIRROR_GRAPH_VERT;
@@ -692,4 +697,5 @@ SwGrfShell::SwGrfShell(SwView &_rView) :
{
SetName(String::CreateFromAscii("Graphic"));
SetHelpId(SW_GRFSHELL);
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Graphic));
}
Modified: openoffice/trunk/main/sw/source/ui/shells/mediash.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/mediash.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/mediash.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/mediash.cxx Wed Apr 10 09:20:16 2013
@@ -75,6 +75,7 @@
#endif
#include <sfx2/objface.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <svx/svdomedia.hxx>
#include <svx/sdr/contact/viewcontactofsdrmediaobj.hxx>
#include <avmedia/mediaitem.hxx>
@@ -215,4 +216,5 @@ SwMediaShell::SwMediaShell(SwView &_rVie
{
SetName(String::CreateFromAscii("Media Playback"));
SetHelpId(SW_MEDIASHELL);
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Media));
}
Modified: openoffice/trunk/main/sw/source/ui/shells/olesh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/olesh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/olesh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/olesh.cxx Wed Apr 10 09:20:16 2013
@@ -29,6 +29,7 @@
#include <sfx2/request.hxx>
#include <sfx2/objface.hxx>
#include <sfx2/objitem.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <wrtsh.hxx>
#include <view.hxx>
#ifndef _HELPID_H
@@ -71,6 +72,5 @@ SwOleShell::SwOleShell(SwView &_rView) :
{
SetName(String::CreateFromAscii("Object"));
SetHelpId(SW_OLESHELL);
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_OLE));
}
-
-
Modified: openoffice/trunk/main/sw/source/ui/shells/slotadd.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/slotadd.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/slotadd.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/slotadd.cxx Wed Apr 10 09:20:16 2013
@@ -137,6 +137,11 @@
#define SvxDrawBezierItem SfxAllEnumItem
#define avmedia_MediaItem ::avmedia::MediaItem
+#include <svx/xflftrit.hxx>
+#include <svx/xlncapit.hxx>
+#include <svx/xlinjoit.hxx>
+#include <svx/AffineMatrixItem.hxx>
+
#define SFX_TYPEMAP
#include <sfx2/msg.hxx>
#include "swslots.hxx"
Modified: openoffice/trunk/main/sw/source/ui/shells/tabsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/tabsh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/tabsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/tabsh.cxx Wed Apr 10 09:20:16 2013
@@ -54,6 +54,7 @@
#include <sfx2/request.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/objface.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <fmtornt.hxx>
@@ -1178,17 +1179,18 @@ void SwTableShell::Execute(SfxRequest &r
aMgr.ColWidthDlg(GetView().GetWindow());
}
break;
- case FN_TABLE_VERT_NONE:
- case FN_TABLE_VERT_CENTER:
- case FN_TABLE_VERT_BOTTOM:
+ case SID_TABLE_VERT_NONE:
+ case SID_TABLE_VERT_CENTER:
+ case SID_TABLE_VERT_BOTTOM:
{
- sal_uInt16 nAlign = nSlot == FN_TABLE_VERT_NONE ?
+ sal_uInt16 nAlign = nSlot == SID_TABLE_VERT_NONE ?
text::VertOrientation::NONE :
- nSlot == FN_TABLE_VERT_CENTER ?
+ nSlot == SID_TABLE_VERT_CENTER ?
text::VertOrientation::CENTER : text::VertOrientation::BOTTOM;
rSh.SetBoxAlign(nAlign);
- bCallDone = sal_True;
- }
+ bCallDone = sal_True;
+
+ }
break;
case SID_ATTR_PARA_SPLIT:
@@ -1321,17 +1323,18 @@ void SwTableShell::GetState(SfxItemSet &
case RES_UL_SPACE:
rSet.Put(pFmt->GetULSpace());
break;
- case FN_TABLE_VERT_NONE:
- case FN_TABLE_VERT_CENTER:
- case FN_TABLE_VERT_BOTTOM:
- {
- sal_uInt16 nAlign = rSh.GetBoxAlign();
- sal_Bool bSet = (nSlot == FN_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE) ||
- (nSlot == FN_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER) ||
- (nSlot == FN_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM);
- rSet.Put(SfxBoolItem(nSlot, bSet));
- }
- break;
+
+ case SID_TABLE_VERT_NONE:
+ case SID_TABLE_VERT_CENTER:
+ case SID_TABLE_VERT_BOTTOM:
+ {
+ sal_uInt16 nAlign = rSh.GetBoxAlign();
+ sal_Bool bSet = nSlot == SID_TABLE_VERT_NONE && nAlign == text::VertOrientation::NONE||
+ nSlot == SID_TABLE_VERT_CENTER && nAlign == text::VertOrientation::CENTER ||
+ nSlot == SID_TABLE_VERT_BOTTOM && nAlign == text::VertOrientation::BOTTOM;
+ rSet.Put(SfxBoolItem(nSlot, bSet));
+ }
+ break;
case FN_TABLE_MODE_FIX :
case FN_TABLE_MODE_FIX_PROP :
@@ -1433,6 +1436,7 @@ SwTableShell::SwTableShell(SwView &_rVie
{
SetName(String::CreateFromAscii("Table"));
SetHelpId(SW_TABSHELL);
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Table));
}
/*--------------------------------------------------------------------
@@ -1591,4 +1595,3 @@ void SwTableShell::ExecNumberFormat(SfxR
}
}
-
Modified: openoffice/trunk/main/sw/source/ui/shells/textsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/textsh.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/textsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/textsh.cxx Wed Apr 10 09:20:16 2013
@@ -108,6 +108,7 @@
#define TextFont
#define DropCap
#include <sfx2/msg.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
#include <swslots.hxx>
#include <SwRewriter.hxx>
#include <comcore.hrc>
@@ -1027,6 +1028,7 @@ SwTextShell::SwTextShell(SwView &_rView)
{
SetName(String::CreateFromAscii("Text"));
SetHelpId(SW_TEXTSHELL);
+ SfxShell::SetContextName(sfx2::sidebar::EnumContext::GetContextName(sfx2::sidebar::EnumContext::Context_Text));
}
/*--------------------------------------------------------------------
@@ -1214,5 +1216,3 @@ void SwTextShell::InsertSymbol( SfxReque
}
}
}
-
-
Modified: openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/textsh1.cxx Wed Apr 10 09:20:16 2013
@@ -126,7 +126,19 @@
#include <sfx2/objface.hxx>
#include <langhelper.hxx>
+#ifndef _NBDTMGFACT_HXX
+#include <svx/nbdtmgfact.hxx>
+#endif
+#ifndef _NBDTMG_HXX
+#include <svx/nbdtmg.hxx>
+#endif
+
+
+#include <numrule.hxx>
+
+
using namespace ::com::sun::star;
+using namespace svx::sidebar;
void lcl_CharDialog( SwWrtShell &rWrtSh, sal_Bool bUseDialog, sal_uInt16 nSlot,const SfxItemSet *pArgs, SfxRequest *pReq )
@@ -185,6 +197,10 @@ void lcl_CharDialog( SwWrtShell &rWrtSh,
if( FN_INSERT_HYPERLINK == nSlot )
pDlg->SetCurPageId(TP_CHAR_URL);
}
+ if (nSlot == SID_CHAR_DLG_EFFECT)
+ {
+ pDlg->SetCurPageId(TP_CHAR_EXT);
+ }
const SfxItemSet* pSet = NULL;
if ( !bUseDialog )
@@ -838,6 +854,7 @@ void SwTextShell::Execute(SfxRequest &rR
// intentionally no break
}
case SID_CHAR_DLG:
+ case SID_CHAR_DLG_EFFECT:
{
lcl_CharDialog( rWrtSh, bUseDialog, nSlot, pArgs, &rReq );
}
@@ -862,6 +879,7 @@ void SwTextShell::Execute(SfxRequest &rR
case FN_NUMBER_NEWSTART_AT :
case FN_FORMAT_DROPCAPS :
case FN_DROP_TEXT:
+ case SID_ATTR_PARA_LRSPACE:
{
sal_uInt16 nWhich = GetPool().GetWhich( nSlot );
if ( pArgs && pArgs->GetItemState( nWhich ) == SFX_ITEM_SET )
@@ -952,7 +970,15 @@ void SwTextShell::Execute(SfxRequest &rR
SfxItemSet* pSet = NULL;
if ( !bUseDialog )
{
- pSet = (SfxItemSet*) pArgs;
+ if ( nSlot == SID_ATTR_PARA_LRSPACE)
+ {
+ SvxLRSpaceItem aParaMargin((const SvxLRSpaceItem&)pArgs->Get(nSlot));
+ aParaMargin.SetWhich( RES_LR_SPACE);
+ aCoreSet.Put(aParaMargin);
+ pSet = &aCoreSet;
+
+ } else
+ pSet = (SfxItemSet*) pArgs;
}
else if ( NULL != pDlg && pDlg->Execute() == RET_OK )
@@ -1023,14 +1049,14 @@ void SwTextShell::Execute(SfxRequest &rR
//SetNumRuleStart(sal_True) restarts the numbering at the value
//that is defined at the starting point of the numbering level
//otherwise the SetNodeNumStart() value determines the start
- //if it's set to something different than USHRT_MAX
+ //if it's set to something different than (sal_uInt16)0xFFFF
sal_Bool bStart = ((SfxBoolItem&)pSet->Get(FN_NUMBER_NEWSTART)).GetValue();
// --> OD 2007-06-11 #b6560525#
- // Default value for restart value has to be USHRT_MAX
+ // Default value for restart value has to be (sal_uInt16)0xFFFF
// in order to indicate that the restart value of the list
// style has to be used on restart.
- sal_uInt16 nNumStart = USHRT_MAX;
+ sal_uInt16 nNumStart = (sal_uInt16)0xFFFF;
// <--
if( SFX_ITEM_SET == pSet->GetItemState(FN_NUMBER_NEWSTART_AT) )
{
@@ -1677,6 +1703,51 @@ void SwTextShell::GetState( SfxItemSet &
rSet.DisableItem(nWhich);
}
break;
+ case FN_NUM_NUMBERING_ON:
+ rSet.Put(SfxBoolItem(FN_NUM_NUMBERING_ON,rSh.SelectionHasNumber()));
+ break;
+ case FN_NUM_BULLET_ON:
+ rSet.Put(SfxBoolItem(FN_NUM_BULLET_ON,rSh.SelectionHasBullet()));
+ break;
+ case FN_BUL_NUM_RULE_INDEX:
+ case FN_NUM_NUM_RULE_INDEX:
+ {
+ SwNumRule* pCurRule = (SwNumRule*)(GetShell().GetCurNumRule());
+ sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF;
+ rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX,DEFAULT_NONE));
+ rSet.Put(SfxUInt16Item(FN_BUL_NUM_RULE_INDEX,DEFAULT_NONE));
+ if( pCurRule )
+ {
+ nActNumLvl = GetShell().GetNumLevel();
+ if( nActNumLvl < MAXLEVEL )
+ {
+ nActNumLvl = 1<<nActNumLvl;
+ }
+ SvxNumRule aSvxRule = pCurRule->MakeSvxNumRule();
+ if ( GetShell().HasBullet())
+ {
+ rSet.Put(SfxUInt16Item(FN_BUL_NUM_RULE_INDEX,(sal_uInt16)0xFFFF));
+ rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX,(sal_uInt16)0xFFFF));
+ NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
+ if ( pBullets )
+ {
+ sal_uInt16 nBulIndex = pBullets->GetNBOIndexForNumRule(aSvxRule,nActNumLvl);
+ rSet.Put(SfxUInt16Item(FN_BUL_NUM_RULE_INDEX,nBulIndex));
+ }
+ }else if ( GetShell().HasNumber() )
+ {
+ rSet.Put(SfxUInt16Item(FN_BUL_NUM_RULE_INDEX,(sal_uInt16)0xFFFF));
+ rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX,(sal_uInt16)0xFFFF));
+ NBOTypeMgrBase* pNumbering = NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING);
+ if ( pNumbering )
+ {
+ sal_uInt16 nBulIndex = pNumbering->GetNBOIndexForNumRule(aSvxRule,nActNumLvl);
+ rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX,nBulIndex));
+ }
+ }
+ }
+ }
+ break;
case FN_NUM_CONTINUE:
{
// --> OD 2009-08-26 #i86492#
@@ -1775,7 +1846,7 @@ void SwTextShell::ChangeHeaderOrFooter(
if( !bCrsrSet && bOn )
bCrsrSet = rSh.SetCrsrInHdFt(
- !rStyleName.Len() ? USHRT_MAX : nFrom,
+ !rStyleName.Len() ? (sal_uInt16)0xFFFF : nFrom,
bHeader );
}
}
Modified: openoffice/trunk/main/sw/source/ui/shells/txtattr.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/txtattr.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/txtattr.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/txtattr.cxx Wed Apr 10 09:20:16 2013
@@ -40,6 +40,7 @@
#include <editeng/fhgtitem.hxx>
#include <editeng/adjitem.hxx>
#include <editeng/lspcitem.hxx>
+#include <editeng/lrspitem.hxx>
#include <editeng/udlnitem.hxx>
#include <editeng/escpitem.hxx>
#include <svx/htmlmode.hxx>
@@ -745,6 +746,19 @@ void SwTextShell::GetAttrState(SfxItemSe
rSet.Put(SvxAdjustItem((SvxAdjust)eAdjust, SID_ATTR_PARA_ADJUST ));
nSlot = 0;
break;
+ case SID_ATTR_PARA_LRSPACE:
+ {
+ eState = aCoreSet.GetItemState(RES_LR_SPACE);
+ if( eState >= SFX_ITEM_DEFAULT )
+ {
+ SvxLRSpaceItem aLR = ( (const SvxLRSpaceItem&) aCoreSet.Get( RES_LR_SPACE ) );
+ aLR.SetWhich(SID_ATTR_PARA_LRSPACE);
+ rSet.Put(aLR);
+ }
+ else
+ rSet.InvalidateItem(nSlot);
+ nSlot = 0;
+ }
case SID_ATTR_PARA_LEFT_TO_RIGHT :
case SID_ATTR_PARA_RIGHT_TO_LEFT :
Modified: openoffice/trunk/main/sw/source/ui/shells/txtnum.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/shells/txtnum.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/txtnum.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/txtnum.cxx Wed Apr 10 09:20:16 2013
@@ -46,6 +46,11 @@
#include "swabstdlg.hxx"
#include <globals.hrc>
#include <sfx2/tabdlg.hxx>
+#include <svx/nbdtmg.hxx>
+#include <svx/nbdtmgfact.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
+using namespace svx::sidebar;
void SwTextShell::ExecEnterNum(SfxRequest &rReq)
{
@@ -54,43 +59,64 @@ void SwTextShell::ExecEnterNum(SfxReques
{
case FN_NUM_NUMBERING_ON:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- sal_Bool bMode = !GetShell().HasNumber(); // #i29560#
- if ( pItem )
- bMode = pItem->GetValue();
- else
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
-
- if ( bMode != (GetShell().HasNumber()) ) // #i29560#
- {
- rReq.Done();
- if( bMode )
- GetShell().NumOn();
- else
- GetShell().NumOrBulletOff(); // #i29560#
- }
+ GetShell().StartAllAction();
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
+ sal_Bool bMode = !GetShell().SelectionHasNumber(); // #i29560#
+ if ( pItem )
+ bMode = pItem->GetValue();
+ else
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
+
+ if ( bMode != (GetShell().SelectionHasNumber()) ) // #i29560#
+ {
+ rReq.Done();
+ if( bMode )
+ GetShell().NumOn();
+ else
+ GetShell().NumOrBulletOff(); // #i29560#
+ }
+ sal_Bool bNewResult = GetShell().SelectionHasNumber();
+ if (bNewResult!=bMode) {
+ SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings();
+ SfxBoolItem aItem(FN_NUM_NUMBERING_ON,!bNewResult);
+ rBindings.SetState(aItem);
+ SfxBoolItem aNewItem(FN_NUM_NUMBERING_ON,bNewResult);
+ rBindings.SetState(aNewItem);
+ }
+ GetShell().EndAllAction();
}
break;
case FN_NUM_BULLET_ON:
{
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
- sal_Bool bMode = !GetShell().HasBullet(); // #i29560#
- if ( pItem )
- bMode = pItem->GetValue();
- else
- rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
-
- if ( bMode != (GetShell().HasBullet()) ) // #i29560#
- {
- rReq.Done();
- if( bMode )
- GetShell().BulletOn();
- else
- GetShell().NumOrBulletOff(); // #i29560#
- }
+ GetShell().StartAllAction();
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FN_PARAM_1 , sal_False );
+ sal_Bool bMode = !GetShell().SelectionHasBullet(); // #i29560#
+ if ( pItem )
+ bMode = pItem->GetValue();
+ else
+ rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bMode ) );
+
+ if ( bMode != (GetShell().SelectionHasBullet()) ) // #i29560#
+ {
+ rReq.Done();
+ if( bMode )
+ GetShell().BulletOn();
+ else
+ GetShell().NumOrBulletOff(); // #i29560#
+ }
+ sal_Bool bNewResult = GetShell().SelectionHasBullet();
+ if (bNewResult!=bMode) {
+ SfxBindings& rBindings = GetView().GetViewFrame()->GetBindings();
+ SfxBoolItem aItem(FN_NUM_BULLET_ON,!bNewResult);
+ rBindings.SetState(aItem);
+ SfxBoolItem aNewItem(FN_NUM_BULLET_ON,bNewResult);
+ rBindings.SetState(aNewItem);
+ }
+ GetShell().EndAllAction();
}
break;
case FN_NUMBER_BULLETS:
+ case SID_OUTLINE_BULLET:
{
// --> OD 2008-02-29 #refactorlists#
// // per default sal_True, damit die Schleife im Dialog richtig arbeitet!
@@ -244,4 +270,179 @@ void SwTextShell::ExecEnterNum(SfxReques
}
}
+void SwTextShell::ExecSetNumber(SfxRequest &rReq)
+{
+ SwNumRule aRule( GetShell().GetUniqueNumRuleName(),
+ // --> OD 2008-06-06 #i89178#
+ numfunc::GetDefaultPositionAndSpaceMode() );
+ // <--
+
+ SvxNumRule aSvxRule = aRule.MakeSvxNumRule();
+ const bool bRightToLeft = GetShell().IsInRightToLeftText( 0 );
+
+ if( bRightToLeft )
+ {
+ for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
+ {
+ SvxNumberFormat aFmt( aSvxRule.GetLevel( n ) );
+ /* if ( n && bHtml )
+ {
+ // 1/2" fuer HTML
+ aFmt.SetLSpace(720);
+ aFmt.SetAbsLSpace(n * 720);
+ }*/
+ // --> FME 2005-01-21 #i38904# Default alignment for
+ // numbering/bullet should be rtl in rtl paragraph:
+ if ( bRightToLeft )
+ {
+ aFmt.SetNumAdjust( SVX_ADJUST_RIGHT );
+ }
+ // <--
+ aSvxRule.SetLevel( n, aFmt, sal_False );
+ }
+ aSvxRule.SetFeatureFlag(NUM_ENABLE_EMBEDDED_BMP, sal_False);
+ }
+
+ const SwNumRule* pCurRule = GetShell().GetCurNumRule();
+ sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF;
+ if( pCurRule )
+ {
+ sal_uInt16 nLevel = GetShell().GetNumLevel();
+ if( nLevel < MAXLEVEL )
+ {
+ nActNumLvl = 1<<nLevel;
+ }
+
+ aSvxRule = pCurRule->MakeSvxNumRule();
+
+ //convert type of linked bitmaps from SVX_NUM_BITMAP to (SVX_NUM_BITMAP|LINK_TOKEN)
+ for(sal_uInt16 i = 0; i < aSvxRule.GetLevelCount(); i++)
+ {
+ SvxNumberFormat aFmt(aSvxRule.GetLevel(i));
+ if(SVX_NUM_BITMAP == aFmt.GetNumberingType())
+ {
+ const SvxBrushItem* pBrush = aFmt.GetBrush();
+ const String* pLinkStr;
+ if(pBrush &&
+ 0 != (pLinkStr = pBrush->GetGraphicLink()) &&
+ pLinkStr->Len())
+ aFmt.SetNumberingType(SvxExtNumType(SVX_NUM_BITMAP|LINK_TOKEN));
+ aSvxRule.SetLevel(i, aFmt, aSvxRule.Get(i) != 0);
+ }
+ }
+ }
+
+
+ switch(rReq.GetSlot())
+ {
+ case FN_SVX_SET_NUMBER:
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SfxUInt16Item, FN_SVX_SET_NUMBER , sal_False );
+ if (pItem)
+ {
+ sal_uInt16 nIdx = pItem->GetValue();
+ if (nIdx==DEFAULT_NONE) {
+ GetShell().DelNumRules();
+ break;
+ }
+ --nIdx;
+
+ NBOTypeMgrBase* pNumbering = NBOutlineTypeMgrFact::CreateInstance(eNBOType::NUMBERING);
+ if ( pNumbering )
+ {
+ SwNumRule aTmpRule( GetShell().GetUniqueNumRuleName(),
+ numfunc::GetDefaultPositionAndSpaceMode() );
+
+ SvxNumRule aTempRule = aTmpRule.MakeSvxNumRule();
+ //Sym3_2508, set unit attribute to NB Manager
+ SfxItemSet aSet(GetPool(),
+ SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
+ 0 );
+ aSet.Put(SvxNumBulletItem(aTempRule));
+ pNumbering->SetItems(&aSet);
+ pNumbering->ApplyNumRule(aTempRule,nIdx,nActNumLvl);
+
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < aSvxRule.GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aFmt(aTempRule.GetLevel(i));
+ aSvxRule.SetLevel(i, aFmt);
+ }
+ nMask <<= 1 ;
+ }
+
+ aSvxRule.UnLinkGraphics();
+ SwNumRule aSetRule( pCurRule
+ ? pCurRule->GetName()
+ : GetShell().GetUniqueNumRuleName(),
+ numfunc::GetDefaultPositionAndSpaceMode() );
+ aSetRule.SetSvxRule( aSvxRule, GetShell().GetDoc());
+
+ aSetRule.SetAutoRule( sal_True );
+ const bool bCreateList = (pCurRule == 0);
+ GetShell().SetCurNumRule( aSetRule, bCreateList );
+ }
+ //End
+ }
+ break;
+ }
+ case FN_SVX_SET_BULLET:
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SfxUInt16Item, FN_SVX_SET_BULLET , sal_False );
+ if (pItem)
+ {
+ sal_uInt16 nIdx = pItem->GetValue();
+ if (nIdx==DEFAULT_NONE) {
+ GetShell().DelNumRules();
+ break;
+ }
+ nIdx--;
+
+ NBOTypeMgrBase* pBullets = NBOutlineTypeMgrFact::CreateInstance(eNBOType::MIXBULLETS);
+ if ( pBullets )
+ {
+ SwNumRule aTmpRule( GetShell().GetUniqueNumRuleName(),
+ numfunc::GetDefaultPositionAndSpaceMode() );
+
+ SvxNumRule aTempRule = aTmpRule.MakeSvxNumRule();
+ //Sym3_2508, set unit attribute to NB Manager
+ SfxItemSet aSet(GetPool(),
+ SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
+ 0 );
+ aSet.Put(SvxNumBulletItem(aTempRule));
+ pBullets->SetItems(&aSet);
+
+ //SvxNumRule aTempRule( 0, 10, false );
+ pBullets->ApplyNumRule(aTempRule,nIdx,nActNumLvl);
+ sal_uInt16 nMask = 1;
+ for(sal_uInt16 i = 0; i < aSvxRule.GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aFmt(aTempRule.GetLevel(i));
+ aSvxRule.SetLevel(i, aFmt);
+ }
+ nMask <<= 1;
+ }
+ aSvxRule.UnLinkGraphics();
+
+ SwNumRule aSetRule( pCurRule
+ ? pCurRule->GetName()
+ : GetShell().GetUniqueNumRuleName(),
+ numfunc::GetDefaultPositionAndSpaceMode() );
+
+ aSetRule.SetSvxRule( aSvxRule, GetShell().GetDoc());
+
+ aSetRule.SetAutoRule( sal_True );
+ const bool bCreateList = (pCurRule == 0);
+ GetShell().SetCurNumRule( aSetRule, bCreateList );
+ }
+ //End
+ }
+ }
+ break;
+ }
+}
Modified: openoffice/trunk/main/sw/source/ui/uiview/view0.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uiview/view0.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uiview/view0.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uiview/view0.cxx Wed Apr 10 09:20:16 2013
@@ -43,6 +43,7 @@
#include <sfx2/templdlg.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/bindings.hxx>
+#include <sfx2/sidebar/SidebarChildWindow.hxx>
#include <uivwimp.hxx>
#include <avmedia/mediaplayer.hxx>
//#include <swlinguconfig.hxx>
@@ -109,6 +110,7 @@ SFX_IMPL_INTERFACE( SwView, SfxViewShell
{
SFX_CHILDWINDOW_CONTEXT_REGISTRATION(SID_NAVIGATOR);
SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE);
+ SFX_CHILDWINDOW_REGISTRATION(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SfxTemplateDialogWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SvxSearchDialogWrapper::GetChildWindowId());
SFX_CHILDWINDOW_REGISTRATION(SwSpellDialogChildWindow::GetChildWindowId());
Modified: openoffice/trunk/main/sw/source/ui/uiview/view1.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uiview/view1.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uiview/view1.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uiview/view1.cxx Wed Apr 10 09:20:16 2013
@@ -28,6 +28,7 @@
#include <svx/svdpagv.hxx>
#include <svx/svdview.hxx>
#include <svx/ruler.hxx>
+#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
#include <idxmrk.hxx>
#ifndef _VIEW_HXX
#include <view.hxx>
Modified: openoffice/trunk/main/sw/source/ui/uiview/view2.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uiview/view2.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uiview/view2.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uiview/view2.cxx Wed Apr 10 09:20:16 2013
@@ -1093,9 +1093,9 @@ void __EXPORT SwView::Execute(SfxRequest
case SID_ALIGN_ANY_HCENTER : nAlias = SID_ATTR_PARA_ADJUST_CENTER; break;
case SID_ALIGN_ANY_RIGHT : nAlias = SID_ATTR_PARA_ADJUST_RIGHT; break;
case SID_ALIGN_ANY_JUSTIFIED: nAlias = SID_ATTR_PARA_ADJUST_BLOCK; break;
- case SID_ALIGN_ANY_TOP : nAlias = FN_TABLE_VERT_NONE; break;
- case SID_ALIGN_ANY_VCENTER : nAlias = FN_TABLE_VERT_CENTER; break;
- case SID_ALIGN_ANY_BOTTOM : nAlias = FN_TABLE_VERT_BOTTOM; break;
+ case SID_ALIGN_ANY_TOP : nAlias = SID_TABLE_VERT_NONE; break;
+ case SID_ALIGN_ANY_VCENTER : nAlias = SID_TABLE_VERT_CENTER; break;
+ case SID_ALIGN_ANY_BOTTOM : nAlias = SID_TABLE_VERT_BOTTOM; break;
}
}
else
Modified: openoffice/trunk/main/sw/source/ui/uiview/viewstat.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/uiview/viewstat.cxx?rev=1466396&r1=1466395&r2=1466396&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/uiview/viewstat.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/uiview/viewstat.cxx Wed Apr 10 09:20:16 2013
@@ -389,9 +389,9 @@ void SwView::GetState(SfxItemSet &rSet)
case SID_ALIGN_ANY_HCENTER : nAlias = SID_ATTR_PARA_ADJUST_CENTER; break;
case SID_ALIGN_ANY_RIGHT : nAlias = SID_ATTR_PARA_ADJUST_RIGHT; break;
case SID_ALIGN_ANY_JUSTIFIED: nAlias = SID_ATTR_PARA_ADJUST_BLOCK; break;
- case SID_ALIGN_ANY_TOP : nAlias = FN_TABLE_VERT_NONE; break;
- case SID_ALIGN_ANY_VCENTER : nAlias = FN_TABLE_VERT_CENTER; break;
- case SID_ALIGN_ANY_BOTTOM : nAlias = FN_TABLE_VERT_BOTTOM; break;
+ case SID_ALIGN_ANY_TOP : nAlias = SID_TABLE_VERT_NONE; break;
+ case SID_ALIGN_ANY_VCENTER : nAlias = SID_TABLE_VERT_CENTER; break;
+ case SID_ALIGN_ANY_BOTTOM : nAlias = SID_TABLE_VERT_BOTTOM; break;
}
}
else if(nSelectionType & (nsSelectionType::SEL_DRW))