Kaydet (Commit) de52e4d0 authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann

correct context switch handling in paragraph property panel and position and size property panel

üst 4a87b75b
......@@ -471,24 +471,19 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe
aLineDist.SaveValue();
sal_uInt16 uCount = aLineDist.GetEntryCount();
const sal_uInt16 uCount = aLineDist.GetEntryCount();
if( uCount == LLINESPACE_FIX + 1 )
{
switch (currentContext.GetCombinedContext())
switch (currentContext.GetCombinedContext_DI())
{
case CombinedEnumContext(Application_Impress, Context_Table):
case CombinedEnumContext(Application_Draw, Context_Table):
case CombinedEnumContext(Application_Writer, Context_DrawText):
case CombinedEnumContext(Application_Calc, Context_DrawText):
case CombinedEnumContext(Application_Draw, Context_DrawText):
case CombinedEnumContext(Application_Impress, Context_DrawText):
case CombinedEnumContext(Application_Writer, Context_Annotation):
case CombinedEnumContext(Application_Draw, Context_Draw):
case CombinedEnumContext(Application_Draw, Context_TextObject):
case CombinedEnumContext(Application_Draw, Context_Graphic):
case CombinedEnumContext(Application_Impress, Context_Draw):
case CombinedEnumContext(Application_Impress, Context_TextObject):
case CombinedEnumContext(Application_Impress, Context_Graphic):
case CombinedEnumContext(Application_DrawImpress, Context_Table):
case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
case CombinedEnumContext(Application_DrawImpress, Context_Draw):
case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
case CombinedEnumContext(Application_Calc, Context_DrawText):
case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
{
aLineDist.RemoveEntry(LLINESPACE_FIX);
}
......@@ -496,11 +491,11 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe
}
else if( uCount == LLINESPACE_FIX)
{
switch (currentContext.GetCombinedContext())
switch (currentContext.GetCombinedContext_DI())
{
case CombinedEnumContext(Application_Writer, Context_Default):
case CombinedEnumContext(Application_Writer, Context_Text):
case CombinedEnumContext(Application_Writer, Context_Table):
case CombinedEnumContext(Application_WriterVariants, Context_Default):
case CombinedEnumContext(Application_WriterVariants, Context_Text):
case CombinedEnumContext(Application_WriterVariants, Context_Table):
{
aLineDist.InsertEntry(String::CreateFromAscii("Fixed"), LLINESPACE_FIX);
}
......
......@@ -1043,12 +1043,11 @@ void PosSizePropertyPanel::executeSize()
SfxUInt32Item aWidthItem( SID_ATTR_TRANSFORM_WIDTH, (sal_uInt32) lWidth);
SfxUInt32Item aHeightItem( SID_ATTR_TRANSFORM_HEIGHT, (sal_uInt32) lHeight);
SfxAllEnumItem aPointItem (SID_ATTR_TRANSFORM_SIZE_POINT, (sal_uInt16)meRP);
const sal_Int32 nCombinedContext(maContext.GetCombinedContext());
const sal_Int32 nCombinedContext(maContext.GetCombinedContext_DI());
if( nCombinedContext == CombinedEnumContext(Application_Writer, Context_Graphic) // mnContextId == PROPERTY_CONTEXT_SW_GRAPHIC
|| nCombinedContext == CombinedEnumContext(Application_Writer, Context_OLE) //mnContextId == PROPERTY_CONTEXT_SW_OLE
if( nCombinedContext == CombinedEnumContext(Application_WriterVariants, Context_Graphic)
|| nCombinedContext == CombinedEnumContext(Application_WriterVariants, Context_OLE)
)
// if( mnContextId == PROPERTY_CONTEXT_SW_GRAPHIC || mnContextId == PROPERTY_CONTEXT_SW_OLE )
{
GetBindings()->GetDispatcher()->Execute(SID_ATTR_TRANSFORM, SFX_CALLMODE_RECORD, &aWidthItem, &aHeightItem, &aPointItem, 0L );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment