[Libreoffice-commits] .: oox/source

2013-01-31 Thread Lennard
 oox/source/drawingml/customshapepresets4.cxx |  217 +++
 oox/source/export/shapes.cxx |1 
 2 files changed, 218 insertions(+)

New commits:
commit d9a18176d6b56119aa91699cd3aa102e36a7805c
Author: Lennard 
Date:   Thu Dec 27 22:12:56 2012 +0100

fdo#56976 fixes up Arrow import bug

Importing an LibreOffice upArrow from an pptx document caused it and 
several custom shapes go down the drain.
That was perhaps a memory violation because the procedure to generate it in 
working memory was missing.
This patch gets you that procedure. Note it cannot be manipulated yet.

Signed-off-by: Lennard 

Conflicts:
oox/source/drawingml/customshapepresets4.cxx

Change-Id: I8b9ce3ae1aef7894ab04b9857e90831d715ec1d5
Reviewed-on: https://gerrit.libreoffice.org/1492
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/oox/source/drawingml/customshapepresets4.cxx 
b/oox/source/drawingml/customshapepresets4.cxx
index f7a112d..f79fb8e 100644
--- a/oox/source/drawingml/customshapepresets4.cxx
+++ b/oox/source/drawingml/customshapepresets4.cxx
@@ -1651,6 +1651,222 @@ class ShapeCdownArrow : public CustomShapeProvider
 return aPropertyMap;
   }
 };
+class ShapeCupArrow : public CustomShapeProvider
+{
+  virtual PropertyMap getProperties()
+  {
+PropertyMap aPropertyMap;
+
+{
+Sequence< EnhancedCustomShapeAdjustmentValue > aAdjSequence (2);
+{
+Any aAny ((sal_Int32) 5);
+aAdjSequence [0].Value = aAny;
+aAdjSequence [0].Name = "adj1";
+}
+{
+Any aAny ((sal_Int32) 5);
+aAdjSequence [1].Value = aAny;
+aAdjSequence [1].Name = "adj2";
+}
+aPropertyMap [PROP_AdjustmentValues] <<= aAdjSequence;
+}
+{
+static const char *aStrings[] = {
+"min(logwidth,logheight)",
+"10*logheight/?0 ",
+"if(0-$0 ,0,if(10-$0 ,$0 ,10))",
+"if(0-$1 ,0,if(?1 -$1 ,$1 ,?1 ))",
+"?0 *?3 /10",
+"0+?4 -0",
+"logwidth*?2 /20",
+"logwidth/2",
+"?7 +0-?6 ",
+"?7 +?6 -0",
+"logwidth/2",
+"?8 *?4 /?10 ",
+"?5 +0 -?11",
+"logwidth",
+"logheight"
+};
+aPropertyMap [PROP_Equations] <<= createStringSequence( 
SAL_N_ELEMENTS( aStrings ), aStrings );
+}
+{
+Sequence< Sequence < PropertyValue > > aPropSequenceSequence (2);
+{
+Sequence< PropertyValue > aPropSequence (4);
+{
+aPropSequence [0].Name = "Position";
+static const CustomShapeProvider::ParameterPairData aData =
+{
+EnhancedCustomShapeParameterType::EQUATION,
+EnhancedCustomShapeParameterType::EQUATION,
+8, 14
+};
+aPropSequence [0].Value = makeAny 
(createParameterPair(&aData));
+}
+{
+aPropSequence [1].Name = "RangeXMaximum";
+EnhancedCustomShapeParameter aParameter;
+Any aAny ((sal_Int32) 10);
+aParameter.Value = aAny;
+aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+aPropSequence [1].Value = makeAny (aParameter);
+}
+{
+aPropSequence [2].Name = "RangeXMinimum";
+EnhancedCustomShapeParameter aParameter;
+Any aAny ((sal_Int32) 0);
+aParameter.Value = aAny;
+aParameter.Type = EnhancedCustomShapeParameterType::NORMAL;
+aPropSequence [2].Value = makeAny (aParameter);
+}
+{
+aPropSequence [3].Name = "RefX";
+Any aAny ((sal_Int32) 0);
+aPropSequence [3].Value = makeAny (aAny);
+}
+aPropSequenceSequence [0] = aPropSequence;
+}
+{
+Sequence< PropertyValue > aPropSequence (4);
+{
+aPropSequence [0].Name = "Position";
+static const CustomShapeProvider::ParameterPairData aData =
+{
+EnhancedCustomShapeParameterType::NORMAL,
+EnhancedCustomShapeParameterType::EQUATION,
+0, 5
+};
+aPropSequence [0].Value = makeAny 
(createParameterPair(&aData));
+}
+{
+aPropSequence [1].Name = "RangeYMaximum";
+EnhancedCustomShapeParameter aParameter;
+Any aAny ((sal_Int32) 1);
+aParameter.Value = aAny;
+aParameter.Type = EnhancedCustomShapeParameterType::EQUATION;
+aPropSequence [1].Value = makeAny (aParameter);
+}
+{

[Libreoffice-commits] .: oox/source

2013-01-29 Thread Libreoffice Gerrit user
 oox/source/drawingml/fillproperties.cxx  |3 +++
 oox/source/drawingml/graphicshapecontext.cxx |3 +++
 oox/source/drawingml/shape.cxx   |2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 972609a87f1269a86fd1290a1e34eb9683e6426a
Author: Radek Doulik 
Date:   Tue Jan 29 10:42:46 2013 +0100

use ole obj preview image

Change-Id: I7e88ca553fcb8449a337af36554dd1996bc6dd7d

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 327b19b..4e9a02a 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -395,6 +395,9 @@ void GraphicProperties::pushToPropMap( PropertyMap& 
rPropMap, const GraphicHelpe
 }
 }
 
+rPropMap[ PROP_Graphic ] <<= xGraphic;
+
+// do we still need to set GraphicURL as well? (TODO)
 OUString aGraphicUrl = rGraphicHelper.createGraphicObject( xGraphic );
 if( !aGraphicUrl.isEmpty() )
 rPropMap[ PROP_GraphicURL ] <<= aGraphicUrl;
diff --git a/oox/source/drawingml/graphicshapecontext.cxx 
b/oox/source/drawingml/graphicshapecontext.cxx
index 96f47b0..2b46302 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -213,6 +213,9 @@ Reference< XFastContextHandler > 
OleObjectGraphicDataContext::createFastChildCon
 OSL_ENSURE( mrOleObjectInfo.mbLinked, 
"OleObjectGraphicDataContext::createFastChildContext - unexpected child 
element" );
 mrOleObjectInfo.mbAutoUpdate = aAttribs.getBool( 
XML_updateAutomatic, false );
 break;
+case PPT_TOKEN( pic ):
+xRet.set( new GraphicShapeContext( *this, mpMasterShapePtr, 
mpShapePtr ) );
+break;
 }
 return xRet;
 }
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 2ea289c..45cc868 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -531,7 +531,7 @@ Reference< XShape > Shape::createAndInsert(
 // applying properties
 aShapeProps.assignUsed( getShapeProperties() );
 aShapeProps.assignUsed( maDefaultShapeProperties );
-if ( bIsEmbMedia || aServiceName == 
"com.sun.star.drawing.GraphicObjectShape" )
+if ( bIsEmbMedia || aServiceName == 
"com.sun.star.drawing.GraphicObjectShape" || aServiceName == 
"com.sun.star.drawing.OLE2Shape" )
 mpGraphicPropertiesPtr->pushToPropMap( aShapeProps, rGraphicHelper 
);
 if ( mpTablePropertiesPtr.get() && aServiceName == 
"com.sun.star.drawing.TableShape" )
 mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, 
mpMasterTextListStyle );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2013-01-24 Thread Libreoffice Gerrit user
 oox/source/mathml/importutils.cxx |   19 ---
 1 file changed, 8 insertions(+), 11 deletions(-)

New commits:
commit a577418d9f9fe0e622f60a5b61a6fadc98d819a9
Author: Miklos Vajna 
Date:   Thu Jan 24 11:14:21 2013 +0100

oox: drop no longer needed STR() macro

Change-Id: I95ebe1915edb53ae25f3f85512b7b843726d8473

diff --git a/oox/source/mathml/importutils.cxx 
b/oox/source/mathml/importutils.cxx
index 99b673d..d3c4782 100644
--- a/oox/source/mathml/importutils.cxx
+++ b/oox/source/mathml/importutils.cxx
@@ -37,9 +37,6 @@
 #include 
 #include 
 
-// *sigh*
-#define STR( str ) OUString( RTL_CONSTASCII_USTRINGPARAM( str ))
-
 #define OPENING( token ) XML_STREAM_OPENING( token )
 #define CLOSING( token ) XML_STREAM_CLOSING( token )
 
@@ -82,33 +79,33 @@ static OUString tokenToString( int token )
 {
 OUString tokenname = StaticTokenMap::get().getUnicodeTokenName( token & 
TOKEN_MASK );
 if( tokenname.isEmpty())
-tokenname = STR( "???" );
+tokenname = "???";
 int nmsp = ( token & NMSP_MASK & ~( TAG_OPENING | TAG_CLOSING ));
 #if 0 // this is awfully long
 OUString namespacename = StaticNamespaceMap::get().count( nmsp ) != 0
-? StaticNamespaceMap::get()[ nmsp ] : STR( "???" );
+? StaticNamespaceMap::get()[ nmsp ] : OUString( "???" );
 #else
 OUString namespacename;
 // only few are needed actually
 switch( nmsp )
 {
 case NMSP_officeMath:
-namespacename = STR( "m" );
+namespacename = "m";
 break;
 case NMSP_doc:
-namespacename = STR( "w" );
+namespacename = "w";
 break;
 default:
-namespacename = STR( "?" );
+namespacename = "?";
 break;
 }
 #endif
 if( token == OPENING( token ))
-return STR( "<" ) + namespacename + STR( ":" ) + tokenname + STR ( ">" 
);
+return "<" + namespacename + ":" + tokenname + ">";
 if( token == CLOSING( token ))
-return STR( "" );
+return "";
 // just the name itself, not specified whether opening or closing
-return namespacename + STR( ":" ) + tokenname;
+return namespacename + ":" + tokenname;
 }
 
 } // namespace
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2013-01-17 Thread Libreoffice Gerrit user
 oox/source/vml/vmlshape.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a8be8ad30f22031ad859f565cb066c76e2d3fa39
Author: Miklos Vajna 
Date:   Thu Jan 17 12:08:18 2013 +0100

oox: fix misleading comment

Change-Id: I96e03fcba317a7ec8f892a2a0656dafbfb8758da

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 8aba860..72c4ca1 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -360,7 +360,7 @@ void ShapeBase::convertShapeProperties( const Reference< 
XShape >& rxShape ) con
 maTypeModel.maStrokeModel.pushToPropMap( aPropMap, rGraphicHelper );
 maTypeModel.maFillModel.pushToPropMap( aPropMap, rGraphicHelper );
 
-// TextFrames have FillColor, not BackColor
+// TextFrames have BackColor, not FillColor
 uno::Reference xSInfo(rxShape, uno::UNO_QUERY_THROW);
 if (xSInfo->supportsService("com.sun.star.text.TextFrame") && 
aPropMap.hasProperty(PROP_FillColor))
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2013-01-16 Thread Libreoffice Gerrit user
 oox/source/drawingml/table/tablecell.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit fd447c820f3f42cb16f5af28572fe7a9047b6481
Author: Radek Doulik 
Date:   Wed Jan 16 20:37:50 2013 +0100

fix cell border line properties n#793408

Change-Id: Id20fa233b7e7eb0f2f01f4c230d1fe3398f2f4ed

diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index 7efc01c..3bca437 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -72,6 +72,7 @@ void applyLineAttributes( const ::oox::core::XmlFilterBase& 
rFilterBase,
 aBorderLine.Color = aColor.getColor( rFilterBase.getGraphicHelper() );
 aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 4 );
 aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 4 );
+aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( 
rLineProperties.moLineWidth.get( 0 ) ) / 2 );
 aBorderLine.LineDistance = 0;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2013-01-07 Thread Libreoffice Gerrit user
 oox/source/ppt/conditioncontext.hxx|2 --
 oox/source/ppt/presentationfragmenthandler.cxx |6 +++---
 oox/source/ppt/slidefragmenthandler.cxx|9 +++--
 oox/source/ppt/slidepersist.cxx|9 -
 oox/source/ppt/slidetransitioncontext.cxx  |   10 --
 oox/source/ppt/soundactioncontext.cxx  |4 
 oox/source/ppt/timenodelistcontext.cxx |7 ---
 7 files changed, 6 insertions(+), 41 deletions(-)

New commits:
commit b40d74a4430d7c6e1def1720335b4e87aa07c803
Author: José Guilherme Vanz 
Date:   Sun Jan 6 18:50:45 2013 -0200

Cleanup code

This commit is just cleanup in oox

Change-Id: Ic4036c7216c2986d9b237917cb4ae1d829d85003
Signed-off-by: José Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1556
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/oox/source/ppt/conditioncontext.hxx 
b/oox/source/ppt/conditioncontext.hxx
index 47a60c5..12df696 100644
--- a/oox/source/ppt/conditioncontext.hxx
+++ b/oox/source/ppt/conditioncontext.hxx
@@ -44,9 +44,7 @@ namespace oox { namespace ppt {
 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 
aElementToken, const AttributeList& rAttribs );
 
 private:
-//  ::com::sun::star::uno::Any & maCond;
 ::com::sun::star::animations::Event  maEvent;
-//  AnimTargetElementPtr mpTarget;
 AnimationCondition & maCond;
 };
 
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx 
b/oox/source/ppt/presentationfragmenthandler.cxx
index 9033372..6d077e7 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -114,7 +114,7 @@ void ResolveTextFields( XmlFilterBase& rFilter )
 xDrawPage = xPresentationPage->getNotesPage();
 }
 Reference< container::XNamed > xNamed( xDrawPage, 
UNO_QUERY_THROW );
-aURL = OUString( "#" ).concat( xNamed->getName() );
+aURL = "#" + xNamed->getName();
 xPropSet->setPropertyValue( sURL, Any( aURL ) );
 Reference< text::XTextContent > xContent( 
rTextField.xTextField, UNO_QUERY);
 Reference< text::XTextRange > xTextRange( 
rTextField.xTextCursor, UNO_QUERY );
@@ -285,8 +285,8 @@ void PresentationFragmentHandler::finalizeImport()
 }
 catch( uno::Exception& )
 {
-OSL_FAIL( 
OString(OString("oox::ppt::PresentationFragmentHandler::EndDocument(), "
-"exception caught: ") +
+OSL_FAIL( 
OString("oox::ppt::PresentationFragmentHandler::EndDocument(), "
+"exception caught: " +
 OUStringToOString(
 comphelper::anyToString( cppu::getCaughtException() ),
 RTL_TEXTENCODING_UTF8 )).getStr() );
diff --git a/oox/source/ppt/slidefragmenthandler.cxx 
b/oox/source/ppt/slidefragmenthandler.cxx
index 643fad2..8caa1a7 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -106,13 +106,10 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 TextListStylePtr pTextListStyle(new TextListStyle);
 SlidePersistPtr pMasterPersistPtr = SlidePersistPtr( new 
SlidePersist( rFilter, sal_True, sal_True, mpSlidePersistPtr->getPage(),
 ShapePtr( new PPTShape( Master, 
"com.sun.star.drawing.GroupShape" ) ), mpSlidePersistPtr->getNotesTextStyle() ) 
);
-//pMasterPersistPtr->setLayoutPath( aLayoutFragmentPath );
 pMasterPersistPtr->setPath( aNotesFragmentPath );
 rFilter.getMasterPages().push_back( pMasterPersistPtr );
 FragmentHandlerRef xMasterFragmentHandler( new 
SlideFragmentHandler( rFilter, aNotesFragmentPath, pMasterPersistPtr, Master ) 
);
 rFilter.importFragment( xMasterFragmentHandler );
-//pMasterPersistPtr->createBackground( rFilter );
-//pMasterPersistPtr->createXShapes( rFilter );
 mpSlidePersistPtr->setMasterPersist( pMasterPersistPtr );
 }
 return this;
@@ -213,11 +210,11 @@ void SlideFragmentHandler::finalizeImport()
 }
 catch( uno::Exception& )
 {
-OSL_FAIL( 
OString(OString("oox::ppt::SlideFragmentHandler::EndElement(), "
-"exception caught: ") +
+OSL_FAIL( OString("oox::ppt::SlideFragmentHandler::EndElement(), "
+"exception caught: " +
 OUStringToOString(
 comphelper::anyToString( cppu::getCaughtException() ),
-RTL_TEXTENCODING_UTF8 )).getStr() );
+RTL_TEXTENCODING_UTF8 )).getStr());
 }
 }
 
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 72cf294..277096c 100644
--

[Libreoffice-commits] .: oox/source

2013-01-04 Thread Libreoffice Gerrit user
 oox/source/ppt/animationspersist.cxx|1 -
 oox/source/ppt/animationtypes.cxx   |4 ++--
 oox/source/ppt/animationtypes.hxx   |4 ++--
 oox/source/ppt/animvariantcontext.cxx   |1 -
 oox/source/ppt/backgroundproperties.cxx |1 -
 oox/source/ppt/commonbehaviorcontext.cxx|4 +---
 oox/source/ppt/commonbehaviorcontext.hxx|6 +++---
 oox/source/ppt/commontimenodecontext.cxx|1 -
 oox/source/ppt/customshowlistcontext.cxx|2 +-
 oox/source/ppt/dgmimport.cxx|1 -
 oox/source/ppt/dgmlayout.cxx|1 -
 oox/source/ppt/extdrawingfragmenthandler.cxx|1 -
 oox/source/ppt/layoutfragmenthandler.cxx|1 -
 oox/source/ppt/pptfilterhelpers.cxx |5 -
 oox/source/ppt/pptfilterhelpers.hxx |2 +-
 oox/source/ppt/pptgraphicshapecontext.cxx   |1 -
 oox/source/ppt/pptimport.cxx|1 -
 oox/source/ppt/pptshape.cxx |   17 -
 oox/source/ppt/pptshapecontext.cxx  |3 +--
 oox/source/ppt/pptshapegroupcontext.cxx |1 -
 oox/source/ppt/pptshapepropertiescontext.cxx|1 -
 oox/source/ppt/presentationfragmenthandler.cxx  |   11 +--
 oox/source/ppt/slidefragmenthandler.cxx |5 ++---
 oox/source/ppt/slidemastertextstylescontext.cxx |1 -
 oox/source/ppt/slidepersist.cxx |   18 +-
 oox/source/ppt/slidetimingcontext.cxx   |1 -
 oox/source/ppt/slidetransition.cxx  |1 -
 oox/source/ppt/slidetransitioncontext.cxx   |1 -
 oox/source/ppt/soundactioncontext.cxx   |   12 
 oox/source/ppt/timeanimvaluecontext.cxx |4 ++--
 oox/source/ppt/timenode.cxx |2 --
 oox/source/ppt/timenodelistcontext.cxx  |6 ++
 oox/source/ppt/timetargetelementcontext.cxx |2 --
 33 files changed, 39 insertions(+), 84 deletions(-)

New commits:
commit 812ee7a6dc29b55acfbeaa1a43e632adbaf72e6b
Author: José Guilherme Vanz 
Date:   Mon Dec 31 00:48:04 2012 -0200

Removal rtl and string cleanup

This commit removes ::rtl:: prefixes and string cleanup in oox

Change-Id: I434462635392c750e2359f9d656d5e1885f2a0dc
Signed-off-by: Jose Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1520
Reviewed-by: LOH KOK HOE 
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/oox/source/ppt/animationspersist.cxx 
b/oox/source/ppt/animationspersist.cxx
index bf2a53a..74a9208 100644
--- a/oox/source/ppt/animationspersist.cxx
+++ b/oox/source/ppt/animationspersist.cxx
@@ -28,7 +28,6 @@
 
 #include "oox/drawingml/shape.hxx"
 
-using rtl::OUString;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::presentation;
 using namespace ::com::sun::star::drawing;
diff --git a/oox/source/ppt/animationtypes.cxx 
b/oox/source/ppt/animationtypes.cxx
index a79b0d6..a6ba788 100644
--- a/oox/source/ppt/animationtypes.cxx
+++ b/oox/source/ppt/animationtypes.cxx
@@ -31,7 +31,7 @@ using namespace ::com::sun::star::xml::sax;
 namespace oox { namespace ppt {
 
 // ST_TLTime
-Any GetTime(  const ::rtl::OUString & val )
+Any GetTime(  const OUString & val )
 {
 Any aDuration;
 if( val.compareToAscii( "indefinite" ) == 0 )
@@ -47,7 +47,7 @@ Any GetTime(  const ::rtl::OUString & val )
 
 
 // ST_TLTimeAnimateValueTime
-Any GetTimeAnimateValueTime( const ::rtl::OUString & val )
+Any GetTimeAnimateValueTime( const OUString & val )
 {
 Any aPercent;
 if( val.compareToAscii( "indefinite" ) == 0 )
diff --git a/oox/source/ppt/animationtypes.hxx 
b/oox/source/ppt/animationtypes.hxx
index 7e0b358..ab26abe 100644
--- a/oox/source/ppt/animationtypes.hxx
+++ b/oox/source/ppt/animationtypes.hxx
@@ -30,9 +30,9 @@
 namespace oox { namespace ppt {
 
 // ST_TLTime
-::com::sun::star::uno::Any GetTime( const ::rtl::OUString & val );
+::com::sun::star::uno::Any GetTime( const OUString & val );
 // ST_TLTimeAnimateValueTime
-::com::sun::star::uno::Any GetTimeAnimateValueTime( const ::rtl::OUString & 
val );
+::com::sun::star::uno::Any GetTimeAnimateValueTime( const OUString & val );
 
 } }
 
diff --git a/oox/source/ppt/animvariantcontext.cxx 
b/oox/source/ppt/animvariantcontext.cxx
index 8439d9d..51ff3a4 100644
--- a/oox/source/ppt/animvariantcontext.cxx
+++ b/oox/source/ppt/animvariantcontext.cxx
@@ -32,7 +32,6 @@
 #include "oox/drawingml/colorchoicecontext.hxx"
 #include "pptfilterhelpers.hxx"
 
-using ::rtl::OUString;
 using namespace ::oox::core;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
diff --git a/oox/source/ppt/backgroundproperties.cxx 
b/oox/source/ppt/backgroundproperties.cxx
index f38545c..b28512d 100644
--- a/oox/source/ppt/backgroundproperties.cxx
+++ b/oox/source/ppt/backgroundproperties.cxx
@@ -22,7 +22,6 @@
 #include "oox/d

[Libreoffice-commits] .: oox/source

2012-12-26 Thread Libreoffice Gerrit user
 oox/source/export/drawingml.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit e481740cc894ea21c8e7a49100d56ca572a21a76
Author: Muthu Subramanian 
Date:   Wed Dec 26 16:18:51 2012 +0530

n#793999: PPTX Export - background image fit to slide.

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 781feba..1a57432 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -561,6 +561,11 @@ void DrawingML::WriteBlipMode( Reference< XPropertySet > 
rXPropSet )
 case BitmapMode_REPEAT:
 mpFS->singleElementNS( XML_a, XML_tile, FSEND );
 break;
+case BitmapMode_STRETCH:
+mpFS->startElementNS( XML_a, XML_stretch, FSEND );
+mpFS->singleElementNS( XML_a, XML_fillRect, FSEND );
+mpFS->endElementNS( XML_a, XML_stretch );
+break;
 default:
 ;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-12-26 Thread Libreoffice Gerrit user
 oox/source/ole/axbinaryreader.cxx|6 ---
 oox/source/ole/axbinarywriter.cxx|4 --
 oox/source/ole/axcontrol.cxx |   38 
 oox/source/ole/axcontrolfragment.cxx |1 
 oox/source/ole/axfontdata.cxx|2 -
 oox/source/ole/olehelper.cxx |   37 +++
 oox/source/ole/oleobjecthelper.cxx   |2 -
 oox/source/ole/olestorage.cxx|2 -
 oox/source/ole/vbacontrol.cxx|6 +--
 oox/source/ole/vbahelper.cxx |3 -
 oox/source/ole/vbamodule.cxx |   54 ---
 oox/source/ole/vbaproject.cxx|   10 ++
 12 files changed, 70 insertions(+), 95 deletions(-)

New commits:
commit ed338bc212725f422f0def21aafc82f05e350646
Author: José Guilherme Vanz 
Date:   Wed Dec 26 01:06:08 2012 -0200

OUString cleanup in oox

Change-Id: Id3c121acddd515621325c93735bb3dd88592749e
Signed-off-by: José Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1485
Reviewed-by: Muthu Subramanian K 
Tested-by: Muthu Subramanian K 

diff --git a/oox/source/ole/axbinaryreader.cxx 
b/oox/source/ole/axbinaryreader.cxx
index 9b660c0..1e4c626 100644
--- a/oox/source/ole/axbinaryreader.cxx
+++ b/oox/source/ole/axbinaryreader.cxx
@@ -26,10 +26,6 @@ namespace ole {
 
 // 
 
-using ::rtl::OUString;
-
-// 
-
 namespace {
 
 const sal_uInt32 AX_STRING_SIZEMASK = 0x7FFF;
@@ -218,7 +214,7 @@ void AxBinaryPropertyReader::readStringProperty( OUString& 
orValue )
 }
 }
 
-void AxBinaryPropertyReader::readGuidProperty( ::rtl::OUString& orGuid )
+void AxBinaryPropertyReader::readGuidProperty( OUString& orGuid )
 {
 if( startNextProperty() )
 maLargeProps.push_back( ComplexPropVector::value_type( new 
GuidProperty( orGuid ) ) );
diff --git a/oox/source/ole/axbinarywriter.cxx 
b/oox/source/ole/axbinarywriter.cxx
index e5ed29a..f8cbc0c 100644
--- a/oox/source/ole/axbinarywriter.cxx
+++ b/oox/source/ole/axbinarywriter.cxx
@@ -34,10 +34,6 @@ namespace ole {
 
 // 
 
-using ::rtl::OUString;
-
-// 
-
 namespace {
 
 const sal_uInt32 AX_STRING_SIZEMASK = 0x7FFF;
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index b39b77a..7145083 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -558,11 +558,11 @@ void ControlConverter::convertToAxState( PropertySet& 
rPropSet,
 // control is awt or not )
 rPropSet.getProperty( nState, PROP_State );
 
-rValue = rtl::OUString(); // empty e.g. 'don't know'
+rValue = OUString(); // empty e.g. 'don't know'
 if ( nState == API_STATE_UNCHECKED )
-rValue = rtl::OUString( '0' );
+rValue = OUString('0');
 else if ( nState == API_STATE_CHECKED )
-rValue = rtl::OUString( '1' );
+rValue = OUString('1');
 
 // tristate
 if( bSupportsTriState && rPropSet.getProperty( bTmp, PROP_TriState ) )
@@ -2414,16 +2414,16 @@ HtmlSelectModel::HtmlSelectModel()
 bool
 HtmlSelectModel::importBinaryModel( BinaryInputStream& rInStrm )
 {
-static String sMultiple( RTL_CONSTASCII_USTRINGPARAM(" listValues;
+data = data.replaceAll( "\x0D\x0A" , "\x0A" );
+std::vector< OUString > listValues;
 std::vector< sal_Int16 > selectedIndices;
 
 // Ultra hacky parser for the info
@@ -2431,10 +2431,10 @@ HtmlSelectModel::importBinaryModel( BinaryInputStream& 
rInStrm )
 
 for ( sal_Int32 nToken = 0; nToken < nTokenCount; ++nToken )
 {
-String sLine( data.GetToken( nToken, '\n' ) );
+OUString sLine( data.getToken( nToken, '\n' ) );
 if ( !nToken ) // first line will tell us if multiselect is enabled
 {
-if ( sLine.CompareTo( sMultiple, sMultiple.Len() ) == 
COMPARE_EQUAL )
+if ( sLine == sMultiple )
 mnMultiSelect = true;
 }
 // skip first and last lines, no data there
@@ -2442,17 +2442,17 @@ HtmlSelectModel::importBinaryModel( BinaryInputStream& 
rInStrm )
 {
 if ( comphelper::string::getTokenCount(sLine, '>') )
 {
-String displayValue  = sLine.GetToken( 1, '>' );
-if ( displayValue.Len() )
+OUString displayValue  = sLine.getToken( 1, '>' );
+if ( displayValue.getLength() )
 {
 // Really we should be using a proper html parser
 // escaping some common bits to be escaped
-displayValue.SearchAndReplace( String( 
RTL_CONSTASCII_USTRINGPARAM( "<" ) ), String( 
RTL_CONSTASCII_USTRINGPARAM("<") ) );
-displayValue.SearchAndReplace( String( 
RTL

[Libreoffice-commits] .: oox/source

2012-12-19 Thread Libreoffice Gerrit user
 oox/source/helper/attributelist.cxx  |3 ---
 oox/source/helper/binaryinputstream.cxx  |6 --
 oox/source/helper/binaryoutputstream.cxx |4 
 oox/source/helper/containerhelper.cxx|3 ---
 oox/source/helper/graphichelper.cxx  |2 --
 oox/source/helper/modelobjecthelper.cxx  |2 --
 oox/source/helper/progressbar.cxx|2 --
 oox/source/helper/propertymap.cxx|2 --
 oox/source/helper/propertyset.cxx|4 
 oox/source/helper/storagebase.cxx|3 ---
 oox/source/helper/textinputstream.cxx|2 --
 oox/source/helper/zipstorage.cxx |2 --
 12 files changed, 35 deletions(-)

New commits:
commit 509eb776639ea620cc8f834772ec03cdb90831f8
Author: José Guilherme Vanz 
Date:   Wed Dec 19 23:43:41 2012 -0200

Removal unnecessary using declarations

This commit just removes some unnecessary using declarations

Change-Id: Ia1c7cc925b2db5b1172fae91dc703883d6539eaa
Signed-off-by: José Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1430
Reviewed-by: Norbert Thiebaud 
Tested-by: Norbert Thiebaud 

diff --git a/oox/source/helper/attributelist.cxx 
b/oox/source/helper/attributelist.cxx
index 8afe869..debd1f8 100644
--- a/oox/source/helper/attributelist.cxx
+++ b/oox/source/helper/attributelist.cxx
@@ -31,9 +31,6 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
 
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
 // 
 
 namespace {
diff --git a/oox/source/helper/binaryinputstream.cxx 
b/oox/source/helper/binaryinputstream.cxx
index 0f37340..1bef500 100644
--- a/oox/source/helper/binaryinputstream.cxx
+++ b/oox/source/helper/binaryinputstream.cxx
@@ -34,12 +34,6 @@ namespace oox {
 using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OString;
-using ::rtl::OStringBuffer;
-using ::rtl::OStringToOUString;
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
 namespace {
 
 const sal_Int32 INPUTSTREAM_BUFFERSIZE  = 0x8000;
diff --git a/oox/source/helper/binaryoutputstream.cxx 
b/oox/source/helper/binaryoutputstream.cxx
index 3cf66a4..e72a90a 100644
--- a/oox/source/helper/binaryoutputstream.cxx
+++ b/oox/source/helper/binaryoutputstream.cxx
@@ -31,10 +31,6 @@ namespace oox {
 using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OString;
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
-
 namespace {
 
 const sal_Int32 OUTPUTSTREAM_BUFFERSIZE = 0x8000;
diff --git a/oox/source/helper/containerhelper.cxx 
b/oox/source/helper/containerhelper.cxx
index d837f08..98884e5 100644
--- a/oox/source/helper/containerhelper.cxx
+++ b/oox/source/helper/containerhelper.cxx
@@ -34,9 +34,6 @@ using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
 // 
 
 namespace {
diff --git a/oox/source/helper/graphichelper.cxx 
b/oox/source/helper/graphichelper.cxx
index 6ddf640..95dd078 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -50,8 +50,6 @@ using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OUString;
-
 // 
 
 namespace {
diff --git a/oox/source/helper/modelobjecthelper.cxx 
b/oox/source/helper/modelobjecthelper.cxx
index 0982f3c..ef3e099 100644
--- a/oox/source/helper/modelobjecthelper.cxx
+++ b/oox/source/helper/modelobjecthelper.cxx
@@ -36,8 +36,6 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OUString;
-
 // 
 
 ObjectContainer::ObjectContainer( const Reference< XMultiServiceFactory >& 
rxModelFactory, const OUString& rServiceName ) :
diff --git a/oox/source/helper/progressbar.cxx 
b/oox/source/helper/progressbar.cxx
index 6cb22d0..6b6dd01 100644
--- a/oox/source/helper/progressbar.cxx
+++ b/oox/source/helper/progressbar.cxx
@@ -29,8 +29,6 @@ namespace oox {
 using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OUString;
-
 namespace {
 
 const sal_Int32 PROGRESS_RANGE  = 100;
diff --git a/oox/source/helper/propertymap.cxx 
b/oox/source/helper/propertymap.cxx
index 2d54e46..bd5f8ba 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -47,7 +47,6 @@ using ::com::sun::star::text::WritingMode;
 #include 
 #include 
 #include "oox/token/propertynames.hxx"
-using ::rtl::OUString;
 using ::com::sun::sta

[Libreoffice-commits] .: oox/source

2012-12-19 Thread Libreoffice Gerrit user
 oox/source/export/drawingml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1385f3736c0b80b7c31c03c457808db2ca4725d9
Author: Luboš Luňák 
Date:   Wed Dec 19 12:29:45 2012 +0100

fix last commit

operator== is case-sensitive

Change-Id: I9b0a99ffdd53780ab14d569b3fac17a7983d5b96

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index fa5f226..781feba 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1451,7 +1451,7 @@ void DrawingML::WriteConnectorConnections( 
EscherConnectorListEntry& rConnectorE
 
 sal_Unicode DrawingML::SubstituteBullet( sal_Unicode cBulletId, 
::com::sun::star::awt::FontDescriptor& rFontDesc )
 {
-if ( rFontDesc.Name == "starsymbol" || rFontDesc.Name == "opensymbol" )
+if ( rFontDesc.Name.equalsIgnoreAsciiCase("starsymbol") || 
rFontDesc.Name.equalsIgnoreAsciiCase("opensymbol") )
 {
 rtl_TextEncoding eCharSet = rFontDesc.CharSet;
 cBulletId = msfilter::util::bestFitOpenSymbolToMSFont(cBulletId, 
eCharSet, rFontDesc.Name);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-12-19 Thread Libreoffice Gerrit user
 oox/source/export/ColorPropertySet.cxx   |1 
 oox/source/export/ColorPropertySet.hxx   |   22 +-
 oox/source/export/SchXMLSeriesHelper.cxx |5 --
 oox/source/export/chartexport.cxx|   64 ++-
 oox/source/export/drawingml.cxx  |   23 ---
 oox/source/export/shapes.cxx |8 ---
 oox/source/export/vmlexport.cxx  |8 ---
 7 files changed, 55 insertions(+), 76 deletions(-)

New commits:
commit dbc484ce448b682f70a774430942063e91ee1909
Author: José Guilherme Vanz 
Date:   Tue Dec 18 22:38:21 2012 -0200

Removel ::rtl:: prefixes and macros in oox

This commit removes ::rtl:: prefixes, macros and replace old String class
in oox

Change-Id: I2672c859a45bc1221415479218c352bab4fe9b1a
Signed-off-by: José Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1335
Reviewed-by: Luboš Luňák 
Tested-by: Luboš Luňák 

diff --git a/oox/source/export/ColorPropertySet.cxx 
b/oox/source/export/ColorPropertySet.cxx
index 8475cf0..02c1d37 100644
--- a/oox/source/export/ColorPropertySet.cxx
+++ b/oox/source/export/ColorPropertySet.cxx
@@ -27,7 +27,6 @@ using namespace ::com::sun::star::beans;
 
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Sequence;
-using ::rtl::OUString;
 using ::com::sun::star::uno::RuntimeException;
 
 // 

diff --git a/oox/source/export/ColorPropertySet.hxx 
b/oox/source/export/ColorPropertySet.hxx
index 7d5e2e5..ab594b2 100644
--- a/oox/source/export/ColorPropertySet.hxx
+++ b/oox/source/export/ColorPropertySet.hxx
@@ -44,7 +44,7 @@ protected:
 virtual ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo()
 throw (::com::sun::star::uno::RuntimeException);
 virtual void SAL_CALL setPropertyValue(
-const ::rtl::OUString& aPropertyName,
+const OUString& aPropertyName,
 const ::com::sun::star::uno::Any& aValue )
 throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::beans::PropertyVetoException,
@@ -52,30 +52,30 @@ protected:
::com::sun::star::lang::WrappedTargetException,
::com::sun::star::uno::RuntimeException);
 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
-const ::rtl::OUString& PropertyName )
+const OUString& PropertyName )
 throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::lang::WrappedTargetException,
::com::sun::star::uno::RuntimeException);
 virtual void SAL_CALL addPropertyChangeListener(
-const ::rtl::OUString& aPropertyName,
+const OUString& aPropertyName,
 const ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertyChangeListener >& xListener )
 throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::lang::WrappedTargetException,
::com::sun::star::uno::RuntimeException);
 virtual void SAL_CALL removePropertyChangeListener(
-const ::rtl::OUString& aPropertyName,
+const OUString& aPropertyName,
 const ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertyChangeListener >& aListener )
 throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::lang::WrappedTargetException,
::com::sun::star::uno::RuntimeException);
 virtual void SAL_CALL addVetoableChangeListener(
-const ::rtl::OUString& PropertyName,
+const OUString& PropertyName,
 const ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XVetoableChangeListener >& aListener )
 throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::lang::WrappedTargetException,
::com::sun::star::uno::RuntimeException);
 virtual void SAL_CALL removeVetoableChangeListener(
-const ::rtl::OUString& PropertyName,
+const OUString& PropertyName,
 const ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XVetoableChangeListener >& aListener )
 throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::lang::WrappedTargetException,
@@ -83,19 +83,19 @@ protected:
 
 //  XPropertyState 
 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(
-const ::rtl::OUString& PropertyName )
+const OUString& PropertyName )
 throw (::com::sun::star::beans::UnknownPropertyException,
::com::sun::star::uno::RuntimeException);
 virtual ::com::sun::star::uno::Sequence< 
::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates(
-const ::com::sun::star::uno::Sequence< ::rtl::OUString >& 
aPropertyName )
+const :

[Libreoffice-commits] .: oox/source

2012-12-17 Thread Libreoffice Gerrit user
 oox/source/dump/dffdumper.cxx  |3 ---
 oox/source/dump/dumperbase.cxx |   12 ++--
 oox/source/dump/oledumper.cxx  |   24 +---
 oox/source/dump/pptxdumper.cxx |   37 ++---
 4 files changed, 29 insertions(+), 47 deletions(-)

New commits:
commit 9a30ab1b99a1041bf5f232c2bc3fbe4bc370342e
Author: José Guilherme Vanz 
Date:   Sun Dec 16 17:03:31 2012 -0200

rtl:: prefixes removal in oox

This commit removes some ::rtl:: prefixes and macros in oox

Change-Id: I8b24535775df85cc5bb87cc808afcd338ec52df6
Signed-off-by: José Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1334
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx
index e4a2727..b530998 100644
--- a/oox/source/dump/dffdumper.cxx
+++ b/oox/source/dump/dffdumper.cxx
@@ -26,9 +26,6 @@ namespace dump {
 
 // 
 
-using ::rtl::OUString;
-
-// 
 
 namespace {
 
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 1825b33..067cf7b 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -48,14 +48,6 @@ using namespace ::com::sun::star::uno;
 
 using ::comphelper::MediaDescriptor;
 using ::oox::core::FilterBase;
-using ::rtl::OString;
-using ::rtl::OStringBuffer;
-using ::rtl::OStringToOUString;
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-using ::rtl::OUStringToOString;
-
-// 
 
 namespace {
 
@@ -2465,7 +2457,7 @@ void XmlStreamObject::implDumpText( TextInputStream& 
rTextStrm )
 matching start/end elements and the element text on the same line. */
 OUStringBuffer aOldStartElem;
 // special handling for VML
-bool bIsVml = InputOutputHelper::getFileNameExtension( maSysFileName 
).equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vml"));
+bool bIsVml = InputOutputHelper::getFileNameExtension( maSysFileName 
).equalsIgnoreAsciiCaseAscii("vml");
 
 while( !rTextStrm.isEof() )
 {
@@ -2622,7 +2614,7 @@ void RecordObjectBase::writeHeader()
 // 
 
 void SequenceRecordObjectBase::construct( const ObjectBase& rParent,
-const BinaryInputStreamRef& rxBaseStrm, const ::rtl::OUString& 
rSysFileName,
+const BinaryInputStreamRef& rxBaseStrm, const OUString& rSysFileName,
 const String& rRecNames, const String& rSimpleRecs )
 {
 BinaryInputStreamRef xRecStrm( new SequenceInputStream( *mxRecData ) );
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index 5b900e9..9f26fcf 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -39,12 +39,6 @@ namespace dump {
 using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OString;
-using ::rtl::OStringToOUString;
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-// 
 // 
 
 OUString OleInputObjectBase::dumpAnsiString32( const String& rName )
@@ -552,7 +546,7 @@ void OleStorageObject::implDumpStream( const Reference< 
XInputStream >& rxStrm,
 {
 if ( rStrmName == "\001CompObj" )
 OleCompObjObject( *this, rxStrm, rSysFileName ).dump();
-else if( rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"\005SummaryInformation" ) ) || rStrmName.equalsAsciiL( 
RTL_CONSTASCII_STRINGPARAM( "\005DocumentSummaryInformation" ) ) )
+else if( rStrmName ==  "\005SummaryInformation"  || rStrmName == 
"\005DocumentSummaryInformation" )
 OlePropertyStreamObject( *this, rxStrm, rSysFileName ).dump();
 else
 BinaryStreamObject( *this, rxStrm, rSysFileName ).dump();
@@ -1523,13 +1517,13 @@ void FormControlStreamObject::implDump()
 {
 if ( maProgId == "Forms.CommandButton.1" )
 AxCommandButtonObject( *this ).dump();
-else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"Forms.TextBox.1" ) ) ||
- maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"Forms.ListBox.1" ) ) ||
- maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"Forms.ComboBox.1" ) ) ||
- maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"Forms.CheckBox.1" ) ) ||
- maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"Forms.OptionButton.1" ) ) ||
- maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"Forms.ToggleButton.1" ) ) ||
- maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
"RefEdit.Ctrl" ) ) )
+else if( maProgId ==  "Forms.TextBox.1" ||
+ 

[Libreoffice-commits] .: oox/source

2012-12-15 Thread Libreoffice Gerrit user
 oox/source/vml/vmlshapecontainer.cxx |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 5931dbb53ebb2ff1e5670ad6537a41f996c0277c
Author: Julien Nabet 
Date:   Sat Dec 15 09:34:06 2012 +0100

Oups changed this file by error

Change-Id: I9bf2a5f260828ed58abdc312ba3df7c2ed1c18e5

diff --git a/oox/source/vml/vmlshapecontainer.cxx 
b/oox/source/vml/vmlshapecontainer.cxx
index 6b999bd..4355b11 100644
--- a/oox/source/vml/vmlshapecontainer.cxx
+++ b/oox/source/vml/vmlshapecontainer.cxx
@@ -46,11 +46,8 @@ void lclMapShapesById( RefMap< OUString, ShapeType >& orMap, 
const RefVector< Sh
 OSL_ENSURE( !rShapeId.isEmpty(), "lclMapShapesById - missing shape 
identifier" );
 if( !rShapeId.isEmpty() )
 {
-OSL_ENSURE( orMap.find( rShapeId ) == orMap.end(), 
"lclMapShapesById - shape identifier already used JUL" );
-if (orMap.find( rShapeId ) == orMap.end())
-{
-   orMap[ rShapeId ] = *aIt;
-}
+OSL_ENSURE( orMap.find( rShapeId ) == orMap.end(), 
"lclMapShapesById - shape identifier already used " );
+orMap[ rShapeId ] = *aIt;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source ucb/source

2012-12-15 Thread Libreoffice Gerrit user
 oox/source/vml/vmlshapecontainer.cxx   |7 +--
 ucb/source/ucp/webdav/webdavresponseparser.cxx |   10 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit b82b9a93caaf27855d6059885de29d1989a1907d
Author: Julien Nabet 
Date:   Sat Dec 15 09:31:09 2012 +0100

Some cppcheck cleaning

Change-Id: I73b5eb0f12f0e9fcc4b691fadca17cd97e5fd079

diff --git a/oox/source/vml/vmlshapecontainer.cxx 
b/oox/source/vml/vmlshapecontainer.cxx
index 31ad4cc..6b999bd 100644
--- a/oox/source/vml/vmlshapecontainer.cxx
+++ b/oox/source/vml/vmlshapecontainer.cxx
@@ -46,8 +46,11 @@ void lclMapShapesById( RefMap< OUString, ShapeType >& orMap, 
const RefVector< Sh
 OSL_ENSURE( !rShapeId.isEmpty(), "lclMapShapesById - missing shape 
identifier" );
 if( !rShapeId.isEmpty() )
 {
-OSL_ENSURE( orMap.find( rShapeId ) == orMap.end(), 
"lclMapShapesById - shape identifier already used" );
-orMap[ rShapeId ] = *aIt;
+OSL_ENSURE( orMap.find( rShapeId ) == orMap.end(), 
"lclMapShapesById - shape identifier already used JUL" );
+if (orMap.find( rShapeId ) == orMap.end())
+{
+   orMap[ rShapeId ] = *aIt;
+}
 }
 }
 }
diff --git a/ucb/source/ucp/webdav/webdavresponseparser.cxx 
b/ucb/source/ucp/webdav/webdavresponseparser.cxx
index ffa4881..88b51da 100644
--- a/ucb/source/ucp/webdav/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav/webdavresponseparser.cxx
@@ -237,7 +237,7 @@ namespace
 {
 const sal_Int32 nIndex(rSource.indexOf(sal_Unicode(':'), 0));
 
-if(-1 != nIndex && nIndex > 0 && nIndex + 1 < nLen)
+if(nIndex > 0 && ((nIndex + 1) < nLen))
 {
 maNamespace = mapNamespaceToken(rSource.copy(0, nIndex));
 maName = rSource.copy(nIndex + 1);
@@ -695,7 +695,7 @@ namespace
 {
 if(isCollectingProperties())
 {
-if(maPropStatProperties.size())
+if(!maPropStatProperties.empty())
 {
 // append to 
maResponseProperties if okay
 
maResponseProperties.insert(maResponseProperties.end(), 
maPropStatProperties.begin(), maPropStatProperties.end());
@@ -703,7 +703,7 @@ namespace
 }
 else
 {
-if(maPropStatNames.size())
+if(!maPropStatNames.empty())
 {
 // when collecting properties 
append to
 
maResponseNames.insert(maResponseNames.end(), maPropStatNames.begin(), 
maPropStatNames.end());
@@ -721,7 +721,7 @@ namespace
 if(isCollectingProperties())
 {
 // create DAVResource when we have 
content
-if(maResponseProperties.size())
+if(!maResponseProperties.empty())
 {
 http_dav_ucp::DAVResource 
aDAVResource;
 
@@ -733,7 +733,7 @@ namespace
 else
 {
 // when collecting properties add them 
to result when there are some
-if(maResponseNames.size())
+if(!maResponseNames.empty())
 {
 http_dav_ucp::DAVResourceInfo 
aDAVResourceInfo(maHref);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-12-10 Thread Libreoffice Gerrit user
 oox/source/vml/vmltextboxcontext.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 5bc835d48f1e5373b3a31bd166fadfdf19b3588f
Author: Miklos Vajna 
Date:   Mon Dec 10 12:51:01 2012 +0100

oox: v:textbox's inset attribute should be imported in Hmm, not in Emu

Trivial reproducer: 
http://people.freedesktop.org/~vmiklos/2012/simple-textbox.docx

Change-Id: I030f7153326affc5a01e7ede1ddf1164fa500071

diff --git a/oox/source/vml/vmltextboxcontext.cxx 
b/oox/source/vml/vmltextboxcontext.cxx
index a651fa2..2724a1f 100644
--- a/oox/source/vml/vmltextboxcontext.cxx
+++ b/oox/source/vml/vmltextboxcontext.cxx
@@ -128,16 +128,16 @@ TextBoxContext::TextBoxContext( ContextHandler2Helper& 
rParent, TextBox& rTextBo
 OUString inset = rAttribs.getString( XML_inset ).get();
 OUString value;
 ConversionHelper::separatePair( value, inset, inset, ',' );
-rTextBox.borderDistanceLeft = ConversionHelper::decodeMeasureToEmu( 
graphicHelper,
+rTextBox.borderDistanceLeft = ConversionHelper::decodeMeasureToHmm( 
graphicHelper,
 value.isEmpty() ? "0.1in" : value, 0, false, false );
 ConversionHelper::separatePair( value, inset, inset, ',' );
-rTextBox.borderDistanceTop = ConversionHelper::decodeMeasureToEmu( 
graphicHelper,
+rTextBox.borderDistanceTop = ConversionHelper::decodeMeasureToHmm( 
graphicHelper,
 value.isEmpty() ? "0.05in" : value, 0, false, false );
 ConversionHelper::separatePair( value, inset, inset, ',' );
-rTextBox.borderDistanceRight = ConversionHelper::decodeMeasureToEmu( 
graphicHelper,
+rTextBox.borderDistanceRight = ConversionHelper::decodeMeasureToHmm( 
graphicHelper,
 value.isEmpty() ? "0.1in" : value, 0, false, false );
 ConversionHelper::separatePair( value, inset, inset, ',' );
-rTextBox.borderDistanceBottom = ConversionHelper::decodeMeasureToEmu( 
graphicHelper,
+rTextBox.borderDistanceBottom = ConversionHelper::decodeMeasureToHmm( 
graphicHelper,
 value.isEmpty() ? "0.05in" : value, 0, false, false );
 rTextBox.borderDistanceSet = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-12-07 Thread Libreoffice Gerrit user
 oox/source/drawingml/table/tablebackgroundstylecontext.cxx   |1 -
 oox/source/drawingml/table/tablecell.cxx |   11 +--
 oox/source/drawingml/table/tablecellcontext.cxx  |1 -
 oox/source/drawingml/table/tablecontext.cxx  |1 -
 oox/source/drawingml/table/tablepartstylecontext.cxx |1 -
 oox/source/drawingml/table/tableproperties.cxx   |9 -
 oox/source/drawingml/table/tablerow.cxx  |1 -
 oox/source/drawingml/table/tablerowcontext.cxx   |1 -
 oox/source/drawingml/table/tablestylecellstylecontext.cxx|1 -
 oox/source/drawingml/table/tablestylecontext.cxx |1 -
 oox/source/drawingml/table/tablestylelistfragmenthandler.cxx |3 ---
 oox/source/drawingml/table/tablestylepart.cxx|1 -
 oox/source/drawingml/table/tablestyletextstylecontext.cxx|1 -
 13 files changed, 9 insertions(+), 24 deletions(-)

New commits:
commit 74e858693e4c8e5b87730033706656a220f71cfc
Author: José Guilherme Vanz 
Date:   Thu Dec 6 22:19:41 2012 -0200

::rtl:: prefixes removal

This commit removes some ::rtl:: prefixes on oox

Change-Id: Iae9a89f8a869934b6273a1b97c0a9243b0504fb3
Signed-off-by: José Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1260
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/oox/source/drawingml/table/tablebackgroundstylecontext.cxx 
b/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
index e6e6307..52511ab 100644
--- a/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
+++ b/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
@@ -27,7 +27,6 @@ using namespace ::oox::core;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
-using ::rtl::OUString;
 
 namespace oox { namespace drawingml { namespace table {
 
diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index c89a4f9..7394acb 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -33,7 +33,6 @@
 #include 
 #include 
 
-using rtl::OUString;
 using namespace ::oox::core;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -124,11 +123,11 @@ void applyTableStylePart( oox::drawingml::FillProperties& 
rFillProperties,
 
 void applyTableCellProperties( const Reference < 
::com::sun::star::table::XCell >& rxCell, const TableCell& rTableCell )
 {
-static const rtl::OUString  sTopBorder( RTL_CONSTASCII_USTRINGPARAM( 
"TextUpperDistance" ) );
-static const rtl::OUString  sBottomBorder( RTL_CONSTASCII_USTRINGPARAM( 
"TextLowerDistance" ) );
-static const rtl::OUString  sLeftBorder( RTL_CONSTASCII_USTRINGPARAM( 
"TextLeftDistance" ) );
-static const rtl::OUString  sRightBorder( RTL_CONSTASCII_USTRINGPARAM( 
"TextRightDistance" ) );
-static const rtl::OUString  sVerticalAdjust( RTL_CONSTASCII_USTRINGPARAM( 
"TextVerticalAdjust" ) );
+static const OUString  sTopBorder( RTL_CONSTASCII_USTRINGPARAM( 
"TextUpperDistance" ) );
+static const OUString  sBottomBorder( RTL_CONSTASCII_USTRINGPARAM( 
"TextLowerDistance" ) );
+static const OUString  sLeftBorder( RTL_CONSTASCII_USTRINGPARAM( 
"TextLeftDistance" ) );
+static const OUString  sRightBorder( RTL_CONSTASCII_USTRINGPARAM( 
"TextRightDistance" ) );
+static const OUString  sVerticalAdjust( RTL_CONSTASCII_USTRINGPARAM( 
"TextVerticalAdjust" ) );
 
 Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW );
 xPropSet->setPropertyValue( sTopBorder, Any( static_cast< sal_Int32 >( 
rTableCell.getTopMargin() / 360 ) ) );
diff --git a/oox/source/drawingml/table/tablecellcontext.cxx 
b/oox/source/drawingml/table/tablecellcontext.cxx
index 0e972e3..0c9e9bb 100644
--- a/oox/source/drawingml/table/tablecellcontext.cxx
+++ b/oox/source/drawingml/table/tablecellcontext.cxx
@@ -27,7 +27,6 @@
 
 using namespace ::oox::core;
 using namespace ::com::sun::star;
-using ::rtl::OUString;
 
 namespace oox { namespace drawingml { namespace table {
 
diff --git a/oox/source/drawingml/table/tablecontext.cxx 
b/oox/source/drawingml/table/tablecontext.cxx
index 44a5b2f..15f9776 100644
--- a/oox/source/drawingml/table/tablecontext.cxx
+++ b/oox/source/drawingml/table/tablecontext.cxx
@@ -27,7 +27,6 @@
 
 using namespace ::oox::core;
 using namespace ::com::sun::star;
-using ::rtl::OUString;
 
 namespace oox { namespace drawingml { namespace table {
 
diff --git a/oox/source/drawingml/table/tablepartstylecontext.cxx 
b/oox/source/drawingml/table/tablepartstylecontext.cxx
index 6ba830e..9386fa1 100644
--- a/oox/source/drawingml/table/tablepartstylecontext.cxx
+++ b/oox/source/drawingml/table/tablepartstylecontext.cxx
@@ -27,7 +27,6 @@ using namespace ::oox::core;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;

[Libreoffice-commits] .: oox/source

2012-12-07 Thread Libreoffice Gerrit user
 oox/source/drawingml/diagram/constraintlistcontext.cxx|1 
 oox/source/drawingml/diagram/datamodelcontext.cxx |1 
 oox/source/drawingml/diagram/diagram.cxx  |   29 ++---
 oox/source/drawingml/diagram/diagram.hxx  |   78 +++---
 oox/source/drawingml/diagram/diagramdefinitioncontext.cxx |1 
 oox/source/drawingml/diagram/diagramfragmenthandler.cxx   |3 
 oox/source/drawingml/diagram/diagramfragmenthandler.hxx   |4 
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx   |6 -
 oox/source/drawingml/diagram/diagramlayoutatoms.hxx   |   26 ++--
 oox/source/drawingml/diagram/layoutnodecontext.cxx|1 
 10 files changed, 72 insertions(+), 78 deletions(-)

New commits:
commit a5e6a1faa36c72be6fcc16404f5daa4993d73bce
Author: José Guilherme Vanz 
Date:   Thu Dec 6 21:55:58 2012 -0200

::rtl:: removal in oox

This commit removes some ::rtl:: prefixes on oox

Change-Id: Ibb3be70695c48eb0a02fdf285a0c049e244d613e
Signed-off-by: José Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1259
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/oox/source/drawingml/diagram/constraintlistcontext.cxx 
b/oox/source/drawingml/diagram/constraintlistcontext.cxx
index f1e5076..8bc0e94 100644
--- a/oox/source/drawingml/diagram/constraintlistcontext.cxx
+++ b/oox/source/drawingml/diagram/constraintlistcontext.cxx
@@ -23,7 +23,6 @@
 using namespace ::oox::core;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::xml::sax;
-using ::rtl::OUString;
 
 namespace oox { namespace drawingml {
 
diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx 
b/oox/source/drawingml/diagram/datamodelcontext.cxx
index 1dcee0d..2526be2 100644
--- a/oox/source/drawingml/diagram/datamodelcontext.cxx
+++ b/oox/source/drawingml/diagram/datamodelcontext.cxx
@@ -26,7 +26,6 @@
 using namespace ::oox::core;
 using namespace ::com::sun::star::xml::sax;
 using namespace ::com::sun::star::uno;
-using ::rtl::OUString;
 
 namespace oox { namespace drawingml {
 
diff --git a/oox/source/drawingml/diagram/diagram.cxx 
b/oox/source/drawingml/diagram/diagram.cxx
index 29f28dc..0b7ab56 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -40,7 +40,6 @@
 #include 
 #include 
 
-using rtl::OUString;
 using namespace ::com::sun::star;
 
 namespace oox { namespace drawingml {
@@ -99,9 +98,9 @@ void Diagram::setLayout( const DiagramLayoutPtr & pLayout)
 }
 
 #if OSL_DEBUG_LEVEL > 1
-rtl::OString normalizeDotName( const rtl::OUString& rStr )
+OString normalizeDotName( const OUString& rStr )
 {
-rtl::OUStringBuffer aBuf;
+OUStringBuffer aBuf;
 aBuf.append((sal_Unicode)'N');
 
 const sal_Int32 nLen(rStr.getLength());
@@ -113,12 +112,12 @@ rtl::OString normalizeDotName( const rtl::OUString& rStr )
 aBuf.append((sal_Unicode)aChar);
 }
 
-return rtl::OUStringToOString(aBuf.makeStringAndClear(),
+return OUStringToOString(aBuf.makeStringAndClear(),
   RTL_TEXTENCODING_UTF8);
 }
 #endif
 
-static sal_Int32 calcDepth( const rtl::OUString& rNodeName,
+static sal_Int32 calcDepth( const OUString& rNodeName,
 const dgm::Connections& rCnx )
 {
 // find length of longest path in 'isChild' graph, ending with rNodeName
@@ -166,12 +165,12 @@ void Diagram::build(  )
 
 if( !aCurrPoint->msPresentationLayoutName.isEmpty() )
 output << "label=\""
-   << rtl::OUStringToOString(
+   << OUStringToOString(
aCurrPoint->msPresentationLayoutName,
RTL_TEXTENCODING_UTF8).getStr() << "\", ";
 else
 output << "label=\""
-   << rtl::OUStringToOString(
+   << OUStringToOString(
aCurrPoint->msModelId,
RTL_TEXTENCODING_UTF8).getStr() << "\", ";
 
@@ -200,7 +199,7 @@ void Diagram::build(  )
<< "textNode" << nCount
<< " ["
<< "label=\""
-   << rtl::OUStringToOString(
+   << OUStringToOString(

aCurrPoint->mpShape->getTextBody()->getParagraphs().front()->getRuns().front()->getText(),
RTL_TEXTENCODING_UTF8).getStr()
<< "\"" << "];" << std::endl;
@@ -249,7 +248,7 @@ void Diagram::build(  )
<< " [style=dotted,"
<< ((aCurrCxn->mnType == XML_presOf) ? " color=red, " : 
((aCurrCxn->mnType == XML_presParOf) ? " color=green, " : " "))
<< "label=\""
-   << rtl::OUStringToOString(aCurrCxn->msModelId,
+   << OUStringToOString(aCurrCxn->msModelId,
  RTL_TEXTENCODING_UTF8 
).getStr(

[Libreoffice-commits] .: oox/source

2012-12-06 Thread Libreoffice Gerrit user
 oox/source/drawingml/chart/titlecontext.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f0b22ccfdd94e557b4c3db5e0aea570341d8830c
Author: Kohei Yoshida 
Date:   Thu Dec 6 23:30:42 2012 -0500

bnc#792528: Play it safe for non-Excel documents.

Excel is not the only one that use charts. Let's also store the static
label value to maData in case it is used for non-Excel documents.

Change-Id: I1faed76e2ff396873039bccb3e1b7dcf27aba8c6

diff --git a/oox/source/drawingml/chart/titlecontext.cxx 
b/oox/source/drawingml/chart/titlecontext.cxx
index ea42cb8..7067ef5 100644
--- a/oox/source/drawingml/chart/titlecontext.cxx
+++ b/oox/source/drawingml/chart/titlecontext.cxx
@@ -69,10 +69,13 @@ void TextContext::onCharacters( const OUString& rChars )
 {
 if( isCurrentElement( C_TOKEN( v ) ) )
 {
-// Static text is stored as a single string formula token.
+// Static text is stored as a single string formula token for Excel 
document.
 OUStringBuffer aBuf;
 aBuf.append('"').append(rChars).append('"');
 mrModel.mxDataSeq.create().maFormula = aBuf.makeStringAndClear();
+
+// Also store it as a single element type for non-Excel document.
+mrModel.mxDataSeq->maData[0] <<= rChars;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source sc/source

2012-12-06 Thread Libreoffice Gerrit user
 oox/source/drawingml/chart/titlecontext.cxx |   10 ++-
 sc/source/core/tool/reftokenhelper.cxx  |   91 
 sc/source/ui/unoobj/chart2uno.cxx   |1 
 3 files changed, 48 insertions(+), 54 deletions(-)

New commits:
commit 3a5c3dc392f451f9718ef2fe2076d41bdd9b87ee
Author: Kohei Yoshida 
Date:   Thu Dec 6 14:36:50 2012 -0500

bnc#792528: Import static data series labels from xlsx correctly.

Static data series label is a data series label whose value is a
string value rather than a cell reference.

Also, when inputting static string label in the UI, we don't have
to manually check for quotes; the formula compiler will take care
of that later.

Change-Id: I1657fc9879a7f652bba84898e308c3a5d5ba87a3

diff --git a/oox/source/drawingml/chart/titlecontext.cxx 
b/oox/source/drawingml/chart/titlecontext.cxx
index c05532f..ea42cb8 100644
--- a/oox/source/drawingml/chart/titlecontext.cxx
+++ b/oox/source/drawingml/chart/titlecontext.cxx
@@ -24,6 +24,8 @@
 #include "oox/drawingml/chart/datasourcecontext.hxx"
 #include "oox/drawingml/chart/titlemodel.hxx"
 
+#include "rtl/ustrbuf.hxx"
+
 namespace oox {
 namespace drawingml {
 namespace chart {
@@ -65,9 +67,13 @@ ContextHandlerRef TextContext::onCreateContext( sal_Int32 
nElement, const Attrib
 
 void TextContext::onCharacters( const OUString& rChars )
 {
-// store as single string sequence element
 if( isCurrentElement( C_TOKEN( v ) ) )
-mrModel.mxDataSeq.create().maData[ 0 ] <<= rChars;
+{
+// Static text is stored as a single string formula token.
+OUStringBuffer aBuf;
+aBuf.append('"').append(rChars).append('"');
+mrModel.mxDataSeq.create().maFormula = aBuf.makeStringAndClear();
+}
 }
 
 // 
diff --git a/sc/source/core/tool/reftokenhelper.cxx 
b/sc/source/core/tool/reftokenhelper.cxx
index 92002f4..b59d140 100644
--- a/sc/source/core/tool/reftokenhelper.cxx
+++ b/sc/source/core/tool/reftokenhelper.cxx
@@ -33,25 +33,11 @@ using ::std::vector;
 using ::std::auto_ptr;
 using ::rtl::OUString;
 
-static bool lcl_mayBeRangeConstString( const OUString &aRangeStr )
-{
-if( aRangeStr.getLength() >= 3 && aRangeStr.endsWithAsciiL( "\"", 1 ) )
-{
-if( aRangeStr[0] == '"' )
-return true;
-else if( aRangeStr[0] == '=' && aRangeStr[1] == '"' )
-return true;
-}
-
-return false;
-}
-
 void ScRefTokenHelper::compileRangeRepresentation(
 vector& rRefTokens, const OUString& rRangeStr, ScDocument* 
pDoc,
 const sal_Unicode cSep, FormulaGrammar::Grammar eGrammar)
 {
 const sal_Unicode cQuote = '\'';
-bool bMayBeConstString = lcl_mayBeRangeConstString( rRangeStr );
 
 // #i107275# ignore parentheses
 OUString aRangeStr = rRangeStr;
@@ -77,48 +63,49 @@ void ScRefTokenHelper::compileRangeRepresentation(
 if (!nLen)
 continue;   // Should a missing range really be allowed?
 if (nLen != 1)
+{
 bFailure = true;
-else
+break;
+}
+
+pArray->Reset();
+const FormulaToken* p = pArray->Next();
+if (!p)
 {
-pArray->Reset();
-const FormulaToken* p = pArray->Next();
-if (!p)
+bFailure = true;
+break;
+}
+
+const ScToken* pT = static_cast(p);
+switch (pT->GetType())
+{
+case svSingleRef:
+if (!pT->GetSingleRef().Valid())
+bFailure = true;
+break;
+case svDoubleRef:
+if (!pT->GetDoubleRef().Valid())
+bFailure = true;
+break;
+case svExternalSingleRef:
+if (!pT->GetSingleRef().ValidExternal())
+bFailure = true;
+break;
+case svExternalDoubleRef:
+if (!pT->GetDoubleRef().ValidExternal())
+bFailure = true;
+break;
+case svString:
+if (!pT->GetString().Len())
+bFailure = true;
+break;
+default:
 bFailure = true;
-else
-{
-const ScToken* pT = static_cast(p);
-switch (pT->GetType())
-{
-case svSingleRef:
-if (!pT->GetSingleRef().Valid())
-bFailure = true;
-break;
-case svDoubleRef:
-if (!pT->GetDoubleRef().Valid())
-bFailure = true;
-break;
-case svExternalSingleRef:
-if (!pT->GetSingleRef().ValidExternal())
-bFailure = true;
-break;

[Libreoffice-commits] .: oox/source

2012-12-01 Thread Libreoffice Gerrit user
 oox/source/drawingml/chart/axiscontext.cxx  |1 -
 oox/source/drawingml/chart/axisconverter.cxx|2 --
 oox/source/drawingml/chart/chartconverter.cxx   |2 --
 oox/source/drawingml/chart/chartdrawingfragment.cxx |2 --
 oox/source/drawingml/chart/chartspaceconverter.cxx  |3 ---
 oox/source/drawingml/chart/chartspacefragment.cxx   |2 --
 oox/source/drawingml/chart/converterbase.cxx|1 -
 oox/source/drawingml/chart/datasourcecontext.cxx|1 -
 oox/source/drawingml/chart/datasourceconverter.cxx  |2 --
 oox/source/drawingml/chart/modelbase.cxx|5 -
 oox/source/drawingml/chart/objectformatter.cxx  |5 +
 oox/source/drawingml/chart/plotareaconverter.cxx|2 --
 oox/source/drawingml/chart/seriescontext.cxx|1 -
 oox/source/drawingml/chart/seriesconverter.cxx  |2 --
 oox/source/drawingml/chart/titlecontext.cxx |1 -
 oox/source/drawingml/chart/titleconverter.cxx   |1 -
 oox/source/drawingml/chart/typegroupconverter.cxx   |2 --
 17 files changed, 1 insertion(+), 34 deletions(-)

New commits:
commit 3321acda38866be7bd45e70c0f1e674d093b7f30
Author: Ivan Timofeev 
Date:   Sat Dec 1 19:39:07 2012 +0400

oox: fix build

Change-Id: Ic0fc64b94d27e1de4d2241f960b0d4f3ae1762d3

diff --git a/oox/source/drawingml/chart/axiscontext.cxx 
b/oox/source/drawingml/chart/axiscontext.cxx
index 1b21d78..cf023f2 100644
--- a/oox/source/drawingml/chart/axiscontext.cxx
+++ b/oox/source/drawingml/chart/axiscontext.cxx
@@ -32,7 +32,6 @@ namespace chart {
 
 using ::oox::core::ContextHandlerRef;
 using ::oox::core::ContextHandler2Helper;
-using OUString;
 
 // 
 
diff --git a/oox/source/drawingml/chart/axisconverter.cxx 
b/oox/source/drawingml/chart/axisconverter.cxx
index 97f64d4..bf4b4f8 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -45,8 +45,6 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::chart2;
 using namespace ::com::sun::star::uno;
 
-using OUString;
-
 // 
 
 namespace {
diff --git a/oox/source/drawingml/chart/chartconverter.cxx 
b/oox/source/drawingml/chart/chartconverter.cxx
index 1f46cb8..07226f0 100644
--- a/oox/source/drawingml/chart/chartconverter.cxx
+++ b/oox/source/drawingml/chart/chartconverter.cxx
@@ -27,7 +27,6 @@
 
 using ::oox::drawingml::chart::DataSequenceModel;
 using ::com::sun::star::uno::Any;
-using OUStringBuffer;
 namespace oox {
 namespace drawingml {
 namespace chart {
@@ -41,7 +40,6 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::uno;
 
 using ::oox::core::XmlFilterBase;
-using OUString;
 
 // 
 
diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx 
b/oox/source/drawingml/chart/chartdrawingfragment.cxx
index be7e8b3..be05de9 100644
--- a/oox/source/drawingml/chart/chartdrawingfragment.cxx
+++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx
@@ -36,8 +36,6 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::uno;
 using namespace ::oox::core;
 
-using OUString;
-
 // 
 
 ShapeAnchor::ShapeAnchor( bool bRelSize ) :
diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx 
b/oox/source/drawingml/chart/chartspaceconverter.cxx
index b06d9ae..10e9e6a 100644
--- a/oox/source/drawingml/chart/chartspaceconverter.cxx
+++ b/oox/source/drawingml/chart/chartspaceconverter.cxx
@@ -32,7 +32,6 @@
 #include "oox/drawingml/chart/plotareaconverter.hxx"
 #include "oox/drawingml/chart/titleconverter.hxx"
 
-using OUString;
 using ::com::sun::star::awt::Point;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Exception;
@@ -60,8 +59,6 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 
-using OUString;
-
 // 
 
 ChartSpaceConverter::ChartSpaceConverter( const ConverterRoot& rParent, 
ChartSpaceModel& rModel ) :
diff --git a/oox/source/drawingml/chart/chartspacefragment.cxx 
b/oox/source/drawingml/chart/chartspacefragment.cxx
index c70f591..2e717a8 100644
--- a/oox/source/drawingml/chart/chartspacefragment.cxx
+++ b/oox/source/drawingml/chart/chartspacefragment.cxx
@@ -33,8 +33,6 @@ namespace chart {
 
 using namespace ::oox::core;
 
-using OUString;
-
 // 
 
 ChartSpaceFragment::ChartSpaceFragment( XmlFilterBase& rFilter, const 
OUString& rFragmentPath, ChartSpaceModel& rModel ) :
diff --git a/oox/source/drawingml/chart/converterbase.cxx 
b/oox/source/drawing

[Libreoffice-commits] .: oox/source

2012-12-01 Thread Libreoffice Gerrit user
 oox/source/core/binarycodec.cxx  |   20 ++--
 oox/source/core/filterdetect.cxx |   30 +++---
 oox/source/core/fragmenthandler2.cxx |2 +-
 oox/source/core/xmlfilterbase.cxx|8 
 4 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 1611806226329e5532e6393d0ac2275d7e99eb61
Author: José Guilherme Vanz 
Date:   Fri Nov 30 22:24:01 2012 -0200

Removal ::rtl:: prefixes and macros in oxx

This commit removes some ::rtl:: prefixes and RTL_CONSTASCII_STRINGPARAM,
 RTL_CONSTASCII_USTRINGPARAM macros in oxx.

Change-Id: I12bfb2528e8a9aaf3f119a1e6f0ae0246d16a772
Signed-off-by: José Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1211
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/oox/source/core/binarycodec.cxx b/oox/source/core/binarycodec.cxx
index 70dc48e..04ef753 100644
--- a/oox/source/core/binarycodec.cxx
+++ b/oox/source/core/binarycodec.cxx
@@ -179,15 +179,15 @@ bool BinaryCodec_XOR::initCodec( const uno::Sequence< 
beans::NamedValue >& aData
 bool bResult = sal_False;
 
 ::comphelper::SequenceAsHashMap aHashData( aData );
-uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault( 
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95EncryptionKey" ) ), 
uno::Sequence< sal_Int8 >() );
+uno::Sequence< sal_Int8 > aKey = 
aHashData.getUnpackedValueOrDefault("XOR95EncryptionKey", uno::Sequence< 
sal_Int8 >() );
 
 if ( aKey.getLength() == 16 )
 {
 (void)memcpy( mpnKey, aKey.getConstArray(), 16 );
 bResult = sal_True;
 
-mnBaseKey = (sal_uInt16)aHashData.getUnpackedValueOrDefault( 
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95BaseKey" ) ), (sal_Int16)0 
);
-mnHash = (sal_uInt16)aHashData.getUnpackedValueOrDefault( 
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95PasswordHash" ) ), 
(sal_Int16)0 );
+mnBaseKey = 
(sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95BaseKey", (sal_Int16)0 );
+mnHash = 
(sal_uInt16)aHashData.getUnpackedValueOrDefault("XOR95PasswordHash", 
(sal_Int16)0 );
 }
 else
 OSL_FAIL( "Unexpected key size!\n" );
@@ -198,9 +198,9 @@ bool BinaryCodec_XOR::initCodec( const uno::Sequence< 
beans::NamedValue >& aData
 uno::Sequence< beans::NamedValue > BinaryCodec_XOR::getEncryptionData()
 {
 ::comphelper::SequenceAsHashMap aHashData;
-aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"XOR95EncryptionKey" ) ) ] <<= uno::Sequence( (sal_Int8*)mpnKey, 16 );
-aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "XOR95BaseKey" ) 
) ] <<= (sal_Int16)mnBaseKey;
-aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"XOR95PasswordHash" ) ) ] <<= (sal_Int16)mnHash;
+aHashData[ OUString("XOR95EncryptionKey") ] <<= uno::Sequence( 
(sal_Int8*)mpnKey, 16 );
+aHashData[ OUString("XOR95BaseKey") ] <<= (sal_Int16)mnBaseKey;
+aHashData[ OUString("XOR95PasswordHash") ] <<= (sal_Int16)mnHash;
 
 return aHashData.getAsConstNamedValueList();
 }
@@ -286,12 +286,12 @@ bool BinaryCodec_RCF::initCodec( const uno::Sequence< 
beans::NamedValue >& aData
 bool bResult = sal_False;
 
 ::comphelper::SequenceAsHashMap aHashData( aData );
-uno::Sequence< sal_Int8 > aKey = aHashData.getUnpackedValueOrDefault( 
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97EncryptionKey" ) ), 
uno::Sequence< sal_Int8 >() );
+uno::Sequence< sal_Int8 > aKey = 
aHashData.getUnpackedValueOrDefault("STD97EncryptionKey", uno::Sequence< 
sal_Int8 >() );
 
 if ( aKey.getLength() == RTL_DIGEST_LENGTH_MD5 )
 {
 (void)memcpy( mpnDigestValue, aKey.getConstArray(), 
RTL_DIGEST_LENGTH_MD5 );
-uno::Sequence< sal_Int8 > aUniqueID = 
aHashData.getUnpackedValueOrDefault( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "STD97UniqueID" ) ), uno::Sequence< sal_Int8 >() );
+uno::Sequence< sal_Int8 > aUniqueID = 
aHashData.getUnpackedValueOrDefault("STD97UniqueID", uno::Sequence< sal_Int8 
>() );
 if ( aUniqueID.getLength() == 16 )
 {
 (void)memcpy( mpnUnique, aUniqueID.getConstArray(), 16 );
@@ -309,8 +309,8 @@ bool BinaryCodec_RCF::initCodec( const uno::Sequence< 
beans::NamedValue >& aData
 uno::Sequence< beans::NamedValue > BinaryCodec_RCF::getEncryptionData()
 {
 ::comphelper::SequenceAsHashMap aHashData;
-aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
"STD97EncryptionKey" ) ) ] <<= uno::Sequence< sal_Int8 >( 
(sal_Int8*)mpnDigestValue, RTL_DIGEST_LENGTH_MD5 );
-aHashData[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "STD97UniqueID" ) 
) ] <<= uno::Sequence< sal_Int8 >( (sal_Int8*)mpnUnique, 16 );
+aHashData[ OUString("STD97EncryptionKey") ] <<= uno::Sequence< sal_Int8 >( 
(sal_Int8*)mpnDigestValue, RTL_DIGEST_LENGTH_MD5 );
+aHashData[ OUString("STD97UniqueID") ] <<= uno::Sequence< sal_Int8 >( 
(sal_Int8*)mpnUnique, 16 );
 
 return aHashDa

[Libreoffice-commits] .: oox/source

2012-12-01 Thread Libreoffice Gerrit user
 oox/source/drawingml/chart/axiscontext.cxx  |2 +-
 oox/source/drawingml/chart/axisconverter.cxx|4 ++--
 oox/source/drawingml/chart/chartconverter.cxx   |   10 +-
 oox/source/drawingml/chart/chartdrawingfragment.cxx |2 +-
 oox/source/drawingml/chart/chartspaceconverter.cxx  |4 ++--
 oox/source/drawingml/chart/chartspacefragment.cxx   |2 +-
 oox/source/drawingml/chart/converterbase.cxx|2 +-
 oox/source/drawingml/chart/datasourcecontext.cxx|2 +-
 oox/source/drawingml/chart/datasourceconverter.cxx  |2 +-
 oox/source/drawingml/chart/modelbase.cxx|2 +-
 oox/source/drawingml/chart/objectformatter.cxx  |8 
 oox/source/drawingml/chart/plotareaconverter.cxx|6 +++---
 oox/source/drawingml/chart/seriescontext.cxx|2 +-
 oox/source/drawingml/chart/seriesconverter.cxx  |2 +-
 oox/source/drawingml/chart/titlecontext.cxx |2 +-
 oox/source/drawingml/chart/titleconverter.cxx   |2 +-
 oox/source/drawingml/chart/typegroupconverter.cxx   |2 +-
 17 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit 3066167ff05cc78ac21dbb9173264dda3f91550e
Author: José Guilherme Vanz 
Date:   Fri Nov 30 22:28:09 2012 -0200

Removal ::rtl:: prefixes and macros in oxx

This commit removes some ::rtl:: prefixes and RTL_CONSTASCII_STRINGPARAM,
 RTL_CONSTASCII_USTRINGPARAM macros in oxx.

Change-Id: I1139b10256387bb71e8a425153d46add181538bc
Signed-off-by: José Guilherme Vanz 
Reviewed-on: https://gerrit.libreoffice.org/1212
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/oox/source/drawingml/chart/axiscontext.cxx 
b/oox/source/drawingml/chart/axiscontext.cxx
index 944d09c..1b21d78 100644
--- a/oox/source/drawingml/chart/axiscontext.cxx
+++ b/oox/source/drawingml/chart/axiscontext.cxx
@@ -32,7 +32,7 @@ namespace chart {
 
 using ::oox::core::ContextHandlerRef;
 using ::oox::core::ContextHandler2Helper;
-using ::rtl::OUString;
+using OUString;
 
 // 
 
diff --git a/oox/source/drawingml/chart/axisconverter.cxx 
b/oox/source/drawingml/chart/axisconverter.cxx
index 0371e53..97f64d4 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -45,7 +45,7 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::chart2;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OUString;
+using OUString;
 
 // 
 
@@ -360,4 +360,4 @@ void AxisConverter::convertFromModel( const Reference< 
XCoordinateSystem >& rxCo
 } // namespace drawingml
 } // namespace oox
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:n:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/chartconverter.cxx 
b/oox/source/drawingml/chart/chartconverter.cxx
index 3e7469a..1f46cb8 100644
--- a/oox/source/drawingml/chart/chartconverter.cxx
+++ b/oox/source/drawingml/chart/chartconverter.cxx
@@ -27,7 +27,7 @@
 
 using ::oox::drawingml::chart::DataSequenceModel;
 using ::com::sun::star::uno::Any;
-using ::rtl::OUStringBuffer;
+using OUStringBuffer;
 namespace oox {
 namespace drawingml {
 namespace chart {
@@ -41,7 +41,7 @@ using namespace ::com::sun::star::drawing;
 using namespace ::com::sun::star::uno;
 
 using ::oox::core::XmlFilterBase;
-using ::rtl::OUString;
+using OUString;
 
 // 
 
@@ -60,7 +60,7 @@ static OUString lclGenerateApiString( const OUString& rString 
)
 return OUStringBuffer().append( sal_Unicode( '"' ) ).append( aRetString 
).append( sal_Unicode( '"' ) ).makeStringAndClear();
 }
 
-static ::rtl::OUString lclGenerateApiArray( const Matrix< Any >& rMatrix )
+static OUString lclGenerateApiArray( const Matrix< Any >& rMatrix )
 {
 OSL_ENSURE( !rMatrix.empty(), "ChartConverter::lclGenerateApiArray - 
missing matrix values" );
 OUStringBuffer aBuffer;
@@ -72,7 +72,7 @@ static ::rtl::OUString lclGenerateApiArray( const Matrix< Any 
>& rMatrix )
 for( Matrix< Any >::const_iterator aBeg = rMatrix.row_begin( nRow ), 
aIt = aBeg, aEnd = rMatrix.row_end( nRow ); aIt != aEnd; ++aIt )
 {
 double fValue = 0.0;
-::rtl::OUString aString;
+OUString aString;
 if( aIt != aBeg )
 aBuffer.append( API_TOKEN_ARRAY_COLSEP );
 if( *aIt >>= fValue )
@@ -127,7 +127,7 @@ Reference< XDataSequence > 
ChartConverter::createDataSequence( const Reference<
 Reference< XDataSequence > xDataSeq;
 if( rxDataProvider.is() )
 {
-::rtl::OUString aRangeRep;
+OUString aRangeRep;
 if( !rDataSeq.maData.empty() )
 {
 // create a single-row array from constant source data
diff --git a/oox/

[Libreoffice-commits] .: oox/source

2012-11-30 Thread Libreoffice Gerrit user
 oox/source/export/drawingml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 28315fb6a40dd0f43990272b11037f60d26afda7
Author: Radek Doulik 
Date:   Fri Nov 30 14:18:32 2012 +0100

do not write rotation when it is equal to multiple of 360 degrees

Change-Id: I0338964e8f8ded9ce0c488a437d3bf023d08047a

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 3f141e5..ae9f1b3 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -617,7 +617,7 @@ void DrawingML::WriteTransformation( const Rectangle& rRect,
 mpFS->startElementNS( nXmlNamespace, XML_xfrm,
   XML_flipH, bFlipH ? "1" : NULL,
   XML_flipV, bFlipV ? "1" : NULL,
-  XML_rot, nRotation ? I32S( nRotation ) : NULL,
+  XML_rot, (nRotation % 2160) ? I32S( nRotation ) 
: NULL,
   FSEND );
 
 mpFS->singleElementNS( XML_a, XML_off, XML_x, IS( MM100toEMU( rRect.Left() 
) ), XML_y, IS( MM100toEMU( rRect.Top() ) ), FSEND );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-11-28 Thread Libreoffice Gerrit user
 oox/source/helper/binaryoutputstream.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1f90b032a6d8f2fce49334190e321b81832e3466
Author: Tor Lillqvist 
Date:   Wed Nov 28 22:55:26 2012 +0200

OUString::replace() does not modify in-place

Change-Id: I6fa7c64bdd3c7af4b9495831da063ecd917057de

diff --git a/oox/source/helper/binaryoutputstream.cxx 
b/oox/source/helper/binaryoutputstream.cxx
index 88900f1..3cf66a4 100644
--- a/oox/source/helper/binaryoutputstream.cxx
+++ b/oox/source/helper/binaryoutputstream.cxx
@@ -110,7 +110,7 @@ BinaryOutputStream::writeCharArrayUC( const OUString& 
rString, rtl_TextEncoding
 {
 OString sBuf( OUStringToOString( rString, eTextEnc ) );
 if( !bAllowNulChars )
-sBuf.replace( '\0', '?' );
+sBuf = sBuf.replace( '\0', '?' );
 writeMemory( static_cast< const void* >( sBuf.getStr() ), sBuf.getLength() 
);
 }
 
@@ -119,7 +119,7 @@ BinaryOutputStream::writeUnicodeArray( const 
::rtl::OUString& rString, bool bAll
 {
 OUString sBuf( rString );
 if( !bAllowNulChars )
-sBuf.replace( '\0', '?' );
+sBuf = sBuf.replace( '\0', '?' );
 #ifdef OSL_BIGENDIAN
 // need a non-const buffer for swapping byte order
 sal_Unicode notConst[sBuf.getLength()];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source scripting/source sc/source toolkit/source xmlscript/source

2012-11-16 Thread Libreoffice Gerrit user
 oox/source/ole/axcontrol.cxx|6 --
 oox/source/ole/vbacontrol.cxx   |   10 --
 sc/source/filter/inc/drawingfragment.hxx|2 +-
 sc/source/filter/oox/drawingfragment.cxx|4 
 scripting/source/dlgprov/dlgevtatt.cxx  |6 +++---
 toolkit/source/awt/vclxwindows.cxx  |4 
 toolkit/source/controls/dialogcontrol.cxx   |9 +
 xmlscript/source/xmldlg_imexp/imp_share.hxx |6 +++---
 8 files changed, 12 insertions(+), 35 deletions(-)

New commits:
commit 41c77ac5e814e8f0080468ca79fe7c2473402720
Author: Noel Power 
Date:   Fri Nov 16 17:06:02 2012 +

targetted cleanup of misc. vba pieces.

diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index f2b2bc8..e056fde 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -58,8 +58,6 @@
 namespace oox {
 namespace ole {
 
-// 
-
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
@@ -73,10 +71,6 @@ using namespace ::com::sun::star::style;
 using namespace ::com::sun::star::table;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OUString;
-
-// 
-
 namespace {
 
 const sal_uInt32 COMCTL_ID_SIZE = 0x12344321;
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index 91474c6..5e109b0 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -40,8 +40,6 @@
 namespace oox {
 namespace ole {
 
-// 
-
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::frame;
@@ -49,11 +47,6 @@ using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 
-using ::rtl::OUString;
-using ::rtl::OUStringBuffer;
-
-// 
-
 namespace {
 
 const sal_uInt16 VBA_SITE_CLASSIDINDEX  = 0x8000;
@@ -455,9 +448,6 @@ bool VbaFormControl::convertProperties( const Reference< 
XControlModel >& rxCtrl
 PropertySet aPropSet( rxCtrlModel );
 aPropSet.setProperties( aPropMap );
 
-// bind to control source and row source range
-mxSiteModel->bindToSources( rxCtrlModel, rConv );
-
 // create and convert all embedded controls
 if( !maControls.empty() ) try
 {
diff --git a/sc/source/filter/inc/drawingfragment.hxx 
b/sc/source/filter/inc/drawingfragment.hxx
index e8b1ed7..b34583a 100644
--- a/sc/source/filter/inc/drawingfragment.hxx
+++ b/sc/source/filter/inc/drawingfragment.hxx
@@ -31,9 +31,9 @@
 
 #include 
 #include 
-#include "oox/drawingml/shape.hxx"
 #include "oox/drawingml/shapegroupcontext.hxx"
 #include "oox/ole/axcontrol.hxx"
+#include "oox/drawingml/shape.hxx"
 #include "oox/ole/vbaproject.hxx"
 #include "oox/vml/vmldrawing.hxx"
 #include "oox/vml/vmldrawingfragment.hxx"
diff --git a/sc/source/filter/oox/drawingfragment.cxx 
b/sc/source/filter/oox/drawingfragment.cxx
index afc0ca1..a65c224 100644
--- a/sc/source/filter/oox/drawingfragment.cxx
+++ b/sc/source/filter/oox/drawingfragment.cxx
@@ -49,10 +49,6 @@
 namespace oox {
 namespace xls {
 
-using ::rtl::OUString;
-
-// 
-
 using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::container;
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx 
b/scripting/source/dlgprov/dlgevtatt.cxx
index f202278..40147ca 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -311,12 +311,12 @@ namespace dlgprov
 sal_Int32 nControlCount = aControls.getLength();
 
 Sequence< Reference< XInterface > > aObjects( nControlCount );
-Reference< XInterface >* pObjectsModify = aObjects.getArray();
+Reference< XInterface >* pObjects2 = aObjects.getArray();
 const Reference< XControl >* pControls = 
aControls.getConstArray();
 
-for ( sal_Int32 j = 0; j < nControlCount; ++j )
+for ( sal_Int32 i2 = 0; i2 < nControlCount; ++i2 )
 {
-pObjectsModify[j] = Reference< XInterface >( pControls[j], 
UNO_QUERY );
+pObjects2[i2] = Reference< XInterface >( pControls[i2], 
UNO_QUERY );
 }
 nestedAttachEvents( aObjects, Helper, sDialogCodeName );
 }
diff --git a/toolkit/source/awt/vclxwindows.cxx 
b/toolkit/source/awt/vclxwindows.cxx
index aa69a69..3c97f1d 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/s

[Libreoffice-commits] .: oox/source

2012-11-14 Thread Libreoffice Gerrit user
 oox/source/helper/attributelist.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 1aafcb90209ebdfdeb974fad8bdc28ebfffaa486
Author: Michael Meeks 
Date:   Wed Nov 14 13:37:28 2012 +

oox: reduce exception count reading missing attributes.

diff --git a/oox/source/helper/attributelist.cxx 
b/oox/source/helper/attributelist.cxx
index 40bc8f3..1837942 100644
--- a/oox/source/helper/attributelist.cxx
+++ b/oox/source/helper/attributelist.cxx
@@ -228,6 +228,10 @@ sal_Int32 AttributeList::getToken( sal_Int32 nAttrToken, 
sal_Int32 nDefault ) co
 
 OUString AttributeList::getString( sal_Int32 nAttrToken, const OUString& 
rDefault ) const
 {
+// try to avoid slow exception throw/catch if we can
+if (rDefault.isEmpty())
+return mxAttribs->getOptionalValue( nAttrToken );
+
 try
 {
 return mxAttribs->getValue( nAttrToken );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-11-08 Thread Libreoffice Gerrit user
 oox/source/vml/vmlshape.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 2fd5586337fc7b1048160582abff4aafc6a33902
Author: Luboš Luňák 
Date:   Thu Nov 8 15:59:32 2012 +0100

I hate sal_Int32, episode #1326.

Change-Id: Ibfda2b553bae1ad040f722dde46a352a313218fc

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 3d5eb1f..a70f51f 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -451,10 +451,10 @@ Reference< XShape > SimpleShape::implConvertAndInsert( 
const Reference< XShapes
 PropertySet( xShape ).setAnyProperty( PROP_SizeType, makeAny( 
maTypeModel.mbAutoHeight ? SizeType::MIN : SizeType::FIX ) );
 if( getTextBox()->borderDistanceSet )
 {
-PropertySet( xShape ).setAnyProperty( PROP_LeftBorderDistance, 
makeAny( getTextBox()->borderDistanceLeft ));
-PropertySet( xShape ).setAnyProperty( PROP_TopBorderDistance, 
makeAny( getTextBox()->borderDistanceTop ));
-PropertySet( xShape ).setAnyProperty( PROP_RightBorderDistance, 
makeAny( getTextBox()->borderDistanceRight ));
-PropertySet( xShape ).setAnyProperty( PROP_BottomBorderDistance, 
makeAny( getTextBox()->borderDistanceBottom ));
+PropertySet( xShape ).setAnyProperty( PROP_LeftBorderDistance, 
makeAny( sal_Int32( getTextBox()->borderDistanceLeft )));
+PropertySet( xShape ).setAnyProperty( PROP_TopBorderDistance, 
makeAny( sal_Int32( getTextBox()->borderDistanceTop )));
+PropertySet( xShape ).setAnyProperty( PROP_RightBorderDistance, 
makeAny( sal_Int32( getTextBox()->borderDistanceRight )));
+PropertySet( xShape ).setAnyProperty( PROP_BottomBorderDistance, 
makeAny( sal_Int32( getTextBox()->borderDistanceBottom )));
 }
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-11-05 Thread Libreoffice Gerrit user
 oox/source/ppt/slidefragmenthandler.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9c248f9265747351f32bf52d608a91393bfdf1e2
Author: Tor Lillqvist 
Date:   Mon Nov 5 11:36:27 2012 +0200

bnc#785727: Add more safety checks, exact bug mechanism unclear

Change-Id: Ieef2ce470613f6adfbb134d2bd59f2a6fd4a848d

diff --git a/oox/source/ppt/slidefragmenthandler.cxx 
b/oox/source/ppt/slidefragmenthandler.cxx
index bb1e3e2..789821b 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -178,7 +178,7 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 case A_TOKEN( overrideClrMapping ):
 case PPT_TOKEN( clrMap ):   // CT_ColorMapping
 {
-oox::drawingml::ClrMapPtr pClrMapPtr( ( aElementToken == 
PPT_TOKEN( clrMap ) || !mpSlidePersistPtr.get() ) ? new 
oox::drawingml::ClrMap() : new oox::drawingml::ClrMap( 
*mpSlidePersistPtr->getClrMap() ) );
+oox::drawingml::ClrMapPtr pClrMapPtr( ( aElementToken == 
PPT_TOKEN( clrMap ) || !mpSlidePersistPtr.get() || 
!mpSlidePersistPtr->getClrMap().get() ) ? new oox::drawingml::ClrMap() : new 
oox::drawingml::ClrMap( *mpSlidePersistPtr->getClrMap() ) );
 ContextHandlerRef ret = new oox::drawingml::clrMapContext( *this, 
rAttribs.getFastAttributeList(), *pClrMapPtr );
 mpSlidePersistPtr->setClrMap( pClrMapPtr );
 return ret;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source xmloff/source

2012-10-25 Thread Libreoffice Gerrit user
 oox/source/export/SchXMLSeriesHelper.cxx   |4 +++-
 xmloff/source/chart/SchXMLSeriesHelper.cxx |4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 3e79318d5c58ca44426069b668f315b065fa6376
Author: Christian Lohmaier 
Date:   Thu Oct 25 14:58:03 2012 +0200

WaE: 'xChartType$D57056$_pInterface' may be used uninitialized…

… in this function"
declaring those functions static breaks the build on MacPPC / gcc 4.0.1

Change-Id: I3a389530d51ae0ddd38418159ca4234016bf93ba
Reviewed-on: https://gerrit.libreoffice.org/911
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/oox/source/export/SchXMLSeriesHelper.cxx 
b/oox/source/export/SchXMLSeriesHelper.cxx
index 0d5b034..e91f2ef 100644
--- a/oox/source/export/SchXMLSeriesHelper.cxx
+++ b/oox/source/export/SchXMLSeriesHelper.cxx
@@ -100,7 +100,8 @@ using ::rtl::OUString;
 return aRet;
 }
 
-static uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries(
+namespace {
+uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries(
 const uno::Reference< chart2::XDiagram >&   
xDiagram
   , const Reference< chart2::XDataSeries >& 
xSeries )
 {
@@ -148,6 +149,7 @@ static uno::Reference< chart2::XChartType > 
lcl_getChartTypeOfSeries(
 }
 return 0;
 }
+}
 
 bool SchXMLSeriesHelper::isCandleStickSeries(
   const Reference< chart2::XDataSeries >& xSeries
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx 
b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index 21c1aeb..4a71fd0 100644
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -114,7 +114,8 @@ using ::rtl::OUString;
 return aRet;
 }
 
-static uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries(
+namespace {
+uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries(
 const uno::Reference< chart2::XDiagram >&   
xDiagram
   , const Reference< chart2::XDataSeries >& 
xSeries )
 {
@@ -162,6 +163,7 @@ static uno::Reference< chart2::XChartType > 
lcl_getChartTypeOfSeries(
 }
 return 0;
 }
+}
 
 bool SchXMLSeriesHelper::isCandleStickSeries(
   const Reference< chart2::XDataSeries >& xSeries
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-10-25 Thread Libreoffice Gerrit user
 oox/source/drawingml/textbodypropertiescontext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d6f6086f850720d77b48b06b51e873d90e9ad5ee
Author: Muthu Subramanian 
Date:   Thu Oct 25 16:12:16 2012 +0530

n#773048: Adjust rotate in relation to fix for n#783433

diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx 
b/oox/source/drawingml/textbodypropertiescontext.cxx
index e3c0e1b..273c5cf 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -94,7 +94,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( 
ContextHandler& rParent,
 bool bRtl = aAttribs.getBool( XML_rtl, false );
 sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz );
 if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 
|| tVert == XML_mongolianVert )
-mrTextBodyProp.moRotation = 540*(tVert==XML_vert270?3:1);
+mrTextBodyProp.moRotation = -540*(tVert==XML_vert270?3:1);
 else
 mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
 <<= ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-10-18 Thread Libreoffice Gerrit user
 oox/source/vml/vmlformatting.cxx |   45 ---
 1 file changed, 28 insertions(+), 17 deletions(-)

New commits:
commit 64dc5a0c6d7ef1169fe09a0377106e98f71ce6f7
Author: Pierre-Eric Pelloux-Prayer 
Date:   Fri Oct 5 15:21:21 2012 +0200

Improve vml path parsing to handle repeated commands

Previously commands were executed only when the parser found a
 new command in the stream. Some vml path commands can
handle repeated set of parameters, like this :
   lx1,y1,x2,y2,x3,y3,x1,y1
This patch adds support for this by executing commands when
required parameters count has been met.

Change-Id: Iab31fd267842755b81a3e228e45a8de63505fbd0
Reviewed-on: https://gerrit.libreoffice.org/774
Reviewed-by: Norbert Thiebaud 
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 7051c3a..ed6355b 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -16,7 +16,6 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-
 #include "oox/vml/vmlformatting.hxx"
 
 #include 
@@ -274,6 +273,7 @@ bool lclExtractDouble( double& orfValue, sal_Int32& 
ornEndPos, const OUString& r
 Point aCurrentPoint;
 sal_Int32 nTokenStart = 0;
 sal_Int32 nTokenLen = 0;
+sal_Int32 nParamCount = 0;
 enum VML_State { START, MOVE_REL, MOVE_ABS, BEZIER_REL, BEZIER_ABS,
  LINE_REL, LINE_ABS, CLOSE, END };
 VML_State state = START;
@@ -298,25 +298,32 @@ bool lclExtractDouble( double& orfValue, sal_Int32& 
ornEndPos, const OUString& r
 nTokenLen = 0;
 }
 
+if (rPath[ i ] == ',' )
+{
+nParamCount--;
+}
+
 // Upon finding the next command code, deal with stored
-// coordinates for previous command
-if ( rPath[ i ] != ',' )
+// coordinates for previous command and reset parameters counter 
if needed.
+// See http://www.w3.org/TR/NOTE-VML#_Toc416858382 for params 
count reference
+if ( rPath[ i ] != ',' || nParamCount == 0)
 {
 switch ( state )
 {
-case MOVE_REL:
+case MOVE_REL: // 2* params -> param count reset
 rPointLists.back().push_back( Point( aCoordList[ 0 ], 
aCoordList[ 1 ] ) );
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
 aCurrentPoint = rPointLists.back().back();
+nParamCount = 2 * 2;
 break;
 
-case MOVE_ABS:
+case MOVE_ABS: // 2 params -> no param count reset
 rPointLists.back().push_back( Point( aCoordList[ 0 ], 
aCoordList[ 1 ] ) );
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
 aCurrentPoint = rPointLists.back().back();
 break;
 
-case BEZIER_REL:
+case BEZIER_REL: // 6* params -> param count reset
 rPointLists.back().push_back( Point( aCurrentPoint.X + 
aCoordList[ 0 ],
 aCurrentPoint.Y + aCoordList[ 1 ] 
) );
 rPointLists.back().push_back( Point( aCurrentPoint.X + 
aCoordList[ 2 ],
@@ -327,9 +334,10 @@ bool lclExtractDouble( double& orfValue, sal_Int32& 
ornEndPos, const OUString& r
 rFlagLists.back().push_back( PolygonFlags_CONTROL );
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
 aCurrentPoint = rPointLists.back().back();
+nParamCount = 2 * 6;
 break;
 
-case BEZIER_ABS:
+case BEZIER_ABS: // 6* params -> param count reset
 rPointLists.back().push_back( Point( aCoordList[ 0 ], 
aCoordList[ 1 ] ) );
 rPointLists.back().push_back( Point( aCoordList[ 2 ], 
aCoordList[ 3 ] ) );
 rPointLists.back().push_back( Point( aCoordList[ 4 ], 
aCoordList[ 5 ] ) );
@@ -337,28 +345,31 @@ bool lclExtractDouble( double& orfValue, sal_Int32& 
ornEndPos, const OUString& r
 rFlagLists.back().push_back( PolygonFlags_CONTROL );
 rFlagLists.back().push_back( PolygonFlags_NORMAL );
 aCurrentPoint = rPointLists.back().back();
+nParamCount = 2 * 6;
 break;
 
-case LINE_REL:
+case LINE_REL: // 2* params -> param count reset
 rPointLists.back().push_back( Point( aCurrentPoint.X + 
aCoordList[ 0 ],
 aCurrentPoint.Y + aCoordList[ 1 ] 
) );
 rFlagLists.back().push_back( PolygonF

[Libreoffice-commits] .: oox/source

2012-10-16 Thread Libreoffice Gerrit user
 oox/source/vml/vmlshape.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit b0176f6245b996cdfabdce7ca299b95e4b64bb88
Author: Pierre-Eric Pelloux-Prayer 
Date:   Fri Oct 5 15:30:11 2012 +0200

vml import: only apply width-percent attribute if it's != 0

This fixes an issue with a shape defined with these attributes:
mso-width-percent:0;mso-height-percent:0 and
mso-width-relative:page;mso-height-relative:page;
where all points were then located in (0,0)

Change-Id: I51070ad2b2e4e05ab64f16813472ca1d7099fb09
Reviewed-on: https://gerrit.libreoffice.org/775
Reviewed-by: Petr Mladek 
Tested-by: Petr Mladek 

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index fcc0da5..8d84edd 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -463,7 +463,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( 
const Reference< XShapes
 if ( maTypeModel.maWidthRelative.isEmpty() || 
maTypeModel.maWidthRelative == "page" )
 {
 sal_Int16 nWidth = maTypeModel.maWidthPercent.toInt32() / 10;
-PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, 
makeAny( nWidth ) );
+// Only apply if nWidth != 0
+if ( nWidth )
+PropertySet( xShape ).setAnyProperty(PROP_RelativeWidth, 
makeAny( nWidth ) );
 }
 }
 if ( !maTypeModel.maHeightPercent.isEmpty( ) )
@@ -472,7 +474,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( 
const Reference< XShapes
 if ( maTypeModel.maHeightRelative.isEmpty() || 
maTypeModel.maHeightRelative == "page" )
 {
 sal_Int16 nHeight = maTypeModel.maHeightPercent.toInt32() / 10;
-PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, 
makeAny( nHeight ) );
+// Only apply if nHeight != 0
+if ( nHeight )
+PropertySet( xShape ).setAnyProperty(PROP_RelativeHeight, 
makeAny( nHeight ) );
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-10-13 Thread Libreoffice Gerrit user
 oox/source/drawingml/fillpropertiesgroupcontext.cxx |4 ++--
 oox/source/export/chartexport.cxx   |2 +-
 oox/source/export/drawingml.cxx |4 ++--
 oox/source/ole/axcontrol.cxx|4 ++--
 oox/source/ppt/buildlistcontext.cxx |4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 7518af82eb4b46355ba9a4f7278bac206e3fb360
Author: Miklos Vajna 
Date:   Sat Oct 13 22:35:08 2012 +0200

oox: fix loplugin warnings

Change-Id: I73375f46d31ef7446b7c059aa2a23024e677021c

diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx 
b/oox/source/drawingml/fillpropertiesgroupcontext.cxx
index 5136d9e..ad928cd 100644
--- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx
+++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx
@@ -167,8 +167,8 @@ BlipContext::BlipContext( ContextHandler& rParent,
 else if( aAttribs.hasAttribute( R_TOKEN( link ) ) )
 {
 // external URL
-OUString aRelId = aAttribs.getString( R_TOKEN( link ), OUString() );
-OUString aTargetLink = getFilter().getAbsoluteUrl( 
getRelations().getExternalTargetFromRelId( aRelId ) );
+// OUString aRelId = aAttribs.getString( R_TOKEN( link ), OUString() );
+// OUString aTargetLink = getFilter().getAbsoluteUrl( 
getRelations().getExternalTargetFromRelId( aRelId ) );
 // TODO: load external picture
 }
 }
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 08cc68c..37abe5d 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -731,7 +731,7 @@ void ChartExport::_ExportContent()
 aAny >>= msChartAddress;
 //maExportHelper.SetChartRangeAddress( 
sChartAddress );
 
-OUString sTableNumberList;
+// OUString sTableNumberList;
 aAny = xProp->getPropertyValue(
 OUString("TableNumberList"));
 aAny >>= msTableNumberList;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index db61ef9..6cf2264 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -761,7 +761,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet 
> rRun, sal_Bool bIs
 const char* typeface = NULL;
 const char* pitch = NULL;
 const char* charset = NULL;
-OUString usTypeface, usPitch, usCharset;
+OUString usTypeface;
 
 mAny >>= usTypeface;
 String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | 
SUBSFONT_MS ) );
@@ -781,7 +781,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet 
> rRun, sal_Bool bIs
 const char* typeface = NULL;
 const char* pitch = NULL;
 const char* charset = NULL;
-OUString usTypeface, usPitch, usCharset;
+OUString usTypeface;
 
 mAny >>= usTypeface;
 String aSubstName( GetSubsFontName( usTypeface, SUBSFONT_ONLYONE | 
SUBSFONT_MS ) );
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 9e70cfd..28b49be 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -1856,7 +1856,7 @@ void AxListBoxModel::convertFromProperties( PropertySet& 
rPropSet, const Control
 bool bRes = false;
 if ( rPropSet.getProperty( bRes, PROP_MultiSelection ) )
 
-rConv.convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
+rConv.convertToMSColor( rPropSet, PROP_BackgroundColor, mnBackColor );
 
 rConv.convertToAxBorder( rPropSet, mnBorderColor, mnBorderStyle, 
mnSpecialEffect );
 AxMorphDataModelBase::convertFromProperties( rPropSet, rConv );
@@ -2493,8 +2493,8 @@ HtmlTextBoxModel::HtmlTextBoxModel()
 bool
 HtmlTextBoxModel::importBinaryModel( BinaryInputStream& rInStrm )
 {
-OUString sStringContents = rInStrm.readUnicodeArray( rInStrm.size() );
 #ifdef DEBUG
+OUString sStringContents = rInStrm.readUnicodeArray( rInStrm.size() );
 // in msocximex ( where this is ported from, it appears *nothing* is read
 // from the control stream ), surely there is some useful info there ?
 OSL_TRACE("HtmlTextBoxModel::importBinaryModel - string contents of stream 
:");
diff --git a/oox/source/ppt/buildlistcontext.cxx 
b/oox/source/ppt/buildlistcontext.cxx
index fe85162..b716ebd 100644
--- a/oox/source/ppt/buildlistcontext.cxx
+++ b/oox/source/ppt/buildlistcontext.cxx
@@ -46,7 +46,7 @@ namespace oox { namespace ppt {
 }
 }
 
-::oox::core::ContextHandlerRef BuildListContext::onCreateContext( 
sal_Int32 aElementToken, const AttributeList& rAttribs )
+::oox::core::ContextHandlerRef BuildListContext::onCreateContext( 
sal_Int32 aElementToken, const AttributeList& /*rAttribs*/ )
 {
 switch( aElementToken )
 {
@@ -64,7 +64,7 @@ nam

[Libreoffice-commits] .: oox/source

2012-10-11 Thread Libreoffice Gerrit user
 oox/source/drawingml/textparagraphproperties.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d8628e87e989668ade0045cfd219912c1579b27b
Author: Caolán McNamara 
Date:   Thu Oct 11 12:13:52 2012 +0100

we love you 32bit sal_Int32 as long

Change-Id: I006bceae3d05d2c014beae2127ad8a57c9bee353

diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index 350d09a..edf13fb 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -425,7 +425,7 @@ void TextParagraphProperties::pushToPropSet( const 
::oox::core::XmlFilterBase* p
 {
 // Force Paragraph property as zero - impress seems to use the 
value from previous
 // (non) bullet line if not set to zero explicitly :(
-aPropSet.setProperty( PROP_ParaFirstLineIndent, 0 );
+aPropSet.setProperty( PROP_ParaFirstLineIndent, static_cast< 
sal_Int32>(0) );
 rioBulletMap[ PROP_FirstLineOffset ] <<= static_cast< sal_Int32 >( 
*noFirstLineIndentation );
 noFirstLineIndentation = boost::none;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-10-11 Thread Libreoffice Gerrit user
 oox/source/drawingml/textparagraph.cxx   |7 ---
 oox/source/drawingml/textparagraphproperties.cxx |   19 +--
 2 files changed, 21 insertions(+), 5 deletions(-)

New commits:
commit bb3540a7cb6866a7b6c36cd71ea4bb9b0609d1e8
Author: Muthu Subramanian 
Date:   Thu Oct 11 14:59:33 2012 +0530

n#778854: Fixes quite some issues with bullet points.

* Properties needs to be combined before applyed.
  Rather than applying them separately twice.
* ParaMargins set to zero wrongly rather than boost::none
  This caused its own set of problems.
* Hack: Push default zero to tabstops. This makes impress
  calculate proper values for tabstops using leftmargin.

diff --git a/oox/source/drawingml/textparagraph.cxx 
b/oox/source/drawingml/textparagraph.cxx
index 1b599a6..1119652 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -108,15 +108,16 @@ void TextParagraph::insertAt(
 float fCharacterSize = nCharHeight > 0 ? GetFontHeight( nCharHeight ) 
:  18;
 if ( pTextParagraphStyle.get() )
 {
-pTextParagraphStyle->pushToPropSet( &rFilterBase, xProps, 
aioBulletList, NULL, sal_True, fCharacterSize, true );
+TextParagraphProperties aParaProp;
+aParaProp.apply( *pTextParagraphStyle );
+aParaProp.apply( maProperties );
+aParaProp.pushToPropSet( &rFilterBase, xProps, aioBulletList, 
&pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize, true );
 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 );
 }
 
 // empty paragraphs do not have bullets in ppt
diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index 3cd0bba..350d09a 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "oox/helper/helper.hxx"
 #include "oox/helper/propertyset.hxx"
@@ -418,12 +419,15 @@ void TextParagraphProperties::pushToPropSet( const 
::oox::core::XmlFilterBase* p
 if ( noParaLeftMargin )
 {
 rioBulletMap[ PROP_LeftMargin ] <<= static_cast< sal_Int32 >( 
*noParaLeftMargin );
-noParaLeftMargin = boost::optional< sal_Int32 >( 0 );
+noParaLeftMargin = boost::none;
 }
 if ( noFirstLineIndentation )
 {
+// Force Paragraph property as zero - impress seems to use the 
value from previous
+// (non) bullet line if not set to zero explicitly :(
+aPropSet.setProperty( PROP_ParaFirstLineIndent, 0 );
 rioBulletMap[ PROP_FirstLineOffset ] <<= static_cast< sal_Int32 >( 
*noFirstLineIndentation );
-noFirstLineIndentation = boost::optional< sal_Int32 >( 0 );
+noFirstLineIndentation = boost::none;
 }
 if ( nNumberingType != NumberingType::BITMAP && 
!rioBulletMap.hasProperty( PROP_BulletColor ) && pFilterBase )
 rioBulletMap[ PROP_BulletColor ] <<= static_cast< sal_Int32 >( 
maTextCharacterProperties.maCharColor.getColor( 
pFilterBase->getGraphicHelper()));
@@ -459,7 +463,18 @@ void TextParagraphProperties::pushToPropSet( const 
::oox::core::XmlFilterBase* p
 if ( noParaLeftMargin )
 aPropSet.setProperty( PROP_ParaLeftMargin, sal_Int32( 
*noParaLeftMargin ) );
 if ( noFirstLineIndentation )
+{
 aPropSet.setProperty( PROP_ParaFirstLineIndent, 
*noFirstLineIndentation );
+if( bPushDefaultValues )
+{
+// Reset TabStops - these would be auto calculated by Impress
+TabStop aTabStop;
+aTabStop.Position = 0;
+Sequence< TabStop > aSeq(1);
+aSeq[0] = aTabStop;
+aPropSet.setProperty( PROP_ParaTabStops, aSeq );
+}
+}
 }
 
 float TextParagraphProperties::getCharHeightPoints( float fDefault ) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-10-10 Thread Libreoffice Gerrit user
 oox/source/drawingml/shape.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e1d8f611021d04a0f48101d8416bd0f1ff3eb07c
Author: Radek Doulik 
Date:   Wed Oct 10 17:23:52 2012 +0200

fix text rotation for txXfrm element, fixes n#783433

Change-Id: I82a14170ce8d58184b1a86f7fc0f9e9d93238c92

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index a9f0062..6debbcb 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -562,7 +562,7 @@ Reference< XShape > Shape::createAndInsert(
 if( getTextBody() )
 {
 sal_Int32 nTextRotateAngle = static_cast< sal_Int32 >( 
getTextBody()->getTextProperties().moRotation.get( 0 ) );
-mpCustomShapePropertiesPtr->setTextRotateAngle( 
-nTextRotateAngle / 6 );
+mpCustomShapePropertiesPtr->setTextRotateAngle( 
nTextRotateAngle / 6 );
 }
 
 SAL_INFO("oox", "==cscode== shape name: '" << msName << "'");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-10-09 Thread Libreoffice Gerrit user
 oox/source/ppt/slidefragmenthandler.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4874a0dcbfe56028d5ac7f44bb994837eb003c35
Author: Radek Doulik 
Date:   Tue Oct 9 11:24:28 2012 +0200

added safety check

Change-Id: I05ca3e5b176202d26c2f2e45cc674ea54934a30b

diff --git a/oox/source/ppt/slidefragmenthandler.cxx 
b/oox/source/ppt/slidefragmenthandler.cxx
index b626612..bb1e3e2 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -178,7 +178,7 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 case A_TOKEN( overrideClrMapping ):
 case PPT_TOKEN( clrMap ):   // CT_ColorMapping
 {
-oox::drawingml::ClrMapPtr pClrMapPtr( aElementToken == PPT_TOKEN( 
clrMap ) ? new oox::drawingml::ClrMap() : new oox::drawingml::ClrMap( 
*mpSlidePersistPtr->getClrMap() ) );
+oox::drawingml::ClrMapPtr pClrMapPtr( ( aElementToken == 
PPT_TOKEN( clrMap ) || !mpSlidePersistPtr.get() ) ? new 
oox::drawingml::ClrMap() : new oox::drawingml::ClrMap( 
*mpSlidePersistPtr->getClrMap() ) );
 ContextHandlerRef ret = new oox::drawingml::clrMapContext( *this, 
rAttribs.getFastAttributeList(), *pClrMapPtr );
 mpSlidePersistPtr->setClrMap( pClrMapPtr );
 return ret;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-10-08 Thread Libreoffice Gerrit user
 oox/source/ppt/slidefragmenthandler.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e9960f36675a025c0536dec30ae56c50f4adecb1
Author: Radek Doulik 
Date:   Mon Oct 8 18:03:18 2012 +0200

implement a:overrideClrMapping (fixes n#783202)

Change-Id: Ib6c0fd6d9b64f2bff446f919c58027fea76a00cb

diff --git a/oox/source/ppt/slidefragmenthandler.cxx 
b/oox/source/ppt/slidefragmenthandler.cxx
index 1f7e092..b626612 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -175,9 +175,10 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 }
 break;
 
+case A_TOKEN( overrideClrMapping ):
 case PPT_TOKEN( clrMap ):   // CT_ColorMapping
 {
-oox::drawingml::ClrMapPtr pClrMapPtr( new oox::drawingml::ClrMap() 
);
+oox::drawingml::ClrMapPtr pClrMapPtr( aElementToken == PPT_TOKEN( 
clrMap ) ? new oox::drawingml::ClrMap() : new oox::drawingml::ClrMap( 
*mpSlidePersistPtr->getClrMap() ) );
 ContextHandlerRef ret = new oox::drawingml::clrMapContext( *this, 
rAttribs.getFastAttributeList(), *pClrMapPtr );
 mpSlidePersistPtr->setClrMap( pClrMapPtr );
 return ret;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-10-03 Thread Libreoffice Gerrit user
 oox/source/export/drawingml.cxx |   21 +
 1 file changed, 21 insertions(+)

New commits:
commit fdb42c397f1d15d05a74492a233df72d832cab1c
Author: Noel Power 
Date:   Wed Oct 3 10:04:29 2012 +0100

fix for fdo#55565 regression, failure to export vertical text in shape

Change-Id: If3d6413b1fb9e02dc26f930634f84712d7d08ca3

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index ce9ff77..db61ef9 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1241,6 +1241,27 @@ void DrawingML::WriteText( Reference< XInterface > 
rXIface  )
 }
 }
 
+if ( GETA( CustomShapeGeometry ) )
+{
+Sequence< PropertyValue > aProps;
+if ( mAny >>= aProps )
+{
+for ( sal_Int32 i = 0, nElems = aProps.getLength(); i < nElems; 
++i )
+{
+sal_Int32 nTextRotateAngle = 0;
+if ( aProps[ i ].Name.equals( "TextPreRotateAngle" ) && ( 
aProps[ i ].Value >>= nTextRotateAngle ) )
+{
+if ( nTextRotateAngle == -90 )
+{
+sWritingMode = "vert";
+bVertical = sal_True;
+}
+break;
+}
+}
+}
+}
+
 TextHorizontalAdjust eHorizontalAlignment( TextHorizontalAdjust_CENTER );
 bool bHorizontalCenter = false;
 GET( eHorizontalAlignment, TextHorizontalAdjust );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-09-24 Thread Libreoffice Gerrit user
 oox/source/docprop/ooxmldocpropimport.cxx |   21 +++--
 1 file changed, 7 insertions(+), 14 deletions(-)

New commits:
commit 0671ba1329adf142c26c20a36b4845aea05fe08e
Author: Fridrich Å trba 
Date:   Mon Sep 24 10:51:09 2012 +0200

Revert "fdo#54609: Exception while importing xlsx."

We fixed a root cause of that exception.

This reverts commit 0f0bd022b6f8ae89655a6e47964842086a9beb80.

Conflicts:
oox/source/docprop/ooxmldocpropimport.cxx

Change-Id: Ica3691e967a30722516420997e6e49fbf38f20d2

diff --git a/oox/source/docprop/ooxmldocpropimport.cxx 
b/oox/source/docprop/ooxmldocpropimport.cxx
index e620b0f..9339c53 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -68,7 +68,7 @@ Reference< XInterface > SAL_CALL 
DocumentPropertiesImport_createInstance( const
 
 namespace {
 
-Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (Exception)
+Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (RuntimeException)
 {
 Reference< XRelationshipAccess > xRelation( rxStorage, UNO_QUERY_THROW );
 Reference< XHierarchicalStorageAccess > xHierarchy( rxStorage, 
UNO_QUERY_THROW );
@@ -138,26 +138,19 @@ void SAL_CALL DocumentPropertiesImport::importProperties(
 const Reference< XStorage >& rxSource, const Reference< 
XDocumentProperties >& rxDocumentProperties )
 throw (RuntimeException, IllegalArgumentException, SAXException, 
Exception)
 {
-Sequence< InputSource > aCoreStreams;
-Sequence< InputSource > aExtStreams;
-Sequence< InputSource > aCustomStreams;
-
 if( !mxContext.is() )
 throw RuntimeException();
 
 if( !rxSource.is() || !rxDocumentProperties.is() )
 throw IllegalArgumentException();
 
-try {
-aCoreStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "metadata/core-properties" ) );
-// MS Office seems to have a bug, so we have to do similar handling
-if( !aCoreStreams.hasElements() )
-aCoreStreams = lclGetRelatedStreams( rxSource, 
CREATE_PACKAGE_RELATION_TYPE( "metadata/core-properties" ) );
+Sequence< InputSource > aCoreStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "metadata/core-properties" ) );
+// MS Office seems to have a bug, so we have to do similar handling
+if( !aCoreStreams.hasElements() )
+aCoreStreams = lclGetRelatedStreams( rxSource, 
CREATE_PACKAGE_RELATION_TYPE( "metadata/core-properties" ) );
 
-aExtStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "extended-properties" ) );
-aCustomStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "custom-properties" ) );
-}
-catch(Exception) { }
+Sequence< InputSource > aExtStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "extended-properties" ) );
+Sequence< InputSource > aCustomStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "custom-properties" ) );
 
 if( aCoreStreams.hasElements() || aExtStreams.hasElements() || 
aCustomStreams.hasElements() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-09-20 Thread Libreoffice Gerrit user
 oox/source/vml/vmlshape.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit b5a1db961372b3fa66724ee580726c67e7683dbc
Author: Miklos Vajna 
Date:   Thu Sep 20 16:13:51 2012 +0200

n#779834 fix VML import of absolutely positioned image with no left margin

Given that we talk about mm100, changing 0 to 1 is not that harmful, and
it seems later core would crash without at least a small margin.

Change-Id: I913e4a5eeaba2e36b55f2d7d7fb5bdfbad8eae94

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 0bd3399..fecade9 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -172,8 +172,13 @@ Rectangle ShapeType::getAbsRectangle() const
 if ( nHeight == 0 )
 nHeight = 1;
 
+sal_Int32 nLeft = ConversionHelper::decodeMeasureToHmm( rGraphicHelper, 
maTypeModel.maLeft, 0, true, true )
++ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, 
maTypeModel.maMarginLeft, 0, true, true );
+if (nLeft == 0 && maTypeModel.maPosition == "absolute")
+nLeft = 1;
+
 return Rectangle(
-ConversionHelper::decodeMeasureToHmm( rGraphicHelper, 
maTypeModel.maLeft, 0, true, true ) + ConversionHelper::decodeMeasureToHmm( 
rGraphicHelper, maTypeModel.maMarginLeft, 0, true, true ),
+nLeft,
 ConversionHelper::decodeMeasureToHmm( rGraphicHelper, 
maTypeModel.maTop, 0, false, true ) + ConversionHelper::decodeMeasureToHmm( 
rGraphicHelper, maTypeModel.maMarginTop, 0, false, true ),
 nWidth, nHeight );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-09-20 Thread Libreoffice Gerrit user
 oox/source/export/chartexport.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f3b2fc9be23739cec600b349e6b28b71be9acc3d
Author: Radek Doulik 
Date:   Thu Sep 20 12:46:15 2012 +0200

write only non NaN chart series values (fixes part of n#760997

Change-Id: I7c5bc8b9375a325d4ea78f033f577eff44cfd6e9

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index b51afcf..6519543 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1801,7 +1801,8 @@ void ChartExport::exportSeriesValues( const Reference< 
chart2::data::XDataSequen
 FSEND );
 pFS->startElement( FSNS( XML_c, XML_v ),
 FSEND );
-pFS->write( aValues[i] );
+if (aValues[i] == aValues[i])
+pFS->write( aValues[i] );
 pFS->endElement( FSNS( XML_c, XML_v ) );
 pFS->endElement( FSNS( XML_c, XML_pt ) );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-09-19 Thread Libreoffice Gerrit user
 oox/source/vml/vmlformatting.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 891746ed955b110960113ba0de3a51335af50d66
Author: Miklos Vajna 
Date:   Wed Sep 19 16:00:20 2012 +0200

vml import: WaE (unused variable, unhandled enum value)

Change-Id: Ic59b4a68499bb68619cf72fdc17f5a77186274ae

diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 0d56bc3..7051c3a 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -291,9 +291,7 @@ bool lclExtractDouble( double& orfValue, sal_Int32& 
ornEndPos, const OUString& r
 // Store coordinate from current token
 if ( state != START )
 {
-bool isX = aCoordList.size() % 2 == 0;
 if ( nTokenLen > 0 )
-//aCoordList.push_back(decodeMeasureToHmm( rGraphicHelper, 
rPath.copy(nTokenStart, nTokenLen), 0, isX, true ));
 aCoordList.push_back( rPath.copy( nTokenStart, nTokenLen 
).toInt32() );
 else
 aCoordList.push_back( 0 );
@@ -364,6 +362,9 @@ bool lclExtractDouble( double& orfValue, sal_Int32& 
ornEndPos, const OUString& r
 rPointLists.push_back( ::std::vector< Point >() );
 rFlagLists.push_back( ::std::vector< PolygonFlags >() );
 break;
+
+case START:
+break;
 }
 
 aCoordList.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-09-17 Thread Libreoffice Gerrit user
 oox/source/drawingml/textliststyle.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9057689742c28279bc09844acfd8dbd64d3244d7
Author: Muthu Subramanian 
Date:   Mon Sep 17 22:06:19 2012 +0530

Modifying #ifdef to match header file.

diff --git a/oox/source/drawingml/textliststyle.cxx 
b/oox/source/drawingml/textliststyle.cxx
index 9e77e76..466edf2 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -57,7 +57,7 @@ void TextListStyle::apply( const TextListStyle& 
rTextListStyle )
 applyStyleList( rTextListStyle.getListStyle(), getListStyle() );
 }
 
-#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 2
+#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 1
 void TextListStyle::dump() const
 {
 for ( int i = 0; i < 9; i++ )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-09-13 Thread Libreoffice Gerrit user
 oox/source/docprop/ooxmldocpropimport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9748670e040e993d66eb777225772e62d0ca2b4e
Author: Muthu Subramanian 
Date:   Thu Sep 13 19:45:48 2012 +0530

fdo#54750: Handle any kind of exception (ooxml import).

This is very similar to fdo#54609 - so changed it to
throw a generic Exception.

diff --git a/oox/source/docprop/ooxmldocpropimport.cxx 
b/oox/source/docprop/ooxmldocpropimport.cxx
index 9e513a2..e620b0f 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -68,7 +68,7 @@ Reference< XInterface > SAL_CALL 
DocumentPropertiesImport_createInstance( const
 
 namespace {
 
-Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (RuntimeException, 
IllegalArgumentException)
+Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (Exception)
 {
 Reference< XRelationshipAccess > xRelation( rxStorage, UNO_QUERY_THROW );
 Reference< XHierarchicalStorageAccess > xHierarchy( rxStorage, 
UNO_QUERY_THROW );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-09-11 Thread Libreoffice Gerrit user
 oox/source/docprop/ooxmldocpropimport.cxx |   21 ++---
 1 file changed, 14 insertions(+), 7 deletions(-)

New commits:
commit 0f0bd022b6f8ae89655a6e47964842086a9beb80
Author: Muthu Subramanian 
Date:   Tue Sep 11 12:44:44 2012 +0530

fdo#54609: Exception while importing xlsx.

* Handle any exception thrown during document properties
  import. This is not so critical so as to stop the import.
  We anyways check for hasElements().
* Also lclGetRelatedStreams might throw IllegalArgumentException

diff --git a/oox/source/docprop/ooxmldocpropimport.cxx 
b/oox/source/docprop/ooxmldocpropimport.cxx
index 9339c53..9e513a2 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -68,7 +68,7 @@ Reference< XInterface > SAL_CALL 
DocumentPropertiesImport_createInstance( const
 
 namespace {
 
-Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (RuntimeException)
+Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& 
rxStorage, const OUString& rStreamType ) throw (RuntimeException, 
IllegalArgumentException)
 {
 Reference< XRelationshipAccess > xRelation( rxStorage, UNO_QUERY_THROW );
 Reference< XHierarchicalStorageAccess > xHierarchy( rxStorage, 
UNO_QUERY_THROW );
@@ -138,19 +138,26 @@ void SAL_CALL DocumentPropertiesImport::importProperties(
 const Reference< XStorage >& rxSource, const Reference< 
XDocumentProperties >& rxDocumentProperties )
 throw (RuntimeException, IllegalArgumentException, SAXException, 
Exception)
 {
+Sequence< InputSource > aCoreStreams;
+Sequence< InputSource > aExtStreams;
+Sequence< InputSource > aCustomStreams;
+
 if( !mxContext.is() )
 throw RuntimeException();
 
 if( !rxSource.is() || !rxDocumentProperties.is() )
 throw IllegalArgumentException();
 
-Sequence< InputSource > aCoreStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "metadata/core-properties" ) );
-// MS Office seems to have a bug, so we have to do similar handling
-if( !aCoreStreams.hasElements() )
-aCoreStreams = lclGetRelatedStreams( rxSource, 
CREATE_PACKAGE_RELATION_TYPE( "metadata/core-properties" ) );
+try {
+aCoreStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "metadata/core-properties" ) );
+// MS Office seems to have a bug, so we have to do similar handling
+if( !aCoreStreams.hasElements() )
+aCoreStreams = lclGetRelatedStreams( rxSource, 
CREATE_PACKAGE_RELATION_TYPE( "metadata/core-properties" ) );
 
-Sequence< InputSource > aExtStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "extended-properties" ) );
-Sequence< InputSource > aCustomStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "custom-properties" ) );
+aExtStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "extended-properties" ) );
+aCustomStreams = lclGetRelatedStreams( rxSource, 
CREATE_OFFICEDOC_RELATION_TYPE( "custom-properties" ) );
+}
+catch(Exception) { }
 
 if( aCoreStreams.hasElements() || aExtStreams.hasElements() || 
aCustomStreams.hasElements() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-09-07 Thread Libreoffice Gerrit user
 oox/source/vml/vmlshape.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 711958d8afcf7704b19e8f656aeac3cd7569e0f5
Author: Pierre-Eric Pelloux-Prayer 
Date:   Wed Sep 5 10:17:27 2012 +0200

Fix docx 'absolute' frame position import

Frames with absolute position style must be vertically placed relative
to 'Margin', otherwise parent paragraph style may modify their Y coord.

Change-Id: Ifae8f73ad9c6aa98b67283663cfc37dd847ff095
Reviewed-on: https://gerrit.libreoffice.org/561
Reviewed-by: Luboš Luňák 
Tested-by: Luboš Luňák 

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index a32030b..759947a 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -384,8 +384,12 @@ void lcl_SetAnchorType(PropertySet& rPropSet, const 
ShapeTypeModel& rTypeModel)
 rPropSet.setProperty(PROP_AnchorType, 
text::TextContentAnchorType_AT_PAGE);
 }
 else
+{
 // Map to as-character by default, that fixes vertical position of 
some textframes.
 rPropSet.setProperty(PROP_AnchorType, 
text::TextContentAnchorType_AT_CHARACTER);
+}
+// Vertical placement relative to margin, because parent style must 
not modify vertical position
+rPropSet.setProperty(PROP_VertOrientRelation, 
text::RelOrientation::FRAME);
 }
 else if( rTypeModel.maPosition == "relative" )
 {   // I'm not very sure this is correct either.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-08-21 Thread Libreoffice Gerrit user
 oox/source/drawingml/textparagraph.cxx |6 --
 1 file changed, 6 deletions(-)

New commits:
commit f2b1841ae3f082921ea0db44a0e6d4d7b0d92041
Author: Felix Zhang 
Date:   Sat Jun 16 00:00:02 2012 +0800

n760019: removing problematic code that disrupts numbering level

Change-Id: Idb997e672e4f997ad324bdb5d49ab7dae4a9e9e9

diff --git a/oox/source/drawingml/textparagraph.cxx 
b/oox/source/drawingml/textparagraph.cxx
index a47a5d5..1b599a6 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -125,12 +125,6 @@ void TextParagraph::insertAt(
 const OUString sNumberingLevel( CREATE_OUSTRING( "NumberingLevel" 
) );
 xProps->setPropertyValue( sNumberingLevel, Any( static_cast< 
sal_Int16 >( -1 ) ) );
 }
-else if ( nLevel > 1 )
-{
-// Even more UGLY HACK
-const OUString sNumberingLevel( CREATE_OUSTRING( "NumberingLevel" 
) );
-xProps->setPropertyValue( sNumberingLevel, Any( static_cast< 
sal_Int16 >( nLevel-1 ) ) );
-}
 
 // FIXME this is causing a lot of dispruption (ie does not work). I wonder 
what to do -- Hub
 //  Reference< XTextRange > xEnd( xAt, UNO_QUERY );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-08-21 Thread Libreoffice Gerrit user
 oox/source/drawingml/table/tablecell.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 309658bd85fd21daade42be1f1909d944a1e8c20
Author: Muthu Subramanian 
Date:   Fri Aug 17 16:13:56 2012 +0530

Reverting superfluous commit 36233b158b5de6c474f06c8c8772f0012b191baa

w.r.t David Tardon's suggestion, table cell now always has
textbody. commit: 772699ac1f2375c33f0819ebb127555d3178c4e5
Hence reverting this.

diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index 7675c10..c89a4f9 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -358,8 +358,7 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, ::oo
 aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() );
 PropertySet( xPropSet ).setProperties( aPropMap );
 
-if( getTextBody() )
-getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, 
pMasterTextListStyle );
+getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, 
pMasterTextListStyle );
 }
 
 } } }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] .: oox/source

2012-08-16 Thread David Tardon
Hi,

On Tue, Aug 07, 2012 at 03:42:11AM -0700, Muthu Subramanian wrote:
>  oox/source/drawingml/table/tablecell.cxx |3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> New commits:
> commit 36233b158b5de6c474f06c8c8772f0012b191baa
> Author: Muthu Subramanian 
> Date:   Tue Aug 7 16:14:13 2012 +0530
> 
> n#774167: Crash fix.
> 
> diff --git a/oox/source/drawingml/table/tablecell.cxx 
> b/oox/source/drawingml/table/tablecell.cxx
> index c89a4f9..7675c10 100644
> --- a/oox/source/drawingml/table/tablecell.cxx
> +++ b/oox/source/drawingml/table/tablecell.cxx
> @@ -358,7 +358,8 @@ void TableCell::pushToXCell( const 
> ::oox::core::XmlFilterBase& rFilterBase, ::oo
>  aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() 
> );
>  PropertySet( xPropSet ).setProperties( aPropMap );
>  
> -getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, 
> pMasterTextListStyle );
> +if( getTextBody() )
> +getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, 
> pMasterTextListStyle );
>  }
>  
>  } } }

This test is superfluous after commit
772699ac1f2375c33f0819ebb127555d3178c4e5 (that is already in 3.6.1),
because a TableCell always has a TextBody now.

D.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-08-15 Thread Radek Doulík
 oox/source/export/shapes.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit de77d83c15be81a194cb98f6470e52369ad578f6
Author: Radek Doulik 
Date:   Wed Aug 15 13:39:16 2012 +0200

use a namespace for xfrm transformation element, fixes part of fdo#41992

Change-Id: I3872028e4204ae5f72942b7345bf881ef3a96752

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 7a401b6..f465044 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -948,7 +948,7 @@ ShapeExport& ShapeExport::WriteConnectorShape( Reference< 
XShape > xShape )
 
 // visual shape properties
 pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
-WriteTransformation( aRect, mnXmlNamespace, bFlipH, bFlipV );
+WriteTransformation( aRect, XML_a, bFlipH, bFlipV );
 // TODO: write adjustments (ppt export doesn't work well there either)
 WritePresetShape( sGeometry );
 Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-08-15 Thread Radek Doulík
 oox/source/export/shapes.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 57e8f53e4f6ecfbedef4d2922935a7f7b2f467b3
Author: Radek Doulik 
Date:   Wed Aug 15 13:33:21 2012 +0200

call WriteTransformation with namespace id, fixes part of fdo#41992

Change-Id: Ifb4a78bfc3c47788503da5b7d74f356343a7cbf8

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index e84e5aa..7a401b6 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -948,7 +948,7 @@ ShapeExport& ShapeExport::WriteConnectorShape( Reference< 
XShape > xShape )
 
 // visual shape properties
 pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
-WriteTransformation( aRect, bFlipH, bFlipV );
+WriteTransformation( aRect, mnXmlNamespace, bFlipH, bFlipV );
 // TODO: write adjustments (ppt export doesn't work well there either)
 WritePresetShape( sGeometry );
 Reference< XPropertySet > xShapeProps( xShape, UNO_QUERY );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-08-07 Thread Muthu Subramanian
 oox/source/drawingml/table/tablecell.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 36233b158b5de6c474f06c8c8772f0012b191baa
Author: Muthu Subramanian 
Date:   Tue Aug 7 16:14:13 2012 +0530

n#774167: Crash fix.

diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index c89a4f9..7675c10 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -358,7 +358,8 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, ::oo
 aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() );
 PropertySet( xPropSet ).setProperties( aPropMap );
 
-getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, 
pMasterTextListStyle );
+if( getTextBody() )
+getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, 
pMasterTextListStyle );
 }
 
 } } }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-08-01 Thread Stephan Bergmann
 oox/source/helper/propertymap.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e3c2e0fab67bbb812e8c693aab987fb5c374e5e0
Author: Stephan Bergmann 
Date:   Wed Aug 1 16:51:39 2012 +0200

-Werror,-Wformat

Change-Id: Ie6fbcb1a11f47b54d3c697716b03f9891a1dea49

diff --git a/oox/source/helper/propertymap.cxx 
b/oox/source/helper/propertymap.cxx
index 445125e..a7bace4 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -342,9 +342,9 @@ static void lclDumpAnyValue( Any value)
 } else if( value >>= aMatrix ) {
 fprintf (stderr,"Matrix\n%f %f %f\n%f %f %f\n%f %f %f\n", 
aMatrix.Line1.Column1, aMatrix.Line1.Column2, aMatrix.Line1.Column3, 
aMatrix.Line2.Column1, aMatrix.Line2.Column2, aMatrix.Line2.Column3, 
aMatrix.Line3.Column1, aMatrix.Line3.Column2, aMatrix.Line3.Column3);
 } else if( value >>= intValue )
-fprintf (stderr,"%d(hex: %x)\n", intValue, intValue);
+fprintf (stderr,"%" SAL_PRIdINT32 "(hex: %" 
SAL_PRIxUINT32 ")\n", intValue, intValue);
 else if( value >>= uintValue )
-fprintf (stderr,"%d(hex: %x)\n", uintValue, uintValue);
+fprintf (stderr,"%" SAL_PRIuUINT32 "(hex: %" 
SAL_PRIxUINT32 ")\n", uintValue, uintValue);
 else if( value >>= int16Value )
 fprintf (stderr,"%d(hex: %x)\n", int16Value, 
int16Value);
 else if( value >>= uint16Value )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-07-23 Thread Stephan Bergmann
 oox/source/dump/dumperbase.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6aff9717426db96f41ab04cd96da2b5d074625e1
Author: Stephan Bergmann 
Date:   Mon Jul 23 10:28:03 2012 +0200

Bogus warning C4701: potentially uninitialized local variable

Change-Id: I51caaca911f71788940260bd63d3854526d7473f

diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 20ecbc5..0e48615 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -332,7 +332,7 @@ void StringHelper::appendHex( OUStringBuffer& rStr, 
sal_Int64 nData, bool bPrefi
 static sal_uInt64
 lcl_ConvertDouble(double const f)
 {
-sal_uInt64 i;
+sal_uInt64 i = sal_uInt64();
 for (size_t j = 0; j < sizeof(double); ++j)
 {   // hopefully both endian independent and strict aliasing safe
 reinterpret_cast(&i)[j] = reinterpret_cast(&f)[j];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-07-10 Thread Muthu Subramanian
 oox/source/ppt/slidefragmenthandler.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 752c83258899be8b3541e25933905393b9c38698
Author: Muthu Subramanian 
Date:   Tue Jul 10 19:39:36 2012 +0530

Crash fix.

Though getTheme() is not supposed to be returning NULL.
It seems like doing that sometimes.

diff --git a/oox/source/ppt/slidefragmenthandler.cxx 
b/oox/source/ppt/slidefragmenthandler.cxx
index 29954f6..1b34a1a 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -174,7 +174,9 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 
 case PPT_TOKEN( bgRef ):// a:CT_StyleMatrixReference
 {
-const FillProperties *pFillProperties = 
mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) 
);
+const FillProperties *pFillProperties = NULL;
+if( mpSlidePersistPtr->getTheme() )
+pFillProperties = mpSlidePersistPtr->getTheme()->getFillStyle( 
rAttribs.getInteger( XML_idx, -1 ) );
 FillPropertiesPtr pFillPropertiesPtr( pFillProperties ? new 
FillProperties( *pFillProperties ) : new FillProperties() );
 ContextHandlerRef ret = new ColorContext( *this, 
mpSlidePersistPtr->getBackgroundColor() );
 mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-07-04 Thread David Tardon
 oox/source/ppt/slidefragmenthandler.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 711976fbd0da490ef0d7a9bf45a44eeb1dfb9e7c
Author: David Tardon 
Date:   Thu Jul 5 06:57:06 2012 +0200

remove forgotten debug printf

Change-Id: Iff5a53735d78a2afcf90299a5f28a47f1376e393

diff --git a/oox/source/ppt/slidefragmenthandler.cxx 
b/oox/source/ppt/slidefragmenthandler.cxx
index 2b010be..29954f6 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -98,7 +98,6 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 // Import notesMaster
 PowerPointImport& rFilter = dynamic_cast< PowerPointImport& >( 
getFilter() );
 OUString aNotesFragmentPath = getFragmentPathFromFirstType( 
CREATE_OFFICEDOC_RELATION_TYPE( "notesMaster" ) );
-printf("notesMaster: %s\n", 
::rtl::OUStringToOString(aNotesFragmentPath, RTL_TEXTENCODING_UTF8).getStr() );
 
 std::vector< SlidePersistPtr >& rMasterPages( rFilter.getMasterPages() 
);
 std::vector< SlidePersistPtr >::iterator aIter( rMasterPages.begin() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-07-04 Thread Muthu Subramanian
 oox/source/ppt/pptshape.cxx |4 +++
 oox/source/ppt/pptshapecontext.cxx  |   17 ++-
 oox/source/ppt/slidefragmenthandler.cxx |   35 
 3 files changed, 51 insertions(+), 5 deletions(-)

New commits:
commit 37f6fc4933769cb031b63d607a607a42654732f0
Author: Muthu Subramanian 
Date:   Wed Jul 4 20:56:47 2012 +0530

n#768027: Slide notesMaster and notes import.

diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 1456fbb..bbe12cb 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -289,6 +289,10 @@ void PPTShape::addShape(
 // use placeholder index if possible
 if( mnSubType && getSubTypeIndex().has() && 
rSlidePersist.getMasterPersist().get() ) {
 oox::drawingml::ShapePtr pPlaceholder = 
PPTShape::findPlaceholderByIndex( getSubTypeIndex().get(), 
rSlidePersist.getMasterPersist()->getShapes()->getChildren() );
+// TODO: Check if this is required for non-notes slides as 
well...
+if( rSlidePersist.isNotesPage() && pPlaceholder.get() && 
pPlaceholder->getSubType() != getSubType() )
+pPlaceholder.reset();
+
 if( pPlaceholder.get()) {
 OSL_TRACE("found placeholder with index: %d and type: %s", 
getSubTypeIndex().get(), lclDebugSubType( mnSubType ));
 }
diff --git a/oox/source/ppt/pptshapecontext.cxx 
b/oox/source/ppt/pptshapecontext.cxx
index 0333f5a..c301f23 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -65,14 +65,17 @@ PPTShapeContext::PPTShapeContext( ContextHandler& rParent, 
const SlidePersistPtr
 oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, 
const OptValue< sal_Int32 >& oSubTypeIndex, std::vector< 
oox::drawingml::ShapePtr >& rShapes )
 {
 oox::drawingml::ShapePtr aShapePtr;
-oox::drawingml::ShapePtr aTmpShapePtr;
+oox::drawingml::ShapePtr aChoiceShapePtr1;
+oox::drawingml::ShapePtr aChoiceShapePtr2;
 std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( 
rShapes.rbegin() );
 while( aRevIter != rShapes.rend() )
 {
 if ( (*aRevIter)->getSubType() == nMasterPlaceholder )
 {
-if( !oSubTypeIndex.has() && aTmpShapePtr == NULL )
-aTmpShapePtr = *aRevIter;
+if( !oSubTypeIndex.has() && aChoiceShapePtr1 == NULL )
+aChoiceShapePtr1 = *aRevIter;
+else if( aChoiceShapePtr2 == NULL )
+aChoiceShapePtr2 = *aRevIter;
 if( (*aRevIter)->getSubTypeIndex() == oSubTypeIndex )
 {
 aShapePtr = *aRevIter;
@@ -86,7 +89,7 @@ oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 
nMasterPlaceholder, co
 ++aRevIter;
 }
 if( aShapePtr == NULL )
-return aTmpShapePtr;
+return aChoiceShapePtr1 ? aChoiceShapePtr1 : aChoiceShapePtr2;
 return aShapePtr;
 }
 
@@ -185,9 +188,13 @@ Reference< XFastContextHandler > 
PPTShapeContext::createFastChildContext( sal_In
   if ( pMasterPersist.get() ) {
   if( 
pPPTShapePtr->getSubTypeIndex().has() )
   pPlaceholder = 
PPTShape::findPlaceholderByIndex( pPPTShapePtr->getSubTypeIndex().get(), 
pMasterPersist->getShapes()->getChildren() );
-  if ( !pPlaceholder.get() )
+  // TODO: Check if this is required for 
non-notes pages as well...
+  if ( !pPlaceholder.get() || ( 
pMasterPersist->isNotesPage() && pPlaceholder->getSubType() != 
nFirstPlaceholder &&
+   
  pPlaceholder->getSubType() != nSecondPlaceholder ) )
+  {
   pPlaceholder = findPlaceholder( 
nFirstPlaceholder, nSecondPlaceholder,
   
pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
+  }
   }
   }
   if ( pPlaceholder.get() )
diff --git a/oox/source/ppt/slidefragmenthandler.cxx 
b/oox/source/ppt/slidefragmenthandler.cxx
index 952a57c..2b010be 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -45,6 +45,7 @@
 #include "oox/vml/vmldrawing.hxx"
 #include "oox/vml/vmldrawingfragment.hxx"
 #include "oox/drawingml/clrschemecontext.hxx"
+#include "oox/ppt/pptimport.hxx"
 
 
 using rtl::OUString;
@@ -93,6 +94,40 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 return this;
 }
 case PPT_TOKEN( notes ):// CT_NotesSli

[Libreoffice-commits] .: oox/source

2012-06-24 Thread Julien Nabet
 oox/source/vml/vmlshapecontext.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 750a9c408f9a2bd1454f567ca1fcbb6381be1570
Author: Julien Nabet 
Date:   Sun Jun 24 10:46:45 2012 +0200

Fix consecutive break

Change-Id: Ifd5dddee6950bcc08dc48c17293e794bf5aeb48e

diff --git a/oox/source/vml/vmlshapecontext.cxx 
b/oox/source/vml/vmlshapecontext.cxx
index 98e759d..28ace31 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -334,7 +334,6 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( 
sal_Int32 nElement, const A
 mrTypeModel.moWrapAnchorX = rAttribs.getString(XML_anchorx);
 mrTypeModel.moWrapAnchorY = rAttribs.getString(XML_anchory);
 break;
-break;
 }
 return 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-06-21 Thread Radek Doulík
 oox/source/export/drawingml.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 7279610bbd403fbbb12a894d334a6ec4ba259600
Author: Radek Doulik 
Date:   Thu Jun 21 12:02:57 2012 +0200

make sure we don't export shapes with negative size (fixes n#760997)

Change-Id: Id77cbfaa287d15c4af9a91976f3b091e68229223

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index f2c28e9..b6e67c8 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -635,6 +635,11 @@ void DrawingML::WriteShapeTransformation( Reference< 
XShape > rXShape, sal_Int32
 awt::Point aPos = rXShape->getPosition();
 awt::Size aSize = rXShape->getSize();
 
+if ( aSize.Width < 0 )
+aSize.Width = 1000;
+if ( aSize.Height < 0 )
+aSize.Height = 1000;
+
 WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( 
aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, nRotation );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-06-20 Thread Miklos Vajna
 oox/source/vml/vmlshape.cxx |   38 +++---
 1 file changed, 23 insertions(+), 15 deletions(-)

New commits:
commit f3ed8b8b152a16e8a6a8f11587ebd74c6dadad60
Author: Miklos Vajna 
Date:   Wed Jun 20 15:41:57 2012 +0200

oox: mso-wrap-style is about wrapping mode for text in shapes

This commit partially reverts 9e8957de203bb9abb208516ad32aee9527feb67b
(as it interpreted mso-wrap-style as the wrap type of the textbox
itself, not the wrap type of the contained text) and also extends the
effect of commit 0016757efef898205452a586ba5927e5d11fdabe to the
SimpleShape class as well.

Change-Id: If2bded6ad94f2866e8ea398ff0f2792e8c8e86b0

diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index d0984ab..4f0f952 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -381,6 +381,25 @@ SimpleShape::SimpleShape( Drawing& rDrawing, const 
OUString& rService ) :
 {
 }
 
+void lcl_SetAnchorType(PropertySet& rPropSet, const ShapeTypeModel& rTypeModel)
+{
+if ( rTypeModel.maPosition == "absolute" )
+{
+// I'm not sure if AT_PAGE is always correct here (not sure what the 
parent that
+// the spec talks about can be), but with Writer SwXDrawPage::add()
+// always in practice uses this because of pDoc->GetCurrentLayout() 
being NULL at this point.
+rPropSet.setProperty(PROP_AnchorType, 
text::TextContentAnchorType_AT_PAGE);
+}
+else if( rTypeModel.maPosition == "relative" )
+{   // I'm not very sure this is correct either.
+rPropSet.setProperty(PROP_AnchorType, 
text::TextContentAnchorType_AT_PARAGRAPH);
+}
+else // static (is the default) means anchored inline
+{
+rPropSet.setProperty(PROP_AnchorType, 
text::TextContentAnchorType_AS_CHARACTER);
+}
+}
+
 Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< 
XShapes >& rxShapes, const Rectangle& rShapeRect ) const
 {
 Rectangle aShapeRect(rShapeRect);
@@ -417,17 +436,16 @@ Reference< XShape > SimpleShape::implConvertAndInsert( 
const Reference< XShapes
 PropertySet( xShape ).setProperty( PROP_LegacyFragment, xInStrm );
 }
 
+PropertySet aPropertySet(xShape);
 if (xShape.is() && !maTypeModel.maRotation.isEmpty())
 {
-PropertySet aPropertySet(xShape);
 aPropertySet.setAnyProperty(PROP_RotateAngle, 
makeAny(maTypeModel.maRotation.toInt32() * 100));
 // If rotation is used, simple setPosition() is not enough.
 aPropertySet.setAnyProperty(PROP_HoriOrientPosition, makeAny( 
aShapeRect.X ) );
 aPropertySet.setAnyProperty(PROP_VertOrientPosition, makeAny( 
aShapeRect.Y ) );
 }
 
-if (xShape.is() && maTypeModel.maWrapStyle == "none")
-PropertySet(xShape).setAnyProperty(PROP_AnchorType, 
makeAny(text::TextContentAnchorType_AS_CHARACTER));
+lcl_SetAnchorType(aPropertySet, maTypeModel);
 
 return xShape;
 }
@@ -611,20 +629,10 @@ Reference< XShape > ComplexShape::implConvertAndInsert( 
const Reference< XShapes
 aPropSet.setProperty(PROP_HoriOrientPosition, rShapeRect.X);
 aPropSet.setProperty(PROP_VertOrientPosition, rShapeRect.Y);
 aPropSet.setProperty(PROP_Opaque, sal_False);
-// I'm not sure if AT_PAGE is always correct here (not sure 
what the parent that
-// the spec talks about can be), but with Writer 
SwXDrawPage::add()
-// always in practice uses this because of 
pDoc->GetCurrentLayout() being NULL at this point.
-aPropSet.setProperty(PROP_AnchorType, 
text::TextContentAnchorType_AT_PAGE);
-}
-else if( maTypeModel.maPosition == "relative" )
-{   // I'm not very sure this is correct either.
-aPropSet.setProperty(PROP_AnchorType, 
text::TextContentAnchorType_AT_PARAGRAPH);
-}
-else // static (is the default) means anchored inline
-{
-aPropSet.setProperty(PROP_AnchorType, 
text::TextContentAnchorType_AS_CHARACTER);
 }
 
+lcl_SetAnchorType(aPropSet, maTypeModel);
+
 if ( maTypeModel.maPositionVerticalRelative == "page" )
 {
 aPropSet.setProperty(PROP_VertOrientRelation, 
text::RelOrientation::PAGE_FRAME);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-06-14 Thread Miklos Vajna
 oox/source/shape/ShapeContextHandler.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e5fdaa259157c062b5481226e54e6a02bfbeca0d
Author: Luboš Luňák 
Date:   Wed Jun 13 20:35:07 2012 +0200

fix reading two smartart shapes in one document

Change-Id: If693eea8deceec7eebd45ab04de020223dc7f6a7

diff --git a/oox/source/shape/ShapeContextHandler.cxx 
b/oox/source/shape/ShapeContextHandler.cxx
index 0d59ffe..241ae86 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -288,8 +288,8 @@ ShapeContextHandler::getShape() throw 
(uno::RuntimeException)
 basegfx::B2DHomMatrix aMatrix;
 if (mpShape->getExtDrawings().size() == 0)
 {
-xResult = mpShape->getXShape();
 mpShape->addShape( *mxFilterBase, mpThemePtr.get(), xShapes, 
aMatrix );
+xResult = mpShape->getXShape();
 }
 else
 {
@@ -305,6 +305,7 @@ ShapeContextHandler::getShape() throw 
(uno::RuntimeException)
 }
 mpShape.reset((Shape*)0);
 }
+mxDiagramShapeContext.clear();
 }
 else if (mpShape.get() != NULL)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-06-05 Thread Miklos Vajna
 oox/source/drawingml/textparagraphproperties.cxx |   25 ++-
 1 file changed, 16 insertions(+), 9 deletions(-)

New commits:
commit 9dc26ca9461dbb539c523c8bd68ce171aab25d90
Author: Miklos Vajna 
Date:   Tue Jun 5 16:13:26 2012 +0200

TextParagraphProperties::pushToPropSet: limit effect of failed numrule 
import

Fixes missing paragraph properties in Writer when importing SmartArt.

Change-Id: I0091d7156b30b7ef99e550d7252a60676c23046e

diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index e82124d..abd0b3b 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -443,18 +443,25 @@ void TextParagraphProperties::pushToPropSet( const 
::oox::core::XmlFilterBase* p
 aPropSet.getProperty( xNumRule, PROP_NumberingRules );
 OSL_ENSURE( xNumRule.is(), "can't get Numbering rules");
 
-if( xNumRule.is() )
+try
 {
-if( !rioBulletMap.empty() )
+if( xNumRule.is() )
 {
-// fix default bullet size to be 100%
-if( rioBulletMap.find( PROP_BulletRelSize ) == 
rioBulletMap.end() )
-rioBulletMap[ PROP_BulletRelSize ] <<= static_cast< 
sal_Int16 >( 100 );
-Sequence< PropertyValue > aBulletPropSeq = 
rioBulletMap.makePropertyValueSequence();
-xNumRule->replaceByIndex( getLevel(), makeAny( aBulletPropSeq 
) );
+if( !rioBulletMap.empty() )
+{
+// fix default bullet size to be 100%
+if( rioBulletMap.find( PROP_BulletRelSize ) == 
rioBulletMap.end() )
+rioBulletMap[ PROP_BulletRelSize ] <<= static_cast< 
sal_Int16 >( 100 );
+Sequence< PropertyValue > aBulletPropSeq = 
rioBulletMap.makePropertyValueSequence();
+xNumRule->replaceByIndex( getLevel(), makeAny( 
aBulletPropSeq ) );
+}
+
+aPropSet.setProperty( PROP_NumberingRules, xNumRule );
 }
-
-aPropSet.setProperty( PROP_NumberingRules, xNumRule );
+}
+catch (const Exception &)
+{
+// Don't warn for now, expected to fail for Writer.
 }
 }
 if ( noParaLeftMargin )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-06-05 Thread Miklos Vajna
 oox/source/drawingml/textparagraph.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 25d7dffde13ecf32df1cce521a91c7075f372167
Author: Miklos Vajna 
Date:   Tue Jun 5 15:55:13 2012 +0200

oox::drawingml::TextParagraph: OSL_TRACE -> SAL_INFO

Change-Id: I79af1d624c420dff87751691ff8aa484fd3de2b6

diff --git a/oox/source/drawingml/textparagraph.cxx 
b/oox/source/drawingml/textparagraph.cxx
index 63a2845..adaae12 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -65,7 +65,7 @@ void TextParagraph::insertAt(
 
 sal_Int16 nLevel = maProperties.getLevel();
 
-OSL_TRACE("TextParagraph::insertAt() - level %d", nLevel);
+SAL_INFO("oox", "TextParagraph::insertAt() - level " << nLevel);
 
 const TextParagraphPropertiesVector& rListStyle = 
rTextListStyle.getListStyle();
 if ( nLevel >= static_cast< sal_Int16 >( rListStyle.size() ) )
@@ -143,7 +143,7 @@ void TextParagraph::insertAt(
 }
 catch( Exception & )
 {
-OSL_TRACE("OOX: exception in TextParagraph::insertAt");
+SAL_INFO("oox", "exception in TextParagraph::insertAt");
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-06-05 Thread Miklos Vajna
 oox/source/shape/ShapeContextHandler.cxx |   83 ++-
 oox/source/shape/ShapeFilterBase.cxx |   44 
 oox/source/shape/ShapeFilterBase.hxx |7 ++
 3 files changed, 131 insertions(+), 3 deletions(-)

New commits:
commit 110c8df2d80bd09c2848eba0091d8a1f7b51bcc9
Author: Miklos Vajna 
Date:   Mon Jun 4 12:46:17 2012 +0200

oox: import prerendered smartart into writer

Change-Id: I1c76c1bb2098c42727ae4e605e20746d0bb09463

diff --git a/oox/source/shape/ShapeContextHandler.cxx 
b/oox/source/shape/ShapeContextHandler.cxx
index 0643603..77223c0 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -26,11 +26,17 @@
  *
  /
 
+#include 
+
 #include "ShapeContextHandler.hxx"
 #include "oox/vml/vmldrawingfragment.hxx"
 #include "oox/vml/vmlshape.hxx"
 #include "oox/vml/vmlshapecontainer.hxx"
 #include "oox/drawingml/diagram/diagram.hxx"
+#include "oox/drawingml/shapegroupcontext.hxx"
+#include "oox/drawingml/shapestylecontext.hxx"
+#include "oox/drawingml/textbodycontext.hxx"
+#include "oox/drawingml/themefragmenthandler.hxx"
 
 namespace oox { namespace shape {
 
@@ -172,7 +178,21 @@ void SAL_CALL ShapeContextHandler::startFastElement
 mpThemePtr.reset(new Theme());
 
 if (Element == DGM_TOKEN(relIds))
+{
+// Parse the theme relation, if available; the diagram won't have 
colors without it.
+if (!msRelationFragmentPath.isEmpty())
+{
+FragmentHandlerRef rFragmentHandler(new 
ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
+rtl::OUString aThemeFragmentPath = 
rFragmentHandler->getFragmentPathFromFirstType( CREATE_OFFICEDOC_RELATION_TYPE( 
"theme" ) );
+uno::Reference 
xDoc(mxFilterBase->importFragment(aThemeFragmentPath), uno::UNO_QUERY_THROW);
+mxFilterBase->importFragment(new 
ThemeFragmentHandler(*mxFilterBase, aThemeFragmentPath, *mpThemePtr ), xDoc);
+ShapeFilterBase* 
pShapeFilterBase(dynamic_cast(mxFilterBase.get()));
+if (pShapeFilterBase)
+pShapeFilterBase->setCurrentTheme(mpThemePtr);
+}
+
 createFastChildContext(Element, Attribs);
+}
 
 uno::Reference xContextHandler(getContextHandler());
 
@@ -252,6 +272,48 @@ void SAL_CALL ShapeContextHandler::characters(const 
::rtl::OUString & aChars)
 xContextHandler->characters(aChars);
 }
 
+/// Generic (i.e. not specific to PPTX) handler for the prerendered diagram 
parsing.
+class ShapeExtDrawingFragmentHandler : public ::oox::core::FragmentHandler
+{
+public:
+ShapeExtDrawingFragmentHandler( oox::core::XmlFilterBase& rFilter, const 
::rtl::OUString& rFragmentPath,
+oox::drawingml::ShapePtr pGroupShapePtr ) throw()
+: FragmentHandler( rFilter, rFragmentPath ),
+mpGroupShapePtr( pGroupShapePtr )
+{
+}
+
+virtual ~ShapeExtDrawingFragmentHandler() throw()
+{
+}
+
+virtual void SAL_CALL endDocument() throw 
(::com::sun::star::xml::sax::SAXException, 
::com::sun::star::uno::RuntimeException)
+{
+}
+
+virtual ::com::sun::star::uno::Reference< 
::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL 
createFastChildContext( ::sal_Int32 Element, const 
::com::sun::star::uno::Reference< 
::com::sun::star::xml::sax::XFastAttributeList >& /*Attribs*/ ) throw 
(::com::sun::star::xml::sax::SAXException, 
::com::sun::star::uno::RuntimeException)
+{
+uno::Reference< XFastContextHandler > xRet;
+
+switch( Element )
+{
+case DSP_TOKEN( spTree ):
+xRet.set( new ShapeGroupContext(*this, ShapePtr((Shape*)0), 
mpGroupShapePtr));
+break;
+default:
+break;
+}
+
+if( !xRet.is() )
+xRet = getFastContextHandler();
+
+return xRet;
+}
+
+private:
+oox::drawingml::ShapePtrmpGroupShapePtr;
+};
+
 // ::com::sun::star::xml::sax::XFastShapeContextHandler:
 uno::Reference< drawing::XShape > SAL_CALL
 ShapeContextHandler::getShape() throw (uno::RuntimeException)
@@ -270,8 +332,25 @@ ShapeContextHandler::getShape() throw 
(uno::RuntimeException)
 else if (mxDiagramShapeContext.is())
 {
 basegfx::B2DHomMatrix aMatrix;
-mpShape->addShape( *mxFilterBase, mpThemePtr.get(), xShapes, 
aMatrix );
-xResult = mpShape->getXShape();
+if (mpShape->getExtDrawings().size() == 0)
+{
+xResult = mpShape->getXShape();
+mpShape->addShape( *mxFilterBase, mpThemePtr.get(), xShapes, 
aMatrix );
+}
+else
+{
+// Prerendered diagram output is available, then use that, and 
throw away the original result.
+for (std::vector::const_iterator aIt = 
mpShape->getExtDrawings().begin(); aIt !=

[Libreoffice-commits] .: oox/source

2012-06-01 Thread Miklos Vajna
 oox/source/token/properties.txt |1 +
 oox/source/vml/vmlshape.cxx |9 +
 2 files changed, 10 insertions(+)

New commits:
commit 229f6e187bd85d0af47da9feffef2d9ac7f83120
Author: Miklos Vajna 
Date:   Fri Jun 1 17:53:04 2012 +0200

Related: fdo#46361 fix VML import of v:rect's fillcolor

Change-Id: I530e07bb89f231b10c9e6da2eb4e6b698ee9654a

diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 2af9c8e..7330203 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -19,6 +19,7 @@ AttachedAxisIndex
 AutoFilter
 AutoShowInfo
 Autocomplete
+BackColor
 BackGraphicLocation
 BackGraphicURL
 Background
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 91e3d63..4e5e4ac 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -354,6 +354,15 @@ void ShapeBase::convertShapeProperties( const Reference< 
XShape >& rxShape ) con
 const GraphicHelper& rGraphicHelper = 
mrDrawing.getFilter().getGraphicHelper();
 maTypeModel.maStrokeModel.pushToPropMap( aPropMap, rGraphicHelper );
 maTypeModel.maFillModel.pushToPropMap( aPropMap, rGraphicHelper );
+
+// TextFrames have FillColor, not BackColor
+uno::Reference xSInfo(rxShape, uno::UNO_QUERY_THROW);
+if (xSInfo->supportsService("com.sun.star.text.TextFrame") && 
aPropMap.hasProperty(PROP_FillColor))
+{
+aPropMap.setProperty(PROP_BackColor, aPropMap[PROP_FillColor]);
+aPropMap.erase(PROP_FillColor);
+}
+
 PropertySet( rxShape ).setProperties( aPropMap );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-05-30 Thread Miklos Vajna
 oox/source/shape/ShapeContextHandler.cxx |   26 ++
 oox/source/shape/ShapeContextHandler.hxx |2 ++
 2 files changed, 28 insertions(+)

New commits:
commit 467f335161d0d098c167612fb530f3abe3b2cef4
Author: Miklos Vajna 
Date:   Wed May 30 09:56:58 2012 +0200

oox: initial smartart text is imported into Writer, take two

The original commit (8c6fb76c2cc24c336a28702b5f7f31cb5964129a) broke the
sw_subsequent_ooxmltok test, as it threated getDiagramShapeContext() a
const method, but that's not true. Check mxDiagramShapeContext directly
instead.

Change-Id: Idd730787be41cc11e6c1fc962da60f05e024ee84

diff --git a/oox/source/shape/ShapeContextHandler.cxx 
b/oox/source/shape/ShapeContextHandler.cxx
index 3234238..0643603 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -30,6 +30,7 @@
 #include "oox/vml/vmldrawingfragment.hxx"
 #include "oox/vml/vmlshape.hxx"
 #include "oox/vml/vmlshapecontainer.hxx"
+#include "oox/drawingml/diagram/diagram.hxx"
 
 namespace oox { namespace shape {
 
@@ -120,6 +121,19 @@ ShapeContextHandler::getDrawingShapeContext()
 }
 
 uno::Reference
+ShapeContextHandler::getDiagramShapeContext()
+{
+if (!mxDiagramShapeContext.is())
+{
+FragmentHandlerRef rFragmentHandler(new 
ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
+mpShape.reset(new Shape());
+mxDiagramShapeContext.set(new 
DiagramGraphicDataContext(*rFragmentHandler, mpShape));
+}
+
+return mxDiagramShapeContext;
+}
+
+uno::Reference
 ShapeContextHandler::getContextHandler()
 {
 uno::Reference xResult;
@@ -130,6 +144,9 @@ ShapeContextHandler::getContextHandler()
 case NMSP_vml:
 xResult.set(getDrawingShapeContext());
 break;
+case NMSP_dmlDiagram:
+xResult.set(getDiagramShapeContext());
+break;
 default:
 xResult.set(getGraphicShapeContext(mnStartToken));
 break;
@@ -154,6 +171,9 @@ void SAL_CALL ShapeContextHandler::startFastElement
 
 mpThemePtr.reset(new Theme());
 
+if (Element == DGM_TOKEN(relIds))
+createFastChildContext(Element, Attribs);
+
 uno::Reference xContextHandler(getContextHandler());
 
 if (xContextHandler.is())
@@ -247,6 +267,12 @@ ShapeContextHandler::getShape() throw 
(uno::RuntimeException)
 if( const ::oox::vml::ShapeBase* pShape = 
mpDrawing->getShapes().takeLastShape() )
 xResult = pShape->convertAndInsert( xShapes );
 }
+else if (mxDiagramShapeContext.is())
+{
+basegfx::B2DHomMatrix aMatrix;
+mpShape->addShape( *mxFilterBase, mpThemePtr.get(), xShapes, 
aMatrix );
+xResult = mpShape->getXShape();
+}
 else if (mpShape.get() != NULL)
 {
 basegfx::B2DHomMatrix aTransformation;
diff --git a/oox/source/shape/ShapeContextHandler.hxx 
b/oox/source/shape/ShapeContextHandler.hxx
index df9c398..95aee66 100644
--- a/oox/source/shape/ShapeContextHandler.hxx
+++ b/oox/source/shape/ShapeContextHandler.hxx
@@ -159,6 +159,7 @@ private:
 GraphicShapeContextPtr;
 css::uno::Reference mxDrawingFragmentHandler;
 css::uno::Reference mxGraphicShapeContext;
+css::uno::Reference mxDiagramShapeContext;
 
 core::XmlFilterRef mxFilterBase;
 drawingml::ThemePtr mpThemePtr;
@@ -168,6 +169,7 @@ private:
 
 css::uno::Reference 
getGraphicShapeContext(::sal_Int32 Element);
 css::uno::Reference getDrawingShapeContext();
+css::uno::Reference getDiagramShapeContext();
 css::uno::Reference getContextHandler();
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-05-29 Thread Lubos Lunak
 oox/source/shape/ShapeContextHandler.cxx |   26 --
 oox/source/shape/ShapeContextHandler.hxx |2 --
 2 files changed, 28 deletions(-)

New commits:
commit 099198a4224778fe6e43f5dc13b5b9b1b4dc828c
Author: Luboš Luňák 
Date:   Tue May 29 17:49:17 2012 +0200

Revert "oox: initial smartart text is imported into Writer"

This causes a test failure with sw's n747461.docx , since one
shape is apparently not loaded. In this patch, it seems the
"if (Element == DGM_TOKEN(relIds))" part is the problem.
Reverting the whole change until this is fixed.

This reverts commit 8c6fb76c2cc24c336a28702b5f7f31cb5964129a.

diff --git a/oox/source/shape/ShapeContextHandler.cxx 
b/oox/source/shape/ShapeContextHandler.cxx
index 5ceb101..3234238 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -30,7 +30,6 @@
 #include "oox/vml/vmldrawingfragment.hxx"
 #include "oox/vml/vmlshape.hxx"
 #include "oox/vml/vmlshapecontainer.hxx"
-#include "oox/drawingml/diagram/diagram.hxx"
 
 namespace oox { namespace shape {
 
@@ -121,19 +120,6 @@ ShapeContextHandler::getDrawingShapeContext()
 }
 
 uno::Reference
-ShapeContextHandler::getDiagramShapeContext()
-{
-if (!mxDiagramShapeContext.is())
-{
-FragmentHandlerRef rFragmentHandler(new 
ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath));
-mpShape.reset(new Shape());
-mxDiagramShapeContext.set(new 
DiagramGraphicDataContext(*rFragmentHandler, mpShape));
-}
-
-return mxDiagramShapeContext;
-}
-
-uno::Reference
 ShapeContextHandler::getContextHandler()
 {
 uno::Reference xResult;
@@ -144,9 +130,6 @@ ShapeContextHandler::getContextHandler()
 case NMSP_vml:
 xResult.set(getDrawingShapeContext());
 break;
-case NMSP_dmlDiagram:
-xResult.set(getDiagramShapeContext());
-break;
 default:
 xResult.set(getGraphicShapeContext(mnStartToken));
 break;
@@ -171,9 +154,6 @@ void SAL_CALL ShapeContextHandler::startFastElement
 
 mpThemePtr.reset(new Theme());
 
-if (Element == DGM_TOKEN(relIds))
-createFastChildContext(Element, Attribs);
-
 uno::Reference xContextHandler(getContextHandler());
 
 if (xContextHandler.is())
@@ -267,12 +247,6 @@ ShapeContextHandler::getShape() throw 
(uno::RuntimeException)
 if( const ::oox::vml::ShapeBase* pShape = 
mpDrawing->getShapes().takeLastShape() )
 xResult = pShape->convertAndInsert( xShapes );
 }
-else if (getContextHandler() == getDiagramShapeContext())
-{
-basegfx::B2DHomMatrix aMatrix;
-mpShape->addShape( *mxFilterBase, mpThemePtr.get(), xShapes, 
aMatrix );
-xResult = mpShape->getXShape();
-}
 else if (mpShape.get() != NULL)
 {
 basegfx::B2DHomMatrix aTransformation;
diff --git a/oox/source/shape/ShapeContextHandler.hxx 
b/oox/source/shape/ShapeContextHandler.hxx
index 95aee66..df9c398 100644
--- a/oox/source/shape/ShapeContextHandler.hxx
+++ b/oox/source/shape/ShapeContextHandler.hxx
@@ -159,7 +159,6 @@ private:
 GraphicShapeContextPtr;
 css::uno::Reference mxDrawingFragmentHandler;
 css::uno::Reference mxGraphicShapeContext;
-css::uno::Reference mxDiagramShapeContext;
 
 core::XmlFilterRef mxFilterBase;
 drawingml::ThemePtr mpThemePtr;
@@ -169,7 +168,6 @@ private:
 
 css::uno::Reference 
getGraphicShapeContext(::sal_Int32 Element);
 css::uno::Reference getDrawingShapeContext();
-css::uno::Reference getDiagramShapeContext();
 css::uno::Reference getContextHandler();
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-05-16 Thread Muthu Subramanian
 oox/source/drawingml/chart/objectformatter.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ef4d2a80ee726faa91b3fc2402126813d92666ef
Author: Muthu Subramanian 
Date:   Thu May 17 12:47:26 2012 +0530

n#760029: Floor borders were missing from 3D Charts.

Looks like there should always be a floor border for the 3D charts.

diff --git a/oox/source/drawingml/chart/objectformatter.cxx 
b/oox/source/drawingml/chart/objectformatter.cxx
index 2dfdaf9..a28ec41 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -208,7 +208,7 @@ static const AutoFormatEntry spPlotArea2dFills[] =
 AUTOFORMAT_END()
 };
 
-static const AutoFormatEntry spFloorLines[] =
+static const AutoFormatEntry spWallFloorLines[] =
 {
 AUTOFORMAT_COLORMOD(  1, 32, THEMED_STYLE_SUBTLE, XML_tx1, XML_tint, 75000 
),
 AUTOFORMAT_COLORMOD( 33, 40, THEMED_STYLE_SUBTLE, XML_dk1, XML_tint, 75000 
),
@@ -548,8 +548,8 @@ static const ObjectTypeFormatEntry spObjTypeFormatEntries[] 
=
 TYPEFORMAT_FRAME( OBJECTTYPE_LEGEND, &saCommonPropInfo, 
spOtherTexts,  spNoFormats, spNoFormats,   0 /* eq to Ch2 
*/ ),
 TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA2D, &saCommonPropInfo, 0, 
0 /* eq to Ch2 */,   spPlotArea2dFills, 0 /* eq to Ch2 */ ),
 TYPEFORMAT_FRAME( OBJECTTYPE_PLOTAREA3D, &saCommonPropInfo, 0, 
0 /* eq to Ch2 */,   0 /* eq to Ch2 */, 0 /* eq to Ch2 */ ),
-TYPEFORMAT_FRAME( OBJECTTYPE_WALL,   &saCommonPropInfo, 0, 
0 /* eq to Ch2 */,   spWallFloorFills,  0 /* eq to Ch2 */ ),
-TYPEFORMAT_FRAME( OBJECTTYPE_FLOOR,  &saCommonPropInfo, 0, 
spFloorLines,spWallFloorFills,  0 /* eq to Ch2 */ ),
+TYPEFORMAT_FRAME( OBJECTTYPE_WALL,   &saCommonPropInfo, 0, 
spWallFloorLines,spWallFloorFills,  0 /* eq to Ch2 */ ),
+TYPEFORMAT_FRAME( OBJECTTYPE_FLOOR,  &saCommonPropInfo, 0, 
spWallFloorLines,spWallFloorFills,  0 /* eq to Ch2 */ ),
 TYPEFORMAT_LINE(  OBJECTTYPE_AXIS,   &saCommonPropInfo, 
spOtherTexts,  spAxisLines ),
 TYPEFORMAT_FRAME( OBJECTTYPE_AXISTITLE,  &saCommonPropInfo, 
spAxisTitleTexts,  0 /* eq to Ch2 */,   0 /* eq to Ch2 */, 0 /* eq to Ch2 
*/ ),
 TYPEFORMAT_FRAME( OBJECTTYPE_AXISUNIT,   &saCommonPropInfo, 
spAxisTitleTexts,  0 /* eq in Ch2 */,   0 /* eq in Ch2 */, 0 /* eq in Ch2 
*/ ),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-05-16 Thread Muthu Subramanian
 oox/source/drawingml/textparagraphproperties.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 46083c95c9f4058cc7e9aad3c316de78446897b3
Author: Muthu Subramanian 
Date:   Wed May 16 20:53:43 2012 +0530

Crash fix.

diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index 741815b..e82124d 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -433,7 +433,7 @@ 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 ))
+if ( nNumberingType != NumberingType::BITMAP && 
!rioBulletMap.hasProperty( PROP_BulletColor ) && pFilterBase )
 rioBulletMap[ PROP_BulletColor ] <<= static_cast< sal_Int32 >( 
maTextCharacterProperties.maCharColor.getColor( 
pFilterBase->getGraphicHelper()));
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-05-05 Thread Muthu Subramanian
 oox/source/ppt/slidefragmenthandler.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 11713989b1580799635fff997b920d9bd4bf619f
Author: Muthu Subramanian 
Date:   Sat May 5 12:48:57 2012 +0530

fdo#48778: PPTX import crashes.

This probably occurs when the document has wrong idx (?)

diff --git a/oox/source/ppt/slidefragmenthandler.cxx 
b/oox/source/ppt/slidefragmenthandler.cxx
index a27e5e3..952a57c 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -140,8 +140,8 @@ SlideFragmentHandler::~SlideFragmentHandler() throw()
 
 case PPT_TOKEN( bgRef ):// a:CT_StyleMatrixReference
 {
-FillPropertiesPtr pFillPropertiesPtr( new FillProperties(
-*mpSlidePersistPtr->getTheme()->getFillStyle( 
rAttribs.getInteger( XML_idx, -1 ) ) ) );
+const FillProperties *pFillProperties = 
mpSlidePersistPtr->getTheme()->getFillStyle( rAttribs.getInteger( XML_idx, -1 ) 
);
+FillPropertiesPtr pFillPropertiesPtr( pFillProperties ? new 
FillProperties( *pFillProperties ) : new FillProperties() );
 ContextHandlerRef ret = new ColorContext( *this, 
mpSlidePersistPtr->getBackgroundColor() );
 mpSlidePersistPtr->setBackgroundProperties( pFillPropertiesPtr );
 return ret;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-05-02 Thread Caolán McNamara
 oox/source/helper/textinputstream.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit c91b51edc10dae72fc1d1f4bdfe21ef70bb00fde
Author: Caolán McNamara 
Date:   Wed May 2 12:13:01 2012 +0100

catch by const ref

Change-Id: Ib1571dfd2e7b821c929ab7efa9077a355471c0b8

diff --git a/oox/source/helper/textinputstream.cxx 
b/oox/source/helper/textinputstream.cxx
index 34c599a..ae28ad3 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -146,7 +146,7 @@ bool TextInputStream::isEof() const
 {
 return mxTextStrm->isEOF();
 }
-catch( Exception& )
+catch (const Exception&)
 {
 }
 return true;
@@ -160,7 +160,7 @@ OUString TextInputStream::readLine()
 been buffered in the previous call of readToChar() (see below). */
 return createFinalString( mxTextStrm->readLine() );
 }
-catch( Exception& )
+catch (const Exception&)
 {
 mxTextStrm.clear();
 }
@@ -188,7 +188,7 @@ OUString TextInputStream::readToChar( sal_Unicode cChar, 
bool bIncludeChar )
 }
 return aString;
 }
-catch( Exception& )
+catch (const Exception&)
 {
 mxTextStrm.clear();
 }
@@ -209,7 +209,7 @@ OUString TextInputStream::readToChar( sal_Unicode cChar, 
bool bIncludeChar )
 xTextStrm.set( xDataSink, UNO_QUERY_THROW );
 xTextStrm->setEncoding( OUString::createFromAscii( pcCharset ) );
 }
-catch( Exception& )
+catch (const Exception&)
 {
 }
 return xTextStrm;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source sw/source

2012-05-01 Thread Julien Nabet
 oox/source/helper/textinputstream.cxx |1 -
 sw/source/core/doc/tblrwcl.cxx|2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 7c243e238b228eb71ffa26a5effbb9d73a1db18f
Author: Julien Nabet 
Date:   Tue May 1 19:42:50 2012 +0200

Oups ! (Thank you Korrawit !)

Change-Id: I21122084cb35be38d859b44deb6200b68f378a0a

diff --git a/oox/source/helper/textinputstream.cxx 
b/oox/source/helper/textinputstream.cxx
index 5ecd738..34c599a 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -199,7 +199,6 @@ OUString TextInputStream::readToChar( sal_Unicode cChar, 
bool bIncludeChar )
 const Reference< XComponentContext >& rxContext, const Reference< 
XInputStream >& rxInStrm, rtl_TextEncoding eTextEnc )
 {
 Reference< XTextInputStream > xTextStrm;
-// TODO JUL const char* pcCharset = rtl_getMimeCharsetFromTextEncoding( 
eTextEnc );
 const char* pcCharset = rtl_getBestMimeCharsetFromTextEncoding( eTextEnc );
 OSL_ENSURE( pcCharset, "TextInputStream::createXTextInputStream - 
unsupported text encoding" );
 if( rxContext.is() && rxInStrm.is() && pcCharset ) try
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 4aa61c3..856e31d 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1764,7 +1764,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const 
SwSelBoxes& rBoxes,
 }
 
 SwTableLine* pInsLine = new SwTableLine(
-
(SwTableLineFmt*)pFndBox->GetLines().front().GetLine()->GetFrmFmt(), 0,
+
(SwTableLineFmt*)(&pFndBox->GetLines().front().GetLine()->GetFrmFmt()), 0,
 !pFndBox->GetUpper() ? 0 : pFndBox->GetBox() );
 pInsLine->ClaimFrmFmt()->ResetFmtAttr( RES_FRM_SIZE );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-05-01 Thread Julien Nabet
 oox/source/helper/textinputstream.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d04fb45caa46db829d21a7f9b96878655ce0f479
Author: Julien Nabet 
Date:   Tue May 1 18:46:14 2012 +0200

Resolves: fdo#49324 (Does not recognize VBA macro in JAPANESE...)

Thank you Caolán for your advice!

Change-Id: I72c5ae37d04961e261b275ba4625d3a376629d49

diff --git a/oox/source/helper/textinputstream.cxx 
b/oox/source/helper/textinputstream.cxx
index f374cc9..5ecd738 100644
--- a/oox/source/helper/textinputstream.cxx
+++ b/oox/source/helper/textinputstream.cxx
@@ -199,7 +199,8 @@ OUString TextInputStream::readToChar( sal_Unicode cChar, 
bool bIncludeChar )
 const Reference< XComponentContext >& rxContext, const Reference< 
XInputStream >& rxInStrm, rtl_TextEncoding eTextEnc )
 {
 Reference< XTextInputStream > xTextStrm;
-const char* pcCharset = rtl_getMimeCharsetFromTextEncoding( eTextEnc );
+// TODO JUL const char* pcCharset = rtl_getMimeCharsetFromTextEncoding( 
eTextEnc );
+const char* pcCharset = rtl_getBestMimeCharsetFromTextEncoding( eTextEnc );
 OSL_ENSURE( pcCharset, "TextInputStream::createXTextInputStream - 
unsupported text encoding" );
 if( rxContext.is() && rxInStrm.is() && pcCharset ) try
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/source

2012-04-25 Thread Radek Doulík
 oox/source/drawingml/shape.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c41e9c7c0a7a986c8ad87a4b8033843803792506
Author: Radek Doulik 
Date:   Wed Apr 25 19:52:13 2012 +0200

fix few issues after SAL_INFO conversion

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 51803a6..ad5dd59 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -561,7 +561,7 @@ Reference< XShape > Shape::createAndInsert(
 mpCustomShapePropertiesPtr->setTextRotateAngle( 
-nTextRotateAngle / 6 );
 }
 
-SAL_INFO("oox", "==cscode== shape name: " << msName);
+SAL_INFO("oox", "==cscode== shape name: '" << msName << "'");
 mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, 
mxShape );
 }
 else if( getTextBody() )
@@ -615,7 +615,7 @@ void Shape::moveAllToPosition( const Point &rPoint )
 
 void Shape::setMasterTextListStyle( const TextListStylePtr& 
pMasterTextListStyle )
 {
-SAL_INFO("oox", "set master text list style to shape id: %s" << msId);
+SAL_INFO("oox", "set master text list style to shape id: " << msId);
 
 mpMasterTextListStyle = pMasterTextListStyle;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits