[Libreoffice-commits] .: 2 commits - officecfg/registry scripting/workben svx/inc svx/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Thu Jun 30 08:54:41 PDT 2011
officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 8 ++++
scripting/workben/bindings/writermenubar.xml | 1
svx/inc/svx/svdobj.hxx | 3 +
svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx | 10 +++++
svx/source/sdr/contact/viewcontactofsdrcircobj.cxx | 17 ++++++++--
svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx | 10 +++++
svx/source/sdr/contact/viewcontactofsdrpathobj.cxx | 13 +++++++
svx/source/sdr/contact/viewcontactofsdrrectobj.cxx | 12 ++++++-
svx/source/svdraw/svdobj.cxx | 1
9 files changed, 71 insertions(+), 4 deletions(-)
New commits:
commit a1a1b74a613cc6aabbb9fe254365a1c369bf975c
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Wed Jun 22 14:39:17 2011 +0200
n#676858: added new menu entry for headers/footers edit mode
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 07346a9..2bf5c99 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -301,6 +301,14 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:EditHeaderFooter" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Headers/Footers</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:InsertCaptionDialog" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Caption...</value>
diff --git a/scripting/workben/bindings/writermenubar.xml b/scripting/workben/bindings/writermenubar.xml
index d2d6d88..4d45280 100755
--- a/scripting/workben/bindings/writermenubar.xml
+++ b/scripting/workben/bindings/writermenubar.xml
@@ -81,6 +81,7 @@
<menu:menuitem menu:id="slot:20620" menu:helpid="20620" menu:label="AutoTe~xt..."/>
<menu:menuseparator/>
<menu:menuitem menu:id="slot:20309" menu:helpid="20309" menu:label="Exc~hange Database..."/>
+ <menu:menuitem menu:id="slot:20195" menu:helpid="20195" menu:label="Headers/Footers"/>
<menu:menuitem menu:id="slot:20104" menu:helpid="20104" menu:label="F~ields..."/>
<menu:menuitem menu:id="slot:20162" menu:helpid="20162" menu:label="Footnote~..."/>
<menu:menuitem menu:id="slot:20123" menu:helpid="20123" menu:label="Index Entr~y..."/>
commit 5f3aa443c440794de0decbfd22ed4b685ac40b1e
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Wed Jun 29 10:53:11 2011 +0200
n#676858: ghost uneditable drawing objects
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index 4cf6bd4..f3ac5ac 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -483,6 +483,7 @@ protected:
// beim Clone wird das Flag nicht mitkopiert!
// Das Flag ist persistent.
unsigned bEmptyPresObj : 1; // Leeres Praesentationsobjekt (Draw)
+ unsigned mbGhosted : 1; // FIXME find a better way to ghost writer drawing objects
// sal_True=Objekt ist als Objekt der MasterPage nicht sichtbar
unsigned bNotVisibleAsMaster : 1;
@@ -1036,6 +1037,8 @@ public:
sal_Bool IsEmptyPresObj() const { return bEmptyPresObj; }
void SetNotVisibleAsMaster(sal_Bool bFlg) { bNotVisibleAsMaster=bFlg; }
sal_Bool IsNotVisibleAsMaster() const { return bNotVisibleAsMaster; }
+ void SetGhosted( sal_Bool bGhosted ) { mbGhosted = bGhosted; }
+ sal_Bool IsGhosted() const { return mbGhosted; }
// #i25616#
sal_Bool LineIsOutsideGeometry() const { return mbLineIsOutsideGeometry; }
diff --git a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
index fb1676c..7dd569e 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcaptionobj.cxx
@@ -45,6 +45,7 @@
#include <svx/xfltrit.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <svx/sdr/primitive2d/sdrdecompositiontools.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -171,6 +172,15 @@ namespace sdr
}
}
+ if (rCaptionObj.IsGhosted())
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xGhostedRef(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xGhostedRef, 1);
+ }
+
return xRetval;
}
} // end of namespace contact
diff --git a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
index 78151a9..e3dbcd5 100644
--- a/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrcircobj.cxx
@@ -36,6 +36,7 @@
#include <svl/itemset.hxx>
#include <svx/sxciaitm.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -78,6 +79,8 @@ namespace sdr
// create primitive data
const sal_uInt16 nIdentifier(GetCircObj().GetObjIdentifier());
+ drawinglayer::primitive2d::Primitive2DSequence xRetval;
+
// always create primitives to allow the decomposition of SdrEllipsePrimitive2D
// or SdrEllipseSegmentPrimitive2D to create needed invisible elements for HitTest
// and/or BoundRect
@@ -88,7 +91,7 @@ namespace sdr
aObjectMatrix,
aAttribute));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
else
{
@@ -108,8 +111,18 @@ namespace sdr
bCloseSegment,
bCloseUsingCenter));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ }
+
+ if (GetCircObj().IsGhosted())
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
+ return xRetval;
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index d053206..08516d3 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -39,6 +39,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/obj3d.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -233,6 +234,15 @@ namespace sdr
drawinglayer::primitive2d::createHiddenGeometryPrimitives2D(
false, aObjectRange));
+ if (GetCustomShapeObj().IsGhosted())
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ }
+
return xRetval;
}
} // end of namespace contact
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 53528e6..b00436f 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -35,6 +35,7 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <svx/sdr/primitive2d/sdrpathprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -137,7 +138,17 @@ namespace sdr
aAttribute,
aUnitPolyPolygon));
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ drawinglayer::primitive2d::Primitive2DSequence xRetval(&xReference, 1);
+
+ if (GetPathObj().IsGhosted())
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xGhostedRef(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xGhostedRef, 1);
+ }
+ return xRetval;
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index ea5448a..063f507 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -37,6 +37,7 @@
#include <svx/sdr/primitive2d/sdrprimitivetools.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/svdmodel.hxx>
+#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -95,8 +96,17 @@ namespace sdr
fCornerRadiusY,
// #i105856# use fill for HitTest when TextFrame and not PickThrough
GetRectObj().IsTextFrame() && !bPickThroughTransparentTextFrames));
+ drawinglayer::primitive2d::Primitive2DSequence xRetVal(&xReference, 1);
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ if ( GetRectObj().IsGhosted( ) )
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
+ const drawinglayer::primitive2d::Primitive2DReference xGhostedRef(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetVal, aBColorModifier));
+ xRetVal = drawinglayer::primitive2d::Primitive2DSequence(&xGhostedRef, 1);
+ }
+ return xRetVal;
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 2d133b3..cde1339 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -388,6 +388,7 @@ SdrObject::SdrObject()
bNoPrint =sal_False;
bEmptyPresObj =sal_False;
bNotVisibleAsMaster=sal_False;
+ mbGhosted = sal_False;
bClosedObj =sal_False;
mbVisible = true;
More information about the Libreoffice-commits
mailing list