[Libreoffice-commits] .: 3 commits - drawinglayer/source editeng/source officecfg/registry svx/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Tue Oct 26 14:38:41 PDT 2010
drawinglayer/source/primitive2d/polygonprimitive2d.cxx | 3 +-
editeng/source/outliner/outlvw.cxx | 4 ++-
officecfg/registry/schema/org/openoffice/Office/Draw.xcs | 2 -
officecfg/registry/schema/org/openoffice/Office/Impress.xcs | 2 -
svx/source/customshapes/EnhancedCustomShape2d.cxx | 16 ++++++++++++
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 2 -
6 files changed, 24 insertions(+), 5 deletions(-)
New commits:
commit 0e059638d80793931dc5c6fb9fdf9bb4466abadf
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Tue Oct 26 23:04:44 2010 +0200
Better shading algo for customshapes, better gradients
Some custom shapes can have shaded parts, like for example 3d can,
the bevelled buttons etc. Those shaded colors are calculated
internally, and have been way off at times. Now using HSV color
space & the originally documented luminance modifications in steps
of 10 percent. Compared to MSO, still no 100 percent match, but
that seems due to gamma correction there.
Additionally, starting with MSO12, gradients on those shaded surfaces
look much better; adapted code to display gradients equally nice.
Note that most of this patch also applies to ooxml import; note as
well that customshapes from *all* kind of input files (including ODF
docs) now look different than before; no real way of changing this
in a backward-compatible way, since behaviour of custom shapes is
mandated (mostly) by internal tables, and not stored in a file.
Applies patches/dev300/ppt-customshape-shading-fix (much of it was
accepted at OOo already, via i#102797)
Applies patches/dev300/ppt-customshape-shading-fix.diff: fixed prob
with line arrows - the extra-added single point polygons lead to
extra arrows randomly around the custom shape. i#105654
diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
index c22621d..79a280f 100644
--- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
@@ -509,10 +509,11 @@ namespace drawinglayer
{
// copy local polygon, it may be changed
basegfx::B2DPolygon aLocalPolygon(getB2DPolygon());
+ aLocalPolygon.removeDoublePoints();
basegfx::B2DPolyPolygon aArrowA;
basegfx::B2DPolyPolygon aArrowB;
- if(!aLocalPolygon.isClosed())
+ if(!aLocalPolygon.isClosed() && aLocalPolygon.count() > 1)
{
// apply arrows
const double fPolyLength(basegfx::tools::getLength(aLocalPolygon));
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 4e4322b..f67449b 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1735,6 +1735,22 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
if(aNewB2DPolyPolygon.count())
{
+ if( !bLineGeometryNeededOnly )
+ {
+ // hack aNewB2DPolyPolygon to fill logic rect - this is
+ // needed to produce gradient fills that look like mso
+ aNewB2DPolygon.clear();
+ aNewB2DPolygon.append(basegfx::B2DPoint(0,0));
+ aNewB2DPolygon.setClosed(true);
+ aNewB2DPolyPolygon.append(aNewB2DPolygon);
+
+ aNewB2DPolygon.clear();
+ aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(),
+ aLogicRect.GetHeight()));
+ aNewB2DPolygon.setClosed(true);
+ aNewB2DPolyPolygon.append(aNewB2DPolygon);
+ }
+
// #i37011#
bool bForceCreateTwoObjects(false);
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index f0ffcef..dabe89d 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -633,7 +633,7 @@ void InsertMissingOutlinePoints( const Polygon& /*rOutlinePoly*/, const std::vec
void GetPoint( const Polygon& rPoly, const std::vector< double >& rDistances, const double& fX, double& fx1, double& fy1 )
{
fy1 = fx1 = 0.0;
- if ( rPoly.GetSize() )
+ if ( rPoly.GetSize() > 1 )
{
std::vector< double >::const_iterator aIter = std::lower_bound( rDistances.begin(), rDistances.end(), fX );
sal_uInt16 nIdx = sal::static_int_cast<sal_uInt16>( std::distance( rDistances.begin(), aIter ) );
commit 045822069090d8a37aab656e2875f4d9437e133f
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Tue Oct 26 22:50:08 2010 +0200
Fix impress ruler behaviour
With 3.0, Impress numbering was modified because of the odf1.2
changes in list level handling; we differ in the way we
consider paragraphs to belong to the 'same' numbering group,
compared to ppt. now, as long as the para has the same outline
level (and no 'restart numbering' flag), it is considered to
belong to the same numbering group, i.e. numbering will mono-
tonically increase. Compares favorable to PPT. Additionally,
fixed a repaint bug that prevented following paragraph's numbers
to change, when certain modifications were made on the current one.
Applies patches/dev300/sd-ruler-fix.diff
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index e21568c..57a13a0 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -554,7 +554,9 @@ void OutlinerView::SetAttribs( const SfxItemSet& rAttrs )
for( USHORT nPara= aSel.nStartPara; nPara <= aSel.nEndPara; nPara++ )
{
pOwner->ImplCheckNumBulletItem( nPara );
- pOwner->ImplCalcBulletText( nPara, FALSE, FALSE );
+ // update following paras as well, numbering depends on
+ // previous paras
+ pOwner->ImplCalcBulletText( nPara, TRUE, FALSE );
if( !pOwner->IsInUndo() && pOwner->IsUndoEnabled() )
pOwner->InsertUndo( new OutlinerUndoCheckPara( pOwner, nPara ) );
commit 1bd461e83dfe4f8e2c43a4d831d717eba573c54c
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Tue Oct 26 16:15:35 2010 +0200
Default to bigger handles in Draw/Impress.
Much easier to interact with shapes - screen dpi is only getting
higher these days
diff --git a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
index e133b7a..a48598e 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Draw.xcs
@@ -384,7 +384,7 @@
<desc>Indicates whether to show big (true) or small (false) handles.</desc>
<label>Big Handles</label>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="ModifyWithAttributes" oor:type="xs:boolean">
<!-- OldPath: Draw/Other -->
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index 8317e3e..8c375d1 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -426,7 +426,7 @@
<desc>Indicates whether to show big (true) or small (false) handles.</desc>
<label>Big Handles</label>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="ModifyWithAttributes" oor:type="xs:boolean">
<!-- OldPath: Impress/Other -->
More information about the Libreoffice-commits
mailing list