Author: alg
Date: Thu Apr 17 16:44:58 2014
New Revision: 1588308
URL: http://svn.apache.org/r1588308
Log:
i124638 support for DrawingLayre FillStyle for GraphicFrames and
EmbeddedObjectFrames in Writer
Modified:
openoffice/trunk/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
openoffice/trunk/main/sw/sdi/_frmsh.sdi
openoffice/trunk/main/sw/source/core/attr/format.cxx
openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx
openoffice/trunk/main/sw/source/core/unocore/unobrushitemhelper.cxx
openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx
openoffice/trunk/main/sw/source/core/unocore/unomap.cxx
openoffice/trunk/main/sw/source/core/unocore/unostyle.cxx
openoffice/trunk/main/sw/source/ui/frmdlg/frmpage.src
openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx
openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx
openoffice/trunk/main/xmloff/inc/xmloff/XMLShapeStyleContext.hxx
openoffice/trunk/main/xmloff/source/draw/XMLShapeStyleContext.cxx
Modified:
openoffice/trunk/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
---
openoffice/trunk/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
(original)
+++
openoffice/trunk/main/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
Thu Apr 17 16:44:58 2014
@@ -348,9 +348,12 @@
Calc, OLE, hidden ;
DrawImpress, 3DObject, visible ;
DrawImpress, Draw, visible ;
+ DrawImpress, Graphic, hidden ;
DrawImpress, TextObject, hidden ;
DrawImpress, OLE, hidden ;
WriterVariants, Draw, visible ;
+ Writer, Graphic, hidden ;
+ Writer, OLE, hidden ;
Writer, Frame, visible ;
</value>
</prop>
Modified: openoffice/trunk/main/sw/sdi/_frmsh.sdi
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/sdi/_frmsh.sdi?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/sdi/_frmsh.sdi (original)
+++ openoffice/trunk/main/sw/sdi/_frmsh.sdi Thu Apr 17 16:44:58 2014
@@ -26,6 +26,7 @@ interface BaseTextFrame
Automation = FALSE;
]
{
+ //UUUU
SID_ATTR_FILL_STYLE
[
Export = FALSE;
@@ -34,6 +35,7 @@ interface BaseTextFrame
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ //UUUU
SID_ATTR_FILL_COLOR
[
Export = FALSE;
@@ -42,6 +44,7 @@ interface BaseTextFrame
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ //UUUU
SID_ATTR_FILL_GRADIENT
[
Export = FALSE;
@@ -50,6 +53,7 @@ interface BaseTextFrame
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ //UUUU
SID_ATTR_FILL_HATCH
[
Export = FALSE;
@@ -58,6 +62,7 @@ interface BaseTextFrame
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ //UUUU
SID_ATTR_FILL_BITMAP
[
Export = FALSE;
@@ -66,6 +71,7 @@ interface BaseTextFrame
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ //UUUU
SID_ATTR_FILL_TRANSPARENCE
[
Export = FALSE;
@@ -74,6 +80,7 @@ interface BaseTextFrame
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ //UUUU
SID_ATTR_FILL_FLOATTRANSPARENCE
[
Export = FALSE;
@@ -82,26 +89,31 @@ interface BaseTextFrame
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
+ //UUUU
SID_COLOR_TABLE
[
StateMethod = GetDrawAttrStateTextFrame;
]
+ //UUUU
SID_GRADIENT_LIST
[
StateMethod = GetDrawAttrStateTextFrame;
]
+ //UUUU
SID_HATCH_LIST
[
StateMethod = GetDrawAttrStateTextFrame;
]
+ //UUUU
SID_BITMAP_LIST
[
StateMethod = GetDrawAttrStateTextFrame;
]
+ //UUUU
SID_ATTRIBUTES_AREA
[
ExecMethod = ExecDrawDlgTextFrame;
Modified: openoffice/trunk/main/sw/source/core/attr/format.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/attr/format.cxx?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/attr/format.cxx (original)
+++ openoffice/trunk/main/sw/source/core/attr/format.cxx Thu Apr 17 16:44:58
2014
@@ -586,16 +586,27 @@ sal_Bool SwFmt::SetFmtAttr( const SfxIte
sal_Bool bRet = sal_False;
+ //UUUU Usel local copy to be able to apply needed changes, e.g. call
+ // CheckForUniqueItemForLineFillNameOrIndex which is needed for
NameOrIndex stuff
+ SfxItemSet aTempSet(rSet);
+
+ //UUUU Need to check for unique item for DrawingLayer items of type
NameOrIndex
+ // and evtl. correct that item to ensure unique names for that type. This
call may
+ // modify/correct entries inside of the given SfxItemSet
+ if(GetDoc())
+ {
+ GetDoc()->CheckForUniqueItemForLineFillNameOrIndex(aTempSet);
+ }
+
//UUUU
if(RES_FLYFRMFMT == Which())
{
const SfxPoolItem* pSource = 0;
- if(SFX_ITEM_SET == rSet.GetItemState(RES_BACKGROUND, sal_False,
&pSource))
+ if(SFX_ITEM_SET == aTempSet.GetItemState(RES_BACKGROUND, sal_False,
&pSource))
{
//UUUU FALLBACKBREAKHERE should not be used; instead use
[XATTR_FILL_FIRST .. XATTR_FILL_LAST]
OSL_ENSURE(false, "Do no longer use SvxBrushItem, instead use
[XATTR_FILL_FIRST .. XATTR_FILL_LAST] FillAttributes (simple fallback is in
place and used)");
- SfxItemSet aTempSet(rSet);
// copy all items to be set anyways to a local ItemSet with is
also prepared for the new
// fill attribute ranges [XATTR_FILL_FIRST .. XATTR_FILL_LAST].
Add the attributes
@@ -639,7 +650,7 @@ sal_Bool SwFmt::SetFmtAttr( const SfxIte
( RES_GRFFMTCOLL == nFmtWhich ||
RES_TXTFMTCOLL == nFmtWhich ) ) )
{
- if( 0 != ( bRet = (0 != aSet.Put( rSet ))) )
+ if( 0 != ( bRet = (0 != aSet.Put( aTempSet ))) )
aSet.SetModifyAtAttr( this );
// --> OD 2006-11-22 #i71574#
if ( nFmtWhich == RES_TXTFMTCOLL )
@@ -652,7 +663,7 @@ sal_Bool SwFmt::SetFmtAttr( const SfxIte
{
SwAttrSet aOld( *aSet.GetPool(), aSet.GetRanges() ),
aNew( *aSet.GetPool(), aSet.GetRanges()
);
- bRet = 0 != aSet.Put_BC( rSet, &aOld, &aNew );
+ bRet = 0 != aSet.Put_BC( aTempSet, &aOld, &aNew );
if( bRet )
{
// einige Sonderbehandlungen fuer Attribute
Modified: openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx (original)
+++ openoffice/trunk/main/sw/source/core/layout/paintfrm.cxx Thu Apr 17
16:44:58 2014
@@ -3668,9 +3668,10 @@ void SwFlyFrm::Paint(SwRect const& rRect
//UUUU check for transparency
const FillAttributesPtr
aFillAttributes(pSwFrmFmt->getFillAttributes());
- if(aFillAttributes.get())
+ // check if the new fill attributes are used
+ if(aFillAttributes.get() && aFillAttributes->isUsed())
{
- bPaintCompleteBack = aFillAttributes->isTransparent();
+ bPaintCompleteBack = true;
}
}
else
@@ -4122,7 +4123,7 @@ void SwFrm::PaintShadow( const SwRect& r
void SwFrm::PaintBorderLine( const SwRect& rRect,
const SwRect& rOutRect,
- const SwPageFrm *pPage,
+ const SwPageFrm*
/*pPage*/,
const Color *pColor )
const
{
if ( !rOutRect.IsOver( rRect ) )
Modified: openoffice/trunk/main/sw/source/core/unocore/unobrushitemhelper.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unobrushitemhelper.cxx?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/unocore/unobrushitemhelper.cxx
(original)
+++ openoffice/trunk/main/sw/source/core/unocore/unobrushitemhelper.cxx Thu Apr
17 16:44:58 2014
@@ -133,6 +133,18 @@ void setSvxBrushItemAsFillAttributesToTa
OSL_ENSURE(false, "Could not get Graphic from SvxBrushItem (!)");
}
}
+ else
+ {
+ // GPOS_NONE == rBrush.GetGraphicPos() && 0xff ==
rBrush.GetColor().GetTransparency(),
+ // still need to rescue the color used. There are sequences used on
the UNO API at
+ // import time (OLE. e.g. chart) which first set RGB color
(MID_BACK_COLOR_R_G_B,
+ // color stays transparent) and then set transparency
(MID_BACK_COLOR_TRANSPARENCY)
+ // to zero later. When not saving the color, it will be lost
+ const Color aColor(rBrush.GetColor().GetRGBColor());
+
+ // rToSet.Put(XFillStyleItem(XFILL_NONE));
+ rToSet.Put(XFillColorItem(String(), aColor));
+ }
}
//UUUU
@@ -175,20 +187,24 @@ SvxBrushItem getSvxBrushItemForSolid(con
//UUUU
SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet,
sal_Bool bSearchInParents)
{
- SvxBrushItem aRetval(RES_BACKGROUND);
-
const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem*
>(rSourceSet.GetItem(XATTR_FILLSTYLE, bSearchInParents)));
- if(!pXFillStyleItem)
+ if(!pXFillStyleItem || XFILL_NONE == pXFillStyleItem->GetValue())
{
- return aRetval;
+ // need to rescue the evtl. set RGB color, but use as transparent
color (we have XFILL_NONE)
+ Color aFillColor(static_cast< const XFillColorItem&
>(rSourceSet.Get(XATTR_FILLCOLOR, bSearchInParents)).GetColorValue());
+ aFillColor.SetTransparency(0xff);
+
+ return SvxBrushItem(aFillColor, RES_BACKGROUND);
}
+ SvxBrushItem aRetval(RES_BACKGROUND);
+
switch(pXFillStyleItem->GetValue())
{
case XFILL_NONE:
{
- // done; return default item
+ // already handled above, can not happen again
break;
}
case XFILL_SOLID:
Modified: openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx (original)
+++ openoffice/trunk/main/sw/source/core/unocore/unoframe.cxx Thu Apr 17
16:44:58 2014
@@ -1765,6 +1765,64 @@ void SwXFrame::setPropertyValue(const ::
bDone = true;
}
+ switch(nMemberId)
+ {
+ case MID_NAME:
+ {
+ //UUUU when named items get set, replace these with the
NameOrIndex items
+ // which exist already in the pool
+ switch(pEntry->nWID)
+ {
+ case XATTR_FILLGRADIENT:
+ case XATTR_FILLHATCH:
+ case XATTR_FILLBITMAP:
+ case XATTR_FILLFLOATTRANSPARENCE:
+ {
+ OUString aTempName;
+
+ if(!(aValue >>= aTempName ))
+ {
+ throw lang::IllegalArgumentException();
+ }
+
+ bDone = SvxShape::SetFillAttribute(pEntry->nWID,
aTempName, aSet);
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ break;
+ }
+ case MID_GRAFURL:
+ {
+ //UUUU Bitmap also has the MID_GRAFURL mode where a Bitmap
URL is used
+ switch(pEntry->nWID)
+ {
+ case XATTR_FILLBITMAP:
+ {
+ const Graphic aNullGraphic;
+ XFillBitmapItem aXFillBitmapItem(aSet.GetPool(),
aNullGraphic);
+
+ aXFillBitmapItem.PutValue(aValue, nMemberId);
+ aSet.Put(aXFillBitmapItem);
+ bDone = true;
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+
if(!bDone)
{
m_pPropSet->setPropertyValue(*pEntry, aValue, aSet);
@@ -1831,8 +1889,10 @@ void SwXFrame::setPropertyValue(const ::
{
throw lang::IllegalArgumentException();
}
- else
+ else
+ {
pFmt->SetFmtAttr(aSet);
+ }
}
}
else if(IsDescriptor())
Modified: openoffice/trunk/main/sw/source/core/unocore/unomap.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unomap.cxx?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/unocore/unomap.cxx (original)
+++ openoffice/trunk/main/sw/source/core/unocore/unomap.cxx Thu Apr 17 16:44:58
2014
@@ -297,6 +297,9 @@ SwUnoPropertyMapProvider::~SwUnoProperty
// OD 18.09.2003 #i18732# - add property
// OD 2004-05-05 #i28701# - add property 'WrapInfluenceOnObjPos'
// OD 2009-07-13 #i73249# - add properties 'Title' and 'Description'
+//UUUU all users of COMMON_FRAME_PROPERTIES add the new XATTR_FILL_FIRST,
XATTR_FILL_LAST FillStyle,
+// thus it may be possible to remove the RES_BACKGROUND entries from
SvxBrushItem completely (this includes
+// all using UNO_NAME_BACK_* slots) in the future
#define COMMON_FRAME_PROPERTIES \
{ SW_PROP_NMID(UNO_NAME_ANCHOR_PAGE_NO), RES_ANCHOR,
CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE,
MID_ANCHOR_PAGENUM }, \
{ SW_PROP_NMID(UNO_NAME_ANCHOR_TYPE), RES_ANCHOR,
CPPU_E2T(CPPUTYPE_TXTCNTANCHOR), PROPERTY_NONE,
MID_ANCHOR_ANCHORTYPE}, \
@@ -818,9 +821,10 @@ const SfxItemPropertyMapEntry* SwUnoProp
{ SW_PROP_NMID(UNO_NAME_WRAP_INFLUENCE_ON_POSITION),
RES_WRAP_INFLUENCE_ON_OBJPOS, CPPU_E2T(CPPUTYPE_INT8), PROPERTY_NONE,
MID_WRAP_INFLUENCE},
{ SW_PROP_NMID(UNO_NAME_WRITING_MODE), RES_FRAMEDIR,
CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0 },
- //UUUU adf FillProperties for SW, same as FILL_PROPERTIES
in svx
+ //UUUU added FillProperties for SW, same as
FILL_PROPERTIES in svx
// but need own defines in Writer due to later association
of strings
- // and uno types (see loop at end of this metjhod and
definition of SW_PROP_NMID)
+ // and uno types (see loop at end of this method and
definition of SW_PROP_NMID)
+ // This entry is for adding that properties to style
import/export
FILL_PROPERTIES_SW
{0,0,0,0,0,0}
@@ -1174,9 +1178,10 @@ const SfxItemPropertyMapEntry* SwUnoProp
{ SW_PROP_NMID(UNO_NAME_WIDTH_TYPE),
RES_FRM_SIZE, CPPU_E2T(CPPUTYPE_INT16) ,
PROPERTY_NONE, MID_FRMSIZE_WIDTH_TYPE },
{ SW_PROP_NMID(UNO_NAME_WRITING_MODE), RES_FRAMEDIR,
CPPU_E2T(CPPUTYPE_INT16), PROPERTY_NONE, 0 },
- //UUUU adf FillProperties for SW, same as FILL_PROPERTIES
in svx
+ //UUUU added FillProperties for SW, same as
FILL_PROPERTIES in svx
// but need own defines in Writer due to later association
of strings
- // and uno types (see loop at end of this metjhod and
definition of SW_PROP_NMID)
+ // and uno types (see loop at end of this method and
definition of SW_PROP_NMID)
+ // This entry is for adding that properties to FlyFrame
import/export
FILL_PROPERTIES_SW
{0,0,0,0,0,0}
@@ -1187,7 +1192,10 @@ const SfxItemPropertyMapEntry* SwUnoProp
case PROPERTY_MAP_TEXT_GRAPHIC:
{
static SfxItemPropertyMapEntry aGraphicPropertyMap_Impl[] =
- {
+ { //UUUU
+ // evtl. completely remove SvxBrushItem stuff ()
+ // add support for XATTR_FILL_FIRST, XATTR_FILL_LAST
+ // COMMON_FRAME_PROPERTIES currently hosts the
RES_BACKGROUND entries from SvxBrushItem
COMMON_FRAME_PROPERTIES
{
SW_PROP_NMID(UNO_NAME_SURROUND_CONTOUR), RES_SURROUND,
CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE,
MID_SURROUND_CONTOUR },
{
SW_PROP_NMID(UNO_NAME_CONTOUR_OUTSIDE), RES_SURROUND,
CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE,
MID_SURROUND_CONTOUROUTSIDE },
@@ -1214,6 +1222,13 @@ const SfxItemPropertyMapEntry* SwUnoProp
{
SW_PROP_NMID(UNO_NAME_GRAPHIC_IS_INVERTED), RES_GRFATR_INVERT,
CPPU_E2T(CPPUTYPE_BOOLEAN), 0, 0},
{ SW_PROP_NMID(UNO_NAME_TRANSPARENCY),
RES_GRFATR_TRANSPARENCY, CPPU_E2T(CPPUTYPE_INT16), 0, 0},
{
SW_PROP_NMID(UNO_NAME_GRAPHIC_COLOR_MODE), RES_GRFATR_DRAWMODE,
CPPU_E2T(CPPUTYPE_COLORMODE), 0, 0},
+
+ //UUUU added FillProperties for SW, same as
FILL_PROPERTIES in svx
+ // but need own defines in Writer due to later association
of strings
+ // and uno types (see loop at end of this method and
definition of SW_PROP_NMID)
+ // This entry is for adding that properties to Writer
GraphicObject import/export
+ FILL_PROPERTIES_SW
+
{0,0,0,0,0,0}
};
aMapEntriesArr[nPropertyId] = aGraphicPropertyMap_Impl;
@@ -1222,7 +1237,10 @@ const SfxItemPropertyMapEntry* SwUnoProp
case PROPERTY_MAP_EMBEDDED_OBJECT:
{
static SfxItemPropertyMapEntry aEmbeddedPropertyMap_Impl[] =
- {
+ { //UUUU
+ // evtl. completely remove SvxBrushItem stuff ()
+ // add support for XATTR_FILL_FIRST, XATTR_FILL_LAST
+ // COMMON_FRAME_PROPERTIES currently hosts the
RES_BACKGROUND entries from SvxBrushItem
COMMON_FRAME_PROPERTIES
{
SW_PROP_NMID(UNO_NAME_SURROUND_CONTOUR), RES_SURROUND,
CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_SURROUND_CONTOUR },
{
SW_PROP_NMID(UNO_NAME_CONTOUR_OUTSIDE), RES_SURROUND,
CPPU_E2T(CPPUTYPE_BOOLEAN), PROPERTY_NONE, MID_SURROUND_CONTOUROUTSIDE},
@@ -1237,6 +1255,13 @@ const SfxItemPropertyMapEntry* SwUnoProp
{ SW_PROP_NMID(UNO_NAME_COMPONENT),FN_UNO_COMPONENT,
CPPU_E2T(CPPUTYPE_REFCOMPONENT), PropertyAttribute::READONLY, 0},
{
SW_PROP_NMID(UNO_NAME_EMBEDDED_OBJECT),FN_EMBEDDED_OBJECT,
CPPU_E2T(CPPUTPYE_REFEMBEDDEDOBJECT), PropertyAttribute::READONLY, 0},
// { SW_PROP_NMID(UNO_NAME_ALTERNATIVE_TEXT),
FN_UNO_ALTERNATIVE_TEXT,CPPU_E2T(CPPUTYPE_OUSTRING), PROPERTY_NONE , 0 },
+
+ //UUUU added FillProperties for SW, same as
FILL_PROPERTIES in svx
+ // but need own defines in Writer due to later association
of strings
+ // and uno types (see loop at end of this method and
definition of SW_PROP_NMID)
+ // This entry is for adding that properties to
OLE/EmbeddedObject import/export
+ FILL_PROPERTIES_SW
+
{0,0,0,0,0,0}
};
aMapEntriesArr[nPropertyId] = aEmbeddedPropertyMap_Impl;
Modified: openoffice/trunk/main/sw/source/core/unocore/unostyle.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/unocore/unostyle.cxx?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/unocore/unostyle.cxx (original)
+++ openoffice/trunk/main/sw/source/core/unocore/unostyle.cxx Thu Apr 17
16:44:58 2014
@@ -1899,6 +1899,13 @@ void lcl_SetStyleProperty(const SfxItemP
}
case RES_BACKGROUND:
{
+ //UUUU No new FillStyle for PageBackground; need to remove again
when we want
+ // to support that, too. Add a break to *not* set bDone to true
+ if(SFX_STYLE_FAMILY_PAGE == eFamily)
+ {
+ break;
+ }
+
//UUUU
SfxItemSet& rStyleSet = rBase.GetItemSet();
const SvxBrushItem
aOriginalBrushItem(getSvxBrushItemFromSourceSet(rStyleSet));
@@ -2676,6 +2683,13 @@ uno::Any lcl_GetStyleProperty(const SfxI
}
case RES_BACKGROUND:
{
+ //UUUU No new FillStyle for PageBackground; need to remove
again when we want
+ // to support that, too. Add a break to *not* set bDone to true
+ if(SFX_STYLE_FAMILY_PAGE == eFamily)
+ {
+ break;
+ }
+
//UUUU
const SfxItemSet& rSet = rBase.GetItemSet();
const SvxBrushItem
aOriginalBrushItem(getSvxBrushItemFromSourceSet(rSet));
Modified: openoffice/trunk/main/sw/source/ui/frmdlg/frmpage.src
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/frmdlg/frmpage.src?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/frmdlg/frmpage.src (original)
+++ openoffice/trunk/main/sw/source/ui/frmdlg/frmpage.src Thu Apr 17 16:44:58
2014
@@ -157,12 +157,29 @@ TabDialog DLG_FRM_GRF
PageResID = TP_BORDER ;
Text [ en-US ] = "Borders" ;
};
- PageItem
- {
- Identifier = TP_BACKGROUND ;
- PageResID = TP_BACKGROUND ;
- Text [ en-US ] = "Background" ;
- };
+
+ //UUUU new Area and Transparence TabPages
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_AREA;
+ PageResID = RID_SVXPAGE_AREA;
+ Text [ en-US ] = "Area" ;
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_TRANSPARENCE;
+ PageResID = RID_SVXPAGE_TRANSPARENCE;
+ Text [ en-US ] = "Transparency" ;
+ };
+
+ //UUUU remove?
+ //PageItem
+ //{
+ // Identifier = TP_BACKGROUND ;
+ // PageResID = TP_BACKGROUND ;
+ // Text [ en-US ] = "Background" ;
+ //};
+
PageItem
{
Identifier = TP_MACRO_ASSIGN ;
@@ -212,12 +229,29 @@ TabDialog DLG_FRM_OLE
PageResID = TP_BORDER ;
Text [ en-US ] = "Borders" ;
};
- PageItem
- {
- Identifier = TP_BACKGROUND ;
- PageResID = TP_BACKGROUND ;
- Text [ en-US ] = "Background" ;
- };
+
+ //UUUU new Area and Transparence TabPages
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_AREA;
+ PageResID = RID_SVXPAGE_AREA;
+ Text [ en-US ] = "Area" ;
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_TRANSPARENCE;
+ PageResID = RID_SVXPAGE_TRANSPARENCE;
+ Text [ en-US ] = "Transparency" ;
+ };
+
+ //UUUU remove?
+ PageItem
+ {
+ Identifier = TP_BACKGROUND ;
+ PageResID = TP_BACKGROUND ;
+ Text [ en-US ] = "Background" ;
+ };
+
/*
PageItem {
Identifier = TP_COLUMN ;
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=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/frmsh.cxx Thu Apr 17 16:44:58 2014
@@ -440,11 +440,9 @@ void SwFrameShell::Execute(SfxRequest &r
SID_HTML_MODE, SID_HTML_MODE,
// [10414
FN_GET_PRINT_AREA, FN_GET_PRINT_AREA,
// [21032
FN_SURROUND, FN_HORI_ORIENT,
// [21303
- FN_SET_FRM_NAME, FN_SET_FRM_NAME,
// [21306
- FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO,
// [21307
+ FN_SET_FRM_NAME, FN_KEEP_ASPECT_RATIO,
// [21306
FN_SET_FRM_ALT_NAME, FN_SET_FRM_ALT_NAME,
// [21318
- FN_OLE_IS_MATH, FN_OLE_IS_MATH,
// [22314
- FN_MATH_BASELINE_ALIGNMENT, FN_MATH_BASELINE_ALIGNMENT,
// [22315
+ FN_OLE_IS_MATH, FN_MATH_BASELINE_ALIGNMENT,
// [22314
FN_PARAM_CHAIN_PREVIOUS, FN_PARAM_CHAIN_NEXT,
// [22420
0);
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=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx (original)
+++ openoffice/trunk/main/sw/source/ui/shells/grfsh.cxx Thu Apr 17 16:44:58 2014
@@ -75,6 +75,10 @@
#include <shells.hrc>
#include <popup.hrc>
+#include <doc.hxx>
+#include <docsh.hxx>
+#include <svx/drawitem.hxx>
+
#define SwGrfShell
#include <sfx2/msg.hxx>
#include "swslots.hxx"
@@ -128,22 +132,41 @@ void SwGrfShell::Execute(SfxRequest &rRe
const SwViewOption* pVOpt = rSh.GetViewOptions();
SwViewOption aUsrPref( *pVOpt );
- SfxItemSet aSet(GetPool(), RES_FRMATR_BEGIN,
RES_FRMATR_END-1,
- RES_GRFATR_MIRRORGRF,
RES_GRFATR_CROPGRF,
- SID_ATTR_BORDER_INNER,
SID_ATTR_BORDER_INNER,
-
SID_ATTR_GRAF_KEEP_ZOOM, SID_ATTR_GRAF_KEEP_ZOOM,
- SID_ATTR_GRAF_FRMSIZE,
SID_ATTR_GRAF_FRMSIZE,
-
SID_ATTR_GRAF_FRMSIZE_PERCENT, SID_ATTR_GRAF_FRMSIZE_PERCENT,
- SID_ATTR_GRAF_GRAPHIC,
SID_ATTR_GRAF_GRAPHIC,
- FN_PARAM_GRF_CONNECT,
FN_PARAM_GRF_CONNECT,
- SID_ATTR_PAGE_SIZE,
SID_ATTR_PAGE_SIZE,
- FN_GET_PRINT_AREA,
FN_GET_PRINT_AREA,
- FN_SET_FRM_NAME,
FN_KEEP_ASPECT_RATIO,
- FN_PARAM_GRF_DIALOG,
FN_PARAM_GRF_DIALOG,
- SID_DOCFRAME,
SID_DOCFRAME,
- SID_HTML_MODE,
SID_HTML_MODE,
- FN_SET_FRM_ALT_NAME,
FN_SET_FRM_ALT_NAME,
- 0);
+ SfxItemSet aSet(GetPool(), //UUUU sorted by indices
+
+ RES_FRMATR_BEGIN,RES_FRMATR_END - 1,
// [ 82
+ RES_GRFATR_MIRRORGRF,RES_GRFATR_CROPGRF,
// [ 123
+
+ //UUUU FillAttribute support
+ XATTR_FILL_FIRST, XATTR_FILL_LAST,
// [ 1014
+
+ SID_DOCFRAME,SID_DOCFRAME,
// [ 5598
+ SID_ATTR_BORDER_INNER,SID_ATTR_BORDER_INNER,
// [10023
+ SID_ATTR_PAGE_SIZE,SID_ATTR_PAGE_SIZE,
// [10051
+ SID_ATTR_GRAF_KEEP_ZOOM,SID_ATTR_GRAF_KEEP_ZOOM,
// [10882
+ SID_ATTR_GRAF_FRMSIZE,SID_ATTR_GRAF_GRAPHIC,
// [10884, contains SID_ATTR_GRAF_FRMSIZE_PERCENT
+
+ //UUUU items to hand over XPropertyList things like
+ // XColorList, XHatchList, XGradientList and XBitmapList
+ // to the Area TabPage
+ SID_COLOR_TABLE, SID_BITMAP_LIST,
// [10179
+
+ SID_HTML_MODE,SID_HTML_MODE,
// [10414
+ FN_GET_PRINT_AREA,FN_GET_PRINT_AREA,
// [21032
+ FN_PARAM_GRF_CONNECT,FN_PARAM_GRF_CONNECT,
// [21153
+ FN_PARAM_GRF_DIALOG,FN_PARAM_GRF_DIALOG,
// [21171
+ FN_SET_FRM_NAME,FN_KEEP_ASPECT_RATIO,
// [21306
+ FN_SET_FRM_ALT_NAME,FN_SET_FRM_ALT_NAME,
// [21318
+ 0);
+
+ //UUUU create needed items for XPropertyList entries from the
DrawModel so that
+ // the Area TabPage can access them
+ const SdrModel* pDrawModel =
rSh.GetView().GetDocShell()->GetDoc()->GetDrawModel();
+
+
aSet.Put(SvxColorTableItem(pDrawModel->GetColorTableFromSdrModel(),
SID_COLOR_TABLE));
+
aSet.Put(SvxGradientListItem(pDrawModel->GetGradientListFromSdrModel(),
SID_GRADIENT_LIST));
+ aSet.Put(SvxHatchListItem(pDrawModel->GetHatchListFromSdrModel(),
SID_HATCH_LIST));
+
aSet.Put(SvxBitmapListItem(pDrawModel->GetBitmapListFromSdrModel(),
SID_BITMAP_LIST));
sal_uInt16 nHtmlMode =
::GetHtmlMode(GetView().GetDocShell());
aSet.Put(SfxUInt16Item(SID_HTML_MODE, nHtmlMode));
Modified: openoffice/trunk/main/xmloff/inc/xmloff/XMLShapeStyleContext.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/inc/xmloff/XMLShapeStyleContext.hxx?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/inc/xmloff/XMLShapeStyleContext.hxx (original)
+++ openoffice/trunk/main/xmloff/inc/xmloff/XMLShapeStyleContext.hxx Thu Apr 17
16:44:58 2014
@@ -40,6 +40,8 @@ protected:
::rtl::OUString m_sControlDataStyleName;
::rtl::OUString m_sListStyleName;
sal_Bool m_bIsNumRuleAlreadyConverted;
+ //UUUU
+ sal_Bool m_bIsFillStyleAlreadyConverted;
protected:
virtual void SetAttribute( sal_uInt16 nPrefixKey,
Modified: openoffice/trunk/main/xmloff/source/draw/XMLShapeStyleContext.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/xmloff/source/draw/XMLShapeStyleContext.cxx?rev=1588308&r1=1588307&r2=1588308&view=diff
==============================================================================
--- openoffice/trunk/main/xmloff/source/draw/XMLShapeStyleContext.cxx (original)
+++ openoffice/trunk/main/xmloff/source/draw/XMLShapeStyleContext.cxx Thu Apr
17 16:44:58 2014
@@ -31,6 +31,7 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include "com/sun/star/beans/XPropertySetInfo.hpp"
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
#include <xmloff/xmlimp.hxx>
#include <xmloff/xmlnumi.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -46,6 +47,7 @@ using ::rtl::OUStringBuffer;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::drawing;
using ::xmloff::token::IsXMLToken;
using ::xmloff::token::XML_TEXT_PROPERTIES;
using ::xmloff::token::XML_GRAPHIC_PROPERTIES;
@@ -63,7 +65,8 @@ XMLShapeStyleContext::XMLShapeStyleConte
SvXMLStylesContext& rStyles,
sal_uInt16 nFamily)
: XMLPropStyleContext(rImport, nPrfx, rLName, xAttrList, rStyles, nFamily
),
- m_bIsNumRuleAlreadyConverted( sal_False )
+ m_bIsNumRuleAlreadyConverted( sal_False ),
+ m_bIsFillStyleAlreadyConverted( sal_False ) //UUUU
{
}
@@ -195,6 +198,82 @@ void XMLShapeStyleContext::FillPropertyS
}
}
+ if(!m_bIsFillStyleAlreadyConverted && GetProperties().size())
+ {
+ const UniReference< XMLPropertySetMapper >&rMapper =
GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper();
+ ::std::vector< XMLPropertyState >& rProperties = GetProperties();
+ ::std::vector< XMLPropertyState >::iterator a;
+ FillStyle eFS(FillStyle_NONE);
+ static ::rtl::OUString
s_FillStyle(RTL_CONSTASCII_USTRINGPARAM("FillStyle"));
+
+ // try to find a FillStyle entry and a value from it
+ for(a = rProperties.begin(); a != rProperties.end(); a++)
+ {
+ if(a->mnIndex != -1)
+ {
+ const OUString& rPropName =
rMapper->GetEntryAPIName(a->mnIndex);
+
+ if(rPropName == s_FillStyle)
+ {
+ if(a->maValue >>= eFS)
+ {
+ // okay, type was good, eFS is set
+ }
+ else
+ {
+ // also try an int (see XFillStyleItem::PutValue)
+ sal_Int32 nFS = 0;
+
+ if(a->maValue >>= nFS)
+ {
+ eFS = (FillStyle)nFS;
+ }
+ }
+
+ // exit loop, we found out what we needed to know
+ break;
+ }
+ }
+ }
+
+ if(FillStyle_NONE != eFS)
+ {
+ //UUUU a FillStyle was found, thus the new [XATTR_FILL_FIRST ..
XATTR_FILL_LAST]
+ // description for the Fill definitions is used. All formally used
props based
+ // on RES_BACKGROUND need to be deleted to get no conflicts
between the two
+ // sets of properties; old files will keep these and adapt
accordingly
+ static ::rtl::OUString
s_BackColorRGB(RTL_CONSTASCII_USTRINGPARAM("BackColorRGB"));
+ static ::rtl::OUString
s_BackTransparent(RTL_CONSTASCII_USTRINGPARAM("BackTransparent"));
+ static ::rtl::OUString
s_BackColorTransparency(RTL_CONSTASCII_USTRINGPARAM("BackColorTransparency"));
+ static ::rtl::OUString
s_BackGraphicURL(RTL_CONSTASCII_USTRINGPARAM("BackGraphicURL"));
+ static ::rtl::OUString
s_BackGraphicFilter(RTL_CONSTASCII_USTRINGPARAM("BackGraphicFilter"));
+ static ::rtl::OUString
s_BackGraphicLocation(RTL_CONSTASCII_USTRINGPARAM("BackGraphicLocation"));
+ static ::rtl::OUString
s_BackGraphicTransparency(RTL_CONSTASCII_USTRINGPARAM("BackGraphicTransparency"));
+
+ for(a = rProperties.begin(); a != rProperties.end(); a++)
+ {
+ if(a->mnIndex != -1)
+ {
+ const OUString& rPropName =
rMapper->GetEntryAPIName(a->mnIndex);
+
+ if(s_BackColorRGB == rPropName
+ || s_BackTransparent == rPropName
+ || s_BackColorTransparency == rPropName
+ || s_BackGraphicURL == rPropName
+ || s_BackGraphicFilter == rPropName
+ || s_BackGraphicLocation == rPropName
+ || s_BackGraphicTransparency== rPropName)
+ {
+ // mark entry as inactive
+ a->mnIndex = -1;
+ }
+ }
+ }
+ }
+
+ m_bIsFillStyleAlreadyConverted = sal_True;
+ }
+
struct _ContextID_Index_Pair aContextIDs[] =
{
{ CTF_DASHNAME , -1 },