- Update to 7.0.0.0.beta2:
* Beta candidate with all the new 7.0 series content - Remove merged patches: * bsc1146025.diff * bsc1157627.diff * bsc1160687-2.diff * bsc1160687-3.diff * bsc1160687-4.diff * bsc1160687-5.diff * bsc1160687-6.diff * bsc1160687-7.diff * bsc1160687-8.diff * bsc1165849-1.diff * bsc1165849-2.diff * bsc1165849-3.diff * bsc1165870.diff * bsc1172053.diff * bsc1172189.diff * replace-boost-bimap-in-sdext-pdfimport.patch * fix_old_boost_spirit_namespace.patch - Rebase patch install-with-hardlinks.diff OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=891
This commit is contained in:
parent
5b9524d8ef
commit
706e274d0b
501
bsc1146025.diff
501
bsc1146025.diff
@ -1,501 +0,0 @@
|
||||
From bc15a8241b1c8e113bcbb83343652b2c84820e87 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Fri, 22 May 2020 17:58:22 +0200
|
||||
Subject: [PATCH] bsc1146025.diff
|
||||
|
||||
smartart import: handle multiple <a:schemeClr> in <dgm:fillClrLst>
|
||||
|
||||
The TODO in the ColorFragmentHandler ctor was right: we only handled the
|
||||
last <a:schemeClr> child, but there can be multiple one.
|
||||
|
||||
Use them based on the index of a shape in a <dgm:forEach> loop.
|
||||
|
||||
Move the TODO to the only place which still assumes a single color in
|
||||
the color list.
|
||||
|
||||
(cherry picked from commit 12bea6c897822964ad4705418da54411cb15749e)
|
||||
|
||||
Conflicts:
|
||||
oox/source/drawingml/colorchoicecontext.cxx
|
||||
oox/source/drawingml/diagram/diagram.cxx
|
||||
sd/qa/unit/import-tests-smartart.cxx
|
||||
|
||||
oox smartart import: fix aspect ratio of shape with composite algo
|
||||
|
||||
The layout node has alg=composite, then a parTx and a desTx child layout
|
||||
nodes. No matter what order is used (parent first, child first), the
|
||||
result will be wrong, as the constraints refer to each other. I did not
|
||||
spot any description in ISO 29500-1 that would describe what is the
|
||||
expected behavior.
|
||||
|
||||
Researching this, found "One other consideration when specifying
|
||||
composite constraints is that the constraints must be specified in the
|
||||
same order as the nested layout nodes." at
|
||||
<http://web.archive.org/web/20111015151600/http://msdn.microsoft.com/en-us/magazine/cc163470.aspx>,
|
||||
which suggests to handle constraints for each shape in a parent -> child
|
||||
order, but keep a shared state when iterating over the children which
|
||||
gives us:
|
||||
|
||||
- parent node, all direct constraints
|
||||
- for each child node:
|
||||
- child's constraints from parent
|
||||
- child's own constraints
|
||||
|
||||
This way the desTx top value can depend on the parTx's height, and it's
|
||||
supported to define parTx's height only in the parTx layout node, not in
|
||||
the composite parent.
|
||||
|
||||
And after all, it matches what PowerPoint does, so the column headings
|
||||
in the bugdoc have a 4:10 height:width aspect ratio.
|
||||
|
||||
(cherry picked from commit 414586649582e182b2603702f4f586f4beeed8a9)
|
||||
|
||||
oox smartart import, composite alg: implement vertical centering
|
||||
|
||||
The bugdoc's case was that the total height would be used by 2 shapes,
|
||||
but then a constraint decreases the height of one shape, so not all
|
||||
vertical space is used.
|
||||
|
||||
We used to just count from the top, need to center vertically, as
|
||||
PowerPoint does it.
|
||||
|
||||
(cherry picked from commit acdde3c643fde015214c546b1567727272ea799e)
|
||||
|
||||
Change-Id: I1c5c4f82e621f1110ef06b0490ff79f82f60f214
|
||||
deb76c1ddd1ffff8d2a217cddf81106d1bb97eb9
|
||||
436019e9e837b73130e387c9bcd309e20045b0f9
|
||||
---
|
||||
oox/inc/drawingml/colorchoicecontext.hxx | 15 ++
|
||||
oox/source/drawingml/colorchoicecontext.cxx | 25 +++
|
||||
oox/source/drawingml/diagram/diagram.cxx | 17 +-
|
||||
oox/source/drawingml/diagram/diagram.hxx | 16 +-
|
||||
.../diagram/diagramfragmenthandler.cxx | 15 +-
|
||||
.../drawingml/diagram/diagramlayoutatoms.cxx | 162 ++++++++++++++----
|
||||
.../drawingml/diagram/diagramlayoutatoms.hxx | 3 +-
|
||||
.../drawingml/diagram/layoutatomvisitors.cxx | 4 +-
|
||||
8 files changed, 208 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/oox/inc/drawingml/colorchoicecontext.hxx b/oox/inc/drawingml/colorchoicecontext.hxx
|
||||
index 29889f494e3d..dae8d7fb8e25 100644
|
||||
--- a/oox/inc/drawingml/colorchoicecontext.hxx
|
||||
+++ b/oox/inc/drawingml/colorchoicecontext.hxx
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#include <oox/core/contexthandler2.hxx>
|
||||
|
||||
+#include <vector>
|
||||
+
|
||||
namespace oox {
|
||||
namespace drawingml {
|
||||
|
||||
@@ -65,6 +67,19 @@ private:
|
||||
Color& mrColor;
|
||||
};
|
||||
|
||||
+/// Same as ColorContext, but handles multiple colors.
|
||||
+class ColorsContext : public ::oox::core::ContextHandler2
|
||||
+{
|
||||
+public:
|
||||
+ explicit ColorsContext(::oox::core::ContextHandler2Helper const& rParent,
|
||||
+ std::vector<Color>& rColors);
|
||||
+
|
||||
+ virtual ::oox::core::ContextHandlerRef
|
||||
+ onCreateContext(sal_Int32 nElement, const ::oox::AttributeList& rAttribs) override;
|
||||
+
|
||||
+private:
|
||||
+ std::vector<Color>& mrColors;
|
||||
+};
|
||||
|
||||
} // namespace drawingml
|
||||
} // namespace oox
|
||||
diff --git a/oox/source/drawingml/colorchoicecontext.cxx b/oox/source/drawingml/colorchoicecontext.cxx
|
||||
index cf6c17ecd3b4..a9e0d91ef32e 100644
|
||||
--- a/oox/source/drawingml/colorchoicecontext.cxx
|
||||
+++ b/oox/source/drawingml/colorchoicecontext.cxx
|
||||
@@ -149,6 +149,31 @@ ColorContext::ColorContext( ContextHandler2Helper const & rParent, Color& rColor
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
+ColorsContext::ColorsContext(ContextHandler2Helper const& rParent, std::vector<Color>& rColors)
|
||||
+ : ContextHandler2(rParent)
|
||||
+ , mrColors(rColors)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+::oox::core::ContextHandlerRef ColorsContext::onCreateContext(sal_Int32 nElement,
|
||||
+ const AttributeList&)
|
||||
+{
|
||||
+ switch (nElement)
|
||||
+ {
|
||||
+ case A_TOKEN(scrgbClr):
|
||||
+ case A_TOKEN(srgbClr):
|
||||
+ case A_TOKEN(hslClr):
|
||||
+ case A_TOKEN(sysClr):
|
||||
+ case A_TOKEN(schemeClr):
|
||||
+ case A_TOKEN(prstClr):
|
||||
+ {
|
||||
+ mrColors.emplace_back();
|
||||
+ return new ColorValueContext(*this, mrColors.back());
|
||||
+ }
|
||||
+ }
|
||||
+ return nullptr;
|
||||
+}
|
||||
+
|
||||
} // namespace drawingml
|
||||
} // namespace oox
|
||||
|
||||
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
|
||||
index b2f3373ad113..a03a06c39125 100644
|
||||
--- a/oox/source/drawingml/diagram/diagram.cxx
|
||||
+++ b/oox/source/drawingml/diagram/diagram.cxx
|
||||
@@ -321,9 +321,11 @@ void loadDiagram( ShapePtr const & pShape,
|
||||
if( !pData->getExtDrawings().empty() )
|
||||
{
|
||||
const DiagramColorMap::const_iterator aColor = pDiagram->getColors().find("node0");
|
||||
- if( aColor != pDiagram->getColors().end() )
|
||||
+ if( aColor != pDiagram->getColors().end() && !aColor->second.maTextFillColors.empty())
|
||||
{
|
||||
- pShape->setFontRefColorForNodes(aColor->second.maTextFillColor);
|
||||
+ // TODO(F1): well, actually, there might be *several* color
|
||||
+ // definitions in it, after all it's called list.
|
||||
+ pShape->setFontRefColorForNodes(DiagramColor::getColorByIndex(aColor->second.maTextFillColors, -1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,6 +427,17 @@ void reloadDiagram(SdrObject* pObj, core::XmlFilterBase& rFilter)
|
||||
child->addShape(rFilter, rFilter.getCurrentTheme(), xShapes, aTransformation, pShape->getFillProperties());
|
||||
}
|
||||
|
||||
+const oox::drawingml::Color&
|
||||
+DiagramColor::getColorByIndex(const std::vector<oox::drawingml::Color>& rColors, sal_Int32 nIndex)
|
||||
+{
|
||||
+ assert(!rColors.empty());
|
||||
+ if (nIndex == -1)
|
||||
+ {
|
||||
+ return rColors[rColors.size() - 1];
|
||||
+ }
|
||||
+
|
||||
+ return rColors[nIndex % rColors.size()];
|
||||
+}
|
||||
} }
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
diff --git a/oox/source/drawingml/diagram/diagram.hxx b/oox/source/drawingml/diagram/diagram.hxx
|
||||
index 576c4007e29f..a674e248961e 100644
|
||||
--- a/oox/source/drawingml/diagram/diagram.hxx
|
||||
+++ b/oox/source/drawingml/diagram/diagram.hxx
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
+#include <vector>
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
|
||||
@@ -111,12 +112,15 @@ typedef std::map<OUString,DiagramStyle> DiagramQStyleMap;
|
||||
|
||||
struct DiagramColor
|
||||
{
|
||||
- oox::drawingml::Color maFillColor;
|
||||
- oox::drawingml::Color maLineColor;
|
||||
- oox::drawingml::Color maEffectColor;
|
||||
- oox::drawingml::Color maTextFillColor;
|
||||
- oox::drawingml::Color maTextLineColor;
|
||||
- oox::drawingml::Color maTextEffectColor;
|
||||
+ std::vector<oox::drawingml::Color> maFillColors;
|
||||
+ std::vector<oox::drawingml::Color> maLineColors;
|
||||
+ std::vector<oox::drawingml::Color> maEffectColors;
|
||||
+ std::vector<oox::drawingml::Color> maTextFillColors;
|
||||
+ std::vector<oox::drawingml::Color> maTextLineColors;
|
||||
+ std::vector<oox::drawingml::Color> maTextEffectColors;
|
||||
+
|
||||
+ static const oox::drawingml::Color&
|
||||
+ getColorByIndex(const std::vector<oox::drawingml::Color>& rColors, sal_Int32 nIndex);
|
||||
};
|
||||
|
||||
typedef std::map<OUString,DiagramColor> DiagramColorMap;
|
||||
diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
|
||||
index 6e1000af3627..7eae543dc6f9 100644
|
||||
--- a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
|
||||
+++ b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
|
||||
@@ -196,21 +196,18 @@ ColorFragmentHandler::ColorFragmentHandler( ::oox::core::XmlFilterBase& rFilter,
|
||||
{
|
||||
// the actual colors - defer to color fragment handlers.
|
||||
|
||||
- // TODO(F1): well, actually, there might be *several* color
|
||||
- // definitions in it, after all it's called list. But
|
||||
- // apparently ColorContext doesn't handle that anyway...
|
||||
case DGM_TOKEN(fillClrLst):
|
||||
- return new ColorContext( *this, maColorEntry.maFillColor );
|
||||
+ return new ColorsContext( *this, maColorEntry.maFillColors );
|
||||
case DGM_TOKEN(linClrLst):
|
||||
- return new ColorContext( *this, maColorEntry.maLineColor );
|
||||
+ return new ColorsContext( *this, maColorEntry.maLineColors );
|
||||
case DGM_TOKEN(effectClrLst):
|
||||
- return new ColorContext( *this, maColorEntry.maEffectColor );
|
||||
+ return new ColorsContext( *this, maColorEntry.maEffectColors );
|
||||
case DGM_TOKEN(txFillClrLst):
|
||||
- return new ColorContext( *this, maColorEntry.maTextFillColor );
|
||||
+ return new ColorsContext( *this, maColorEntry.maTextFillColors );
|
||||
case DGM_TOKEN(txLinClrLst):
|
||||
- return new ColorContext( *this, maColorEntry.maTextLineColor );
|
||||
+ return new ColorsContext( *this, maColorEntry.maTextLineColors );
|
||||
case DGM_TOKEN(txEffectClrLst):
|
||||
- return new ColorContext( *this, maColorEntry.maTextEffectColor );
|
||||
+ return new ColorsContext( *this, maColorEntry.maTextEffectColors );
|
||||
}
|
||||
break;
|
||||
}
|
||||
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
|
||||
index ff83dde63fa3..19b1d10679f4 100644
|
||||
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
|
||||
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
|
||||
@@ -430,6 +430,42 @@ sal_Int32 AlgAtom::getVerticalShapesCount(const ShapePtr& rShape)
|
||||
return nCount;
|
||||
}
|
||||
|
||||
+namespace
|
||||
+{
|
||||
+/**
|
||||
+ * Apply rConstraint to the rProperties shared layout state.
|
||||
+ *
|
||||
+ * Note that the order in which constraints are applied matters, given that constraints can refer to
|
||||
+ * each other, and in case A depends on B and A is applied before B, the effect of A won't be
|
||||
+ * updated when B is applied.
|
||||
+ */
|
||||
+void ApplyConstraintToLayout(const Constraint& rConstraint, LayoutPropertyMap& rProperties)
|
||||
+{
|
||||
+ const LayoutPropertyMap::const_iterator aRef = rProperties.find(rConstraint.msRefForName);
|
||||
+ if (aRef != rProperties.end())
|
||||
+ {
|
||||
+ const LayoutProperty::const_iterator aRefType = aRef->second.find(rConstraint.mnRefType);
|
||||
+ if (aRefType != aRef->second.end())
|
||||
+ rProperties[rConstraint.msForName][rConstraint.mnType]
|
||||
+ = aRefType->second * rConstraint.mfFactor;
|
||||
+ else
|
||||
+ {
|
||||
+ // Values are never in EMU, while oox::drawingml::Shape position and size are always in
|
||||
+ // EMU.
|
||||
+ double fUnitFactor = 0;
|
||||
+ if (isFontUnit(rConstraint.mnRefType))
|
||||
+ // Points -> EMU.
|
||||
+ fUnitFactor = EMU_PER_PT;
|
||||
+ else
|
||||
+ // Millimeters -> EMU.
|
||||
+ fUnitFactor = EMU_PER_HMM * 100;
|
||||
+ rProperties[rConstraint.msForName][rConstraint.mnType]
|
||||
+ = rConstraint.mfValue * fUnitFactor;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+}
|
||||
+
|
||||
void AlgAtom::layoutShape( const ShapePtr& rShape,
|
||||
const std::vector<Constraint>& rConstraints )
|
||||
{
|
||||
@@ -443,6 +479,11 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
|
||||
LayoutProperty& rParent = aProperties[""];
|
||||
|
||||
sal_Int32 nParentXOffset = 0;
|
||||
+
|
||||
+ // Track min/max vertical positions, so we can center everything at the end, if needed.
|
||||
+ sal_Int32 nVertMin = std::numeric_limits<sal_Int32>::max();
|
||||
+ sal_Int32 nVertMax = 0;
|
||||
+
|
||||
if (mfAspectRatio != 1.0)
|
||||
{
|
||||
rParent[XML_w] = rShape->getSize().Width;
|
||||
@@ -467,31 +508,74 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
|
||||
|
||||
for (const auto & rConstr : rConstraints)
|
||||
{
|
||||
- const LayoutPropertyMap::const_iterator aRef = aProperties.find(rConstr.msRefForName);
|
||||
- if (aRef != aProperties.end())
|
||||
+ // Apply direct constraints for all layout nodes.
|
||||
+ ApplyConstraintToLayout(rConstr, aProperties);
|
||||
+ }
|
||||
+
|
||||
+ for (auto& aCurrShape : rShape->getChildren())
|
||||
+ {
|
||||
+ // Apply constraints from the current layout node for this child shape.
|
||||
+ // Previous child shapes may have changed aProperties.
|
||||
+ for (const auto& rConstr : rConstraints)
|
||||
{
|
||||
- const LayoutProperty::const_iterator aRefType = aRef->second.find(rConstr.mnRefType);
|
||||
- if (aRefType != aRef->second.end())
|
||||
- aProperties[rConstr.msForName][rConstr.mnType] = aRefType->second * rConstr.mfFactor;
|
||||
- else
|
||||
+ if (rConstr.msForName != aCurrShape->getInternalName())
|
||||
{
|
||||
- // Values are never in EMU, while oox::drawingml::Shape
|
||||
- // position and size are always in EMU.
|
||||
- double fUnitFactor = 0;
|
||||
- if (isFontUnit(rConstr.mnRefType))
|
||||
- // Points -> EMU.
|
||||
- fUnitFactor = EMU_PER_PT;
|
||||
- else
|
||||
- // Millimeters -> EMU.
|
||||
- fUnitFactor = EMU_PER_HMM * 100;
|
||||
- aProperties[rConstr.msForName][rConstr.mnType]
|
||||
- = rConstr.mfValue * fUnitFactor;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ ApplyConstraintToLayout(rConstr, aProperties);
|
||||
+ }
|
||||
+
|
||||
+ // Apply constraints from the child layout node for this child shape.
|
||||
+ // This builds on top of the own parent state + the state of previous shapes in the
|
||||
+ // same composite algorithm.
|
||||
+ const LayoutNode& rLayoutNode = getLayoutNode();
|
||||
+ for (const auto& pDirectChild : rLayoutNode.getChildren())
|
||||
+ {
|
||||
+ auto pLayoutNode = dynamic_cast<LayoutNode*>(pDirectChild.get());
|
||||
+ if (!pLayoutNode)
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (pLayoutNode->getName() != aCurrShape->getInternalName())
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ for (const auto& pChild : pLayoutNode->getChildren())
|
||||
+ {
|
||||
+ auto pConstraintAtom = dynamic_cast<ConstraintAtom*>(pChild.get());
|
||||
+ if (!pConstraintAtom)
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ const Constraint& rConstraint = pConstraintAtom->getConstraint();
|
||||
+ if (!rConstraint.msForName.isEmpty())
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (!rConstraint.msRefForName.isEmpty())
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ // Either an absolute value or a factor of a property.
|
||||
+ if (rConstraint.mfValue == 0.0 && rConstraint.mnRefType == XML_none)
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ Constraint aConstraint(rConstraint);
|
||||
+ aConstraint.msForName = pLayoutNode->getName();
|
||||
+ aConstraint.msRefForName = pLayoutNode->getName();
|
||||
+
|
||||
+ ApplyConstraintToLayout(aConstraint, aProperties);
|
||||
}
|
||||
}
|
||||
- }
|
||||
|
||||
- for (auto & aCurrShape : rShape->getChildren())
|
||||
- {
|
||||
awt::Size aSize = rShape->getSize();
|
||||
awt::Point aPos(0, 0);
|
||||
|
||||
@@ -535,6 +619,24 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
|
||||
aCurrShape->setSize(aSize);
|
||||
aCurrShape->setChildSize(aSize);
|
||||
aCurrShape->setPosition(aPos);
|
||||
+
|
||||
+ nVertMin = std::min(aPos.Y, nVertMin);
|
||||
+ nVertMax = std::max(aPos.Y + aSize.Height, nVertMax);
|
||||
+ }
|
||||
+
|
||||
+ // See if all vertical space is used or we have to center the content.
|
||||
+ if (nVertMin >= 0 && nVertMax <= rParent[XML_h])
|
||||
+ {
|
||||
+ sal_Int32 nDiff = rParent[XML_h] - (nVertMax - nVertMin);
|
||||
+ if (nDiff > 0)
|
||||
+ {
|
||||
+ for (auto& aCurrShape : rShape->getChildren())
|
||||
+ {
|
||||
+ awt::Point aPosition = aCurrShape->getPosition();
|
||||
+ aPosition.Y += nDiff / 2;
|
||||
+ aCurrShape->setPosition(aPosition);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1275,7 +1377,7 @@ void LayoutNode::accept( LayoutAtomVisitor& rVisitor )
|
||||
rVisitor.visit(*this);
|
||||
}
|
||||
|
||||
-bool LayoutNode::setupShape( const ShapePtr& rShape, const dgm::Point* pPresNode ) const
|
||||
+bool LayoutNode::setupShape( const ShapePtr& rShape, const dgm::Point* pPresNode, sal_Int32 nCurrIdx ) const
|
||||
{
|
||||
SAL_INFO(
|
||||
"oox.drawingml",
|
||||
@@ -1413,15 +1515,17 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const dgm::Point* pPresNode
|
||||
const DiagramColorMap::const_iterator aColor = mrDgm.getColors().find(aStyleLabel);
|
||||
if( aColor != mrDgm.getColors().end() )
|
||||
{
|
||||
+ // Take the nth color from the color list in case we are the nth shape in a
|
||||
+ // <dgm:forEach> loop.
|
||||
const DiagramColor& rColor=aColor->second;
|
||||
- if( rColor.maFillColor.isUsed() )
|
||||
- rShape->getShapeStyleRefs()[XML_fillRef].maPhClr = rColor.maFillColor;
|
||||
- if( rColor.maLineColor.isUsed() )
|
||||
- rShape->getShapeStyleRefs()[XML_lnRef].maPhClr = rColor.maLineColor;
|
||||
- if( rColor.maEffectColor.isUsed() )
|
||||
- rShape->getShapeStyleRefs()[XML_effectRef].maPhClr = rColor.maEffectColor;
|
||||
- if( rColor.maTextFillColor.isUsed() )
|
||||
- rShape->getShapeStyleRefs()[XML_fontRef].maPhClr = rColor.maTextFillColor;
|
||||
+ if( !rColor.maFillColors.empty() )
|
||||
+ rShape->getShapeStyleRefs()[XML_fillRef].maPhClr = DiagramColor::getColorByIndex(rColor.maFillColors, nCurrIdx);
|
||||
+ if( !rColor.maLineColors.empty() )
|
||||
+ rShape->getShapeStyleRefs()[XML_lnRef].maPhClr = DiagramColor::getColorByIndex(rColor.maLineColors, nCurrIdx);
|
||||
+ if( !rColor.maEffectColors.empty() )
|
||||
+ rShape->getShapeStyleRefs()[XML_effectRef].maPhClr = DiagramColor::getColorByIndex(rColor.maEffectColors, nCurrIdx);
|
||||
+ if( !rColor.maTextFillColors.empty() )
|
||||
+ rShape->getShapeStyleRefs()[XML_fontRef].maPhClr = DiagramColor::getColorByIndex(rColor.maTextFillColors, nCurrIdx);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
|
||||
index 91028971473e..2e4551642389 100644
|
||||
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
|
||||
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
|
||||
@@ -260,7 +260,8 @@ public:
|
||||
{ mpNodeShapes.push_back(pShape); }
|
||||
|
||||
bool setupShape( const ShapePtr& rShape,
|
||||
- const dgm::Point* pPresNode ) const;
|
||||
+ const dgm::Point* pPresNode,
|
||||
+ sal_Int32 nCurrIdx ) const;
|
||||
|
||||
const LayoutNode* getParentLayoutNode() const;
|
||||
|
||||
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
|
||||
index 4bfadc3affe8..c616ca3a9010 100644
|
||||
--- a/oox/source/drawingml/diagram/layoutatomvisitors.cxx
|
||||
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
|
||||
@@ -73,7 +73,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
|
||||
{
|
||||
// reuse existing shape
|
||||
ShapePtr pShape = rAtom.getExistingShape();
|
||||
- if (rAtom.setupShape(pShape, pNewNode))
|
||||
+ if (rAtom.setupShape(pShape, pNewNode, mnCurrIdx))
|
||||
{
|
||||
pShape->setInternalName(rAtom.getName());
|
||||
rAtom.addNodeShape(pShape);
|
||||
@@ -92,7 +92,7 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom)
|
||||
"oox.drawingml",
|
||||
"processing shape type " << (pShape->getCustomShapeProperties()->getShapePresetType()));
|
||||
|
||||
- if (rAtom.setupShape(pShape, pNewNode))
|
||||
+ if (rAtom.setupShape(pShape, pNewNode, mnCurrIdx))
|
||||
{
|
||||
pShape->setInternalName(rAtom.getName());
|
||||
pCurrParent->addChild(pShape);
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,39 +0,0 @@
|
||||
From d7f313b844be5394af2518fc5843aad80314b9f1 Mon Sep 17 00:00:00 2001
|
||||
From: nd101 <Fong@nd.com.cn>
|
||||
Date: Tue, 3 Mar 2020 15:19:07 +0800
|
||||
Subject: [PATCH] bsc1157627.diff
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
tdf#131082 fix missing fill property of grouped shapes
|
||||
|
||||
When shapes are grouped together, and fill property is specified
|
||||
at the group level in MSO, it fails to work in IMPRESS.
|
||||
|
||||
This fix is to set the fill property when it is being imported.
|
||||
|
||||
Change-Id: I89920e71fc558f54d49ef7b065c549a732bc2b10
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89862
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
|
||||
---
|
||||
oox/source/drawingml/shape.cxx | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
|
||||
index cce8b9ba7bbc..8cb3d00df231 100644
|
||||
--- a/oox/source/drawingml/shape.cxx
|
||||
+++ b/oox/source/drawingml/shape.cxx
|
||||
@@ -1042,6 +1042,8 @@ Reference< XShape > const & Shape::createAndInsert(
|
||||
mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
|
||||
|
||||
FillProperties aFillProperties = getActualFillProperties(pTheme, &rShapeOrParentShapeFillProps);
|
||||
+ if (getFillProperties().moFillType.has() && getFillProperties().moFillType.get() == XML_grpFill)
|
||||
+ getFillProperties().assignUsed(aFillProperties);
|
||||
if(!bIsCroppedGraphic)
|
||||
aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr, mbFlipH, mbFlipV );
|
||||
LineProperties aLineProperties = getActualLineProperties(pTheme);
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,44 +0,0 @@
|
||||
From e00329729e1fd18fa452e91820a81964d5527e6d Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Tue, 28 Apr 2020 15:04:19 +0200
|
||||
Subject: [PATCH] sw from-bottom relative orientation: add UNO API
|
||||
|
||||
When it comes to vertical positioning of anchored sw objects, one can
|
||||
say the position should be "1cm from the top of the page". But measuring
|
||||
from the bottom of something was not possible.
|
||||
|
||||
Add API for this to help working with documents from Word, which
|
||||
supports the feature.
|
||||
|
||||
There is no duplicated C++ enum in sw/ for vertical relative
|
||||
orientation, so no "doc model" changes are needed for this in sw/.
|
||||
|
||||
Change-Id: I3199d3e794bda2f21f92ce3bb7c3c6f04d284db2
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93065
|
||||
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
||||
Tested-by: Jenkins
|
||||
(cherry picked from commit 79107d3f8d10aa0f38641775c5eb47dcfd4fd37e)
|
||||
---
|
||||
offapi/com/sun/star/text/RelOrientation.idl | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/offapi/com/sun/star/text/RelOrientation.idl b/offapi/com/sun/star/text/RelOrientation.idl
|
||||
index adfb094fd593..59f39a045740 100644
|
||||
--- a/offapi/com/sun/star/text/RelOrientation.idl
|
||||
+++ b/offapi/com/sun/star/text/RelOrientation.idl
|
||||
@@ -73,6 +73,12 @@ published constants RelOrientation
|
||||
*/
|
||||
const short TEXT_LINE = 9;
|
||||
|
||||
+ /** Similar to PAGE_PRINT_AREA, but count from bottom, not from top.
|
||||
+
|
||||
+ @since LibreOffice 7.0
|
||||
+ */
|
||||
+ const short PAGE_PRINT_AREA_BOTTOM = 10;
|
||||
+
|
||||
};
|
||||
|
||||
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,125 +0,0 @@
|
||||
From 9e170a5def6ce48c8273843d13bd5bbb43b802da Mon Sep 17 00:00:00 2001
|
||||
From: Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>
|
||||
Date: Thu, 5 Mar 2020 20:49:55 +0100
|
||||
Subject: [PATCH] Dump some more layout info as Xml
|
||||
|
||||
Change-Id: Ia82d545e4c5d4507899d123eba9d4b2efded992d
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90125
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
||||
(cherry picked from commit 36f0a04d3caa176b20dccb10ff0bbcfb5cb8d893)
|
||||
---
|
||||
sw/inc/swrect.hxx | 3 ++-
|
||||
sw/source/core/bastyp/swrect.cxx | 12 ++++++++++++
|
||||
sw/source/core/text/xmldump.cxx | 23 ++++++++++-------------
|
||||
3 files changed, 24 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
|
||||
index 69b1f2ad781a..6cde3c3f01e7 100644
|
||||
--- a/sw/inc/swrect.hxx
|
||||
+++ b/sw/inc/swrect.hxx
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "swdllapi.h"
|
||||
|
||||
class SvStream;
|
||||
+typedef struct _xmlTextWriter* xmlTextWriterPtr;
|
||||
|
||||
/// *Of course* Writer needs its own rectangles.
|
||||
/// This is half-open so m_Point.X() + m_Size.getWidth() is *not* included.
|
||||
@@ -104,7 +105,7 @@ public:
|
||||
|
||||
// Output operator for debugging.
|
||||
friend SvStream& WriteSwRect( SvStream &rStream, const SwRect &rRect );
|
||||
-
|
||||
+ void dumpAsXmlAttributes(xmlTextWriterPtr writer) const;
|
||||
|
||||
void Top_( const long nTop );
|
||||
void Bottom_( const long nBottom );
|
||||
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
|
||||
index 1d53e6e7a71e..884c155003e2 100644
|
||||
--- a/sw/source/core/bastyp/swrect.cxx
|
||||
+++ b/sw/source/core/bastyp/swrect.cxx
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include <swrect.hxx>
|
||||
|
||||
+#include <libxml/xmlwriter.h>
|
||||
+
|
||||
#ifdef DBG_UTIL
|
||||
#include <tools/stream.hxx>
|
||||
#endif
|
||||
@@ -218,6 +220,16 @@ void SwRect::SetUpperRightCorner( const Point& rNew )
|
||||
void SwRect::SetLowerLeftCorner( const Point& rNew )
|
||||
{ m_Point = Point(rNew.X(), rNew.Y() - m_Size.getHeight()); }
|
||||
|
||||
+void SwRect::dumpAsXmlAttributes(xmlTextWriterPtr writer) const
|
||||
+{
|
||||
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("left"), "%li", Left());
|
||||
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("top"), "%li", Top());
|
||||
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("width"), "%li", Width());
|
||||
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("height"), "%li", Height());
|
||||
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("bottom"), "%li", Bottom());
|
||||
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("right"), "%li", Right());
|
||||
+}
|
||||
+
|
||||
#ifdef DBG_UTIL
|
||||
SvStream& WriteSwRect(SvStream &rStream, const SwRect &rRect)
|
||||
{
|
||||
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
|
||||
index 20f61111126a..4f3d50eba742 100644
|
||||
--- a/sw/source/core/text/xmldump.cxx
|
||||
+++ b/sw/source/core/text/xmldump.cxx
|
||||
@@ -343,6 +343,12 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const
|
||||
xmlTextWriterWriteAttribute(writer, BAD_CAST("ValidLayout"), BAD_CAST(OString::boolean(!pPageFrame->IsInvalidLayout()).getStr()));
|
||||
xmlTextWriterWriteAttribute(writer, BAD_CAST("ValidContent"), BAD_CAST(OString::boolean(!pPageFrame->IsInvalidContent()).getStr()));
|
||||
xmlTextWriterEndElement(writer);
|
||||
+ xmlTextWriterStartElement(writer, BAD_CAST("page_info"));
|
||||
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("phyNum"), "%d", pPageFrame->GetPhyPageNum());
|
||||
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("virtNum"), "%d", pPageFrame->GetVirtPageNum());
|
||||
+ OUString aFormatName = pPageFrame->GetPageDesc()->GetName();
|
||||
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST("pageDesc"), "%s", BAD_CAST(OUStringToOString(aFormatName, RTL_TEXTENCODING_UTF8).getStr()));
|
||||
+ xmlTextWriterEndElement(writer);
|
||||
}
|
||||
|
||||
if (IsTextFrame())
|
||||
@@ -421,22 +427,16 @@ void SwFrame::dumpInfosAsXml( xmlTextWriterPtr writer ) const
|
||||
{
|
||||
// output the Frame
|
||||
xmlTextWriterStartElement( writer, BAD_CAST( "bounds" ) );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", getFrameArea().Left() );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", getFrameArea().Top() );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", getFrameArea().Width() );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", getFrameArea().Height() );
|
||||
+ getFrameArea().dumpAsXmlAttributes(writer);
|
||||
xmlTextWriterWriteAttribute(writer, BAD_CAST("mbFixSize"), BAD_CAST(OString::boolean(HasFixSize()).getStr()));
|
||||
xmlTextWriterWriteAttribute(writer, BAD_CAST("mbValidPos"), BAD_CAST(OString::boolean(isFrameAreaPositionValid()).getStr()));
|
||||
xmlTextWriterWriteAttribute(writer, BAD_CAST("mbValidSize"), BAD_CAST(OString::boolean(isFrameAreaSizeValid()).getStr()));
|
||||
xmlTextWriterWriteAttribute(writer, BAD_CAST("mbValidPrtArea"), BAD_CAST(OString::boolean(isFramePrintAreaValid()).getStr()));
|
||||
xmlTextWriterEndElement( writer );
|
||||
|
||||
- // output the Prt
|
||||
+ // output the print area
|
||||
xmlTextWriterStartElement( writer, BAD_CAST( "prtBounds" ) );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", getFramePrintArea().Left() );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", getFramePrintArea().Top() );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", getFramePrintArea().Width() );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", getFramePrintArea().Height() );
|
||||
+ getFramePrintArea().dumpAsXmlAttributes(writer);
|
||||
xmlTextWriterEndElement( writer );
|
||||
}
|
||||
|
||||
@@ -515,10 +515,7 @@ void SwAnchoredObject::dumpAsXml( xmlTextWriterPtr writer ) const
|
||||
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ptr" ), "%p", this );
|
||||
|
||||
xmlTextWriterStartElement( writer, BAD_CAST( "bounds" ) );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", GetObjBoundRect().Left() );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", GetObjBoundRect().Top() );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", GetObjBoundRect().Width() );
|
||||
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", GetObjBoundRect().Height() );
|
||||
+ GetObjBoundRect().dumpAsXmlAttributes(writer);
|
||||
xmlTextWriterEndElement( writer );
|
||||
|
||||
if (const SdrObject* pObject = GetDrawObj())
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,44 +0,0 @@
|
||||
From c91584ef805866b46b06fe7451b077f9f33419b4 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Tue, 28 Apr 2020 17:28:16 +0200
|
||||
Subject: [PATCH] sw from-bottom relative orientation: add layout
|
||||
|
||||
The implementation is a combination of what "bottom" and "from-top"
|
||||
already provided.
|
||||
|
||||
Change-Id: Id7bac8cbcccbadcca377fe9946a21ccb3e368913
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93086
|
||||
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
||||
Tested-by: Jenkins
|
||||
(cherry picked from commit dd52fdba87d0cfee039cc236b86241708d4e63b8)
|
||||
---
|
||||
.../objectpositioning/objectpositioning.cxx | 33 +++++++++++++++++++
|
||||
.../tocntntanchoredobjectposition.cxx | 12 +++++++
|
||||
2 files changed, 45 insertions(+)
|
||||
|
||||
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
|
||||
index 18c08f8540d9..9bf3c7bfb6cb 100644
|
||||
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
|
||||
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
|
||||
@@ -548,6 +548,18 @@ void SwToContentAnchoredObjectPosition::CalcPosition()
|
||||
aRectFnSet.GetTop(aPgPrtRect),
|
||||
nTopOfOrient );
|
||||
}
|
||||
+ else if (aVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)
|
||||
+ {
|
||||
+ // The anchored object is relative from the bottom of the page's print area.
|
||||
+ SwRect aPgPrtRect(rPageAlignLayFrame.getFrameArea());
|
||||
+ if (rPageAlignLayFrame.IsPageFrame())
|
||||
+ {
|
||||
+ auto& rPageFrame = static_cast<const SwPageFrame&>(rPageAlignLayFrame);
|
||||
+ aPgPrtRect = rPageFrame.PrtWithoutHeaderAndFooter();
|
||||
+ }
|
||||
+ SwTwips nPageBottom = aRectFnSet.GetBottom(aPgPrtRect);
|
||||
+ nVertOffsetToFrameAnchorPos += aRectFnSet.YDiff(nPageBottom, nTopOfOrient);
|
||||
+ }
|
||||
nRelPosY = nVertOffsetToFrameAnchorPos + aVert.GetPos();
|
||||
}
|
||||
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,141 +0,0 @@
|
||||
From 49f0501f8ba4acd36067a84590469944e9d3234c Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Wed, 29 Apr 2020 12:31:25 +0200
|
||||
Subject: [PATCH] sw from-bottom relative orientation: add ODF filter
|
||||
|
||||
Map between RelOrientation::PAGE_PRINT_AREA_BOTTOM and
|
||||
loext:vertical-rel="page-content-bottom".
|
||||
|
||||
Conflicts:
|
||||
sw/qa/extras/odfexport/odfexport.cxx
|
||||
|
||||
Change-Id: I1d614bf7c82a76285f4268b8008e08c25ef9b7f0
|
||||
---
|
||||
include/xmloff/xmltoken.hxx | 2 ++
|
||||
.../OpenDocument-schema-v1.3+libreoffice.rng | 11 +++++++++++
|
||||
.../odfexport/data/page-content-bottom.odt | Bin 0 -> 8502 bytes
|
||||
sw/qa/extras/odfexport/odfexport.cxx | 7 +++++++
|
||||
xmloff/source/core/xmltoken.cxx | 2 ++
|
||||
xmloff/source/style/xmlexppr.cxx | 13 +++++++++++--
|
||||
xmloff/source/text/txtprhdl.cxx | 2 ++
|
||||
xmloff/source/text/txtprmap.cxx | 6 ++++++
|
||||
xmloff/source/token/tokens.txt | 1 +
|
||||
9 files changed, 42 insertions(+), 2 deletions(-)
|
||||
create mode 100644 sw/qa/extras/odfexport/data/page-content-bottom.odt
|
||||
|
||||
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
|
||||
index 1175958548ff..dfc9ad5ced3d 100644
|
||||
--- a/include/xmloff/xmltoken.hxx
|
||||
+++ b/include/xmloff/xmltoken.hxx
|
||||
@@ -3367,6 +3367,8 @@ namespace xmloff { namespace token {
|
||||
|
||||
XML_RESOLVED,
|
||||
|
||||
+ XML_PAGE_CONTENT_BOTTOM,
|
||||
+
|
||||
XML_TOKEN_END
|
||||
};
|
||||
|
||||
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
|
||||
index e0f6e4d7a216..b37e90f0b568 100644
|
||||
--- a/xmloff/source/core/xmltoken.cxx
|
||||
+++ b/xmloff/source/core/xmltoken.cxx
|
||||
@@ -3360,6 +3360,8 @@ namespace xmloff { namespace token {
|
||||
// For recording whether comments/annotations are resolved
|
||||
TOKEN( "resolved", XML_RESOLVED ),
|
||||
|
||||
+ TOKEN( "page-content-bottom", XML_PAGE_CONTENT_BOTTOM ),
|
||||
+
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
{ 0, nullptr, nullptr, XML_TOKEN_END }
|
||||
#else
|
||||
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
|
||||
index 76fd72c71deb..cd94fccae8dd 100644
|
||||
--- a/xmloff/source/style/xmlexppr.cxx
|
||||
+++ b/xmloff/source/style/xmlexppr.cxx
|
||||
@@ -1030,10 +1030,10 @@ void SvXMLExportPropertyMapper::_exportXML(
|
||||
if( bRemove )
|
||||
rAttrList.RemoveAttribute( sName );
|
||||
|
||||
+ // We don't seem to have a generic mechanism to write an attribute in the extension
|
||||
+ // namespace in case of certain attribute values only, so do this manually.
|
||||
if (IsXMLToken(mpImpl->mxPropMapper->GetEntryXMLName(rProperty.mnIndex), XML_WRITING_MODE))
|
||||
{
|
||||
- // We don't seem to have a generic mechanism to write an attribute in the extension
|
||||
- // namespace in case of certain attribute values only, so do this manually.
|
||||
if (IsXMLToken(aValue, XML_BT_LR))
|
||||
{
|
||||
sName = rNamespaceMap.GetQNameByKey(
|
||||
@@ -1041,6 +1041,15 @@ void SvXMLExportPropertyMapper::_exportXML(
|
||||
mpImpl->mxPropMapper->GetEntryXMLName(rProperty.mnIndex));
|
||||
}
|
||||
}
|
||||
+ else if (IsXMLToken(mpImpl->mxPropMapper->GetEntryXMLName(rProperty.mnIndex), XML_VERTICAL_REL))
|
||||
+ {
|
||||
+ if (IsXMLToken(aValue, XML_PAGE_CONTENT_BOTTOM))
|
||||
+ {
|
||||
+ sName = rNamespaceMap.GetQNameByKey(
|
||||
+ XML_NAMESPACE_LO_EXT,
|
||||
+ mpImpl->mxPropMapper->GetEntryXMLName(rProperty.mnIndex));
|
||||
+ }
|
||||
+ }
|
||||
|
||||
rAttrList.AddAttribute( sName, aValue );
|
||||
}
|
||||
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
|
||||
index 32644e5f7f1c..13770a7de558 100644
|
||||
--- a/xmloff/source/text/txtprhdl.cxx
|
||||
+++ b/xmloff/source/text/txtprhdl.cxx
|
||||
@@ -153,6 +153,7 @@ static SvXMLEnumMapEntry<sal_uInt16> const pXML_VertRel_Enum[] =
|
||||
// DVO, OD 17.09.2003 #i18732# - allow vertical alignment at page
|
||||
{ XML_PAGE, RelOrientation::PAGE_FRAME },
|
||||
{ XML_PAGE_CONTENT, RelOrientation::PAGE_PRINT_AREA },
|
||||
+ { XML_PAGE_CONTENT_BOTTOM, RelOrientation::PAGE_PRINT_AREA_BOTTOM },
|
||||
{ XML_FRAME, RelOrientation::FRAME }, // import only
|
||||
{ XML_FRAME_CONTENT, RelOrientation::PRINT_AREA }, // import only
|
||||
// OD 13.11.2003 #i22341# - new vertical alignment at top of line
|
||||
@@ -166,6 +167,7 @@ static SvXMLEnumMapEntry<sal_uInt16> const pXML_VertRelPage_Enum[] =
|
||||
{ XML_PAGE_CONTENT, RelOrientation::PRINT_AREA },
|
||||
{ XML_PAGE, RelOrientation::PAGE_FRAME },
|
||||
{ XML_PAGE_CONTENT, RelOrientation::PAGE_PRINT_AREA },
|
||||
+ { XML_PAGE_CONTENT_BOTTOM, RelOrientation::PAGE_PRINT_AREA_BOTTOM },
|
||||
{ XML_TOKEN_INVALID, 0 }
|
||||
};
|
||||
|
||||
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
|
||||
index ebd91ebc3062..e3597b7c6f50 100644
|
||||
--- a/xmloff/source/text/txtprmap.cxx
|
||||
+++ b/xmloff/source/text/txtprmap.cxx
|
||||
@@ -736,6 +736,9 @@ XMLPropertyMapEntry const aXMLFramePropMap[] =
|
||||
MG_ED( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL, CTF_VERTICALREL ),
|
||||
MG_ED( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_PAGE ),
|
||||
MG_ED( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_VERTICALREL_FRAME ),
|
||||
+ MAP_EXT_I( "VertOrientRelation", XML_NAMESPACE_LO_EXT, XML_VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL|XML_TYPE_PROP_GRAPHIC|MID_FLAG_DEFAULT_ITEM_EXPORT, CTF_VERTICALREL ),
|
||||
+ MAP_EXT_I( "VertOrientRelation", XML_NAMESPACE_LO_EXT, XML_VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT|XML_TYPE_PROP_GRAPHIC|MID_FLAG_DEFAULT_ITEM_EXPORT, CTF_VERTICALREL_PAGE ),
|
||||
+ MAP_EXT_I( "VertOrientRelation", XML_NAMESPACE_LO_EXT, XML_VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT|XML_TYPE_PROP_GRAPHIC|MID_FLAG_DEFAULT_ITEM_EXPORT, CTF_VERTICALREL_FRAME ),
|
||||
// RES_HORI_ORIENT
|
||||
MG_ED( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS|MID_FLAG_MULTI_PROPERTY, CTF_HORIZONTALPOS ),
|
||||
MG_ED( "PageToggle", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_MIRROR, CTF_HORIZONTALMIRROR ),
|
||||
@@ -901,6 +904,9 @@ XMLPropertyMapEntry const aXMLShapePropMap[] =
|
||||
MG_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL, CTF_SHAPE_VERTICALREL ),
|
||||
MG_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_VERTICALREL_PAGE ),
|
||||
MG_E( "VertOrientRelation", STYLE, VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_SHAPE_VERTICALREL_FRAME ),
|
||||
+ MAP_EXT_I( "VertOrientRelation", XML_NAMESPACE_LO_EXT, XML_VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL|XML_TYPE_PROP_GRAPHIC, CTF_VERTICALREL ),
|
||||
+ MAP_EXT_I( "VertOrientRelation", XML_NAMESPACE_LO_EXT, XML_VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_PAGE|MID_FLAG_SPECIAL_ITEM_IMPORT|XML_TYPE_PROP_GRAPHIC, CTF_VERTICALREL_PAGE ),
|
||||
+ MAP_EXT_I( "VertOrientRelation", XML_NAMESPACE_LO_EXT, XML_VERTICAL_REL, XML_TYPE_TEXT_VERTICAL_REL_FRAME|MID_FLAG_SPECIAL_ITEM_IMPORT|XML_TYPE_PROP_GRAPHIC, CTF_VERTICALREL_FRAME ),
|
||||
// RES_HORI_ORIENT
|
||||
MG_E( "HoriOrient", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_POS|MID_FLAG_MULTI_PROPERTY, CTF_SHAPE_HORIZONTALPOS ),
|
||||
MG_E( "PageToggle", STYLE, HORIZONTAL_POS, XML_TYPE_TEXT_HORIZONTAL_MIRROR, CTF_SHAPE_HORIZONTALMIRROR ),
|
||||
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
|
||||
index 921ff2b63b5a..ef2aaca8ea77 100644
|
||||
--- a/xmloff/source/token/tokens.txt
|
||||
+++ b/xmloff/source/token/tokens.txt
|
||||
@@ -3127,4 +3127,5 @@ newline
|
||||
creator-initials
|
||||
transliteration-spellout
|
||||
resolved
|
||||
+page-content-bottom
|
||||
TOKEN_END_DUMMY
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,56 +0,0 @@
|
||||
From d29f4857da385db17fe9efd4157c0a021531d0c4 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Wed, 29 Apr 2020 19:19:37 +0200
|
||||
Subject: [PATCH] sw from-bottom relative orientation: add DOCX filter
|
||||
|
||||
The OOXML equivalent is <wp:positionV relativeFrom="bottomMargin">, and
|
||||
the position is typically a negative number (i.e. the position is the
|
||||
offset between the top of the shape and the top of the top or bottom
|
||||
margin; not the distance and it's always the top of some margin).
|
||||
|
||||
(cherry picked from commit fc620901ddd134f644a56ed4ea4a9b5446cc5675)
|
||||
|
||||
Conflicts:
|
||||
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
|
||||
|
||||
Change-Id: Ia979bc8bfaa37d29b0947c4408335e0a80c05880
|
||||
---
|
||||
.../ooxmlexport/data/page-content-bottom.docx | Bin 0 -> 5007 bytes
|
||||
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 11 +++++++++++
|
||||
sw/source/filter/ww8/docxsdrexport.cxx | 3 +++
|
||||
writerfilter/source/dmapper/GraphicHelpers.cxx | 4 ++++
|
||||
4 files changed, 18 insertions(+)
|
||||
create mode 100644 sw/qa/extras/ooxmlexport/data/page-content-bottom.docx
|
||||
|
||||
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
|
||||
index 7cacc4eb3173..e9381ca77d0d 100644
|
||||
--- a/sw/source/filter/ww8/docxsdrexport.cxx
|
||||
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
|
||||
@@ -498,6 +498,9 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
|
||||
case text::RelOrientation::PAGE_PRINT_AREA:
|
||||
relativeFromV = "margin";
|
||||
break;
|
||||
+ case text::RelOrientation::PAGE_PRINT_AREA_BOTTOM:
|
||||
+ relativeFromV = "bottomMargin";
|
||||
+ break;
|
||||
case text::RelOrientation::PAGE_FRAME:
|
||||
relativeFromV = "page";
|
||||
break;
|
||||
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
|
||||
index 9168ad51eebd..7e8564826758 100644
|
||||
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
|
||||
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
|
||||
@@ -75,6 +75,10 @@ void PositionHandler::lcl_attribute( Id aName, Value& rVal )
|
||||
m_nRelation = text::RelOrientation::PAGE_FRAME;
|
||||
break;
|
||||
|
||||
+ case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_bottomMargin:
|
||||
+ m_nRelation = text::RelOrientation::PAGE_PRINT_AREA_BOTTOM;
|
||||
+ break;
|
||||
+
|
||||
case NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_paragraph:
|
||||
m_nRelation = text::RelOrientation::FRAME;
|
||||
break;
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,95 +0,0 @@
|
||||
From 1b9c1803f6f42adc23f65ff4182c15192c4b7b92 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Tue, 5 May 2020 13:59:16 +0200
|
||||
Subject: [PATCH] sw from-bottom relative orientation: add UI
|
||||
|
||||
And fix the value of LAST: it seems this went wrong in commit
|
||||
c2fc91664f71c447209d2cd29c0df1d7faba4927 (Convert LB flags to scoped
|
||||
enum, 2016-05-14), where the upper limit went from 0x80000000 to
|
||||
0x080000, which means it started to matter if we allow equality or not.
|
||||
Other places compare LAST without allowing equality, so leave that
|
||||
unchanged and instead give LAST its own value.
|
||||
|
||||
Change-Id: I0ceac18475f5f50b792c7a8442648c9ba2a25236
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93477
|
||||
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
||||
Tested-by: Jenkins
|
||||
(cherry picked from commit 8af2c4e3a517e3b75f2ace9719c1ca03153baddf)
|
||||
---
|
||||
cui/source/tabpages/swpossizetabpage.cxx | 11 +++++++----
|
||||
include/svx/swframeposstrings.hxx | 1 +
|
||||
svx/inc/swframeposstrings.hrc | 1 +
|
||||
3 files changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
|
||||
index 46a210559892..d4ade3ea4dfc 100644
|
||||
--- a/cui/source/tabpages/swpossizetabpage.cxx
|
||||
+++ b/cui/source/tabpages/swpossizetabpage.cxx
|
||||
@@ -94,10 +94,12 @@ enum class LB {
|
||||
// #i22341#
|
||||
VertLine = 0x080000, // vertical text line
|
||||
|
||||
- LAST = VertLine
|
||||
+ RelPagePrintAreaBottom = 0x100000, // bottom of text area of page
|
||||
+
|
||||
+ LAST = 0x200000
|
||||
};
|
||||
namespace o3tl {
|
||||
- template<> struct typed_flags<LB> : is_typed_flags<LB, 0x0fffff> {};
|
||||
+ template<> struct typed_flags<LB> : is_typed_flags<LB, 0x3fffff> {};
|
||||
}
|
||||
|
||||
static RelationMap const aRelationMap[] =
|
||||
@@ -110,6 +112,7 @@ static RelationMap const aRelationMap[] =
|
||||
{SwFPos::REL_FRM_RIGHT, SwFPos::MIR_REL_FRM_RIGHT, LB::RelFrameRight, RelOrientation::FRAME_RIGHT},
|
||||
{SwFPos::REL_PG_FRAME, SwFPos::REL_PG_FRAME, LB::RelPageFrame, RelOrientation::PAGE_FRAME},
|
||||
{SwFPos::REL_PG_PRTAREA,SwFPos::REL_PG_PRTAREA, LB::RelPagePrintArea, RelOrientation::PAGE_PRINT_AREA},
|
||||
+ {SwFPos::REL_PG_PRTAREA_BOTTOM,SwFPos::REL_PG_PRTAREA_BOTTOM, LB::RelPagePrintAreaBottom, RelOrientation::PAGE_PRINT_AREA_BOTTOM},
|
||||
{SwFPos::REL_CHAR, SwFPos::REL_CHAR, LB::RelChar, RelOrientation::CHAR},
|
||||
|
||||
{SwFPos::FLY_REL_PG_LEFT, SwFPos::FLY_MIR_REL_PG_LEFT, LB::FlyRelPageLeft, RelOrientation::PAGE_LEFT},
|
||||
@@ -257,7 +260,7 @@ static FrmMap const aVParaMap[] =
|
||||
{SwFPos::TOP, SwFPos::TOP, VertOrientation::TOP, VERT_PARA_REL},
|
||||
{SwFPos::BOTTOM, SwFPos::BOTTOM, VertOrientation::BOTTOM, VERT_PARA_REL},
|
||||
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, VertOrientation::CENTER, VERT_PARA_REL},
|
||||
- {SwFPos::FROMTOP, SwFPos::FROMTOP, VertOrientation::NONE, VERT_PARA_REL}
|
||||
+ {SwFPos::FROMTOP, SwFPos::FROMTOP, VertOrientation::NONE, VERT_PARA_REL|LB::RelPagePrintAreaBottom}
|
||||
};
|
||||
|
||||
static FrmMap const aVParaHtmlMap[] =
|
||||
@@ -314,7 +317,7 @@ static FrmMap aVCharMap[] =
|
||||
{SwFPos::BOTTOM, SwFPos::BOTTOM, VertOrientation::BOTTOM, VERT_CHAR_REL|LB::RelChar},
|
||||
{SwFPos::BELOW, SwFPos::BELOW, VertOrientation::CHAR_BOTTOM, LB::RelChar},
|
||||
{SwFPos::CENTER_VERT, SwFPos::CENTER_VERT, VertOrientation::CENTER, VERT_CHAR_REL|LB::RelChar},
|
||||
- {SwFPos::FROMTOP, SwFPos::FROMTOP, VertOrientation::NONE, VERT_CHAR_REL},
|
||||
+ {SwFPos::FROMTOP, SwFPos::FROMTOP, VertOrientation::NONE, VERT_CHAR_REL|LB::RelPagePrintAreaBottom},
|
||||
{SwFPos::FROMBOTTOM, SwFPos::FROMBOTTOM, VertOrientation::NONE, LB::RelChar|LB::VertLine},
|
||||
{SwFPos::TOP, SwFPos::TOP, VertOrientation::LINE_TOP, LB::VertLine},
|
||||
{SwFPos::BOTTOM, SwFPos::BOTTOM, VertOrientation::LINE_BOTTOM, LB::VertLine},
|
||||
diff --git a/include/svx/swframeposstrings.hxx b/include/svx/swframeposstrings.hxx
|
||||
index c0ef3a3520d0..61d06d459cdf 100644
|
||||
--- a/include/svx/swframeposstrings.hxx
|
||||
+++ b/include/svx/swframeposstrings.hxx
|
||||
@@ -49,6 +49,7 @@ public:
|
||||
MIR_REL_FRM_RIGHT ,
|
||||
REL_PG_FRAME ,
|
||||
REL_PG_PRTAREA ,
|
||||
+ REL_PG_PRTAREA_BOTTOM ,
|
||||
REL_BASE ,
|
||||
REL_CHAR ,
|
||||
REL_ROW ,
|
||||
diff --git a/svx/inc/swframeposstrings.hrc b/svx/inc/swframeposstrings.hrc
|
||||
index df4d92a976fb..b08a9a3b525b 100644
|
||||
--- a/svx/inc/swframeposstrings.hrc
|
||||
+++ b/svx/inc/swframeposstrings.hrc
|
||||
@@ -43,6 +43,7 @@ const char* RID_SVXSW_FRAMEPOSITIONS[] =
|
||||
NC_("RID_SVXSW_FRAMEPOSITIONS", "Outer paragraph border"),
|
||||
NC_("RID_SVXSW_FRAMEPOSITIONS", "Entire page"),
|
||||
NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area"),
|
||||
+ NC_("RID_SVXSW_FRAMEPOSITIONS", "Page text area bottom"),
|
||||
NC_("RID_SVXSW_FRAMEPOSITIONS", "Base line"),
|
||||
NC_("RID_SVXSW_FRAMEPOSITIONS", "Character"),
|
||||
NC_("RID_SVXSW_FRAMEPOSITIONS", "Row"),
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,156 +0,0 @@
|
||||
From b6969472df1564351f10af94ea373af6e7435aab Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Tue, 5 May 2020 18:03:51 +0200
|
||||
Subject: [PATCH] sw from-bottom relative orientation: fix calculation of
|
||||
position limits
|
||||
|
||||
Create a new Writer doc, insert a rectangle with height = 10cm, try to
|
||||
position it 2cm above the bottom of the page, so that would be -12cm,
|
||||
but we limited the metric field to -2cm because 2cm was the page margin.
|
||||
|
||||
Teach SwFEShell::CalcBoundRect() about
|
||||
text::RelOrientation::PAGE_PRINT_AREA_BOTTOM, then this will work
|
||||
without problems.
|
||||
|
||||
(cherry picked from commit e21bc1b3e587c2bd90168b24f3774d98a3837f8e)
|
||||
|
||||
Conflicts:
|
||||
sw/qa/core/frmedt/frmedt.cxx
|
||||
|
||||
Change-Id: Ib6ddccc1512d39fff5bff2e989973b156a6c2bf7
|
||||
---
|
||||
sw/qa/core/frmedt/frmedt.cxx | 54 ++++++++++++++++++++++++++++
|
||||
sw/source/core/frmedt/fews.cxx | 16 ++++++++-
|
||||
sw/source/uibase/shells/drwbassh.cxx | 3 +-
|
||||
3 files changed, 71 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sw/qa/core/frmedt/frmedt.cxx b/sw/qa/core/frmedt/frmedt.cxx
|
||||
index cf3d1945e049..6c29e647d391 100644
|
||||
--- a/sw/qa/core/frmedt/frmedt.cxx
|
||||
+++ b/sw/qa/core/frmedt/frmedt.cxx
|
||||
@@ -13,6 +13,9 @@
|
||||
#include <comphelper/classids.hxx>
|
||||
#include <tools/globname.hxx>
|
||||
#include <svtools/embedhlp.hxx>
|
||||
+
|
||||
+#include <com/sun/star/text/VertOrientation.hpp>
|
||||
+
|
||||
#include <svx/svdpage.hxx>
|
||||
|
||||
#include <wrtsh.hxx>
|
||||
@@ -20,6 +23,8 @@
|
||||
#include <IDocumentDrawModelAccess.hxx>
|
||||
#include <drawdoc.hxx>
|
||||
#include <dcontact.hxx>
|
||||
+#include <docary.hxx>
|
||||
+#include <pagefrm.hxx>
|
||||
|
||||
static char const DATA_DIRECTORY[] = "/sw/qa/core/frmedt/data/";
|
||||
|
||||
@@ -58,6 +63,55 @@ CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testTextboxReanchor)
|
||||
CPPUNIT_ASSERT_EQUAL(nOldAnchor, nNewAnchor);
|
||||
}
|
||||
|
||||
+CPPUNIT_TEST_FIXTURE(SwCoreFrmedtTest, testVertPosFromBottomBoundingBox)
|
||||
+{
|
||||
+ // Insert a shape and anchor it vertically in a way, so its position is from the top of the page
|
||||
+ // bottom margin area.
|
||||
+ mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument");
|
||||
+ uno::Reference<css::lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
|
||||
+ uno::Reference<drawing::XShape> xShape(
|
||||
+ xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
|
||||
+ xShape->setSize(awt::Size(10000, 10000));
|
||||
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
|
||||
+ xShapeProps->setPropertyValue("AnchorType",
|
||||
+ uno::makeAny(text::TextContentAnchorType_AT_CHARACTER));
|
||||
+ xShapeProps->setPropertyValue("VertOrient", uno::makeAny(text::VertOrientation::NONE));
|
||||
+ xShapeProps->setPropertyValue("VertOrientRelation",
|
||||
+ uno::makeAny(text::RelOrientation::PAGE_PRINT_AREA_BOTTOM));
|
||||
+ xShapeProps->setPropertyValue("VertOrientPosition",
|
||||
+ uno::makeAny(static_cast<sal_Int32>(-11000)));
|
||||
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
|
||||
+ xDrawPageSupplier->getDrawPage()->add(xShape);
|
||||
+
|
||||
+ // Get the absolute position of the top of the page bottom margin area.
|
||||
+ xmlDocPtr pXmlDoc = parseLayoutDump();
|
||||
+ SwTwips nPagePrintAreaBottom = getXPath(pXmlDoc, "//page/infos/prtBounds", "bottom").toInt32();
|
||||
+
|
||||
+ // Calculate the allowed bounding box of the shape, e.g. the shape's position & size dialog uses
|
||||
+ // this to limit the vertical position to sensible values.
|
||||
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
|
||||
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
|
||||
+ SwRect aBoundRect;
|
||||
+ RndStdIds eAnchorType = RndStdIds::FLY_AT_CHAR;
|
||||
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
|
||||
+ const auto& rFrameFormats = *pDoc->GetFrameFormats();
|
||||
+ const SwPosition* pContentPos = rFrameFormats[0]->GetAnchor().GetContentAnchor();
|
||||
+ sal_Int16 eHoriRelOrient = text::RelOrientation::PAGE_FRAME;
|
||||
+ sal_Int16 eVertRelOrient = text::RelOrientation::PAGE_PRINT_AREA_BOTTOM;
|
||||
+ bool bFollowTextFlow = false;
|
||||
+ bool bMirror = false;
|
||||
+ Size aPercentSize;
|
||||
+ pWrtShell->CalcBoundRect(aBoundRect, eAnchorType, eHoriRelOrient, eVertRelOrient, pContentPos,
|
||||
+ bFollowTextFlow, bMirror, nullptr, &aPercentSize);
|
||||
+
|
||||
+ // Without the accompanying fix in place, this test would have failed with:
|
||||
+ // - Expected: -14705
|
||||
+ // - Actual : -1134
|
||||
+ // i.e. UI did not allow anchoring a shape 10cm above the bottom of the page due to wrong
|
||||
+ // bounding box.
|
||||
+ CPPUNIT_ASSERT_EQUAL(-1 * nPagePrintAreaBottom, aBoundRect.Pos().getY());
|
||||
+}
|
||||
+
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
|
||||
index 2f874fd34e24..b20c37d28674 100644
|
||||
--- a/sw/source/core/frmedt/fews.cxx
|
||||
+++ b/sw/source/core/frmedt/fews.cxx
|
||||
@@ -967,7 +967,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
|
||||
// #i18732# - adjustment vertical 'virtual' anchor position
|
||||
// (<aPos.Y()> respectively <aPos.X()>), if object is vertical aligned
|
||||
// to page areas.
|
||||
- if ( _eVertRelOrient == text::RelOrientation::PAGE_FRAME || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA )
|
||||
+ if (_eVertRelOrient == text::RelOrientation::PAGE_FRAME
|
||||
+ || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA
|
||||
+ || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)
|
||||
{
|
||||
if ( aRectFnSet.IsVert() && !aRectFnSet.IsVertL2R() )
|
||||
{
|
||||
@@ -998,6 +1000,18 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect,
|
||||
aPos.setY(aPos.getY() + pTmpFrame->getFrameArea().Height());
|
||||
}
|
||||
}
|
||||
+ else if (_eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA_BOTTOM)
|
||||
+ {
|
||||
+ if (rVertEnvironLayFrame.IsPageFrame())
|
||||
+ {
|
||||
+ auto& rPageFrame = static_cast<const SwPageFrame&>(rVertEnvironLayFrame);
|
||||
+ aPos.setY(rPageFrame.PrtWithoutHeaderAndFooter().Bottom());
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ aPos.AdjustY(rVertEnvironLayFrame.getFramePrintArea().Bottom());
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
|
||||
index 12d87bab691b..d0d4cba2cba8 100644
|
||||
--- a/sw/source/uibase/shells/drwbassh.cxx
|
||||
+++ b/sw/source/uibase/shells/drwbassh.cxx
|
||||
@@ -932,7 +932,8 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValidation,
|
||||
// and alignment at page areas.
|
||||
const bool bMaxVPosAtBottom = !rValidation.bFollowTextFlow ||
|
||||
rValidation.nVRelOrient == text::RelOrientation::PAGE_FRAME ||
|
||||
- rValidation.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA;
|
||||
+ rValidation.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA ||
|
||||
+ rValidation.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA_BOTTOM;
|
||||
{
|
||||
SwTwips nTmpMaxVPos = ( bMaxVPosAtBottom
|
||||
? aBoundRect.Bottom()
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,132 +0,0 @@
|
||||
From b4ed373a15b1e8d90c94ec7030ee3d3785f7e8f9 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Fri, 8 May 2020 16:43:22 +0200
|
||||
Subject: [PATCH] Related: tdf#129916 svx: improve shadow size of custom shapes
|
||||
|
||||
There are multiple problems with this bug document, the first is that
|
||||
the shadow primitive got the default position (0) of the owning shape.
|
||||
Do it the same way as commit 6454b6336b8de9a4c5899adeab552af6f794cdc4
|
||||
(tdf#130058 Import shadow size., 2020-04-14) did for graphic objects.
|
||||
|
||||
This requires constructing a transform matrix in
|
||||
ViewContactOfSdrObjCustomShape::createViewIndependentPrimitive2DSequence(),
|
||||
include position and size in that as a start.
|
||||
|
||||
(cherry picked from commit e2b0e614e1185c960b3015414919f69a1ed35aa0)
|
||||
|
||||
Change-Id: Ia51df555c1984971afe7c52ba3f2658099a4e7b3
|
||||
---
|
||||
.../primitive2d/sdrcustomshapeprimitive2d.hxx | 5 ++++-
|
||||
.../viewcontactofsdrobjcustomshape.cxx | 19 +++++++++++++------
|
||||
.../primitive2d/sdrcustomshapeprimitive2d.cxx | 14 +++++++++++---
|
||||
3 files changed, 28 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
|
||||
index 285185684f15..84488906470a 100644
|
||||
--- a/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
|
||||
+++ b/svx/inc/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
|
||||
@@ -47,6 +47,8 @@ namespace drawinglayer
|
||||
// making exceptions with shadow generation
|
||||
bool const mb3DShape : 1;
|
||||
|
||||
+ basegfx::B2DHomMatrix maTransform;
|
||||
+
|
||||
protected:
|
||||
// local decomposition.
|
||||
virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& aViewInformation) const override;
|
||||
@@ -57,7 +59,8 @@ namespace drawinglayer
|
||||
const Primitive2DContainer& rSubPrimitives,
|
||||
const basegfx::B2DHomMatrix& rTextBox,
|
||||
bool bWordWrap,
|
||||
- bool b3DShape);
|
||||
+ bool b3DShape,
|
||||
+ const basegfx::B2DHomMatrix& rObjectMatrix);
|
||||
|
||||
// data access
|
||||
const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; }
|
||||
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
|
||||
index 8630b6dd1923..7a5c0487a13f 100644
|
||||
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
|
||||
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
|
||||
@@ -157,13 +157,13 @@ namespace sdr
|
||||
basegfx::B2DHomMatrix aTextBoxMatrix;
|
||||
bool bWordWrap(false);
|
||||
|
||||
+ // take unrotated snap rect as default, then get the
|
||||
+ // unrotated text box. Rotation needs to be done centered
|
||||
+ const tools::Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
|
||||
+ const basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(aObjectBound);
|
||||
+
|
||||
if(bHasText)
|
||||
{
|
||||
- // take unrotated snap rect as default, then get the
|
||||
- // unrotated text box. Rotation needs to be done centered
|
||||
- const tools::Rectangle aObjectBound(GetCustomShapeObj().GetGeoRect());
|
||||
- const basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(aObjectBound);
|
||||
-
|
||||
// #i101684# get the text range unrotated and absolute to the object range
|
||||
const basegfx::B2DRange aTextRange(getCorrectedTextBoundRect());
|
||||
|
||||
@@ -238,6 +238,12 @@ namespace sdr
|
||||
bWordWrap = GetCustomShapeObj().GetMergedItem(SDRATTR_TEXT_WORDWRAP).GetValue();
|
||||
}
|
||||
|
||||
+ // fill object matrix
|
||||
+ const basegfx::B2DHomMatrix aObjectMatrix(basegfx::utils::createScaleShearXRotateTranslateB2DHomMatrix(
|
||||
+ aObjectRange.getWidth(), aObjectRange.getHeight(),
|
||||
+ /*fShearX=*/0, /*fRotate=*/0,
|
||||
+ aObjectRange.getMinX(), aObjectRange.getMinY()));
|
||||
+
|
||||
// create primitive
|
||||
const drawinglayer::primitive2d::Primitive2DReference xReference(
|
||||
new drawinglayer::primitive2d::SdrCustomShapePrimitive2D(
|
||||
@@ -245,7 +251,8 @@ namespace sdr
|
||||
xGroup,
|
||||
aTextBoxMatrix,
|
||||
bWordWrap,
|
||||
- b3DShape));
|
||||
+ b3DShape,
|
||||
+ aObjectMatrix));
|
||||
xRetval = drawinglayer::primitive2d::Primitive2DContainer { xReference };
|
||||
}
|
||||
|
||||
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
|
||||
index fb3018f7ff88..3e0350aaf56c 100644
|
||||
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
|
||||
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
|
||||
@@ -68,7 +68,13 @@ namespace drawinglayer
|
||||
// shadow will be correct (using ColorModifierStack), but expensive.
|
||||
if(!get3DShape())
|
||||
{
|
||||
- aRetval = createEmbeddedShadowPrimitive(aRetval, getSdrSTAttribute().getShadow());
|
||||
+ basegfx::B2DTuple aScale;
|
||||
+ basegfx::B2DTuple aTranslate;
|
||||
+ double fRotate = 0;
|
||||
+ double fShearX = 0;
|
||||
+ maTransform.decompose(aScale, aTranslate, fRotate, fShearX);
|
||||
+ aRetval = createEmbeddedShadowPrimitive(aRetval, getSdrSTAttribute().getShadow(),
|
||||
+ aTranslate.getX(), aTranslate.getY());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,13 +86,15 @@ namespace drawinglayer
|
||||
const Primitive2DContainer& rSubPrimitives,
|
||||
const basegfx::B2DHomMatrix& rTextBox,
|
||||
bool bWordWrap,
|
||||
- bool b3DShape)
|
||||
+ bool b3DShape,
|
||||
+ const basegfx::B2DHomMatrix& rTransform)
|
||||
: BufferedDecompositionPrimitive2D(),
|
||||
maSdrSTAttribute(rSdrSTAttribute),
|
||||
maSubPrimitives(rSubPrimitives),
|
||||
maTextBox(rTextBox),
|
||||
mbWordWrap(bWordWrap),
|
||||
- mb3DShape(b3DShape)
|
||||
+ mb3DShape(b3DShape),
|
||||
+ maTransform(rTransform)
|
||||
{
|
||||
}
|
||||
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,141 +0,0 @@
|
||||
From f9dcb113bc2f81ef6abd2044d8512cd4e02f176c Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Mon, 11 May 2020 10:10:34 +0200
|
||||
Subject: [PATCH] Related: tdf#129916 svx: clean up duplicated matrix decompose
|
||||
for shadow size
|
||||
|
||||
Pass the object's transform matrix to createEmbeddedShadowPrimitive(),
|
||||
this allows decomposing it only at a single place. Also, this will allow
|
||||
creating the shadow based on the object size.
|
||||
|
||||
(cherry picked from commit 4ba368a3dd793bdc703858f358e1af7112decadd)
|
||||
|
||||
Conflicts:
|
||||
svx/inc/sdr/primitive2d/sdrdecompositiontools.hxx
|
||||
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
|
||||
Change-Id: I8d8bf59934b00e13cda1da0398910aa9f1ce3c59
|
||||
---
|
||||
.../svx/sdr/primitive2d/sdrdecompositiontools.hxx | 4 ++--
|
||||
.../sdr/primitive2d/sdrcustomshapeprimitive2d.cxx | 7 +------
|
||||
.../sdr/primitive2d/sdrdecompositiontools.cxx | 13 +++++++++----
|
||||
svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx | 8 +-------
|
||||
4 files changed, 13 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
|
||||
index 844da339c111..8635981dc0ae 100644
|
||||
--- a/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
|
||||
+++ b/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
|
||||
@@ -21,6 +21,7 @@
|
||||
#define INCLUDED_SVX_SDR_PRIMITIVE2D_SDRDECOMPOSITIONTOOLS_HXX
|
||||
|
||||
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
|
||||
+#include <basegfx/matrix/b2dhommatrix.hxx>
|
||||
|
||||
#include <svx/svxdllapi.h>
|
||||
|
||||
@@ -72,8 +73,7 @@ namespace drawinglayer
|
||||
Primitive2DContainer SVX_DLLPUBLIC createEmbeddedShadowPrimitive(
|
||||
const Primitive2DContainer& rContent,
|
||||
const attribute::SdrShadowAttribute& rShadow,
|
||||
- sal_Int32 nGraphicTranslateX = 0,
|
||||
- sal_Int32 nGraphicTranslateY = 0);
|
||||
+ const basegfx::B2DHomMatrix& rObjectMatrix = basegfx::B2DHomMatrix());
|
||||
|
||||
} // end of namespace primitive2d
|
||||
} // end of namespace drawinglayer
|
||||
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
|
||||
index 3e0350aaf56c..2334b1d7fef6 100644
|
||||
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
|
||||
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
|
||||
@@ -68,13 +68,8 @@ namespace drawinglayer
|
||||
// shadow will be correct (using ColorModifierStack), but expensive.
|
||||
if(!get3DShape())
|
||||
{
|
||||
- basegfx::B2DTuple aScale;
|
||||
- basegfx::B2DTuple aTranslate;
|
||||
- double fRotate = 0;
|
||||
- double fShearX = 0;
|
||||
- maTransform.decompose(aScale, aTranslate, fRotate, fShearX);
|
||||
aRetval = createEmbeddedShadowPrimitive(aRetval, getSdrSTAttribute().getShadow(),
|
||||
- aTranslate.getX(), aTranslate.getY());
|
||||
+ maTransform);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
index d6822bfd1519..42c0bb60ecc9 100644
|
||||
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <drawinglayer/attribute/sdrlineattribute.hxx>
|
||||
#include <drawinglayer/attribute/sdrlinestartendattribute.hxx>
|
||||
#include <drawinglayer/attribute/sdrshadowattribute.hxx>
|
||||
+#include <sal/log.hxx>
|
||||
|
||||
|
||||
using namespace com::sun::star;
|
||||
@@ -482,8 +483,7 @@ namespace drawinglayer
|
||||
Primitive2DContainer createEmbeddedShadowPrimitive(
|
||||
const Primitive2DContainer& rContent,
|
||||
const attribute::SdrShadowAttribute& rShadow,
|
||||
- sal_Int32 nGraphicTranslateX,
|
||||
- sal_Int32 nGraphicTranslateY)
|
||||
+ const basegfx::B2DHomMatrix& rObjectMatrix)
|
||||
{
|
||||
if(!rContent.empty())
|
||||
{
|
||||
@@ -493,10 +493,15 @@ namespace drawinglayer
|
||||
{
|
||||
if(rShadow.getSize().getX() != 100000)
|
||||
{
|
||||
+ basegfx::B2DTuple aScale;
|
||||
+ basegfx::B2DTuple aTranslate;
|
||||
+ double fRotate = 0;
|
||||
+ double fShearX = 0;
|
||||
+ rObjectMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
|
||||
// Scale the shadow
|
||||
- aShadowOffset.translate(-nGraphicTranslateX, -nGraphicTranslateY);
|
||||
+ aShadowOffset.translate(-aTranslate.getX(), -aTranslate.getY());
|
||||
aShadowOffset.scale(rShadow.getSize().getX() * 0.00001, rShadow.getSize().getY() * 0.00001);
|
||||
- aShadowOffset.translate(nGraphicTranslateX, nGraphicTranslateY);
|
||||
+ aShadowOffset.translate(aTranslate.getX(), aTranslate.getY());
|
||||
}
|
||||
|
||||
aShadowOffset.translate(rShadow.getOffset().getX(), rShadow.getOffset().getY());
|
||||
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
|
||||
index 676b26183b09..be25a1278e64 100644
|
||||
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
|
||||
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
|
||||
@@ -35,7 +35,6 @@ namespace drawinglayer
|
||||
void SdrGrafPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*aViewInformation*/) const
|
||||
{
|
||||
Primitive2DContainer aRetval;
|
||||
- basegfx::B2DTuple aTranslateGrf;
|
||||
|
||||
// create unit outline polygon
|
||||
const basegfx::B2DPolygon& aUnitOutline(basegfx::utils::createUnitPolygon());
|
||||
@@ -62,10 +61,6 @@ namespace drawinglayer
|
||||
getTransform(),
|
||||
getGraphicObject(),
|
||||
getGraphicAttr()));
|
||||
- double fRotate = 0;
|
||||
- double fShearX = 0;
|
||||
- basegfx::B2DTuple aScaleGrf;
|
||||
- getTransform().decompose(aScaleGrf, aTranslateGrf, fRotate, fShearX);
|
||||
aRetval.push_back(xGraphicContentPrimitive);
|
||||
}
|
||||
|
||||
@@ -127,8 +122,7 @@ namespace drawinglayer
|
||||
aRetval = createEmbeddedShadowPrimitive(
|
||||
aRetval,
|
||||
getSdrLFSTAttribute().getShadow(),
|
||||
- aTranslateGrf.getX(),
|
||||
- aTranslateGrf.getY());
|
||||
+ getTransform());
|
||||
}
|
||||
|
||||
rContainer.insert(rContainer.end(), aRetval.begin(), aRetval.end());
|
||||
--
|
||||
2.26.1
|
||||
|
@ -1,173 +0,0 @@
|
||||
From 74f3a7b9161ede870fbe2642158601ea3eaa073e Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Wed, 20 Nov 2019 10:18:37 +0100
|
||||
Subject: [PATCH] drawinglayer: handle more primitives in the xml dump
|
||||
|
||||
In preparation of writing a test for semi-transparent shape text.
|
||||
|
||||
Change-Id: I2dac94a6cd9da48de9a5e407ceab78fb8be933d7
|
||||
Reviewed-on: https://gerrit.libreoffice.org/83264
|
||||
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
||||
Tested-by: Jenkins
|
||||
(cherry picked from commit b6d794e14e65697fbf47a5b425d9d264e26e0161)
|
||||
|
||||
tdf#129916 svx: fix origin of scaled shadow
|
||||
|
||||
We assumed that the top left corner is the origin for scaling, but that
|
||||
is not necessarily the case. The intention is that the shadow direction
|
||||
can be determined from its x and y offset, and the origin is the
|
||||
opposite corner of the shape.
|
||||
|
||||
(cherry picked from commit e21d522dddce2590ed435890ae8d5fe39658a71a)
|
||||
|
||||
Conflicts:
|
||||
svx/CppunitTest_svx_unit.mk
|
||||
|
||||
Change-Id: I6759302767d20739b6e2be79d379740dd06f70f5
|
||||
---
|
||||
.../source/tools/primitive2dxmldump.cxx | 83 ++++++++++++++-
|
||||
svx/qa/unit/sdr.cxx | 96 ++++++++++++++++++
|
||||
.../sdr/primitive2d/sdrdecompositiontools.cxx | 14 ++-
|
||||
4 files changed, 189 insertions(+), 4 deletions(-)
|
||||
create mode 100644 svx/qa/unit/data/shadow-scale-origin.pptx
|
||||
create mode 100644 svx/qa/unit/sdr.cxx
|
||||
|
||||
diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
|
||||
index 65170ae096f2..64117de878bd 100644
|
||||
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
|
||||
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <basegfx/polygon/b2dpolypolygontools.hxx>
|
||||
#include <basegfx/polygon/b2dpolygontools.hxx>
|
||||
+#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
|
||||
|
||||
using namespace drawinglayer::primitive2d;
|
||||
|
||||
@@ -155,7 +156,7 @@ void Primitive2dXmlDump::decomposeAndWrite(
|
||||
if (!pBasePrimitive)
|
||||
continue;
|
||||
sal_uInt32 nId = pBasePrimitive->getPrimitive2DID();
|
||||
- if (maFilter[nId])
|
||||
+ if (nId < maFilter.size() && maFilter[nId])
|
||||
continue;
|
||||
|
||||
OUString sCurrentElementTag = drawinglayer::primitive2d::idToString(nId);
|
||||
@@ -336,9 +337,87 @@ void Primitive2dXmlDump::decomposeAndWrite(
|
||||
|
||||
break;
|
||||
|
||||
+ case PRIMITIVE2D_ID_SDRRECTANGLEPRIMITIVE2D:
|
||||
+ {
|
||||
+ // SdrRectanglePrimitive2D is private to us.
|
||||
+ rWriter.startElement("sdrrectangle");
|
||||
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitiveContainer;
|
||||
+ pBasePrimitive->get2DDecomposition(aPrimitiveContainer,
|
||||
+ drawinglayer::geometry::ViewInformation2D());
|
||||
+ decomposeAndWrite(aPrimitiveContainer, rWriter);
|
||||
+ rWriter.endElement();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ case PRIMITIVE2D_ID_SDRBLOCKTEXTPRIMITIVE2D:
|
||||
+ {
|
||||
+ // SdrBlockTextPrimitive2D is private to us.
|
||||
+ rWriter.startElement("sdrblocktext");
|
||||
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitiveContainer;
|
||||
+ pBasePrimitive->get2DDecomposition(aPrimitiveContainer,
|
||||
+ drawinglayer::geometry::ViewInformation2D());
|
||||
+ decomposeAndWrite(aPrimitiveContainer, rWriter);
|
||||
+ rWriter.endElement();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ case PRIMITIVE2D_ID_TEXTHIERARCHYBLOCKPRIMITIVE2D:
|
||||
+ {
|
||||
+ // TextHierarchyBlockPrimitive2D.
|
||||
+ rWriter.startElement("texthierarchyblock");
|
||||
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitiveContainer;
|
||||
+ pBasePrimitive->get2DDecomposition(aPrimitiveContainer,
|
||||
+ drawinglayer::geometry::ViewInformation2D());
|
||||
+ decomposeAndWrite(aPrimitiveContainer, rWriter);
|
||||
+ rWriter.endElement();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ case PRIMITIVE2D_ID_TEXTHIERARCHYPARAGRAPHPRIMITIVE2D:
|
||||
+ {
|
||||
+ // TextHierarchyParagraphPrimitive2D.
|
||||
+ rWriter.startElement("texthierarchyparagraph");
|
||||
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitiveContainer;
|
||||
+ pBasePrimitive->get2DDecomposition(aPrimitiveContainer,
|
||||
+ drawinglayer::geometry::ViewInformation2D());
|
||||
+ decomposeAndWrite(aPrimitiveContainer, rWriter);
|
||||
+ rWriter.endElement();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ case PRIMITIVE2D_ID_TEXTHIERARCHYLINEPRIMITIVE2D:
|
||||
+ {
|
||||
+ // TextHierarchyLinePrimitive2D.
|
||||
+ rWriter.startElement("texthierarchyline");
|
||||
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitiveContainer;
|
||||
+ pBasePrimitive->get2DDecomposition(aPrimitiveContainer,
|
||||
+ drawinglayer::geometry::ViewInformation2D());
|
||||
+ decomposeAndWrite(aPrimitiveContainer, rWriter);
|
||||
+ rWriter.endElement();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ case PRIMITIVE2D_ID_SHADOWPRIMITIVE2D:
|
||||
+ {
|
||||
+ // ShadowPrimitive2D.
|
||||
+ rWriter.startElement("shadow");
|
||||
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitiveContainer;
|
||||
+ pBasePrimitive->get2DDecomposition(aPrimitiveContainer,
|
||||
+ drawinglayer::geometry::ViewInformation2D());
|
||||
+ decomposeAndWrite(aPrimitiveContainer, rWriter);
|
||||
+ rWriter.endElement();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
default:
|
||||
{
|
||||
- rWriter.element(OUStringToOString(sCurrentElementTag, RTL_TEXTENCODING_UTF8));
|
||||
+ rWriter.startElement("unhandled");
|
||||
+ rWriter.attribute("id", OUStringToOString(sCurrentElementTag, RTL_TEXTENCODING_UTF8));
|
||||
+ drawinglayer::primitive2d::Primitive2DContainer aPrimitiveContainer;
|
||||
+ pBasePrimitive->get2DDecomposition(aPrimitiveContainer,
|
||||
+ drawinglayer::geometry::ViewInformation2D());
|
||||
+ decomposeAndWrite(aPrimitiveContainer, rWriter);
|
||||
+ rWriter.endElement();
|
||||
}
|
||||
break;
|
||||
}
|
||||
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
index 42c0bb60ecc9..48575d3b4917 100644
|
||||
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
@@ -499,9 +499,19 @@ namespace drawinglayer
|
||||
double fShearX = 0;
|
||||
rObjectMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
|
||||
// Scale the shadow
|
||||
- aShadowOffset.translate(-aTranslate.getX(), -aTranslate.getY());
|
||||
+ double nTranslateX = aTranslate.getX();
|
||||
+ double nTranslateY = aTranslate.getY();
|
||||
+
|
||||
+ // The origin for scaling is the top left corner by default. A negative
|
||||
+ // shadow offset changes the origin.
|
||||
+ if (rShadow.getOffset().getX() < 0)
|
||||
+ nTranslateX += aScale.getX();
|
||||
+ if (rShadow.getOffset().getY() < 0)
|
||||
+ nTranslateY += aScale.getY();
|
||||
+
|
||||
+ aShadowOffset.translate(-nTranslateX, -nTranslateY);
|
||||
aShadowOffset.scale(rShadow.getSize().getX() * 0.00001, rShadow.getSize().getY() * 0.00001);
|
||||
- aShadowOffset.translate(aTranslate.getX(), aTranslate.getY());
|
||||
+ aShadowOffset.translate(nTranslateX, nTranslateY);
|
||||
}
|
||||
|
||||
aShadowOffset.translate(rShadow.getOffset().getX(), rShadow.getOffset().getY());
|
||||
--
|
||||
2.26.1
|
||||
|
402
bsc1165870.diff
402
bsc1165870.diff
@ -1,402 +0,0 @@
|
||||
From b98f2d2d4f020d1d3b3271632ff4271872340f33 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=BCl=C5=9Fah=20K=C3=B6se?= <gulsah.kose@collabora.com>
|
||||
Date: Tue, 14 Apr 2020 15:49:28 +0300
|
||||
Subject: [PATCH] tdf#130058 Import shadow size.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Change-Id: Ie1cee377a33567088fb76ea47f0e6fc51d47f0fa
|
||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92188
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
|
||||
---
|
||||
drawinglayer/source/attribute/sdrshadowattribute.cxx | 14 +++++++++++++-
|
||||
include/drawinglayer/attribute/sdrshadowattribute.hxx | 2 ++
|
||||
include/editeng/unoprnms.hxx | 2 ++
|
||||
include/oox/drawingml/shapepropertymap.hxx | 4 +++-
|
||||
include/svx/sdr/primitive2d/sdrdecompositiontools.hxx | 4 +++-
|
||||
include/svx/svddef.hxx | 4 +++-
|
||||
include/svx/unoshprp.hxx | 4 +++-
|
||||
oox/source/drawingml/effectproperties.cxx | 16 ++++++++++++++++
|
||||
oox/source/drawingml/effectproperties.hxx | 2 ++
|
||||
oox/source/drawingml/effectpropertiescontext.cxx | 2 ++
|
||||
oox/source/drawingml/shapepropertymap.cxx | 4 +++-
|
||||
oox/source/token/properties.txt | 2 ++
|
||||
svx/source/sdr/primitive2d/sdrattributecreator.cxx | 7 ++++++-
|
||||
svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 18 ++++++++++++++----
|
||||
svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx | 10 ++++++++--
|
||||
svx/source/svdraw/svdattr.cxx | 2 ++
|
||||
16 files changed, 84 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drawinglayer/source/attribute/sdrshadowattribute.cxx b/drawinglayer/source/attribute/sdrshadowattribute.cxx
|
||||
index 0075cf4c2ba7..7957d4a5cc8e 100644
|
||||
--- a/drawinglayer/source/attribute/sdrshadowattribute.cxx
|
||||
+++ b/drawinglayer/source/attribute/sdrshadowattribute.cxx
|
||||
@@ -32,14 +32,17 @@ namespace drawinglayer
|
||||
public:
|
||||
// shadow definitions
|
||||
basegfx::B2DVector maOffset; // shadow offset 1/100th mm
|
||||
+ basegfx::B2DVector maSize; // [0.0 .. 2.0]
|
||||
double mfTransparence; // [0.0 .. 1.0], 0.0==no transp.
|
||||
basegfx::BColor maColor; // color of shadow
|
||||
|
||||
ImpSdrShadowAttribute(
|
||||
const basegfx::B2DVector& rOffset,
|
||||
+ const basegfx::B2DVector& rSize,
|
||||
double fTransparence,
|
||||
const basegfx::BColor& rColor)
|
||||
: maOffset(rOffset),
|
||||
+ maSize(rSize),
|
||||
mfTransparence(fTransparence),
|
||||
maColor(rColor)
|
||||
{
|
||||
@@ -47,6 +50,7 @@ namespace drawinglayer
|
||||
|
||||
ImpSdrShadowAttribute()
|
||||
: maOffset(basegfx::B2DVector()),
|
||||
+ maSize(basegfx::B2DVector()),
|
||||
mfTransparence(0.0),
|
||||
maColor(basegfx::BColor())
|
||||
{
|
||||
@@ -54,12 +58,14 @@ namespace drawinglayer
|
||||
|
||||
// data read access
|
||||
const basegfx::B2DVector& getOffset() const { return maOffset; }
|
||||
+ const basegfx::B2DVector& getSize() const { return maSize; }
|
||||
double getTransparence() const { return mfTransparence; }
|
||||
const basegfx::BColor& getColor() const { return maColor; }
|
||||
|
||||
bool operator==(const ImpSdrShadowAttribute& rCandidate) const
|
||||
{
|
||||
return (getOffset() == rCandidate.getOffset()
|
||||
+ && getSize() == rCandidate.getSize()
|
||||
&& getTransparence() == rCandidate.getTransparence()
|
||||
&& getColor() == rCandidate.getColor());
|
||||
}
|
||||
@@ -74,10 +80,11 @@ namespace drawinglayer
|
||||
|
||||
SdrShadowAttribute::SdrShadowAttribute(
|
||||
const basegfx::B2DVector& rOffset,
|
||||
+ const basegfx::B2DVector& rSize,
|
||||
double fTransparence,
|
||||
const basegfx::BColor& rColor)
|
||||
: mpSdrShadowAttribute(ImpSdrShadowAttribute(
|
||||
- rOffset, fTransparence, rColor))
|
||||
+ rOffset, rSize, fTransparence, rColor))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -115,6 +122,11 @@ namespace drawinglayer
|
||||
return mpSdrShadowAttribute->getOffset();
|
||||
}
|
||||
|
||||
+ const basegfx::B2DVector& SdrShadowAttribute::getSize() const
|
||||
+ {
|
||||
+ return mpSdrShadowAttribute->getSize();
|
||||
+ }
|
||||
+
|
||||
double SdrShadowAttribute::getTransparence() const
|
||||
{
|
||||
return mpSdrShadowAttribute->getTransparence();
|
||||
diff --git a/include/drawinglayer/attribute/sdrshadowattribute.hxx b/include/drawinglayer/attribute/sdrshadowattribute.hxx
|
||||
index 39b5acf59b73..c785a24f1e81 100644
|
||||
--- a/include/drawinglayer/attribute/sdrshadowattribute.hxx
|
||||
+++ b/include/drawinglayer/attribute/sdrshadowattribute.hxx
|
||||
@@ -52,6 +52,7 @@ namespace drawinglayer
|
||||
/// constructors/assignmentoperator/destructor
|
||||
SdrShadowAttribute(
|
||||
const basegfx::B2DVector& rOffset,
|
||||
+ const basegfx::B2DVector& rSize,
|
||||
double fTransparence,
|
||||
const basegfx::BColor& rColor);
|
||||
SdrShadowAttribute();
|
||||
@@ -69,6 +70,7 @@ namespace drawinglayer
|
||||
|
||||
// data access
|
||||
const basegfx::B2DVector& getOffset() const;
|
||||
+ const basegfx::B2DVector& getSize() const;
|
||||
double getTransparence() const;
|
||||
const basegfx::BColor& getColor() const;
|
||||
};
|
||||
diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx
|
||||
index ca3b977afeee..5ce726375e6d 100644
|
||||
--- a/include/editeng/unoprnms.hxx
|
||||
+++ b/include/editeng/unoprnms.hxx
|
||||
@@ -84,6 +84,8 @@
|
||||
#define UNO_NAME_SHADOWCOLOR "ShadowColor"
|
||||
#define UNO_NAME_SHADOWXDIST "ShadowXDistance"
|
||||
#define UNO_NAME_SHADOWYDIST "ShadowYDistance"
|
||||
+#define UNO_NAME_SHADOWSIZEX "ShadowSizeX"
|
||||
+#define UNO_NAME_SHADOWSIZEY "ShadowSizeY"
|
||||
#define UNO_NAME_SHADOWTRANSPARENCE "ShadowTransparence"
|
||||
|
||||
#define UNO_NAME_EDGERADIUS "CornerRadius"
|
||||
diff --git a/include/oox/drawingml/shapepropertymap.hxx b/include/oox/drawingml/shapepropertymap.hxx
|
||||
index cc55b24e8ceb..a24ee49b5971 100644
|
||||
--- a/include/oox/drawingml/shapepropertymap.hxx
|
||||
+++ b/include/oox/drawingml/shapepropertymap.hxx
|
||||
@@ -73,7 +73,9 @@ enum class ShapeProperty
|
||||
FillBackground,
|
||||
FillBitmapName,
|
||||
ShadowXDistance,
|
||||
- LAST = ShadowXDistance
|
||||
+ ShadowSizeX,
|
||||
+ ShadowSizeY,
|
||||
+ LAST = ShadowSizeY
|
||||
};
|
||||
|
||||
typedef o3tl::enumarray<ShapeProperty, sal_Int32> ShapePropertyIds;
|
||||
diff --git a/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
|
||||
index da3c54650746..844da339c111 100644
|
||||
--- a/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
|
||||
+++ b/include/svx/sdr/primitive2d/sdrdecompositiontools.hxx
|
||||
@@ -71,7 +71,9 @@ namespace drawinglayer
|
||||
|
||||
Primitive2DContainer SVX_DLLPUBLIC createEmbeddedShadowPrimitive(
|
||||
const Primitive2DContainer& rContent,
|
||||
- const attribute::SdrShadowAttribute& rShadow);
|
||||
+ const attribute::SdrShadowAttribute& rShadow,
|
||||
+ sal_Int32 nGraphicTranslateX = 0,
|
||||
+ sal_Int32 nGraphicTranslateY = 0);
|
||||
|
||||
} // end of namespace primitive2d
|
||||
} // end of namespace drawinglayer
|
||||
diff --git a/include/svx/svddef.hxx b/include/svx/svddef.hxx
|
||||
index a8696559c4fd..188ade20d469 100644
|
||||
--- a/include/svx/svddef.hxx
|
||||
+++ b/include/svx/svddef.hxx
|
||||
@@ -175,7 +175,9 @@ class SdrTextHorzAdjustItem;
|
||||
#define SDRATTR_SHADOWTRANSPARENCE TypedWhichId<SdrPercentItem>(SDRATTR_SHADOW_FIRST+ 4) /* 1071 */ /* 1071 */ /* 1054 */ /* Pool V2 */
|
||||
#define SDRATTR_SHADOW3D TypedWhichId<SfxVoidItem>(SDRATTR_SHADOW_FIRST+ 5) /* 1072 */ /* 1072 */ /* 1055 */ /* Pool V2 */
|
||||
#define SDRATTR_SHADOWPERSP TypedWhichId<SfxVoidItem>(SDRATTR_SHADOW_FIRST+ 6) /* 1073 */ /* 1073 */ /* 1056 */ /* Pool V2 */
|
||||
-#define SDRATTR_SHADOW_LAST (SDRATTR_SHADOWPERSP) /* 1078 */ /* 1078 */ /* 1061 */ /* Pool V1: 1039 */
|
||||
+#define SDRATTR_SHADOWSIZEX TypedWhichId<SdrMetricItem>(SDRATTR_SHADOW_FIRST+ 7)
|
||||
+#define SDRATTR_SHADOWSIZEY TypedWhichId<SdrMetricItem>(SDRATTR_SHADOW_FIRST+ 8)
|
||||
+#define SDRATTR_SHADOW_LAST (SDRATTR_SHADOWSIZEY) /* 1078 */ /* 1078 */ /* 1061 */ /* Pool V1: 1039 */
|
||||
|
||||
#define SDRATTR_CAPTION_FIRST (SDRATTR_SHADOW_LAST + 1) /* 1080 */ /* 1080 */ /* 1063 */ /* Pool V1: 1041 */
|
||||
#define SDRATTR_CAPTIONTYPE TypedWhichId<SdrCaptionTypeItem>(SDRATTR_CAPTION_FIRST+ 0) /* 1080 */ /* 1080 */ /* 1063 */
|
||||
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
|
||||
index 0861844be16d..54b8db4b2715 100644
|
||||
--- a/include/svx/unoshprp.hxx
|
||||
+++ b/include/svx/unoshprp.hxx
|
||||
@@ -214,7 +214,9 @@
|
||||
{ OUString(UNO_NAME_SHADOWCOLOR), SDRATTR_SHADOWCOLOR, ::cppu::UnoType<sal_Int32>::get(), 0, 0}, \
|
||||
{ OUString(UNO_NAME_SHADOWTRANSPARENCE),SDRATTR_SHADOWTRANSPARENCE, ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \
|
||||
{ OUString(UNO_NAME_SHADOWXDIST), SDRATTR_SHADOWXDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
|
||||
- { OUString(UNO_NAME_SHADOWYDIST), SDRATTR_SHADOWYDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM},
|
||||
+ { OUString(UNO_NAME_SHADOWYDIST), SDRATTR_SHADOWYDIST, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
|
||||
+ { OUString(UNO_NAME_SHADOWSIZEX), SDRATTR_SHADOWSIZEX, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM}, \
|
||||
+ { OUString(UNO_NAME_SHADOWSIZEY), SDRATTR_SHADOWSIZEY, ::cppu::UnoType<sal_Int32>::get(), 0, 0, PropertyMoreFlags::METRIC_ITEM},
|
||||
|
||||
#define LINE_PROPERTIES_DEFAULTS\
|
||||
{ OUString(UNO_NAME_LINECAP), XATTR_LINECAP, ::cppu::UnoType<css::drawing::LineCap>::get(), 0, 0}, \
|
||||
diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx
|
||||
index bbfee474b3f2..d1f07964b09e 100644
|
||||
--- a/oox/source/drawingml/effectproperties.cxx
|
||||
+++ b/oox/source/drawingml/effectproperties.cxx
|
||||
@@ -23,6 +23,8 @@ void EffectShadowProperties::assignUsed(const EffectShadowProperties& rSourcePro
|
||||
{
|
||||
moShadowDist.assignIfUsed( rSourceProps.moShadowDist );
|
||||
moShadowDir.assignIfUsed( rSourceProps.moShadowDir );
|
||||
+ moShadowSx.assignIfUsed( rSourceProps.moShadowSx );
|
||||
+ moShadowSy.assignIfUsed( rSourceProps.moShadowSy );
|
||||
moShadowColor.assignIfUsed( rSourceProps.moShadowColor );
|
||||
}
|
||||
|
||||
@@ -48,6 +50,9 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap,
|
||||
if( it->msName == "outerShdw" )
|
||||
{
|
||||
sal_Int32 nAttrDir = 0, nAttrDist = 0;
|
||||
+ sal_Int32 nAttrSizeX = 100000, nAttrSizeY = 100000; // If shadow size is %100=100000 (means equal to object's size), sx sy is not exists,
|
||||
+ // Default values of sx, sy should be 100000 in this case.
|
||||
+
|
||||
std::map< OUString, css::uno::Any >::const_iterator attribIt = it->maAttribs.find( "dir" );
|
||||
if( attribIt != it->maAttribs.end() )
|
||||
attribIt->second >>= nAttrDir;
|
||||
@@ -56,6 +61,15 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap,
|
||||
if( attribIt != it->maAttribs.end() )
|
||||
attribIt->second >>= nAttrDist;
|
||||
|
||||
+ attribIt = it->maAttribs.find( "sx" );
|
||||
+ if( attribIt != it->maAttribs.end() )
|
||||
+ attribIt->second >>= nAttrSizeX;
|
||||
+
|
||||
+ attribIt = it->maAttribs.find( "sy" );
|
||||
+ if( attribIt != it->maAttribs.end() )
|
||||
+ attribIt->second >>= nAttrSizeY;
|
||||
+
|
||||
+ // Negative X or Y dist indicates left or up, respectively
|
||||
// Negative X or Y dist indicates left or up, respectively
|
||||
double nAngle = basegfx::deg2rad(static_cast<double>(nAttrDir) / PER_DEGREE);
|
||||
sal_Int32 nDist = convertEmuToHmm( nAttrDist );
|
||||
@@ -65,6 +79,8 @@ void EffectProperties::pushToPropMap( PropertyMap& rPropMap,
|
||||
rPropMap.setProperty( PROP_Shadow, true );
|
||||
rPropMap.setProperty( PROP_ShadowXDistance, nXDist);
|
||||
rPropMap.setProperty( PROP_ShadowYDistance, nYDist);
|
||||
+ rPropMap.setProperty( PROP_ShadowSizeX, nAttrSizeX);
|
||||
+ rPropMap.setProperty( PROP_ShadowSizeY, nAttrSizeY);
|
||||
rPropMap.setProperty( PROP_ShadowColor, it->moColor.getColor(rGraphicHelper ) );
|
||||
rPropMap.setProperty( PROP_ShadowTransparence, it->moColor.getTransparency());
|
||||
}
|
||||
diff --git a/oox/source/drawingml/effectproperties.hxx b/oox/source/drawingml/effectproperties.hxx
|
||||
index 146214cc9191..092ca62669ae 100644
|
||||
--- a/oox/source/drawingml/effectproperties.hxx
|
||||
+++ b/oox/source/drawingml/effectproperties.hxx
|
||||
@@ -24,6 +24,8 @@ struct EffectShadowProperties
|
||||
{
|
||||
OptValue< sal_Int64 > moShadowDist;
|
||||
OptValue< sal_Int64 > moShadowDir;
|
||||
+ OptValue< sal_Int64 > moShadowSx;
|
||||
+ OptValue< sal_Int64 > moShadowSy;
|
||||
Color moShadowColor;
|
||||
|
||||
/** Overwrites all members that are explicitly set in rSourceProps. */
|
||||
diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx
|
||||
index 4c779e75f1ef..40c132f3fb2c 100644
|
||||
--- a/oox/source/drawingml/effectpropertiescontext.cxx
|
||||
+++ b/oox/source/drawingml/effectpropertiescontext.cxx
|
||||
@@ -83,6 +83,8 @@ ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement,
|
||||
|
||||
mrEffectProperties.maShadow.moShadowDist = rAttribs.getInteger( XML_dist, 0 );
|
||||
mrEffectProperties.maShadow.moShadowDir = rAttribs.getInteger( XML_dir, 0 );
|
||||
+ mrEffectProperties.maShadow.moShadowSx = rAttribs.getInteger( XML_sx, 0 );
|
||||
+ mrEffectProperties.maShadow.moShadowSy = rAttribs.getInteger( XML_sy, 0 );
|
||||
return new ColorContext(*this, mrEffectProperties.m_Effects[nPos]->moColor);
|
||||
}
|
||||
break;
|
||||
diff --git a/oox/source/drawingml/shapepropertymap.cxx b/oox/source/drawingml/shapepropertymap.cxx
|
||||
index c6168be243ab..7a37c0641a93 100644
|
||||
--- a/oox/source/drawingml/shapepropertymap.cxx
|
||||
+++ b/oox/source/drawingml/shapepropertymap.cxx
|
||||
@@ -49,7 +49,9 @@ static const ShapePropertyIds spnDefaultShapeIds =
|
||||
PROP_FillHatch,
|
||||
PROP_FillBackground,
|
||||
PROP_FillBitmapName,
|
||||
- PROP_ShadowXDistance
|
||||
+ PROP_ShadowXDistance,
|
||||
+ PROP_ShadowSizeX,
|
||||
+ PROP_ShadowSizeY
|
||||
};
|
||||
|
||||
} // namespace
|
||||
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
|
||||
index f53b73f8b79e..1f1a785063d8 100644
|
||||
--- a/oox/source/token/properties.txt
|
||||
+++ b/oox/source/token/properties.txt
|
||||
@@ -443,6 +443,8 @@ SelectedPage
|
||||
Shadow
|
||||
ShadowColor
|
||||
ShadowFormat
|
||||
+ShadowSizeX
|
||||
+ShadowSizeY
|
||||
ShadowTransparence
|
||||
ShadowXDistance
|
||||
ShadowYDistance
|
||||
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
|
||||
index cb9c2f50c909..edad8cd21132 100644
|
||||
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
|
||||
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
|
||||
@@ -374,9 +374,14 @@ namespace drawinglayer
|
||||
const basegfx::B2DVector aOffset(
|
||||
static_cast<double>(rSet.Get(SDRATTR_SHADOWXDIST).GetValue()),
|
||||
static_cast<double>(rSet.Get(SDRATTR_SHADOWYDIST).GetValue()));
|
||||
+
|
||||
+ const basegfx::B2DVector aSize(
|
||||
+ static_cast<double>(rSet.Get(SDRATTR_SHADOWSIZEX).GetValue()),
|
||||
+ static_cast<double>(rSet.Get(SDRATTR_SHADOWSIZEY).GetValue()));
|
||||
+
|
||||
const Color aColor(rSet.Get(SDRATTR_SHADOWCOLOR).GetColorValue());
|
||||
|
||||
- return attribute::SdrShadowAttribute(aOffset, static_cast<double>(nTransparence) * 0.01, aColor.getBColor());
|
||||
+ return attribute::SdrShadowAttribute(aOffset, aSize, static_cast<double>(nTransparence) * 0.01, aColor.getBColor());
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
index 6787e0d5a322..d6822bfd1519 100644
|
||||
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
|
||||
@@ -481,16 +481,26 @@ namespace drawinglayer
|
||||
|
||||
Primitive2DContainer createEmbeddedShadowPrimitive(
|
||||
const Primitive2DContainer& rContent,
|
||||
- const attribute::SdrShadowAttribute& rShadow)
|
||||
+ const attribute::SdrShadowAttribute& rShadow,
|
||||
+ sal_Int32 nGraphicTranslateX,
|
||||
+ sal_Int32 nGraphicTranslateY)
|
||||
{
|
||||
if(!rContent.empty())
|
||||
{
|
||||
Primitive2DContainer aRetval(2);
|
||||
basegfx::B2DHomMatrix aShadowOffset;
|
||||
|
||||
- // prepare shadow offset
|
||||
- aShadowOffset.set(0, 2, rShadow.getOffset().getX());
|
||||
- aShadowOffset.set(1, 2, rShadow.getOffset().getY());
|
||||
+ {
|
||||
+ if(rShadow.getSize().getX() != 100000)
|
||||
+ {
|
||||
+ // Scale the shadow
|
||||
+ aShadowOffset.translate(-nGraphicTranslateX, -nGraphicTranslateY);
|
||||
+ aShadowOffset.scale(rShadow.getSize().getX() * 0.00001, rShadow.getSize().getY() * 0.00001);
|
||||
+ aShadowOffset.translate(nGraphicTranslateX, nGraphicTranslateY);
|
||||
+ }
|
||||
+
|
||||
+ aShadowOffset.translate(rShadow.getOffset().getX(), rShadow.getOffset().getY());
|
||||
+ }
|
||||
|
||||
// create shadow primitive and add content
|
||||
aRetval[0] = Primitive2DReference(
|
||||
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
|
||||
index fa8c554fa0be..676b26183b09 100644
|
||||
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
|
||||
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
|
||||
@@ -35,6 +35,7 @@ namespace drawinglayer
|
||||
void SdrGrafPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& /*aViewInformation*/) const
|
||||
{
|
||||
Primitive2DContainer aRetval;
|
||||
+ basegfx::B2DTuple aTranslateGrf;
|
||||
|
||||
// create unit outline polygon
|
||||
const basegfx::B2DPolygon& aUnitOutline(basegfx::utils::createUnitPolygon());
|
||||
@@ -61,7 +62,10 @@ namespace drawinglayer
|
||||
getTransform(),
|
||||
getGraphicObject(),
|
||||
getGraphicAttr()));
|
||||
-
|
||||
+ double fRotate = 0;
|
||||
+ double fShearX = 0;
|
||||
+ basegfx::B2DTuple aScaleGrf;
|
||||
+ getTransform().decompose(aScaleGrf, aTranslateGrf, fRotate, fShearX);
|
||||
aRetval.push_back(xGraphicContentPrimitive);
|
||||
}
|
||||
|
||||
@@ -122,7 +126,9 @@ namespace drawinglayer
|
||||
{
|
||||
aRetval = createEmbeddedShadowPrimitive(
|
||||
aRetval,
|
||||
- getSdrLFSTAttribute().getShadow());
|
||||
+ getSdrLFSTAttribute().getShadow(),
|
||||
+ aTranslateGrf.getX(),
|
||||
+ aTranslateGrf.getY());
|
||||
}
|
||||
|
||||
rContainer.insert(rContainer.end(), aRetval.begin(), aRetval.end());
|
||||
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
|
||||
index 0a757b343c86..31cf34a76c73 100644
|
||||
--- a/svx/source/svdraw/svdattr.cxx
|
||||
+++ b/svx/source/svdraw/svdattr.cxx
|
||||
@@ -139,6 +139,8 @@ SdrItemPool::SdrItemPool(
|
||||
rPoolDefaults[SDRATTR_SHADOWCOLOR -SDRATTR_START]=new XColorItem(SDRATTR_SHADOWCOLOR, aNullCol);
|
||||
rPoolDefaults[SDRATTR_SHADOWXDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWXDIST, 0);
|
||||
rPoolDefaults[SDRATTR_SHADOWYDIST -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWYDIST, 0);
|
||||
+ rPoolDefaults[SDRATTR_SHADOWSIZEX -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWSIZEX, 100000);
|
||||
+ rPoolDefaults[SDRATTR_SHADOWSIZEY -SDRATTR_START]=new SdrMetricItem(SDRATTR_SHADOWSIZEY, 100000);
|
||||
rPoolDefaults[SDRATTR_SHADOWTRANSPARENCE-SDRATTR_START]=new SdrPercentItem(SDRATTR_SHADOWTRANSPARENCE, 0);
|
||||
rPoolDefaults[SDRATTR_SHADOW3D -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOW3D );
|
||||
rPoolDefaults[SDRATTR_SHADOWPERSP -SDRATTR_START]=new SfxVoidItem(SDRATTR_SHADOWPERSP );
|
||||
--
|
||||
2.16.4
|
||||
|
@ -1,65 +0,0 @@
|
||||
From 73e9e4145ba53585a1a3dcdfbc333c36e6bc1ffc Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Wed, 10 Jun 2020 14:51:04 +0200
|
||||
Subject: [PATCH] bsc1172053.diff
|
||||
|
||||
PPTX export, custom shape, bitmap fill: fix source vs fill rect confusion
|
||||
|
||||
Commit 682ab832522b1349f1714bcb16f6e83468ea2920 (drawingML
|
||||
export\import: cropping of shape's fill texture, 2014-02-12) improved
|
||||
the DOCX filter, so the fill rectangle of a custom shape with bitmap
|
||||
fill is handled.
|
||||
|
||||
The problem is drawingML has a source rectangle (similar to our crop
|
||||
rect) to limit the usage of the bitmap, and also it has a fill rectangle
|
||||
in case some margin is wanted around a stretched bitmap. We don't have a
|
||||
mapping for the later.
|
||||
|
||||
Fix the problem by limiting the above work for DOCX, this way PPTX's
|
||||
source rectangle won't be turned into a stretch's fill rectangle.
|
||||
|
||||
This way no unwanted margins will appear around the image -- those
|
||||
margins can be large enough that the image effectively disappears on
|
||||
export.
|
||||
|
||||
(cherry picked from commit b00e43fa5848be0cc7ba81b185021511d94cdc00)
|
||||
|
||||
Change-Id: Ic35063545a56eec9eaf885bbd397a854705d134f
|
||||
---
|
||||
oox/source/export/drawingml.cxx | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
|
||||
index 468c89ad7b7e..05cd97946341 100644
|
||||
--- a/oox/source/export/drawingml.cxx
|
||||
+++ b/oox/source/export/drawingml.cxx
|
||||
@@ -1455,6 +1455,12 @@ void DrawingML::WriteXGraphicBlipFill(uno::Reference<beans::XPropertySet> const
|
||||
|
||||
WriteXGraphicBlip(rXPropSet, rxGraphic, bRelPathToMedia);
|
||||
|
||||
+ if (GetDocumentType() != DOCUMENT_DOCX)
|
||||
+ {
|
||||
+ // Write the crop rectangle of Impress as a source rectangle.
|
||||
+ WriteSrcRectXGraphic(rXPropSet, rxGraphic);
|
||||
+ }
|
||||
+
|
||||
if (bWriteMode)
|
||||
{
|
||||
WriteXGraphicBlipMode(rXPropSet, rxGraphic);
|
||||
@@ -1550,6 +1556,13 @@ void DrawingML::WriteSrcRectXGraphic(uno::Reference<beans::XPropertySet> const &
|
||||
void DrawingML::WriteXGraphicStretch(uno::Reference<beans::XPropertySet> const & rXPropSet,
|
||||
uno::Reference<graphic::XGraphic> const & rxGraphic)
|
||||
{
|
||||
+ if (GetDocumentType() != DOCUMENT_DOCX)
|
||||
+ {
|
||||
+ // Limiting the area used for stretching is not supported in Impress.
|
||||
+ mpFS->singleElementNS(XML_a, XML_stretch);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
mpFS->startElementNS(XML_a, XML_stretch);
|
||||
|
||||
bool bCrop = false;
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,76 +0,0 @@
|
||||
From 3c5f6a7f81c5882de6bcd0afcc528e8643d95f35 Mon Sep 17 00:00:00 2001
|
||||
From: Miklos Vajna <vmiklos@collabora.com>
|
||||
Date: Wed, 10 Jun 2020 11:07:43 +0200
|
||||
Subject: [PATCH] PPTX import: handle adjust values from both the shape and its
|
||||
placeholder
|
||||
|
||||
The direct problem is a crash in CustomShapeProperties::pushToPropSet(),
|
||||
the code just hoped that the input file doesn't have more adjust values
|
||||
than the # of adjust values we allocate based on the preset type. Fix
|
||||
the crash, but there is a deeper problem here...
|
||||
|
||||
The shape can inherit custom shape properties from a placeholder, then
|
||||
later it can have its own custom shape properties. When it comes to
|
||||
adjust values specifically, we used to just append own adjust values to
|
||||
the end of the list. This way we got the double of expected adjust
|
||||
values. And later rendering took the N expected adjust values from
|
||||
the start of the 2N element list, so we used the adjust values of the
|
||||
placeholder, not of the actual shape.
|
||||
|
||||
Fix this by clearing the custom shape geometry once we know we have our
|
||||
own preset geometry.
|
||||
|
||||
(cherry picked from commit 408ec7a4470741edbedbb034de07a2d776348593)
|
||||
|
||||
Change-Id: I09f669bf59c33b552b906733d323eba7af5548e7
|
||||
---
|
||||
oox/qa/unit/data/preset-adjust-value.pptx | Bin 0 -> 33233 bytes
|
||||
oox/qa/unit/drawingml.cxx | 30 +++++++++++++++++-
|
||||
.../drawingml/customshapeproperties.cxx | 6 +++-
|
||||
.../drawingml/shapepropertiescontext.cxx | 5 +++
|
||||
4 files changed, 39 insertions(+), 2 deletions(-)
|
||||
create mode 100644 oox/qa/unit/data/preset-adjust-value.pptx
|
||||
|
||||
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
|
||||
index 2f4848088cc4..4a6e3d9eae6d 100644
|
||||
--- a/oox/source/drawingml/customshapeproperties.cxx
|
||||
+++ b/oox/source/drawingml/customshapeproperties.cxx
|
||||
@@ -206,7 +206,11 @@ void CustomShapeProperties::pushToPropSet(
|
||||
aAdjustmentVal.Value <<= adjustmentGuide.maFormula.toInt32();
|
||||
aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
|
||||
aAdjustmentVal.Name = adjustmentGuide.maName;
|
||||
- aAdjustmentSeq[ nIndex++ ] = aAdjustmentVal;
|
||||
+ if (nIndex < aAdjustmentSeq.getLength())
|
||||
+ {
|
||||
+ aAdjustmentSeq[nIndex] = aAdjustmentVal;
|
||||
+ ++nIndex;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
rGeoProp.Value <<= aAdjustmentSeq;
|
||||
diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx
|
||||
index ffedcfa5bf13..eedc338a25e4 100644
|
||||
--- a/oox/source/drawingml/shapepropertiescontext.cxx
|
||||
+++ b/oox/source/drawingml/shapepropertiescontext.cxx
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <oox/helper/attributelist.hxx>
|
||||
#include <oox/token/namespaces.hxx>
|
||||
#include <oox/token/tokens.hxx>
|
||||
+#include <drawingml/customshapeproperties.hxx>
|
||||
|
||||
using namespace oox::core;
|
||||
using namespace ::com::sun::star;
|
||||
@@ -77,6 +78,10 @@ ContextHandlerRef ShapePropertiesContext::onCreateContext( sal_Int32 aElementTok
|
||||
{
|
||||
mrShape.getServiceName() = "com.sun.star.drawing.CustomShape";
|
||||
}
|
||||
+
|
||||
+ // We got a preset geometry, forget the geometry inherited from the placeholder shape.
|
||||
+ mrShape.getCustomShapeProperties() = std::make_shared<CustomShapeProperties>();
|
||||
+
|
||||
return new PresetShapeGeometryContext( *this, rAttribs, *(mrShape.getCustomShapeProperties()) );
|
||||
}
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
3
dtoa-20180411.tgz
Normal file
3
dtoa-20180411.tgz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0082d0684f7db6f62361b76c4b7faba19e0c7ce5cb8e36c4b65fea8281e711b4
|
||||
size 48893
|
@ -1,416 +0,0 @@
|
||||
commit 74ac4cd9c0cbc8bc5a9b3c049731dd28c4b0d981 (HEAD -> master)
|
||||
Author: Adam Majer <amajer@suse.com>
|
||||
Date: Wed Feb 19 15:29:06 2020 +0100
|
||||
|
||||
Move Boost.Spirit usage away from legacy namespace
|
||||
|
||||
Remove BOOST_SPIRIT_USE_OLD_NAMESPACE defines and move all usage
|
||||
of Boost.Spirit to boost::spirit::classic namespace.
|
||||
|
||||
Change-Id: I7dc5bed4d1b51f4a0bd1a4ae40c2024222127ce3
|
||||
|
||||
PR: https://gerrit.libreoffice.org/c/core/+/89079
|
||||
|
||||
|
||||
Index: libreoffice-6.4.1.1/connectivity/Library_dbtools.mk
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/connectivity/Library_dbtools.mk
|
||||
+++ libreoffice-6.4.1.1/connectivity/Library_dbtools.mk
|
||||
@@ -12,7 +12,6 @@ $(eval $(call gb_Library_Library,dbtools
|
||||
|
||||
$(eval $(call gb_Library_add_defs,dbtools,\
|
||||
-DOOO_DLLIMPLEMENTATION_DBTOOLS \
|
||||
- -DBOOST_SPIRIT_USE_OLD_NAMESPACE \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_set_componentfile,dbtools,connectivity/source/dbtools/dbtools))
|
||||
Index: libreoffice-6.4.1.1/sdext/Library_pdfimport.mk
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/sdext/Library_pdfimport.mk
|
||||
+++ libreoffice-6.4.1.1/sdext/Library_pdfimport.mk
|
||||
@@ -44,7 +44,6 @@ $(eval $(call gb_Library_add_defs,pdfimp
|
||||
endif
|
||||
|
||||
$(eval $(call gb_Library_add_defs,pdfimport, \
|
||||
- -DBOOST_SPIRIT_USE_OLD_NAMESPACE \
|
||||
-DBOOST_ALL_NO_LIB \
|
||||
))
|
||||
|
||||
Index: libreoffice-6.4.1.1/slideshow/Library_slideshow.mk
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/slideshow/Library_slideshow.mk
|
||||
+++ libreoffice-6.4.1.1/slideshow/Library_slideshow.mk
|
||||
@@ -14,10 +14,6 @@ $(eval $(call gb_Library_set_include,sli
|
||||
-I$(SRCDIR)/slideshow/source/inc \
|
||||
))
|
||||
|
||||
-$(eval $(call gb_Library_add_defs,slideshow,\
|
||||
- -DBOOST_SPIRIT_USE_OLD_NAMESPACE \
|
||||
-))
|
||||
-
|
||||
ifneq ($(strip $(debug)$(DEBUG)),)
|
||||
$(eval $(call gb_Library_add_defs,slideshow,\
|
||||
-DBOOST_SP_ENABLE_DEBUG_HOOKS \
|
||||
Index: libreoffice-6.4.1.1/svx/Library_svx.mk
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/svx/Library_svx.mk
|
||||
+++ libreoffice-6.4.1.1/svx/Library_svx.mk
|
||||
@@ -35,7 +35,6 @@ $(eval $(call gb_Library_use_custom_head
|
||||
|
||||
$(eval $(call gb_Library_add_defs,svx,\
|
||||
-DSVX_DLLIMPLEMENTATION \
|
||||
- -DBOOST_SPIRIT_USE_OLD_NAMESPACE \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_set_precompiled_header,svx,svx/inc/pch/precompiled_svx))
|
||||
Index: libreoffice-6.4.1.1/svx/Library_svxcore.mk
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/svx/Library_svxcore.mk
|
||||
+++ libreoffice-6.4.1.1/svx/Library_svxcore.mk
|
||||
@@ -46,7 +46,6 @@ $(eval $(call gb_Library_set_precompiled
|
||||
|
||||
$(eval $(call gb_Library_add_defs,svxcore,\
|
||||
-DSVX_DLLIMPLEMENTATION \
|
||||
- -DBOOST_SPIRIT_USE_OLD_NAMESPACE \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_use_libraries,svxcore,\
|
||||
Index: libreoffice-6.4.1.1/svx/Module_svx.mk
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/svx/Module_svx.mk
|
||||
+++ libreoffice-6.4.1.1/svx/Module_svx.mk
|
||||
@@ -54,7 +54,6 @@ $(eval $(call gb_Module_add_subsequentch
|
||||
endif
|
||||
|
||||
#todo: noopt for EnhanceCustomShapesFunctionParser.cxx on Solaris Sparc and MacOSX
|
||||
-#todo: -DBOOST_SPIRIT_USE_OLD_NAMESPACE only in CustomShapes ?
|
||||
#todo: -DUNICODE and -D_UNICODE on WNT for source/dialog
|
||||
#todo: component file
|
||||
# vim: set noet sw=4 ts=4:
|
||||
Index: libreoffice-6.4.1.1/sdext/source/pdfimport/pdfparse/pdfparse.cxx
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/sdext/source/pdfimport/pdfparse/pdfparse.cxx
|
||||
+++ libreoffice-6.4.1.1/sdext/source/pdfimport/pdfparse/pdfparse.cxx
|
||||
@@ -49,7 +49,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
-using namespace boost::spirit;
|
||||
+using namespace boost::spirit::classic;
|
||||
using namespace pdfparse;
|
||||
|
||||
|
||||
@@ -556,12 +556,12 @@ std::unique_ptr<PDFEntry> PDFReader::rea
|
||||
try
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
- boost::spirit::parse_info<const char*> aInfo =
|
||||
+ boost::spirit::classic::parse_info<const char*> aInfo =
|
||||
#endif
|
||||
- boost::spirit::parse( pBuffer,
|
||||
+ boost::spirit::classic::parse( pBuffer,
|
||||
pBuffer+nLen,
|
||||
aGrammar,
|
||||
- boost::spirit::space_p );
|
||||
+ boost::spirit::classic::space_p );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
SAL_INFO("sdext.pdfimport.pdfparse", "parseinfo: stop = " << aInfo.stop << " (buff=" << pBuffer << ", offset = " << aInfo.stop - pBuffer << "), hit = " << (aInfo.hit ? OUString("true") : OUString("false")) << ", full = " << (aInfo.full ? OUString("true") : OUString("false")) << ", length = " << static_cast<int>(aInfo.length) );
|
||||
#endif
|
||||
@@ -634,12 +634,12 @@ std::unique_ptr<PDFEntry> PDFReader::rea
|
||||
try
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
- boost::spirit::parse_info< file_iterator<> > aInfo =
|
||||
+ boost::spirit::classic::parse_info< file_iterator<> > aInfo =
|
||||
#endif
|
||||
- boost::spirit::parse( file_start,
|
||||
+ boost::spirit::classic::parse( file_start,
|
||||
file_end,
|
||||
aGrammar,
|
||||
- boost::spirit::space_p );
|
||||
+ boost::spirit::classic::space_p );
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
SAL_INFO("sdext.pdfimport.pdfparse", "parseinfo: stop at offset = " << aInfo.stop - file_start << ", hit = " << (aInfo.hit ? "true" : "false") << ", full = " << (aInfo.full ? "true" : "false") << ", length = " << aInfo.length);
|
||||
#endif
|
||||
Index: libreoffice-6.4.1.1/connectivity/source/commontools/RowFunctionParser.cxx
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/connectivity/source/commontools/RowFunctionParser.cxx
|
||||
+++ libreoffice-6.4.1.1/connectivity/source/commontools/RowFunctionParser.cxx
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
( '-' multiplicative_expression )* )
|
||||
|
||||
*/
|
||||
-class ExpressionGrammar : public ::boost::spirit::grammar< ExpressionGrammar >
|
||||
+class ExpressionGrammar : public ::boost::spirit::classic::grammar< ExpressionGrammar >
|
||||
{
|
||||
public:
|
||||
/** Create an arithmetic expression grammar
|
||||
@@ -303,14 +303,14 @@ public:
|
||||
// grammar definition
|
||||
explicit definition( const ExpressionGrammar& self )
|
||||
{
|
||||
- using ::boost::spirit::space_p;
|
||||
- using ::boost::spirit::range_p;
|
||||
- using ::boost::spirit::lexeme_d;
|
||||
- using ::boost::spirit::ch_p;
|
||||
- using ::boost::spirit::int_p;
|
||||
- using ::boost::spirit::as_lower_d;
|
||||
- using ::boost::spirit::strlit;
|
||||
- using ::boost::spirit::inhibit_case;
|
||||
+ using ::boost::spirit::classic::space_p;
|
||||
+ using ::boost::spirit::classic::range_p;
|
||||
+ using ::boost::spirit::classic::lexeme_d;
|
||||
+ using ::boost::spirit::classic::ch_p;
|
||||
+ using ::boost::spirit::classic::int_p;
|
||||
+ using ::boost::spirit::classic::as_lower_d;
|
||||
+ using ::boost::spirit::classic::strlit;
|
||||
+ using ::boost::spirit::classic::inhibit_case;
|
||||
|
||||
|
||||
typedef inhibit_case<strlit<> > token_t;
|
||||
@@ -362,7 +362,7 @@ public:
|
||||
BOOST_SPIRIT_DEBUG_RULE(andExpression);
|
||||
}
|
||||
|
||||
- const ::boost::spirit::rule< ScannerT >& start() const
|
||||
+ const ::boost::spirit::classic::rule< ScannerT >& start() const
|
||||
{
|
||||
return basicExpression;
|
||||
}
|
||||
@@ -370,11 +370,11 @@ public:
|
||||
private:
|
||||
// the constituents of the Spirit arithmetic expression grammar.
|
||||
// For the sake of readability, without 'ma' prefix.
|
||||
- ::boost::spirit::rule< ScannerT > basicExpression;
|
||||
- ::boost::spirit::rule< ScannerT > unaryFunction;
|
||||
- ::boost::spirit::rule< ScannerT > assignment;
|
||||
- ::boost::spirit::rule< ScannerT > integer,argument;
|
||||
- ::boost::spirit::rule< ScannerT > orExpression,andExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > basicExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > unaryFunction;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > assignment;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > integer,argument;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > orExpression,andExpression;
|
||||
};
|
||||
|
||||
const ParserContextSharedPtr& getContext() const
|
||||
@@ -417,11 +417,11 @@ std::shared_ptr<ExpressionNode> const &
|
||||
|
||||
ExpressionGrammar aExpressionGrammer( pContext );
|
||||
|
||||
- const ::boost::spirit::parse_info<StringIteratorT> aParseInfo(
|
||||
- ::boost::spirit::parse( aStart,
|
||||
+ const ::boost::spirit::classic::parse_info<StringIteratorT> aParseInfo(
|
||||
+ ::boost::spirit::classic::parse( aStart,
|
||||
aEnd,
|
||||
aExpressionGrammer,
|
||||
- ::boost::spirit::space_p ) );
|
||||
+ ::boost::spirit::classic::space_p ) );
|
||||
|
||||
#if (OSL_DEBUG_LEVEL > 0)
|
||||
std::cout.flush(); // needed to keep stdout and cout in sync
|
||||
Index: libreoffice-6.4.1.1/slideshow/source/engine/smilfunctionparser.cxx
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/slideshow/source/engine/smilfunctionparser.cxx
|
||||
+++ libreoffice-6.4.1.1/slideshow/source/engine/smilfunctionparser.cxx
|
||||
@@ -363,14 +363,14 @@ namespace slideshow
|
||||
// notation, not the 1.0e10 one.
|
||||
|
||||
// TODO(F1): Also handle the 1.0e10 case here.
|
||||
- template< typename T > struct custom_real_parser_policies : public ::boost::spirit::ureal_parser_policies<T>
|
||||
+ template< typename T > struct custom_real_parser_policies : public ::boost::spirit::classic::ureal_parser_policies<T>
|
||||
{
|
||||
template< typename ScannerT >
|
||||
- static typename ::boost::spirit::parser_result< ::boost::spirit::chlit<>, ScannerT >::type
|
||||
+ static typename ::boost::spirit::classic::parser_result< ::boost::spirit::classic::chlit<>, ScannerT >::type
|
||||
parse_exp(ScannerT& scan)
|
||||
{
|
||||
// as_lower_d somehow breaks MSVC7
|
||||
- return ::boost::spirit::ch_p('E').parse(scan);
|
||||
+ return ::boost::spirit::classic::ch_p('E').parse(scan);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -401,7 +401,7 @@ namespace slideshow
|
||||
( '-' multiplicative_expression )* )
|
||||
|
||||
*/
|
||||
- class ExpressionGrammar : public ::boost::spirit::grammar< ExpressionGrammar >
|
||||
+ class ExpressionGrammar : public ::boost::spirit::classic::grammar< ExpressionGrammar >
|
||||
{
|
||||
public:
|
||||
/** Create an arithmetic expression grammar
|
||||
@@ -420,8 +420,8 @@ namespace slideshow
|
||||
// grammar definition
|
||||
explicit definition( const ExpressionGrammar& self )
|
||||
{
|
||||
- using ::boost::spirit::str_p;
|
||||
- using ::boost::spirit::real_parser;
|
||||
+ using ::boost::spirit::classic::str_p;
|
||||
+ using ::boost::spirit::classic::real_parser;
|
||||
|
||||
identifier =
|
||||
str_p( "$" )[ ValueTFunctor( self.getContext()) ]
|
||||
@@ -487,7 +487,7 @@ namespace slideshow
|
||||
BOOST_SPIRIT_DEBUG_RULE(identifier);
|
||||
}
|
||||
|
||||
- const ::boost::spirit::rule< ScannerT >& start() const
|
||||
+ const ::boost::spirit::classic::rule< ScannerT >& start() const
|
||||
{
|
||||
return additiveExpression;
|
||||
}
|
||||
@@ -495,13 +495,13 @@ namespace slideshow
|
||||
private:
|
||||
// the constituents of the Spirit arithmetic expression grammar.
|
||||
// For the sake of readability, without 'ma' prefix.
|
||||
- ::boost::spirit::rule< ScannerT > additiveExpression;
|
||||
- ::boost::spirit::rule< ScannerT > multiplicativeExpression;
|
||||
- ::boost::spirit::rule< ScannerT > unaryExpression;
|
||||
- ::boost::spirit::rule< ScannerT > basicExpression;
|
||||
- ::boost::spirit::rule< ScannerT > unaryFunction;
|
||||
- ::boost::spirit::rule< ScannerT > binaryFunction;
|
||||
- ::boost::spirit::rule< ScannerT > identifier;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > additiveExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > multiplicativeExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > unaryExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > basicExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > unaryFunction;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > binaryFunction;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > identifier;
|
||||
};
|
||||
|
||||
const ParserContextSharedPtr& getContext() const
|
||||
@@ -547,11 +547,11 @@ namespace slideshow
|
||||
|
||||
|
||||
ExpressionGrammar aExpressionGrammer( pContext );
|
||||
- const ::boost::spirit::parse_info<StringIteratorT> aParseInfo(
|
||||
- ::boost::spirit::parse( aStart,
|
||||
+ const ::boost::spirit::classic::parse_info<StringIteratorT> aParseInfo(
|
||||
+ ::boost::spirit::classic::parse( aStart,
|
||||
aEnd,
|
||||
aExpressionGrammer,
|
||||
- ::boost::spirit::space_p ) );
|
||||
+ ::boost::spirit::classic::space_p ) );
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
::std::cout.flush(); // needed to keep stdout and cout in sync
|
||||
@@ -590,11 +590,11 @@ namespace slideshow
|
||||
|
||||
|
||||
ExpressionGrammar aExpressionGrammer( pContext );
|
||||
- const ::boost::spirit::parse_info<StringIteratorT> aParseInfo(
|
||||
- ::boost::spirit::parse( aStart,
|
||||
+ const ::boost::spirit::classic::parse_info<StringIteratorT> aParseInfo(
|
||||
+ ::boost::spirit::classic::parse( aStart,
|
||||
aEnd,
|
||||
- aExpressionGrammer >> ::boost::spirit::end_p,
|
||||
- ::boost::spirit::space_p ) );
|
||||
+ aExpressionGrammer >> ::boost::spirit::classic::end_p,
|
||||
+ ::boost::spirit::classic::space_p ) );
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
::std::cout.flush(); // needed to keep stdout and cout in sync
|
||||
Index: libreoffice-6.4.1.1/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
|
||||
===================================================================
|
||||
--- libreoffice-6.4.1.1.orig/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
|
||||
+++ libreoffice-6.4.1.1/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
|
||||
@@ -922,14 +922,14 @@ public:
|
||||
// notation, not the 1.0e10 one.
|
||||
|
||||
// TODO(F1): Also handle the 1.0e10 case here.
|
||||
-template< typename T > struct custom_real_parser_policies : public ::boost::spirit::ureal_parser_policies<T>
|
||||
+template< typename T > struct custom_real_parser_policies : public ::boost::spirit::classic::ureal_parser_policies<T>
|
||||
{
|
||||
template< typename ScannerT >
|
||||
- static typename ::boost::spirit::parser_result< ::boost::spirit::chlit<>, ScannerT >::type
|
||||
+ static typename ::boost::spirit::classic::parser_result< ::boost::spirit::classic::chlit<>, ScannerT >::type
|
||||
parse_exp(ScannerT& scan)
|
||||
{
|
||||
// as_lower_d somehow breaks MSVC7
|
||||
- return ::boost::spirit::ch_p('E').parse(scan);
|
||||
+ return ::boost::spirit::classic::ch_p('E').parse(scan);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -961,7 +961,7 @@ template< typename T > struct custom_rea
|
||||
|
||||
*/
|
||||
|
||||
-class ExpressionGrammar : public ::boost::spirit::grammar< ExpressionGrammar >
|
||||
+class ExpressionGrammar : public ::boost::spirit::classic::grammar< ExpressionGrammar >
|
||||
{
|
||||
public:
|
||||
/** Create an arithmetic expression grammar
|
||||
@@ -980,10 +980,10 @@ public:
|
||||
// grammar definition
|
||||
explicit definition( const ExpressionGrammar& self )
|
||||
{
|
||||
- using ::boost::spirit::str_p;
|
||||
- using ::boost::spirit::range_p;
|
||||
- using ::boost::spirit::lexeme_d;
|
||||
- using ::boost::spirit::real_parser;
|
||||
+ using ::boost::spirit::classic::str_p;
|
||||
+ using ::boost::spirit::classic::range_p;
|
||||
+ using ::boost::spirit::classic::lexeme_d;
|
||||
+ using ::boost::spirit::classic::real_parser;
|
||||
|
||||
identifier =
|
||||
str_p( "pi" )[ EnumFunctor(ExpressionFunct::EnumPi, self.getContext() ) ]
|
||||
@@ -1072,7 +1072,7 @@ public:
|
||||
BOOST_SPIRIT_DEBUG_RULE(identifier);
|
||||
}
|
||||
|
||||
- const ::boost::spirit::rule< ScannerT >& start() const
|
||||
+ const ::boost::spirit::classic::rule< ScannerT >& start() const
|
||||
{
|
||||
return additiveExpression;
|
||||
}
|
||||
@@ -1080,18 +1080,18 @@ public:
|
||||
private:
|
||||
// the constituents of the Spirit arithmetic expression grammar.
|
||||
// For the sake of readability, without 'ma' prefix.
|
||||
- ::boost::spirit::rule< ScannerT > additiveExpression;
|
||||
- ::boost::spirit::rule< ScannerT > multiplicativeExpression;
|
||||
- ::boost::spirit::rule< ScannerT > unaryExpression;
|
||||
- ::boost::spirit::rule< ScannerT > basicExpression;
|
||||
- ::boost::spirit::rule< ScannerT > unaryFunction;
|
||||
- ::boost::spirit::rule< ScannerT > binaryFunction;
|
||||
- ::boost::spirit::rule< ScannerT > ternaryFunction;
|
||||
- ::boost::spirit::rule< ScannerT > funcRef_decl;
|
||||
- ::boost::spirit::rule< ScannerT > functionReference;
|
||||
- ::boost::spirit::rule< ScannerT > modRef_decl;
|
||||
- ::boost::spirit::rule< ScannerT > modifierReference;
|
||||
- ::boost::spirit::rule< ScannerT > identifier;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > additiveExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > multiplicativeExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > unaryExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > basicExpression;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > unaryFunction;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > binaryFunction;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > ternaryFunction;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > funcRef_decl;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > functionReference;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > modRef_decl;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > modifierReference;
|
||||
+ ::boost::spirit::classic::rule< ScannerT > identifier;
|
||||
};
|
||||
|
||||
const ParserContextSharedPtr& getContext() const
|
||||
@@ -1137,11 +1137,11 @@ std::shared_ptr<ExpressionNode> const &
|
||||
pContext->mpCustoShape = &rCustoShape;
|
||||
|
||||
ExpressionGrammar aExpressionGrammer( pContext );
|
||||
- const ::boost::spirit::parse_info<StringIteratorT> aParseInfo(
|
||||
- ::boost::spirit::parse( aStart,
|
||||
+ const ::boost::spirit::classic::parse_info<StringIteratorT> aParseInfo(
|
||||
+ ::boost::spirit::classic::parse( aStart,
|
||||
aEnd,
|
||||
- aExpressionGrammer >> ::boost::spirit::end_p,
|
||||
- ::boost::spirit::space_p ) );
|
||||
+ aExpressionGrammer >> ::boost::spirit::classic::end_p,
|
||||
+ ::boost::spirit::classic::space_p ) );
|
||||
|
||||
// input fully congested by the parser?
|
||||
if( !aParseInfo.full )
|
@ -1,8 +1,9 @@
|
||||
diff -urN libreoffice-4.1.0.0.beta1.old/solenv/bin/modules/installer/worker.pm libreoffice-4.1.0.0.beta1/solenv/bin/modules/installer/worker.pm
|
||||
--- libreoffice-4.1.0.0.beta1.old/solenv/bin/modules/installer/worker.pm 2013-05-27 14:04:19.186304208 +0200
|
||||
+++ libreoffice-4.1.0.0.beta1/solenv/bin/modules/installer/worker.pm 2013-05-27 15:10:46.283303732 +0200
|
||||
@@ -377,7 +377,7 @@
|
||||
symlink (readlink ("$sourcepath"), "$destdir$destination") || die "Can't symlink $destdir$destination -> " . readlink ("$sourcepath") . "$!";
|
||||
Index: libreoffice-7.0.0.0.beta2/solenv/bin/modules/installer/worker.pm
|
||||
===================================================================
|
||||
--- libreoffice-7.0.0.0.beta2.orig/solenv/bin/modules/installer/worker.pm
|
||||
+++ libreoffice-7.0.0.0.beta2/solenv/bin/modules/installer/worker.pm
|
||||
@@ -347,7 +347,7 @@ sub install_simple ($$$$$$)
|
||||
`mkdir -p "$destdir$destination"`;
|
||||
}
|
||||
else {
|
||||
- copy ("$sourcepath", "$destdir$destination") || die "Can't copy file: $sourcepath -> $destdir$destination $!";
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:54388597dffc9c32f81446e6e634f7af76ca0e0e5a0d27bc3fe89033a011c078
|
||||
size 231325236
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAl676X8ACgkQ9DSh76/u
|
||||
rqNCFw/+NZHnL5hxsyxa0UF0vnEofwFl1oYMfNK0ab7iM1GqeNIRAoZDsRNGFrqE
|
||||
wQNpxA3zK6L1wC09Qgg7p2U2jpOlKMrppiCE7TOvZ4hoZDQVDr2vMzfQeaY/IkLt
|
||||
Hm5GGGxIq7HAmgkRTomtfJZHQerbBa+h0GQ7cyO3HWV0wZ+yxH8dYeSFllpPuori
|
||||
3lHVULa2dw8ZCZcS05PDc5sACZiuG0otu3kzVXJ8j+9HpKBO5msrnBPaHq6/xilg
|
||||
Oh/TP3HJ2xOEHBnlh2Ng1aHK+rTzsMr4woNvvrJq0t8wFHBPxWRv9s9dnbPTnC4i
|
||||
G7F34F0/Tjd6iajXUhA5bXQl+zxCDg/bCTdobMBzCIsoWxAqVbIYFaruV8Db8i4n
|
||||
w/IOz+BIuZYc/kvXQrgCl8aLqfkv66ATxtaSaiHXrhPT0R2G4Uyhz0wcEba9QN/u
|
||||
vyBsxTxkPGhktlfSSRjd8Om3XQpq1qJ8ciC6mMOBB0XQUYXRsJYVLXW7Z6kSqKsd
|
||||
82Vk1q67njNBS0IuhjEQ3F4ubrJCyVJTSBKZ7RQv13N0vwXQe4wHcywEdwo7/EAH
|
||||
ciVX8IN/crnirM3fQYCYSb8C4/wb8fbj34+AgKlD07HYTwuFUADtS9iw2JcW49od
|
||||
L2aRiVIsTyBnWWstZu/ryrapSzMWhSKUDHMedU7TXonXrcWVj4o=
|
||||
=G7OO
|
||||
-----END PGP SIGNATURE-----
|
3
libreoffice-7.0.0.0.beta2.tar.xz
Normal file
3
libreoffice-7.0.0.0.beta2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f86f74a6066b04472234d961b6475cc9180e9e207b82ee3edfca153ff4dbf66e
|
||||
size 235665948
|
16
libreoffice-7.0.0.0.beta2.tar.xz.asc
Normal file
16
libreoffice-7.0.0.0.beta2.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAl7p4zgACgkQ9DSh76/u
|
||||
rqN0Mw/8D7Q4JV0P79abZ2zt52iax9Z5VPTv+FXeoMmOkzS+RHQQTMLMC7BlQ/vf
|
||||
yeRgqxw5LDeRdrGNNmj9kUvOL947+u+ajuhrRSvlEUztKowgKhE3kDYipT1eluoV
|
||||
Bv4uFykVdD12w/+7TwuGpZqSYm28yODEcfTZRVdV7/6hz40TZd4pmb9/4iC0o8+e
|
||||
X31V7gnn0xJt6AaKDLGR5xl+LA+lL8araBZrcaaBtuU1hnzOHSCmWqe3bEDj6GwV
|
||||
pJ9Go5eSb6FpCTMZjgAxE04Bo6ygseC2yB6q+Xln/yzrTCrNYfCPZrKhD8rC+NJc
|
||||
/kC9FEKXikG7VjFCeZ2xX6U6/MIcSOwzj3dTml6XaE1w86Nz5t/k41qNxatONh46
|
||||
0M8EoNbK3pk9F4QBcyT1U8Kp18uhP6GVxzuj/XBiLHXvpBG+4sWTCnS4qE+bevaq
|
||||
BVNa5EYFk2kvZH4Lwq8V4JKqLDbW8+NWGESfAFyEoe8ZbKh2zvKTFf3v44yZnFWP
|
||||
+J8Y2wxDz6et2vUZb7yOxexBm5DHRRFZCwsDr2T9jSOKLiUy5yEwG6p/CIV8D84k
|
||||
+qN2Kvg9uwEjfXgk2MNrMfkRxWKJ6FGia8PCgMA4MHFzannG2ArIP10D6ZCmJDgR
|
||||
OlKL9Low3Nw1LIKKK8GNbHy+lFJye+Q2+DJVPnj7ah9ikkbbYbk=
|
||||
=iI6i
|
||||
-----END PGP SIGNATURE-----
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c61ac7b9ceac9aa0813bce405ce25b13dc1b698509ce33827ff7c65dffde25ac
|
||||
size 88296340
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAl676YMACgkQ9DSh76/u
|
||||
rqOy8RAAlD39J0T8PxoyiiJ+NFLNhWbywavtjHDbAObvSN4x83MbYEbRNzayQCSU
|
||||
MnFxustGK9jJzZ9DI4edZ8rjUBO7zOSsHcd5MXpupL8ye0Fp8YYafBeHiS8Q+FF8
|
||||
x3e5EpPotZxx5ne54VqG46C3+PzqA9YZ+GIyBRVkrO4YWKfJYA6rlxJn0AQXEX2A
|
||||
lNU/oZq6JX4BafG0bX0Qcz4KGKNtrpCqoHyj9auzLF+kV8c1zzPqU5A6pW2B8kQk
|
||||
mZfz57bIomtmVSO7gqhc7ZSe7wHLmhsx79NZo/LPjxWxQ8c/P12dbHPxmQkIaPmQ
|
||||
96kfoakR+ExAMzrHPSniATgipJrhdvX+HJXVvl7cPYwtLihM+CwzamMjUcaEszqG
|
||||
EWFnaoVcIoX6KNvGIO8hZ9IoNwdgPkhaYMp9U1gIcmryHak+AAeLBNDVK4hMQEZQ
|
||||
cPS95gCofaY2TzoQMpAy8qe600+oGZIsvWX9212w+NhqO5oYhtq2URrQkyeFobtw
|
||||
hFe0/BjPlS4HEPGC8kM80TfWmc+oOL0sjLb5Uccb8WMoZ4/PGttBFSe5Kbdo/ivH
|
||||
bRCXtSe3dwinKFcf97SLlWhUsIvPRq1zMLeTl475KiCBxnNZnE2Nt4hV1FBEaHla
|
||||
fzd9z7OPmV2zCgcERX+834RTVtWlYQ0EwbAGlaCOcKqUXAQh9yg=
|
||||
=jDpN
|
||||
-----END PGP SIGNATURE-----
|
3
libreoffice-help-7.0.0.0.beta2.tar.xz
Normal file
3
libreoffice-help-7.0.0.0.beta2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dcf67d06efa414985f9b3d3ede4389bffcba3b1b290cc6350469db9f446e0129
|
||||
size 110758028
|
16
libreoffice-help-7.0.0.0.beta2.tar.xz.asc
Normal file
16
libreoffice-help-7.0.0.0.beta2.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAl7p4z0ACgkQ9DSh76/u
|
||||
rqMuShAAu5/V50JxuJCNoLFDokIW0UDSqYjt/04JiWyuTbxvFhq5my3ufkfTXaVe
|
||||
rwq8o9N3agmrgb2uyQB4FFN5aJgyg3gnsZCKOyDoSRm+jK366nXT45p3Hm1vassI
|
||||
P3RwNe54lNNo1o8Ou5varAy7jMyn59pTt4FJSWVE3FnzrnuwDGtCRR/HotOWe3Od
|
||||
LfagH2ljMDzxamvmcx3CXOfvujMnhu7DAaENh/ACD1bqLYQmWA4OdwucmTnT6awj
|
||||
bUTn9NkBJxx0a/dwNltLuTY2oPV5hmfPvXXixYxa8M/nrB6KVVh68IwrPIdK5NQX
|
||||
YSuBNL8Kc0V4w13giYD1Pd54FE/+u/jvu4u/esf4rxGsykZz8vaE9tOjYPxwYJ+9
|
||||
gMZhwym6IGWgcBNz4uXQXQyTYSGlDt/7ww8TXkwk9Iy+WFj5ABGJuw+cCkmNY5bT
|
||||
KpEqK3YXrBQ4j7QA9z2gJCSnVjwzjnUaA6oIfwjwsBDsAkc9Hmc8ayFH7GmJxKLX
|
||||
DjFWvd1nhIYNrjasj9MLjKZTWn21hCYZWOixrqr02Td09Kb4Mi/q0UT3V2FvW1Ml
|
||||
SREATHliqOzPk/aAGTyanrnQxvKeNwRSwZ9fLWuix5Jzzlu4XJHq68MWT2qDEaPo
|
||||
OaM87UPLNPUDk4HFSXxY8uakes6M422XU503CFJ8sGv/wPaqWvU=
|
||||
=VAdW
|
||||
-----END PGP SIGNATURE-----
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:49cd385aabe7f197447ac0645a8fcdba75b04642b38fac49342aace2055098bd
|
||||
size 172568720
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAl676YQACgkQ9DSh76/u
|
||||
rqOzARAAp6IVNSlCoMHryOk9Zx6LsWhsYnAQdyi7ZwxNecHU/PkzuadIlFIfXxYi
|
||||
omUTCf8elq+NSjpMnnois+FjBFZsdzMmYX8w5ktyWwO0Y6c5tzZbfX/gbz3QU0Hn
|
||||
/eY3UR8323Pkrpgag5yK/v8F+Z74OFuQrJC368kwPX4sQHBSrhtqAQ5eu5Q7rJif
|
||||
N7KREGDu22Tjy9/+8XzaP6kj71QYhYQKybrGOOdfjg15spdK4zUW7cgtXgVZ2pB5
|
||||
rG0yK7/fTOaM7A0fQOVoV3Aj1EGbC7E6Jd+spYJBnjYVrDH9JwseIulrCBAguBGo
|
||||
c60+vPyFj6yGFFUXqlcyEBPmJ4mmZDYdSYdyxjXQkbhduEE2okoXl2cCA9yWPL8r
|
||||
8uGOU5Ze7LAQWV1xRO2oVu2UsceP/3OasbrnIy24A4LNzFG0JhJqavjQawRmWYey
|
||||
iXqpz1Kjj5RaEUTFV8G8x3zVq8bi0s5d0QqDTgajsSmUjaWyhw02i9vyMGW6utW2
|
||||
3jieB3Ndre2B6Xjg+n6MeIkrzl/c+PVRiQ/17zjMFSpNTksm0HNj78rkrI6F0vH6
|
||||
OkLUlimeKgS4907wL0AVqws350PIsS6iXIYTCfYLh2ougKOgwIpSfmfW4a5lMuf1
|
||||
O9nsAcZWousnZDjqOg7Yom51X86VkQdV0Vf69gtkFP1bfwDw5Ps=
|
||||
=fuqE
|
||||
-----END PGP SIGNATURE-----
|
3
libreoffice-translations-7.0.0.0.beta2.tar.xz
Normal file
3
libreoffice-translations-7.0.0.0.beta2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f9da9ce9a3f8d1f3992617968f025d4d90dc843cc24e88f73969bb4c233ced8b
|
||||
size 174067116
|
16
libreoffice-translations-7.0.0.0.beta2.tar.xz.asc
Normal file
16
libreoffice-translations-7.0.0.0.beta2.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAl7p4z8ACgkQ9DSh76/u
|
||||
rqMytBAAyfNPyf+iWEr2nAUbS5sg4IFZXPPncE32TkJwGrTNWFFmFoxJwsk/duWX
|
||||
VDAc+P0RjUEFapFrCm9UMqtzz3p6cVc4RGC3O/dSn9hcKJ6y+1vEBIMPe0/5U3bR
|
||||
iH0WDVW6AlFbOvcPr7mWZDBzyQIlb81ba1zXSvMMWzB9NgjgGkn9VkG536HUQ44O
|
||||
fWvt8st6kfi3aEeQFnYBWxhh/nff1s+rmUdcmw4vsyLqoqVnKK+K2KwhcXXdwbVG
|
||||
p7zyya1Y6IBinnndSqRoR69DfWEw4bubqaEyWuNjJVuChYziuykl235vggJA5B0x
|
||||
5MZ9/2vDezoHbvlej6ucs0ZJmy7/5PxaL1P1/ZX0GTLddR/3v8QvmwoEsHFBAkxr
|
||||
t5uPCSffcQ4cEP22xcZ+xIjpkv8QPHxrJ9aSF7JjfXCtXUsn1oC1EtCrEmtNkE0t
|
||||
7JjLT2NFbKLkDAiE2X/YPQ3O0ynTyJ9U3FAmPFJe8pnWAjlR4+Y9bslPFTKj9wnF
|
||||
DAuWkgNuXH2ma1chjDUOi/f1KKSiHNgxmwO5M8ijWhmMOKSb6OaoT5WcwWsHW6MW
|
||||
zygJHQNYude+LJpGb6+1HFzISGuZzAGYKu091gid/syUky3ZMv7xO2HBE4JGJuXT
|
||||
OCkYF5sIDvpdl6Nsg0ZTkSBaVz78e+DFjWXPoFaICKy4Wnxe5dI=
|
||||
=LaTh
|
||||
-----END PGP SIGNATURE-----
|
@ -1,3 +1,28 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 18 11:40:25 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 7.0.0.0.beta2:
|
||||
* Beta candidate with all the new 7.0 series content
|
||||
- Remove merged patches:
|
||||
* bsc1146025.diff
|
||||
* bsc1157627.diff
|
||||
* bsc1160687-2.diff
|
||||
* bsc1160687-3.diff
|
||||
* bsc1160687-4.diff
|
||||
* bsc1160687-5.diff
|
||||
* bsc1160687-6.diff
|
||||
* bsc1160687-7.diff
|
||||
* bsc1160687-8.diff
|
||||
* bsc1165849-1.diff
|
||||
* bsc1165849-2.diff
|
||||
* bsc1165849-3.diff
|
||||
* bsc1165870.diff
|
||||
* bsc1172053.diff
|
||||
* bsc1172189.diff
|
||||
* replace-boost-bimap-in-sdext-pdfimport.patch
|
||||
* fix_old_boost_spirit_namespace.patch
|
||||
- Rebase patch install-with-hardlinks.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 18 07:58:11 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
%bcond_with system_gpgme
|
||||
%endif
|
||||
Name: libreoffice
|
||||
Version: 6.4.4.2
|
||||
Version: 7.0.0.0.beta2
|
||||
Release: 0
|
||||
Summary: A Free Office Suite (Framework)
|
||||
License: LGPL-3.0-or-later AND MPL-2.0+
|
||||
@ -88,9 +88,11 @@ Source2004: %{external_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
|
||||
Source2005: %{external_url}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
|
||||
# Needed for integration tests
|
||||
Source2006: https://dev-www.libreoffice.org/extern/8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
|
||||
Source2007: https://dev-www.libreoffice.org/extern/odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar
|
||||
Source2007: https://dev-www.libreoffice.org/extern/odfvalidator-0.9.0-RC2-SNAPSHOT-jar-with-dependencies-2726ab578664434a545f8379a01a9faffac0ae73.jar
|
||||
# PDFium is bundled everywhere
|
||||
Source2008: %{external_url}/pdfium-3963.tar.bz2
|
||||
Source2008: %{external_url}/pdfium-4137.tar.bz2
|
||||
# Single C file with patches from LO
|
||||
Source2009: %{external_url}/dtoa-20180411.tgz
|
||||
# change user config dir name from ~/.libreoffice/3 to ~/.libreoffice/3-suse
|
||||
# to avoid BerkleyDB incompatibility with the plain build
|
||||
Patch1: scp2-user-config-suse.diff
|
||||
@ -98,31 +100,7 @@ Patch1: scp2-user-config-suse.diff
|
||||
# FIXME: the right fix is to compile the help and produce the .db_, .ht_, and other files
|
||||
Patch2: nlpsolver-no-broken-help.diff
|
||||
Patch3: mediawiki-no-broken-help.diff
|
||||
Patch6: fix_old_boost_spirit_namespace.patch
|
||||
Patch7: poppler-0.86.patch
|
||||
Patch8: replace-boost-bimap-in-sdext-pdfimport.patch
|
||||
# Bug 1165870 - LO-L3: Image shadow that should be invisible shown as extraneous line below
|
||||
Patch9: bsc1165870.diff
|
||||
# Bug 1160687 - LO-L3: Elements on title page mixed up
|
||||
Patch11: bsc1160687-2.diff
|
||||
Patch12: bsc1160687-3.diff
|
||||
Patch13: bsc1160687-4.diff
|
||||
Patch14: bsc1160687-5.diff
|
||||
Patch15: bsc1160687-6.diff
|
||||
Patch16: bsc1160687-7.diff
|
||||
Patch17: bsc1160687-8.diff
|
||||
# Bug 1165849 - LO-L3: Shadow size for rectangle is only a fraction of Office 365
|
||||
Patch18: bsc1165849-1.diff
|
||||
Patch19: bsc1165849-2.diff
|
||||
Patch20: bsc1165849-3.diff
|
||||
# Bug 1146025 - LO-L3: Colored textboxes in PPTX look very odd (SmartArt)
|
||||
Patch21: bsc1146025.diff
|
||||
# Bug 1157627 - LO-L3: Some XML-created shapes simply lost upon PPTX import (= earth loses countries)
|
||||
Patch22: bsc1157627.diff
|
||||
# Bug 1172189 - LO-L3: Impress crashes midway opening a PPTX document
|
||||
Patch23: bsc1172189.diff
|
||||
# Bug 1172053 - LO-L3: Image disappears during roundtrip 365->Impress->365
|
||||
Patch24: bsc1172053.diff
|
||||
Patch4: poppler-0.86.patch
|
||||
# try to save space by using hardlinks
|
||||
Patch990: install-with-hardlinks.diff
|
||||
# save time by relying on rpm check rather than doing stupid find+grep
|
||||
@ -152,7 +130,7 @@ BuildRequires: graphviz
|
||||
BuildRequires: hyphen-devel
|
||||
# genbrk binary is required
|
||||
BuildRequires: icu
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: java-devel >= 9.0
|
||||
BuildRequires: junit4
|
||||
BuildRequires: libbase
|
||||
BuildRequires: libcppunit-devel >= 1.14.0
|
||||
@ -216,7 +194,7 @@ BuildRequires: pkgconfig(libexttextcat) >= 3.1.1
|
||||
BuildRequires: pkgconfig(libfreehand-0.1)
|
||||
BuildRequires: pkgconfig(liblangtag)
|
||||
BuildRequires: pkgconfig(libmspub-0.1) >= 0.1
|
||||
BuildRequires: pkgconfig(libmwaw-0.3) >= 0.3.15
|
||||
BuildRequires: pkgconfig(libmwaw-0.3) >= 0.3.16
|
||||
BuildRequires: pkgconfig(libnumbertext) >= 1.0.5
|
||||
BuildRequires: pkgconfig(libodfgen-0.1) >= 0.1.4
|
||||
BuildRequires: pkgconfig(liborcus-0.15)
|
||||
@ -225,11 +203,11 @@ BuildRequires: pkgconfig(libpq)
|
||||
BuildRequires: pkgconfig(libqxp-0.0)
|
||||
BuildRequires: pkgconfig(librevenge-0.0) >= 0.0.1
|
||||
BuildRequires: pkgconfig(librsvg-2.0)
|
||||
BuildRequires: pkgconfig(libstaroffice-0.0) >= 0.0.6
|
||||
BuildRequires: pkgconfig(libstaroffice-0.0) >= 0.0.7
|
||||
BuildRequires: pkgconfig(libvisio-0.1) >= 0.1
|
||||
BuildRequires: pkgconfig(libwpd-0.10) >= 0.10
|
||||
BuildRequires: pkgconfig(libwpg-0.3)
|
||||
BuildRequires: pkgconfig(libwps-0.4) >= 0.4.10
|
||||
BuildRequires: pkgconfig(libwps-0.4) >= 0.4.11
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
BuildRequires: pkgconfig(libxslt)
|
||||
BuildRequires: pkgconfig(libzmf-0.0)
|
||||
@ -317,6 +295,7 @@ BuildRequires: pkgconfig(Qt5Gui)
|
||||
BuildRequires: pkgconfig(Qt5Network)
|
||||
BuildRequires: pkgconfig(Qt5Widgets)
|
||||
BuildRequires: pkgconfig(Qt5X11Extras)
|
||||
BuildRequires: pkgconfig(xcb-icccm)
|
||||
%else
|
||||
Provides: %{name}-kde4 = %{version}
|
||||
Obsoletes: %{name}-kde4 < %{version}
|
||||
@ -598,7 +577,7 @@ Requires: gcc-c++
|
||||
Requires: make
|
||||
Requires: ucpp
|
||||
Requires: zip
|
||||
Recommends: java-devel >= 1.8
|
||||
Recommends: java-devel >= 9.0
|
||||
Provides: libreoffice-ure-devel = %{version}
|
||||
Obsoletes: libreoffice-ure-devel < %{version}
|
||||
|
||||
@ -657,10 +636,10 @@ Requires: libreoffice-pyuno = %{version}
|
||||
Requires(pre): libreoffice = %{version}
|
||||
# the watchWindow extension is written in java
|
||||
%ifarch %{ix86}
|
||||
Requires: jre-32 >= 1.8
|
||||
Requires: jre-32 >= 9.0
|
||||
%endif
|
||||
%ifarch x86_64 aarch64 ppc64le
|
||||
Requires: jre-64 >= 1.8
|
||||
Requires: jre-64 >= 9.0
|
||||
%endif
|
||||
|
||||
%description calc-extensions
|
||||
@ -677,10 +656,10 @@ Requires: libreoffice-writer = %{version}
|
||||
Requires(pre): libreoffice = %{version}
|
||||
# the wiki extension is written in java
|
||||
%ifarch %{ix86}
|
||||
Requires: jre-32 >= 1.8
|
||||
Requires: jre-32 >= 9.0
|
||||
%endif
|
||||
%ifarch x86_64 aarch64 ppc64le
|
||||
Requires: jre-64 >= 1.8
|
||||
Requires: jre-64 >= 9.0
|
||||
%endif
|
||||
|
||||
%description writer-extensions
|
||||
@ -978,24 +957,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo
|
||||
%endif # Leap 42/SLE-12
|
||||
%patch2
|
||||
%patch3
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch4 -p1
|
||||
%patch990 -p1
|
||||
%patch991 -p1
|
||||
|
||||
@ -1150,7 +1112,9 @@ export NOCONFIGURE=yes
|
||||
--disable-coinmp \
|
||||
--enable-symbols \
|
||||
--with-gdrive-client-secret="${google_default_client_secret}" \
|
||||
--with-gdrive-client-id="${google_default_client_id}"
|
||||
--with-gdrive-client-id="${google_default_client_id}" \
|
||||
--disable-skia
|
||||
# no reason to build skia at the moment for us with gtk ui
|
||||
# no coinormp packages for coinmp
|
||||
|
||||
# just call make here as we added the jobs in configure
|
||||
|
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d55495ab3a86544650587de2a72180ddf8bfc6376d14ddfa923992dbc86a06e0
|
||||
size 27397202
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:984f2a479df79e27e7b01a5815ac53ae64e07746b882262d8a64566494515504
|
||||
size 23988874
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80d4d6bd8faec226936fcde5521c6e92c0c645126ac3ae72dd2c160ca1749895
|
||||
size 7083415
|
3
pdfium-4137.tar.bz2
Normal file
3
pdfium-4137.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9a2f9bddca935a263f06c81003483473a525ccd0f4e517bc75fceb914d4c54b6
|
||||
size 7198680
|
@ -1,110 +0,0 @@
|
||||
From 193b49763a03d63ba79db50c1fa0563ec0d6b0c3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Wed, 29 Jan 2020 12:44:52 +0000
|
||||
Subject: [PATCH] replace boost::bimap in sdext pdfimport
|
||||
|
||||
Change-Id: Ie324a0b81931bbd427483878a87beeca455ada18
|
||||
---
|
||||
sdext/source/pdfimport/inc/pdfiprocessor.hxx | 12 ++++-------
|
||||
sdext/source/pdfimport/tree/pdfiprocessor.cxx | 21 +++++++++++--------
|
||||
2 files changed, 16 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/sdext/source/pdfimport/inc/pdfiprocessor.hxx b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
|
||||
index 89f9d601b7b0..9e08d6a6a765 100644
|
||||
--- a/sdext/source/pdfimport/inc/pdfiprocessor.hxx
|
||||
+++ b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
|
||||
@@ -37,9 +37,6 @@
|
||||
#include "treevisitorfactory.hxx"
|
||||
#include "genericelements.hxx"
|
||||
|
||||
-#include <boost/bimap/bimap.hpp>
|
||||
-#include <boost/bimap/unordered_set_of.hpp>
|
||||
-
|
||||
namespace pdfi
|
||||
{
|
||||
|
||||
@@ -160,10 +157,8 @@ namespace pdfi
|
||||
typedef std::unordered_map<sal_Int32,FontAttributes> IdToFontMap;
|
||||
typedef std::unordered_map<FontAttributes,sal_Int32,FontAttrHash> FontToIdMap;
|
||||
|
||||
- typedef boost::bimaps::bimap<
|
||||
- boost::bimaps::unordered_set_of<GraphicsContext, GraphicsContextHash>,
|
||||
- boost::bimaps::unordered_set_of<sal_Int32>
|
||||
- > GCToIdBiMap;
|
||||
+ typedef std::unordered_map<sal_Int32,GraphicsContext> IdToGCMap;
|
||||
+ typedef std::unordered_map<GraphicsContext, sal_Int32, GraphicsContextHash> GCToIdMap;
|
||||
|
||||
typedef std::vector<GraphicsContext> GraphicsContextStack;
|
||||
|
||||
@@ -178,7 +173,8 @@ namespace pdfi
|
||||
|
||||
GraphicsContextStack m_aGCStack;
|
||||
sal_Int32 m_nNextGCId;
|
||||
- GCToIdBiMap m_aGCToId;
|
||||
+ IdToGCMap m_aIdToGC;
|
||||
+ GCToIdMap m_aGCToId;
|
||||
|
||||
ImageContainer m_aImages;
|
||||
|
||||
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
|
||||
index c6baa7fee8b2..ed2eaf6510b9 100644
|
||||
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
|
||||
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
|
||||
@@ -54,6 +54,7 @@ namespace pdfi
|
||||
m_aFontToId(),
|
||||
m_aGCStack(),
|
||||
m_nNextGCId( 1 ),
|
||||
+ m_aIdToGC(),
|
||||
m_aGCToId(),
|
||||
m_aImages(),
|
||||
m_nPages(0),
|
||||
@@ -65,12 +66,13 @@ namespace pdfi
|
||||
aDefFont.isBold = false;
|
||||
aDefFont.isItalic = false;
|
||||
aDefFont.size = 10*PDFI_OUTDEV_RESOLUTION/72;
|
||||
- m_aIdToFont[ 0 ] = aDefFont;
|
||||
- m_aFontToId[ aDefFont ] = 0;
|
||||
+ m_aIdToFont.insert({0, aDefFont});
|
||||
+ m_aFontToId.insert({aDefFont, 0});
|
||||
|
||||
GraphicsContext aDefGC;
|
||||
m_aGCStack.push_back( aDefGC );
|
||||
- m_aGCToId.insert(GCToIdBiMap::relation(aDefGC, 0));
|
||||
+ m_aGCToId.insert({aDefGC, 0});
|
||||
+ m_aIdToGC.insert({0, aDefGC});
|
||||
}
|
||||
|
||||
void PDFIProcessor::setPageNum( sal_Int32 nPages )
|
||||
@@ -468,12 +470,13 @@ const FontAttributes& PDFIProcessor::getFont( sal_Int32 nFontId ) const
|
||||
sal_Int32 PDFIProcessor::getGCId( const GraphicsContext& rGC )
|
||||
{
|
||||
sal_Int32 nGCId = 0;
|
||||
- auto it = m_aGCToId.left.find( rGC );
|
||||
- if( it != m_aGCToId.left.end() )
|
||||
+ auto it = m_aGCToId.find( rGC );
|
||||
+ if( it != m_aGCToId.end() )
|
||||
nGCId = it->second;
|
||||
else
|
||||
{
|
||||
- m_aGCToId.insert(GCToIdBiMap::relation(rGC, m_nNextGCId));
|
||||
+ m_aGCToId.insert({rGC, m_nNextGCId});
|
||||
+ m_aIdToGC.insert({m_nNextGCId, rGC});
|
||||
nGCId = m_nNextGCId;
|
||||
m_nNextGCId++;
|
||||
}
|
||||
@@ -483,9 +486,9 @@ sal_Int32 PDFIProcessor::getGCId( const GraphicsContext& rGC )
|
||||
|
||||
const GraphicsContext& PDFIProcessor::getGraphicsContext( sal_Int32 nGCId ) const
|
||||
{
|
||||
- auto it = m_aGCToId.right.find( nGCId );
|
||||
- if( it == m_aGCToId.right.end() )
|
||||
- it = m_aGCToId.right.find( 0 );
|
||||
+ auto it = m_aIdToGC.find( nGCId );
|
||||
+ if( it == m_aIdToGC.end() )
|
||||
+ it = m_aIdToGC.find( 0 );
|
||||
return it->second;
|
||||
}
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user