[Libreoffice-commits] .: oox/source

2012-04-13 Thread Miklos Vajna
 oox/source/drawingml/shape.cxx |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit b8b69ab0889e24ae385cda40b0ebbb1099a4d150
Author: Miklos Vajna vmik...@suse.cz
Date:   Fri Apr 13 10:43:19 2012 +0200

oox::drawingml::Shape: OSL_TRACE - SAL_INFO

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 967f57c..51803a6 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -205,7 +205,7 @@ void Shape::addShape(
 const awt::Rectangle* pShapeRect,
 ShapeIdMap* pShapeMap )
 {
-OSL_TRACE(Shape::addShape id: %s, rtl::OUStringToOString(msId, 
RTL_TEXTENCODING_UTF8 ).getStr());
+SAL_INFO(oox, OSL_THIS_FUNC   id:   msId);
 
 try
 {
@@ -233,7 +233,7 @@ void Shape::addShape(
 
 void Shape::applyShapeReference( const Shape rReferencedShape )
 {
-OSL_TRACE(apply shape reference: %s to shape id: %s, 
rtl::OUStringToOString(rReferencedShape.msId, RTL_TEXTENCODING_UTF8 ).getStr(), 
rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr());
+SAL_INFO(oox, apply shape reference:   rReferencedShape.msId   to 
shape id:   msId);
 
 if ( rReferencedShape.mpTextBody.get() )
 mpTextBody = TextBodyPtr( new TextBody( 
*rReferencedShape.mpTextBody.get() ) );
@@ -331,7 +331,7 @@ Reference XShape  Shape::createAndInsert(
 basegfx::B2DHomMatrix aParentTransformation )
 {
 bool bIsEmbMedia = false;
-OSL_TRACE(Shape::createAndInsert id: %s, rtl::OUStringToOString(msId, 
RTL_TEXTENCODING_UTF8 ).getStr());
+SAL_INFO(oox, OSL_THIS_FUNC   id:   msId);
 
 awt::Rectangle aShapeRectHmm( maPosition.X / 360, maPosition.Y / 360, 
maSize.Width / 360, maSize.Height / 360 );
 
@@ -468,7 +468,7 @@ Reference XShape  Shape::createAndInsert(
 
 if ( mbHidden || mbHiddenMasterShape )
 {
-OSL_TRACE(invisible shape with id: %s, 
rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr());
+SAL_INFO(oox, invisible shape with id:   msId);
 const OUString sVisible( CREATE_OUSTRING( Visible ) );
 xSet-setPropertyValue( sVisible, Any( sal_False ) );
 }
@@ -561,7 +561,7 @@ Reference XShape  Shape::createAndInsert(
 mpCustomShapePropertiesPtr-setTextRotateAngle( 
-nTextRotateAngle / 6 );
 }
 
-OSL_TRACE(==cscode== shape name: '%s', 
rtl::OUStringToOString(msName, RTL_TEXTENCODING_UTF8 ).getStr());
+SAL_INFO(oox, ==cscode== shape name:   msName);
 mpCustomShapePropertiesPtr-pushToPropSet( rFilterBase, xSet, 
mxShape );
 }
 else if( getTextBody() )
@@ -579,7 +579,7 @@ Reference XShape  Shape::createAndInsert(
 if( pTheme )
 if( const TextCharacterProperties* pCharProps = 
pTheme-getFontStyle( pFontRef-mnThemedIdx ) )
 aCharStyleProperties.assignUsed( *pCharProps );
-OSL_TRACE(use font color);
+SAL_INFO(oox, use font color);
 aCharStyleProperties.maCharColor.assignIfUsed( 
pFontRef-maPhClr );
 }
 
@@ -615,7 +615,7 @@ void Shape::moveAllToPosition( const Point rPoint )
 
 void Shape::setMasterTextListStyle( const TextListStylePtr 
pMasterTextListStyle )
 {
-OSL_TRACE(set master text list style to shape id: %s, 
rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr());
+SAL_INFO(oox, set master text list style to shape id: %s  msId);
 
 mpMasterTextListStyle = pMasterTextListStyle;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source svx/inc svx/source

2012-04-09 Thread Muthu Subramanian
 oox/source/drawingml/customshapeproperties.cxx|1 +
 oox/source/token/properties.txt   |1 +
 svx/inc/svx/EnhancedCustomShape2d.hxx |1 +
 svx/inc/svx/svdoashp.hxx  |1 +
 svx/source/customshapes/EnhancedCustomShape2d.cxx |5 +
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx |   10 --
 svx/source/svdraw/svdoashp.cxx|   11 +++
 7 files changed, 28 insertions(+), 2 deletions(-)

New commits:
commit 1c44b263d789b4c20e9178c6432300e301df94d6
Author: Muthu Subramanian sumu...@suse.com
Date:   Mon Apr 9 18:24:11 2012 +0530

fdo43752: PPTX import fix affected odp imports.

Related bugs: n#719989, n#719997

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index 071f37a..90c0027 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -158,6 +158,7 @@ void CustomShapeProperties::pushToPropSet( const 
::oox::core::FilterBase /* rFi
 aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX );
 aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY );
 aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle );
+aPropertyMap[ PROP_IsPostRotateAngle ] = true; // For OpenXML Imports
 Sequence PropertyValue  aSeq = 
aPropertyMap.makePropertyValueSequence();
 aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
 
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 7ad1a4c..a86df72 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -244,6 +244,7 @@ IsLoaded
 IsNumbering
 IsOutlineSymbolsSet
 IsPlaceholderDependent
+IsPostRotateAngle
 IsSharedFormula
 IsStartOfNewPage
 IsTextWrapped
diff --git a/svx/inc/svx/EnhancedCustomShape2d.hxx 
b/svx/inc/svx/EnhancedCustomShape2d.hxx
index 415385c..0d9da95 100644
--- a/svx/inc/svx/EnhancedCustomShape2d.hxx
+++ b/svx/inc/svx/EnhancedCustomShape2d.hxx
@@ -182,6 +182,7 @@ class EnhancedCustomShape2d : public SfxItemSet
 sal_BoolIsFlipVert() { return bFlipV; };
 sal_BoolIsFlipHorz() { return bFlipH; };
 sal_Int32   GetRotateAngle() { return nRotateAngle; };
+SVX_DLLPUBLIC bool  IsPostRotate() const;
 
 SVX_DLLPUBLIC SdrObject*CreateLineGeometry();
 SVX_DLLPUBLIC SdrObject*CreateObject( sal_Bool 
bLineGeometryNeededOnly );
diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx
index 013e150..0f54019 100644
--- a/svx/inc/svx/svdoashp.hxx
+++ b/svx/inc/svx/svdoashp.hxx
@@ -145,6 +145,7 @@ public:
 
 sal_Bool IsMirroredX() const;
 sal_Bool IsMirroredY() const;
+bool IsPostRotate() const;
 void SetMirroredX( const sal_Bool bMirroredX );
 void SetMirroredY( const sal_Bool bMirroredY );
 
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 3087526..39a7709 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2332,6 +2332,11 @@ void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* 
pObj )
 }
 }
 
+bool EnhancedCustomShape2d::IsPostRotate() const
+{
+return pCustomShapeObj-ISA( SdrObjCustomShape ) ? 
((SdrObjCustomShape*)pCustomShapeObj)-IsPostRotate() : false;
+}
+
 SdrObject* EnhancedCustomShape2d::CreateLineGeometry()
 {
 return CreateObject( sal_True );
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx 
b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 3be2cd4..cfb8c41 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -276,6 +276,7 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL 
EnhancedCustomShapeEngine::rende
 
 EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape );
 sal_Int32 nRotateAngle = aCustomShape2d.GetRotateAngle();
+bool bPostRotateAngle = aCustomShape2d.IsPostRotate();
 
 sal_Bool bFlipV = aCustomShape2d.IsFlipVert();
 sal_Bool bFlipH = aCustomShape2d.IsFlipHorz();
@@ -315,6 +316,11 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL 
EnhancedCustomShapeEngine::rende
 }
 pRenderedShape-Shear( 
pSdrObjCustomShape-GetSnapRect().Center(), nShearWink, nTan, sal_False);
 }
+if( !bPostRotateAngle  nRotateAngle )
+{
+double a = nRotateAngle * F_PI18000;
+pRenderedShape-NbcRotate( 
pSdrObjCustomShape-GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ) );
+}
 if ( bFlipV )
 {
 Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() )  
1 );
@@ -327,8 +333,8 @@ REF( 

[Libreoffice-commits] .: oox/source

2012-04-07 Thread Julien Nabet
 oox/source/vml/vmlformatting.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c893a820c447c9014d35597a37c3220c261e35ae
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sat Apr 7 21:12:27 2012 +0200

Fix Redundant assignment of nModToken in switch

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index f7ebde4..4bc582d 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -248,7 +248,7 @@ bool lclExtractDouble( double orfValue, sal_Int32 
ornEndPos, const OUString r
 sal_Int32 nModToken = XML_TOKEN_INVALID;
 switch( AttributeConversion::decodeToken( aColorIndex.copy( 0, 
nOpenParen ) ) )
 {
-case XML_darken:nModToken = XML_shade;
+case XML_darken:nModToken = XML_shade;break;
 case XML_lighten:   nModToken = XML_tint;
 }
 sal_Int32 nValue = aColorIndex.copy( nOpenParen + 1, nCloseParen - 
nOpenParen - 1 ).toInt32();
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-04-02 Thread Muthu Subramanian
 oox/source/drawingml/fillproperties.cxx  |4 ++--
 oox/source/drawingml/graphicshapecontext.cxx |   21 -
 oox/source/drawingml/shape.cxx   |   15 +--
 oox/source/token/properties.txt  |3 +++
 4 files changed, 38 insertions(+), 5 deletions(-)

New commits:
commit 8866e1986d354f0eb7eb26d78e6b6a22c6fda632
Author: Muthu Subramanian sumu...@suse.com
Date:   Mon Apr 2 17:33:32 2012 +0530

n747499: PPTX embedded media playback.

Currently plays the embedded audio files.
The image for the audio file seems to be
rendered bad, currently.

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 07df75d..4a94c01 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -440,9 +440,9 @@ void GraphicProperties::pushToPropMap( PropertyMap 
rPropMap, const GraphicHelpe
 if( nContrast != 0 )
 rPropMap[ PROP_AdjustContrast ] = nContrast;
 
-// TODO: Audio content, yet to be implemented
+// Media content
 if( !maAudio.msEmbed.isEmpty() )
-rPropMap[ PROP_Sound ] = maAudio.msEmbed;
+rPropMap[ PROP_MediaURL ] = maAudio.msEmbed;
 }
 
 // 
diff --git a/oox/source/drawingml/graphicshapecontext.cxx 
b/oox/source/drawingml/graphicshapecontext.cxx
index f01854c..2230a3b 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -26,6 +26,7 @@
  *
  /
 
+#include com/sun/star/io/XTempFile.hpp
 #include oox/drawingml/graphicshapecontext.hxx
 #include osl/diagnose.h
 
@@ -42,6 +43,9 @@
 #include oox/vml/vmlshapecontainer.hxx
 #include oox/drawingml/fillproperties.hxx
 #include oox/drawingml/transform2dcontext.hxx
+#include oox/helper/binaryinputstream.hxx
+#include oox/helper/binaryoutputstream.hxx
+#include comphelper/processfactory.hxx
 
 using ::rtl::OUString;
 using namespace ::com::sun::star;
@@ -77,7 +81,22 @@ Reference XFastContextHandler  
GraphicShapeContext::createFastChildContext( sa
 xRet.set( new BlipFillContext( *this, xAttribs, 
mpShapePtr-getGraphicProperties().maBlipProps ) );
 break;
 case XML_wavAudioFile:
-getEmbeddedWAVAudioFile( getRelations(), xAttribs, 
mpShapePtr-getGraphicProperties().maAudio );
+{
+getEmbeddedWAVAudioFile( getRelations(), xAttribs, 
mpShapePtr-getGraphicProperties().maAudio );
+if( !mpShapePtr-getGraphicProperties().maAudio.msEmbed.isEmpty() )
+{
+Reference XMultiServiceFactory  xFactory = 
comphelper::getProcessServiceFactory();
+Reference XInputStream  xInStrm( 
getFilter().openInputStream( mpShapePtr-getGraphicProperties().maAudio.msEmbed 
), UNO_SET_THROW );
+Reference XTempFile  xTempFile( xFactory-createInstance( 
CREATE_OUSTRING( com.sun.star.io.TempFile ) ), UNO_QUERY_THROW );
+Reference XOutputStream  xOutStrm( 
xTempFile-getOutputStream(), UNO_SET_THROW );
+BinaryXOutputStream aOutStrm( xOutStrm, false );
+BinaryXInputStream aInStrm( xInStrm, false );
+aInStrm.copyToStream( aOutStrm );
+
+xTempFile-setRemoveFile( false );
+mpShapePtr-getGraphicProperties().maAudio.msEmbed = 
xTempFile-getUri();
+}
+}
 break;
 }
 
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index d9f30f7..01ee819 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -330,11 +330,22 @@ Reference XShape  Shape::createAndInsert(
 sal_Bool bClearText,
 basegfx::B2DHomMatrix aParentTransformation )
 {
+bool bIsEmbMedia = false;
 OSL_TRACE(Shape::createAndInsert id: %s, rtl::OUStringToOString(msId, 
RTL_TEXTENCODING_UTF8 ).getStr());
 
 awt::Rectangle aShapeRectHmm( maPosition.X / 360, maPosition.Y / 360, 
maSize.Width / 360, maSize.Height / 360 );
 
-OUString aServiceName = finalizeServiceName( rFilterBase, rServiceName, 
aShapeRectHmm );
+OUString aServiceName;
+if( rServiceName == 
OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.GraphicObjectShape) 
) 
+mpGraphicPropertiesPtr  
!mpGraphicPropertiesPtr-maAudio.msEmbed.isEmpty() )
+{
+aServiceName = finalizeServiceName( rFilterBase, OUString( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.MediaShape ) ), 
aShapeRectHmm );
+bIsEmbMedia = true;
+}
+else
+{
+aServiceName = finalizeServiceName( rFilterBase, rServiceName, 
aShapeRectHmm );
+}
 sal_Bool bIsCustomShape = aServiceName.equalsAsciiL( 
RTL_CONSTASCII_STRINGPARAM( com.sun.star.drawing.CustomShape ) ) || 
aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 

[Libreoffice-commits] .: oox/source

2012-03-21 Thread Miklos Vajna
 oox/source/vml/vmlformatting.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5881168bf8187149e2caf59e72e1ac2d739aa3a4
Author: Miklos Vajna vmik...@suse.cz
Date:   Wed Mar 21 16:39:15 2012 +0100

oox: it's EMU, not MEU

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 1197829..1d5a958 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -150,7 +150,7 @@ bool lclExtractDouble( double orfValue, sal_Int32 
ornEndPos, const OUString r
 fValue *= 36.0;
 else if( (cChar1 == 'm')  (cChar2 == 'm') )   // 1 mm = 36,000 EMU
 fValue *= 36000.0;
-else if( (cChar1 == 'p')  (cChar2 == 't') )   // 1 point = 1/72 inch 
= 12,700 MEU
+else if( (cChar1 == 'p')  (cChar2 == 't') )   // 1 point = 1/72 inch 
= 12,700 EMU
 fValue *= 12700.0;
 else if( (cChar1 == 'p')  (cChar2 == 'c') )   // 1 pica = 1/6 inch = 
152,400 EMU
 fValue *= 152400.0;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-03-15 Thread Noel Power
 oox/source/ole/vbamodule.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1bd695d3ddcbce48899a70130b5e948c48541d17
Author: Noel Power noel.po...@novell.com
Date:   Thu Mar 15 19:50:11 2012 +

fix mishandling of 'End Sub' is there is a trailing comment fod#46889

diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index 9f0e5ff..d5c1db3 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -313,7 +313,7 @@ OUString VbaModule::readSourceCode( StorageBase rVbaStrg, 
const Reference XNam
 procInfo.nPos = aSourceCode.getLength();
 }
 }
-else if ( mbExecutable  aCodeLine.trim().equalsAsciiL( 
RTL_CONSTASCII_STRINGPARAM(End Sub)) )
+else if ( mbExecutable  aCodeLine.trim().matchAsciiL( 
RTL_CONSTASCII_STRINGPARAM(End Sub)) )
 {
 // un-matched End Sub
 if ( !procInfo.bInProcedure )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source unusedcode.easy

2012-03-11 Thread Ivan Timofeev
 oox/source/core/xmlfilterbase.cxx |5 -
 unusedcode.easy   |1 -
 2 files changed, 6 deletions(-)

New commits:
commit b6ff047a572189a2b000ffbd437e573e518773db
Author: Petr Vorel petr.vo...@gmail.com
Date:   Sun Mar 11 19:02:40 2012 +0400

remove unused code

diff --git a/oox/source/core/xmlfilterbase.cxx 
b/oox/source/core/xmlfilterbase.cxx
index f5868bf..f1aebdd 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -672,11 +672,6 @@ XmlFilterBase XmlFilterBase::exportDocumentProperties( 
Reference XDocumentProp
 return *this;
 }
 
-::oox::drawingml::chart::ChartConverter* XmlFilterBase::getChartConverter()
-{
-return 0;
-}
-
 // protected --
 
 Reference XInputStream  XmlFilterBase::implGetInputStream( MediaDescriptor 
rMediaDesc ) const
diff --git a/unusedcode.easy b/unusedcode.easy
index 5f8063a..38f62a8 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -910,7 +910,6 @@ oox::AttributeConversion::decodeUnsignedHex(rtl::OUString 
const)
 
oox::ContainerHelper::insertByIndex(com::sun::star::uno::Referencecom::sun::star::container::XIndexContainer
 const, int, com::sun::star::uno::Any const)
 oox::GraphicHelper::convertScreenPixelToHmm(com::sun::star::awt::Point const) 
const
 
oox::core::PowerPointExport::WriteTextStyle(boost::shared_ptrsax_fastparser::FastSerializerHelper,
 int, int)
-oox::core::XmlFilterBase::getChartConverter()
 
oox::drawingml::ChartExport::exportDataSeq(com::sun::star::uno::Referencecom::sun::star::chart2::data::XDataSequence
 const, int)
 oox::drawingml::ChartExport::exportXAxis(oox::drawingml::AxisIdPair)
 oox::drawingml::ChartExport::exportYAxis(oox::drawingml::AxisIdPair)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-03-02 Thread Muthu Subramanian
 oox/source/drawingml/shape.cxx |4 +++-
 oox/source/ppt/pptshape.cxx|2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 77901e53ecd99aed59e5c8697461ab4d241388a4
Author: Muthu Subramanian sumu...@suse.com
Date:   Fri Mar 2 18:01:45 2012 +0530

n657904: Styling information isn't applied to grpSp.

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index a6e86c3..5e3aa73 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -299,8 +299,10 @@ void Shape::addChildren(
   aChildTransformation.get(2, 2));
 
 std::vector ShapePtr ::iterator aIter( rMaster.maChildren.begin() );
-while( aIter != rMaster.maChildren.end() )
+while( aIter != rMaster.maChildren.end() ) {
+(*aIter)-setMasterTextListStyle( mpMasterTextListStyle );
 (*aIter++)-addShape( rFilterBase, pTheme, rxShapes, 
aChildTransformation, NULL, pShapeMap );
+}
 }
 
 Reference XShape  Shape::createAndInsert(
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 0bd2ce4..a72a10c 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -310,7 +310,7 @@ void PPTShape::addShape(
 {
 if ( !aMasterTextListStyle.get() )
 {
-bool isOther = !getTextBody().get();
+bool isOther = !getTextBody().get()  
!sServiceName.equalsAscii(com.sun.star.drawing.GroupShape);
 TextListStylePtr aSlideStyle = isOther ? 
rSlidePersist.getOtherTextStyle() : rSlidePersist.getDefaultTextStyle();
 // Combine from MasterSlide details as well.
 if( rSlidePersist.getMasterPersist().get() )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-03-02 Thread Radek Doulík
 oox/source/drawingml/textcharacterproperties.cxx |2 +-
 oox/source/drawingml/textparagraph.cxx   |9 -
 oox/source/drawingml/textparagraphproperties.cxx |2 ++
 3 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 101fd1733000b4f8dae5fa39b6657531a21769ea
Author: Felix Zhang fezh...@suse.com
Date:   Fri Mar 2 18:17:29 2012 +0800

n719988, n734733: Bullet should have same color as following text by default

diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index adfa2fe..e7c6bb8 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -69,7 +69,7 @@ void TextCharacterProperties::assignUsed( const 
TextCharacterProperties rSource
 moUnderlineFillFollowText.assignIfUsed( 
rSourceProps.moUnderlineFillFollowText );
 }
 
-void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const 
XmlFilterBase rFilter, bool bUseOptional ) const
+void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const 
XmlFilterBase rFilter, bool bUseOptional ) const
 {
 OUString aFontName;
 sal_Int16 nFontPitch = 0;
diff --git a/oox/source/drawingml/textparagraph.cxx 
b/oox/source/drawingml/textparagraph.cxx
index 689ab90..63a2845 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -28,6 +28,7 @@
 
 #include oox/drawingml/textparagraph.hxx
 #include oox/drawingml/drawingmltypes.hxx
+#include oox/drawingml/textcharacterproperties.hxx
 
 #include rtl/ustring.hxx
 #include oox/helper/propertyset.hxx
@@ -111,8 +112,14 @@ void TextParagraph::insertAt(
 float fCharacterSize = nCharHeight  0 ? GetFontHeight( nCharHeight ) 
:  18;
 if ( pTextParagraphStyle.get() )
 {
-pTextParagraphStyle-pushToPropSet( rFilterBase, xProps, 
aioBulletList, NULL, sal_False, fCharacterSize );
+pTextParagraphStyle-pushToPropSet( rFilterBase, xProps, 
aioBulletList, NULL, sal_True, fCharacterSize );
 fCharacterSize = pTextParagraphStyle-getCharHeightPoints( 
fCharacterSize );
+
+// bullets have same color as following texts by default
+if( !aioBulletList.hasProperty( PROP_BulletColor )  
maRuns.size()  0
+ 
(*maRuns.begin())-getTextCharacterProperties().maCharColor.isUsed() )
+aioBulletList[ PROP_BulletColor ] = 
(*maRuns.begin())-getTextCharacterProperties().maCharColor.getColor( 
rFilterBase.getGraphicHelper() );
+
 maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, 
pTextParagraphStyle-getBulletList(), sal_True, fCharacterSize );
 }
 
diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index 6eea22f..5df6bfe 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -433,6 +433,8 @@ void TextParagraphProperties::pushToPropSet( const 
::oox::core::XmlFilterBase* p
 rioBulletMap[ PROP_FirstLineOffset ] = static_cast sal_Int32 ( 
*noFirstLineIndentation );
 noFirstLineIndentation = boost::optional sal_Int32 ( 0 );
 }
+if ( nNumberingType != NumberingType::BITMAP  
!rioBulletMap.hasProperty( PROP_BulletColor ))
+rioBulletMap[ PROP_BulletColor ] = static_cast sal_Int32 ( 
maTextCharacterProperties.maCharColor.getColor( 
pFilterBase-getGraphicHelper()));
 }
 
 if ( bApplyBulletMap )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-03-02 Thread Noel Power
 oox/source/ole/vbamodule.cxx |   48 +++
 1 file changed, 48 insertions(+)

New commits:
commit 24b402d67eb9acc7ff1f0afeee7237f6b3b14644
Author: Noel Power noel.po...@novell.com
Date:   Fri Mar 2 13:04:18 2012 +

weed out unmatched Sub/End Sub statements when importing VBA fdo#46889

diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index 585f28d..d4b041b 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -221,6 +221,7 @@ void VbaModule::createEmptyModule( const Reference 
XNameContainer  rxBasicLib
 OUString VbaModule::readSourceCode( StorageBase rVbaStrg, const Reference 
XNameContainer  rxOleNameOverrides ) const
 {
 OUStringBuffer aSourceCode;
+const static rtl::OUString sUnmatchedRemovedTag( 
RTL_CONSTASCII_USTRINGPARAM( Rem removed unmatched Sub/End:  ) );
 if( !maStreamName.isEmpty()  (mnOffset != SAL_MAX_UINT32) )
 {
 BinaryXInputStream aInStrm( rVbaStrg.openInputStream( maStreamName ), 
true );
@@ -234,6 +235,14 @@ OUString VbaModule::readSourceCode( StorageBase rVbaStrg, 
const Reference XNam
 VbaInputStream aVbaStrm( aInStrm );
 // load the source code line-by-line, with some more processing
 TextInputStream aVbaTextStrm( mxContext, aVbaStrm, meTextEnc );
+
+struct ProcedurePair
+{
+bool bInProcedure;
+sal_uInt32 nPos;
+ProcedurePair() : bInProcedure( false ), nPos( 0 ) {};
+} procInfo;
+
 while( !aVbaTextStrm.isEof() )
 {
 OUString aCodeLine = aVbaTextStrm.readLine();
@@ -244,6 +253,45 @@ OUString VbaModule::readSourceCode( StorageBase rVbaStrg, 
const Reference XNam
 }
 else
 {
+// Hack here to weed out any unmatched End Sub / Sub Foo 
statements.
+// The behaviour of the vba ide practically guarantees the 
case and
+// spacing of Sub statement(s). However, indentation can 
be arbitrary hence
+// the trim.
+rtl::OUString trimLine( aCodeLine.trim() );
+if ( mbExecutable  (
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Sub ) 
) ||
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Public 
Sub ) )  ||
+  trimLine.matchAsciiL( 
RTL_CONSTASCII_STRINGPARAM(Private Sub ) ) ||
+  trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Static 
Sub ) ) ) )
+{
+// this should never happen, basic doesn't support 
nested procedures
+// first Sub Foo must be bogus
+if ( procInfo.bInProcedure )
+{
+// comment out the line
+aSourceCode.insert( procInfo.nPos, 
sUnmatchedRemovedTag );
+// mark location of this Sub
+procInfo.nPos = aSourceCode.getLength();
+}
+else
+{
+procInfo.bInProcedure = true;
+procInfo.nPos = aSourceCode.getLength();
+}
+}
+else if ( mbExecutable  aCodeLine.trim().equalsAsciiL( 
RTL_CONSTASCII_STRINGPARAM(End Sub)) )
+{
+// un-matched End Sub
+if ( !procInfo.bInProcedure )
+{
+aSourceCode.append( sUnmatchedRemovedTag );
+}
+else
+{
+procInfo.bInProcedure = false;
+procInfo.nPos = 0;
+}
+}
 // normal source code line
 if( !mbExecutable )
 aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( 
Rem  ) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-03-02 Thread Radek Doulík
 oox/source/drawingml/customshapes/generatePresetsPPTXs.pl |   25 +++---
 1 file changed, 20 insertions(+), 5 deletions(-)

New commits:
commit e3c0a952a7607436224fe57f9e1665597702f6b2
Author: Radek Doulik r...@novell.com
Date:   Fri Mar 2 20:40:04 2012 +0100

generate more pptx test documents with preset shapes

 - before we only generated custom shapes used as presets definition
 - preset-*.pptx documents might be used for testing the presets

diff --git a/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl 
b/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl
index c9eb314..28127f8 100755
--- a/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl
+++ b/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl
@@ -29,10 +29,17 @@ sub generatePPTX
mkdir (pptx);
system (unzip -qq -o -d cshape cshape.pptx);
 
-   generateSlide ($shapes, $type, cshape/ppt/slides/slide1.xml);
+   # custom shape(s) slide with preset definition
+   generateSlide ($shapes, $type, cshape/ppt/slides/slide1.xml, 0);
 
$pptx = ../pptx/cshape- . (defined $type ? $type : all) . .pptx;
system (cd cshape\nrm -rf . $pptx . \nzip -q -r  . $pptx .  .\ncd 
..);
+
+   # preset(s) slide, for testing
+   generateSlide ($shapes, $type, cshape/ppt/slides/slide1.xml, 1);
+
+   $pptx = ../pptx/preset-cshape- . (defined $type ? $type : all) . 
.pptx;
+   system (cd cshape\nrm -rf . $pptx . \nzip -q -r  . $pptx .  .\ncd 
..);
 }
 
 sub loadShapes()
@@ -79,6 +86,7 @@ sub generateSlide
$shapes = shift;
$type = shift;
$file = shift;
+   $preset = shift;
 
open (OUT, $file);
 
@@ -132,11 +140,18 @@ sub generateSlide
 a:off x=\ . (35 + $col++*$size) . \ y=\ . (45 + 
$row*$size) . \/
 a:ext cx=\ . (4*$size/5) . \ cy=\ . (4*$size/5) . \/
   /a:xfrm
-  a:custGeom
 ;
-   print OUT @{$shapes-{$shape}};
-   print OUT   /a:custGeom
-  a:solidFill
+   if ($preset) {
+   print OUT   a:prstGeom prst=\ . $shape . 
\a:avLst//a:prstGeom
+;
+   } else {
+   print OUT   a:custGeom
+;
+   print OUT @{$shapes-{$shape}};
+   print OUT   /a:custGeom
+;
+   }
+   print OUT   a:solidFill
 a:srgbClr val=\7F\/
   /a:solidFill
   a:ln w=\19080\
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-02-24 Thread Michael Meeks
 oox/source/drawingml/textliststyle.cxx   |2 +-
 oox/source/drawingml/textparagraphproperties.cxx |2 +-
 oox/source/helper/propertyset.cxx|2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 602908b300d4d688d50355ebeca5d3063f25f475
Author: Michael Meeks michael.me...@suse.com
Date:   Fri Feb 24 11:19:56 2012 +

fix oox debug build with DBG_UTIL guard for 'dump' usage

diff --git a/oox/source/drawingml/textliststyle.cxx 
b/oox/source/drawingml/textliststyle.cxx
index edd50f0..663a5d5 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -66,7 +66,7 @@ void TextListStyle::apply( const TextListStyle 
rTextListStyle )
 applyStyleList( rTextListStyle.getListStyle(), getListStyle() );
 }
 
-#if OSL_DEBUG_LEVEL  0
+#ifdef DBG_UTIL
 void TextListStyle::dump() const
 {
 for ( int i = 0; i  9; i++ )
diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index a916f45..6eea22f 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -467,7 +467,7 @@ float TextParagraphProperties::getCharHeightPoints( float 
fDefault ) const
 }
 
 
-#if OSL_DEBUG_LEVEL  0
+#ifdef DBG_UTIL
 
 void TextParagraphProperties::dump() const
 {
diff --git a/oox/source/helper/propertyset.cxx 
b/oox/source/helper/propertyset.cxx
index 71f0d4e..e973318 100644
--- a/oox/source/helper/propertyset.cxx
+++ b/oox/source/helper/propertyset.cxx
@@ -178,7 +178,7 @@ bool PropertySet::implSetPropertyValue( const OUString 
rPropName, const Any rV
 return false;
 }
 
-#if OSL_DEBUG_LEVEL  0
+#ifdef DBG_UTIL
 void PropertySet::dump()
 {
 PropertyMap::dump( Reference XPropertySet ( getXPropertySet(), UNO_QUERY 
) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-02-16 Thread Thorsten Behrens
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 905df1bae9cab296ee7dd07e88813c667788ed8a
Author: Thorsten Behrens tbehr...@suse.com
Date:   Thu Feb 16 10:35:12 2012 +0100

Fix crash in smartart import

Rather check iterator validity *before* accessing it. valgrind
warning on linux, and crash on windows for e.g. doc at n#736495.

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 493dcf2..29a9cb9 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -394,8 +394,8 @@ bool LayoutNode::setupShape( const ShapePtr rShape, const 
Diagram rDgm, sal_uI
 {
 // find the data node to grab text from
 DiagramData::PointsNameMap::const_iterator 
aDataNode=rDgm.getData()-getPointsPresNameMap().find(msName);
-if( aDataNode-second.size()  nIdx 
-aDataNode != rDgm.getData()-getPointsPresNameMap().end() )
+if( aDataNode != rDgm.getData()-getPointsPresNameMap().end() 
+aDataNode-second.size()  nIdx )
 {
 OSL_TRACE( Filling content from %d th layout node named \%s\, 
modelId \%s\,
nIdx,
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-02-16 Thread Noel Power
 oox/source/ole/vbamodule.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 2174d4d44eeb83378f76ea34086b8a1989b70b76
Author: Noel Power noel.po...@novell.com
Date:   Thu Feb 16 10:34:59 2012 +

use stream name for module names when importing vba. fdo#46151  bnc#747323

diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index d907051..585f28d 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -156,6 +156,9 @@ void VbaModule::importDirRecords( BinaryInputStream 
rDirStrm )
 break;
 case VBA_ID_MODULESTREAMNAME:
 maStreamName = aRecStrm.readCharArrayUC( nRecSize, meTextEnc );
+// Actually the stream name seems the best name to use
+// the VBA_ID_MODULENAME name can sometimes be the wrong case
+maName = maStreamName;
 break;
 case VBA_ID_MODULESTREAMNAMEUNICODE:
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-02-16 Thread Muthu Subramanian
 oox/source/ppt/pptshapegroupcontext.cxx |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 5c714632583036f72377aa0fa6ed1137e53582dc
Author: Muthu Subramanian sumu...@suse.com
Date:   Thu Feb 16 20:59:57 2012 +0530

n744503: Importing useBgFill colors for shapes.

diff --git a/oox/source/ppt/pptshapegroupcontext.cxx 
b/oox/source/ppt/pptshapegroupcontext.cxx
index cf982cf..0529ec6 100644
--- a/oox/source/ppt/pptshapegroupcontext.cxx
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -41,6 +41,7 @@
 #include oox/drawingml/customshapegeometry.hxx
 #include oox/drawingml/textbodycontext.hxx
 #include oox/drawingml/connectorshapecontext.hxx
+#include oox/drawingml/fillproperties.hxx
 #include extdrawingfragmenthandler.hxx
 
 using rtl::OUString;
@@ -108,7 +109,19 @@ Reference XFastContextHandler  
PPTShapeGroupContext::createFastChildContext( s
 xRet.set( new PPTShapeGroupContext( *this, mpSlidePersistPtr, 
meShapeLocation, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( 
meShapeLocation, com.sun.star.drawing.GroupShape ) ) ) );
 break;
 case PPT_TOKEN( sp ):   // Shape
-xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, 
mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, 
com.sun.star.drawing.CustomShape ) ) ) );
+{
+AttributeList aAttribs( xAttribs );
+oox::drawingml::ShapePtr pShape = oox::drawingml::ShapePtr( new 
PPTShape( meShapeLocation, com.sun.star.drawing.CustomShape ) );
+if( aAttribs.getBool( XML_useBgFill, false ) )
+{
+::oox::drawingml::FillProperties aFill = 
pShape-getFillProperties();
+aFill.moFillType = XML_solidFill;
+// This is supposed to fill with slide (background) color, but
+// TODO: We are using white here, because thats the closest we 
can assume (?)
+aFill.maFillColor.setSrgbClr( API_RGB_WHITE );
+}
+xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, 
mpGroupShapePtr, pShape ) );
+}
 break;
 case PPT_TOKEN( pic ):  // CT_Picture
 xRet.set( new PPTGraphicShapeContext( *this, mpSlidePersistPtr, 
mpGroupShapePtr,  oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, 
com.sun.star.drawing.GraphicObjectShape ) ) ) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-02-03 Thread Muthu Subramanian
 oox/source/drawingml/textparagraphpropertiescontext.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit a71c878cd0b443a0d8473d8e4eb43d66f37ce2c0
Author: Muthu Subramanian sumu...@suse.com
Date:   Fri Feb 3 16:20:34 2012 +0530

n#744509: Alignment of text is wrong.

According to section 21.1.2.2.7 [pPr], If this [algn]
attribute is omitted, then a value of left is implied.

diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx 
b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 9d06ae1..d3c91cd 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -64,12 +64,7 @@ 
TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler
 PropertyMap rPropertyMap( 
mrTextParagraphProperties.getTextParagraphPropertyMap() );
 
 // ST_TextAlignType
-if ( xAttribs-hasAttribute( XML_algn ) )
-{
-sal_Int32 nAlign = xAttribs-getOptionalValueToken( XML_algn, XML_l );
-rPropertyMap[ PROP_ParaAdjust ] = GetParaAdjust( nAlign );
-}
-//  OSL_TRACE( OOX: para adjust %d, GetParaAdjust( nAlign ));
+rPropertyMap[ PROP_ParaAdjust ] = GetParaAdjust( 
xAttribs-getOptionalValueToken( XML_algn, XML_l ) );
 // TODO see to do the same with RubyAdjust
 
 // ST_Coordinate32
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-02-01 Thread Julien Nabet
 oox/source/helper/propertymap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 34c5059b80777244e25dee1299ea258c8d7ba4fe
Author: Julien Nabet serval2...@yahoo.fr
Date:   Wed Feb 1 21:40:29 2012 +0100

Fix Prefer prefix ++/-- operators for non-primitive types

diff --git a/oox/source/helper/propertymap.cxx 
b/oox/source/helper/propertymap.cxx
index 0bf875c..bf92f7a 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -236,7 +236,7 @@ const Any* PropertyMap::getProperty( sal_Int32 nPropId ) 
const
 
 void PropertyMap::assignAll( const PropertyMap rPropMap )
 {
-for( PropertyMap::const_iterator it=rPropMap.begin(); it != 
rPropMap.end(); it++ )
+for( PropertyMap::const_iterator it=rPropMap.begin(); it != 
rPropMap.end(); ++it )
 (*this)[it-first] = it-second;
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-01-31 Thread Muthu Subramanian
 oox/source/drawingml/diagram/diagram.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit af15127871d38a862ce300ceda5cc74624fda8df
Author: Muthu Subramanian sumu...@suse.com
Date:   Wed Feb 1 13:32:56 2012 +0530

Fixes crashing while loading manipulated pptx files.

diff --git a/oox/source/drawingml/diagram/diagram.cxx 
b/oox/source/drawingml/diagram/diagram.cxx
index 91a475f..9194001 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -340,7 +340,8 @@ void Diagram::addTo( const ShapePtr  pParentShape )
 
 // create Shape hierarchy
 ShapeCreationVisitor aCreationVisitor(pParentShape, *this);
-mpLayout-getNode()-accept(aCreationVisitor);
+if( mpLayout-getNode() )
+mpLayout-getNode()-accept( aCreationVisitor );
 }
 
 OUString Diagram::getLayoutId() const
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-01-30 Thread Kohei Yoshida
 oox/source/xls/workbookhelper.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 1f2bf6d863a25475f27e2b0d37f8c36aec74d6d4
Author: Kohei Yoshida kohei.yosh...@suse.com
Date:   Mon Jan 30 12:30:03 2012 -0500

Removed debug statement.

diff --git a/oox/source/xls/workbookhelper.cxx 
b/oox/source/xls/workbookhelper.cxx
index d1a61c9..675a6a1 100644
--- a/oox/source/xls/workbookhelper.cxx
+++ b/oox/source/xls/workbookhelper.cxx
@@ -69,8 +69,6 @@
 #include oox/xls/workbooksettings.hxx
 #include oox/xls/worksheetbuffer.hxx
 
-#include iostream
-
 namespace oox {
 namespace xls {
 
@@ -394,7 +392,6 @@ Reference XNamedRange  
WorkbookGlobals::createLocalNamedRangeObject( OUString
 Reference XSpreadsheet  xSheet (xSheets-getByIndex(nTab), 
UNO_QUERY_THROW);
 Reference com::sun::star::container::XNamed  xNamed(xSheet, 
UNO_QUERY_THROW);
 rtl::OUString aName = xNamed-getName();
-std::cout  sheetName:   rtl::OUStringToOString( aName, 
RTL_TEXTENCODING_UTF8).getStr()  std::endl;
 PropertySet aSheetProps( xSheet );
 Reference XNamedRanges  xNamedRanges( aSheetProps.getAnyProperty( 
PROP_NamedRanges ), UNO_QUERY_THROW );
 Reference XNameAccess  xNameAccess( xNamedRanges, UNO_QUERY_THROW );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-01-16 Thread Radek Doulík
 oox/source/ppt/pptshape.cxx |   40 
 1 file changed, 36 insertions(+), 4 deletions(-)

New commits:
commit 229b0cc0029e93fa808624d8aa4dcfa2e289b1aa
Author: Radek Doulik r...@novell.com
Date:   Mon Jan 16 15:37:23 2012 +0100

handle [more] placeholder shapes in Layout slides

 - import them as outliner shapes, so that they don't appear on regular 
slides
 - choose appropriate placeholder shapes on regular slides (Table, Picture, 
Chart, Media)

diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index dfb4a38..17ceb30 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -126,7 +126,7 @@ void PPTShape::addShape(
 const awt::Rectangle* pShapeRect,
 ::oox::drawingml::ShapeIdMap* pShapeMap )
 {
-OSL_TRACE(add shape id: %s location: %s, rtl::OUStringToOString(msId, 
RTL_TEXTENCODING_UTF8 ).getStr(), meShapeLocation == Master ? master : 
meShapeLocation == Slide ? slide : other);
+OSL_TRACE(add shape id: %s location: %s subtype: %d service: %s, 
rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr(), meShapeLocation 
== Master ? master : meShapeLocation == Slide ? slide : meShapeLocation == 
Layout ? layout : other, mnSubType, rtl::OUStringToOString(msServiceName, 
RTL_TEXTENCODING_UTF8 ).getStr());
 // only placeholder from layout are being inserted
 if ( mnSubType  ( meShapeLocation == Master ) )
 return;
@@ -142,6 +142,7 @@ void PPTShape::addShape(
 if ( sServiceName != 
OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.GraphicObjectShape))
 
  sServiceName != 
OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.OLE2Shape)) )
 {
+const rtl::OUString sOutlinerShapeService( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.OutlinerShape ) );
 OSL_TRACE(has master: %p, 
rSlidePersist.getMasterPersist().get());
 switch( mnSubType )
 {
@@ -166,7 +167,6 @@ void PPTShape::addShape(
 break;
case XML_obj :
 {
-const rtl::OUString sOutlinerShapeService( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.OutlinerShape ) );
 sServiceName = sOutlinerShapeService;
 aMasterTextListStyle = 
rSlidePersist.getMasterPersist().get() ? 
rSlidePersist.getMasterPersist()-getBodyTextStyle() : 
rSlidePersist.getBodyTextStyle();
 }
@@ -174,7 +174,6 @@ void PPTShape::addShape(
 case XML_body :
 {
 const rtl::OUString sNotesShapeService( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.NotesShape ) );
-const rtl::OUString sOutlinerShapeService( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.OutlinerShape ) );
 if ( rSlidePersist.isNotesPage() )
 {
 sServiceName = sNotesShapeService;
@@ -221,8 +220,41 @@ void PPTShape::addShape(
 sServiceName = sPageShapeService;
 }
 break;
-
+case XML_chart :
+if ( meShapeLocation == Layout )
+sServiceName = sOutlinerShapeService;
+else {
+const rtl::OUString sChartService( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.ChartShape ) );
+sServiceName = sChartService;
+}
+break;
+case XML_tbl :
+if ( meShapeLocation == Layout )
+sServiceName = sOutlinerShapeService;
+else {
+const rtl::OUString sTableService( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.TableShape ) );
+sServiceName = sTableService;
+}
+break;
+case XML_pic :
+if ( meShapeLocation == Layout )
+sServiceName = sOutlinerShapeService;
+else {
+const rtl::OUString sGraphicObjectService( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.GraphicObjectShape ) );
+sServiceName = sGraphicObjectService;
+}
+break;
+case XML_media :
+if ( meShapeLocation == Layout )
+sServiceName = sOutlinerShapeService;
+else {
+const rtl::OUString sMediaService( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.MediaShape ) );
+sServiceName = 

[Libreoffice-commits] .: oox/source svx/inc svx/source

2012-01-11 Thread Muthu Subramanian
 oox/source/drawingml/customshapeproperties.cxx|2 +-
 oox/source/drawingml/shapecontext.cxx |6 ++
 oox/source/ppt/pptshapecontext.cxx|6 ++
 oox/source/token/properties.txt   |1 +
 oox/source/token/tokens.txt   |1 +
 svx/inc/svx/svdoashp.hxx  |2 +-
 svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |8 
 svx/source/svdraw/svdoashp.cxx|5 +++--
 8 files changed, 27 insertions(+), 4 deletions(-)

New commits:
commit 5c4d1b05faa8a3d704fc74a186a173f8cc019cc1
Author: Muthu Subramanian sumu...@suse.com
Date:   Wed Jan 11 15:24:27 2012 +0530

n#734734: Text rotation fixes.

PPTX would need rotation of text _inside_ text/object
boundaries, rather than the rotation of the text/object itself.

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index 5da446a..a03e42c 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -154,7 +154,7 @@ void CustomShapeProperties::pushToPropSet( const 
::oox::core::FilterBase /* rFi
 
 aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX );
 aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY );
-aPropertyMap[ PROP_TextRotateAngle ] = Any( mnTextRotateAngle );
+aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle );
 Sequence PropertyValue  aSeq = 
aPropertyMap.makePropertyValueSequence();
 aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq );
 
diff --git a/oox/source/drawingml/shapecontext.cxx 
b/oox/source/drawingml/shapecontext.cxx
index f613e89..389bfac 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -119,6 +119,12 @@ Reference XFastContextHandler  
ShapeContext::createFastChildContext( sal_Int32
 xRet = new TextBodyContext( *this, *xTextBody );
 break;
 }
+case XML_txXfrm:
+{
+AttributeList aAttribs( xAttribs );
+mpShapePtr-getTextBody()-getTextProperties().moRotation = 
aAttribs.getInteger( XML_rot );
+break;
+}
 }
 
 if( !xRet.is() )
diff --git a/oox/source/ppt/pptshapecontext.cxx 
b/oox/source/ppt/pptshapecontext.cxx
index dce07b8..cc62b82 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -218,6 +218,12 @@ Reference XFastContextHandler  
PPTShapeContext::createFastChildContext( sal_In
 xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody );
 break;
 }
+case PPT_TOKEN( txXfrm ):
+{
+AttributeList aAttribs( xAttribs );
+mpShapePtr-getTextBody()-getTextProperties().moRotation = 
aAttribs.getInteger( XML_rot );
+break;
+}
 }
 
 if( !xRet.is() )
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 65d2cb0..50c46bd 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -457,6 +457,7 @@ TextHorizontalAdjust
 TextLeftDistance
 TextLowerDistance
 TextOverlap
+TextPreRotateAngle
 TextRightDistance
 TextRotateAngle
 TextRotation
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 594468e..cec24b5 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -5334,6 +5334,7 @@ txOverObj
 txPr
 txSp
 txStyles
+txXfrm
 txbxContent
 txtBox
 ty
diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx
index 3d91549..013e150 100644
--- a/svx/inc/svx/svdoashp.hxx
+++ b/svx/inc/svx/svdoashp.hxx
@@ -149,7 +149,7 @@ public:
 void SetMirroredY( const sal_Bool bMirroredY );
 
 double GetObjectRotation() const;
-double GetExtraTextRotation() const;
+double GetExtraTextRotation( const bool bPreRotation = false ) const;
 
 TYPEINFO();
 SdrObjCustomShape();
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx 
b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index 2e63da2..85628ca 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -160,6 +160,14 @@ namespace sdr
 // #i101684# get the text range unrotated and absolute to 
the object range
 const basegfx::B2DRange 
aTextRange(getCorrectedTextBoundRect());
 
+// Rotation before scaling
+
if(!basegfx::fTools::equalZero(GetCustomShapeObj().GetExtraTextRotation(true)))
+{
+basegfx::B2DVector aTranslation(0.5, 0.5);
+aTextBoxMatrix.translate( -aTranslation.getX(), 
-aTranslation.getY() );
+aTextBoxMatrix.rotate((360.0 - 
GetCustomShapeObj().GetExtraTextRotation(true)) * 

[Libreoffice-commits] .: oox/source sdext/source slideshow/test svx/source sw/source unotools/source unoxml/test vcl/aqua vcl/ios vcl/source vcl/test vcl/win

2012-01-10 Thread Thomas Arnhold
 oox/source/token/propertynames.cxx   |2 +-
 sdext/source/pdfimport/filterdet.cxx |4 ++--
 slideshow/test/demoshow.cxx  |2 +-
 svx/source/dialog/linkwarn.cxx   |2 +-
 svx/source/svdraw/svdotext.cxx   |2 +-
 sw/source/filter/ww1/w1class.cxx |2 +-
 sw/source/filter/ww1/w1sprm.cxx  |2 +-
 sw/source/filter/ww8/ww8par6.cxx |4 ++--
 unotools/source/misc/fontdefs.cxx|2 +-
 unoxml/test/domtest.cxx  |   10 +-
 vcl/aqua/source/gdi/salgdi.cxx   |2 +-
 vcl/ios/source/gdi/salgdi.cxx|2 +-
 vcl/source/gdi/sallayout.cxx |2 +-
 vcl/source/window/window.cxx |2 +-
 vcl/test/canvasbitmaptest.cxx|2 +-
 vcl/win/source/gdi/salgdi3.cxx   |4 ++--
 16 files changed, 23 insertions(+), 23 deletions(-)

New commits:
commit 2c3d0ff9f83aab89980529da2aa3837390b84ef7
Author: Thomas Arnhold tho...@arnhold.org
Date:   Tue Jan 10 16:00:18 2012 +0100

Use SAL_N_ELEMENTS

Some more like Thorstens diff 9c59cd15b150638c845bbc275b9b04460afc23bd

Done with some regex magic (and a check if this var is an array):

s/sizeof\(\s*$var\s*\)\s*\/\s*sizeof\(\s*\*$var\s*/SAL_N_ELEMENTS\($var/gs

diff --git a/oox/source/token/propertynames.cxx 
b/oox/source/token/propertynames.cxx
index a7c9b87..d65c8d2 100644
--- a/oox/source/token/propertynames.cxx
+++ b/oox/source/token/propertynames.cxx
@@ -41,7 +41,7 @@ PropertyNameVector::PropertyNameVector()
 
 };
 
-size_t nArraySize = (sizeof( sppcPropertyNames ) / sizeof( 
*sppcPropertyNames )) - 1;
+size_t nArraySize = SAL_N_ELEMENTS(sppcPropertyNames) - 1;
 reserve( nArraySize );
 for( size_t nIndex = 0; nIndex  nArraySize; ++nIndex )
 push_back( ::rtl::OUString::createFromAscii( sppcPropertyNames[ nIndex 
] ) );
diff --git a/sdext/source/pdfimport/filterdet.cxx 
b/sdext/source/pdfimport/filterdet.cxx
index 28fd126..969f378 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -139,8 +139,8 @@ namespace {
 xPropSet-getPropertyValue(rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( Label ))) = aLabel;
 const char pFileName[] = %FILENAME;
 aLabel = aLabel.replaceAt(
-
aLabel.indexOfAsciiL(pFileName,sizeof(pFileName)/sizeof(*pFileName)-1),
-sizeof(pFileName)/sizeof(*pFileName)-1,
+aLabel.indexOfAsciiL(pFileName,SAL_N_ELEMENTS(pFileName)-1),
+SAL_N_ELEMENTS(pFileName)-1,
 aFilename );
 xPropSet-setPropertyValue(rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( Label )),
uno::makeAny(aLabel));
diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx
index f52ba55..692251e 100644
--- a/slideshow/test/demoshow.cxx
+++ b/slideshow/test/demoshow.cxx
@@ -278,7 +278,7 @@ private:
 };
 
 static PropMapT aMap( lcl_propertyMap,
-  sizeof(lcl_propertyMap)/sizeof(*lcl_propertyMap),
+  SAL_N_ELEMENTS(lcl_propertyMap),
   true );
 
 sal_Int16 aRes;
diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx
index 5beecf0..6bc3a1b 100644
--- a/svx/source/dialog/linkwarn.cxx
+++ b/svx/source/dialog/linkwarn.cxx
@@ -114,7 +114,7 @@ void SvxLinkWarningDialog::InitSize()
 m_aLinkGraphicBtn, m_aEmbedGraphicBtn, m_aOptionLine, 
m_aWarningOnBox
 };
 Window** pCurrent = pWins;
-for ( sal_uInt32 i = 0; i  sizeof(pWins) / sizeof(*pWins); ++i, 
++pCurrent )
+for ( sal_uInt32 i = 0; i  SAL_N_ELEMENTS(pWins); ++i, ++pCurrent )
 {
 Point aNewPos = (*pCurrent)-GetPosPixel();
 aNewPos.Y() -= nDelta;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 620b677..e43b160 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1281,7 +1281,7 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner rOutliner, 
const Size rTextSize,
 // loop early-exits if we detect an already attained value
 sal_uInt16 nMinStretchX=0, nMinStretchY=0;
 sal_uInt16 aOldStretchXVals[]={0,0,0,0,0,0,0,0,0,0};
-const size_t 
aStretchArySize=sizeof(aOldStretchXVals)/sizeof(*aOldStretchXVals);
+const size_t aStretchArySize=SAL_N_ELEMENTS(aOldStretchXVals);
 for(unsigned int i=0; iaStretchArySize; ++i)
 {
 const Size aCurrTextSize = rOutliner.CalcTextSizeNTP();
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index a7e35cd..c1630ca 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -160,7 +160,7 @@ sal_uInt16 Ww1Style::ReadName( sal_uInt8*p, sal_uInt16 
rnCountBytes, sal_uInt1
 size_t nSize(stc);
 if (!nSize)
 pStr = W1 Normal;
-else if (nSize - 222 = sizeof(names) / sizeof(*names))
+else 

[Libreoffice-commits] .: oox/source

2012-01-03 Thread Muthu Subramanian
 oox/source/drawingml/textparagraphpropertiescontext.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 82e385c7e0b466cd1106e19cdbb6dc15b2464811
Author: Muthu Subramanian sumu...@suse.com
Date:   Tue Jan 3 18:07:24 2012 +0530

n734734: Line Spacing is used from previous values.

diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx 
b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 2164bf2..9d06ae1 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -148,6 +148,9 @@ 
TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
 PropertyMap rPropertyMap( 
mrTextParagraphProperties.getTextParagraphPropertyMap() );
 if ( maLineSpacing.bHasValue )
 rPropertyMap[ PROP_ParaLineSpacing ] = maLineSpacing.toLineSpacing();
+else
+rPropertyMap[ PROP_ParaLineSpacing ] = 
::com::sun::star::style::LineSpacing( 
::com::sun::star::style::LineSpacingMode::PROP, 100 );
+
 
 ::std::list TabStop ::size_type nTabCount = maTabList.size();
 if( nTabCount != 0 )
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source package/source padmin/source pyuno/source

2011-12-21 Thread Takeshi Abe
 oox/source/export/SchXMLSeriesHelper.cxx  |6 ++--
 oox/source/export/chartexport.cxx |   11 +++-
 package/source/xstor/ohierarchyholder.cxx |2 -
 package/source/xstor/xstorage.cxx |   18 +++---
 package/source/zippackage/ZipPackage.cxx  |8 +++---
 padmin/source/pamain.cxx  |2 -
 pyuno/source/module/pyuno.cxx |   28 +++---
 pyuno/source/module/pyuno_adapter.cxx |   10 +++
 pyuno/source/module/pyuno_callable.cxx|8 +++---
 pyuno/source/module/pyuno_except.cxx  |6 ++--
 pyuno/source/module/pyuno_gc.cxx  |2 -
 pyuno/source/module/pyuno_module.cxx  |   38 +++---
 pyuno/source/module/pyuno_runtime.cxx |4 +--
 pyuno/source/module/pyuno_type.cxx|6 ++--
 14 files changed, 74 insertions(+), 75 deletions(-)

New commits:
commit 7958f8244cc3e554b1339b14c7e589dfcbb0526c
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Wed Dec 21 21:57:16 2011 +0900

catch exception by constant reference

diff --git a/oox/source/export/SchXMLSeriesHelper.cxx 
b/oox/source/export/SchXMLSeriesHelper.cxx
index e233b8a..5723122 100644
--- a/oox/source/export/SchXMLSeriesHelper.cxx
+++ b/oox/source/export/SchXMLSeriesHelper.cxx
@@ -76,7 +76,7 @@ using ::rtl::OUString;
 }
 }
 }
-catch( uno::Exception  ex )
+catch( const uno::Exception  ex )
 {
 (void)ex; // avoid warning for pro build
 
@@ -212,7 +212,7 @@ uno::Reference beans::XPropertySet  
SchXMLSeriesHelper::createOldAPISeriesProp
 }
 }
 }
-catch( uno::Exception  rEx )
+catch( const uno::Exception  rEx )
 {
 (void)rEx; // avoid warning for pro build
 OSL_TRACE( Exception caught 
SchXMLSeriesHelper::createOldAPISeriesPropertySet: %s,
@@ -250,7 +250,7 @@ uno::Reference beans::XPropertySet  
SchXMLSeriesHelper::createOldAPIDataPointP
 }
 }
 }
-catch( uno::Exception  rEx )
+catch( const uno::Exception  rEx )
 {
 (void)rEx; // avoid warning for pro build
 
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index fb4d013..e757b1e 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -216,7 +216,7 @@ Reference chart2::data::XLabeledDataSequence  
lcl_getCategories( const Referen
 }
 }
 }
-catch( uno::Exception  ex )
+catch( const uno::Exception  ex )
 {
 (void)ex; // avoid warning for pro build
 OSL_FAIL( rtl::OUStringToOString(
@@ -334,7 +334,7 @@ bool lcl_isSeriesAttachedToFirstAxis(
 xProp-getPropertyValue( OUString( 
RTL_CONSTASCII_USTRINGPARAM(AttachedAxisIndex) ) ) = nAxisIndex;
 bResult = (0==nAxisIndex);
 }
-catch( uno::Exception  ex )
+catch( const uno::Exception  ex )
 {
 (void)ex; // avoid warning for pro build
 OSL_FAIL( rtl::OUStringToOString(
@@ -495,9 +495,8 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference 
chart2::data::XDataSeque
 if( !aHiddenValues.getLength() )
 return true;
 }
-catch( uno::Exception e )
+catch( uno::Exception )
 {
-(void)e; // avoid warning
 return true;
 }
 }
@@ -787,7 +786,7 @@ void ChartExport::InitRangeSegmentationProperties( const 
Reference chart2::XCha
 }
 }
 }
-catch( uno::Exception  ex )
+catch( const uno::Exception  ex )
 {
 (void)ex; // avoid warning for pro build
 OSL_FAIL( rtl::OUStringToOString(
@@ -2573,7 +2572,7 @@ void ChartExport::exportDataPoints(
 xPropSet = 
SchXMLSeriesHelper::createOldAPIDataPointPropertySet(
 xSeries, nElement, getModel() );
 }
-catch( uno::Exception  rEx )
+catch( const uno::Exception  rEx )
 {
 (void)rEx; // avoid warning for pro build
 OSL_TRACE( Exception caught during Export of data point: 
%s,
diff --git a/package/source/xstor/ohierarchyholder.cxx 
b/package/source/xstor/ohierarchyholder.cxx
index cc36e46..9ab6b15 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -335,7 +335,7 @@ void SAL_CALL OHierarchyElement_Impl::commited( const 
::com::sun::star::lang::Ev
 {
 Commit();
 }
-catch( uno::Exception e )
+catch( const uno::Exception e )
 {
 throw lang::WrappedTargetRuntimeException(
 ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( Can 
not commit storage sequence! ) ),
diff --git a/package/source/xstor/xstorage.cxx 
b/package/source/xstor/xstorage.cxx
index 7ba64a5..f5a3fdb 100644
--- a/package/source/xstor/xstorage.cxx
+++ 

[Libreoffice-commits] .: oox/source

2011-12-16 Thread Muthu Subramanian
 oox/source/drawingml/customshapeproperties.cxx |   16 
 1 file changed, 16 deletions(-)

New commits:
commit 606c2e7e9f0ab0fb5c32d98a6778457bcaaf1719
Author: Muthu Subramanian sumu...@suse.com
Date:   Fri Dec 16 20:25:43 2011 +0530

Fixed: bentConnectors are not imported properly.

Reverting regression with f0bf2a2ae95ddad3d08ddd1413ec56bf04224a94

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index 3f3bcdb..5da446a 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -110,22 +110,6 @@ static OUString GetConnectorShapeType( sal_Int32 nType )
 static const OUString sStraightConnector1 = CREATE_OUSTRING( 
mso-spt32 );
 sType = sStraightConnector1;
 } break;
-case XML_bentConnector2: {
-static const OUString sBentConnector2 = CREATE_OUSTRING( 
mso-spt33 );
-sType = sBentConnector2;
-} break;
-case XML_bentConnector3: {
-static const OUString sBentConnector3 = CREATE_OUSTRING( 
mso-spt34 );
-sType = sBentConnector3;
-} break;
-case XML_bentConnector4: {
-static const OUString sBentConnector4 = CREATE_OUSTRING( 
mso-spt35 );
-sType = sBentConnector4;
-} break;
-case XML_bentConnector5: {
-static const OUString sBentConnector5 = CREATE_OUSTRING( 
mso-spt36 );
-sType = sBentConnector5;
-} break;
 default:
 break;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-12-14 Thread Radek Doulík
 oox/source/drawingml/customshapeproperties.cxx  |   16 
 oox/source/drawingml/shapepropertiescontext.cxx |1 +
 2 files changed, 1 insertion(+), 16 deletions(-)

New commits:
commit 748a636b5150dbab9d92832bd0f422f57b406114
Author: Radek Doulik r...@novell.com
Date:   Wed Dec 14 15:05:15 2011 +0100

use custom shapes for curved connector shapes

 - they looks correctly visually, we can make then connector shapes
   once we have new implementation

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index 12a7f29..3f3bcdb 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -126,22 +126,6 @@ static OUString GetConnectorShapeType( sal_Int32 nType )
 static const OUString sBentConnector5 = CREATE_OUSTRING( 
mso-spt36 );
 sType = sBentConnector5;
 } break;
-case XML_curvedConnector2: {
-static const OUString sCurvedConnector2 = CREATE_OUSTRING( 
mso-spt37 );
-sType = sCurvedConnector2;
-} break;
-case XML_curvedConnector3: {
-static const OUString sCurvedConnector3 = CREATE_OUSTRING( 
mso-spt38 );
-sType = sCurvedConnector3;
-} break;
-case XML_curvedConnector4: {
-static const OUString sCurvedConnector4 = CREATE_OUSTRING( 
mso-spt39 );
-sType = sCurvedConnector4;
-} break;
-case XML_curvedConnector5: {
-static const OUString sCurvedConnector5 = CREATE_OUSTRING( 
mso-spt40 );
-sType = sCurvedConnector5;
-} break;
 default:
 break;
 }
diff --git a/oox/source/drawingml/shapepropertiescontext.cxx 
b/oox/source/drawingml/shapepropertiescontext.cxx
index 1d2a216..7f862e4 100644
--- a/oox/source/drawingml/shapepropertiescontext.cxx
+++ b/oox/source/drawingml/shapepropertiescontext.cxx
@@ -88,6 +88,7 @@ Reference XFastContextHandler  
ShapePropertiesContext::createFastChildContext(
 mrShape.getServiceName() = sLineShape;
 }
 if( ( nToken = XML_bentConnector2  nToken = XML_bentConnector5 
) ||
+( nToken = XML_curvedConnector2  nToken = 
XML_curvedConnector5 ) ||
   nToken == XML_straightConnector1 )
 {
 static const OUString sCustomShape( 
RTL_CONSTASCII_USTRINGPARAM( com.sun.star.drawing.CustomShape ) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-11-25 Thread Cédric Bosdonnat
 oox/source/helper/graphichelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 65be3e7908f21355fc8cc443192338d1cc8a8d61
Author: Cédric Bosdonnat cedric.bosdonnat@free.fr
Date:   Fri Nov 25 11:16:29 2011 +0100

Docx crasher: there may be no External Header for pictures.

diff --git a/oox/source/helper/graphichelper.cxx 
b/oox/source/helper/graphichelper.cxx
index fd3046e..6ddb986 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -257,7 +257,7 @@ Reference XGraphic  GraphicHelper::importGraphic( const 
Reference XInputStrea
 aArgs[ 0 ].Name = CREATE_OUSTRING( InputStream );
 aArgs[ 0 ].Value = rxInStrm;
 
-if ( pExtHeader-mapMode  0 )
+if ( pExtHeader  pExtHeader-mapMode  0 )
 {
 aArgs.realloc( aArgs.getLength() + 1 );
 Sequence PropertyValue  aFilterData( 3 );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-11-25 Thread Jan Holesovsky
 oox/source/mathml/importutils.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 15da1a153e85da6e8b3d33bb2ed10328bdfb9286
Author: Jan Holesovsky ke...@suse.cz
Date:   Fri Nov 25 13:18:03 2011 +0100

Fix build on Windows.

diff --git a/oox/source/mathml/importutils.cxx 
b/oox/source/mathml/importutils.cxx
index 8037e2b..c6bf80c 100644
--- a/oox/source/mathml/importutils.cxx
+++ b/oox/source/mathml/importutils.cxx
@@ -107,7 +107,7 @@ XmlStream::Tag::Tag( int t, const uno::Reference 
xml::sax::XFastAttributeList 
 }
 
 
-XmlStream::XmlStream::Tag::operator bool() const
+XmlStream::Tag::operator bool() const
 {
 return token != XML_TOKEN_INVALID;
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-11-24 Thread David Tardon
 oox/source/mathml/importutils.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 20c8eb409e2b48d57f392c146f7414bab3551664
Author: David Tardon dtar...@redhat.com
Date:   Fri Nov 25 07:26:10 2011 +0100

add missing include

diff --git a/oox/source/mathml/importutils.cxx 
b/oox/source/mathml/importutils.cxx
index 1dcb84e..8037e2b 100644
--- a/oox/source/mathml/importutils.cxx
+++ b/oox/source/mathml/importutils.cxx
@@ -29,6 +29,8 @@
 #include oox/mathml/importutils.hxx
 
 #include assert.h
+#include stdio.h
+
 #include oox/token/tokens.hxx
 #include oox/token/namespaces.hxx
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-11-22 Thread Stephan Bergmann
 oox/source/core/xmlfilterbase.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 28bb26279e8412763cabce7d172ca8246c70a30d
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Nov 22 12:10:02 2011 +0100

Avoid unused variable warning.

diff --git a/oox/source/core/xmlfilterbase.cxx 
b/oox/source/core/xmlfilterbase.cxx
index b0486f6..1ffe56a 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -665,6 +665,7 @@ XmlFilterBase XmlFilterBase::exportDocumentProperties( 
Reference XDocumentProp
 ? OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 
).getStr()
 : unconvertable,
 OUStringToOString( aValue.getValueTypeName(), 
RTL_TEXTENCODING_UTF8 ).getStr());
+(void) bHaveString; // avoid warnings
 }
 }
 return *this;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source sal/inc

2011-11-22 Thread Stephan Bergmann
 oox/source/core/xmlfilterbase.cxx |1 
 sal/inc/osl/diagnose.h|5 +-
 sal/inc/sal/log.h |   81 +-
 3 files changed, 41 insertions(+), 46 deletions(-)

New commits:
commit 981470b2404a80ed87f237a0e8a62cdef7cea9a5
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Nov 22 13:24:27 2011 +0100

Base SAL_INFO/WARN inclusion on if instead of #if.

So that variables only used within SAL_INFO/WARN do not lead to
unused variable warnings in product builds.  Also for OSL_TRACE
(which used to work that way before already); allowing to revert
a recent warning fix.

diff --git a/oox/source/core/xmlfilterbase.cxx 
b/oox/source/core/xmlfilterbase.cxx
index 1ffe56a..b0486f6 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -665,7 +665,6 @@ XmlFilterBase XmlFilterBase::exportDocumentProperties( 
Reference XDocumentProp
 ? OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 
).getStr()
 : unconvertable,
 OUStringToOString( aValue.getValueTypeName(), 
RTL_TEXTENCODING_UTF8 ).getStr());
-(void) bHaveString; // avoid warnings
 }
 }
 return *this;
diff --git a/sal/inc/osl/diagnose.h b/sal/inc/osl/diagnose.h
index 8e889ac..0e1fc44 100644
--- a/sal/inc/osl/diagnose.h
+++ b/sal/inc/osl/diagnose.h
@@ -145,13 +145,14 @@ pfunc_osl_printDetailedDebugMessage SAL_CALL 
osl_setDetailedDebugMessageFunc( pf
 
 #define OSL_DEBUG_ONLY(s)   _OSL_DEBUG_ONLY(s)
 
+#define OSL_TRACE(...) \
+SAL_INFO_IF(OSL_DEBUG_LEVEL  0, legacy.osl, __VA_ARGS__)
+
 #if OSL_DEBUG_LEVEL  0
-#define OSL_TRACE(...) SAL_INFO(legacy.osl, __VA_ARGS__)
 #define OSL_ASSERT(c) SAL_WARN_IF(!(c), legacy.osl, OSL_ASSERT)
 #define OSL_ENSURE(c, m) SAL_WARN_IF(!(c), legacy.osl, %s, m)
 #define OSL_FAIL(m) SAL_WARN_IF(sal_True, legacy.osl, %s, m)
 #else
-#define OSL_TRACE(...) ((void) 0)
 #define OSL_ASSERT(c) ((void) 0)
 #define OSL_ENSURE(c, m) ((void) 0)
 #define OSL_FAIL(m) ((void) 0)
diff --git a/sal/inc/sal/log.h b/sal/inc/sal/log.h
index 9e15560..d63ed6b 100644
--- a/sal/inc/sal/log.h
+++ b/sal/inc/sal/log.h
@@ -121,6 +121,18 @@ inline void SAL_CALL log(
 
 #endif
 
+/** @internal */
+#if defined SAL_LOG_INFO
+#define SAL_DETAIL_ENABLE_LOG_INFO sal_True
+#else
+#define SAL_DETAIL_ENABLE_LOG_INFO sal_False
+#endif
+#if defined SAL_LOG_WARN
+#define SAL_DETAIL_ENABLE_LOG_WARN sal_True
+#else
+#define SAL_DETAIL_ENABLE_LOG_WARN sal_False
+#endif
+
 /** A simple macro to create a file and line number string.
 
 Potentially not only useful within the log framework (where it is used
@@ -240,64 +252,47 @@ inline void SAL_CALL log(
 @since LibreOffice 3.5
 */
 
-#if defined SAL_LOG_INFO
-
 #define SAL_INFO(area, ...) \
 SAL_DETAIL_LOG_FORMAT( \
-sal_True, SAL_DETAIL_LOG_LEVEL_INFO, area, SAL_WHERE, __VA_ARGS__)
+SAL_DETAIL_ENABLE_LOG_INFO, SAL_DETAIL_LOG_LEVEL_INFO, area, \
+SAL_WHERE, __VA_ARGS__)
+
 #define SAL_INFO_IF(condition, area, ...) \
 SAL_DETAIL_LOG_FORMAT( \
-condition, SAL_DETAIL_LOG_LEVEL_INFO, area, SAL_WHERE, __VA_ARGS__)
-
-#if defined __cplusplus
-#define SAL_INFO_S(area, stream) \
-SAL_DETAIL_LOG_STREAM( \
-true, ::SAL_DETAIL_LOG_LEVEL_INFO, area, SAL_WHERE, stream)
-#define SAL_INFO_IF_S(condition, area, stream)  \
-SAL_DETAIL_LOG_STREAM( \
-condition, ::SAL_DETAIL_LOG_LEVEL_INFO, area, SAL_WHERE, stream)
-#endif
-
-#else
-
-#define SAL_INFO(area, format, ...) ((void) 0)
-#define SAL_INFO_IF(condition, area, format, ...) ((void) 0)
-
-#if defined __cplusplus
-#define SAL_INFO_S(area, stream) ((void) 0)
-#define SAL_INFO_IF_S(condition, area, stream) ((void) 0)
-#endif
-
-#endif
-
-#if defined SAL_LOG_WARN
+SAL_DETAIL_ENABLE_LOG_INFO  (condition), SAL_DETAIL_LOG_LEVEL_INFO, \
+area, SAL_WHERE, __VA_ARGS__)
 
 #define SAL_WARN(area, ...) \
 SAL_DETAIL_LOG_FORMAT( \
-sal_True, SAL_DETAIL_LOG_LEVEL_WARN, area, SAL_WHERE, __VA_ARGS__)
+SAL_DETAIL_ENABLE_LOG_WARN, SAL_DETAIL_LOG_LEVEL_WARN, area, \
+SAL_WHERE, __VA_ARGS__)
+
 #define SAL_WARN_IF(condition, area, ...) \
 SAL_DETAIL_LOG_FORMAT( \
-condition, SAL_DETAIL_LOG_LEVEL_WARN, area, SAL_WHERE, __VA_ARGS__)
+SAL_DETAIL_ENABLE_LOG_WARN  (condition), SAL_DETAIL_LOG_LEVEL_WARN, \
+area, SAL_WHERE, __VA_ARGS__)
 
 #if defined __cplusplus
-#define SAL_WARN_S(area, stream) \
-SAL_DETAIL_LOG_STREAM( \
-true, ::SAL_DETAIL_LOG_LEVEL_WARN, area, SAL_WHERE, stream)
-#define SAL_WARN_IF_S(condition, area, stream)   \
-SAL_DETAIL_LOG_STREAM( \
-condition, ::SAL_DETAIL_LOG_LEVEL_WARN, area, SAL_WHERE, stream)
-#endif
 
-#else
+#define SAL_INFO_S(area, stream) \
+SAL_DETAIL_LOG_STREAM( \
+SAL_DETAIL_ENABLE_LOG_INFO, ::SAL_DETAIL_LOG_LEVEL_INFO, area, \
+SAL_WHERE, stream)
 
-#define SAL_WARN(area, format, 

[Libreoffice-commits] .: oox/source

2011-11-15 Thread Muthu Subramanian
 oox/source/drawingml/textbodypropertiescontext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a8b0407fef14cd89e3eb571c88ce3cb9edf70149
Author: Muthu Subramanian sumu...@suse.com
Date:   Tue Nov 15 21:13:18 2011 +0530

n#592912 and n#621744: Text Alignment fixes.

diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx 
b/oox/source/drawingml/textbodypropertiescontext.cxx
index 083cccf..3c77a35 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -152,7 +152,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( 
ContextHandler rParent,
 mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] =
 TextHorizontalAdjust_RIGHT;
 }
-else
+else if( mrTextBodyProp.moVert.get( XML_horz ) == XML_horz )
 mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] = eVA;
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-11-08 Thread Radek Doulík
 oox/source/drawingml/textparagraphproperties.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a8bdbeb1a819c0296940b4dd882890be16ec4cba
Author: Radek Doulik r...@novell.com
Date:   Tue Nov 8 15:40:31 2011 +0100

fixed regression, set the left paragraph margin

diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index f7168c1..b6c9178 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -456,7 +456,7 @@ void TextParagraphProperties::pushToPropSet( const 
::oox::core::XmlFilterBase* p
 }
 }
 if ( noParaLeftMargin )
-aPropSet.setProperty( PROP_ParaLeftMargin, sal_Int32(0) 
/**noParaLeftMargin*/ );
+aPropSet.setProperty( PROP_ParaLeftMargin, sal_Int32( 
*noParaLeftMargin ) );
 if ( noFirstLineIndentation )
 aPropSet.setProperty( PROP_ParaFirstLineIndent, 
*noFirstLineIndentation );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-11-02 Thread Muthu Subramanian
 oox/source/drawingml/chart/seriesconverter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b645f9195f4da3014e001fb27b8a117d89c8f389
Author: Muthu Subramanian sumu...@suse.com
Date:   Wed Nov 2 13:50:20 2011 +0530

n#706792: Fix crash while opening certain pptx files.

diff --git a/oox/source/drawingml/chart/seriesconverter.cxx 
b/oox/source/drawingml/chart/seriesconverter.cxx
index 8a98471..3ed07e6 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -196,7 +196,7 @@ void DataLabelConverter::convertFromModel( const Reference 
XDataSeries  rxDat
 PropertySet aPropSet( rxDataSeries-getDataPointByIndex( 
mrModel.mnIndex ) );
 lclConvertLabelFormatting( aPropSet, getFormatter(), mrModel, 
rTypeGroup, false );
 
-if( !mrModel.mxLayout-mbAutoLayout )
+if( mrModel.mxLayout  !mrModel.mxLayout-mbAutoLayout )
 {
 // bnc#694340 - nasty hack - chart2 cannot individually
 // place data labels, let's try to find a useful
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-10-21 Thread Noel Power
 oox/source/ole/vbainputstream.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e3ef9bebf69479ead10a10a9a25d866321970edb
Author: Noel Power noel.po...@novell.com
Date:   Fri Oct 21 10:51:10 2011 +0100

tweak compressession hack to fix vba module import

it seems that the heuristic to trigger the inflate hack from frob is both 
wrong in the code ( my fault ) and additionally doesn't always hold true ( 
found a document where the heuristic is triggered falsely ) So. removing that 
heuristic entirely for now

diff --git a/oox/source/ole/vbainputstream.cxx 
b/oox/source/ole/vbainputstream.cxx
index 8b054ea..5299b7e 100644
--- a/oox/source/ole/vbainputstream.cxx
+++ b/oox/source/ole/vbainputstream.cxx
@@ -147,7 +147,7 @@ bool VbaInputStream::updateChunk()
 // start of the next chunk we can read those strange broken
 // ( I guess from a MSO bug ) commpessed streams  4k
 
-if ( bIgnoreBrokenSig || ( ! ( mpInStrm-getRemaining()  4096 ) ) )
+if ( bIgnoreBrokenSig )
 {
 bCompressed = true;
 nChunkLen = 4094;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-10-07 Thread Caolán McNamara
 oox/source/core/filterdetect.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b90a9e8877a71e33c439396e3fda0c53750748f8
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Oct 7 13:22:49 2011 +0100

WaE: unused variables

diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
index 5c01b2e..c0bde4d 100644
--- a/oox/source/core/filterdetect.cxx
+++ b/oox/source/core/filterdetect.cxx
@@ -178,7 +178,7 @@ void FilterDetectDocHandler::parseRelationship( const 
AttributeList rAttribs )
  if ( xAbs.is() )
  maTargetPath = xAbs-getPath();
 }
-catch( Exception e)
+catch( const Exception )
 {
 }
 }
@@ -620,7 +620,7 @@ Reference XInputStream  
FilterDetect::extractUnencryptedPackage( MediaDescript
 }
 }
 }
-catch( Exception )
+catch( const Exception )
 {
 }
 
@@ -685,7 +685,7 @@ OUString SAL_CALL FilterDetect::detect( Sequence 
PropertyValue  rMediaDescSeq
 aParser.parseStream( aZipStorage, CREATE_OUSTRING( 
[Content_Types].xml ) );
 }
 }
-catch( Exception e )
+catch( const Exception )
 {
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2011-10-05 Thread Noel Power
 oox/source/ole/olehelper.cxx |   28 ++--
 1 file changed, 26 insertions(+), 2 deletions(-)

New commits:
commit 04688482241aa28b40f3ba911a4c9acab87b5d56
Author: Noel Power noel.po...@novell.com
Date:   Wed Oct 5 17:52:32 2011 +0100

add hackery re. EditControls, FormattedField  ImageControls from msocximex

diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index fd4672a..3943e65 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -138,6 +138,7 @@ struct IdCntrlData
 };
 
 const sal_Int16 TOGGLEBUTTON = -1;
+const sal_Int16 FIELDCONTROL = -2;
 
 typedef std::map sal_Int16, GUIDCNamePair  GUIDCNamePairMap;
 class classIdToGUIDCNamePairMap
@@ -196,6 +197,9 @@ classIdToGUIDCNamePairMap::classIdToGUIDCNamePairMap()
 {  FormComponentType::PATTERNFIELD,
  { AX_GUID_TEXTBOX, TextBox},
 },
+{  FormComponentType::FORMULAFIELD,
+ { AX_GUID_TEXTBOX, TextBox},
+},
 {  FormComponentType::IMAGEBUTTON,
  { AX_GUID_COMMANDBUTTON, CommandButton},
 },
@@ -501,14 +505,34 @@ OleFormCtrlExportHelper::OleFormCtrlExportHelper(  const 
Reference XComponentCo
 PropertySet aPropSet( mxControlModel );
 if ( aPropSet.getProperty( nClassId, PROP_ClassId ) )
 {
-// psuedo ripped from legacy msocximex
-if ( nClassId == FormComponentType::COMMANDBUTTON )
+/* psuedo ripped from legacy msocximex:
+  There is a truly horrible thing with EditControls and 
FormattedField
+  Controls, they both pretend to have an EDITBOX ClassId for 
compability
+  reasons, at some stage in the future hopefully there will be a 
proper
+  FormulaField ClassId rather than this piggybacking two controls 
onto the
+  same ClassId, cmc.
+*/
+if ( nClassId == FormComponentType::TEXTFIELD)
+{
+if (xInfo-
+supportsService( CREATE_OUSTRING( 
com.sun.star.form.component.FormattedField ) ) )
+nClassId = FormComponentType::FORMULAFIELD;
+}
+else if ( nClassId == FormComponentType::COMMANDBUTTON )
 {
 bool bToggle = false;
 aPropSet.getProperty( bToggle, PROP_Toggle );
 if ( bToggle )
 nClassId = TOGGLEBUTTON;
 }
+else if ( nClassId == FormComponentType::CONTROL )
+{
+Reference XServiceInfo  xInfo( xCntrlModel,
+UNO_QUERY);
+if (xInfo-
+supportsService(OUString( CREATE_OUSTRING( 
com.sun.star.form.component.ImageControl ) ) ) )
+nClassId = FormComponentType::IMAGECONTROL;
+}
 
 GUIDCNamePairMap cntrlMap = classIdToGUIDCNamePairMap::get();
 GUIDCNamePairMap::iterator it = cntrlMap.find( nClassId );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits