[Libreoffice-commits] core.git: 2 commits - helpcontent2 svx/source
Armin Le Grand
alg at apache.org
Mon Jul 8 03:27:08 PDT 2013
helpcontent2 | 2
svx/source/sidebar/area/AreaPropertyPanel.cxx | 74 +++++++++++++++++---------
2 files changed, 51 insertions(+), 25 deletions(-)
New commits:
commit f5cf90a534c93eb3285dcada88268dc44e882462
Author: Armin Le Grand <alg at apache.org>
Date: Fri Jul 5 18:02:32 2013 +0000
Resolves: #i122676# Call Execute only once to create only one Undo-ction
(cherry picked from commit 7f983cd3d05ef168f9e828a14307c0d53475c86d)
Change-Id: I61214c07803487804d09f6f2df11ddb42ef0d7d2
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index c089631..4046d42 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -271,8 +271,11 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
mpLbFillAttr->Clear();
SfxObjectShell* pSh = SfxObjectShell::Current();
const XFillStyleItem aXFillStyleItem(eXFS);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
+ // #i122676# Do no longer trigger two Execute calls, one for SID_ATTR_FILL_STYLE
+ // and one for setting the fill attribute itself, but add two SfxPoolItems to the
+ // call to get just one action at the SdrObject and to create only one Undo action, too.
+ // Checked that this works in all apps.
switch( eXFS )
{
case XFILL_NONE:
@@ -281,6 +284,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
mpToolBoxColor->Hide();
mpLbFillType->Selected();
mpLbFillAttr->Disable();
+
+ // #i122676# need to call a single SID_ATTR_FILL_STYLE change
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
break;
}
case XFILL_SOLID:
@@ -290,7 +297,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
const String aTmpStr;
const Color aColor = maLastColor;
const XFillColorItem aXFillColorItem( aTmpStr, aColor );
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
+
+ // #i122676# change FillStyle and Color in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, &aXFillStyleItem, 0L);
break;
}
case XFILL_GRADIENT:
@@ -318,7 +328,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
{
const XGradient aGradient = aItem.GetGradientList()->GetGradient(mnLastPosGradient)->GetGradient();
const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetEntry(mnLastPosGradient), aGradient);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, 0L);
+
+ // #i122676# change FillStyle and Gradient in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, &aXFillStyleItem, 0L);
mpLbFillAttr->SelectEntryPos(mnLastPosGradient);
}
}
@@ -354,7 +367,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
{
const XHatch aHatch = aItem.GetHatchList()->GetHatch(mnLastPosHatch)->GetHatch();
const XFillHatchItem aXFillHatchItem(mpLbFillAttr->GetSelectEntry(), aHatch);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, 0L);
+
+ // #i122676# change FillStyle and Hatch in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, &aXFillStyleItem, 0L);
mpLbFillAttr->SelectEntryPos(mnLastPosHatch);
}
}
@@ -390,7 +406,10 @@ IMPL_LINK( AreaPropertyPanel, SelectFillTypeHdl, ListBox *, pToolBox )
{
const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(mnLastPosBitmap);
const XFillBitmapItem aXFillBitmapItem(mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject());
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, 0L);
+
+ // #i122676# change FillStyle and Bitmap in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, &aXFillStyleItem, 0L);
mpLbFillAttr->SelectEntryPos(mnLastPosBitmap);
}
}
@@ -427,26 +446,21 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
if(pToolBox)
{
- if((XFillStyle) meLastXFS != eXFS)
- {
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
- }
+ // #i122676# dependent from bFillStyleChange, do execute a single or two
+ // changes in one Execute call
+ const bool bFillStyleChange((XFillStyle) meLastXFS != eXFS);
switch(eXFS)
{
case XFILL_SOLID:
- //{
- // //String aTmpStr = mpLbFillAttr->GetSelectEntry();
- // //Color aColor = mpLbFillAttr->GetSelectEntryColor();
- // //if(aColor.GetColor() == 0 && aTmpStr.Equals(String::CreateFromAscii("")))
- // String aTmpStr;
- // Color aColor = maLastColor;
- // XFillColorItem aXFillColorItem( aTmpStr, aColor );
- // GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_COLOR, SFX_CALLMODE_RECORD, &aXFillColorItem, 0L);
- // maLastColor = aColor;
- //}
- break;
-
+ {
+ if(bFillStyleChange)
+ {
+ // #i122676# Single FillStyle change call needed here
+ GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_STYLE, SFX_CALLMODE_RECORD, &aXFillStyleItem, 0L);
+ }
+ break;
+ }
case XFILL_GRADIENT:
{
sal_uInt16 nPos = mpLbFillAttr->GetSelectEntryPos();
@@ -464,7 +478,11 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
{
const XGradient aGradient = aItem.GetGradientList()->GetGradient(nPos)->GetGradient();
const XFillGradientItem aXFillGradientItem(mpLbFillAttr->GetSelectEntry(), aGradient);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem, 0L);
+
+ // #i122676# Change FillStale and Gradinet in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_GRADIENT, SFX_CALLMODE_RECORD, &aXFillGradientItem,
+ bFillStyleChange ? &aXFillStyleItem : 0L, 0L);
}
}
@@ -491,7 +509,11 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
{
const XHatch aHatch = aItem.GetHatchList()->GetHatch(nPos)->GetHatch();
const XFillHatchItem aXFillHatchItem( mpLbFillAttr->GetSelectEntry(), aHatch);
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem, 0L);
+
+ // #i122676# Change FillStale and Hatch in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_HATCH, SFX_CALLMODE_RECORD, &aXFillHatchItem,
+ bFillStyleChange ? &aXFillStyleItem : 0L, 0L);
}
}
@@ -518,7 +540,11 @@ IMPL_LINK( AreaPropertyPanel, SelectFillAttrHdl, ListBox*, pToolBox )
{
const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(nPos);
const XFillBitmapItem aXFillBitmapItem(mpLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject());
- GetBindings()->GetDispatcher()->Execute(SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem, 0L);
+
+ // #i122676# Change FillStale and Bitmap in one call
+ GetBindings()->GetDispatcher()->Execute(
+ SID_ATTR_FILL_BITMAP, SFX_CALLMODE_RECORD, &aXFillBitmapItem,
+ bFillStyleChange ? &aXFillStyleItem : 0L, 0L);
}
}
commit db3fb64e9b2d80cf9cedcf7eef86b5772e98ac3d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 8 11:24:23 2013 +0100
Updated core
Project: help 841203a83dd42ead9e34ec55b1b30c1745143876
diff --git a/helpcontent2 b/helpcontent2
index 489cb91..841203a 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 489cb91bc7d12ce8fd4b2f7b3f6397c7d02a81cf
+Subproject commit 841203a83dd42ead9e34ec55b1b30c1745143876
More information about the Libreoffice-commits
mailing list