[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - oox/source sw/source
Armin Le Grand
alg at apache.org
Fri Apr 25 07:07:49 PDT 2014
oox/source/drawingml/customshapeproperties.cxx | 11 ++++++++
oox/source/ppt/slidefragmenthandler.cxx | 31 +++++++++++++++++--------
oox/source/token/properties.txt | 1
sw/source/core/tox/tox.cxx | 17 +++++++------
4 files changed, 42 insertions(+), 18 deletions(-)
New commits:
commit 8625253da753153838554fef459ae603ca8d3ecc
Author: Armin Le Grand <alg at apache.org>
Date: Fri Apr 25 12:56:19 2014 +0000
i124703 adapt coordinate range from ms relative control points to aoo relative control points
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 0c8275b..888e76b 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/graphic/XGraphicTransformer.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
+#include <basegfx/numeric/ftools.hxx>
using rtl::OUString;
using namespace ::oox::core;
@@ -194,7 +195,15 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi
if ( ( nAdjustmentIndex >= 0 ) && ( nAdjustmentIndex < aAdjustmentSeq.getLength() ) )
{
EnhancedCustomShapeAdjustmentValue aAdjustmentVal;
- aAdjustmentVal.Value <<= (*aIter).maFormula.toInt32();
+
+ sal_Int32 nValue((*aIter).maFormula.toInt32());
+
+ // #124703# The ms control point coordinates are relative to the
+ // object center in the range [-50000 .. 50000] while our customshapes
+ // use a range from [0 .. 21600], so adapt the value as needed
+ nValue = basegfx::fround((double(nValue) + 50000.0) * (21600.0 / 100000.0));
+
+ aAdjustmentVal.Value <<= nValue;
aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
aAdjustmentSeq[ nAdjustmentIndex ] = aAdjustmentVal;
}
commit fd29c8d6368e5e6039dec45a1b40452a42e8d524
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Fri Apr 25 11:39:20 2014 +0000
124451: WW8 import - application of index entry template patterns
-- do not propagate tab stops of unused paragraph styles
-- do not propagate default tab stops
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 05d42c3..b4e1c97 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -430,17 +430,15 @@ bool operator == (const SwFormToken & rToken, FormTokenType eType)
//-----------------------------------------------------------------------------
void SwForm::AdjustTabStops( SwDoc& rDoc ) // #i21237#
{
- for(sal_uInt16 nLevel = 1; nLevel < GetFormMax(); nLevel++)
+ const sal_uInt16 nFormMaxLevel = GetFormMax();
+ for ( sal_uInt16 nLevel = 1; nLevel < nFormMaxLevel; ++nLevel )
{
- const String& sTemplateName = GetTemplate(nLevel);
-
- SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( sTemplateName );
+ SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( GetTemplate(nLevel) );
if( pColl == NULL )
{
- const sal_uInt16 nId =
- SwStyleNameMapper::GetPoolIdFromUIName( sTemplateName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL );
- if ( USHRT_MAX != nId )
- pColl = rDoc.GetTxtCollFromPool( nId );
+ // Paragraph Style for this level has not been created.
+ // --> No need to propagate default values
+ continue;
}
const SvxTabStopItem* pTabStops = pColl != NULL ? &pColl->GetTabStops(sal_False) : 0;
@@ -456,6 +454,9 @@ void SwForm::AdjustTabStops( SwDoc& rDoc ) // #i21237#
{
const SvxTabStop& rTab = (*pTabStops)[nTab];
+ if ( rTab.GetAdjustment() == SVX_TAB_ADJUST_DEFAULT )
+ continue; // ignore the default tab stop
+
aIt = find_if( aIt, aCurrentPattern.end(), SwFormTokenEqualToFormTokenType(TOKEN_TAB_STOP) );
if ( aIt != aCurrentPattern.end() )
{
commit 34243aa8c03a913b97465433a95a22513625b5a4
Author: Steve Yin <steve_y at apache.org>
Date: Fri Apr 25 08:19:47 2014 +0000
https://issues.apache.org/ooo/show_bug.cgi?id=116796
Added "IsBackgroundObjectsVisible" property support for sd OOXML importing
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 0f2ab8d..a00ab35 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -77,19 +77,32 @@ Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( s
switch( aElementToken )
{
+ case PPT_TOKEN( sld ): // CT_Slide
+ {
+ OptValue< bool > aShowMasterSp = aAttribs.getBool( XML_showMasterSp );
+ if( aShowMasterSp.has() && !aShowMasterSp.get() )
+ {
+ PropertyMap aPropMap;
+ aPropMap[ PROP_IsBackgroundObjectsVisible ] = Any( false );
+
+ Reference< XDrawPage > xSlide( mpSlidePersistPtr->getPage() );
+ PropertySet aSlideProp( xSlide );
+ aSlideProp.setProperties( aPropMap );
+ }
+ }
case PPT_TOKEN( sldMaster ): // CT_SlideMaster
case PPT_TOKEN( handoutMaster ): // CT_HandoutMaster
- case PPT_TOKEN( sld ): // CT_CommonSlideData
{
- AttributeList attribs( xAttribs );
-
- Reference< XDrawPage > xSlide( mpSlidePersistPtr->getPage() );
- PropertyMap aPropMap;
- PropertySet aSlideProp( xSlide );
-
- aPropMap[ PROP_Visible ] = Any( attribs.getBool( XML_show, sal_True ) );
- aSlideProp.setProperties( aPropMap );
+ OptValue< bool > aShow = aAttribs.getBool( XML_show );
+ if( aShow.has() && !aShow.get() )
+ {
+ PropertyMap aPropMap;
+ aPropMap[ PROP_Visible ] = Any( false );
+ Reference< XDrawPage > xSlide( mpSlidePersistPtr->getPage() );
+ PropertySet aSlideProp( xSlide );
+ aSlideProp.setProperties( aPropMap );
+ }
break;
}
case PPT_TOKEN( notes ): // CT_NotesSlide
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 348fe31..0ea6826 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -221,6 +221,7 @@ InputMessage
InputTitle
IsActive
IsAdjustHeightEnabled
+IsBackgroundObjectsVisible
IsCaseSensitive
IsCellBackgroundTransparent
IsChangeReadOnlyEnabled
More information about the Libreoffice-commits
mailing list